summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2017-02-19 12:35:04 +0200
committerMichael Lando <ml636r@att.com>2017-02-19 12:35:04 +0200
commitf5f13c4f6b6fe3b4d98e349dfd7db59339803436 (patch)
tree72caffc93fab394ffa3b761505775331f1c559b9 /openecomp-be/lib
parent451a3400b76511393c62a444f588a4ed15f4a549 (diff)
push addional code
Change-Id: Ia427bb3460cda3a896f8faced2de69eaf3807b74 Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'openecomp-be/lib')
-rw-r--r--openecomp-be/lib/openecomp-common-lib/pom.xml46
-rw-r--r--openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/BaseErrorBuilder.java33
-rw-r--r--openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/CoreException.java39
-rw-r--r--openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/ErrorCategory.java64
-rw-r--r--openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/ErrorCode.java105
-rw-r--r--openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/ErrorCodeAndMessage.java88
-rw-r--r--openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/GeneralErrorBuilder.java53
-rw-r--r--openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/JsonMappingErrorBuilder.java53
-rw-r--r--openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/ValidationErrorBuilder.java68
-rw-r--r--openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/utils/AsdcCommon.java31
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/pom.xml48
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/ApplicationConfig.java35
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/ApplicationConfigFactory.java31
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/dao/ApplicationConfigDao.java33
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/dao/ApplicationConfigDaoFactory.java32
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/dao/impl/ApplicationConfigDaoCassandraImpl.java115
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/dao/impl/ApplicationConfigDaoFactoryImpl.java33
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/dao/type/ApplicationConfigEntity.java79
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/impl/ApplicationConfigFactoryImpl.java34
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/impl/ApplicationConfigImpl.java74
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/type/ConfigurationData.java48
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/resources/factoryConfiguration.json4
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/resources/logback.xml90
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/test/java/org/openecomp/sdc/applicationconfig/dao/ApplicationConfigImplDaoTest.java88
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/test/resources/questionnaire/testTemplate.txt12
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-api/pom.xml31
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-api/src/main/java/org/openecomp/core/factory/api/AbstractFactory.java81
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-api/src/main/java/org/openecomp/core/factory/impl/AbstractFactoryBase.java212
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/pom.xml36
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/src/main/java/org/openecomp/core/factory/AbstractContextFactory.java27
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/src/main/java/org/openecomp/core/factory/FactoriesConfigImpl.java61
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/src/main/java/org/openecomp/core/factory/FactoryConfig.java46
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/src/main/java/org/openecomp/core/factory/api/AbstractComponentFactory.java105
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/src/main/java/org/openecomp/core/factory/api/FactoriesConfiguration.java29
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/pom.xml34
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/pom.xml40
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/dao/BaseDao.java36
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/dao/UniqueValueDao.java28
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/dao/UniqueValueDaoFactory.java30
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/dao/types/UniqueValueEntity.java58
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/nosqldb/api/NoSqlDb.java37
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/nosqldb/factory/NoSqlDbFactory.java34
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/util/UniqueValueUtil.java127
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/resources/cassandraStatements.json6
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/resources/factoryConfiguration.json4
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/pom.xml60
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/dao/impl/CassandraBaseDao.java50
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/dao/impl/UniqueValueCassandraDaoImpl.java65
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/dao/impl/UniqueValueDaoFactoryImpl.java33
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/impl/cassandra/CassandraNoSqlDbFactoryImpl.java43
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/impl/cassandra/CassandraNoSqlDbImpl.java104
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/impl/cassandra/CassandraSessionFactory.java124
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/util/CassandraUtils.java92
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/util/ConfigurationManager.java234
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/resources/configuration.yaml253
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/org/openecomp/core/nosqldb/NoSqlDbTest.java48
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/org/openecomp/core/utilities/Yaml/YamlUtilTest.java47
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/org/openecomp/core/utilities/json/JsonUtilTest.java13
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/testobjects/yaml/InnerP.java25
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/testobjects/yaml/Parameter.java68
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/testobjects/yaml/YamlFile.java37
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/pom.xml36
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/pom.xml82
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/CommonMethods.java555
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/file/FileContentHandler.java88
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/file/FileUtils.java286
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/json/JsonSchemaDataGenerator.java185
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/json/JsonUtil.java187
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/yaml/YamlUtil.java289
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/java/org/openecomp/core/utilities/json/JsonSchemaDataGeneratorTest.java50
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/java/org/openecomp/core/utilities/json/JsonUtilTest.java40
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/resources/jsonUtil/json/a.json12
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/resources/jsonUtil/json/a_invalid.json13
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/resources/jsonUtil/json_schema/aSchema.json60
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/resources/jsonUtil/json_schema/nicSchema.json118
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/resources/jsonUtil/json_schema/schemaWithInvalidDefault.json67
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/resources/jsonUtil/json_schema/schemaWithRefsAndDefaults.json71
-rw-r--r--openecomp-be/lib/openecomp-core-lib/pom.xml23
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/pom.xml59
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/DefinedHeatParameterTypes.java110
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/HeatBoolean.java96
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/manifest/FileData.java107
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/manifest/ManifestContent.java63
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/manifest/ManifestFile.java43
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/Constraint.java78
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/Environment.java35
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/GroupTypeValues.java49
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/HeatOrchestrationTemplate.java90
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/HeatPseudoParameters.java61
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/HeatResourcesTypes.java206
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/Output.java42
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/Parameter.java90
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/ParameterGroup.java53
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/ParameterType.java42
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/PolicyTypes.java61
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/PropertiesMapKeyTypes.java42
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/Resource.java92
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/ResourceReferenceFunctions.java44
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/ResourceTypeToMessageString.java55
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/structure/Artifact.java105
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/structure/HeatStructureTree.java467
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/structure/ValidationStructureList.java40
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/ErrorCodes.java25
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/HeatConstants.java34
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/HeatStructureUtil.java261
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/manifest/ManifestUtil.java176
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/tree/HeatTreeManager.java298
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/tree/HeatTreeManagerUtil.java43
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/test/java/org/openecomp/sdc/heat/datatypes/model/EnvironmentTest.java38
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/test/java/org/openecomp/sdc/heat/datatypes/model/HeatOrchestrationTemplateTest.java122
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/test/resources/mock/model/envSettings.env36
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/test/resources/mock/model/testHeat.yml524
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/pom.xml45
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/ActionConstants.java104
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/ActionArtifactDao.java34
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/ActionArtifactDaoFactory.java31
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/ActionDao.java51
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/ActionDaoFactory.java31
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionArtifactEntity.java89
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionEntity.java224
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/EcompComponentEntity.java73
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/errors/ActionErrorConstants.java136
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/errors/ActionException.java52
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/errors/ActionExceptionMapper.java114
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/errors/ActionExceptionResponse.java66
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/logging/CategoryLogLevel.java29
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/logging/StatusCode.java26
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/Action.java255
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/ActionArtifact.java139
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/ActionArtifactProtection.java26
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/ActionLogResponseCode.java90
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/ActionRequest.java40
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/ActionStatus.java28
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/ActionSubOperation.java59
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/EcompComponent.java104
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/util/ActionUtil.java372
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/resources/factoryConfiguration.json4
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-core/pom.xml37
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-core/src/main/java/org/openecomp/sdc/action/dao/impl/ActionArtifactDaoFactoryImpl.java33
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-core/src/main/java/org/openecomp/sdc/action/dao/impl/ActionArtifactDaoImpl.java150
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-core/src/main/java/org/openecomp/sdc/action/dao/impl/ActionDaoFactoryImpl.java33
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-core/src/main/java/org/openecomp/sdc/action/dao/impl/ActionDaoImpl.java583
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/pom.xml25
-rw-r--r--openecomp-be/lib/openecomp-sdc-datatypes-lib/pom.xml38
-rw-r--r--openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/error/ErrorLevel.java25
-rw-r--r--openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/error/ErrorMessage.java91
-rw-r--r--openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/AsdcModel.java24
-rw-r--r--openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/heat/ForbiddenHeatResourceTypes.java56
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/pom.xml46
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/EnrichmentArtifactsServiceFactory.java33
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/EnrichmentConstants.java29
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/api/EnrichmentManager.java43
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/enrichmentartifacts/EnrichmentArtifactsService.java29
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/factory/EnrichmentManagerFactory.java32
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/CeilometerInfo.java71
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ComponentArtifactType.java34
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ComponentCeilometerInfo.java36
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ComponentMibInfo.java45
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/EntityInfo.java27
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/MibInfo.java45
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/resources/factoryConfiguration.json4
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/pom.xml90
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/main/java/org/openecomp/sdc/enrichment/EnrichmentArtifactsServiceFactoryImpl.java34
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/main/java/org/openecomp/sdc/enrichment/enrichmentartifacts/EnrichmentArtifactsServiceImpl.java61
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/main/java/org/openecomp/sdc/enrichment/impl/EnrichmentManagerFactoryImpl.java34
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/main/java/org/openecomp/sdc/enrichment/impl/EnrichmentManagerImpl.java84
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/java/org/openecomp/sdc/enrichment/impl/EnrichmentManagerImplTest.java245
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/all/OnlyComponentsST.yaml350
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/all/OnlyComponentsST_01.yaml350
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/all/VariouseST.yaml363
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/all/expectedOutput/OnlyComponentsST.yaml550
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/all/expectedOutput/OnlyComponentsST_01.yaml550
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/all/expectedOutput/VariouseST.yaml363
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/onlyComponents/OnlyComponentsST.yaml350
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/onlyComponents/OnlyComponentsST_01.yaml350
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/onlyComponents/expectedOutput/OnlyComponentsST.yaml550
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/onlyComponents/expectedOutput/OnlyComponentsST_01.yaml550
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/AbstractSubstituteGlobalTypesServiceTemplate.yaml47
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/CinderVolumeGlobalTypesServiceTemplate.yaml176
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/CommonGlobalTypesServiceTemplate.yaml213
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/ContrailNetworkRuleGlobalTypeServiceTemplate.yaml117
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml71
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/GlobalSubstitutionTypesServiceTemplate.yaml93
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/NativeTypesServiceTemplateServiceTemplate.yaml194
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/NeutronNetGlobalTypesServiceTemplate.yaml97
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/NeutronPortGlobalTypesServiceTemplate.yaml151
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/NeutronSecurityRulesGlobalTypesServiceTemplate.yaml116
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/NovaServerGlobalTypesServiceTemplate.yaml249
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/pom.xml102
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/EnrichmentInfo.java63
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/factory/EnricherHandlerFactory.java32
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/EnricherHandlerFactoryImpl.java33
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/EnricherHandlerImpl.java89
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/external/artifact/ExternalArtifactEnricher.java106
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/tosca/CeilometerEnricher.java112
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/tosca/ComponentInfo.java47
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/tosca/SnmpEnricher.java38
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/tosca/ToscaEnricher.java73
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/inter/Enricher.java45
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/inter/EnricherHandler.java41
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/resources/factoryConfiguration.json3
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/pom.xml41
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/pom.xml49
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceArtifactDao.java28
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceArtifactDaoFactory.java32
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceModelDao.java42
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceModelDaoFactory.java32
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceTemplateDao.java26
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceTemplateDaoFactory.java32
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceArtifactDao.java44
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceArtifactDaoFactory.java32
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceArtifactDaoInter.java44
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceModelDao.java40
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceModelDaoFactory.java31
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceTemplateDao.java44
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceTemplateDaoFactory.java32
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceTemplateDaoInter.java46
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceArtifactEntity.java136
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceTemplateEntity.java154
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifact.java29
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifactEntity.java136
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceElement.java77
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceElementEntity.java31
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplate.java38
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplateEntity.java154
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/resources/factoryConfiguration.json8
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-core/pom.xml65
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-core/src/main/java/org/openecomp/sdc/model/impl/AbstractServiceModelDao.java191
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/pom.xml61
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/EnrichedServiceArtifactDaoCassandraFactoryImpl.java36
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/EnrichedServiceArtifactDaoCassandraImpl.java137
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/EnrichedServiceModelDaoFactoryImpl.java34
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/EnrichedServiceModelDaoImpl.java44
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/EnrichedServiceTemplateDaoCassandraFactoryImpl.java36
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/EnrichedServiceTemplateDaoCassandraImpl.java147
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/ServiceArtifactDaoCassandraFactoryImpl.java34
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/ServiceArtifactDaoCassandraImpl.java139
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/ServiceModelDaoFactoryImpl.java34
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/ServiceModelDaoImpl.java38
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/ServiceTemplateDaoCassandraFactoryImpl.java34
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/ServiceTemplateDaoCassandraImpl.java145
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/pom.xml43
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/pom.xml43
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/src/main/java/org/openecomp/core/translator/api/HeatToToscaTranslator.java48
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/src/main/java/org/openecomp/core/translator/datatypes/TranslatorOutput.java48
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/src/main/java/org/openecomp/core/translator/factory/HeatToToscaTranslatorFactory.java33
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/src/main/resources/factoryConfiguration.json3
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/pom.xml89
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/AttachedResourceId.java65
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/ResourceReferenceType.java25
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/to/FileDataCollection.java123
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/to/ResourceFileDataAndIDs.java70
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/to/TranslateTo.java132
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/to/TranslatedHeatResource.java49
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/impl/heattotosca/HeatToToscaTranslatorFactoryImpl.java34
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/impl/heattotosca/HeatToToscaTranslatorImpl.java134
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/Constants.java60
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/HeatToToscaUtil.java503
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/ResourceTranslation.java37
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/ResourceTranslationFactory.java107
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/TranslationContext.java172
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/TranslationService.java344
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/IncorrectResourceReferenceErrorBuilder.java51
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/InvalidPropertyValueErrorBuilder.java47
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/MissingMandatoryPropertyErrorBuilder.java43
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/NotInSyncNumberOfInterfacesErrorBuilder.java44
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/ReferenceToUnsupportedResourceErrorBuilder.java52
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/ResourceNotFoundInHeatFileErrorBuilder.java52
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/TranslatorErrorCodes.java31
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/AbstractSubstituteGlobalType.java167
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/CinderVolumeGlobalType.java242
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/CommonGlobalTypes.java500
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailAbstractSubstituteGlobalType.java196
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailComputeGlobalType.java128
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailNetworkRuleGlobalType.java227
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailPortGlobalType.java107
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailV2NetworkRuleGlobalType.java274
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailV2VirtualMachineInterfaceGlobalType.java136
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailV2VirtualNetworkGlobalType.java239
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailVirtualNetworkGlobalType.java134
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/GlobalTypesGenerator.java128
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/GlobalTypesUtil.java69
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/NeutronNetGlobalType.java143
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/NeutronPortGlobalType.java203
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/NeutronSecurityRulesGlobalType.java175
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/NovaServerGlobalType.java307
-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.java65
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/NameExtractorService.java33
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/PropertyRegexMatcher.java69
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/VolumeTranslationHelper.java172
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/impl/NameExtractorServiceImpl.java95
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/BaseResourceConnection.java174
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ContrailV2VmInterfaceToNetResourceConnection.java139
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/NovaAndPortResourceConnectionHelper.java106
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/NovaToVolResourceConnection.java228
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/PortToNetResourceConnection.java200
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationBase.java456
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationCinderVolumeAttachmentImpl.java202
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationCinderVolumeImpl.java77
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailAttachPolicyImpl.java141
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailNetworkPolicyImpl.java53
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailServiceInstanceImpl.java663
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailServiceTemplateImpl.java100
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailV2NetworkPolicyImpl.java49
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailV2VirtualNetworkImpl.java209
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailV2VmInterfaceImpl.java126
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailVirtualNetworkImpl.java51
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationDefaultImpl.java41
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNestedImpl.java781
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNeutronNetImpl.java52
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNeutronPortImpl.java233
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNeutronSecurityGroupImpl.java47
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNeutronSubnetImpl.java170
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNovaServerGroupsImpl.java119
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNovaServerImpl.java419
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationResourceGroupImpl.java202
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/SecurityRulesToPortResourceConnection.java203
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/mapping/TranslatorHeatToToscaFunctionConverter.java410
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/mapping/TranslatorHeatToToscaParameterConverter.java271
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/mapping/TranslatorHeatToToscaPropertyConverter.java146
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/resources/heatToToscaMapping.json298
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/TestUtils.java43
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/multi/Translate_Heat_Nested_Multi.java17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/nestedvolumelocal/NestedVolumelocal.java17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/nestedvolumeseperatefile/NestedVolumeSeperateFile.java17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/recursive/TranslateHeatNestedRecursiveTest.java43
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/reusenestedfrommultibase/Translate_Heat_Nested_From_Multi_Base.java18
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/separatevol/NestedAndSeparateVolTranslationTest.java22
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/single/TranslateHeatNestedSingle.java17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/outputs/HeatOutputConversionTest.java50
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/parameters/HeatParameterConversionTest.java54
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/resources/ContrailNetworkRuleTest.java18
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/resources/OSContrailVirtualNetworkTest.java18
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/resources/OSNeutronNetTest.java17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/resources/OSNovaServerTest.java17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/sharedresource/HeatSharedResourceTest.java19
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/GlobalTypesGeneratorTest.java18
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/fullvfexample/hotmog/HotMogTranslationTest.java17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/fullvfexample/vmmesmall/VmmeSmallTranslationTest.java17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/helper/impl/NameExtractorServiceImplTest.java118
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/BaseResourceTranslationTest.java130
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ContrailV2VMInterfaceToNetResourceConnectionTest.java46
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/DependsOnResourceBaseTranslationlTest.java15
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/MultipleHeatTranslationTest.java31
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/NovaToVolResourceConnectionTest.java91
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/PortToContrailV2VirtualNetworkResourceConnectionTest.java45
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/PortToNetResourceConnectionTest.java38
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationCinderVolumeAttachmentImplTest.java52
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationCinderVolumeImplTest.java15
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailServiceInstanceImplTest.java72
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailServiceTemplateImplTest.java55
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailV2Test.java56
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailV2VMInterfaceImplTest.java36
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNeutronPortImplTest.java17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNeutronSecurityGroupImplTest.java19
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNovaServerGroupsImplTest.java16
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationResourceGroupImplTest.java110
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/SecurityGroupToNovaResourceConnectionTest.java24
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/SecurityRulesToPortResourceConnectionTest.java55
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/mapping/TranslatorHeatToToscaFunctionConverterTest.java68
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/ep-jsa-si/ep-jsa-si.env14
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/ep-jsa-si/ep-jsa-si.yaml76
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/ep-jsa-si/ep-jsa_net.env4
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/ep-jsa-si/ep-jsa_net.yaml26
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/ep-jsa-si/master-jsa.env6
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/ep-jsa-si/master-jsa.yaml57
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml236
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/MainServiceTemplate.yaml240
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml207
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/nested-pcm_v0.1_2ServiceTemplate.yaml193
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/MANIFEST.json30
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/hot-nimbus-pcm_v0.4.env14
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/hot-nimbus-pcm_v0.4.yaml82
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/hot-nimbus-pcm_v0.4_2.yaml79
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/nested-pcm_v0.1.yaml114
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/nested-pcm_v0.1_2.yaml120
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/nimbus-ethernet0
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml166
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/expectedoutputfiles/MainServiceTemplate.yaml240
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml320
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/inputs/MANIFEST.json19
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/inputs/mvs.nested.heat.yaml165
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/inputs/mvs.vfmodule.heat.yaml158
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml267
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/MainServiceTemplate.yaml241
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/nested2levelServiceTemplate.yaml175
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/nestedServiceTemplate.yaml217
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/addOn.yml26
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/base.yml58
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/nested.yml65
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/nested2level.yml59
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml472
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/MainServiceTemplate.yaml241
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/nested2levelServiceTemplate.yaml217
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/nested3levelServiceTemplate.yaml175
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/nestedServiceTemplate.yaml247
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/MANIFEST.json32
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/addOn.yml26
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/base.yml58
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/nested.yml65
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/nested2level.yml65
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/nested3level.yml59
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml79
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/expectedoutputfiles/MainServiceTemplate.yaml65
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml91
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/inputs/MANIFEST.json14
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/inputs/hot-nimbus-pcm_v0.4.yaml22
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/inputs/nested-pcm_v0.1.yaml29
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml79
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/expectedoutputfiles/MainServiceTemplate.yaml72
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml91
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/hot-nimbus-pcm_v0.4.yaml23
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/nested-pcm_v0.1.yaml31
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/volume.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml330
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/MainServiceTemplate.yaml240
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml291
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/nested-pcm_v0.1_2ServiceTemplate.yaml205
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/MANIFEST.json26
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/hot-nimbus-pcm_v0.4.env14
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/hot-nimbus-pcm_v0.4.yaml82
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/hot-nimbus-pcm_v0.4_2.yaml79
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/nested-pcm_v0.1.yaml138
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/nested-pcm_v0.1_2.yaml110
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml161
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/expectedoutputfiles/MainServiceTemplate.yaml569
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml254
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/inputs/MANIFEST.json19
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/inputs/mvs.nested.heat.yaml129
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/inputs/mvs.vfmodule.heat.yaml228
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupInvalid/inputs/MANIFEST.json19
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupInvalid/inputs/mvs.nested.heat.yaml129
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupInvalid/inputs/mvs.vfmodule.heat.yaml166
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml153
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/expectedoutputfiles/MainServiceTemplate.yaml246
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/expectedoutputfiles/dns_nested_01ServiceTemplate.yaml249
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/MANIFEST.json37
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/base_dns.env8
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/base_dns.yaml43
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/dns_az_01.env21
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/dns_az_01.yaml94
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/dns_nested_01.yaml127
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/nimbus-willows-2.pem27
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml161
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/expectedoutputfiles/MainServiceTemplate.yaml223
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml254
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/inputs/MANIFEST.json19
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/inputs/mvs.nested.heat.yaml129
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/inputs/mvs.vfmodule.heat.yaml163
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml166
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/expectedoutputfiles/MainServiceTemplate.yaml195
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml320
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/inputs/MANIFEST.json19
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/inputs/mvs.nested.heat.yaml165
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/inputs/mvs.vfmodule.heat.yaml105
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml137
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/expectedoutputfiles/MainServiceTemplate.yaml216
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml207
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/MANIFEST.json23
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/hot-nimbus-pcm_v0.4.env14
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/hot-nimbus-pcm_v0.4.yaml82
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/hot-nimbus-pcm_v0.4_2.yaml71
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/nested-pcm_v0.1.yaml114
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml137
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/expectedoutputfiles/MainServiceTemplate.yaml236
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml207
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/MANIFEST.json20
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/hot-nimbus-pcm_v0.4.env14
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/hot-nimbus-pcm_v0.4.yaml94
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/nested-pcm_v0.1.yaml114
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/outputs/expectedoutputfiles/MainServiceTemplate.yaml86
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/outputs/inputs/MANIFEST.json11
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/outputs/inputs/outputs.yaml48
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/parameters/expectedoutputfiles/MainServiceTemplate.yaml181
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/parameters/inputs/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/parameters/inputs/parameters.env6
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/parameters/inputs/parameters.yaml101
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_Network_Rule/expectedoutputfiles/MainServiceTemplate.yaml197
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_Network_Rule/inputs/MANIFEST.json12
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_Network_Rule/inputs/network_policy_chain.yaml117
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_VirtualNetwork/expectedoutputfiles/MainServiceTemplate.yaml1308
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_VirtualNetwork/inputs/MANIFEST.json21
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_VirtualNetwork/inputs/nimbus-ethernet.sh0
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_VirtualNetwork/inputs/vmme_small.env97
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_VirtualNetwork/inputs/vmme_small.yml722
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Neutron_Net/expectedoutputfiles/MainServiceTemplate.yaml219
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Neutron_Net/inputs/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Neutron_Net/inputs/ep-jsa_net.env4
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Neutron_Net/inputs/ep-jsa_net.yaml135
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Nova_Server/expectedoutputfiles/MainServiceTemplate.yaml602
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Nova_Server/inputs/MANIFEST.json25
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Nova_Server/inputs/ep-jsa_net.env4
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Nova_Server/inputs/ep-jsa_net.yaml411
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Nova_Server/inputs/nimbus-ethernet0
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Nova_Server/inputs/nimbus-ethernet-gw0
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/sharedresources/expectedoutputfiles/MainServiceTemplate.yaml95
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/sharedresources/inputs/MANIFEST.json12
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/sharedresources/inputs/sharedDefinitionOutParam.yaml45
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/expectedOutput/validationOutput.json1
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/MANIFEST.json83
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/MMSC_Capacity_Line.yml3234
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/MMSC_Capacity_Line_1.env111
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/NETWORK_OUT.yaml76
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/SG_ECA_MGMT.yaml81
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/VOLUME.yaml76
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/VOLUME_OUT.yaml76
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/art.sh1
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/cmaui.env15
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/cmaui.yml179
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/cmaui_net.yaml76
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/eca_oam.env20
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/eca_oam.yaml453
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/eca_oam_nested.yaml406
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/nested1.yaml430
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/nested2.yaml431
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/network_out.env7
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/sg_eca_mgmt.env7
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/volume.env7
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/volume_out.env7
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/expectedOutput/MainServiceTemplate.yaml4518
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/MANIFEST.json37
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/MMSC_Capacity_Line.yml3219
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/MMSC_Capacity_Line_1.env111
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/SG_ECA_MGMT.yaml76
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/cmaui.env15
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/cmaui.yml171
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/eca_oam.env20
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/eca_oam.yaml379
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/sg_eca_mgmt.env7
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/expectedOutput/GlobalSubstitutionTypesServiceTemplate.yaml347
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/expectedOutput/MainServiceTemplate.yaml4193
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/expectedOutput/eca_oamServiceTemplate.yaml569
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/MANIFEST.json37
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/MMSC_Capacity_Line.yml3219
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/MMSC_Capacity_Line_1.env111
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/SG_ECA_MGMT.yaml76
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/cmaui.env15
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/cmaui.yml171
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/eca_oam.env20
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/eca_oam.yaml407
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/sg_eca_mgmt.env7
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/ContrailV2_MultiPolicy_single_net_translation/expectedoutputfiles/MainServiceTemplate.yaml305
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/ContrailV2_MultiPolicy_single_net_translation/inputfiles/MANIFEST.json12
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/ContrailV2_MultiPolicy_single_net_translation/inputfiles/main.yml223
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/ContrailV2_Multi_net_single_policy_translation/expectedoutputfiles/MainServiceTemplate.yaml291
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/ContrailV2_Multi_net_single_policy_translation/inputfiles/MANIFEST.json12
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/ContrailV2_Multi_net_single_policy_translation/inputfiles/main.yml203
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/invalid_policy_resource_type/expectedoutputfiles/MainServiceTemplate.yaml193
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/invalid_policy_resource_type/inputfiles/MANIFEST.json12
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/invalid_policy_resource_type/inputfiles/main.yml153
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/simple/expectedoutputfiles/MainServiceTemplate.yaml225
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/simple/inputfiles/MANIFEST.json12
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/simple/inputfiles/main.yml153
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/multi/expectedoutputfiles/MainServiceTemplate.yaml190
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/multi/inputfiles/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/multi/inputfiles/addOn.yml72
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/multi/inputfiles/main.yml28
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml117
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/expectedoutputfiles/MainServiceTemplate.yaml81
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/expectedoutputfiles/nestedServiceTemplate.yaml181
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/inputfiles/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/inputfiles/main.yml27
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/inputfiles/nested.yml68
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml254
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/expectedoutputfiles/MainServiceTemplate.yaml152
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/expectedoutputfiles/nested1ServiceTemplate.yaml279
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/expectedoutputfiles/nested2ServiceTemplate.yaml146
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/inputfiles/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/inputfiles/addOn.yml32
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/inputfiles/main.yml29
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/inputfiles/nested1.yml110
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/inputfiles/nested2.yml48
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/baseResourceTranslation/expectedoutputfiles/MainServiceTemplate.yaml215
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/baseResourceTranslation/inputfiles/MANIFEST.json11
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/baseResourceTranslation/inputfiles/hot_template.yml131
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/cinder_volume_translation/expectedoutputfiles/MainServiceTemplate.yaml131
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/cinder_volume_translation/inputfiles/MANIFEST.json11
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/cinder_volume_translation/inputfiles/hot_template.yml79
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/diffServiceTemplate/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml83
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/diffServiceTemplate/expectedoutputfiles/MainServiceTemplate.yaml401
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/diffServiceTemplate/expectedoutputfiles/service_instance_1ServiceTemplate.yaml407
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/diffServiceTemplate/expectedoutputfiles/service_instance_2ServiceTemplate.yaml319
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/diffServiceTemplate/inputfiles/MANIFEST.json12
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/diffServiceTemplate/inputfiles/OCS-fw.yml213
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/oneServiceInstance/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml64
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/oneServiceInstance/expectedoutputfiles/MainServiceTemplate.yaml300
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/oneServiceInstance/expectedoutputfiles/service_instanceServiceTemplate.yaml411
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/oneServiceInstance/inputfiles/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/oneServiceInstance/inputfiles/lcp1_mss.oam-fw_si.yaml153
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/oneServiceInstance/inputfiles/lcp1_mss.oam-fw_si_with_comments.env26
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sameServiceTemplate/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml64
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sameServiceTemplate/expectedoutputfiles/MainServiceTemplate.yaml441
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sameServiceTemplate/expectedoutputfiles/service_instance_1ServiceTemplate.yaml407
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sameServiceTemplate/expectedoutputfiles/service_instance_2ServiceTemplate.yaml407
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sameServiceTemplate/inputfiles/MANIFEST.json12
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sameServiceTemplate/inputfiles/OCS-fw.yml213
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkMulti/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml71
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkMulti/expectedoutputfiles/MainServiceTemplate.yaml407
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkMulti/expectedoutputfiles/service_instanceServiceTemplate.yaml451
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkMulti/inputfiles/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkMulti/inputfiles/OCS-fw.yml173
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkMulti/inputfiles/network_base.yml47
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml154
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/expectedoutputfiles/MainServiceTemplate.yaml90
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/expectedoutputfiles/OCS-fwServiceTemplate.yaml294
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/expectedoutputfiles/service_instanceServiceTemplate.yaml275
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/inputfiles/MANIFEST.json16
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/inputfiles/OCS-fw.yml163
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/inputfiles/main.yml30
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/expectedoutputfiles/MainServiceTemplate.yaml265
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/inputfiles/MANIFEST.json11
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/inputfiles/hot_template.yml177
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/expectedoutputfiles/MainServiceTemplate.yaml203
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/inputfiles/MANIFEST.json11
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/inputfiles/hot_template.yml128
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/AbstractSubstituteGlobalTypesServiceTemplate.yaml88
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/CinderVolumeGlobalTypesServiceTemplate.yaml178
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/CommonGlobalTypesServiceTemplate.yaml354
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml166
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailComputeGlobalTypesServiceTemplate.yaml89
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailNetworkRuleGlobalTypeServiceTemplate.yaml131
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailPortGlobalTypesServiceTemplate.yaml64
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailV2NetworkRuleGlobalTypeServiceTemplate.yaml156
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml69
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailV2VirtualNetworkGlobalTypeServiceTemplate.yaml139
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml84
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/MainServiceTemplate.yaml196
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/NativeTypesServiceTemplateServiceTemplate.yaml205
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/NeutronNetGlobalTypesServiceTemplate.yaml97
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/NeutronPortGlobalTypesServiceTemplate.yaml151
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/NeutronSecurityRulesGlobalTypesServiceTemplate.yaml116
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/NovaServerGlobalTypesServiceTemplate.yaml249
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/inputfiles/MANIFEST.json11
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/inputfiles/hot_template.yml122
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-mog-0108-bs1271/expectedoutputfiles/MainServiceTemplate.yaml1459
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-mog-0108-bs1271/inputfiles/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-mog-0108-bs1271/inputfiles/hot-mog-0108-bs1271.env60
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-mog-0108-bs1271/inputfiles/hot-mog-0108-bs1271.yml733
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/MANIFEST.json99
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/cloud-nimbus.sh12
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-oam-volumes_v1.0.env6
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-oam-volumes_v1.0.yaml45
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-oam_v1.0.env18
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-oam_v1.0.yaml109
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-pcm-volumes_v1.0.env4
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-pcm-volumes_v1.0.yaml28
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-pcm_v1.0.env16
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-pcm_v1.0.yaml80
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-ppd_v1.0.yaml286
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-ppd_v1.1.env35
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-pps_v1.0.env11
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-pps_v1.0.yaml121
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-psm_v1.0.env10
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-psm_v1.0.yaml199
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nested-oam_v1.0.yaml156
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nested-pcm_v1.0.yaml150
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nested-ppd_v1.0.yaml333
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nested-pps_v1.0.yaml99
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nested-psm_v1.0.yaml99
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nimbus-ethernet5
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nimbus-ethernet-gw6
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/GlobalSubstitutionTypesServiceTemplate.yaml642
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/MainServiceTemplate.yaml1646
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/nested-oam_v1.0ServiceTemplate.yaml225
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/nested-pcm_v1.0ServiceTemplate.yaml216
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/nested-ppd_v1.0ServiceTemplate.yaml464
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/nested-pps_v1.0ServiceTemplate.yaml160
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/nested-psm_v1.0ServiceTemplate.yaml160
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/neutron_port_translation/expectedoutputfiles/MainServiceTemplate.yaml115
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/neutron_port_translation/inputfiles/MANIFEST.json11
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/neutron_port_translation/inputfiles/hot_template.yml49
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/neutron_security_group_translation/expectedoutputfiles/MainServiceTemplate.yaml169
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/neutron_security_group_translation/inputfiles/MANIFEST.json11
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/neutron_security_group_translation/inputfiles/hot_template.yml57
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novaservergroups/expectedoutputfiles/MainServiceTemplate.yaml603
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novaservergroups/inputfiles/MANIFEST.json11
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novaservergroups/inputfiles/hot_template.yml383
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml187
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/expectedoutputfiles/MainServiceTemplate.yaml194
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/expectedoutputfiles/nestedServiceTemplate.yaml279
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/inputfiles/MANIFEST.json24
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/inputfiles/a_vol.yml32
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/inputfiles/main.yml77
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/inputfiles/nested.yml170
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multiconnection/expectedoutputfiles/MainServiceTemplate.yaml276
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multiconnection/inputfiles/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multiconnection/inputfiles/addOn.yml168
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multiconnection/inputfiles/main.yml31
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multinotconnected/expectedoutputfiles/MainServiceTemplate.yaml314
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multinotconnected/inputfiles/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multinotconnected/inputfiles/addOn.yml171
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multinotconnected/inputfiles/main.yml128
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestedconnection/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml109
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestedconnection/expectedoutputfiles/MainServiceTemplate.yaml76
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestedconnection/expectedoutputfiles/nestedServiceTemplate.yaml150
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestedconnection/inputfiles/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestedconnection/inputfiles/main.yml26
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestedconnection/inputfiles/nested.yml55
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml109
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/expectedoutputfiles/MainServiceTemplate.yaml146
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/expectedoutputfiles/nestedServiceTemplate.yaml150
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/inputfiles/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/inputfiles/main.yml64
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/inputfiles/nested.yml55
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml158
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/expectedoutputfiles/MainServiceTemplate.yaml114
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/expectedoutputfiles/nestedServiceTemplate.yaml212
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/inputfiles/MANIFEST.json22
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/inputfiles/addOn.yml30
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/inputfiles/main.yml32
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/inputfiles/nested.yml87
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml158
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/expectedoutputfiles/MainServiceTemplate.yaml181
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/expectedoutputfiles/nestedServiceTemplate.yaml212
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/inputfiles/MANIFEST.json22
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/inputfiles/addOn.yml30
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/inputfiles/main.yml70
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/inputfiles/nested.yml87
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumemulticonnection/expectedoutputfiles/MainServiceTemplate.yaml326
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumesharednestedconnection/expectedoutputfiles/MainServiceTemplate.yaml104
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumesharednestedconnection/inputfiles/addOn.yml30
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/multi/expectedoutputfiles/MainServiceTemplate.yaml143
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/multi/inputfiles/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/multi/inputfiles/addOn.yml48
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/multi/inputfiles/main.yml20
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml106
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/expectedoutputfiles/MainServiceTemplate.yaml225
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/expectedoutputfiles/nestedServiceTemplate.yaml145
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/inputfiles/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/inputfiles/main.yml140
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/inputfiles/nested.yml45
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml251
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/expectedoutputfiles/MainServiceTemplate.yaml334
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/expectedoutputfiles/nested1ServiceTemplate.yaml252
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/expectedoutputfiles/nested2ServiceTemplate.yaml146
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/inputfiles/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/inputfiles/addOn.yml32
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/inputfiles/main.yml174
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/inputfiles/nested1.yml86
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/inputfiles/nested2.yml48
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/multi/expectedoutputfiles/MainServiceTemplate.yaml143
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/multi/inputfiles/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/multi/inputfiles/addOn.yml48
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/multi/inputfiles/main.yml20
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/nested/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml134
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/nested/expectedoutputfiles/MainServiceTemplate.yaml110
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/nested/expectedoutputfiles/nestedServiceTemplate.yaml203
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/nested/inputfiles/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/nested/inputfiles/main.yml42
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/nested/inputfiles/nested.yml67
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml251
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/expectedoutputfiles/MainServiceTemplate.yaml172
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/expectedoutputfiles/nested1ServiceTemplate.yaml252
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/expectedoutputfiles/nested2ServiceTemplate.yaml146
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/inputfiles/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/inputfiles/addOn.yml38
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/inputfiles/main.yml39
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/inputfiles/nested1.yml86
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/inputfiles/nested2.yml48
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetresourcegroupconnection/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml106
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetresourcegroupconnection/expectedoutputfiles/MainServiceTemplate.yaml85
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetresourcegroupconnection/expectedoutputfiles/nestedServiceTemplate.yaml145
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetresourcegroupconnection/inputfiles/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetresourcegroupconnection/inputfiles/main.yml31
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetresourcegroupconnection/inputfiles/nested.yml45
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml177
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/expectedoutputfiles/MainServiceTemplate.yaml131
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/expectedoutputfiles/nested1ServiceTemplate.yaml252
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/inputfiles/MANIFEST.json22
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/inputfiles/addOn.yml32
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/inputfiles/main.yml29
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/inputfiles/nested1.yml86
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securitygrouptonovaconnectionmulti/expectedoutputfiles/MainServiceTemplate.yaml634
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securitygrouptonovaconnectionmulti/inputfiles/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securitygrouptonovaconnectionmulti/inputfiles/addOn1.yml57
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securitygrouptonovaconnectionmulti/inputfiles/addOn2.yml57
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securitygrouptonovaconnectionmulti/inputfiles/addOn3.yml67
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securitygrouptonovaconnectionmulti/inputfiles/main.yml311
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/expectedoutputfiles/MainServiceTemplate.yaml1077
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_QRouterCloudConfig39
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_QRouterTemplate.yaml216
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_vLBAgentCloudConfig53
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_vLBAgentTemplate.yaml303
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_vLBCloudConfig41
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_vLBTemplate.yaml287
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_vProbeCloudConfig50
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_vProbeTemplate.yaml308
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEBase_Module.env91
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEBase_Module.yaml670
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/MANIFEST.json89
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/call_home.py97
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/check_availability.py34
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/qrouterdependencies.json35
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/register_status.py126
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/vlbagentdependencies_with_vLB.json46
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/vlbagentdependencies_without_vLB.json39
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/vlbdependencies.json43
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/vprobedependencies.json49
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/wait_for_resources.py84
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectionmulti/expectedoutputfiles/MainServiceTemplate.yaml340
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectionmulti/inputfiles/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectionmulti/inputfiles/addOn.yml72
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectionmulti/inputfiles/main.yml58
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportnestedconnection/expectedoutputfiles/MainServiceTemplate.yaml222
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportnestedconnection/expectedoutputfiles/nestedServiceTemplate.yaml175
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportnestedconnection/inputfiles/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportnestedconnection/inputfiles/main.yml58
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportnestedconnection/inputfiles/nested.yml58
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/expectedoutputfiles/MainServiceTemplate.yaml241
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/expectedoutputfiles/nestedServiceTemplate.yaml175
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/inputfiles/MANIFEST.json22
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/inputfiles/addOn.yml26
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/inputfiles/main.yml58
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/inputfiles/nested.yml59
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnectionmulti/expectedoutputfiles/MainServiceTemplate.yaml332
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportlinking/expectedoutputfiles/MainServiceTemplate.yaml231
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportlinking/inputfiles/MANIFEST.json22
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml119
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/expectedoutputfiles/MainServiceTemplate.yaml243
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/expectedoutputfiles/nestedServiceTemplate.yaml174
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/inputfiles/MANIFEST.json22
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/inputfiles/addOn.yml31
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/inputfiles/main.yml58
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/inputfiles/nested.yml58
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vmme_small/expectedoutputfiles/MainServiceTemplate.yaml1267
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vmme_small/inputfiles/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vmme_small/inputfiles/vmme_small.env97
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vmme_small/inputfiles/vmme_small.yml644
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vmme_small/inputfiles/vmme_small_create_fsb.env8
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vmme_small/inputfiles/vmme_small_create_fsb.yml54
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/inputfiles/MANIFEST.json24
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/inputfiles/a_vol.yml24
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/inputfiles/main.yml71
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/inputfiles/nested.yml116
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/out/GlobalSubstitutionTypesServiceTemplate.yaml146
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/out/MainServiceTemplate.yaml150
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/out/nestedServiceTemplate.yaml242
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_and_attach_one_file/expectedoutputfiles/MainServiceTemplate.yaml194
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_and_attach_one_file/inputfiles/MANIFEST.json11
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_and_attach_one_file/inputfiles/hot_template.yml131
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_nested_in_main_file_in_manifest/expectedoutputfiles/MainServiceTemplate.yaml203
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_nested_in_main_file_in_manifest/inputfiles/MANIFEST.json19
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_nested_in_main_file_in_manifest/inputfiles/a_vol.yml24
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_nested_in_main_file_in_manifest/inputfiles/hot_template.yml112
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_parallel_to_main_file/expectedoutputfiles/MainServiceTemplate.yaml189
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_parallel_to_main_file/inputfiles/MANIFEST.json16
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_parallel_to_main_file/inputfiles/a_vol.yml20
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_parallel_to_main_file/inputfiles/hot_template.yml112
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/testManifestFormat.json59
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/vmme_small_create_fsb/MANIFEST.json29
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/vmme_small_create_fsb/create_stack.sh1
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/vmme_small_create_fsb/vmme_small.env97
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/vmme_small_create_fsb/vmme_small.yml676
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/vmme_small_create_fsb/vmme_small_create_fsb.env8
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/vmme_small_create_fsb/vmme_small_create_fsb.yml54
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/pom.xml37
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/pom.xml38
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/api/ValidationManager.java35
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/errors/ErrorMessagesFormatBuilder.java30
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/errors/Messages.java117
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/factory/ValidationManagerFactory.java32
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/interfaces/Validator.java36
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/types/FileValidationContext.java53
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/types/GlobalValidationContext.java142
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/types/MessageContainer.java82
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/types/MessageContainerUtil.java64
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/resources/factoryConfiguration.json3
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/resources/validationConfiguration.json24
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/pom.xml93
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/main/java/org/openecomp/sdc/validation/impl/ValidationManagerFactoryImpl.java34
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/main/java/org/openecomp/sdc/validation/impl/ValidationManagerImpl.java69
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/main/java/org/openecomp/sdc/validation/utils/ValidationConfiguration.java37
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/main/java/org/openecomp/sdc/validation/utils/ValidationConfigurationManager.java74
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/main/java/org/openecomp/sdc/validation/utils/ValidationManagerUtil.java65
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/main/java/org/openecomp/sdc/validation/utils/ValidatorConfiguration.java51
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/java/org/openecomp/sdc/heat/services/tree/HeatTreeManagerTest.java51
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/MANIFEST.json35
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/hot-nimbus-pps_v1.0.env12
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/hot-nimbus-pps_v1.0.yaml94
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/hot-nimbus-psm_v1.0.env12
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/hot-nimbus-psm_v1.0.yaml109
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/hot-nimbus-psm_volume.yaml21
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/nested-pps_v1.0.yaml98
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/pom.xml100
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/util/HeatValidationService.java323
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/util/ResourceValidationHeatValidator.java617
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/EcompGuideLineValidator.java784
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/HeatValidator.java469
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/ManifestValidator.java153
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/YamlValidator.java97
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ErrorMessagesTest.java25
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ValidatorBaseTest.java84
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/EcompGuideLineValidatorTest.java281
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/EcompNamingConventionTest.java104
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/HeatValidatorTest.java356
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/ManifestValidatorTest.java125
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/YamlValidatorTest.java89
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/first.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/firstVol.yaml1
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/first.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/firstVol.yaml1
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/first.yaml18
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/firstVol.yaml1
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/first.yaml21
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/firstVol.yaml1
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/first.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/firstVol.yaml1
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/first.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/firstVol.yaml1
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/first.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/firstVol.yaml1
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/first.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/firstVol.yaml1
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/first.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/firstVol.yaml1
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/first.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/firstVol.yaml1
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/first.yaml25
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/firstVol.yaml19
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/first.yaml37
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/firstVol.yaml19
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/first.yaml37
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/firstVol.yaml19
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/first.yaml52
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/firstVol.yaml19
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/first.yaml58
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/firstVol.yaml19
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/first.yaml43
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/firstVol.yaml19
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/first.yaml41
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/firstVol.yaml19
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/first.yaml37
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/firstVol.yaml19
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/first.yaml27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/firstVol.yaml19
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/first.yaml26
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/firstVol.yaml19
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/first.yaml43
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/firstVol.yaml19
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/first.yaml57
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/firstVol.yaml19
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/first.yaml40
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/firstVol.yaml19
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/first.yaml39
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/firstVol.yaml19
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/first.yaml28
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/firstVol.yaml19
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/first.yaml33
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/firstVol.yaml19
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/first.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/firstVol.yaml19
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/first.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/firstVol.yaml19
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/first.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/firstVol.yaml1
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/second.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/MANIFEST.json27
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/first.yaml0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/firstVol.yaml0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/second.yaml0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/availability_zone_name/expected_output/expected_output.json38
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/availability_zone_name/input/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/availability_zone_name/input/hot-nimbus-pps_v1.0.env12
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/availability_zone_name/input/hot-nimbus-pps_v1.0.yaml92
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/floating_ip_resource_type/expected_output/expected_output.json34
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/floating_ip_resource_type/input/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/floating_ip_resource_type/input/hot-nimbus-pps_v1.0.env12
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/floating_ip_resource_type/input/hot-nimbus-pps_v1.0.yaml71
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/neutron_port_fixed_ip_name/expected_output/expected_output.json42
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/neutron_port_fixed_ip_name/input/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/neutron_port_fixed_ip_name/input/hot-nimbus-pps_v1.0.env12
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/neutron_port_fixed_ip_name/input/hot-nimbus-pps_v1.0.yaml128
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/nova_server_name/expected_output/expected_output.json50
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/nova_server_name/input/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/nova_server_name/input/hot-nimbus-pps_v1.0.env12
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/nova_server_name/input/hot-nimbus-pps_v1.0.yaml138
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/default_value_align_with_type/negative_test/input/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/default_value_align_with_type/negative_test/input/hot-nimbus-pps_v1.0.env11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/default_value_align_with_type/negative_test/input/hot-nimbus-pps_v1.0.yaml60
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/depends_on_points_to_existing_resource/input/MANIFEST.json11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/depends_on_points_to_existing_resource/input/hot-nimbus-pps_v1.0.yaml43
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input/hot-nimbus-pps_v1.0.env12
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input/hot-nimbus-pps_v1.0.yaml54
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/expected_output/expected_output.json1
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/MANIFEST.json51
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-pps_v1.0.env11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-pps_v1.0.yaml121
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-psm_v1.0.env10
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-psm_v1.0.yaml199
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/nested-pps_v1.0.yaml97
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/nested-psm_v1.0.yaml97
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_empty_value/input/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_empty_value/input/env_empty_value.env3
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_empty_value/input/env_empty_value.yaml122
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input/MANIFEST.json35
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input/hot-nimbus-pps_v1.0.env11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input/hot-nimbus-pps_v1.0.yaml50
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/expected_output/expected_output.json1
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/MANIFEST.json51
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-pps_v1.0.env11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-pps_v1.0.yaml121
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-psm_v1.0.env10
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-psm_v1.0.yaml199
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/nested-pps_v1.0.yaml97
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/nested-psm_v1.0.yaml97
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/MANIFEST.json21
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/hot-nimbus-psm_v1.0.env10
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/hot-nimbus-psm_v1.0.yaml72
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/nested-psm_v1.0.yaml103
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/expected_output/expected_output.json1
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/MANIFEST.json51
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-pps_v1.0.env11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-pps_v1.0.yaml121
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-psm_v1.0.env10
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-psm_v1.0.yaml204
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/nested-pps_v1.0.yaml97
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/nested-psm_v1.0.yaml103
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input/MANIFEST.json21
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input/hot-nimbus-psm_v1.0.env10
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input/hot-nimbus-psm_v1.0.yaml55
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/expected_output/expected_output.json1
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/MANIFEST.json51
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-pps_v1.0.env11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-pps_v1.0.yaml121
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-psm_v1.0.env10
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-psm_v1.0.yaml199
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/nested-pps_v1.0.yaml97
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/nested-psm_v1.0.yaml97
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_resource_value_valid/negative_test/input/MANIFEST.json11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_resource_value_valid/negative_test/input/hot-nimbus-pps_v1.0.yaml31
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/invalid_heat_format/negative_test/input/MANIFEST.json11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/invalid_heat_format/negative_test/input/hot-nimbus-psm_v1.0.yaml52
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/network_policy_associated_with_attach_policy/input/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/network_policy_associated_with_attach_policy/input/hot-nimbus-pps_v1.0.env11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/network_policy_associated_with_attach_policy/input/hot-nimbus-pps_v1.0.yaml69
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/MANIFEST.json45
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/hot-nimbus-psm_v1.0.env10
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/hot-nimbus-psm_v1.0.yaml56
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/nested-points-to-hot-nimbus-psm.yaml60
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/nested-psm_v1.0.yaml47
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/yaml-point-to-itself.yaml21
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/expected_output/expected_output.json1
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/MANIFEST.json51
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-pps_v1.0.env11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-pps_v1.0.yaml121
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-psm_v1.0.env10
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-psm_v1.0.yaml199
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/nested-pps_v1.0.yaml97
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/nested-psm_v1.0.yaml97
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/negative_test/input/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/negative_test/input/hot-nimbus-psm_v1.0.env10
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/negative_test/input/hot-nimbus-psm_v1.0.yaml92
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/expected_output/expected_output.json1
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/MANIFEST.json51
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-pps_v1.0.env11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-pps_v1.0.yaml121
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-psm_v1.0.env10
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-psm_v1.0.yaml236
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/nested-pps_v1.0.yaml97
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/nested-psm_v1.0.yaml97
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input/hot-nimbus-psm_v1.0.env10
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input/hot-nimbus-psm_v1.0.yaml95
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/expected_output/expected_output.json1
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/MANIFEST.json51
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-pps_v1.0.env11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-pps_v1.0.yaml121
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-psm_v1.0.env10
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-psm_v1.0.yaml233
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/nested-pps_v1.0.yaml97
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/nested-psm_v1.0.yaml97
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/MANIFEST.json51
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-pps_v1.0.env11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-pps_v1.0.yaml121
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-psm_v1.0.env10
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-psm_v1.0.yaml199
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/nested-pps_v1.0.yaml97
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/nested-psm_v1.0.yaml97
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/expected_output/expected_output.json42
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/MANIFEST.json51
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-pps_v1.0.env11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-pps_v1.0.yaml121
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-psm_v1.0.env10
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-psm_v1.0.yaml199
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/nested-pps_v1.0.yaml99
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/nested-psm_v1.0.yaml99
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/negative_test/input/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/negative_test/input/hot-nimbus-psm_v1.0.env8
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/negative_test/input/hot-nimbus-psm_v1.0.yaml116
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/expected_output/expected_output.json1
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/MANIFEST.json51
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-pps_v1.0.env11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-pps_v1.0.yaml121
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-psm_v1.0.env10
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-psm_v1.0.yaml199
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/nested-pps_v1.0.yaml114
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/nested-psm_v1.0.yaml112
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/MANIFEST.json51
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-pps_v1.0.env11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-pps_v1.0.yaml121
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-psm_v1.0.env10
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-psm_v1.0.yaml199
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/nested-pps_v1.0.yaml99
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/nested-psm_v1.0.yaml99
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/expected_output/expected_output.json1
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/MANIFEST.json51
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-pps_v1.0.env11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-pps_v1.0.yaml121
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-psm_v1.0.env10
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-psm_v1.0.yaml199
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/nested-pps_v1.0.yaml99
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/nested-psm_v1.0.yaml99
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/MANIFEST.json21
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/hot-nimbus-pps_v1.0.env11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/hot-nimbus-pps_v1.0.yaml49
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/nested-pps_v1.0.yaml74
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/expected_output/expected_output.json1
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/MANIFEST.json51
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-pps_v1.0.env11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-pps_v1.0.yaml121
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-psm_v1.0.env10
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-psm_v1.0.yaml199
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/nested-pps_v1.0.yaml97
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/nested-psm_v1.0.yaml97
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/pseudo_parameters/input/MANIFEST.json11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/pseudo_parameters/input/pseudo_parameters.yml61
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/negative_test/input/MANIFEST.json11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/negative_test/input/hot-nimbus-pps_v1.0.yaml99
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/expected_output/expected_output.json1
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/MANIFEST.json51
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/artifact.sh99
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/cloud-nimbus.sh99
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-pps_v1.0.env11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-pps_v1.0.yaml121
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-psm_v1.0.env10
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-psm_v1.0.yaml212
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/nested-pps_v1.0.yaml99
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/nested-psm_v1.0.yaml99
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/nimbus-ethernet99
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input/MANIFEST.json11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input/hot-nimbus-psm_v1.0.yaml102
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input/yamlFile.yaml47
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/negative_test/input/MANIFEST.json15
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/negative_test/input/hot-nimbus-pps_v1.0.yaml16
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/expected_output/expected_output.json1
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/MANIFEST.json51
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-pps_v1.0.env11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-pps_v1.0.yaml121
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-psm_v1.0.env10
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-psm_v1.0.yaml199
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/nested-pps_v1.0.yaml97
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/nested-psm_v1.0.yaml97
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/MANIFEST.json19
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/hot-nimbus-pps_v1.0.yaml59
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/hot-nimbus-psm_v1.0.yaml98
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/nested-from-resources-group.yaml105
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/nested-pps_v1.0.yaml52
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/expected_output/expected_output.json1
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/MANIFEST.json51
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-pps_v1.0.env11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-pps_v1.0.yaml144
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-psm_v1.0.env10
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-psm_v1.0.yaml288
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/nested-from-resources-group.yaml97
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/nested-pps_v1.0.yaml97
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/nested-psm_v1.0.yaml97
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_base_file_no_ports/input/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_base_file_no_ports/input/baseFile.yaml43
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_base_file_no_ports/input/notBaseFile.yaml26
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_called_by_port/input/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_called_by_port/input/hot-nimbus-pps_v1.0.env11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_called_by_port/input/hot-nimbus-pps_v1.0.yaml68
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_group_called_by_nova_server/input/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_group_called_by_nova_server/input/hot-nimbus-pps_v1.0.env11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_group_called_by_nova_server/input/hot-nimbus-pps_v1.0.yaml67
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/negative_test/input/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/negative_test/input/hot-nimbus-pps_v1.0.env11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/negative_test/input/hot-nimbus-pps_v1.0.yaml70
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/expected_output/expected_output.json1
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/MANIFEST.json51
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-pps_v1.0.env11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-pps_v1.0.yaml144
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-psm_v1.0.env10
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-psm_v1.0.yaml199
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/nested-pps_v1.0.yaml97
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/nested-psm_v1.0.yaml97
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/shared_resources/input/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/shared_resources/input/hot-nimbus-pps_v1.0.env11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/shared_resources/input/hot-nimbus-pps_v1.0.yaml90
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/MANIFEST.json35
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-pps_v1.0.env11
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-pps_v1.0.yaml125
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-psm_v1.0.env10
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-psm_v1.0.yaml207
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/nested-pps_v1.0.yaml103
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/nested-psm_v1.0.yaml103
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/expected_output/expected_output.json1
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input/hot-nimbus-psm_v1.0.env10
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input/hot-nimbus-psm_v1.0.yaml50
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/envInRoot/MANIFEST.json22
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/envInRoot/first.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/envInRoot/first.yaml14
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/envInRoot/second.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/MANIFEST.json24
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/illegalTypeFile.yaml0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/single.env.illegalSuffix0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/single.yaml.illegalSuffix0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/singleVol.yaml.illegalSuffix0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidManifest/MANIFEST.json21
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidManifest/single.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidManifest/single.yaml0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidManifest/singleVol.yaml0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/MANIFEST.json22
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/extraFile.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/single.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/single.yaml0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/singleVol.yaml0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifestAndInZip/MANIFEST.json21
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifestAndInZip/extraFile.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifestAndInZip/single.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifestAndInZip/single.yaml0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInZip/MANIFEST.json21
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInZip/single.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInZip/single.yaml0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/validFiles/MANIFEST.json21
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/validFiles/single.env0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/validFiles/single.yaml0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/validFiles/singleVol.yaml0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/duplicateKey.yaml30
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/emptyYaml.yaml0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalidTabYamlStructure.yaml24
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalidYamlStructure.yaml30
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/MANIFEST.json39
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/heat_missing_from_manifast.yaml250
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/mainValid.yaml250
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/validHeat.yaml250
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/expected_output/expected_output.json46
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/MANIFEST.json39
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/heat_missing_from_manifast.yaml250
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalidYamlTab.yaml250
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_additionalSpaceBeforeProperty.yaml250
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_duplicateKey.yaml25
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_empty.yml0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_yamlInXMLFormat.yaml4
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/validHeat.yaml250
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/valid_yaml/input/MANIFEST.json39
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/valid_yaml/input/heat_missing_from_manifast.yaml250
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/valid_yaml/input/mainValid.yaml250
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/valid_yaml/input/validHeat.yaml250
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/input/MANIFEST.json39
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/input/heat_missing_from_manifast.yaml250
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/input/mainValid.yaml250
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/input/validHeat.yaml250
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/pom.xml38
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/pom.xml57
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/HealingServiceFactory.java32
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/VendorLicenseArtifactServiceFactory.java33
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/VendorLicenseConstants.java43
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/EntitlementPoolDao.java38
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/EntitlementPoolDaoFactory.java31
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/FeatureGroupDao.java47
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/FeatureGroupDaoFactory.java31
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/LicenseAgreementDao.java40
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/LicenseAgreementDaoFactory.java31
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/LicenseKeyGroupDao.java34
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/LicenseKeyGroupDaoFactory.java32
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/VendorLicenseModelDao.java29
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/VendorLicenseModelDaoFactory.java32
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/AggregationFunction.java27
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/ChoiceOrOther.java154
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementMetric.java37
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementPoolEntity.java370
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementTime.java30
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/FeatureGroupEntity.java203
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/FeatureGroupModel.java75
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseAgreementEntity.java182
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseAgreementModel.java45
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseKeyGroupEntity.java231
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseKeyType.java27
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseTerm.java28
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/MultiChoiceOrOther.java172
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/OperationalScope.java32
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/ThresholdUnit.java26
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/VendorLicenseModelEntity.java153
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/xml/AggregationFunctionForXml.java33
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/xml/EntitlementMetricForXml.java33
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/xml/EntitlementTimeForXml.java33
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/xml/LicenseKeyTypeForXml.java33
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/xml/ThresholdForXml.java42
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/errors/JsonErrorBuilder.java51
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/errors/LicensingDataInvalidErrorBuilder.java49
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/errors/SubmitUncompletedLicenseModelErrorBuilder.java50
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/errors/VendorLicenseErrorCodes.java28
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/errors/VendorLicenseModelNotFoundErrorBuilder.java48
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/facade/VendorLicenseFacade.java89
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/facade/VendorLicenseFacadeFactory.java32
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/healing/HealingService.java31
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/VendorLicenseArtifactsService.java32
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/types/VersionedVendorLicenseModel.java54
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/resources/factoryConfiguration.json11
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/pom.xml48
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/SimpleHealingServiceServiceFactoryImpl.java34
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/VendorLicenseArtifactServiceFactoryImpl.java34
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/EntitlementPoolCassandraDaoImpl.java148
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/EntitlementPoolDaoFactoryImpl.java33
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/FeatureGroupCassandraDaoImpl.java206
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/FeatureGroupDaoFactoryImpl.java33
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/LicenseAgreementCassandraDaoImpl.java160
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/LicenseAgreementDaoFactoryImpl.java33
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/LicenseKeyGroupCassandraDaoImpl.java130
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/LicenseKeyGroupDaoFactoryImpl.java33
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/VendorLicenseModelCassandraDaoImpl.java91
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/VendorLicenseModelDaoFactoryImpl.java34
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/facade/impl/VendorLicenseFacadeFactoryImpl.java33
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/facade/impl/VendorLicenseFacadeImpl.java478
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/healing/impl/SimpleHealingServiceImpl.java63
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/VendorLicenseArtifactsServiceImpl.java200
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/FeatureGroupForArtifact.java60
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/VendorLicenseArtifact.java80
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/VnfLicenseArtifact.java97
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/XmlArtifact.java54
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/mixins/MixinEntitlementPoolEntityForVendorLicenseArtifact.java100
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/mixins/MixinEntitlementPoolEntityForVnfArtifact.java100
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/mixins/MixinFeatureGroupEntity.java62
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/mixins/MixinFeatureGroupModel.java61
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/mixins/MixinLicenseKeyGroupEntityForVendorLicenseArtifact.java72
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/mixins/MixinLicenseKeyGroupEntityForVnfArtifact.java74
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/pom.xml24
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/pom.xml63
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/VendorSoftwareProductConstants.java38
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ComponentArtifactDao.java40
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ComponentArtifactDaoFactory.java32
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ComponentDao.java38
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ComponentDaoFactory.java31
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/NetworkDao.java33
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/NetworkDaoFactory.java31
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/NicDao.java40
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/NicDaoFactory.java31
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/PackageInfoDao.java33
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/PackageInfoDaoFactory.java31
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ProcessArtifactDao.java32
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ProcessArtifactDaoFactory.java32
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ProcessDao.java30
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ProcessDaoFactory.java31
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/UploadDataDao.java34
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/UploadDataDaoFactory.java31
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/VendorSoftwareProductDao.java140
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/VendorSoftwareProductDaoFactory.java34
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/VendorSoftwareProductInfoDao.java30
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/VendorSoftwareProductInfoDaoFactory.java32
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/VspQuestionnaireDao.java32
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/VspQuestionnaireDaoFactory.java32
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/Action.java27
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ComponentArtifactEntity.java140
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ComponentEntity.java199
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/CompositionEntity.java40
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/NetworkEntity.java183
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/NicEntity.java203
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/PackageInfo.java176
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ProcessArtifactEntity.java128
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ProcessEntity.java179
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/TranslatedFileData.java97
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/UploadDataEntity.java135
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/VspDetails.java242
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/VspQuestionnaireEntity.java111
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/Component.java44
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/ComponentData.java80
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/CompositionData.java44
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/CompositionDataEntity.java24
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/CompositionEntityId.java64
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/CompositionEntityType.java28
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/Network.java67
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/NetworkType.java26
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/Nic.java102
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/resources/factoryConfiguration.json14
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/pom.xml67
-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/dao/impl/ComponentArtifactDaoCassandraImpl.java159
-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/dao/impl/ComponentArtifactDaoFactoryImpl.java33
-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/dao/impl/ComponentDaoCassandraImpl.java139
-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/dao/impl/ComponentDaoFactoryImpl.java33
-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/dao/impl/NetworkDaoCassandraImpl.java127
-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/dao/impl/NetworkDaoFactoryImpl.java33
-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/dao/impl/NicDaoCassandraImpl.java148
-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/dao/impl/NicDaoFactoryImpl.java33
-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/dao/impl/PackageInfoDaoFactoryImpl.java33
-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/dao/impl/PackageInfoDaoImpl.java103
-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/dao/impl/ProcessArtifactDaoCassandraImpl.java82
-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/dao/impl/ProcessArtifactDaoFactoryImpl.java33
-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/dao/impl/ProcessDaoCassandraImpl.java139
-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/dao/impl/ProcessDaoFactoryImpl.java33
-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/dao/impl/UploadDataDaoFactoryImpl.java33
-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/dao/impl/UploadDataDaoImpl.java92
-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/dao/impl/VendorSoftwareProductDaoFactoryImpl.java33
-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/dao/impl/VendorSoftwareProductDaoImpl.java349
-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/dao/impl/VendorSoftwareProductInfoDaoFactoryImpl.java34
-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/dao/impl/VendorSoftwareProductInfoDaoImpl.java83
-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/dao/impl/VspQuestionnaireDaoCassandraImpl.java72
-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/dao/impl/VspQuestionnaireDaoFactoryImpl.java33
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ServiceModelDaoFactoryTest.java97
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/pom.xml23
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/pom.xml71
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/VersioningManager.java57
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/VersioningManagerFactory.java31
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/VersioningUtil.java187
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionHistoryDao.java27
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionHistoryDaoFactory.java30
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionInfoDao.java28
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionInfoDaoFactory.java30
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionInfoDeletedDao.java29
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionInfoDeletedDaoFactory.java32
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionableDao.java25
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionableEntityDao.java34
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionableEntityDaoFactory.java31
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/UserCandidateVersion.java56
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/Version.java119
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionHistoryEntity.java90
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionInfoDeletedEntity.java126
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionInfoEntity.java126
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionStatus.java28
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionType.java26
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionableEntity.java43
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionableEntityId.java53
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/CheckinOnEntityLockedByOtherErrorBuilder.java52
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/CheckinOnUnlockedEntityErrorBuilder.java46
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/CheckoutOnLockedEntityErrorBuilder.java51
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/DeleteOnLockedEntityErrorBuilder.java49
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EditOnEntityLockedByOtherErrorBuilder.java50
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EditOnUnlockedEntityErrorBuilder.java48
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EntityAlreadyExistErrorBuilder.java46
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EntityAlreadyFinalizedErrorBuilder.java51
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EntityNotExistErrorBuilder.java46
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/RequestedVersionInvalidErrorBuilder.java40
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/SubmitLockedEntityNotAllowedErrorBuilder.java49
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/UndoCheckoutOnEntityLockedByOtherErrorBuilder.java53
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/UndoCheckoutOnUnlockedEntityErrorBuilder.java50
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/VersionableSubEntityNotFoundErrorBuilder.java77
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/VersioningErrorCodes.java43
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/UniqueValueMetadata.java49
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionInfo.java97
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionableEntityAction.java26
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionableEntityMetadata.java78
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/resources/factoryConfiguration.json7
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/pom.xml61
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionHistoryCassandraDaoImpl.java69
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionHistoryDaoFactoryImpl.java33
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDaoFactoryImpl.java33
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDaoImpl.java66
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDeletedDaoFactoryImpl.java34
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDeletedDaoImpl.java65
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionableEntityDaoCassandraImpl.java159
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionableEntityDaoFactoryImpl.java33
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersioningManagerFactoryImpl.java33
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersioningManagerImpl.java468
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/java/org/openecomp/sdc/versioning/VersioningManagerTest.java364
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/pom.xml23
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/pom.xml66
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaArtifactType.java39
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaCapabilityType.java52
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaDataType.java84
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaElementTypes.java25
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaFunctions.java43
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaGroupType.java40
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaNodeType.java162
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaPolicyType.java43
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaRelationshipType.java44
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaServiceModel.java72
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ArtifactDefinition.java69
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ArtifactType.java83
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/AttributeDefinition.java85
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityAssignment.java45
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityDefinition.java113
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityFilterDefinition.java35
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityType.java82
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Constraint.java181
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/DataType.java73
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Directive.java40
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/EntrySchema.java65
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/GroupDefinition.java64
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/GroupType.java82
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Import.java61
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/InterfaceDefinition.java24
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/InterfaceType.java24
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Metadata.java55
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/NodeFilter.java47
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/NodeTemplate.java127
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/NodeType.java125
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ParameterDefinition.java99
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PolicyDefinition.java63
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PolicyType.java73
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PropertyDefinition.java112
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PropertyType.java117
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RelationshipTemplate.java99
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RelationshipType.java93
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RequirementAssignment.java70
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RequirementDefinition.java82
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Scalar.java34
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ServiceTemplate.java144
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Status.java42
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/SubstitutionMapping.java54
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Template.java24
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/TopologyTemplate.java114
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/heatextend/ParameterDefinitionExt.java55
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/heatextend/PropertyTypeExt.java85
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/InvalidAddActionNullEntityErrorBuilder.java58
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/InvalidRequirementAssignmentErrorBuilder.java57
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaErrorCodes.java36
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaInvalidEntryNotFoundErrorBuilder.java55
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaInvalidSubstituteNodeTemplateErrorBuilder.java55
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaInvalidSubstituteNodeTemplatePropertiesErrorBuilder.java59
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaInvalidSubstitutionServiceTemplateErrorBuilder.java57
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaMissingSubstitutionMappingForReqCapErrorBuilder.java88
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaNodeTypeNotFoundErrorBuilder.java46
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/exceptions/CsarCreationErrorBuilder.java43
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/exceptions/CsarMissingEntryPointErrorBuilder.java44
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java588
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaAnalyzerService.java66
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaConstants.java65
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaFileOutputService.java34
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaNativeTypesServiceTemplate.java309
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaUtil.java151
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaAnalyzerServiceImpl.java467
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImpl.java158
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/yamlutil/ToscaExtensionYamlUtil.java93
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/TestUtil.java71
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/datatypes/PropertyTypeTest.java20
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/datatypes/ToscaModelTest.java282
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityDefinitionTest.java101
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/datatypes/model/RequirementDefinitionTest.java40
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/DataModelUtilTest.java104
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/impl/ToscaAnalyzerServiceImplTest.java472
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImplTest.java150
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/analyzerService/NestedServiceTemplateReqTest.yaml176
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/analyzerService/ServiceTemplateSubstituteTest.yaml89
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/analyzerService/toscasubstitution/MainServiceTemplate.yaml75
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/analyzerService/toscasubstitution/nestedServiceTemplate.yaml130
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/AbstractSubstituteGlobalTypesServiceTemplate.yaml47
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/CinderVolumeGlobalTypesServiceTemplate.yaml176
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/CommonGlobalTypesServiceTemplate.yaml210
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/ContrailNetworkRuleGlobalTypeServiceTemplate.yaml117
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml71
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/GlobalSubstitutionTypesServiceTemplate.yaml93
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/NativeTypesServiceTemplateServiceTemplate.yaml194
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/NeutronNetGlobalTypesServiceTemplate.yaml97
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/NeutronPortGlobalTypesServiceTemplate.yaml151
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/NeutronSecurityRulesGlobalTypesServiceTemplate.yaml116
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/NovaServerGlobalTypesServiceTemplate.yaml249
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/model/serviceTemplate.yaml116
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/model/serviceTemplateHeatExtend.yaml117
-rw-r--r--openecomp-be/lib/pom.xml30
1640 files changed, 175274 insertions, 0 deletions
diff --git a/openecomp-be/lib/openecomp-common-lib/pom.xml b/openecomp-be/lib/openecomp-common-lib/pom.xml
new file mode 100644
index 0000000000..78c5e86ec7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-common-lib/pom.xml
@@ -0,0 +1,46 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <groupId>org.openecomp.sdc</groupId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>openecomp-common-lib</artifactId>
+ <groupId>org.openecomp.core</groupId>
+ <name>openecomp-common-lib</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-utilities-lib</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-datatypes-lib</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.ws.rs</groupId>
+ <artifactId>javax.ws.rs-api</artifactId>
+ <version>${ws.rs.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <version>1.1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <version>1.1.2</version>
+ </dependency>
+ </dependencies>
+
+
+
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/BaseErrorBuilder.java b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/BaseErrorBuilder.java
new file mode 100644
index 0000000000..367cbf7df6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/BaseErrorBuilder.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.common.errors;
+
+public abstract class BaseErrorBuilder {
+ private final ErrorCode.ErrorCodeBuilder builder = new ErrorCode.ErrorCodeBuilder();
+
+ public ErrorCode build() {
+ return builder.build();
+ }
+
+ protected ErrorCode.ErrorCodeBuilder getErrorCodeBuilder() {
+ return builder;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/CoreException.java b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/CoreException.java
new file mode 100644
index 0000000000..3b464ca107
--- /dev/null
+++ b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/CoreException.java
@@ -0,0 +1,39 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.common.errors;
+
+public class CoreException extends RuntimeException {
+
+ private ErrorCode errorCode;
+
+ public CoreException(ErrorCode errorCode) {
+ this(errorCode, null);
+ }
+
+ public CoreException(ErrorCode errorCode, Throwable cause) {
+ super(errorCode.toString(), cause);
+ this.errorCode = errorCode;
+ }
+
+ public ErrorCode code() {
+ return errorCode;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/ErrorCategory.java b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/ErrorCategory.java
new file mode 100644
index 0000000000..d24ee62124
--- /dev/null
+++ b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/ErrorCategory.java
@@ -0,0 +1,64 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.common.errors;
+
+public enum ErrorCategory {
+ /**
+ * System-level problems caused by external factors, resources shortage and similar. For instance:
+ * <ul>
+ * <li>I/O problems (network connectivity, filesystem access etc)</li>
+ * <li>Java issues (missing or incompatible class definitions etc)</li>
+ * <li>Environment problems</li>
+ * </ul>
+ */
+ SYSTEM,
+
+ /**
+ * Application-level issues related to implementation of certain functionality (such as detected
+ * illegal states of a program or data inconsistency).
+ */
+ APPLICATION,
+
+ /**
+ * Problems related to violations of different rules set either by product metadata (catalog
+ * definitions or similar) or other types of constraints.
+ */
+ VALIDATION,
+
+ /**
+ * Problems caused by attempt of a user to perform certain operations which contradict the
+ * system rules. Mostly applicable to UI-driven flows in presentation tier.
+ */
+ USER,
+
+ /**
+ * Improper values set in the system configuration (negative numbers, missing or inconsistent
+ * definitions, mismatch with valid values list etc).
+ * */
+ CONFIGURATION,
+
+ /**
+ * Security constraint violations (failed login attempts, lack of permissions to perform
+ * operation and so on). Any problems related to authentication/authorization should use the
+ * special category for system auditing purposes.
+ */
+ SECURITY
+}
diff --git a/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/ErrorCode.java b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/ErrorCode.java
new file mode 100644
index 0000000000..aa0b123d4a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/ErrorCode.java
@@ -0,0 +1,105 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.common.errors;
+
+import java.io.Serializable;
+
+public class ErrorCode implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private String id;
+ private String message;
+ private ErrorCategory category;
+
+ protected ErrorCode() {
+ }
+
+ public String id() {
+ return id;
+ }
+
+ @Deprecated
+ protected void id(String id) {
+ this.id = id;
+ }
+
+ public String message() {
+ return message;
+ }
+
+ @Deprecated
+ protected void message(String message) {
+ this.message = message;
+ }
+
+ public ErrorCategory category() {
+ return category;
+ }
+
+ @Deprecated
+ protected void category(ErrorCategory category) {
+ this.category = category;
+ }
+
+ @Override
+ public String toString() {
+ return message;
+ }
+
+ public static class ErrorCodeBuilder {
+
+ private String id;
+ private String message;
+ private ErrorCategory category = ErrorCategory.APPLICATION;
+
+ public ErrorCodeBuilder withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ //todo remove later
+
+ public ErrorCodeBuilder withMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ //todo remove later
+ public ErrorCodeBuilder withCategory(ErrorCategory category) {
+ this.category = category;
+ return this;
+ }
+
+ /**
+ * Build error code.
+ *
+ * @return the error code
+ */
+ public ErrorCode build() {
+ ErrorCode inst = new ErrorCode();
+ inst.id = id;
+ inst.message = message;
+ inst.category = category;
+ return inst;
+ }
+ }
+}
diff --git a/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/ErrorCodeAndMessage.java b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/ErrorCodeAndMessage.java
new file mode 100644
index 0000000000..672397f53c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/ErrorCodeAndMessage.java
@@ -0,0 +1,88 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.common.errors;
+
+
+import javax.ws.rs.core.Response;
+
+/**
+ * This class represents an error object to be returned in failed REST instead of just returning one
+ * of HTTP fail statuses.
+ *
+ */
+public class ErrorCodeAndMessage {
+
+ /**
+ * the HTTP status code.
+ */
+ private Response.Status status;
+
+ /**
+ * Error code no. if available.
+ */
+ private String errorCode;
+
+ /**
+ * the error message to be displayed.
+ */
+ private String message;
+
+ public ErrorCodeAndMessage() {
+ }
+
+ /**
+ * Instantiates a new Error code and message.
+ *
+ * @param status the status
+ * @param errorCode the error code
+ */
+ public ErrorCodeAndMessage(Response.Status status, ErrorCode errorCode) {
+ this.status = status;
+ this.message = errorCode.message();
+ this.errorCode = errorCode.id();
+ }
+
+
+ public Response.Status getStatus() {
+ return status;
+ }
+
+ public void setStatus(Response.Status status) {
+ this.status = status;
+ }
+
+ public String getErrorCode() {
+ return errorCode;
+ }
+
+ public void setErrorCode(String errorCode) {
+ this.errorCode = errorCode;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/GeneralErrorBuilder.java b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/GeneralErrorBuilder.java
new file mode 100644
index 0000000000..155d020396
--- /dev/null
+++ b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/GeneralErrorBuilder.java
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.common.errors;
+
+/**
+ * The type General error builder.
+ */
+public class GeneralErrorBuilder {
+
+ private static final String GENERAL_ERROR_REST_ID = "GENERAL_ERROR_REST_ID";
+ private static final String GENERAL_ERROR_REST_MSG = "An error has occurred: %s";
+
+ private final ErrorCode.ErrorCodeBuilder builder = new ErrorCode.ErrorCodeBuilder();
+
+ /**
+ * Instantiates a new General error builder.
+ *
+ * @param detailedError the detailed error
+ */
+ public GeneralErrorBuilder(String detailedError) {
+ builder.withId(GENERAL_ERROR_REST_ID);
+ builder.withCategory(ErrorCategory.APPLICATION);
+ builder.withMessage(String.format(GENERAL_ERROR_REST_MSG, detailedError));
+ }
+
+ /**
+ * Build error code.
+ *
+ * @return the error code
+ */
+ public ErrorCode build() {
+ return builder.build();
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/JsonMappingErrorBuilder.java b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/JsonMappingErrorBuilder.java
new file mode 100644
index 0000000000..2a916dbf90
--- /dev/null
+++ b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/JsonMappingErrorBuilder.java
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.common.errors;
+
+/**
+ * The type Json mapping error builder.
+ */
+public class JsonMappingErrorBuilder {
+
+ private static final String JSON_MAPPING_ERROR_ERR_ID = "JSON_MAPPING_ERROR_ERR_ID";
+ private static final String JSON_MAPPING_ERROR_ERR_ERR_MSG =
+ "Error occurred while parsing the JSON input/body. Further info can be found in the log";
+
+
+ private final ErrorCode.ErrorCodeBuilder builder = new ErrorCode.ErrorCodeBuilder();
+
+ /**
+ * Instantiates a new Json mapping error builder.
+ */
+ public JsonMappingErrorBuilder() {
+ builder.withId(JSON_MAPPING_ERROR_ERR_ID);
+ builder.withCategory(ErrorCategory.APPLICATION);
+ builder.withMessage(String.format(JSON_MAPPING_ERROR_ERR_ERR_MSG));
+ }
+
+ /**
+ * Build error code.
+ *
+ * @return the error code
+ */
+ public ErrorCode build() {
+ return builder.build();
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/ValidationErrorBuilder.java b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/ValidationErrorBuilder.java
new file mode 100644
index 0000000000..eb60a63a4b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/ValidationErrorBuilder.java
@@ -0,0 +1,68 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.common.errors;
+
+/**
+ * The type Validation error builder.
+ */
+public class ValidationErrorBuilder {
+
+ /**
+ * The constant FIELD_VALIDATION_ERROR_ERR_ID.
+ */
+ public static final String FIELD_VALIDATION_ERROR_ERR_ID = "FIELD_VALIDATION_ERROR_ERR_ID";
+ private static final String FIELD_VALIDATION_ERROR_ERR_MSG =
+ "Field does not conform to predefined criteria : %s : %s";
+ private static final String FIELD_VALIDATION_ERROR_ERR_MSG_USE_PREDEFINED_FOR_FIELD = "%s";
+ private static final String FIELD_WITH_PREDEFINED_MESSAGE = "arg\\d";
+
+
+ private final ErrorCode.ErrorCodeBuilder builder = new ErrorCode.ErrorCodeBuilder();
+
+ /**
+ * Instantiates a new Validation error builder.
+ *
+ * @param detailedMessage the detailed message
+ * @param fieldName the field name
+ */
+ public ValidationErrorBuilder(String detailedMessage, String fieldName) {
+ builder.withId(FIELD_VALIDATION_ERROR_ERR_ID);
+ builder.withCategory(ErrorCategory.APPLICATION);
+
+ if (fieldName.matches(FIELD_WITH_PREDEFINED_MESSAGE)) {
+ builder.withMessage(
+ String.format(FIELD_VALIDATION_ERROR_ERR_MSG_USE_PREDEFINED_FOR_FIELD, detailedMessage));
+ } else {
+ builder
+ .withMessage(String.format(FIELD_VALIDATION_ERROR_ERR_MSG, fieldName, detailedMessage));
+ }
+ }
+
+ /**
+ * Build error code.
+ *
+ * @return the error code
+ */
+ public ErrorCode build() {
+ return builder.build();
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/utils/AsdcCommon.java b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/utils/AsdcCommon.java
new file mode 100644
index 0000000000..d3806ff34e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/utils/AsdcCommon.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.common.utils;
+
+public class AsdcCommon {
+
+ public static final String MANIFEST_NAME = "MANIFEST.json";
+ public static final String UPLOAD_FILE = "uploadFile";
+
+ public static final String HEAT_TO_TOSCA_MAPPING_CONF = "heatToToscaMapping.json";
+ public static final String HEAT_META = "HEAT.meta";
+ public static final String PARENT = "parent";
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/pom.xml b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/pom.xml
new file mode 100644
index 0000000000..a10e9cbd04
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/pom.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-core-lib</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>openecomp-config-lib</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.google.code.gson</groupId>
+ <artifactId>gson</artifactId>
+ <version>2.3.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.yaml</groupId>
+ <artifactId>snakeyaml</artifactId>
+ <version>1.14</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-nosqldb-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>6.9.10</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-vendor-software-product-api</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/ApplicationConfig.java b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/ApplicationConfig.java
new file mode 100644
index 0000000000..a68c6b614a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/ApplicationConfig.java
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.utilities.applicationconfig;
+
+import org.openecomp.core.utilities.applicationconfig.dao.type.ApplicationConfigEntity;
+import org.openecomp.core.utilities.applicationconfig.type.ConfigurationData;
+
+import java.util.Collection;
+
+public interface ApplicationConfig {
+
+ ConfigurationData getConfigurationData(String namespace, String key);
+
+ void insertValue(String namespace, String key, String value);
+
+ Collection<ApplicationConfigEntity> getListOfConfigurationByNamespace(String namespace);
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/ApplicationConfigFactory.java b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/ApplicationConfigFactory.java
new file mode 100644
index 0000000000..e022294dfd
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/ApplicationConfigFactory.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.utilities.applicationconfig;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class ApplicationConfigFactory extends AbstractComponentFactory<ApplicationConfig> {
+
+ public static ApplicationConfigFactory getInstance() {
+ return AbstractFactory.getInstance(ApplicationConfigFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/dao/ApplicationConfigDao.java b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/dao/ApplicationConfigDao.java
new file mode 100644
index 0000000000..a4c582744a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/dao/ApplicationConfigDao.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.utilities.applicationconfig.dao;
+
+import org.openecomp.core.dao.BaseDao;
+import org.openecomp.core.utilities.applicationconfig.dao.type.ApplicationConfigEntity;
+import org.openecomp.core.utilities.applicationconfig.type.ConfigurationData;
+
+
+public interface ApplicationConfigDao extends BaseDao<ApplicationConfigEntity> {
+
+ long getValueTimestamp(String namespace, String key);
+
+ ConfigurationData getConfigurationData(String namespace, String key);
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/dao/ApplicationConfigDaoFactory.java b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/dao/ApplicationConfigDaoFactory.java
new file mode 100644
index 0000000000..f60e4a9010
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/dao/ApplicationConfigDaoFactory.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.utilities.applicationconfig.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class ApplicationConfigDaoFactory
+ extends AbstractComponentFactory<ApplicationConfigDao> {
+
+ public static ApplicationConfigDaoFactory getInstance() {
+ return AbstractFactory.getInstance(ApplicationConfigDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/dao/impl/ApplicationConfigDaoCassandraImpl.java b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/dao/impl/ApplicationConfigDaoCassandraImpl.java
new file mode 100644
index 0000000000..7fb0e2f5ae
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/dao/impl/ApplicationConfigDaoCassandraImpl.java
@@ -0,0 +1,115 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.utilities.applicationconfig.dao.impl;
+
+import com.datastax.driver.core.ResultSet;
+import com.datastax.driver.core.Row;
+import com.datastax.driver.mapping.Mapper;
+import com.datastax.driver.mapping.Result;
+import com.datastax.driver.mapping.annotations.Accessor;
+import com.datastax.driver.mapping.annotations.Query;
+import org.openecomp.core.dao.impl.CassandraBaseDao;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import org.openecomp.core.utilities.applicationconfig.dao.ApplicationConfigDao;
+import org.openecomp.core.utilities.applicationconfig.dao.type.ApplicationConfigEntity;
+import org.openecomp.core.utilities.applicationconfig.type.ConfigurationData;
+
+import java.util.Collection;
+import java.util.Objects;
+
+public class ApplicationConfigDaoCassandraImpl extends CassandraBaseDao<ApplicationConfigEntity>
+ implements ApplicationConfigDao {
+
+ private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static final Mapper<ApplicationConfigEntity> mapper =
+ noSqlDb.getMappingManager().mapper(ApplicationConfigEntity.class);
+ private static final ApplicationConfigAccessor accessor =
+ noSqlDb.getMappingManager().createAccessor(ApplicationConfigAccessor.class);
+
+ @Override
+ protected Mapper<ApplicationConfigEntity> getMapper() {
+ return mapper;
+ }
+
+ @Override
+ protected Object[] getKeys(ApplicationConfigEntity entity) {
+ return new Object[]{entity.getNamespace(), entity.getKey(), entity.getValue()};
+ }
+
+ @Override
+ public Collection<ApplicationConfigEntity> list(ApplicationConfigEntity entity) {
+ return accessor.list(entity.getNamespace()).all();
+ }
+
+ @Override
+ public void create(ApplicationConfigEntity entity) {
+ accessor.updateApplicationConfigData(entity.getNamespace(), entity.getKey(), entity.getValue());
+ }
+
+ @Override
+ public void update(ApplicationConfigEntity entity) {
+ accessor.updateApplicationConfigData(entity.getNamespace(), entity.getKey(), entity.getValue());
+ }
+
+ @Override
+ public ApplicationConfigEntity get(ApplicationConfigEntity entity) {
+ return accessor.get(entity.getNamespace(), entity.getKey());
+ }
+
+ @Override
+ public long getValueTimestamp(String namespace, String key) {
+ ResultSet resultSet = accessor.getValueAndTimestampOfConfigurationValue(namespace, key);
+
+ return resultSet.one().getLong("writetime(value)");
+ }
+
+ @Override
+ public ConfigurationData getConfigurationData(String namespace, String key) {
+ //String value = accessor.getValue(namespace, key).one().getString("value");
+ ResultSet resultSet = accessor.getValueAndTimestampOfConfigurationValue(namespace, key);
+ Row one = resultSet.one();
+
+ if (Objects.nonNull(one)) {
+ return new ConfigurationData(one.getString("value"), one.getLong("writetime(value)"));
+ }
+
+ return null;
+ }
+
+
+ @Accessor
+ interface ApplicationConfigAccessor {
+
+ @Query("select namespace, key, value from application_config where namespace=?")
+ Result<ApplicationConfigEntity> list(String namespace);
+
+ @Query("insert into application_config (namespace, key, value) values (?,?,?)")
+ ResultSet updateApplicationConfigData(String namespace, String key, String value);
+
+ @Query("select namespace, key, value from application_config where namespace=? and key=?")
+ ApplicationConfigEntity get(String namespace, String key);
+
+ @Query("select value, writetime(value) from application_config where namespace=? and key=?")
+ ResultSet getValueAndTimestampOfConfigurationValue(String namespace, String key);
+
+ }
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/dao/impl/ApplicationConfigDaoFactoryImpl.java b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/dao/impl/ApplicationConfigDaoFactoryImpl.java
new file mode 100644
index 0000000000..cea49ea8d1
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/dao/impl/ApplicationConfigDaoFactoryImpl.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.utilities.applicationconfig.dao.impl;
+
+import org.openecomp.core.utilities.applicationconfig.dao.ApplicationConfigDao;
+import org.openecomp.core.utilities.applicationconfig.dao.ApplicationConfigDaoFactory;
+
+public class ApplicationConfigDaoFactoryImpl extends ApplicationConfigDaoFactory {
+ private static final ApplicationConfigDao INSTANCE = new ApplicationConfigDaoCassandraImpl();
+
+ @Override
+ public ApplicationConfigDao createInterface() {
+ return INSTANCE;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/dao/type/ApplicationConfigEntity.java b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/dao/type/ApplicationConfigEntity.java
new file mode 100644
index 0000000000..c73ce36744
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/dao/type/ApplicationConfigEntity.java
@@ -0,0 +1,79 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.utilities.applicationconfig.dao.type;
+
+
+import com.datastax.driver.mapping.annotations.ClusteringColumn;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+
+@Table(keyspace = "dox", name = "application_config")
+public class ApplicationConfigEntity {
+
+ @PartitionKey
+ private String namespace;
+ @ClusteringColumn
+ private String key;
+ private String value;
+
+ /**
+ * Instantiates a new Application config entity.
+ *
+ * @param namespace the namespace
+ * @param key the key
+ * @param value the value
+ */
+ public ApplicationConfigEntity(String namespace, String key, String value) {
+ this.namespace = namespace;
+ this.key = key;
+ this.value = value;
+ }
+
+
+ public ApplicationConfigEntity() {
+ }
+
+
+ public String getNamespace() {
+ return namespace;
+ }
+
+ public void setNamespace(String namespace) {
+ this.namespace = namespace;
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ public void setKey(String key) {
+ this.key = key;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/impl/ApplicationConfigFactoryImpl.java b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/impl/ApplicationConfigFactoryImpl.java
new file mode 100644
index 0000000000..cca07fc227
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/impl/ApplicationConfigFactoryImpl.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.utilities.applicationconfig.impl;
+
+import org.openecomp.core.utilities.applicationconfig.ApplicationConfig;
+import org.openecomp.core.utilities.applicationconfig.ApplicationConfigFactory;
+
+public class ApplicationConfigFactoryImpl extends ApplicationConfigFactory {
+
+ private static final ApplicationConfig INSTANCE = new ApplicationConfigImpl();
+
+ @Override
+ public ApplicationConfig createInterface() {
+ return INSTANCE;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/impl/ApplicationConfigImpl.java b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/impl/ApplicationConfigImpl.java
new file mode 100644
index 0000000000..ff9c9aea87
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/impl/ApplicationConfigImpl.java
@@ -0,0 +1,74 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.utilities.applicationconfig.impl;
+
+import org.openecomp.core.utilities.applicationconfig.ApplicationConfig;
+import org.openecomp.core.utilities.applicationconfig.dao.ApplicationConfigDao;
+import org.openecomp.core.utilities.applicationconfig.dao.ApplicationConfigDaoFactory;
+import org.openecomp.core.utilities.applicationconfig.dao.type.ApplicationConfigEntity;
+import org.openecomp.core.utilities.applicationconfig.type.ConfigurationData;
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+import org.openecomp.sdc.common.errors.ErrorCode;
+
+import java.util.Collection;
+import java.util.Objects;
+
+/**
+ * The type Application config.
+ */
+public class ApplicationConfigImpl implements ApplicationConfig {
+ private static final ApplicationConfigDao applicationConfigDao =
+ ApplicationConfigDaoFactory.getInstance().createInterface();
+
+ private static final String CONFIGURATION_SEARCH_ERROR = "CONFIGURATION_NOT_FOUND";
+ private static final String CONFIGURATION_SEARCH_ERROR_MSG =
+ "Configuration for namespace %s and key %s was not found";
+
+ @Override
+ public ConfigurationData getConfigurationData(String namespace, String key) {
+ ConfigurationData configurationData = applicationConfigDao.getConfigurationData(namespace, key);
+
+ if (Objects.isNull(configurationData)) {
+ throw new CoreException(new ErrorCode.ErrorCodeBuilder()
+ .withCategory(ErrorCategory.APPLICATION)
+ .withId(CONFIGURATION_SEARCH_ERROR)
+ .withMessage(String.format(CONFIGURATION_SEARCH_ERROR_MSG, namespace, key))
+ .build());
+ }
+
+ return configurationData;
+ }
+
+ @Override
+ public void insertValue(String namespace, String key, String value) {
+ ApplicationConfigEntity applicationConfigEntity =
+ new ApplicationConfigEntity(namespace, key, value);
+ applicationConfigDao.create(applicationConfigEntity);
+ }
+
+ @Override
+ public Collection<ApplicationConfigEntity> getListOfConfigurationByNamespace(String namespace) {
+ ApplicationConfigEntity applicationConfigEntity =
+ new ApplicationConfigEntity(namespace, null, null);
+ return applicationConfigDao.list(applicationConfigEntity);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/type/ConfigurationData.java b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/type/ConfigurationData.java
new file mode 100644
index 0000000000..53d3797e53
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/java/org/openecomp/core/utilities/applicationconfig/type/ConfigurationData.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.utilities.applicationconfig.type;
+
+public class ConfigurationData {
+
+ private String value;
+ private long timeStamp;
+
+ public ConfigurationData(String value, long timeStamp) {
+ this.value = value;
+ this.timeStamp = timeStamp;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public long getTimeStamp() {
+ return timeStamp;
+ }
+
+ public void setTimeStamp(long timeStamp) {
+ this.timeStamp = timeStamp;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/resources/factoryConfiguration.json b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/resources/factoryConfiguration.json
new file mode 100644
index 0000000000..19d2cafe8f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/resources/factoryConfiguration.json
@@ -0,0 +1,4 @@
+{
+ "org.openecomp.core.utilities.applicationconfig.ApplicationConfigFactory":"org.openecomp.core.utilities.applicationconfig.impl.ApplicationConfigFactoryImpl",
+ "org.openecomp.core.utilities.applicationconfig.dao.ApplicationConfigDaoFactory":"org.openecomp.core.utilities.applicationconfig.dao.impl.ApplicationConfigDaoFactoryImpl"
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/resources/logback.xml b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/resources/logback.xml
new file mode 100644
index 0000000000..e256e0b10a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/main/resources/logback.xml
@@ -0,0 +1,90 @@
+<!--
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+
+
+ <appender name="DEBUG_ROLLING"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>DOX-BE.log
+ </file>
+
+ &lt;!&ndash; No need to deny audit messages - they are INFO only, will be denied
+ anyway &ndash;&gt;
+ &lt;!&ndash; Transaction messages filter - deny Transaction messages, there are
+ some DEBUG level messages among them &ndash;&gt;
+
+
+ &lt;!&ndash; accept DEBUG and TRACE level &ndash;&gt;
+
+ <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>/DOX-BE.log.%i
+ </fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>10</maxIndex>
+ </rollingPolicy>
+
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>20MB</maxFileSize>
+ </triggeringPolicy>
+ <encoder>
+ <pattern>%level [%d{yyyy-MM-dd'T'HH:mm:ss}] - Method=%M, Desc=&lt;%msg&gt;%n</pattern>
+ </encoder>
+ </appender>
+
+
+ <root level="info">
+ <appender-ref ref="DEBUG_ROLLING" />
+ </root>
+</configuration>-->
+<configuration scan="true" scanPeriod="3 seconds">
+
+ <property name="logDir" value="logs"/>
+ <property name="componentName" value="ASDC"/>
+ <property name="ECOMP-subcomponent-name" value="ASDC-BE"/>
+
+ <property name="defaultPattern"
+ value="%msg%n"/>
+
+ <!--<property name="MetricsLogPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%X{CategoryLogLevel}|%X{Severity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{ClientIP}|%logger%n" />
+ <property name="AuditLogPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%X{CategoryLogLevel}|%X{Severity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{ClientIP}%n" />
+ <property name="ErrorLogPattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSS, GMT}|%X{RequestId}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{ErrorCategory}|%X{ErrorCode}|%X{ErrorDescription}|%msg%n"/>
+ <property name="DebugLogPattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSS, GMT}|%X{RequestId}||%logger|%msg%n"/>-->
+
+ <!-- new pattern -->
+ <property name="default-log-pattern"
+ value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{BeginTimestamp}|%X{EndTimestamp}|%X{uuid}|%X{serviceInstanceID}|%thread|%X{ServerName}|%X{ServiceName}|${ECOMP-subcomponent-name}|%X{userId}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%X{ErrorCategory}|%X{ErrorCode}|%X{ErrorDescription}|%level|%X{alarmSeverity}|%X{localAddr}|%X{ElapsedTime}|%X{beFqdn}|%X{remoteAddr}|%logger{35}|%X{timer}|ActivityType=&lt;%M&gt;, Desc=&lt;%msg&gt;%n"/>
+
+ <property name="logDirectory" value="${logDir}/${componentName}"/>
+
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <pattern>${defaultPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="DISPATCHER" class="ch.qos.logback.classic.sift.SiftingAppender">
+ <discriminator class="org.openecomp.core.logging.logback.EventTypeDiscriminator"/>
+ <sift>
+ <appender name="${eventType}" class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDirectory}/${eventType}.log</file>
+ <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${logDirectory}/${eventType}.%i.log.zip</fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>9</maxIndex>
+ </rollingPolicy>
+ <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>5MB</maxFileSize>
+ </triggeringPolicy>
+ <encoder>
+ <pattern>${default-log-pattern}</pattern>
+ </encoder>
+ </appender>
+ </sift>
+ </appender>
+
+ <root level="DEBUG">
+ <appender-ref ref="DISPATCHER"/>
+ </root>
+
+</configuration> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/test/java/org/openecomp/sdc/applicationconfig/dao/ApplicationConfigImplDaoTest.java b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/test/java/org/openecomp/sdc/applicationconfig/dao/ApplicationConfigImplDaoTest.java
new file mode 100644
index 0000000000..40cde1ecb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/test/java/org/openecomp/sdc/applicationconfig/dao/ApplicationConfigImplDaoTest.java
@@ -0,0 +1,88 @@
+package org.openecomp.sdc.applicationconfig.dao;
+
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+import org.openecomp.sdc.common.errors.ErrorCode;
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionEntityType;
+import org.openecomp.core.utilities.applicationconfig.ApplicationConfig;
+import org.openecomp.core.utilities.applicationconfig.ApplicationConfigFactory;
+import org.openecomp.core.utilities.applicationconfig.dao.ApplicationConfigDao;
+import org.openecomp.core.utilities.applicationconfig.dao.ApplicationConfigDaoFactory;
+import org.openecomp.core.utilities.applicationconfig.dao.type.ApplicationConfigEntity;
+import org.openecomp.core.utilities.applicationconfig.type.ConfigurationData;
+import org.openecomp.core.utilities.file.FileUtils;
+import org.testng.Assert;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+
+public class ApplicationConfigImplDaoTest {
+
+ private static final String SCHEMA_GENERATOR_INITIALIZATION_ERROR =
+ "SCHEMA_GENERATOR_INITIALIZATION_ERROR";
+ private static final String SCHEMA_GENERATOR_INITIALIZATION_ERROR_MSG =
+ "Error occurred while loading questionnaire schema templates";
+ private static ApplicationConfigDao applicationConfigDao =
+ ApplicationConfigDaoFactory.getInstance().createInterface();
+ private static ApplicationConfig applicationConfig =
+ ApplicationConfigFactory.getInstance().createInterface();
+
+// @BeforeClass
+ public static void init() {
+ try {
+
+ ApplicationConfigEntity applicationConfigEntity1 =
+ new ApplicationConfigEntity("test - namespace", "vsp", "vspTemplate");
+ ApplicationConfigEntity applicationConfigEntity2 =
+ new ApplicationConfigEntity("test - namespace", "nic", "nicTemplate");
+ ApplicationConfigEntity applicationConfigEntity3 =
+ new ApplicationConfigEntity("test - namespace", "component", "componentTemplate");
+
+ applicationConfigDao.create(applicationConfigEntity1);
+ applicationConfigDao.create(applicationConfigEntity2);
+ applicationConfigDao.create(applicationConfigEntity3);
+
+ } catch (Exception e) {
+ throw new CoreException(new ErrorCode.ErrorCodeBuilder().
+ withCategory(ErrorCategory.APPLICATION).
+ withId(SCHEMA_GENERATOR_INITIALIZATION_ERROR).
+ withMessage(SCHEMA_GENERATOR_INITIALIZATION_ERROR_MSG).
+ build());
+ }
+ }
+
+ private static String loadFileToString(String path) {
+ return new String(FileUtils.toByteArray(FileUtils.loadFileToInputStream(path)));
+ }
+
+// @Test
+ public void testApplicationConfigTimestampValue() {
+ ConfigurationData configurationData = applicationConfig
+ .getConfigurationData("test - namespace", CompositionEntityType.vsp.name());
+
+ Assert.assertNotNull(configurationData);
+ Assert.assertNotEquals(configurationData.getTimeStamp(), 0);
+
+ }
+
+// @Test(dependsOnMethods = "testApplicationConfigTimestampValue")
+ public void testNotExistingApplicationConfigTimestampValue() {
+ try {
+ applicationConfig.getConfigurationData("test - namespace", "aaa");
+ } catch (CoreException ce) {
+ Assert.assertEquals(ce.getMessage(),
+ "Configuration for namespace test - namespace and key aaa was not found");
+ }
+
+ }
+
+// @Test(dependsOnMethods = "testApplicationConfigTimestampValue")
+ public void testInsertApplicationConfiguration() {
+ String testTemplate = loadFileToString("questionnaire/testTemplate.txt");
+ applicationConfig.insertValue("test_namespace", "test_key", testTemplate);
+
+ Assert.assertEquals(testTemplate,
+ applicationConfig.getConfigurationData("test_namespace", "test_key").getValue());
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/test/resources/questionnaire/testTemplate.txt b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/test/resources/questionnaire/testTemplate.txt
new file mode 100644
index 0000000000..0bb19c5984
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/src/test/resources/questionnaire/testTemplate.txt
@@ -0,0 +1,12 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "properties": {
+ "general": {
+ "type": "object",
+ "properties": {
+ "testObject":{
+ "type": "string"
+ }
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-api/pom.xml b/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-api/pom.xml
new file mode 100644
index 0000000000..ccb3db833e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-api/pom.xml
@@ -0,0 +1,31 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../..</relativePath>
+ </parent>
+
+ <name>openecomp-facade-api</name>
+ <artifactId>openecomp-facade-api</artifactId>
+ <groupId>org.openecomp.core</groupId>
+
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-utilities-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-common-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-api/src/main/java/org/openecomp/core/factory/api/AbstractFactory.java b/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-api/src/main/java/org/openecomp/core/factory/api/AbstractFactory.java
new file mode 100644
index 0000000000..53b8f00fc0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-api/src/main/java/org/openecomp/core/factory/api/AbstractFactory.java
@@ -0,0 +1,81 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.factory.api;
+
+import org.openecomp.core.factory.impl.AbstractFactoryBase;
+
+/**
+ * This class provides generic implementation of an abstract factory. Components exposed as Java
+ * interfaces should have their own concrete factories derived from the given class. This assures
+ * code alignment and consistency across all Service Management components.
+ * The class actually
+ * uses singleton pattern to instantiate and reuse just one instance of a factory. Therefore, each
+ * factory implementation has to be <i>thread-safe</i>.
+ * In a general case, the hierarchy of
+ * factory objects for an Java interface <tt>IUknown</tt> may look as follows:
+ * <pre>
+ * AbstractFactory&lt;IUnknown&gt;
+ * ^
+ * |
+ * Application code ----> ConcreteFactory
+ * ^
+ * |
+ * +---------+---------+
+ * | |
+ * BaselineFactoryImpl CustomFactoryImpl
+ * </pre>
+ * Where the classes responsibility is: <ul> <li>Abstract factory - common logic to retrieve the
+ * implementation class name from a central repository.</li> <li>Concrete factory - abstract class
+ * that only exposes to application layer the type specific API such as: <ul> <li><tt>public static
+ * ConcreteFactory getInstance()</tt></li> </ul> <li>Baseline factory - out of the box
+ * implementation of concrete factory (that can be replaced by a custom one depending on customer
+ * needs) which actually implements method: <ul> <li><tt>public IUnknown createInterface()</tt></li>
+ * </ul> </ul> The normal concrete factory class may look like:
+ * <pre>
+ * public abstract class ConcreteFactory extends AbstractFactory&lt;IUnknown&gt; {
+ * static {
+ * registerFactory(ConcreteFactory.class, BaselineFactoryImpl.class);
+ * }
+ * public static ConcreteFactory getInstance() {
+ * return AbstractFactory.&lt;IUnknown, ConcreteFactory.class&gt;getInstance(ConcreteFactory.class);
+ * }
+ * }
+ * </pre>
+ *
+ * @param <I> Java interface type created by the factory.
+ */
+public abstract class AbstractFactory<I> extends AbstractFactoryBase {
+
+
+ /**
+ * Returns the interface implementor instance.
+ * <b>Note</b>: It's up to the concrete factory to decide on the actual
+ * implementation of the returned interface. Therefore, the call can get the
+ * same instance per each call in case of singleton implementation or new
+ * instance otherwise. However, the API consumer may not assume anything
+ * regarding the underlying logic and has always go through the factory to
+ * obtain the reference.
+ *
+ * @return Implementor of the exposed Java interface.
+ */
+ public abstract I createInterface();
+
+} // End of class
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-api/src/main/java/org/openecomp/core/factory/impl/AbstractFactoryBase.java b/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-api/src/main/java/org/openecomp/core/factory/impl/AbstractFactoryBase.java
new file mode 100644
index 0000000000..e19d9e972f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-api/src/main/java/org/openecomp/core/factory/impl/AbstractFactoryBase.java
@@ -0,0 +1,212 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.factory.impl;
+
+import static org.openecomp.core.utilities.CommonMethods.isEmpty;
+import static org.openecomp.core.utilities.CommonMethods.newInstance;
+
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+import org.openecomp.sdc.common.errors.ErrorCode;
+
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * The type Abstract factory base.
+ */
+public abstract class AbstractFactoryBase {
+
+ /**
+ * Temporary registry of default implementations. The map keeps class names rather then class
+ * types to allow unloading of those classes from memory by garbage collector if
+ * factory is not actually used.
+ */
+ private static Map<String, String> registry = new ConcurrentHashMap<String, String>();
+
+ /**
+ * Cached factory instances.
+ */
+ private static Map<String, AbstractFactoryBase> factoryMap =
+ new ConcurrentHashMap<String, AbstractFactoryBase>();
+
+ /**
+ * Registers implementor for an abstract factory. The method accepts Java classes rather
+ * then class names to ensure type safety at compilation time.
+ *
+ * @param <I> Java interface type instantiated by abstract factory
+ * @param <F> Type specific abstract factory for concrete Java interface
+ * @param factory Java class of a type specific abstract factory
+ * @param impl Java class of type specific factory implementor
+ */
+ public static <I, F extends AbstractFactoryBase> void registerFactory(Class<F> factory,
+ Class<? extends F> impl) {
+ if (factory == null) {
+ throw new CoreException(
+ new ErrorCode.ErrorCodeBuilder().withId("E0001").withMessage("Mandatory input factory.")
+ .withCategory(ErrorCategory.SYSTEM).build());
+ }
+
+ if (impl == null) {
+ throw new CoreException(
+ new ErrorCode.ErrorCodeBuilder().withId("E0001").withMessage("Mandatory input impl.")
+ .withCategory(ErrorCategory.SYSTEM).build());
+ }
+ if (factoryMap != null && factoryMap.containsKey(factory.getName())) {
+ factoryMap.remove(factory.getName());
+ }
+ registry.put(factory.getName(), impl.getName());
+ } // registerFactory
+
+ /**
+ * Register factory.
+ *
+ * @param factoryName the factory name
+ * @param implName the impl name
+ */
+ // TODO: Remove
+ protected static void registerFactory(String factoryName, String implName) {
+ registry.put(factoryName, implName);
+ } // registerFactory
+
+ /**
+ * Unregister factory.
+ *
+ * @param <F> the type parameter
+ * @param factory the factory
+ */
+ public static <F extends AbstractFactoryBase> void unregisterFactory(Class<F> factory) {
+ if (factory == null) {
+ throw new CoreException(
+ new ErrorCode.ErrorCodeBuilder().withId("E0001").withMessage("Mandatory input factory.")
+ .withCategory(ErrorCategory.SYSTEM).build());
+ }
+ if (factoryMap != null) {
+ factoryMap.remove(factory.getName());
+ }
+ }
+
+ /**
+ * Instantiates the configured implementation of an abstract factory.
+ *
+ * @param <I> Java interface type instantiated by abstract factory
+ * @param <F> Type specific abstract factory for concrete Java interface
+ * @param factoryType Java class of type specific abstract factory
+ * @return Instance of implementation class
+ */
+ @SuppressWarnings("unchecked")
+ public static <I, F extends AbstractFactoryBase> F getInstance(Class<F> factoryType) {
+ if (factoryType == null) {
+ throw new CoreException(
+ new ErrorCode.ErrorCodeBuilder().withId("E0001")
+ .withMessage("Mandatory input factory type.").withCategory(ErrorCategory.SYSTEM)
+ .build());
+
+ }
+ // Pick up factory instance from cache
+ F factory = (F) factoryMap.get(factoryType.getName());
+ // Check for the first time access
+ if (factory == null) {
+ // Synchronize factory instantiation
+ synchronized (factoryType) {
+ // Re-check the factory instance
+ factory = (F) factoryMap.get(factoryType.getName());
+ if (factory == null) {
+ // Get the implementation class name
+ String implName = registry.get(factoryType.getName());
+
+ if (isEmpty(implName)) {
+ throw new CoreException(
+ new ErrorCode.ErrorCodeBuilder().withId("E0001")
+ .withMessage("Mandatory input factory implementation.")
+ .withCategory(ErrorCategory.SYSTEM).build());
+ }
+
+ factory = newInstance(implName, factoryType);
+
+ factory.init();
+
+ // Cache the instantiated singleton
+ factoryMap.put(factoryType.getName(), factory);
+ }
+ }
+ }
+
+ return factory;
+
+ } // getInstance
+
+
+ /**
+ * Is factory registered boolean.
+ *
+ * @param <F> the type parameter
+ * @param factoryType the factory type
+ * @return the boolean
+ */
+ public static <F extends AbstractFactoryBase> boolean isFactoryRegistered(Class<F> factoryType) {
+ boolean isFactoryRegistered = false;
+ if (factoryType == null) {
+ throw new CoreException(
+ new ErrorCode.ErrorCodeBuilder().withId("E0001")
+ .withMessage("Mandatory input factory type.").withCategory(ErrorCategory.SYSTEM)
+ .build());
+ }
+ // Pick up factory instance from cache
+ F factory = (F) factoryMap.get(factoryType.getName());
+ // Check for the first time access
+ if (factory != null) {
+ isFactoryRegistered = true;
+ } else {
+ // Get the implementation class name
+ String implName = registry.get(factoryType.getName());
+ if (!isEmpty(implName)) {
+ isFactoryRegistered = true;
+ }
+ }
+ return isFactoryRegistered;
+ }
+
+ /**
+ * Stop all.
+ */
+ public static void stopAll() {
+ Collection<AbstractFactoryBase> factorylist = factoryMap.values();
+ for (AbstractFactoryBase factory : factorylist) {
+ factory.stop();
+ }
+ }
+
+ /**
+ * Init.
+ */
+ protected void init() {
+ }
+
+ /**
+ * Stop.
+ */
+ protected void stop() {
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/pom.xml b/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/pom.xml
new file mode 100644
index 0000000000..0c5d36abcc
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/pom.xml
@@ -0,0 +1,36 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <groupId>org.openecomp.sdc</groupId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../..</relativePath>
+ </parent>
+
+ <artifactId>openecomp-facade-core</artifactId>
+ <name>openecomp-facade-core</name>
+ <groupId>org.openecomp.core</groupId>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-utilities-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-common-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-facade-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+
+
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/src/main/java/org/openecomp/core/factory/AbstractContextFactory.java b/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/src/main/java/org/openecomp/core/factory/AbstractContextFactory.java
new file mode 100644
index 0000000000..f4e1a85fee
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/src/main/java/org/openecomp/core/factory/AbstractContextFactory.java
@@ -0,0 +1,27 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.factory;
+
+import org.openecomp.core.factory.impl.AbstractFactoryBase;
+
+public abstract class AbstractContextFactory<I, C> extends AbstractFactoryBase {
+ public abstract I createInterface(C contextType);
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/src/main/java/org/openecomp/core/factory/FactoriesConfigImpl.java b/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/src/main/java/org/openecomp/core/factory/FactoriesConfigImpl.java
new file mode 100644
index 0000000000..173f9b15b1
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/src/main/java/org/openecomp/core/factory/FactoriesConfigImpl.java
@@ -0,0 +1,61 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.factory;
+
+
+import org.openecomp.core.factory.api.FactoriesConfiguration;
+import org.openecomp.core.utilities.file.FileUtils;
+import org.openecomp.core.utilities.json.JsonUtil;
+
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public final class FactoriesConfigImpl implements FactoriesConfiguration {
+
+
+ private static final String FACTORY_CONFIG_FILE_NAME = "factoryConfiguration.json";
+ private static Map factoryMap = new HashMap();
+ private static boolean initialized = false;
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public Map<String, String> getFactoriesMap() {
+ synchronized (this) {
+ if (!initialized) {
+ init();
+ initialized = true;
+ }
+ }
+ return factoryMap;
+ }
+
+ private void init() {
+ List<InputStream> factoryConfigIsList = FileUtils.getFileInputStreams(FACTORY_CONFIG_FILE_NAME);
+ for (InputStream factoryConfigIs : factoryConfigIsList) {
+ factoryMap.putAll(JsonUtil.json2Object(factoryConfigIs, Map.class));
+ }
+ }
+
+
+}
+
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/src/main/java/org/openecomp/core/factory/FactoryConfig.java b/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/src/main/java/org/openecomp/core/factory/FactoryConfig.java
new file mode 100644
index 0000000000..d664cbee38
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/src/main/java/org/openecomp/core/factory/FactoryConfig.java
@@ -0,0 +1,46 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.factory;
+
+import org.openecomp.core.factory.api.FactoriesConfiguration;
+import org.openecomp.core.utilities.CommonMethods;
+
+import java.util.Map;
+
+public final class FactoryConfig {
+
+ private static final FactoriesConfiguration INSTANCE;
+
+ static {
+
+ try {
+ INSTANCE = CommonMethods.newInstance(
+ "org.openecomp.core.factory.FactoriesConfigImpl", FactoriesConfiguration.class);
+ } catch (Exception exception) {
+ exception.printStackTrace();
+ throw exception;
+ }
+ }
+
+ public static Map<String, String> getFactoriesMap() {
+ return INSTANCE.getFactoriesMap();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/src/main/java/org/openecomp/core/factory/api/AbstractComponentFactory.java b/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/src/main/java/org/openecomp/core/factory/api/AbstractComponentFactory.java
new file mode 100644
index 0000000000..9cd7749f55
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/src/main/java/org/openecomp/core/factory/api/AbstractComponentFactory.java
@@ -0,0 +1,105 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.factory.api;
+
+import org.openecomp.core.factory.FactoryConfig;
+import org.openecomp.core.factory.impl.AbstractFactoryBase;
+import org.openecomp.core.utilities.CommonMethods;
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+import org.openecomp.sdc.common.errors.ErrorCode;
+
+import java.util.Map;
+
+public abstract class AbstractComponentFactory<I> extends AbstractFactory<I> {
+
+ static {
+ Registry registry = new RegistryImpl();
+ InitializationHelper.registerFactoryMapping(registry);
+ }
+
+ interface Registry {
+ void register(String factory, String impl);
+ }
+
+ private static class RegistryImpl implements Registry {
+ @Override
+ public void register(String factory, String impl) {
+ AbstractFactoryBase.registerFactory(factory, impl);
+ }
+ }
+
+ static class InitializationHelper {
+
+
+ private static boolean isRegistered = false;
+
+ private InitializationHelper() {
+ }
+
+ static synchronized boolean registerFactoryMapping(Registry registry) {
+
+ boolean done = !isRegistered;
+
+ if (!isRegistered) {
+ registerFactoryMappingImpl(registry);
+ isRegistered = true;
+ }
+
+ return done;
+ }
+
+ private static void registerFactoryMappingImpl(Registry registry) {
+ Map<String, String> factoryMap = FactoryConfig.getFactoriesMap();
+
+ try {
+ for (Map.Entry<String, String> entry : factoryMap.entrySet()) {
+ String abstractClassName = entry.getKey();
+ String concreteTypeName = entry.getValue();
+
+ if (CommonMethods.isEmpty(concreteTypeName)) {
+ throw new CoreException(
+ new ErrorCode.ErrorCodeBuilder().withId("E0003")
+ .withMessage("Missing configuration value:" + concreteTypeName + ".")
+ .withCategory(ErrorCategory.SYSTEM).build());
+
+ }
+
+ registry.register(abstractClassName, concreteTypeName);
+ }
+ } catch (RuntimeException exception) {
+ throw exception;
+ } catch (Exception exception) {
+ throw new RuntimeException(exception);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private static <T> Class<T> unsecureCast(Class<?> cls) {
+ return (Class<T>) cls;
+ }
+
+ private static String nameOf(Class<?> clazz) {
+ return (clazz != null) ? clazz.getName() : "null";
+ }
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/src/main/java/org/openecomp/core/factory/api/FactoriesConfiguration.java b/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/src/main/java/org/openecomp/core/factory/api/FactoriesConfiguration.java
new file mode 100644
index 0000000000..8086181204
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/openecomp-facade-core/src/main/java/org/openecomp/core/factory/api/FactoriesConfiguration.java
@@ -0,0 +1,29 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.factory.api;
+
+import java.util.Map;
+
+
+public interface FactoriesConfiguration {
+
+ Map<String, String> getFactoriesMap();
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/pom.xml b/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/pom.xml
new file mode 100644
index 0000000000..29e9cce688
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-facade-lib/pom.xml
@@ -0,0 +1,34 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>openecomp-core-lib</artifactId>
+ <groupId>org.openecomp.core</groupId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <packaging>pom</packaging>
+ <artifactId>openecomp-facade-lib</artifactId>
+ <name>openecomp-facade-lib</name>
+
+ <modules>
+ <module>openecomp-facade-api</module>
+ <module>openecomp-facade-core</module>
+ </modules>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-facade-api</artifactId>
+ <version>${project.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-facade-core</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/pom.xml b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/pom.xml
new file mode 100644
index 0000000000..174f2a36d9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/pom.xml
@@ -0,0 +1,40 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <groupId>org.openecomp.sdc</groupId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../..</relativePath>
+ </parent>
+
+ <name>openecomp-nosqldb-api</name>
+ <artifactId>openecomp-nosqldb-api</artifactId>
+ <groupId>org.openecomp.core</groupId>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-facade-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.datastax.cassandra</groupId>
+ <artifactId>cassandra-driver-core</artifactId>
+ <version>${datasatx.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.datastax.cassandra</groupId>
+ <artifactId>cassandra-driver-mapping</artifactId>
+ <version>${datasatx.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-facade-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/dao/BaseDao.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/dao/BaseDao.java
new file mode 100644
index 0000000000..c7623f8181
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/dao/BaseDao.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.dao;
+
+import java.util.Collection;
+
+public interface BaseDao<T> {
+
+ Collection<T> list(T entity);
+
+ void create(T entity);
+
+ void update(T entity);
+
+ T get(T entity);
+
+ void delete(T entity);
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/dao/UniqueValueDao.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/dao/UniqueValueDao.java
new file mode 100644
index 0000000000..1fa4bb23fe
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/dao/UniqueValueDao.java
@@ -0,0 +1,28 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.dao;
+
+
+import org.openecomp.core.dao.types.UniqueValueEntity;
+
+public interface UniqueValueDao extends BaseDao<UniqueValueEntity> {
+
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/dao/UniqueValueDaoFactory.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/dao/UniqueValueDaoFactory.java
new file mode 100644
index 0000000000..9f57e4fadd
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/dao/UniqueValueDaoFactory.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class UniqueValueDaoFactory extends AbstractComponentFactory<UniqueValueDao> {
+ public static UniqueValueDaoFactory getInstance() {
+ return AbstractFactory.getInstance(UniqueValueDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/dao/types/UniqueValueEntity.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/dao/types/UniqueValueEntity.java
new file mode 100644
index 0000000000..1147644253
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/dao/types/UniqueValueEntity.java
@@ -0,0 +1,58 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.dao.types;
+
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+
+@Table(keyspace = "dox", name = "unique_value")
+public class UniqueValueEntity {
+
+ @PartitionKey
+ private String type;
+
+ @PartitionKey(value = 1)
+ private String value;
+
+ public UniqueValueEntity() {
+ }
+
+ public UniqueValueEntity(String type, String value) {
+ this.type = type;
+ this.value = value;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/nosqldb/api/NoSqlDb.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/nosqldb/api/NoSqlDb.java
new file mode 100644
index 0000000000..6b13ee71e4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/nosqldb/api/NoSqlDb.java
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.nosqldb.api;
+
+import com.datastax.driver.core.ResultSet;
+import com.datastax.driver.mapping.MappingManager;
+
+public interface NoSqlDb {
+
+ //TODO: remove cassandra types from here!! (like done in SDC...).
+
+ void insert(String tableName, String[] colNames, Object[] values);
+
+ ResultSet execute(String statement);
+
+ ResultSet execute(String statementName, Object... values);
+
+ MappingManager getMappingManager();
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/nosqldb/factory/NoSqlDbFactory.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/nosqldb/factory/NoSqlDbFactory.java
new file mode 100644
index 0000000000..ede264f288
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/nosqldb/factory/NoSqlDbFactory.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.nosqldb.factory;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+
+
+public abstract class NoSqlDbFactory extends AbstractComponentFactory<NoSqlDb> {
+
+ public static NoSqlDbFactory getInstance() {
+
+ return AbstractFactory.getInstance(NoSqlDbFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/util/UniqueValueUtil.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/util/UniqueValueUtil.java
new file mode 100644
index 0000000000..a82c97c51c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/java/org/openecomp/core/util/UniqueValueUtil.java
@@ -0,0 +1,127 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.util;
+
+import org.openecomp.core.dao.UniqueValueDao;
+import org.openecomp.core.dao.UniqueValueDaoFactory;
+import org.openecomp.core.dao.types.UniqueValueEntity;
+import org.openecomp.core.utilities.CommonMethods;
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+import org.openecomp.sdc.common.errors.ErrorCode;
+
+import java.util.Optional;
+
+/**
+ * The type Unique value util.
+ */
+public class UniqueValueUtil {
+ /**
+ * The constant UNIQUE_VALUE_VIOLATION.
+ */
+ public static final String UNIQUE_VALUE_VIOLATION = "UNIQUE_VALUE_VIOLATION";
+ private static final String UNIQUE_VALUE_VIOLATION_MSG = "%s with the value '%s' already exists.";
+
+ private static final UniqueValueDao uniqueValueDao =
+ UniqueValueDaoFactory.getInstance().createInterface();
+
+ /**
+ * Create unique value.
+ *
+ * @param type the type
+ * @param uniqueCombination the unique combination
+ */
+ public static void createUniqueValue(String type, String... uniqueCombination) {
+ Optional<String> value = formatValue(uniqueCombination);
+ if (!value.isPresent()) {
+ return;
+ }
+ validateUniqueValue(type, value.get(), uniqueCombination);
+ uniqueValueDao.create(new UniqueValueEntity(type, value.get()));
+ }
+
+ /**
+ * Delete unique value.
+ *
+ * @param type the type
+ * @param uniqueCombination the unique combination
+ */
+ public static void deleteUniqueValue(String type, String... uniqueCombination) {
+ Optional<String> value = formatValue(uniqueCombination);
+ if (!value.isPresent()) {
+ return;
+ }
+ uniqueValueDao.delete(new UniqueValueEntity(type, value.get()));
+ }
+
+ /**
+ * Update unique value.
+ *
+ * @param type the type
+ * @param oldValue the old value
+ * @param newValue the new value
+ * @param uniqueContext the unique context
+ */
+ public static void updateUniqueValue(String type, String oldValue, String newValue,
+ String... uniqueContext) {
+ if ((newValue != null && oldValue != null
+ && !newValue.toLowerCase().equals(oldValue.toLowerCase()))
+ || newValue == null || oldValue == null) {
+ createUniqueValue(type, CommonMethods.concat(uniqueContext, new String[]{newValue}));
+ deleteUniqueValue(type, CommonMethods.concat(uniqueContext, new String[]{oldValue}));
+ }
+ }
+
+ /**
+ * Validate unique value.
+ *
+ * @param type the type
+ * @param uniqueCombination the unique combination
+ */
+ public static void validateUniqueValue(String type, String... uniqueCombination) {
+ Optional<String> value = formatValue(uniqueCombination);
+ if (!value.isPresent()) {
+ return;
+ }
+ validateUniqueValue(type, value.get(), uniqueCombination);
+ }
+
+ private static void validateUniqueValue(String type, String value, String... uniqueCombination) {
+ if (uniqueValueDao.get(new UniqueValueEntity(type, value)) != null) {
+ throw new CoreException(new ErrorCode.ErrorCodeBuilder()
+ .withCategory(ErrorCategory.APPLICATION)
+ .withId(UNIQUE_VALUE_VIOLATION)
+ .withMessage(String.format(UNIQUE_VALUE_VIOLATION_MSG, type,
+ uniqueCombination[uniqueCombination.length - 1])).build());
+ }
+ }
+
+ private static Optional<String> formatValue(String[] uniqueCombination) {
+ if (uniqueCombination == null || uniqueCombination.length == 0
+ || uniqueCombination[uniqueCombination.length - 1] == null) {
+ return Optional.empty();
+ }
+
+ uniqueCombination[uniqueCombination.length - 1] =
+ uniqueCombination[uniqueCombination.length - 1].toLowerCase();
+ return Optional.of(CommonMethods.arrayToSeparatedString(uniqueCombination, '_'));
+ }
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/resources/cassandraStatements.json b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/resources/cassandraStatements.json
new file mode 100644
index 0000000000..e83b9f0126
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/resources/cassandraStatements.json
@@ -0,0 +1,6 @@
+{
+ "test.select.all": "SELECT * FROM test",
+ "test.drop": "DROP TABLE IF EXISTS test",
+ "test.create": "CREATE TABLE test (name text PRIMARY KEY,value text)",
+ "test.insert": "INSERT INTO test (name,value) VALUES ( ?,?)"
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/resources/factoryConfiguration.json b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/resources/factoryConfiguration.json
new file mode 100644
index 0000000000..0d5440508f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/src/main/resources/factoryConfiguration.json
@@ -0,0 +1,4 @@
+{
+ "org.openecomp.core.dao.UniqueValueDaoFactory": "org.openecomp.core.dao.impl.UniqueValueDaoFactoryImpl",
+ "org.openecomp.core.nosqldb.factory.NoSqlDbFactory": "org.openecomp.core.nosqldb.impl.cassandra.CassandraNoSqlDbFactoryImpl"
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/pom.xml b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/pom.xml
new file mode 100644
index 0000000000..d799edb961
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/pom.xml
@@ -0,0 +1,60 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <groupId>org.openecomp.sdc</groupId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../..</relativePath>
+ </parent>
+
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-nosqldb-core</artifactId>
+ <name>openecomp-nosqldb-core</name>
+
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-nosqldb-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.yaml</groupId>
+ <artifactId>snakeyaml</artifactId>
+ <version>1.14</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.google.code.gson</groupId>
+ <artifactId>gson</artifactId>
+ <version>2.3.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <scope>test</scope>
+ <version>1.10.19</version>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <scope>test</scope>
+ <version>6.8.5</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>snakeyaml</artifactId>
+ <groupId>org.yaml</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ <version>RELEASE</version>
+ </dependency>
+ </dependencies>
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/dao/impl/CassandraBaseDao.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/dao/impl/CassandraBaseDao.java
new file mode 100644
index 0000000000..1b3dbc4c6f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/dao/impl/CassandraBaseDao.java
@@ -0,0 +1,50 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.dao.impl;
+
+import com.datastax.driver.mapping.Mapper;
+import org.openecomp.core.dao.BaseDao;
+
+public abstract class CassandraBaseDao<T> implements BaseDao<T> {
+ protected abstract Mapper<T> getMapper();
+
+ protected abstract Object[] getKeys(T entity);
+
+ @Override
+ public void create(T entity) {
+ getMapper().save(entity);
+ }
+
+ @Override
+ public void update(T entity) {
+ getMapper().save(entity);
+ }
+
+ @Override
+ public T get(T entity) {
+ return getMapper().get(getKeys(entity));
+ }
+
+ @Override
+ public void delete(T entity) {
+ getMapper().delete(entity);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/dao/impl/UniqueValueCassandraDaoImpl.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/dao/impl/UniqueValueCassandraDaoImpl.java
new file mode 100644
index 0000000000..31dd602400
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/dao/impl/UniqueValueCassandraDaoImpl.java
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.dao.impl;
+
+import com.datastax.driver.mapping.Mapper;
+import com.datastax.driver.mapping.Result;
+import com.datastax.driver.mapping.annotations.Accessor;
+import com.datastax.driver.mapping.annotations.Query;
+import org.openecomp.core.dao.UniqueValueDao;
+import org.openecomp.core.dao.types.UniqueValueEntity;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+
+import java.util.Collection;
+
+public class UniqueValueCassandraDaoImpl extends CassandraBaseDao<UniqueValueEntity>
+ implements UniqueValueDao {
+
+ private static NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static Mapper<UniqueValueEntity> mapper =
+ noSqlDb.getMappingManager().mapper(UniqueValueEntity.class);
+ private static UniqueValueAccessor accessor =
+ noSqlDb.getMappingManager().createAccessor(UniqueValueAccessor.class);
+
+
+ @Override
+ protected Mapper<UniqueValueEntity> getMapper() {
+ return mapper;
+ }
+
+ @Override
+ protected Object[] getKeys(UniqueValueEntity entity) {
+ return new Object[]{entity.getType(), entity.getValue()};
+ }
+
+ @Override
+ public Collection<UniqueValueEntity> list(UniqueValueEntity entity) {
+ return accessor.listAll().all();
+ }
+
+ @Accessor
+ interface UniqueValueAccessor {
+
+ @Query("select * from unique_value")
+ Result<UniqueValueEntity> listAll();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/dao/impl/UniqueValueDaoFactoryImpl.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/dao/impl/UniqueValueDaoFactoryImpl.java
new file mode 100644
index 0000000000..b717fcbee1
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/dao/impl/UniqueValueDaoFactoryImpl.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.dao.impl;
+
+import org.openecomp.core.dao.UniqueValueDao;
+import org.openecomp.core.dao.UniqueValueDaoFactory;
+
+public class UniqueValueDaoFactoryImpl extends UniqueValueDaoFactory {
+ private static UniqueValueDao INSTANCE = new UniqueValueCassandraDaoImpl();
+
+ @Override
+ public UniqueValueDao createInterface() {
+ return INSTANCE;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/impl/cassandra/CassandraNoSqlDbFactoryImpl.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/impl/cassandra/CassandraNoSqlDbFactoryImpl.java
new file mode 100644
index 0000000000..2922925171
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/impl/cassandra/CassandraNoSqlDbFactoryImpl.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.nosqldb.impl.cassandra;
+
+import com.datastax.driver.core.Session;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+
+public class CassandraNoSqlDbFactoryImpl extends NoSqlDbFactory {
+
+ @Override
+ public NoSqlDb createInterface() {
+
+
+ return new CassandraNoSqlDbImpl(ReferenceHolder.CASSANDRA);
+ }
+
+ protected void stop() {
+ ReferenceHolder.CASSANDRA.close();
+ }
+
+ private static class ReferenceHolder {
+ private static final Session CASSANDRA = CassandraSessionFactory.getSession();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/impl/cassandra/CassandraNoSqlDbImpl.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/impl/cassandra/CassandraNoSqlDbImpl.java
new file mode 100644
index 0000000000..bcac5f8d79
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/impl/cassandra/CassandraNoSqlDbImpl.java
@@ -0,0 +1,104 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.nosqldb.impl.cassandra;
+
+import com.datastax.driver.core.BoundStatement;
+import com.datastax.driver.core.PreparedStatement;
+import com.datastax.driver.core.ResultSet;
+import com.datastax.driver.core.Session;
+import com.datastax.driver.mapping.MappingManager;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.util.CassandraUtils;
+import org.openecomp.core.utilities.CommonMethods;
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+import org.openecomp.sdc.common.errors.ErrorCode;
+
+class CassandraNoSqlDbImpl implements NoSqlDb {
+
+ private final Session session;
+ private final String keySpace;
+ private final MappingManager mappingManager;
+
+
+ public CassandraNoSqlDbImpl(Session session) {
+ this.session = session;
+ this.keySpace = this.session.getLoggedKeyspace();
+ this.mappingManager = new MappingManager(this.session);
+
+ }
+
+ @Override
+ public void insert(String tableName, String[] colNames, Object[] values) {
+ if (colNames.length != values.length) {
+ throw new CoreException((new ErrorCode.ErrorCodeBuilder()).withMessage(
+ "number of colmuns[" + colNames.length + "] is not equal to the number of values["
+ + values.length + "].").withId("E0005").withCategory(ErrorCategory.APPLICATION)
+ .build());
+ }
+
+ StringBuilder sb = new StringBuilder();
+ sb.append("insert into ")
+ .append(tableName)
+ .append(" (")
+ .append(CommonMethods.arrayToCommaSeparatedString(colNames))
+ .append(") values (")
+ .append(CommonMethods.duplicateStringWithDelimiter("?", ',', values.length))
+ .append(")");
+ System.out.println(sb.toString());
+ PreparedStatement prepared = session.prepare(sb.toString());
+
+ BoundStatement bound;
+ bound = prepared.bind(values);
+ session.execute(bound);
+
+ }
+
+ @Override
+ public ResultSet execute(String statement) {
+ return session.execute(statement);
+ }
+
+ @Override
+ public ResultSet execute(String statementName, Object... values) {
+
+ String statement = CassandraUtils.getStatement(statementName);
+ if (statement == null) {
+ statement = statementName;
+ }
+ if (values != null) {
+ PreparedStatement prepared = session.prepare(statement);
+
+ BoundStatement bound;
+ bound = prepared.bind(values);
+ return session.execute(bound);
+ } else {
+ return session.execute(statement);
+ }
+
+ }
+
+ @Override
+ public MappingManager getMappingManager() {
+ return mappingManager;
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/impl/cassandra/CassandraSessionFactory.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/impl/cassandra/CassandraSessionFactory.java
new file mode 100644
index 0000000000..1b98f095b5
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/impl/cassandra/CassandraSessionFactory.java
@@ -0,0 +1,124 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.nosqldb.impl.cassandra;
+
+import com.google.common.base.Optional;
+
+import com.datastax.driver.core.Cluster;
+import com.datastax.driver.core.SSLOptions;
+import com.datastax.driver.core.Session;
+
+import org.openecomp.core.nosqldb.util.CassandraUtils;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.security.KeyManagementException;
+import java.security.KeyStore;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.security.SecureRandom;
+import java.security.UnrecoverableKeyException;
+import java.security.cert.CertificateException;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManagerFactory;
+
+public class CassandraSessionFactory {
+ public static Session getSession() {
+ return ReferenceHolder.CASSANDRA;
+ }
+
+ /**
+ * New cassandra session session.
+ *
+ * @return the session
+ */
+ public static Session newCassandraSession() {
+ Cluster.Builder builder = Cluster.builder();
+ String[] addresses = CassandraUtils.getAddresses();
+ for (String address : addresses) {
+ builder.addContactPoint(address);
+ }
+ Boolean isSsl = CassandraUtils.isSsl();
+ if (isSsl) {
+ builder.withSSL(getSslOptions().get());
+ }
+ int port = CassandraUtils.getCassandraPort();
+ if (port > 0) {
+ builder.withPort(port);
+ }
+ //Check if user/pass
+ Boolean isAuthenticate = CassandraUtils.isAuthenticate();
+ if (isAuthenticate) {
+ builder.withCredentials(CassandraUtils.getUser(), CassandraUtils.getPassword());
+ }
+
+ Cluster cluster = builder.build();
+ String keyStore = CassandraUtils.getKeySpace();
+ return cluster.connect(keyStore);
+ }
+
+ private static Optional<SSLOptions> getSslOptions() {
+ Optional<String> truststorePath = Optional.of(CassandraUtils.getTruststore());
+ Optional<String> truststorePassword = Optional.of(CassandraUtils.getTruststorePassword());
+
+ if (truststorePath.isPresent() && truststorePassword.isPresent()) {
+ SSLContext context;
+ try {
+ context = getSslContext(truststorePath.get(), truststorePassword.get());
+ } catch (UnrecoverableKeyException | KeyManagementException
+ | NoSuchAlgorithmException | KeyStoreException | CertificateException | IOException e0) {
+ throw new RuntimeException(e0);
+ }
+ String[] css = new String[]{"TLS_RSA_WITH_AES_128_CBC_SHA"};
+ return Optional.of(new SSLOptions(context, css));
+ }
+ return Optional.absent();
+ }
+
+ private static SSLContext getSslContext(String truststorePath, String truststorePassword)
+ throws NoSuchAlgorithmException, KeyStoreException, CertificateException, IOException,
+ UnrecoverableKeyException, KeyManagementException {
+ FileInputStream tsf = null;
+ SSLContext ctx = null;
+ try {
+ tsf = new FileInputStream(truststorePath);
+ ctx = SSLContext.getInstance("SSL");
+
+ KeyStore ts = KeyStore.getInstance("JKS");
+ ts.load(tsf, truststorePassword.toCharArray());
+ TrustManagerFactory tmf =
+ TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
+ tmf.init(ts);
+
+ ctx.init(null, tmf.getTrustManagers(), new SecureRandom());
+ } catch (Exception e0) {
+ e0.printStackTrace();
+ } finally {
+ tsf.close();
+
+ }
+ return ctx;
+ }
+
+ private static class ReferenceHolder {
+ private static final Session CASSANDRA = newCassandraSession();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/util/CassandraUtils.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/util/CassandraUtils.java
new file mode 100644
index 0000000000..2a88d0e521
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/util/CassandraUtils.java
@@ -0,0 +1,92 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.nosqldb.util;
+
+import org.openecomp.core.utilities.file.FileUtils;
+import org.openecomp.core.utilities.json.JsonUtil;
+
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
+
+public class CassandraUtils {
+
+
+ private static final String CASSANDRA_STATEMENT_DEFINITION_FILE = "cassandraStatements.json";
+ private static Map<String, String> statementMap = new HashMap<>();
+
+ public static String[] getAddresses() {
+ return ConfigurationManager.getInstance().getAddresses();
+
+ }
+
+ public static String getKeySpace() {
+ return ConfigurationManager.getInstance().getKeySpace();
+ }
+
+ /**
+ * Gets statement.
+ *
+ * @param statementName the statement name
+ * @return the statement
+ */
+ public static String getStatement(String statementName) {
+ if (statementMap.size() == 0) {
+ InputStream statementJson = FileUtils.getFileInputStream(CASSANDRA_STATEMENT_DEFINITION_FILE);
+ statementMap = JsonUtil.json2Object(statementJson, Map.class);
+ }
+ return statementMap.get(statementName);
+ }
+
+ public static String getUser() {
+
+ return ConfigurationManager.getInstance().getUsername();
+ }
+
+ public static String getPassword() {
+ return ConfigurationManager.getInstance().getPassword();
+
+ }
+
+ public static String getTruststore() {
+ return ConfigurationManager.getInstance().getTruststorePath();
+
+ }
+
+ public static String getTruststorePassword() {
+ return ConfigurationManager.getInstance().getTruststorePassword();
+
+ }
+
+ public static int getCassandraPort() {
+ return ConfigurationManager.getInstance().getSslPort();
+
+ }
+
+ public static boolean isSsl() {
+ return ConfigurationManager.getInstance().isSsl();
+
+ }
+
+ public static boolean isAuthenticate() {
+ return ConfigurationManager.getInstance().isAuthenticate();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/util/ConfigurationManager.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/util/ConfigurationManager.java
new file mode 100644
index 0000000000..a1c0b528fb
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/util/ConfigurationManager.java
@@ -0,0 +1,234 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.nosqldb.util;
+
+import org.openecomp.core.utilities.yaml.YamlUtil;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * The type Configuration manager.
+ */
+public class ConfigurationManager {
+
+ private static final String CONFIGURATION_YAML_FILE = "configuration.yaml";
+ private static final String cassandraKey = "cassandraConfig";
+ private static final String DEFAULT_KEYSPACE_NAME = "dox";
+ private static final String CASSANDRA_ADDRESSES = "cassandra.addresses";
+ private static final String CASSANDRA_DOX_KEY_STORE = "cassandra.dox.keystore";
+ private static final String CASSANDRA_AUTHENTICATE = "cassandra.authenticate";
+ private static final String CASSANDRA_USER = "cassandra.user";
+ private static final String CASSANDRA_PASSWORD = "cassandra.password";
+ private static final String CASSANDRA_PORT = "cassandra.port";
+ private static final String CASSANDRA_SSL = "cassandra.ssl";
+ private static final String CASSANDRA_TRUSTSTORE = "cassandra.Truststore";
+ private static final String CASSANDRA_TRUSTSTORE_PASSWORD = "cassandra.TruststorePassword";
+ private static final String cassandraHostsKey = "cassandraHosts";
+ private static final String cassandraPortKey = "port";
+ private static final String cassandraUsernameKey = "username";
+ private static final String cassandraPasswordKey = "password";
+ private static final String cassandraAuthenticateKey = "authenticate";
+ private static final String cassandraSSLKey = "ssl";
+ private static final String cassandraTruststorePathKey = "truststorePath";
+ private static final String cassandraTruststorePasswordKey = "truststorePassword";
+ private static ConfigurationManager instance = null;
+ private final LinkedHashMap<String, Object> cassandraConfiguration;
+
+
+ private ConfigurationManager() {
+ YamlUtil yamlUtil = new YamlUtil();
+ String configurationYamlFile = System.getProperty(CONFIGURATION_YAML_FILE);
+ InputStream yamlAsString;
+ if (configurationYamlFile != null) {
+ yamlAsString = getConfigFileIs(configurationYamlFile);
+ } else {
+ //Load from resources
+ yamlAsString = yamlUtil.loadYamlFileIs("/" + CONFIGURATION_YAML_FILE);
+ }
+ Map<String, LinkedHashMap<String, Object>> configurationMap = yamlUtil.yamlToMap(yamlAsString);
+ cassandraConfiguration = configurationMap.get(cassandraKey);
+
+ }
+
+ /**
+ * Gets instance.
+ *
+ * @return the instance
+ */
+ public static ConfigurationManager getInstance() {
+ if (instance == null) {
+ instance = new ConfigurationManager();
+ }
+ return instance;
+ }
+
+ /**
+ * Get addresses string [ ].
+ *
+ * @return the string [ ]
+ */
+ public String[] getAddresses() {
+
+ String addresses = System.getProperty(CASSANDRA_ADDRESSES);
+ if (addresses != null) {
+ return addresses.split(",");
+ }
+ List locAddresses = (ArrayList) cassandraConfiguration.get(cassandraHostsKey);
+ String[] addressesArray;
+ addressesArray = (String[]) locAddresses.toArray(new String[locAddresses.size()]);
+ return addressesArray;
+
+ }
+
+ /**
+ * Gets key space.
+ *
+ * @return the key space
+ */
+ public String getKeySpace() {
+ String keySpace = System.getProperty(CASSANDRA_DOX_KEY_STORE);
+ if (keySpace == null) {
+ //keySpace = cassandraConfiguration.get(cassandraKeySpaceKey);
+ //if (keySpace == null)
+ keySpace = DEFAULT_KEYSPACE_NAME;
+ }
+ return keySpace;
+ }
+
+ /**
+ * Gets username.
+ *
+ * @return the username
+ */
+ public String getUsername() {
+ String username = System.getProperty(CASSANDRA_USER);
+ if (username == null) {
+ username = (String) cassandraConfiguration.get(cassandraUsernameKey);
+ }
+ return username;
+ }
+
+ /**
+ * Gets password.
+ *
+ * @return the password
+ */
+ public String getPassword() {
+ String password = System.getProperty(CASSANDRA_PASSWORD);
+ if (password == null) {
+ password = (String) cassandraConfiguration.get(cassandraPasswordKey);
+ }
+ return password;
+ }
+
+ /**
+ * Gets truststore path.
+ *
+ * @return the truststore path
+ */
+ public String getTruststorePath() {
+ String truststorePath = System.getProperty(CASSANDRA_TRUSTSTORE);
+ if (truststorePath == null) {
+ truststorePath = (String) cassandraConfiguration.get(cassandraTruststorePathKey);
+ }
+ return truststorePath;
+ }
+
+ /**
+ * Gets truststore password.
+ *
+ * @return the truststore password
+ */
+ public String getTruststorePassword() {
+ String truststorePassword = System.getProperty(CASSANDRA_TRUSTSTORE_PASSWORD);
+ if (truststorePassword == null) {
+ truststorePassword = (String) cassandraConfiguration.get(cassandraTruststorePasswordKey);
+ }
+ return truststorePassword;
+ }
+
+ /**
+ * Gets ssl port.
+ *
+ * @return the ssl port
+ */
+ public int getSslPort() {
+ int port;
+ String sslPort = System.getProperty(CASSANDRA_PORT);
+ if (sslPort == null) {
+ sslPort = (String) cassandraConfiguration.get(cassandraPortKey);
+ if (sslPort == null) {
+ sslPort = "0";
+ }
+ }
+ port = Integer.valueOf(sslPort);
+ return port;
+ }
+
+
+ /**
+ * Is ssl boolean.
+ *
+ * @return the boolean
+ */
+ public boolean isSsl() {
+ return getBooleanResult(CASSANDRA_SSL, cassandraSSLKey);
+ }
+
+ /**
+ * Is authenticate boolean.
+ *
+ * @return the boolean
+ */
+ public boolean isAuthenticate() {
+ return getBooleanResult(CASSANDRA_AUTHENTICATE, cassandraAuthenticateKey);
+ }
+
+ private Boolean getBooleanResult(String property, String key) {
+ Boolean res;
+ String value;
+ if (System.getProperty(property) == null) {
+ value = String.valueOf(cassandraConfiguration.get(key));
+ } else {
+ value = System.getProperty(property);
+ }
+
+ res = Boolean.valueOf(value);
+
+ return res;
+ }
+
+ private InputStream getConfigFileIs(String file) {
+ InputStream is = null;
+ try {
+ is = new FileInputStream(file);
+ } catch (FileNotFoundException e0) {
+ e0.printStackTrace();
+ }
+ return is;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/resources/configuration.yaml b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/resources/configuration.yaml
new file mode 100644
index 0000000000..0988f50237
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/resources/configuration.yaml
@@ -0,0 +1,253 @@
+identificationHeaderFields:
+ - HTTP_IV_USER
+ - HTTP_CSP_FIRSTNAME
+ - HTTP_CSP_LASTNAME
+ - HTTP_IV_REMOTE_ADDRESS
+ - HTTP_CSP_WSTYPE
+
+
+
+# catalog backend hostname
+beFqdn: sdccatalog.att.com
+
+# catalog backend http port
+beHttpPort: 8080
+
+# catalog backend http context
+beContext: /sdc/rest/config/get
+
+# catalog backend protocol
+beProtocol: http
+
+# catalog backend ssl port
+beSslPort: 8443
+
+version: 1.0
+released: 2012-11-30
+
+titanCfgFile: /home/vagrant/catalog-be/config/catalog-be/titan.properties
+titanInMemoryGraph: false
+titanLockTimeout: 30
+titanReconnectIntervalInSeconds: 3
+titanHealthCheckReadTimeout: 1
+esReconnectIntervalInSeconds: 3
+uebHealthCheckReconnectIntervalInSeconds: 15
+uebHealthCheckReadTimeout: 4
+
+# Protocols
+protocols:
+ - http
+ - https
+
+# Users
+users:
+ tom: passwd
+ bob: passwd
+
+neo4j:
+ host: neo4jhost
+ port: 7474
+ user: neo4j
+ password: "12345"
+
+cassandraConfig:
+ cassandraHosts: ['127.0.0.1']
+ reconnectTimeout : 30000
+ authenticate: false
+ username: sdc_user
+ password: Aa1234%^!
+ ssl: false
+ truststorePath : /path/path
+ truststorePassword : Aa123456
+ keySpaces:
+ - { name: dox, replicationStrategy: SimpleStrategy, replicationInfo: ['1']}
+ - { name: sdcartifact, replicationStrategy: SimpleStrategy, replicationInfo: ['1']}
+
+#Application-specific settings of ES
+elasticSearch:
+ # Mapping of index prefix to time-based frame. For example, if below is configured:
+ #
+ # - indexPrefix: auditingevents
+ # creationPeriod: minute
+ #
+ # then ES object of type which is mapped to "auditingevents-*" template, and created on 2015-12-23 13:24:54, will enter "auditingevents-2015-12-23-13-24" index.
+ # Another object created on 2015-12-23 13:25:54, will enter "auditingevents-2015-12-23-13-25" index.
+ # If creationPeriod: month, both of the above will enter "auditingevents-2015-12" index.
+ #
+ # PLEASE NOTE: the timestamps are created in UTC/GMT timezone! This is needed so that timestamps will be correctly presented in Kibana.
+ #
+ # Legal values for creationPeriod - year, month, day, hour, minute, none (meaning no time-based behaviour).
+ #
+ # If no creationPeriod is configured for indexPrefix, default behavour is creationPeriod: month.
+
+ indicesTimeFrequency:
+ - indexPrefix: auditingevents
+ creationPeriod: month
+ - indexPrefix: monitoring_events
+ creationPeriod: month
+
+artifactTypes:
+ - CHEF
+ - PUPPET
+ - SHELL
+ - YANG
+ - YANG_XML
+ - HEAT
+ - BPEL
+ - DG_XML
+ - MURANO_PKG
+ - OTHER
+
+licenseTypes:
+ - User
+ - Installation
+ - CPU
+
+#Deployment artifacts placeHolder
+deploymentResourceArtifacts:
+ heat:
+ displayName: "HEAT Template"
+ type: HEAT
+
+deploymentResourceInstanceArtifacts:
+ heatEnv:
+ displayName: "HEAT ENV"
+ type: HEAT_ENV
+ description: "Auto-generated HEAT Environment deployment artifact"
+ fileExtension: "env"
+
+#Informational artifacts placeHolder
+excludeResourceCategory:
+ - Generic
+informationalResourceArtifacts:
+ features:
+ displayName: Features
+ type: OTHER
+ capacity:
+ displayName: Capacity
+ type: OTHER
+ vendorTestResult:
+ displayName: Vendor Test Result
+ type: OTHER
+ testScripts:
+ displayName: Test Scripts
+ type: OTHER
+ cloudQuestionnaire:
+ displayName: Cloud Questionnaire (completed)
+ type: OTHER
+ HEATTemplateFromVendor:
+ displayName: HEAT Template from Vendor
+ type: HEAT
+
+excludeServiceCategory:
+
+informationalServiceArtifacts:
+ messageFlows:
+ displayName: Message Flows
+ type: OTHER
+ instantiationFlows:
+ displayName: Management Flows
+ type: OTHER
+ serviceArtifactPlan:
+ displayName: Service Artifact Plan
+ type: OTHER
+ summaryOfImpactsToECOMPElements:
+ displayName: Summary of impacts to ECOMP elements,OSSs, BSSs
+ type: OTHER
+ controlLoopFunctions:
+ displayName: Control Loop Functions
+ type: OTHER
+ dimensioningInfo:
+ displayName: Dimensioning Info
+ type: OTHER
+ affinityRules:
+ displayName: Affinity Rules
+ type: OTHER
+ operationalPolicies:
+ displayName: Operational Policies
+ type: OTHER
+ serviceSpecificPolicies:
+ displayName: Service-specific Policies
+ type: OTHER
+ engineeringRules:
+ displayName: Engineering Rules (ERD)
+ type: OTHER
+ distributionInstructions:
+ displayName: Distribution Instructions
+ type: OTHER
+ certificationTestResults:
+ displayName: TD Certification Test Results
+ type: OTHER
+ deploymentVotingRecord:
+ displayName: Deployment Voting Record
+ type: OTHER
+ serviceQuestionnaire:
+ displayName: Service Questionnaire
+ type: OTHER
+
+serviceApiArtifacts:
+ configuration:
+ displayName: Configuration
+ type: OTHER
+ instantiation:
+ displayName: Instantiation
+ type: OTHER
+ monitoring:
+ displayName: Monitoring
+ type: OTHER
+ reporting:
+ displayName: Reporting
+ type: OTHER
+ logging:
+ displayName: Logging
+ type: OTHER
+ testing:
+ displayName: Testing
+ type: OTHER
+
+
+additionalInformationMaxNumberOfKeys: 50
+
+systemMonitoring:
+ enabled: false
+ isProxy: false
+ probeIntervalInSeconds: 15
+
+defaultHeatArtifactTimeoutMinutes: 60
+
+serviceDeploymentArtifacts:
+
+resourceDeploymentArtifacts:
+ HEAT:
+ acceptedTypes:
+ - yaml
+ - yml
+
+resourceInformationalDeployedArtifacts:
+ YANG_XML:
+ acceptedTypes:
+ - xml
+
+
+unLoggedUrls:
+ - /sdc2/rest/healthCheck
+
+cleanComponentsConfiguration:
+ cleanIntervalInMinutes: 1440
+ componentsToClean:
+ - Resource
+
+artifactsIndex: resources
+
+heatEnvArtifactHeader:
+ " # _______________________________________________________________________________________________________________________________________\n
+ #| AT&T Proprietary (Restricted) |\n
+ #| Only for use by authorized individuals or any above-designated team(s) |\n
+ #| within the AT&T companies and not for general distribution |\n
+ #|_______________________________________________________________________________________________________________________________________|\n"
+heatEnvArtifactFooter:
+ " # _______________________________________________________________________________________________________________________________________\n
+ #| AT&T Proprietary (Restricted) |\n
+ #| Only for use by authorized individuals or any above-designated team(s) |\n
+ #| within the AT&T companies and not for general distribution |\n
+ #|_______________________________________________________________________________________________________________________________________|\n"
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/org/openecomp/core/nosqldb/NoSqlDbTest.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/org/openecomp/core/nosqldb/NoSqlDbTest.java
new file mode 100644
index 0000000000..e53c482b86
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/org/openecomp/core/nosqldb/NoSqlDbTest.java
@@ -0,0 +1,48 @@
+package org.openecomp.core.nosqldb;
+
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+
+import com.datastax.driver.core.ResultSet;
+import com.datastax.driver.core.Row;
+
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+import java.util.List;
+
+public class NoSqlDbTest {
+
+ private static NoSqlDb noSqlDb;
+
+
+// @Test
+ public void testNoSqlDbFactoryFactoryInit(){
+ this.noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ Assert.assertNotNull(this.noSqlDb);
+ Assert.assertEquals(this.noSqlDb.getClass().getName(),"org.openecomp.core.nosqldb.impl.cassandra.CassandraNoSqlDbImpl");
+ }
+
+// @Test(dependsOnMethods = {"testNoSqlDbFactoryFactoryInit"})
+ public void testCreateTable(){
+ this.noSqlDb.execute("test.drop",null);
+ this.noSqlDb.execute("test.create",null);
+ }
+
+// @Test(dependsOnMethods = {"testCreateTable"})
+ public void testInsertTable(){
+ this.noSqlDb.insert("test",new String[]{"name","value"},new String[]{"TestName","testValue"});
+ this.noSqlDb.execute("test.insert",new String[]{"TestName2","testValue2"});
+ }
+
+// @Test(dependsOnMethod`s = {"testInsertTable"})
+ public void gettestSelectTable(){
+ ResultSet result = this.noSqlDb.execute("test.select.all",null);
+ List<Row> rows = result.all();
+ Assert.assertEquals(rows.size(),2);
+ for (Row row:rows){
+ System.out.format("%s %s\n", row.getString("name"), row.getString("value"));
+ }
+ }
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/org/openecomp/core/utilities/Yaml/YamlUtilTest.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/org/openecomp/core/utilities/Yaml/YamlUtilTest.java
new file mode 100644
index 0000000000..baf9bfb350
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/org/openecomp/core/utilities/Yaml/YamlUtilTest.java
@@ -0,0 +1,47 @@
+package org.openecomp.core.utilities.Yaml;
+
+import org.openecomp.core.utilities.yaml.YamlUtil;
+import org.junit.Before;
+import org.junit.Test;
+import testobjects.yaml.YamlFile;
+
+
+public class YamlUtilTest {
+
+ String yamlContent;
+
+ @Before
+ public void setup() {
+ initYamlFileContent();
+ }
+
+ void initYamlFileContent() {
+ yamlContent = "heat_template_version: ss\n" +
+ "description: ab\n" +
+ "parameters:\n" +
+ " jsa_net_name: \n" +
+ " description: network name of jsa log network\n" +
+ " hidden: true\n" +
+ " inner:\n" +
+ " inner1:\n" +
+ " name: shiri\n" +
+ " inner2:\n" +
+ " name: avi";
+ }
+
+ @Test
+ public void shouldConvertSimpleYamlToObject() {
+ new YamlUtil().yamlToObject(yamlContent, YamlFile.class);
+ }
+
+
+ /*public void loadCassandraParameters(){
+ YamlUtil yamlutil = new YamlUtil();
+ String cassandraKey = "cassandraConfig";
+ String configurationFile = "/configuration.yaml";
+ InputStream yamlAsIS = yamlutil.loadYamlFileIs(configurationFile);
+ Map<String, LinkedHashMap<String, Object>> configurationMap = yamlutil.yamlToMap(yamlAsIS);
+ LinkedHashMap<String, Object> cassandraConfiguration = configurationMap.get(cassandraKey);
+ System.out.println(cassandraConfiguration.entrySet());
+ }*/
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/org/openecomp/core/utilities/json/JsonUtilTest.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/org/openecomp/core/utilities/json/JsonUtilTest.java
new file mode 100644
index 0000000000..5cf8988c06
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/org/openecomp/core/utilities/json/JsonUtilTest.java
@@ -0,0 +1,13 @@
+package org.openecomp.core.utilities.json;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+public class JsonUtilTest {
+ @Test
+ public void abc() {
+ System.out.println("as");
+ }
+
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/testobjects/yaml/InnerP.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/testobjects/yaml/InnerP.java
new file mode 100644
index 0000000000..eda4143e3e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/testobjects/yaml/InnerP.java
@@ -0,0 +1,25 @@
+package testobjects.yaml;
+
+public class InnerP {
+ String name;
+ String label;
+
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getLabel() {
+ return label;
+ }
+
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/testobjects/yaml/Parameter.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/testobjects/yaml/Parameter.java
new file mode 100644
index 0000000000..febcef9c40
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/testobjects/yaml/Parameter.java
@@ -0,0 +1,68 @@
+package testobjects.yaml;
+
+import java.util.Map;
+
+public class Parameter {
+ String name;
+ String label;
+ String description;
+ String paramDefault;
+ boolean hidden;
+ Map<String, InnerP> inner;
+
+ public Map<String, InnerP> getInner() {
+ return inner;
+ }
+
+ public void setInner(Map<String, InnerP> inner) {
+ this.inner = inner;
+ }
+
+ public String getParamDefault() {
+ return paramDefault;
+ }
+
+ public void setParamDefault(String paramDefault) {
+ this.paramDefault = paramDefault;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getLabel() {
+ return label;
+ }
+
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getDefault() {
+ return paramDefault;
+ }
+
+ public void setDefault(String paramDefault) {
+ this.paramDefault = paramDefault;
+ }
+
+ public boolean isHidden() {
+ return hidden;
+ }
+
+ public void setHidden(boolean hidden) {
+ this.hidden = hidden;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/testobjects/yaml/YamlFile.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/testobjects/yaml/YamlFile.java
new file mode 100644
index 0000000000..1c4989da37
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/test/java/testobjects/yaml/YamlFile.java
@@ -0,0 +1,37 @@
+package testobjects.yaml;
+
+import java.util.Map;
+
+public class YamlFile {
+ String heat_template_version;
+ String description;
+ Map<String, Parameter> parameters;
+
+
+ public YamlFile() {
+ }
+
+ public String getHeat_template_version() {
+ return heat_template_version;
+ }
+
+ public void setHeat_template_version(String heat_template_version) {
+ this.heat_template_version = heat_template_version;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Map<String, Parameter> getParameters() {
+ return parameters;
+ }
+
+ public void setParameters(Map<String, Parameter> parameters) {
+ this.parameters = parameters;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/pom.xml b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/pom.xml
new file mode 100644
index 0000000000..cb1d810547
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/pom.xml
@@ -0,0 +1,36 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <groupId>org.openecomp.sdc</groupId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../..</relativePath>
+ </parent>
+
+ <artifactId>openecomp-nosqldb-lib</artifactId>
+ <groupId>org.openecomp.core</groupId>
+ <name>openecomp-nosqldb-lib</name>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>openecomp-nosqldb-api</module>
+ <module>openecomp-nosqldb-core</module>
+ </modules>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-nosqldb-api</artifactId>
+ <version>${project.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-nosqldb-core</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/pom.xml b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/pom.xml
new file mode 100644
index 0000000000..a7a53a32f0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/pom.xml
@@ -0,0 +1,82 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>openecomp-core-lib</artifactId>
+ <groupId>org.openecomp.core</groupId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>openecomp-utilities-lib</artifactId>
+ <name>openecomp-utilities-lib</name>
+
+
+ <dependencies>
+ <dependency>
+ <groupId>org.yaml</groupId>
+ <artifactId>snakeyaml</artifactId>
+ <version>1.14</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ <version>3.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-collections4</artifactId>
+ <version>4.1</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.code.gson</groupId>
+ <artifactId>gson</artifactId>
+ <version>2.3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.7.10</version>
+
+ </dependency>
+ <!--<dependency>
+ <groupId>org.yaml</groupId>
+ <artifactId>snakeyaml</artifactId>
+ <version>1.17</version>
+ </dependency>-->
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>${commons.codec.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ <version>RELEASE</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.jackson</groupId>
+ <artifactId>jackson-mapper-asl</artifactId>
+ <version>${org.codehaus.jackson.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.everit.json</groupId>
+ <artifactId>org.everit.json.schema</artifactId>
+ <version>${org.everit.json.schema.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <scope>test</scope>
+ <version>6.8.5</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>snakeyaml</artifactId>
+ <groupId>org.yaml</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/CommonMethods.java b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/CommonMethods.java
new file mode 100644
index 0000000000..343636bd15
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/CommonMethods.java
@@ -0,0 +1,555 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.utilities;
+
+import org.apache.commons.codec.binary.Base64;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.PrintWriter;
+import java.io.Serializable;
+import java.io.StringWriter;
+import java.lang.reflect.Array;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+/**
+ * This class provides auxiliary static methods.
+ */
+public class CommonMethods {
+ //private static final Logger logger = LoggerFactory.getLogger(CommonMethods.class);
+
+ private static final char[] hexArray = "0123456789ABCDEF".toCharArray();
+
+ private static final char[] CHARS = new char[]{
+ '0', '1', '2', '3', '4', '5', '6', '7',
+ '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
+ };
+
+ /**
+ * Private default constructor to prevent instantiation of the class objects.
+ */
+ private CommonMethods() {
+ }
+
+ /**
+ * Serializes an object instance into byte array.
+ *
+ * @param object An instance to be serialized.
+ * @return Java array of bytes.
+ * @see #deserializeObject(byte[]) #deserializeObject(byte[])
+ */
+ public static byte[] serializeObject(Serializable object) {
+ ByteArrayOutputStream byteArray = new ByteArrayOutputStream(2048);
+ try {
+ ObjectOutputStream ds = new ObjectOutputStream(byteArray);
+ ds.writeObject(object);
+ ds.close();
+ } catch (IOException e0) {
+ throw new RuntimeException(e0);
+ }
+
+ return byteArray.toByteArray();
+ } // serializeObject
+
+ /**
+ * Deserializes an object instance.
+ *
+ * @param bytes Java array of bytes.
+ * @return Deserialized instance of an object.
+ * @see #serializeObject(Serializable) #serializeObject(Serializable)
+ */
+ public static Serializable deserializeObject(byte[] bytes) {
+ Serializable obj = null;
+ try {
+ ObjectInputStream stream = new ObjectInputStream(new ByteArrayInputStream(bytes));
+ obj = (Serializable) stream.readObject();
+ stream.close();
+ } catch (IOException | ClassNotFoundException e0) {
+ throw new RuntimeException(e0);
+ }
+
+ return obj;
+ } // deserializeObject
+
+ /**
+ * Encodes binary byte stream to ASCII format.
+ *
+ * @param binary An Java array of bytes in binary format.
+ * @return An Java array of bytes encoded in ASCII format.
+ * @see #decode(byte[]) #decode(byte[])
+ */
+ public static byte[] encode(byte[] binary) {
+ return Base64.encodeBase64(binary);
+ }
+
+ /**
+ * Decodes ASCII byte stream into binary format.
+ *
+ * @param ascii An Java array of bytes in ASCII format.
+ * @return An Java array of bytes encoded in binary format.
+ * @see #encode(byte[]) #encode(byte[])
+ */
+ public static byte[] decode(byte[] ascii) {
+ return Base64.decodeBase64(ascii);
+ }
+
+ /**
+ * Checks whether the given <tt>Object</tt> is empty.
+ *
+ * @param obj Object to be checked.
+ * @return <tt>true</tt> - if the Object is null, <tt>false</tt> otherwise.
+ */
+ public static boolean isEmpty(Object obj) {
+ return obj == null;
+ }
+
+ /**
+ * Checks whether the given <tt>Object</tt> is empty.
+ *
+ * @param byteArray Object to be checked.
+ * @return <tt>true</tt> - if the Object is null, <tt>false</tt> otherwise.
+ */
+ public static boolean isEmpty(byte[] byteArray) {
+ return (byteArray == null || byteArray.length == 0);
+ }
+
+ /**
+ * Checks whether the given <tt>String</tt> is empty.
+ *
+ * @param str String object to be checked.
+ * @return <tt>true</tt> - if the String is null or empty, <tt>false</tt> - otherwise.
+ */
+ public static boolean isEmpty(String str) {
+ return str == null || str.length() == 0;
+ }
+
+ /**
+ * Checks whether the given Java array is empty.
+ *
+ * @param array Java array to be checked.
+ * @return <tt>true</tt> - if the array is null or empty, <tt>false</tt> - otherwise.
+ */
+ public static boolean isEmpty(Object[] array) {
+ return array == null || array.length == 0;
+ }
+
+ /**
+ * Checks whether the given collection is empty.
+ *
+ * @param collection A collection to be checked.
+ * @return <tt>true</tt> - if the collection is null or empty, <tt>false</tt> - otherwise.
+ */
+ public static boolean isEmpty(Collection<?> collection) {
+ return collection == null || collection.isEmpty();
+ }
+
+ /**
+ * Checks whether the given map is empty.
+ *
+ * @param map A map to be checked.
+ * @return <tt>true</tt> - if the map is null or empty, <tt>false</tt> - otherwise.
+ */
+ public static boolean isEmpty(Map<?, ?> map) {
+ return map == null || map.isEmpty();
+ }
+
+ /**
+ * Converts the array with Long elements to the array with long (primitive type).
+ *
+ * @param array input array with Long elements.
+ * @return array with the same elements converted to the long type (primitive).
+ */
+ public static long[] toPrimitive(Long[] array) {
+ if (array == null) {
+ return null;
+ }
+
+ long[] result = new long[array.length];
+ for (int i = 0; i < array.length; i++) {
+ result[i] = array[i] != null ? array[i] : 0L;
+ }
+ return result;
+ }
+
+ /**
+ * Converts a collection to Java array.
+ *
+ * @param <T> Java type of the collection element.
+ * @param col Collection to be converted to array
+ * @param type Java type of collection/array element
+ * @return An Java array of collection elements, or empty array if collection is null or empty.
+ */
+ @SuppressWarnings("unchecked")
+ public static <T> T[] toArray(Collection<? extends T> col, Class<T> type) {
+ int length = isEmpty(col) ? 0 : col.size();
+ T[] array = (T[]) Array.newInstance(type, length);
+ return col != null ? col.toArray(array) : array;
+ }
+
+ /**
+ * Gets an universally unique identifier (UUID).
+ *
+ * @return String representation of generated UUID.
+ */
+ public static String nextUuId() {
+ UUID uuid = UUID.randomUUID();
+
+ StringBuilder buff = new StringBuilder(32);
+ long2string(uuid.getMostSignificantBits(), buff);
+ long2string(uuid.getLeastSignificantBits(), buff);
+
+ return buff.toString();
+ }
+
+ private static void long2string(long lng, StringBuilder buff) {
+ for (int i = 0; i < 16; i++) {
+ long nextByte = lng & 0xF000000000000000L;
+ lng <<= 4;
+ boolean isNegative = nextByte < 0;
+ nextByte = rightShift(nextByte, 60);
+
+ if (isNegative) {
+ nextByte |= 0x08;
+ }
+
+ buff.append(CHARS[(int) nextByte]);
+ }
+ }
+
+ private static long rightShift(long lng, int num) {
+ return lng >>> num;
+ }
+
+ /**
+ * Concatenates two Java arrays. The method allocates a new array and copies
+ * all elements to it or returns one of input arrays if another one is
+ * empty.
+ *
+ * @param <T> the type parameter
+ * @param left Elements of this array will be copied to positions from 0 to
+ * <tt>left.length - 1</tt> in the target array.
+ * @param right Elements of this array will be copied to positions from
+ * <tt>left.length</tt> to <tt>left.length + right.length</tt>
+ * @return A newly allocate Java array that accommodates elements of source (left/right)
+ arraysor one of source arrays if another is empty, <tt>null</tt> - otherwise.
+ */
+ @SuppressWarnings("unchecked")
+ public static <T> T[] concat(T[] left, T[] right) {
+ T[] res = null;
+
+ if (isEmpty(left)) {
+ res = right;
+ } else if (isEmpty(right)) {
+ res = left;
+ } else {
+ res = (T[]) Array.newInstance(left[0].getClass(), left.length + right.length);
+ System.arraycopy(left, 0, res, 0, left.length);
+ System.arraycopy(right, 0, res, left.length, right.length);
+ }
+
+ return res;
+ } // concat
+
+ /**
+ * Casts an object to the class or interface represented by the specified
+ * <tt>Class</tt> object. The method logic is similar to Java method
+ * <tt>Class.cast(Object)</tt> with the only difference that unlike Java's
+ * version the type name of the current object instance is specified in the
+ * error message if casting fails to simplify error tracking.
+ *
+ * @param <B> the type parameter
+ * @param <D> the type parameter
+ * @param b0 An object instance to be casted to the specified Java type.
+ * @param cls Target Java type.
+ * @return Object instance safely casted to the requested Java type.
+ * @throws ClassCastException In case which is the given object is not instance of the
+ * specified Java type.
+ */
+ @SuppressWarnings("unchecked")
+ public static <B, D> D cast(B b0, Class<D> cls) {
+ D d0 = null;
+ if (b0 != null) {
+ if (!cls.isInstance(b0)) {
+ throw new ClassCastException(String
+ .format("Failed to cast from '%s' to '%s'", b0.getClass().getName(), cls.getName()));
+ } else {
+ d0 = (D) b0;
+ }
+ }
+
+ return d0;
+ } // cast
+
+ /**
+ * New instance object.
+ *
+ * @param classname the classname
+ * @return the object
+ */
+ public static Object newInstance(String classname) {
+ return newInstance(classname, Object.class);
+ }
+
+ /**
+ * New instance t.
+ *
+ * @param <T> the type parameter
+ * @param classname the classname
+ * @param cls the cls
+ * @return the t
+ */
+ @SuppressWarnings("unchecked")
+ public static <T> T newInstance(String classname, Class<T> cls) {
+
+ if (isEmpty(classname)) {
+ throw new IllegalArgumentException();
+ }
+
+ if (cls == null) {
+ throw new IllegalArgumentException();
+ }
+
+ try {
+ Class<?> temp = Class.forName(classname);
+
+ if (!cls.isAssignableFrom(temp)) {
+ throw new ClassCastException(
+ String.format("Failed to cast from '%s' to '%s'", classname, cls.getName()));
+ }
+
+ Class<? extends T> impl = (Class<? extends T>) temp;
+
+ return newInstance(impl);
+ } catch (ClassNotFoundException e0) {
+ throw new IllegalArgumentException(e0);
+ }
+ }
+
+ /**
+ * New instance t.
+ *
+ * @param <T> the type parameter
+ * @param cls the cls
+ * @return the t
+ */
+ public static <T> T newInstance(Class<T> cls) {
+ try {
+ return cls.newInstance();
+ } catch (InstantiationException e0) {
+ throw new RuntimeException(e0);
+ } catch (IllegalAccessException e0) {
+ throw new RuntimeException(e0);
+ }
+ }
+
+ /**
+ * Gets resources path.
+ *
+ * @param resourceName the resource name
+ * @return the resources path
+ */
+ public static String getResourcesPath(String resourceName) {
+ URL resourceUrl = CommonMethods.class.getClassLoader().getResource(resourceName);
+ String resourcePath = resourceUrl.getPath();
+ String dirPath = resourcePath.substring(0, resourcePath.lastIndexOf("/") + 1);
+
+ return dirPath;
+ }
+
+ /**
+ * Gets stack trace.
+ *
+ * @param t0 the t 0
+ * @return the stack trace
+ */
+ public static String getStackTrace(Throwable t0) {
+ if (null == t0) {
+ return "";
+ }
+ StringWriter sw = new StringWriter();
+ t0.printStackTrace(new PrintWriter(sw));
+ return sw.toString();
+ }
+
+ /**
+ * Print stack trace string.
+ *
+ * @return the string
+ */
+ public static String printStackTrace() {
+
+ StringWriter sw = new StringWriter();
+ StackTraceElement[] trace = Thread.currentThread().getStackTrace();
+ for (StackTraceElement traceElement : trace) {
+ sw.write("\t " + traceElement);
+ sw.write(System.lineSeparator());
+ }
+ String str = sw.toString();
+ try {
+ sw.close();
+ } catch (IOException e0) {
+ System.err.println(e0);
+ }
+ return str;
+
+ }
+
+ /**
+ * Is equal object boolean.
+ *
+ * @param obj1 the obj 1
+ * @param obj2 the obj 2
+ * @return the boolean
+ */
+ public static boolean isEqualObject(Object obj1, Object obj2) {
+ boolean isEqualValue = false;
+ if (obj1 == null && obj2 == null) {
+ isEqualValue = true;
+ }
+
+ if (!isEqualValue && obj1 != null && obj2 != null && obj1.equals(obj2)) {
+ isEqualValue = true;
+ }
+ return isEqualValue;
+ }
+
+ /**
+ * Converts array of strings to comma-separated string.
+ *
+ * @param arr array of strings
+ * @return the string
+ */
+ public static String arrayToCommaSeparatedString(String[] arr) {
+ return arrayToSeparatedString(arr, ',');
+ }
+
+ /**
+ * Collection to comma separated string string.
+ *
+ * @param elementCollection the element collection
+ * @return the string
+ */
+ public static String collectionToCommaSeparatedString(Collection<String> elementCollection) {
+ List<String> list = new ArrayList<>();
+ elementCollection.stream().forEach(element -> list.add(element));
+ return listToSeparatedString(list, ',');
+ }
+
+ /**
+ * Converts array of strings to string separated with specified character.
+ *
+ * @param arr array of strings
+ * @param separator the separator
+ * @return the string
+ */
+ public static String arrayToSeparatedString(String[] arr, char separator) {
+ return listToSeparatedString(Arrays.asList(arr), separator);
+ }
+
+ /**
+ * Converts array of strings to string separated with specified character.
+ *
+ * @param list array of strings
+ * @param separator the separator
+ * @return the string
+ */
+ public static String listToSeparatedString(List<String> list, char separator) {
+ String res = null;
+ if (null != list) {
+ StringBuilder sb = new StringBuilder();
+ int sz = list.size();
+ for (int i = 0; i < sz; i++) {
+ if (i > 0) {
+ sb.append(separator);
+ }
+ sb.append(list.get(i));
+ }
+ res = sb.toString();
+ }
+ return res;
+ }
+
+ /**
+ * Duplicate string with delimiter string.
+ *
+ * @param arg the arg
+ * @param separator the separator
+ * @param numberOfDuplications the number of duplications
+ * @return the string
+ */
+ public static String duplicateStringWithDelimiter(String arg, char separator,
+ int numberOfDuplications) {
+ String res = null;
+ StringBuilder sb = new StringBuilder();
+
+ for (int i = 0; i < numberOfDuplications; i++) {
+ if (i > 0) {
+ sb.append(separator);
+ }
+ sb.append(arg);
+ }
+ res = sb.toString();
+ return res;
+ }
+
+ /**
+ * Bytes to hex string.
+ *
+ * @param bytes the bytes
+ * @return the string
+ */
+ public static String bytesToHex(byte[] bytes) {
+ char[] hexChars = new char[bytes.length * 2];
+ for (int j = 0; j < bytes.length; j++) {
+ int v0 = bytes[j] & 0xFF;
+ int x0 = j << 1;
+ hexChars[x0] = hexArray[v0 >>> 4];
+ hexChars[x0 + 1] = hexArray[v0 & 0x0F];
+ }
+ return new String(hexChars);
+ }
+
+ /**
+ * To single element set set.
+ *
+ * @param <T> the class of the objects in the set
+ * @param element the single element to be contained in the returned Set
+ * @return an immutable set containing only the specified object.The returned set is serializable.
+ */
+ public static <T> Set<T> toSingleElementSet(T element) {
+ return Collections.singleton(element);
+
+ }
+
+
+}
+
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/file/FileContentHandler.java b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/file/FileContentHandler.java
new file mode 100644
index 0000000000..67a79875d4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/file/FileContentHandler.java
@@ -0,0 +1,88 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.utilities.file;
+
+import org.apache.commons.collections4.MapUtils;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+public class FileContentHandler {
+ private Map<String, byte[]> files = new HashMap<>();
+
+ /**
+ * Gets file content.
+ *
+ * @param fileName the file name
+ * @return the file content
+ */
+ public InputStream getFileContent(String fileName) {
+
+ byte[] content = files.get(fileName);
+ if (content == null || content.length == 0) {
+ return null;
+ }
+
+ ByteArrayInputStream is = new ByteArrayInputStream(content);
+ return is;
+ }
+
+ public void addFile(String fileName, byte[] contect) {
+ files.put(fileName, contect);
+ }
+
+ public void addFile(String fileName, InputStream is) {
+
+ files.put(fileName, FileUtils.toByteArray(is));
+ }
+
+ public void setFiles(FileContentHandler extFiles) {
+ extFiles.getFileList().stream()
+ .forEach(fileName -> this.addFile(fileName, extFiles.getFileContent(fileName)));
+ }
+
+ public Set<String> getFileList() {
+ return files.keySet();
+ }
+
+ public void putAll(Map<String, byte[]> files) {
+ this.files = files;
+ }
+
+ public void addAll(FileContentHandler other) {
+ this.files.putAll(other.files);
+ }
+
+ public boolean isEmpty() {
+ return MapUtils.isEmpty(this.files);
+ }
+
+ public void remove(String fileName) {
+ files.remove(fileName);
+ }
+
+ public boolean containsFile(String fileName) {
+ return files.containsKey(fileName);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/file/FileUtils.java b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/file/FileUtils.java
new file mode 100644
index 0000000000..72fa9ac7b8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/file/FileUtils.java
@@ -0,0 +1,286 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.utilities.file;
+
+import org.openecomp.core.utilities.json.JsonUtil;
+import org.openecomp.core.utilities.yaml.YamlUtil;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
+/**
+ * The type File utils.
+ */
+public class FileUtils {
+
+ /**
+ * Gets file input stream.
+ *
+ * @param fileName the file name
+ * @return the file input stream
+ */
+ public static InputStream getFileInputStream(String fileName) {
+ URL urlFile = FileUtils.class.getClassLoader().getResource(fileName);
+ InputStream is;
+ try {
+ assert urlFile != null;
+ is = urlFile.openStream();
+ } catch (IOException exception) {
+ throw new RuntimeException(exception);
+ }
+ return is;
+ }
+
+ /**
+ * Gets file input streams.
+ *
+ * @param fileName the file name
+ * @return the file input streams
+ */
+ public static List<InputStream> getFileInputStreams(String fileName) {
+ Enumeration<URL> urlFiles;
+ List<InputStream> streams = new ArrayList<>();
+ InputStream is;
+ URL url;
+ try {
+ urlFiles = FileUtils.class.getClassLoader().getResources(fileName);
+ while (urlFiles.hasMoreElements()) {
+ url = urlFiles.nextElement();
+ is = url.openStream();
+ streams.add(is);
+ }
+
+
+ } catch (IOException exception) {
+ throw new RuntimeException(exception);
+ }
+ return streams;
+ }
+
+ /**
+ * Convert to bytes byte [ ].
+ *
+ * @param object the object
+ * @param extension the extension
+ * @return the byte [ ]
+ */
+ public static byte[] convertToBytes(Object object, FileExtension extension) {
+ if (object != null) {
+ if (extension.equals(FileExtension.YAML) || extension.equals(FileExtension.YML)) {
+ return new YamlUtil().objectToYaml(object).getBytes();
+ } else {
+ return JsonUtil.object2Json(object).getBytes();
+ }
+ } else {
+ return new byte[]{};
+ }
+ }
+
+ /**
+ * Convert to input stream input stream.
+ *
+ * @param object the object
+ * @param extension the extension
+ * @return the input stream
+ */
+ public static InputStream convertToInputStream(Object object, FileExtension extension) {
+ if (object != null) {
+
+ byte[] content;
+
+ if (extension.equals(FileExtension.YAML) || extension.equals(FileExtension.YML)) {
+ content = new YamlUtil().objectToYaml(object).getBytes();
+ } else {
+ content = JsonUtil.object2Json(object).getBytes();
+
+ }
+ return new ByteArrayInputStream(content);
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Load file to input stream input stream.
+ *
+ * @param fileName the file name
+ * @return the input stream
+ */
+ public static InputStream loadFileToInputStream(String fileName) {
+ URL urlFile = FileUtils.class.getClassLoader().getResource(fileName);
+ try {
+ Enumeration<URL> en = FileUtils.class.getClassLoader().getResources(fileName);
+ while (en.hasMoreElements()) {
+ urlFile = en.nextElement();
+ }
+ } catch (IOException | NullPointerException exception) {
+ throw new RuntimeException(exception);
+ }
+ try {
+ if (urlFile != null) {
+ return urlFile.openStream();
+ } else {
+ throw new RuntimeException();
+ }
+ } catch (IOException | NullPointerException exception) {
+ throw new RuntimeException(exception);
+ }
+
+ }
+
+ /**
+ * To byte array byte [ ].
+ *
+ * @param input the input
+ * @return the byte [ ]
+ */
+ public static byte[] toByteArray(InputStream input) {
+ ByteArrayOutputStream output = new ByteArrayOutputStream();
+ try {
+ copy(input, output);
+ } catch (IOException exception) {
+ throw new RuntimeException(
+ "error will convertion input stream to byte array:" + exception.getMessage());
+ }
+ return output.toByteArray();
+ }
+
+ /**
+ * Copy int.
+ *
+ * @param input the input
+ * @param output the output
+ * @return the int
+ * @throws IOException the io exception
+ */
+ public static int copy(InputStream input, OutputStream output) throws IOException {
+ long count = copyLarge(input, output);
+ return count > 2147483647L ? -1 : (int) count;
+ }
+
+ private static long copyLarge(InputStream input, OutputStream output) throws IOException {
+ return copyLarge(input, output, new byte[4096]);
+ }
+
+ private static long copyLarge(InputStream input, OutputStream output, byte[] buffer)
+ throws IOException {
+ long count = 0L;
+
+ int n1;
+ if (input == null) {
+ return count;
+ }
+ for (; -1 != (n1 = input.read(buffer)); count += (long) n1) {
+ output.write(buffer, 0, n1);
+ }
+
+ return count;
+
+
+ }
+
+ /**
+ * Gets file without extention.
+ *
+ * @param fileName the file name
+ * @return the file without extention
+ */
+ public static String getFileWithoutExtention(String fileName) {
+ if (!fileName.contains(".")) {
+ return fileName;
+ }
+ return fileName.substring(0, fileName.lastIndexOf("."));
+ }
+
+ /**
+ * Gets file content map from zip.
+ *
+ * @param zipData the zip data
+ * @return the file content map from zip
+ * @throws IOException the io exception
+ */
+ public static FileContentHandler getFileContentMapFromZip(byte[] zipData) throws IOException {
+ ZipEntry zipEntry;
+ FileContentHandler mapFileContent = new FileContentHandler();
+ try {
+ ZipInputStream inputZipStream;
+
+ byte[] fileByteContent;
+ String currentEntryName;
+ inputZipStream = new ZipInputStream(new ByteArrayInputStream(zipData));
+
+ while ((zipEntry = inputZipStream.getNextEntry()) != null) {
+ currentEntryName = zipEntry.getName();
+ fileByteContent = FileUtils.toByteArray(inputZipStream);
+ mapFileContent.addFile(currentEntryName, fileByteContent);
+ }
+
+ } catch (RuntimeException exception) {
+ throw new IOException(exception);
+ }
+ return mapFileContent;
+ }
+
+ /**
+ * The enum File extension.
+ */
+ public enum FileExtension {
+
+ /**
+ * Json file extension.
+ */
+ JSON("json"),
+ /**
+ * Yaml file extension.
+ */
+ YAML("yaml"),
+ /**
+ * Yml file extension.
+ */
+ YML("yml");
+
+ private String displayName;
+
+ FileExtension(String displayName) {
+ this.displayName = displayName;
+ }
+
+ /**
+ * Gets display name.
+ *
+ * @return the display name
+ */
+ public String getDisplayName() {
+ return displayName;
+ }
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/json/JsonSchemaDataGenerator.java b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/json/JsonSchemaDataGenerator.java
new file mode 100644
index 0000000000..8968eeb323
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/json/JsonSchemaDataGenerator.java
@@ -0,0 +1,185 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.utilities.json;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * The type Json schema data generator.
+ */
+public class JsonSchemaDataGenerator {
+
+ private static final String ROOT = "root";
+ private static final Logger logger = LoggerFactory.getLogger(JsonSchemaDataGenerator.class);
+ /**
+ * The Include defaults.
+ */
+ boolean includeDefaults = true;
+ private JSONObject root;
+ private Map<String, Object> referencesData;
+
+ /**
+ * Instantiates a new Json schema data generator.
+ *
+ * @param jsonSchema the json schema
+ */
+ public JsonSchemaDataGenerator(String jsonSchema) {
+ if (jsonSchema == null) {
+ throw new IllegalArgumentException("Input string jsonSchema can not be null");
+ }
+ root = new JSONObject(jsonSchema);
+ }
+
+ /**
+ * Sets include defaults.
+ *
+ * @param includeDefaults the include defaults
+ */
+ public void setIncludeDefaults(boolean includeDefaults) {
+ this.includeDefaults = includeDefaults;
+ }
+
+ /**
+ * Generates json data that conform to the schema according to turned on flags.
+ *
+ * @return json that conform to the schema.
+ */
+ public String generateData() {
+ referencesData = new HashMap<>();
+ JSONObject data = new JSONObject();
+
+ generateData(ROOT, root,
+ data); // "root" is dummy name to represent the top level object (which, as apposed to
+ // inner objects, doesn't have a name in the schema)
+ return data.has(ROOT) ? data.get(ROOT).toString() : data.toString();
+ }
+
+ private void generateData(String propertyName, JSONObject property, JSONObject propertyData) {
+ if (property.has(JsonSchemaKeyword.TYPE)) {
+ String propertyType = property.getString(JsonSchemaKeyword.TYPE);
+ if (JsonSchemaKeyword.OBJECT.equals(propertyType)) {
+ generateObjectData(propertyName, property, propertyData);
+ } else {
+ generatePrimitiveData(propertyType, propertyName, property, propertyData);
+ }
+ } else if (property.has(JsonSchemaKeyword.REF)) {
+ generateReferenceData(propertyName, property.getString(JsonSchemaKeyword.REF), propertyData);
+ }
+ }
+
+ private void generateObjectData(String propertyName, JSONObject property,
+ JSONObject propertyData) {
+ JSONObject subProperties = property.getJSONObject(JsonSchemaKeyword.PROPERTIES);
+
+ JSONObject subPropertiesData = new JSONObject();
+ for (String subPropertyName : subProperties.keySet()) {
+ generateData(subPropertyName, subProperties.getJSONObject(subPropertyName),
+ subPropertiesData);
+ }
+
+ if (subPropertiesData.length() > 0) {
+ propertyData.put(propertyName, subPropertiesData);
+ }
+ }
+
+ private void generateReferenceData(String propertyName, String referencePath,
+ JSONObject propertyData) {
+ if (referencesData.containsKey(referencePath)) {
+ Object referenceData = referencesData.get(referencePath);
+ if (referenceData != null) {
+ propertyData.put(propertyName, referenceData);
+ }
+ } else {
+ generateData(propertyName, resolveReference(referencePath), propertyData);
+ referencesData.put(referencePath, propertyData.opt(propertyName));
+ }
+ }
+
+ private JSONObject resolveReference(String referencePath) {
+ String[] keys = referencePath.replaceFirst("#/", "").split("/");
+
+ JSONObject reference = root;
+ for (String key : keys) {
+ reference = reference.getJSONObject(key);
+ }
+ return reference;
+ }
+
+ private void generatePrimitiveData(String propertyType, String propertyName, JSONObject property,
+ JSONObject propertyData) {
+ if (includeDefaults) {
+ populateWithDefaultValue(propertyType, propertyName, property, propertyData);
+ }
+ }
+
+ private void populateWithDefaultValue(String propertyType, String propertyName,
+ JSONObject property, JSONObject propertyData) {
+ if (!property.has(JsonSchemaKeyword.DEFAULT)) {
+ return;
+ }
+ try {
+ switch (propertyType) {
+ case JsonSchemaKeyword.ARRAY:
+ propertyData.put(propertyName, property.getJSONArray(JsonSchemaKeyword.DEFAULT));
+ break;
+ case JsonSchemaKeyword.BOOLEAN:
+ propertyData.put(propertyName, property.getBoolean(JsonSchemaKeyword.DEFAULT));
+ break;
+ case JsonSchemaKeyword.INTEGER:
+ propertyData.put(propertyName, property.getInt(JsonSchemaKeyword.DEFAULT));
+ break;
+ case JsonSchemaKeyword.NUMBER:
+ propertyData.put(propertyName, property.getDouble(JsonSchemaKeyword.DEFAULT));
+ break;
+ case JsonSchemaKeyword.STRING:
+ propertyData.put(propertyName, property.getString(JsonSchemaKeyword.DEFAULT));
+ break;
+ default:
+ break;
+ }
+ } catch (JSONException e0) {
+ Object defaultValue = property.get(JsonSchemaKeyword.DEFAULT);
+ logger.error(String.format(
+ "Invalid schema: '%s' property type is '%s' but it has a default value which is not: %s.",
+ propertyName, propertyType, defaultValue), e0);
+ throw e0;
+ }
+ }
+
+ private static class JsonSchemaKeyword {
+ private static final String DEFAULT = "default";
+ private static final String TYPE = "type";
+ private static final String PROPERTIES = "properties";
+ private static final String ARRAY = "array";
+ private static final String BOOLEAN = "boolean";
+ private static final String INTEGER = "integer";
+ private static final String NUMBER = "number";
+ private static final String STRING = "string";
+ private static final String OBJECT = "object";
+ private static final String REF = "$ref";
+ }
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/json/JsonUtil.java b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/json/JsonUtil.java
new file mode 100644
index 0000000000..6ae3677a8d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/json/JsonUtil.java
@@ -0,0 +1,187 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.utilities.json;
+
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonIOException;
+import com.google.gson.JsonParser;
+import com.google.gson.JsonSyntaxException;
+
+import org.apache.commons.collections.CollectionUtils;
+import org.everit.json.schema.EnumSchema;
+import org.everit.json.schema.Schema;
+import org.everit.json.schema.ValidationException;
+import org.everit.json.schema.loader.SchemaLoader;
+import org.json.JSONObject;
+import org.openecomp.core.utilities.CommonMethods;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.StringReader;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * The type Json util.
+ */
+public class JsonUtil {
+
+ /**
+ * Object 2 json string.
+ *
+ * @param obj the obj
+ * @return the string
+ */
+ //TODO: refactor all other ugly code to use this
+ public static String object2Json(Object obj) {
+ return sbObject2Json(obj).toString();
+
+ }
+
+ /**
+ * Sb object 2 json string buffer.
+ *
+ * @param obj the obj
+ * @return the string buffer
+ */
+ public static StringBuffer sbObject2Json(Object obj) {
+ return new StringBuffer((new GsonBuilder()).setPrettyPrinting().create().toJson(obj));
+ }
+
+ /**
+ * Json 2 object t.
+ *
+ * @param <T> the type parameter
+ * @param json the json
+ * @param classOfT the class of t
+ * @return the t
+ */
+ public static <T> T json2Object(String json, Class<T> classOfT) {
+ T type;
+ try {
+ try (Reader br = new StringReader(json)) {
+ type = new Gson().fromJson(br, classOfT);
+ } catch (IOException e0) {
+ throw e0;
+ }
+ } catch (JsonIOException | JsonSyntaxException | IOException e0) {
+ throw new RuntimeException(e0);
+ }
+ return type;
+ }
+
+ /**
+ * Json 2 object t.
+ *
+ * @param <T> the type parameter
+ * @param is the is
+ * @param classOfT the class of t
+ * @return the t
+ */
+ public static <T> T json2Object(InputStream is, Class<T> classOfT) {
+ T type;
+ try {
+ try (Reader br = new BufferedReader(new InputStreamReader(is))) {
+ type = new Gson().fromJson(br, classOfT);
+ }
+ } catch (JsonIOException | JsonSyntaxException | IOException e0) {
+ throw new RuntimeException(e0);
+ } finally {
+ if (is != null) {
+ try {
+ is.close();
+ } catch (IOException ignore) {
+ //do nothing
+ }
+ }
+ }
+ return type;
+ }
+
+
+ /**
+ * Is valid json boolean.
+ *
+ * @param json the json
+ * @return the boolean
+ */
+ //todo check https://github.com/stleary/JSON-java as replacement for this code
+ public static boolean isValidJson(String json) {
+ try {
+ return new JsonParser().parse(json).isJsonObject();
+ } catch (JsonSyntaxException jse) {
+ return false;
+ }
+ }
+
+ /**
+ * Validate list.
+ *
+ * @param json the json
+ * @param jsonSchema the json schema
+ * @return the list
+ */
+ public static List<String> validate(String json, String jsonSchema) {
+ List<ValidationException> validationErrors = validateUsingEverit(json, jsonSchema);
+ return validationErrors == null ? null
+ : validationErrors.stream().map(JsonUtil::mapValidationExceptionToMessage)
+ .collect(Collectors.toList());
+ }
+
+ private static String mapValidationExceptionToMessage(ValidationException e0) {
+ if (e0.getViolatedSchema() instanceof EnumSchema) {
+ return mapEnumViolationToMessage(e0);
+ }
+ return e0.getMessage();
+ }
+
+ private static String mapEnumViolationToMessage(ValidationException e1) {
+ Set<Object> possibleValues = ((EnumSchema) e1.getViolatedSchema()).getPossibleValues();
+ return e1.getMessage().replaceFirst("enum value", possibleValues.size() == 1
+ ? String.format("value. %s is the only possible value for this field",
+ possibleValues.iterator().next())
+ : String.format("value. Possible values: %s", CommonMethods
+ .collectionToCommaSeparatedString(
+ possibleValues.stream().map(Object::toString).collect(Collectors.toList()))));
+ }
+
+ private static List<ValidationException> validateUsingEverit(String json, String jsonSchema) {
+ if (json == null || jsonSchema == null) {
+ throw new IllegalArgumentException("Input strings json and jsonSchema can not be null");
+ }
+
+ Schema schemaObj = SchemaLoader.load(new JSONObject(jsonSchema));
+ try {
+ schemaObj.validate(new JSONObject(json));
+ } catch (ValidationException ve) {
+ return CollectionUtils.isEmpty(ve.getCausingExceptions()) ? Collections.singletonList(ve)
+ : ve.getCausingExceptions();
+ }
+ return null;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/yaml/YamlUtil.java b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/yaml/YamlUtil.java
new file mode 100644
index 0000000000..56261f08de
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/yaml/YamlUtil.java
@@ -0,0 +1,289 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.utilities.yaml;
+
+import org.openecomp.core.utilities.CommonMethods;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.yaml.snakeyaml.DumperOptions;
+import org.yaml.snakeyaml.TypeDescription;
+import org.yaml.snakeyaml.Yaml;
+import org.yaml.snakeyaml.constructor.Constructor;
+import org.yaml.snakeyaml.introspector.BeanAccess;
+import org.yaml.snakeyaml.introspector.Property;
+import org.yaml.snakeyaml.introspector.PropertyUtils;
+import org.yaml.snakeyaml.nodes.MappingNode;
+import org.yaml.snakeyaml.nodes.NodeTuple;
+import org.yaml.snakeyaml.nodes.Tag;
+import org.yaml.snakeyaml.parser.ParserException;
+import org.yaml.snakeyaml.representer.Representer;
+
+import java.beans.IntrospectionException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.AbstractMap;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * The type Yaml util.
+ */
+public class YamlUtil {
+
+ private static Logger logger = LoggerFactory.getLogger(YamlUtil.class);
+
+ /**
+ * Yaml to object t.
+ *
+ * @param <T> the type parameter
+ * @param yamlContent the yaml content
+ * @param typClass the typ class
+ * @return the t
+ */
+ public <T> T yamlToObject(String yamlContent, Class<T> typClass) {
+ Constructor constructor = getConstructor(typClass);
+ constructor.setPropertyUtils(getPropertyUtils());
+ TypeDescription yamlFileDescription = new TypeDescription(typClass);
+ constructor.addTypeDescription(yamlFileDescription);
+ Yaml yaml = new Yaml(constructor);
+ T yamlObj = (T) yaml.load(yamlContent);
+ yamlObj.toString();
+ return yamlObj;
+ }
+
+ /**
+ * Yaml to object t.
+ *
+ * @param <T> the type parameter
+ * @param yamlContent the yaml content
+ * @param typClass the typ class
+ * @return the t
+ */
+ public <T> T yamlToObject(InputStream yamlContent, Class<T> typClass) {
+ try {
+ Constructor constructor = getConstructor(typClass);
+ constructor.setPropertyUtils(getPropertyUtils());
+ TypeDescription yamlFileDescription = new TypeDescription(typClass);
+ constructor.addTypeDescription(yamlFileDescription);
+ Yaml yaml = new Yaml(constructor);
+ T yamlObj = (T) yaml.load(yamlContent);
+ if (yamlObj != null) {
+ yamlObj.toString();
+ return yamlObj;
+ } else {
+ throw new RuntimeException();
+ }
+ } catch (Exception exception) {
+ logger.error("Error will trying to convert yaml to object:" + exception.getMessage());
+ throw new RuntimeException(exception);
+ } finally {
+ try {
+ if (yamlContent != null) {
+ yamlContent.close();
+ }
+ } catch (IOException ignore) {
+ //nothing to dd
+ }
+ }
+ }
+
+
+ /**
+ * Gets constructor.
+ *
+ * @param <T> the type parameter
+ * @param typClass the typ class
+ * @return the constructor
+ */
+ public <T> Constructor getConstructor(Class<T> typClass) {
+ return new StrictMapAppenderConstructor(typClass);
+ }
+
+ /**
+ * Gets property utils.
+ *
+ * @return the property utils
+ */
+ protected PropertyUtils getPropertyUtils() {
+ return new MyPropertyUtils();
+ }
+
+ /**
+ * Yaml to map map.
+ *
+ * @param yamlContent the yaml content
+ * @return the map
+ */
+ public Map<String, LinkedHashMap<String, Object>> yamlToMap(InputStream yamlContent) {
+ Yaml yaml = new Yaml();
+ Map<String, LinkedHashMap<String, Object>> yamlData =
+ (Map<String, LinkedHashMap<String, Object>>) yaml.load(yamlContent);
+ return yamlData;
+ }
+
+ /**
+ * Object to yaml string.
+ *
+ * @param <T> the type parameter
+ * @param obj the obj
+ * @return the string
+ */
+ public <T> String objectToYaml(Object obj) {
+ DumperOptions options = new DumperOptions();
+ options.setPrettyFlow(true);
+ options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
+ Representer representer = new CustomRepresenter();
+ representer.addClassTag(obj.getClass(), Tag.MAP);
+ representer.setPropertyUtils(new MyPropertyUtils());
+
+ Yaml yaml = new Yaml(representer, options);
+ return yaml.dump(obj);
+ }
+
+ /**
+ * Load yaml file is input stream.
+ *
+ * @param yamlFullFileName the yaml full file name
+ * @return the input stream
+ */
+ public InputStream loadYamlFileIs(String yamlFullFileName) {
+ return CommonMethods.class.getResourceAsStream(yamlFullFileName);
+ }
+
+ /**
+ * Is yaml file content valid boolean.
+ *
+ * @param yamlFullFileName the yaml full file name
+ * @return the boolean
+ */
+ public boolean isYamlFileContentValid(String yamlFullFileName) {
+ Yaml yaml = new Yaml();
+ try {
+ Object loadResult = yaml.load(yamlFullFileName);
+ if (loadResult == null) {
+ return false;
+ }
+ return true;
+ } catch (Exception exception) {
+ return false;
+ }
+ }
+
+
+ private class CustomRepresenter extends Representer {
+ @Override
+ protected NodeTuple representJavaBeanProperty(Object javaBean, Property property,
+ Object propertyValue, Tag customTag) {
+ if (propertyValue == null) {
+ return null;
+ } else {
+ NodeTuple defaultNode =
+ super.representJavaBeanProperty(javaBean, property, propertyValue, customTag);
+
+ return property.getName().equals("_default")
+ ? new NodeTuple(representData("default"), defaultNode.getValueNode())
+ : defaultNode;
+ }
+ }
+
+ @Override
+ protected MappingNode representJavaBean(Set<Property> properties, Object javaBean) {
+ //remove the bean type from the output yaml (!! ...)
+ if (!classTags.containsKey(javaBean.getClass())) {
+ addClassTag(javaBean.getClass(), Tag.MAP);
+ }
+
+ return super.representJavaBean(properties, javaBean);
+ }
+ }
+
+
+ /**
+ * The type My property utils.
+ */
+ public class MyPropertyUtils extends PropertyUtils {
+ @Override
+ public Property getProperty(Class<?> type, String name) throws IntrospectionException {
+ if (name.equals("default")) {
+ name = "_default";
+ }
+ return super.getProperty(type, name);
+ }
+
+ //Unsorted properties
+ @Override
+ protected Set<Property> createPropertySet(Class<? extends Object> type, BeanAccess beanAccess)
+ throws IntrospectionException {
+ return new LinkedHashSet<Property>(getPropertiesMap(type,
+ BeanAccess.FIELD).values());
+ }
+
+ }
+
+ /**
+ * The type Strict map appender constructor.
+ */
+ protected class StrictMapAppenderConstructor extends Constructor {
+
+ /**
+ * Instantiates a new Strict map appender constructor.
+ *
+ * @param theRoot the the root
+ */
+ public StrictMapAppenderConstructor(Class<?> theRoot) {
+ super(theRoot);
+ }
+
+ @Override
+ protected Map<Object, Object> constructMapping(MappingNode node) {
+ try {
+ return super.constructMapping(node);
+ } catch (IllegalStateException exception) {
+ throw new ParserException("while parsing MappingNode", node.getStartMark(),
+ exception.getMessage(), node.getEndMark());
+ }
+ }
+
+ @Override
+ protected Map<Object, Object> createDefaultMap() {
+ final Map<Object, Object> delegate = super.createDefaultMap();
+ return new AbstractMap<Object, Object>() {
+ @Override
+ public Object put(Object key, Object value) {
+ if (delegate.containsKey(key)) {
+ throw new IllegalStateException("duplicate key: " + key);
+ }
+ return delegate.put(key, value);
+ }
+
+ @Override
+ public Set<Entry<Object, Object>> entrySet() {
+ return delegate.entrySet();
+ }
+ };
+ }
+ }
+}
+
+
+
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/java/org/openecomp/core/utilities/json/JsonSchemaDataGeneratorTest.java b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/java/org/openecomp/core/utilities/json/JsonSchemaDataGeneratorTest.java
new file mode 100644
index 0000000000..83c87737d2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/java/org/openecomp/core/utilities/json/JsonSchemaDataGeneratorTest.java
@@ -0,0 +1,50 @@
+package org.openecomp.core.utilities.json;
+
+import org.openecomp.core.utilities.file.FileUtils;
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class JsonSchemaDataGeneratorTest {
+
+ public static final String SCHEMA_WITHOUT_DEFAULTS = new String(
+ FileUtils.toByteArray(FileUtils.getFileInputStream("jsonUtil/json_schema/aSchema.json")));
+ public static final String SCHEMA_WITH_REFS_AND_DEFAULTS = new String(FileUtils.toByteArray(
+ FileUtils.getFileInputStream("jsonUtil/json_schema/schemaWithRefsAndDefaults.json")));
+ public static final String SCHEMA_WITH_INVALID_DEFAULT = new String(FileUtils.toByteArray(
+ FileUtils.getFileInputStream("jsonUtil/json_schema/schemaWithInvalidDefault.json")));
+ public static final String SCHEMA_NIC = new String(
+ FileUtils.toByteArray(FileUtils.getFileInputStream("jsonUtil/json_schema/nicSchema.json")));
+
+ @Test
+ public void testSchemaWithoutDefaults() {
+ testGenerate(SCHEMA_WITHOUT_DEFAULTS, new JSONObject());
+ }
+
+ @Test
+ public void testSchemaWithRefsAndDefaults() {
+ testGenerate(SCHEMA_WITH_REFS_AND_DEFAULTS,
+ new JSONObject(
+ "{\"cityOfBirth\":\"Tel Aviv\",\"address\":{\"city\":\"Tel Aviv\"},\"phoneNumber\":[{\"code\":1,\"location\":\"Home\"},{\"code\":2,\"location\":\"Office\"}]}"));
+ }
+
+ @Test(expectedExceptions = JSONException.class)
+ public void testSchemaWithInvalidDefault() {
+ testGenerate(SCHEMA_WITH_INVALID_DEFAULT, null);
+ }
+
+ @Test
+ public void testNicQuestionnaireSchema() {
+ testGenerate(SCHEMA_NIC,
+ new JSONObject("{\"ipConfiguration\":{\"ipv4Required\":true,\"ipv6Required\":false}}"));
+ }
+
+ private void testGenerate(String schema, JSONObject expectedData) {
+ JsonSchemaDataGenerator jsonSchemaDataGenerator = new JsonSchemaDataGenerator(schema);
+ String data = jsonSchemaDataGenerator.generateData();
+ System.out.println(data);
+ JSONObject dataJson = new JSONObject(data);
+ Assert.assertTrue(expectedData.similar(dataJson));
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/java/org/openecomp/core/utilities/json/JsonUtilTest.java b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/java/org/openecomp/core/utilities/json/JsonUtilTest.java
new file mode 100644
index 0000000000..e232f72f38
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/java/org/openecomp/core/utilities/json/JsonUtilTest.java
@@ -0,0 +1,40 @@
+package org.openecomp.core.utilities.json;
+
+
+import org.openecomp.core.utilities.file.FileUtils;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+import java.util.List;
+
+public class JsonUtilTest {
+
+ @Test
+ public void testValidJsonValidate() throws Exception {
+ String json =
+ new String(FileUtils.toByteArray(FileUtils.getFileInputStream("jsonUtil/json/a.json")));
+ String jsonSchema = new String(
+ FileUtils.toByteArray(FileUtils.getFileInputStream("jsonUtil/json_schema/aSchema.json")));
+
+ List<String> validationErrors = JsonUtil.validate(json, jsonSchema);
+ Assert.assertNull(validationErrors);
+ }
+
+ @Test
+ public void testInValidJsonValidate() throws Exception {
+ String json = new String(
+ FileUtils.toByteArray(FileUtils.getFileInputStream("jsonUtil/json/a_invalid.json")));
+ String jsonSchema = new String(
+ FileUtils.toByteArray(FileUtils.getFileInputStream("jsonUtil/json_schema/aSchema.json")));
+
+ List<String> validationErrors = JsonUtil.validate(json, jsonSchema);
+ Assert.assertNotNull(validationErrors);
+ Assert.assertEquals(validationErrors.size(), 3);
+ Assert.assertEquals(validationErrors.get(0),
+ "#/cityOfBirth: Paris is not a valid value. Possible values: New York,Tel Aviv,London");
+ Assert.assertEquals(validationErrors.get(1),
+ "#/address: {\"streetAddress\":\"21 2nd Street\",\"city\":\"Paris\"} is not a valid value. {\"streetAddress\":\"21 2nd Street\",\"city\":\"New York\"} is the only possible value for this field");
+ Assert.assertEquals(validationErrors.get(2),
+ "#/phoneNumber/0/code: expected type: Number, found: String");
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/resources/jsonUtil/json/a.json b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/resources/jsonUtil/json/a.json
new file mode 100644
index 0000000000..a3320d5fc7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/resources/jsonUtil/json/a.json
@@ -0,0 +1,12 @@
+{
+ "address": {
+ "streetAddress": "21 2nd Street",
+ "city": "New York"
+ },
+ "phoneNumber": [
+ {
+ "location": "home",
+ "code": 44
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/resources/jsonUtil/json/a_invalid.json b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/resources/jsonUtil/json/a_invalid.json
new file mode 100644
index 0000000000..8a02522ea9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/resources/jsonUtil/json/a_invalid.json
@@ -0,0 +1,13 @@
+{
+ "address": {
+ "streetAddress": "21 2nd Street",
+ "city": "Paris"
+ },
+ "phoneNumber": [
+ {
+ "location": "home",
+ "code": "test"
+ }
+ ],
+ "cityOfBirth": "Paris"
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/resources/jsonUtil/json_schema/aSchema.json b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/resources/jsonUtil/json_schema/aSchema.json
new file mode 100644
index 0000000000..a77e38df87
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/resources/jsonUtil/json_schema/aSchema.json
@@ -0,0 +1,60 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "definitions": {
+ "city": {
+ "type": "string",
+ "enum": [
+ "Tel Aviv",
+ "New York",
+ "London"
+ ]
+ }
+ },
+ "properties": {
+ "address": {
+ "type": "object",
+ "properties": {
+ "streetAddress": {
+ "type": "string"
+ },
+ "city": {
+ "$ref": "#/definitions/city"
+ }
+ },
+ "enum": [
+ {
+ "streetAddress": "21 2nd Street",
+ "city": "New York"
+ }
+ ],
+ "required": [
+ "streetAddress",
+ "city"
+ ]
+ },
+ "phoneNumber": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "location": {
+ "type": "string"
+ },
+ "code": {
+ "type": "integer"
+ }
+ },
+ "required": [
+ "location",
+ "code"
+ ]
+ }
+ },
+ "cityOfBirth" : { "$ref" : "#/definitions/city"}
+ },
+ "required": [
+ "address",
+ "phoneNumber"
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/resources/jsonUtil/json_schema/nicSchema.json b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/resources/jsonUtil/json_schema/nicSchema.json
new file mode 100644
index 0000000000..d96de6aa31
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/resources/jsonUtil/json_schema/nicSchema.json
@@ -0,0 +1,118 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "properties": {
+ "protocols": {
+ "type": "object",
+ "properties": {
+ "protocols": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": [
+ "TCP",
+ "UDP",
+ "SCTP",
+ "IPsec"
+ ]
+ },
+ "minItems": 1
+ },
+ "protocolWithHighestTrafficProfile": {
+ "$ref": "#/properties/protocols/properties/protocols/items"
+ }
+ },
+ "additionalProperties": false
+ },
+ "ipConfiguration": {
+ "type": "object",
+ "properties": {
+ "ipv4Required": {
+ "type": "boolean",
+ "default": true
+ },
+ "ipv6Required": {
+ "type": "boolean",
+ "default": false
+ }
+ },
+ "additionalProperties": false
+ },
+ "network": {
+ "type": "object",
+ "properties": {
+ "networkDescription": {
+ "type": "string",
+ "pattern": "[A-Za-z]+",
+ "maxLength": 300
+ }
+ },
+ "additionalProperties": false
+ },
+ "sizing": {
+ "type": "object",
+ "definitions": {
+ "peakAndAvg": {
+ "type": "object",
+ "properties": {
+ "peak": {
+ "type": "number"
+ },
+ "avg": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ "packetsAndBytes": {
+ "type": "object",
+ "properties": {
+ "packets": {
+ "$ref": "#/properties/sizing/definitions/peakAndAvg"
+ },
+ "bytes": {
+ "$ref": "#/properties/sizing/definitions/peakAndAvg"
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "properties": {
+ "describeQualityOfService": {
+ "type": "string"
+ },
+ "inflowTrafficPerSecond": {
+ "$ref": "#/properties/sizing/definitions/packetsAndBytes"
+ },
+ "outflowTrafficPerSecond": {
+ "$ref": "#/properties/sizing/definitions/packetsAndBytes"
+ },
+ "flowLength": {
+ "$ref": "#/properties/sizing/definitions/packetsAndBytes"
+ },
+ "acceptableJitter": {
+ "type": "object",
+ "properties": {
+ "mean": {
+ "type": "number"
+ },
+ "max": {
+ "type": "number"
+ },
+ "variable": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ "acceptablePacketLoss": {
+ "type": "number",
+ "minimum": 0,
+ "maximum": 100
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "additionalProperties": false
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/resources/jsonUtil/json_schema/schemaWithInvalidDefault.json b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/resources/jsonUtil/json_schema/schemaWithInvalidDefault.json
new file mode 100644
index 0000000000..100d17f48e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/resources/jsonUtil/json_schema/schemaWithInvalidDefault.json
@@ -0,0 +1,67 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "definitions": {
+ "city": {
+ "type": "string",
+ "enum": [
+ "Tel Aviv",
+ "New York",
+ "London"
+ ],
+ "default": "Tel Aviv"
+ }
+ },
+ "type": "object",
+ "properties": {
+ "address": {
+ "type": "object",
+ "properties": {
+ "streetAddress": {
+ "type": "string",
+ "default" : 7
+ },
+ "city": {
+ "$ref": "#/definitions/city"
+ }
+ },
+ "required": [
+ "streetAddress",
+ "city"
+ ]
+ },
+ "phoneNumber": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "location": {
+ "type": "string"
+ },
+ "code": {
+ "type": "integer",
+ "default": 777
+ }
+ },
+ "required": [
+ "location",
+ "code"
+ ]
+ },
+ "default": [
+ {
+ "location": "Home",
+ "code": 1
+ },
+ {
+ "location": "Office",
+ "code": 2
+ }
+ ]
+ },
+ "cityOfBirth" : { "$ref" : "#/definitions/city"}
+ },
+ "required": [
+ "address",
+ "phoneNumber"
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/resources/jsonUtil/json_schema/schemaWithRefsAndDefaults.json b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/resources/jsonUtil/json_schema/schemaWithRefsAndDefaults.json
new file mode 100644
index 0000000000..de027b9d56
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/test/resources/jsonUtil/json_schema/schemaWithRefsAndDefaults.json
@@ -0,0 +1,71 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "definitions": {
+ "city": {
+ "type": "string",
+ "enum": [
+ "Tel Aviv",
+ "New York",
+ "London"
+ ],
+ "default": "Tel Aviv"
+ },
+ "zipCode" : {
+ "type" : "integer"
+ }
+ },
+ "type": "object",
+ "properties": {
+ "address": {
+ "type": "object",
+ "properties": {
+ "streetAddress": {
+ "type": "string"
+ },
+ "city": {
+ "$ref": "#/definitions/city"
+ },
+ "cityZipCode" : {"$ref" : "#/definitions/zipCode"}
+ },
+ "required": [
+ "streetAddress",
+ "city"
+ ]
+ },
+ "phoneNumber": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "location": {
+ "type": "string"
+ },
+ "locationZipCode" : {"$ref" : "#/definitions/zipCode"},
+ "code": {
+ "type": "integer",
+ "default": 777
+ }
+ },
+ "required": [
+ "location",
+ "code"
+ ]
+ },
+ "default": [
+ {
+ "location": "Home",
+ "code": 1
+ },
+ {
+ "location": "Office",
+ "code": 2
+ }
+ ]
+ },
+ "cityOfBirth" : { "$ref" : "#/definitions/city"}
+ },
+ "required": [
+ "address",
+ "phoneNumber"
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-core-lib/pom.xml b/openecomp-be/lib/openecomp-core-lib/pom.xml
new file mode 100644
index 0000000000..312b085424
--- /dev/null
+++ b/openecomp-be/lib/openecomp-core-lib/pom.xml
@@ -0,0 +1,23 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <groupId>org.openecomp.sdc</groupId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-core-lib</artifactId>
+ <name>openecomp-core-lib</name>
+
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>/openecomp-facade-lib</module>
+ <module>/openecomp-nosqldb-lib</module>
+ <module>/openecomp-utilities-lib</module>
+ <module>/openecomp-config-lib</module>
+ </modules>
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-heat-lib/pom.xml b/openecomp-be/lib/openecomp-heat-lib/pom.xml
new file mode 100644
index 0000000000..47c7c728a0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/pom.xml
@@ -0,0 +1,59 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+
+ <parent>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <groupId>org.openecomp.sdc</groupId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>openecomp-heat-lib</artifactId>
+ <groupId>org.openecomp.core</groupId>
+ <name>openecomp-heat-lib</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.yaml</groupId>
+ <artifactId>snakeyaml</artifactId>
+ <version>1.17</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-utilities-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-datatypes-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-common-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <version>1.1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>RELEASE</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-validation-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+
+
+
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/DefinedHeatParameterTypes.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/DefinedHeatParameterTypes.java
new file mode 100644
index 0000000000..62364e7a11
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/DefinedHeatParameterTypes.java
@@ -0,0 +1,110 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes;
+
+import org.apache.commons.lang.math.NumberUtils;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+public enum DefinedHeatParameterTypes {
+ NUMBER("number"),
+ STRING("string"),
+ COMMA_DELIMITED_LIST("comma_delimited_list"),
+ JSON("json"),
+ BOOLEAN("boolean");
+ // TODO : ASK SEGEV ABOUT STRING
+
+ private static Map<String, DefinedHeatParameterTypes> stringToDefinedType = new HashMap<>();
+
+ static {
+ stringToDefinedType = new HashMap<>();
+ for (DefinedHeatParameterTypes definedHeatParameterType : DefinedHeatParameterTypes.values()) {
+ stringToDefinedType.put(definedHeatParameterType.type, definedHeatParameterType);
+ }
+ }
+
+ private String type;
+
+ DefinedHeatParameterTypes(String type) {
+ this.type = type;
+ }
+
+ public static DefinedHeatParameterTypes findByHeatResource(String type) {
+ return stringToDefinedType.get(type);
+ }
+
+ /**
+ * Is value is from given type boolean.
+ *
+ * @param value the value
+ * @param parameterType the parameter type
+ * @return the boolean
+ */
+ public static boolean isValueIsFromGivenType(Object value, String parameterType) {
+ DefinedHeatParameterTypes definedType = findByHeatResource(parameterType);
+
+ if (Objects.nonNull(definedType)) {
+ switch (definedType) {
+ case NUMBER:
+ return NumberUtils.isNumber(String.valueOf(value));
+
+ case BOOLEAN:
+ return HeatBoolean.isValueBoolean(value);
+
+ case COMMA_DELIMITED_LIST:
+ String valAsString = String.valueOf(value);
+ return valAsString.split(",") instanceof String[];
+
+ case JSON:
+ return (value instanceof Map) || (value instanceof List);
+
+ case STRING:
+ //return value instanceof String;
+ return true;
+
+ default:
+ // return false;
+ }
+ }
+
+ return false;
+ }
+
+ public static boolean isNovaServerEnvValueIsFromRightType(Object value) {
+ return isValueIsFromGivenType(value, COMMA_DELIMITED_LIST.getType())
+ || isValueIsFromGivenType(value, STRING.getType());
+ }
+
+ public static boolean isEmptyValueInEnv(Object value) {
+ return Objects.isNull(value);
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/HeatBoolean.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/HeatBoolean.java
new file mode 100644
index 0000000000..249dcaf4a5
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/HeatBoolean.java
@@ -0,0 +1,96 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes;
+
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+import org.openecomp.sdc.common.errors.ErrorCode;
+import org.openecomp.sdc.heat.services.ErrorCodes;
+
+import java.util.HashSet;
+import java.util.Set;
+
+public class HeatBoolean {
+
+ private static Set<Object> heatFalse;
+ private static Set<Object> heatTrue;
+
+ static {
+
+
+ heatFalse = new HashSet<>();
+ heatFalse.add("f");
+ heatFalse.add(false);
+ heatFalse.add("false");
+ heatFalse.add("off");
+ heatFalse.add("n");
+ heatFalse.add("no");
+ heatFalse.add(0);
+
+ heatTrue = new HashSet<>();
+ heatTrue.add("t");
+ heatTrue.add(true);
+ heatTrue.add("true");
+ heatTrue.add("on");
+ heatTrue.add("y");
+ heatTrue.add("yes");
+ heatTrue.add(1);
+
+ }
+
+ /**
+ * Eval boolean.
+ *
+ * @param value the value
+ * @return the boolean
+ */
+ public static Boolean eval(Object value) {
+
+ if (value instanceof String) {
+ value = (String) ((String) value).toLowerCase();
+ }
+ if (heatFalse.contains(value)) {
+ return false;
+ } else if (heatTrue.contains(value)) {
+ return true;
+ } else {
+ throw new CoreException((new ErrorCode.ErrorCodeBuilder()).withId(ErrorCodes.INVALID_BOOLEAN)
+ .withCategory(ErrorCategory.APPLICATION)
+ .withMessage("Invalid boolean value [" + value + "].").build());
+ }
+
+ }
+
+ /**
+ * Is value boolean boolean.
+ *
+ * @param value the value
+ * @return the boolean
+ */
+ public static boolean isValueBoolean(Object value) {
+ try {
+ Boolean answer = eval(value);
+ return true;
+ } catch (CoreException ce) {
+ return false;
+ }
+ }
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/manifest/FileData.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/manifest/FileData.java
new file mode 100644
index 0000000000..728b714868
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/manifest/FileData.java
@@ -0,0 +1,107 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes.manifest;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.function.Predicate;
+
+public class FileData {
+
+ public static Set<Type> heatFileTypes =
+ new HashSet<>(Arrays.asList(Type.HEAT, Type.HEAT_NET, Type.HEAT_VOL));
+ private Boolean isBase;
+ private String file;
+ private Type type;
+ private List<FileData> data;
+
+ public static Predicate<FileData> buildFileDataPredicateByType(Type... types) {
+ return fileData -> Arrays.asList(types).contains(fileData.getType());
+ }
+
+ public static boolean isHeatFile(Type type) {
+ return heatFileTypes.contains(type);
+ }
+
+ public Boolean getBase() {
+ return isBase;
+ }
+
+ public void setBase(Boolean base) {
+ isBase = base;
+ }
+
+ public String getFile() {
+ return file;
+ }
+
+ public void setFile(String file) {
+ this.file = file;
+ }
+
+ public Type getType() {
+ return type;
+ }
+
+ public void setType(Type type) {
+ this.type = type;
+ }
+
+ public List<FileData> getData() {
+ return data;
+ }
+
+ public void setData(List<FileData> data) {
+ this.data = data;
+ }
+
+ public enum Type {
+
+ HEAT("HEAT"),
+ HEAT_ENV("HEAT_ENV"),
+ HEAT_NET("HEAT_NET"),
+ HEAT_VOL("HEAT_VOL"),
+ CHEF("CHEF"),
+ PUPPET("PUPPET"),
+ SHELL("SHELL"),
+ YANG("YANG"),
+ YANG_XML("YANG_XML"),
+ BPEL("BPEL"),
+ DG_XML("DG_XML"),
+ MURANO_PKG("MURANO_PKG"),
+ VENDOR_LICENSE("VENDOR_LICENSE"),
+ VF_LICENSE("VF_LICENSE"),
+ OTHER("OTHER");
+
+ private String displayName;
+
+ Type(String displayName) {
+ this.displayName = displayName;
+ }
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+ }
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/manifest/ManifestContent.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/manifest/ManifestContent.java
new file mode 100644
index 0000000000..d89717125a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/manifest/ManifestContent.java
@@ -0,0 +1,63 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes.manifest;
+
+import java.util.List;
+
+public class ManifestContent {
+
+ String name;
+ String description;
+ String version;
+ List<FileData> data;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public List<FileData> getData() {
+ return data;
+ }
+
+ public void setData(List<FileData> data) {
+ this.data = data;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/manifest/ManifestFile.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/manifest/ManifestFile.java
new file mode 100644
index 0000000000..607f52a86d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/manifest/ManifestFile.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes.manifest;
+
+public class ManifestFile {
+
+ String name;
+ ManifestContent content;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public ManifestContent getContent() {
+ return content;
+ }
+
+ public void setContent(ManifestContent content) {
+ this.content = content;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/Constraint.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/Constraint.java
new file mode 100644
index 0000000000..8aad825055
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/Constraint.java
@@ -0,0 +1,78 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class Constraint {
+ private Object[] length;
+ private Integer[] range;
+ private List<Object> valid_values;
+ private String pattern;
+
+ public Constraint() {
+ }
+
+ public Integer[] getRange() {
+ return range;
+ }
+
+ public void setRange(Integer[] inRange) {
+ this.range = new Integer[]{inRange[0], inRange[1]};
+ }
+
+ public List<Object> getValid_values() {
+ return valid_values;
+ }
+
+ public void setValid_values(List<Object> validValues) {
+ this.valid_values = validValues;
+ }
+
+ /**
+ * Add valid value.
+ *
+ * @param validValue the valid value
+ */
+ public void addValidValue(Object validValue) {
+ if (this.valid_values == null) {
+ this.valid_values = new ArrayList<>();
+ }
+ valid_values.add(validValue);
+ }
+
+ public Object[] getLength() {
+ return length;
+ }
+
+ public void setLength(Object[] length) {
+ this.length = length;
+ }
+
+ public String getPattern() {
+ return pattern;
+ }
+
+ public void setPattern(String pattern) {
+ this.pattern = pattern;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/Environment.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/Environment.java
new file mode 100644
index 0000000000..b2f45d06d9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/Environment.java
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes.model;
+
+import java.util.Map;
+
+public class Environment {
+ Map<String, Object> parameters;
+
+ public Map<String, Object> getParameters() {
+ return parameters;
+ }
+
+ public void setParameters(Map<String, Object> parameters) {
+ this.parameters = parameters;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/GroupTypeValues.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/GroupTypeValues.java
new file mode 100644
index 0000000000..84259b1807
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/GroupTypeValues.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public enum GroupTypeValues {
+ EXCLUSIVITY("exclusivity"),
+ AFFINITY("affinity"),
+ DIVERSITY("diversity");
+
+ private static List<String> groupTypeAsStrings;
+
+ static {
+ groupTypeAsStrings = new ArrayList<>();
+ for (GroupTypeValues attGroupTypeValue : GroupTypeValues.values()) {
+ groupTypeAsStrings.add(attGroupTypeValue.groupTypeValue);
+ }
+ }
+
+ private String groupTypeValue;
+
+ GroupTypeValues(String groupTypeValue) {
+ this.groupTypeValue = groupTypeValue;
+ }
+
+ public static boolean isGroupTypeValid(String groupType) {
+ return groupTypeAsStrings.contains(groupType);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/HeatOrchestrationTemplate.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/HeatOrchestrationTemplate.java
new file mode 100644
index 0000000000..4170d35d7a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/HeatOrchestrationTemplate.java
@@ -0,0 +1,90 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes.model;
+
+import java.util.List;
+import java.util.Map;
+
+public class HeatOrchestrationTemplate {
+ String heat_template_version;
+ String description;
+ List<ParameterGroup> parameter_groups;
+ Map<String, Parameter> parameters;
+ Map<String, Resource> resources;
+ Map<String, Output> outputs;
+ Map<String, Object> conditions;
+
+ public String getHeat_template_version() {
+ return heat_template_version;
+ }
+
+ public void setHeat_template_version(String heatTemplateVersion) {
+ this.heat_template_version = heatTemplateVersion;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public List<ParameterGroup> getParameter_groups() {
+ return parameter_groups;
+ }
+
+ public void setParameter_groups(List<ParameterGroup> parameterGroups) {
+ this.parameter_groups = parameterGroups;
+ }
+
+ public Map<String, Parameter> getParameters() {
+ return parameters;
+ }
+
+ public void setParameters(Map<String, Parameter> parameters) {
+ this.parameters = parameters;
+ }
+
+ public Map<String, Resource> getResources() {
+ return resources;
+ }
+
+ public void setResources(Map<String, Resource> resources) {
+ this.resources = resources;
+ }
+
+ public Map<String, Output> getOutputs() {
+ return outputs;
+ }
+
+ public void setOutputs(Map<String, Output> outputs) {
+ this.outputs = outputs;
+ }
+
+ public Map<String, Object> getConditions() {
+ return conditions;
+ }
+
+ public void setConditions(Map<String, Object> conditions) {
+ this.conditions = conditions;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/HeatPseudoParameters.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/HeatPseudoParameters.java
new file mode 100644
index 0000000000..c822a78a93
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/HeatPseudoParameters.java
@@ -0,0 +1,61 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public enum HeatPseudoParameters {
+ OS_STACK_NAME("OS::stack_name"),
+ OS_STACK_ID("OS::stack_id"),
+ OS_PROJECT_ID("OS::project_id");
+
+ private static List<String> pseudoParameterNames;
+
+ static {
+ pseudoParameterNames = new ArrayList<>();
+ for (HeatPseudoParameters parameter : HeatPseudoParameters.values()) {
+ pseudoParameterNames.add(parameter.getPseudoParameter());
+ }
+ }
+
+ private String pseudoParameter;
+
+ HeatPseudoParameters(String pseudoParameter) {
+ this.pseudoParameter = pseudoParameter;
+ }
+
+ public static List<String> getPseudoParameterNames() {
+ return pseudoParameterNames;
+ }
+
+ public static void setPseudoParameterNames(List<String> pseudoParameterNames) {
+ HeatPseudoParameters.pseudoParameterNames = pseudoParameterNames;
+ }
+
+ public String getPseudoParameter() {
+ return pseudoParameter;
+ }
+
+ public void setPseudoParameter(String pseudoParameter) {
+ this.pseudoParameter = pseudoParameter;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/HeatResourcesTypes.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/HeatResourcesTypes.java
new file mode 100644
index 0000000000..d4adfe7d32
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/HeatResourcesTypes.java
@@ -0,0 +1,206 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes.model;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * The enum Heat resources types.
+ */
+public enum HeatResourcesTypes {
+ /**
+ * Nova server resource type heat resources types.
+ */
+ NOVA_SERVER_RESOURCE_TYPE("OS::Nova::Server"),
+ /**
+ * Nova server group resource type heat resources types.
+ */
+ NOVA_SERVER_GROUP_RESOURCE_TYPE("OS::Nova::ServerGroup"),
+ /**
+ * Neutron port resource type heat resources types.
+ */
+ NEUTRON_PORT_RESOURCE_TYPE("OS::Neutron::Port"),
+ /**
+ * Contrail network rule resource type heat resources types.
+ */
+ CONTRAIL_NETWORK_RULE_RESOURCE_TYPE("OS::Contrail::NetworkPolicy"),
+ /**
+ * Contrail network attach rule resource type heat resources types.
+ */
+ CONTRAIL_NETWORK_ATTACH_RULE_RESOURCE_TYPE("OS::Contrail::AttachPolicy"),
+ /**
+ * Contrail virtual network resource type heat resources types.
+ */
+ CONTRAIL_VIRTUAL_NETWORK_RESOURCE_TYPE("OS::Contrail::VirtualNetwork"),
+ /**
+ * Cinder volume resource type heat resources types.
+ */
+ CINDER_VOLUME_RESOURCE_TYPE("OS::Cinder::Volume"),
+ /**
+ * Cinder volume attachment resource type heat resources types.
+ */
+ CINDER_VOLUME_ATTACHMENT_RESOURCE_TYPE("OS::Cinder::VolumeAttachment"),
+ /**
+ * Neutron net resource type heat resources types.
+ */
+ NEUTRON_NET_RESOURCE_TYPE("OS::Neutron::Net"),
+ /**
+ * Neutron subnet resource type heat resources types.
+ */
+ NEUTRON_SUBNET_RESOURCE_TYPE("OS::Neutron::Subnet"),
+ /**
+ * Neutron security group resource type heat resources types.
+ */
+ NEUTRON_SECURITY_GROUP_RESOURCE_TYPE("OS::Neutron::SecurityGroup"),
+ /**
+ * Heat software config type heat resources types.
+ */
+ HEAT_SOFTWARE_CONFIG_TYPE("OS::Heat::SoftwareConfig"),
+ /**
+ * Heat cloud config type heat resources types.
+ */
+ HEAT_CLOUD_CONFIG_TYPE("OS::Heat::CloudConfig"),
+ /**
+ * Heat multipart mime type heat resources types.
+ */
+ HEAT_MULTIPART_MIME_TYPE("OS::Heat::MultipartMime"),
+ /**
+ * Heat contrail network ipam type heat resources types.
+ */
+ HEAT_CONTRAIL_NETWORK_IPAM_TYPE("OS::Contrail::NetworkIpam"),
+ /**
+ * Contrail v 2 virtual network resource type heat resources types.
+ */
+ CONTRAIL_V2_VIRTUAL_NETWORK_RESOURCE_TYPE("OS::ContrailV2::VirtualNetwork"),
+ /**
+ * Contrail v 2 virtual machine interface resource type heat resources types.
+ */
+ CONTRAIL_V2_VIRTUAL_MACHINE_INTERFACE_RESOURCE_TYPE("OS::ContrailV2::VirtualMachineInterface"),
+ /**
+ * Contrail service template heat resources types.
+ */
+ CONTRAIL_SERVICE_TEMPLATE("OS::Contrail::ServiceTemplate"),
+ /**
+ * Contrail service instance heat resources types.
+ */
+ CONTRAIL_SERVICE_INSTANCE("OS::Contrail::ServiceInstance"),
+ /**
+ * Contrail v 2 network rule resource type heat resources types.
+ */
+ CONTRAIL_V2_NETWORK_RULE_RESOURCE_TYPE("OS::ContrailV2::NetworkPolicy"),
+ /**
+ * Resource group resource type heat resources types.
+ */
+ RESOURCE_GROUP_RESOURCE_TYPE("OS::Heat::ResourceGroup");
+
+ private static Map<String, HeatResourcesTypes> stringToHeatResourceTypeMap;
+
+ static {
+ stringToHeatResourceTypeMap = new HashMap<>();
+
+ for (HeatResourcesTypes type : HeatResourcesTypes.values()) {
+ stringToHeatResourceTypeMap.put(type.heatResource, type);
+ }
+ }
+
+ private String heatResource;
+
+
+ HeatResourcesTypes(String heatResource) {
+ this.heatResource = heatResource;
+ }
+
+ /**
+ * Find by heat resource heat resources types.
+ *
+ * @param heatResource the heat resource
+ * @return the heat resources types
+ */
+ public static HeatResourcesTypes findByHeatResource(String heatResource) {
+ return stringToHeatResourceTypeMap.get(heatResource);
+ }
+
+ /**
+ * Is resource type valid boolean.
+ *
+ * @param resourceType the resource type
+ * @return the boolean
+ */
+ public static boolean isResourceTypeValid(String resourceType) {
+ return Objects.nonNull(findByHeatResource(resourceType));
+ }
+
+ /**
+ * Is resource expected to be exposed boolean.
+ *
+ * @param resourceType the resource type
+ * @return the boolean
+ */
+ public static boolean isResourceExpectedToBeExposed(String resourceType) {
+ return (resourceType.equals(NOVA_SERVER_GROUP_RESOURCE_TYPE.getHeatResource())
+ || resourceType.equals(CONTRAIL_VIRTUAL_NETWORK_RESOURCE_TYPE.getHeatResource())
+ || resourceType.equals(NEUTRON_NET_RESOURCE_TYPE.getHeatResource())
+ || resourceType.equals(CINDER_VOLUME_RESOURCE_TYPE.getHeatResource())
+ || resourceType.equals(NEUTRON_SECURITY_GROUP_RESOURCE_TYPE.getHeatResource())
+ );
+ }
+
+ /**
+ * Gets list for resource type.
+ *
+ * @param types the types
+ * @return the list for resource type
+ */
+ public static Map<HeatResourcesTypes, List<String>> getListForResourceType(
+ HeatResourcesTypes... types) {
+ Map<HeatResourcesTypes, List<String>> result = new HashMap<>();
+
+ for (HeatResourcesTypes type : types) {
+ result.put(type, new ArrayList<>());
+ }
+
+ return result;
+ }
+
+ /**
+ * Gets heat resource.
+ *
+ * @return the heat resource
+ */
+ public String getHeatResource() {
+
+ return heatResource;
+ }
+
+ /**
+ * Sets heat resource.
+ *
+ * @param heatResource the heat resource
+ */
+ public void setHeatResource(String heatResource) {
+ this.heatResource = heatResource;
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/Output.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/Output.java
new file mode 100644
index 0000000000..8222edded2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/Output.java
@@ -0,0 +1,42 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes.model;
+
+public class Output {
+ String description;
+ Object value;
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public void setValue(Object value) {
+ this.value = value;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/Parameter.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/Parameter.java
new file mode 100644
index 0000000000..63681cc80c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/Parameter.java
@@ -0,0 +1,90 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes.model;
+
+import java.util.List;
+import java.util.Map;
+
+public class Parameter {
+ String type;
+ String label;
+ String description;
+ Object _default;
+ boolean hidden;
+ List<Map<String, Object>> constraints;
+ boolean immutable;
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getLabel() {
+ return label;
+ }
+
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Object get_default() {
+ return _default;
+ }
+
+ public void set_default(Object defaultValue) {
+ this._default = defaultValue;
+ }
+
+ public boolean isHidden() {
+ return hidden;
+ }
+
+ public void setHidden(boolean hidden) {
+ this.hidden = hidden;
+ }
+
+ public List<Map<String, Object>> getConstraints() {
+ return constraints;
+ }
+
+ public void setConstraints(List<Map<String, Object>> constraints) {
+ this.constraints = constraints;
+ }
+
+ public boolean isImmutable() {
+ return immutable;
+ }
+
+ public void setImmutable(boolean immutable) {
+ this.immutable = immutable;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/ParameterGroup.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/ParameterGroup.java
new file mode 100644
index 0000000000..8ab066f4a4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/ParameterGroup.java
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes.model;
+
+import java.util.List;
+
+public class ParameterGroup {
+ String label;
+ String description;
+ List<String> parameters;
+
+ public String getLabel() {
+ return label;
+ }
+
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public List<String> getParameters() {
+ return parameters;
+ }
+
+ public void setParameters(List<String> parameters) {
+ this.parameters = parameters;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/ParameterType.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/ParameterType.java
new file mode 100644
index 0000000000..37c430ec36
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/ParameterType.java
@@ -0,0 +1,42 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes.model;
+
+public enum ParameterType {
+
+ STRING("string"),
+ NUMBER("number"),
+ JSON("json"),
+ BOOLEAN("boolean"),
+ COMMA_DELIMITED_LIST("comma_delimited_list");
+
+ private String displayName;
+
+ ParameterType(String displayName) {
+ this.displayName = displayName;
+ }
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/PolicyTypes.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/PolicyTypes.java
new file mode 100644
index 0000000000..3195e61fe5
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/PolicyTypes.java
@@ -0,0 +1,61 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes.model;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+public enum PolicyTypes {
+ AFFINITY("affinity"),
+ ANTI_AFFINITY("anti-affinity");
+
+ private static Map<String, PolicyTypes> stringToPolicyTypesMap;
+
+ static {
+ stringToPolicyTypesMap = new HashMap<>();
+ for (PolicyTypes type : PolicyTypes.values()) {
+ stringToPolicyTypesMap.put(type.policy, type);
+ }
+ }
+
+ private String policy;
+
+ PolicyTypes(String policy) {
+ this.policy = policy;
+ }
+
+ public static PolicyTypes findByPolicy(String policy) {
+ return stringToPolicyTypesMap.get(policy);
+ }
+
+ public static boolean isGivenPolicyValid(String policyToCheck) {
+ return Objects.nonNull(findByPolicy(policyToCheck));
+ }
+
+ public String getPolicy() {
+ return policy;
+ }
+
+ public void setPolicy(String policy) {
+ this.policy = policy;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/PropertiesMapKeyTypes.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/PropertiesMapKeyTypes.java
new file mode 100644
index 0000000000..e8d43fc10c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/PropertiesMapKeyTypes.java
@@ -0,0 +1,42 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes.model;
+
+public enum PropertiesMapKeyTypes {
+ IMAGE("image"),
+ FLAVOR("flavor"),
+ NETWORKS("networks"),
+ RESOURCE_DEF("resource_def");
+
+ private String keyMap;
+
+ PropertiesMapKeyTypes(String keyMap) {
+ this.keyMap = keyMap;
+ }
+
+ public String getKeyMap() {
+ return keyMap;
+ }
+
+ public void setKeyMap(String keyMap) {
+ this.keyMap = keyMap;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/Resource.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/Resource.java
new file mode 100644
index 0000000000..f4c3cd91cb
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/Resource.java
@@ -0,0 +1,92 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes.model;
+
+import java.util.Map;
+
+public class Resource {
+ String type;
+ Map<String, Object> properties;
+ Object metadata;
+ Object depends_on;
+ Object update_policy;
+ Object deletion_policy;
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public Map<String, Object> getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Map<String, Object> properties) {
+ this.properties = properties;
+ }
+
+ public Object getMetadata() {
+ return metadata;
+ }
+
+ public void setMetadata(Object metadata) {
+ this.metadata = metadata;
+ }
+
+ public Object getDepends_on() {
+ return depends_on;
+ }
+
+ public void setDepends_on(Object dependsOn) {
+ this.depends_on = dependsOn;
+ }
+
+ public Object getUpdate_policy() {
+ return update_policy;
+ }
+
+ public void setUpdate_policy(Object updatePolicy) {
+ this.update_policy = updatePolicy;
+ }
+
+ public Object getDeletion_policy() {
+ return deletion_policy;
+ }
+
+ public void setDeletion_policy(Object deletionPolicy) {
+ this.deletion_policy = deletionPolicy;
+ }
+
+ @Override
+ public String toString() {
+ return "Resource{"
+ + "type='" + type + '\''
+ + ", properties=" + properties
+ + ", metadata=" + metadata
+ + ", depends_on=" + depends_on
+ + ", update_policy='" + update_policy + '\''
+ + ", deletion_policy='" + deletion_policy + '\''
+ + '}';
+ }
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/ResourceReferenceFunctions.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/ResourceReferenceFunctions.java
new file mode 100644
index 0000000000..b36d130597
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/ResourceReferenceFunctions.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes.model;
+
+public enum ResourceReferenceFunctions {
+ GET_RESOURCE("get_resource"),
+ GET_PARAM("get_param"),
+ GET_ATTR("get_attr"),
+ GET_FILE("get_file"),
+ SCHEDULER_HINTS("scheduler_hints");
+
+
+ private String function;
+
+ ResourceReferenceFunctions(String function) {
+ this.function = function;
+ }
+
+ public String getFunction() {
+ return function;
+ }
+
+ public void setFunction(String function) {
+ this.function = function;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/ResourceTypeToMessageString.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/ResourceTypeToMessageString.java
new file mode 100644
index 0000000000..d7ede70942
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/ResourceTypeToMessageString.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes.model;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum ResourceTypeToMessageString {
+ SERVER_GROUP(HeatResourcesTypes.NOVA_SERVER_GROUP_RESOURCE_TYPE, "ServerGroup"),
+ SECURITY_GROUP(HeatResourcesTypes.NEUTRON_SECURITY_GROUP_RESOURCE_TYPE, "SecurityGroup"),
+ NETWORK_POLICY(HeatResourcesTypes.CONTRAIL_NETWORK_RULE_RESOURCE_TYPE, "NetworkPolicy");
+
+ private static Map<HeatResourcesTypes, String> resourcesTypesStringMap;
+
+ static {
+ resourcesTypesStringMap = new HashMap<>();
+
+ for (ResourceTypeToMessageString resourceTypeToMessageString : ResourceTypeToMessageString
+ .values()) {
+ resourcesTypesStringMap
+ .put(resourceTypeToMessageString.type, resourceTypeToMessageString.messageString);
+ }
+ }
+
+ private String messageString;
+ private HeatResourcesTypes type;
+
+
+ ResourceTypeToMessageString(HeatResourcesTypes type, String messgageString) {
+ this.type = type;
+ this.messageString = messgageString;
+ }
+
+ public static String getTypeForMessageFromResourceType(HeatResourcesTypes type) {
+ return resourcesTypesStringMap.get(type);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/structure/Artifact.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/structure/Artifact.java
new file mode 100644
index 0000000000..b5c263f545
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/structure/Artifact.java
@@ -0,0 +1,105 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes.structure;
+
+
+import org.openecomp.sdc.datatypes.error.ErrorMessage;
+import org.openecomp.sdc.heat.datatypes.manifest.FileData;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class Artifact implements Comparable<Artifact> {
+
+ private String fileName;
+ private FileData.Type type;
+ private List<ErrorMessage> errors;
+
+ public Artifact(String fileName, FileData.Type type) {
+ this.fileName = fileName;
+ this.type = type;
+ }
+
+
+ public String getFileName() {
+ return fileName;
+ }
+
+ public void setFileName(String name) {
+ this.fileName = name;
+ }
+
+
+ public FileData.Type getType() {
+ return type;
+ }
+
+ public List<ErrorMessage> getErrors() {
+ return errors;
+ }
+
+ public void setErrors(List<ErrorMessage> errors) {
+ this.errors = errors;
+ }
+
+ /**
+ * Add error to error list.
+ *
+ * @param error the error
+ */
+ public void addErrorToErrorList(ErrorMessage error) {
+ if (this.errors == null || this.errors.isEmpty()) {
+ this.errors = new ArrayList<>();
+ }
+
+ this.errors.add(error);
+ }
+
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null || getClass() != obj.getClass()) {
+ return false;
+ }
+
+ Artifact artifact = (Artifact) obj;
+
+ if (!fileName.equals(artifact.fileName)) {
+ return false;
+ }
+ return true;
+
+ }
+
+ @Override
+ public int hashCode() {
+ int result = fileName.hashCode();
+ return result;
+ }
+
+ @Override
+ public int compareTo(Artifact artifact) {
+ return artifact.getFileName().compareTo(this.getFileName());
+ }
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/structure/HeatStructureTree.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/structure/HeatStructureTree.java
new file mode 100644
index 0000000000..c86425fd43
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/structure/HeatStructureTree.java
@@ -0,0 +1,467 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes.structure;
+
+
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.openecomp.sdc.datatypes.error.ErrorMessage;
+import org.openecomp.sdc.heat.datatypes.manifest.FileData;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import java.util.TreeSet;
+
+/**
+ * The type Heat structure tree.
+ */
+public class HeatStructureTree implements Comparable<HeatStructureTree> {
+
+ private String fileName;
+ private FileData.Type type;
+ private Boolean isBase;
+ private HeatStructureTree env;
+ private List<ErrorMessage> errors;
+ private Set<HeatStructureTree> HEAT;
+ private Set<HeatStructureTree> volume;
+ private Set<HeatStructureTree> network;
+ private Set<HeatStructureTree> nested;
+ private Set<HeatStructureTree> other;
+ private Set<Artifact> artifacts;
+
+ /**
+ * Instantiates a new Heat structure tree.
+ */
+ public HeatStructureTree() {
+ }
+
+ ;
+
+ /**
+ * Instantiates a new Heat structure tree.
+ *
+ * @param fileName the file name
+ * @param isBase the is base
+ */
+ public HeatStructureTree(String fileName, boolean isBase) {
+ setBase(isBase);
+ setFileName(fileName);
+ }
+
+ /**
+ * Gets heat structure tree by name.
+ *
+ * @param filesSet the files set
+ * @param filename the filename
+ * @return the heat structure tree by name
+ */
+ public static HeatStructureTree getHeatStructureTreeByName(Set<HeatStructureTree> filesSet,
+ String filename) {
+ for (HeatStructureTree heatStructureTree : filesSet) {
+ if (heatStructureTree.getFileName().equals(filename)) {
+ return heatStructureTree;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Sets type.
+ *
+ * @param type the type
+ */
+ public void setType(FileData.Type type) {
+ this.type = type;
+ }
+
+ /**
+ * Gets base.
+ *
+ * @return the base
+ */
+ public Boolean getBase() {
+ return isBase;
+ }
+
+ /**
+ * Sets base.
+ *
+ * @param base the base
+ */
+ public void setBase(Boolean base) {
+ isBase = base;
+ }
+
+ /**
+ * Gets file name.
+ *
+ * @return the file name
+ */
+ public String getFileName() {
+ return fileName;
+ }
+
+ /**
+ * Sets file name.
+ *
+ * @param file the file
+ */
+ public void setFileName(String file) {
+ this.fileName = file;
+ }
+
+ /**
+ * Gets heat.
+ *
+ * @return the heat
+ */
+ @JsonProperty(value = "HEAT")
+ public Set<HeatStructureTree> getHEAT() {
+ return HEAT;
+ }
+
+ /**
+ * Sets heat.
+ *
+ * @param heat the heat
+ */
+ public void setHEAT(Set<HeatStructureTree> heat) {
+ this.HEAT = heat;
+ }
+
+ /**
+ * Gets nested.
+ *
+ * @return the nested
+ */
+ public Set<HeatStructureTree> getNested() {
+ return nested;
+ }
+
+ /**
+ * Sets nested.
+ *
+ * @param nested the nested
+ */
+ public void setNested(Set<HeatStructureTree> nested) {
+ this.nested = nested;
+ }
+
+ /**
+ * Gets artifacts.
+ *
+ * @return the artifacts
+ */
+ public Set<Artifact> getArtifacts() {
+ return artifacts;
+ }
+
+ /**
+ * Sets artifacts.
+ *
+ * @param artifacts the artifacts
+ */
+ public void setArtifacts(Set<Artifact> artifacts) {
+ this.artifacts = artifacts;
+ }
+
+ /**
+ * Add heat structure tree to nested heat list.
+ *
+ * @param heatStructureTree the heat structure tree
+ */
+ public void addHeatStructureTreeToNestedHeatList(HeatStructureTree heatStructureTree) {
+ if (this.nested == null) {
+ this.nested = new TreeSet<>();
+ }
+ if (!findItemInSetByName(this.nested, heatStructureTree)) {
+ this.nested.add(heatStructureTree);
+ }
+ }
+
+ /**
+ * Add artifact to artifact list.
+ *
+ * @param artifact the artifact
+ */
+ public void addArtifactToArtifactList(Artifact artifact) {
+ if (this.artifacts == null || this.artifacts.isEmpty()) {
+ this.artifacts = new TreeSet<>();
+ }
+ this.artifacts.add(artifact);
+ }
+
+ /**
+ * Gets env.
+ *
+ * @return the env
+ */
+ public HeatStructureTree getEnv() {
+ return env;
+ }
+
+ /**
+ * Sets env.
+ *
+ * @param env the env
+ */
+ public void setEnv(HeatStructureTree env) {
+ this.env = env;
+ }
+
+ /**
+ * Gets volume.
+ *
+ * @return the volume
+ */
+ public Set<HeatStructureTree> getVolume() {
+ return volume;
+ }
+
+ /**
+ * Sets volume.
+ *
+ * @param volume the volume
+ */
+ public void setVolume(Set<HeatStructureTree> volume) {
+ this.volume = volume;
+ }
+
+ /**
+ * Gets network.
+ *
+ * @return the network
+ */
+ public Set<HeatStructureTree> getNetwork() {
+ return network;
+ }
+
+ /**
+ * Sets network.
+ *
+ * @param network the network
+ */
+ public void setNetwork(Set<HeatStructureTree> network) {
+ this.network = network;
+ }
+
+ /**
+ * Add network to network list.
+ *
+ * @param heatStructureTree the heat structure tree
+ */
+ public void addNetworkToNetworkList(HeatStructureTree heatStructureTree) {
+ if (this.network == null) {
+ this.network = new TreeSet<>();
+ }
+ if (!findItemInSetByName(this.network, heatStructureTree)) {
+ this.network.add(heatStructureTree);
+ }
+ }
+
+ /**
+ * Add volume file to volume list.
+ *
+ * @param heatStructureTree the heat structure tree
+ */
+ public void addVolumeFileToVolumeList(HeatStructureTree heatStructureTree) {
+ if (this.volume == null) {
+ this.volume = new TreeSet<>();
+ }
+ if (!findItemInSetByName(this.volume, heatStructureTree)) {
+ this.volume.add(heatStructureTree);
+ }
+ }
+
+ /**
+ * Add heat to heat list.
+ *
+ * @param heat the heat
+ */
+ public void addHeatToHEATList(HeatStructureTree heat) {
+ if (this.HEAT == null) {
+ this.HEAT = new TreeSet<>();
+ }
+
+ this.HEAT.add(heat);
+ }
+
+ /**
+ * Add other to other list.
+ *
+ * @param other the other
+ */
+ public void addOtherToOtherList(HeatStructureTree other) {
+ if (this.other == null) {
+ this.other = new TreeSet<>();
+ }
+
+ this.other.add(other);
+ }
+
+ /**
+ * Find item in set by name boolean.
+ *
+ * @param searchSet the search set
+ * @param toFind the to find
+ * @return the boolean
+ */
+ public boolean findItemInSetByName(Set<HeatStructureTree> searchSet, HeatStructureTree toFind) {
+ for (HeatStructureTree heatStructureTree : searchSet) {
+ if (heatStructureTree.getFileName().equals(toFind.getFileName())) {
+ return true;
+ }
+
+ }
+
+ return false;
+ }
+
+ /**
+ * Remove from volume or network.
+ *
+ * @param fileNameToRemove the file name to remove
+ * @param type the type
+ */
+ public void removeFromVolumeOrNetwork(String fileNameToRemove, FileData.Type type) {
+ Set<HeatStructureTree> volumeOrNetworkSet =
+ type.equals(FileData.Type.HEAT_VOL) ? this.volume : this.network;
+ HeatStructureTree toRemove = getHeatStructureTreeByName(volumeOrNetworkSet, fileNameToRemove);
+
+ volumeOrNetworkSet.remove(toRemove);
+ }
+
+ @Override
+ public boolean equals(Object other) {
+ if (this == other) {
+ return true;
+ }
+ if (other == null || getClass() != other.getClass()) {
+ return false;
+ }
+
+ HeatStructureTree heatStructureTree = (HeatStructureTree) other;
+
+ if (fileName != null ? !fileName.equals(heatStructureTree.fileName)
+ : heatStructureTree.fileName != null) {
+ return false;
+ }
+ if (env != null ? !env.equals(heatStructureTree.env) : heatStructureTree.env != null) {
+ return false;
+ }
+ if (HEAT != null ? !HEAT.equals(heatStructureTree.HEAT) : heatStructureTree.HEAT != null) {
+ return false;
+ }
+ if (volume != null ? !volume.equals(heatStructureTree.volume)
+ : heatStructureTree.volume != null) {
+ return false;
+ }
+ if (network != null ? !network.equals(heatStructureTree.network)
+ : heatStructureTree.network != null) {
+ return false;
+ }
+ if (artifacts != null ? !artifacts.equals(heatStructureTree.artifacts)
+ : heatStructureTree.artifacts != null) {
+ return false;
+ }
+ if (nested != null ? !nested.equals(heatStructureTree.nested)
+ : heatStructureTree.nested != null) {
+ return false;
+ }
+ if (errors != null ? !errors.equals(heatStructureTree.errors)
+ : heatStructureTree.errors != null) {
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result1 = fileName != null ? fileName.hashCode() : 0;
+ result1 = 31 * result1 + (env != null ? env.hashCode() : 0);
+ result1 = 31 * result1 + (HEAT != null ? HEAT.hashCode() : 0);
+ result1 = 31 * result1 + (volume != null ? volume.hashCode() : 0);
+ result1 = 31 * result1 + (network != null ? network.hashCode() : 0);
+ result1 = 31 * result1 + (artifacts != null ? artifacts.hashCode() : 0);
+ result1 = 31 * result1 + (nested != null ? nested.hashCode() : 0);
+ result1 = 31 * result1 + (errors != null ? errors.hashCode() : 0);
+
+
+ return result1;
+ }
+
+ /**
+ * Gets errors.
+ *
+ * @return the errors
+ */
+ public List<ErrorMessage> getErrors() {
+ return errors;
+ }
+
+ /**
+ * Sets errors.
+ *
+ * @param errors the errors
+ */
+ public void setErrors(List<ErrorMessage> errors) {
+ this.errors = errors;
+ }
+
+ /**
+ * Add error to errors list.
+ *
+ * @param error the error
+ */
+ public void addErrorToErrorsList(ErrorMessage error) {
+ if (this.errors == null || this.errors.isEmpty()) {
+ this.errors = new ArrayList<>();
+ }
+ if (!this.errors.contains(error)) {
+ this.errors.add(error);
+ }
+ }
+
+ /**
+ * Gets other.
+ *
+ * @return the other
+ */
+ public Set<HeatStructureTree> getOther() {
+ return other;
+ }
+
+ /**
+ * Sets other.
+ *
+ * @param other the other
+ */
+ public void setOther(Set<HeatStructureTree> other) {
+ this.other = other;
+ }
+
+ @Override
+ public int compareTo(HeatStructureTree heatStructureTree) {
+ return heatStructureTree.getFileName().compareTo(this.getFileName());
+ }
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/structure/ValidationStructureList.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/structure/ValidationStructureList.java
new file mode 100644
index 0000000000..f2acb2810d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/structure/ValidationStructureList.java
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes.structure;
+
+public class ValidationStructureList {
+ private HeatStructureTree importStructure;
+
+ public ValidationStructureList() {
+ }
+
+ public ValidationStructureList(HeatStructureTree importStructure) {
+ this.importStructure = importStructure;
+ }
+
+ public HeatStructureTree getImportStructure() {
+ return importStructure;
+ }
+
+ public void setImportStructure(HeatStructureTree importStructure) {
+ this.importStructure = importStructure;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/ErrorCodes.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/ErrorCodes.java
new file mode 100644
index 0000000000..c48d732e63
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/ErrorCodes.java
@@ -0,0 +1,25 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.services;
+
+public class ErrorCodes {
+ public static final String INVALID_BOOLEAN = "INVALID_BOOLEAN";
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/HeatConstants.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/HeatConstants.java
new file mode 100644
index 0000000000..e2afe89a06
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/HeatConstants.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.services;
+
+public class HeatConstants {
+ public static final String GET_ATT_FROM_RESOURCE_GROUP_PREFIX = "resource.";
+ public static final String RESOURCE_GROUP_INDEX_VAR_DEFAULT_VALUE = "%index%";
+
+ public static final String INDEX_PROPERTY_NAME = "index_var";
+ public static final String SERVICE_SCALING_PROPERTY_NAME = "service_scaling";
+ public static final String INSTANCE_UUID_PROPERTY_NAME = "instance_uuid";
+ public static final String VOLUME_ID_PROPERTY_NAME = "volume_id";
+ public static final String RESOURCE_DEF_PROPERTY_NAME = "resource_def";
+ public static final String SCALE_OUT_PROPERTY_NAME = "scale_out";
+
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/HeatStructureUtil.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/HeatStructureUtil.java
new file mode 100644
index 0000000000..a216b224af
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/HeatStructureUtil.java
@@ -0,0 +1,261 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.services;
+
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections4.MapUtils;
+import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder;
+import org.openecomp.core.validation.errors.Messages;
+import org.openecomp.core.validation.types.GlobalValidationContext;
+import org.openecomp.sdc.datatypes.error.ErrorLevel;
+import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
+import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes;
+import org.openecomp.sdc.heat.datatypes.model.PropertiesMapKeyTypes;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.heat.datatypes.model.ResourceReferenceFunctions;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+
+/**
+ * The type Heat structure util.
+ */
+public class HeatStructureUtil {
+
+ /**
+ * Gets nested files.
+ *
+ * @param filename the filename
+ * @param hot the hot
+ * @param globalContext the global context
+ * @return the nested files
+ */
+ public static Set<String> getNestedFiles(String filename, HeatOrchestrationTemplate hot,
+ GlobalValidationContext globalContext) {
+
+ Set<String> nestedFileList = new HashSet<>();
+ Set<String> resourceDefNestedFiles;
+ hot.getResources().values().stream().filter(
+ resource -> (resource.getType().endsWith(".yaml") || resource.getType().endsWith(".yml")))
+ .forEach(resource -> nestedFileList.add(resource.getType()));
+
+ resourceDefNestedFiles = getResourceDefNestedFiles(filename, hot, globalContext);
+ nestedFileList.addAll(resourceDefNestedFiles);
+
+ return nestedFileList;
+ }
+
+
+ private static Set<String> getResourceDefNestedFiles(String filename,
+ HeatOrchestrationTemplate hot,
+ GlobalValidationContext globalContext) {
+ Set<String> resourceDefNestedFiles = new HashSet<>();
+ hot.getResources()
+ .entrySet()
+ .stream()
+ .filter(entry -> entry.getValue().getType()
+ .equals(HeatResourcesTypes.RESOURCE_GROUP_RESOURCE_TYPE.getHeatResource()))
+ .filter(entry ->
+ getResourceDef(filename, entry.getKey(), entry.getValue(), globalContext) != null
+ && isNestedResource(
+ getResourceDef(filename, entry.getKey(), entry.getValue(), globalContext)
+ .getType()))
+ .forEach(entry -> resourceDefNestedFiles.add(
+ getResourceDef(filename, entry.getKey(), entry.getValue(), globalContext).getType()));
+
+ return resourceDefNestedFiles;
+ }
+
+
+ /**
+ * Gets resource def.
+ *
+ * @param filename the filename
+ * @param resourceName the resource name
+ * @param resource the resource
+ * @param globalContext the global context
+ * @return the resource def
+ */
+ @SuppressWarnings("unchecked")
+ public static Resource getResourceDef(String filename, String resourceName, Resource resource,
+ GlobalValidationContext globalContext) {
+ Resource resourceDef = null;
+ Map<String, Object> resourceDefValueMap = resource.getProperties() == null ? null
+ : (Map<String, Object>) resource.getProperties()
+ .get(PropertiesMapKeyTypes.RESOURCE_DEF.getKeyMap());
+ if (MapUtils.isNotEmpty(resourceDefValueMap)) {
+ Object resourceDefType = resourceDefValueMap.get("type");
+ if (Objects.nonNull(resourceDefType)) {
+ if (resourceDefType instanceof String) {
+ boolean isNested =
+ checkIfResourceGroupTypeIsNested(filename, resourceName, (String) resourceDefType,
+ globalContext);
+ if (isNested) {
+ resourceDef = new Resource();
+ resourceDef.setType((String) resourceDefType);
+ //noinspection unchecked
+ resourceDef.setProperties((Map<String, Object>) resourceDefValueMap.get("properties"));
+ }
+ } else {
+ globalContext.addMessage(filename, ErrorLevel.WARNING, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.INVALID_RESOURCE_GROUP_TYPE.getErrorMessage(),
+ resourceName, resourceDefType.toString()));
+ }
+ } else {
+ globalContext.addMessage(filename, ErrorLevel.WARNING, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.INVALID_RESOURCE_TYPE.getErrorMessage(), "null",
+ resourceName));
+ }
+
+ }
+ return resourceDef;
+ }
+
+
+ /**
+ * Check if resource group type is nested boolean.
+ *
+ * @param filename the filename
+ * @param resourceName the resource name
+ * @param resourceDefType the resource def type
+ * @param globalContext the global context
+ * @return the boolean
+ */
+ public static boolean checkIfResourceGroupTypeIsNested(String filename, String resourceName,
+ String resourceDefType,
+ GlobalValidationContext globalContext) {
+ if (!HeatStructureUtil.isNestedResource(resourceDefType)) {
+ globalContext.addMessage(filename, ErrorLevel.WARNING, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.INVALID_RESOURCE_GROUP_TYPE.getErrorMessage(),
+ resourceName, resourceDefType));
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Gets artifact files.
+ *
+ * @param filename the filename
+ * @param hot the hot
+ * @param globalContext the global context
+ * @return the artifact files
+ */
+ public static Set<String> getArtifactFiles(String filename, HeatOrchestrationTemplate hot,
+ GlobalValidationContext globalContext) {
+ Set<String> artifactSet = new HashSet<>();
+ Collection<Resource> resourcesValue =
+ hot.getResources() == null ? null : hot.getResources().values();
+ if (CollectionUtils.isNotEmpty(resourcesValue)) {
+ for (Resource resource : resourcesValue) {
+ Collection<Object> properties =
+ resource.getProperties() == null ? null : resource.getProperties().values();
+ if (CollectionUtils.isNotEmpty(properties)) {
+ for (Object property : properties) {
+ Set<String> artifactNames =
+ getReferencedValuesByFunctionName(filename, "get_file", property, globalContext);
+ artifactSet.addAll(artifactNames);
+ }
+ }
+ }
+ }
+ return artifactSet;
+ }
+
+ /**
+ * Gets referenced values by function name.
+ *
+ * @param filename the filename
+ * @param functionName the function name
+ * @param propertyValue the property value
+ * @param globalContext the global context
+ * @return the referenced values by function name
+ */
+ public static Set<String> getReferencedValuesByFunctionName(String filename, String functionName,
+ Object propertyValue,
+ GlobalValidationContext globalContext) {
+ Set<String> valuesNames = new HashSet<>();
+ if (propertyValue instanceof Map) {
+ Map<String, Object> currPropertyMap = (Map<String, Object>) propertyValue;
+ if (currPropertyMap.containsKey(functionName)) {
+ Object getFunctionValue = currPropertyMap.get(functionName);
+ if (!(getFunctionValue instanceof String)
+ && functionName.equals(ResourceReferenceFunctions.GET_RESOURCE.getFunction())) {
+ globalContext.addMessage(filename, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.INVALID_GET_RESOURCE_SYNTAX.getErrorMessage(),
+ getFunctionValue == null ? "null" : getFunctionValue.toString()));
+ return valuesNames;
+ }
+ if (getFunctionValue instanceof String) {
+
+ if (functionName.equals(ResourceReferenceFunctions.GET_FILE.getFunction())) {
+ getFunctionValue = ((String) getFunctionValue).replace("file:///", "");
+ }
+
+ valuesNames.add((String) getFunctionValue);
+ } else if (getFunctionValue instanceof List) {
+ if (CollectionUtils.isNotEmpty((List) getFunctionValue)) {
+ if (((List) getFunctionValue).get(0) instanceof String) {
+ valuesNames.add(((String) ((List) getFunctionValue).get(0)).replace("file:///", ""));
+ } else {
+ valuesNames.addAll(getReferencedValuesByFunctionName(filename, functionName,
+ ((List) getFunctionValue).get(0), globalContext));
+ }
+
+ }
+ } else {
+ valuesNames.addAll(
+ getReferencedValuesByFunctionName(filename, functionName, getFunctionValue,
+ globalContext));
+ }
+ } else {
+ for (Map.Entry<String, Object> nestedPropertyMap : currPropertyMap.entrySet()) {
+ valuesNames.addAll(getReferencedValuesByFunctionName(filename, functionName,
+ nestedPropertyMap.getValue(), globalContext));
+ }
+ }
+ } else if (propertyValue instanceof List) {
+ List propertyValueArray = (List) propertyValue;
+ for (Object propertyValueArrayInstance : propertyValueArray) {
+ valuesNames.addAll(
+ getReferencedValuesByFunctionName(filename, functionName, propertyValueArrayInstance,
+ globalContext));
+ }
+ }
+
+ return valuesNames;
+ }
+
+
+ /**
+ * Is nested resource boolean.
+ *
+ * @param resourceType the resource type
+ * @return the boolean
+ */
+ public static boolean isNestedResource(String resourceType) {
+ return resourceType.endsWith(".yaml") || resourceType.endsWith(".yml");
+ }
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/manifest/ManifestUtil.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/manifest/ManifestUtil.java
new file mode 100644
index 0000000000..09378cebf4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/manifest/ManifestUtil.java
@@ -0,0 +1,176 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.services.manifest;
+
+import org.apache.commons.collections4.CollectionUtils;
+import org.openecomp.sdc.heat.datatypes.manifest.FileData;
+import org.openecomp.sdc.heat.datatypes.manifest.ManifestContent;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+
+/**
+ * The type Manifest util.
+ */
+public class ManifestUtil {
+
+
+ /**
+ * Gets file and its env.
+ *
+ * @param manifestContent the manifest content
+ * @return the file and its env
+ */
+ public static Map<String, FileData> getFileAndItsEnv(ManifestContent manifestContent) {
+ Map<String, FileData> fileEnvMap = new HashMap<>();
+ scanFileEnvMap(null, manifestContent.getData(), fileEnvMap);
+ return fileEnvMap;
+ }
+
+
+ /**
+ * Scan file env map.
+ *
+ * @param fileData the file data
+ * @param fileDataList the file data list
+ * @param fileEnvMap the file env map
+ */
+ public static void scanFileEnvMap(FileData fileData, List<FileData> fileDataList,
+ Map<String, FileData> fileEnvMap) {
+ if (CollectionUtils.isEmpty(fileDataList)) {
+ return;
+ }
+
+ for (FileData childFileData : fileDataList) {
+ FileData.Type childType = childFileData.getType();
+ if (fileData != null) {
+ if (childType != null && childType.equals(FileData.Type.HEAT_ENV)) {
+ fileEnvMap.put(fileData.getFile(), childFileData);
+ }
+ }
+ scanFileEnvMap(childFileData, childFileData.getData(), fileEnvMap);
+ }
+ }
+
+
+ /**
+ * Gets file type map.
+ *
+ * @param manifestContent the manifest content
+ * @return the file type map
+ */
+ public static Map<String, FileData.Type> getFileTypeMap(ManifestContent manifestContent) {
+ Map<String, FileData.Type> fileTypeMap = new HashMap<>();
+ scanFileTypeMap(null, manifestContent.getData(), fileTypeMap);
+ return fileTypeMap;
+ }
+
+ private static FileData.Type scanFileTypeMap(FileData fileData, List<FileData> data,
+ Map<String, FileData.Type> fileTypeMap) {
+ if (fileData != null) {
+ fileTypeMap.put(fileData.getFile(), fileData.getType());
+ }
+ if (data == null) {
+ return null;
+ }
+
+ for (FileData chileFileData : data) {
+ FileData.Type type = scanFileTypeMap(chileFileData, chileFileData.getData(), fileTypeMap);
+ if (type != null) {
+ return type;
+ }
+ }
+ return null;
+ }
+
+
+ /**
+ * Gets artifacts.
+ *
+ * @param manifestContent the manifest content
+ * @return the artifacts
+ */
+ public static Set<String> getArtifacts(ManifestContent manifestContent) {
+ Set<String> artifacts = new HashSet<>();
+ scanArtifacts(null, manifestContent.getData(), artifacts);
+
+ return artifacts;
+ }
+
+
+ private static void scanArtifacts(FileData fileData, List<FileData> data, Set<String> artifacts) {
+ if (fileData != null && fileData.getType() != null) {
+ if (isArtifact(fileData)) {
+ artifacts.add(fileData.getFile());
+ }
+ }
+
+ if (data == null) {
+ return;
+ }
+
+ for (FileData chileFileData : data) {
+ scanArtifacts(chileFileData, chileFileData.getData(), artifacts);
+ }
+ }
+
+ private static boolean isArtifact(FileData fileData) {
+ if (FileData.Type.valueOf(fileData.getType().name()) != null
+ && !fileData.getType().equals(FileData.Type.HEAT)
+ && !fileData.getType().equals(FileData.Type.HEAT_ENV)
+ && !fileData.getType().equals(FileData.Type.HEAT_NET)
+ && !fileData.getType().equals(FileData.Type.HEAT_VOL)) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Gets base files.
+ *
+ * @param manifestContent the manifest content
+ * @return the base files
+ */
+ public static Set<String> getBaseFiles(ManifestContent manifestContent) {
+ Set<String> baseFiles = new HashSet<>();
+ scanBase(null, manifestContent.getData(), baseFiles);
+ return baseFiles;
+ }
+
+ private static void scanBase(FileData fileData, List<FileData> data, Set<String> baseFiles) {
+ if (fileData != null && fileData.getBase() != null) {
+ if (fileData.getBase()) {
+ baseFiles.add(fileData.getFile());
+ }
+ }
+ if (data == null) {
+ return;
+ }
+
+ for (FileData chileFileData : data) {
+ scanBase(chileFileData, chileFileData.getData(), baseFiles);
+ }
+ }
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/tree/HeatTreeManager.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/tree/HeatTreeManager.java
new file mode 100644
index 0000000000..71c532dbd3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/tree/HeatTreeManager.java
@@ -0,0 +1,298 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.services.tree;
+
+import org.openecomp.core.utilities.file.FileContentHandler;
+import org.openecomp.core.utilities.file.FileUtils;
+import org.openecomp.core.utilities.json.JsonUtil;
+import org.openecomp.core.utilities.yaml.YamlUtil;
+import org.openecomp.core.validation.types.GlobalValidationContext;
+import org.openecomp.sdc.common.utils.AsdcCommon;
+import org.openecomp.sdc.datatypes.error.ErrorMessage;
+import org.openecomp.sdc.heat.datatypes.manifest.FileData;
+import org.openecomp.sdc.heat.datatypes.manifest.ManifestContent;
+import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
+import org.openecomp.sdc.heat.datatypes.structure.Artifact;
+import org.openecomp.sdc.heat.datatypes.structure.HeatStructureTree;
+import org.openecomp.sdc.heat.services.HeatStructureUtil;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * The type Heat tree manager.
+ */
+public class HeatTreeManager {
+
+ private static Logger logger = LoggerFactory.getLogger(HeatTreeManager.class);
+
+
+ private FileContentHandler heatContentMap = new FileContentHandler();
+ private byte[] manifest;
+ private HeatStructureTree tree = new HeatStructureTree();
+ private Map<String, HeatStructureTree> fileTreeRef = new HashMap<>();
+ private Map<String, Artifact> artifactRef = new HashMap<>();
+ private Map<String, Artifact> candidateOrphanArtifacts = new HashMap<>();
+ private Map<String, HeatStructureTree> nestedFiles = new HashMap<>();
+ private Map<HeatStructureTree, HeatStructureTree> volumeFileToParent = new HashMap<>();
+ private Map<HeatStructureTree, HeatStructureTree> networkFileToParent = new HashMap<>();
+ private Set<String> manifestFiles = new HashSet<>();
+
+ /**
+ * Add file.
+ *
+ * @param fileName the file name
+ * @param content the content
+ */
+ public void addFile(String fileName, InputStream content) {
+ if (fileName.equals(AsdcCommon.MANIFEST_NAME)) {
+ manifest = FileUtils.toByteArray(content);
+
+ } else {
+ heatContentMap.addFile(fileName, content);
+ }
+ }
+
+ /**
+ * Create tree.
+ */
+ public void createTree() {
+ if (manifest == null) {
+ logger.error("Missing manifest file in the zip.");
+ return;
+ }
+ ManifestContent manifestData =
+ JsonUtil.json2Object(new String(manifest), ManifestContent.class);
+ scanTree(null, manifestData.getData());
+ addNonNestedVolumeNetworkToTree(volumeFileToParent, nestedFiles.keySet(), true);
+ addNonNestedVolumeNetworkToTree(networkFileToParent, nestedFiles.keySet(), false);
+ handleOrphans();
+
+ tree = fileTreeRef.get(AsdcCommon.PARENT);
+ }
+
+ private void handleOrphans() {
+ tree = fileTreeRef.get(AsdcCommon.PARENT);
+ candidateOrphanArtifacts.entrySet().stream()
+ .forEach(entry -> tree.addArtifactToArtifactList(entry.getValue()));
+ nestedFiles
+ .values()
+ .stream()
+ .filter(heatStructureTree -> tree.getHEAT().contains(heatStructureTree))
+ .forEach(heatStructureTree -> tree.getHEAT().remove(heatStructureTree));
+
+ heatContentMap.getFileList().stream().filter(fileName -> !manifestFiles.contains(fileName))
+ .forEach(fileName -> addTreeOther(fileName));
+ }
+
+ private void addTreeOther(String fileName) {
+ if (tree.getOther() == null) {
+ tree.setOther(new HashSet<>());
+ }
+ HeatStructureTree other = new HeatStructureTree(fileName, false);
+ fileTreeRef.put(fileName, other);
+ tree.getOther().add(other);
+ }
+
+
+ private void handleHeatContentReference(String filename, HeatStructureTree fileHeatStructureTree,
+ GlobalValidationContext globalContext) {
+
+ String fileName = fileHeatStructureTree.getFileName();
+ InputStream fileContent = this.heatContentMap.getFileContent(fileName);
+ if (fileContent == null) {
+ return; // file exist in manifest but does not exist in zip
+ }
+ try {
+ HeatOrchestrationTemplate hot =
+ new YamlUtil().yamlToObject(fileContent, HeatOrchestrationTemplate.class);
+
+ Set<String> nestedSet = HeatStructureUtil.getNestedFiles(filename, hot, globalContext);
+ addHeatNestedFiles(fileHeatStructureTree, nestedSet);
+
+ Set<String> artifactSet = HeatStructureUtil.getArtifactFiles(filename, hot, globalContext);
+ addHeatArtifactFiles(fileHeatStructureTree, artifactSet);
+ } catch (Exception ignore) { /* invalid yaml no need to process reference */ }
+ }
+
+ private void addHeatArtifactFiles(HeatStructureTree fileHeatStructureTree,
+ Set<String> artifactSet) {
+ Artifact artifact;
+ for (String artifactName : artifactSet) {
+ FileData.Type type =
+ candidateOrphanArtifacts.get(artifactName) != null ? candidateOrphanArtifacts
+ .get(artifactName).getType() : null;
+ artifact = new Artifact(artifactName, type);
+ artifactRef.put(artifactName, artifact);
+ candidateOrphanArtifacts.remove(artifactName);
+ fileHeatStructureTree.addArtifactToArtifactList(artifact);
+ }
+ }
+
+
+ private void addHeatNestedFiles(HeatStructureTree fileHeatStructureTree, Set<String> nestedSet) {
+ HeatStructureTree childHeatStructureTree;
+ for (String nestedName : nestedSet) {
+ childHeatStructureTree = fileTreeRef.get(nestedName);
+ if (childHeatStructureTree == null) {
+ childHeatStructureTree = new HeatStructureTree();
+ childHeatStructureTree.setFileName(nestedName);
+ fileTreeRef.put(nestedName, childHeatStructureTree);
+ }
+ fileHeatStructureTree.addHeatStructureTreeToNestedHeatList(childHeatStructureTree);
+ nestedFiles.put(childHeatStructureTree.getFileName(), childHeatStructureTree);
+ }
+ }
+
+
+ /**
+ * Add errors.
+ *
+ * @param validationErrors the validation errors
+ */
+ public void addErrors(Map<String, List<ErrorMessage>> validationErrors) {
+
+ validationErrors.entrySet().stream().filter(entry -> {
+ return fileTreeRef.get(entry.getKey()) != null;
+ }).forEach(entry -> entry.getValue().stream().forEach(error ->
+ fileTreeRef.get(entry.getKey()).addErrorToErrorsList(error)));
+
+ validationErrors.entrySet().stream().filter(entry -> {
+ return artifactRef.get(entry.getKey()) != null;
+ }).forEach(entry -> artifactRef.get(entry.getKey()).setErrors(entry.getValue()));
+
+ }
+
+ /**
+ * Scan tree.
+ *
+ * @param parent the parent
+ * @param data the data
+ */
+ public void scanTree(String parent, List<FileData> data) {
+ String fileName;
+ FileData.Type type;
+ HeatStructureTree parentHeatStructureTree;
+ HeatStructureTree fileHeatStructureTree;
+ HeatStructureTree childHeatStructureTree;
+ Artifact artifact;
+ if (parent == null) {
+ parentHeatStructureTree = new HeatStructureTree();
+ fileTreeRef.put(AsdcCommon.PARENT, parentHeatStructureTree);
+ } else {
+ parentHeatStructureTree = fileTreeRef.get(parent);
+ }
+
+ for (FileData fileData : data) {
+ fileName = fileData.getFile();
+ manifestFiles.add(fileName);
+ type = fileData.getType();
+
+ if (FileData.Type.HEAT.equals(type)) {
+ fileHeatStructureTree = fileTreeRef.get(fileName);
+ if (fileHeatStructureTree == null) {
+ fileHeatStructureTree = new HeatStructureTree();
+ fileTreeRef.put(fileName, fileHeatStructureTree);
+ }
+ fileHeatStructureTree.setFileName(fileName);
+ fileHeatStructureTree.setBase(fileData.getBase());
+ fileHeatStructureTree.setType(type);
+ handleHeatContentReference(null, fileHeatStructureTree, null);
+ parentHeatStructureTree.addHeatToHEATList(fileHeatStructureTree);
+ if (fileData.getData() != null) {
+ scanTree(fileName, fileData.getData());
+ }
+ } else {
+ childHeatStructureTree = new HeatStructureTree();
+ childHeatStructureTree.setFileName(fileName);
+ childHeatStructureTree.setBase(fileData.getBase());
+ childHeatStructureTree.setType(type);
+ fileTreeRef.put(childHeatStructureTree.getFileName(), childHeatStructureTree);
+
+ if (type == null) {
+ parentHeatStructureTree.addOtherToOtherList(childHeatStructureTree);
+ } else if (FileData.Type.HEAT_NET.equals(type)) {
+ // parentHeatStructureTree.addNetworkToNetworkList(childHeatStructureTree);
+ networkFileToParent.put(childHeatStructureTree, parentHeatStructureTree);
+ if (fileData.getData() != null) {
+ scanTree(fileName, fileData.getData());
+ }
+
+ } else if (FileData.Type.HEAT_VOL.equals(type)) {
+ // parentHeatStructureTree.addVolumeFileToVolumeList(childHeatStructureTree);
+ volumeFileToParent.put(childHeatStructureTree, parentHeatStructureTree);
+ if (fileData.getData() != null) {
+ scanTree(fileName, fileData.getData());
+ }
+ } else if (FileData.Type.HEAT_ENV.equals(type)) {
+ if (parentHeatStructureTree != null && parentHeatStructureTree.getFileName() != null) {
+ parentHeatStructureTree.setEnv(childHeatStructureTree);
+ } else {
+ if (parentHeatStructureTree.getOther() == null) {
+ parentHeatStructureTree.setOther(new HashSet<>());
+ }
+ parentHeatStructureTree.getOther().add(childHeatStructureTree);
+ }
+ } else {
+ artifact = new Artifact(fileName, type);
+ if (!artifactRef.keySet().contains(fileName)) {
+ artifactRef.put(fileName, artifact);
+ candidateOrphanArtifacts.put(fileName, artifact);
+ }
+ }
+ }
+ }
+ }
+
+
+ private void addNonNestedVolumeNetworkToTree(
+ Map<HeatStructureTree, HeatStructureTree> netVolToParent, Set<String> nestedFileNames,
+ boolean isVolume) {
+ for (Map.Entry<HeatStructureTree, HeatStructureTree> entry : netVolToParent.entrySet()) {
+ HeatStructureTree netOrVolNode = entry.getKey();
+ HeatStructureTree parent = entry.getValue();
+ if (!nestedFileNames.contains(netOrVolNode.getFileName())) {
+ if (isVolume) {
+ parent.addVolumeFileToVolumeList(netOrVolNode);
+ } else {
+ parent.addNetworkToNetworkList(netOrVolNode);
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Gets tree.
+ *
+ * @return the tree
+ */
+ public HeatStructureTree getTree() {
+ return tree;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/tree/HeatTreeManagerUtil.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/tree/HeatTreeManagerUtil.java
new file mode 100644
index 0000000000..dac7cdbbcb
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/tree/HeatTreeManagerUtil.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.services.tree;
+
+import org.openecomp.core.utilities.file.FileContentHandler;
+
+/**
+ * The type Heat tree manager util.
+ */
+public class HeatTreeManagerUtil {
+ /**
+ * Init heat tree manager heat tree manager.
+ *
+ * @param fileContentMap the file content map
+ * @return the heat tree manager
+ */
+ public static HeatTreeManager initHeatTreeManager(FileContentHandler fileContentMap) {
+
+ HeatTreeManager heatTreeManager = new HeatTreeManager();
+ fileContentMap.getFileList().stream().forEach(
+ fileName -> heatTreeManager.addFile(fileName, fileContentMap.getFileContent(fileName)));
+
+ return heatTreeManager;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/test/java/org/openecomp/sdc/heat/datatypes/model/EnvironmentTest.java b/openecomp-be/lib/openecomp-heat-lib/src/test/java/org/openecomp/sdc/heat/datatypes/model/EnvironmentTest.java
new file mode 100644
index 0000000000..2c0cf0b1aa
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/test/java/org/openecomp/sdc/heat/datatypes/model/EnvironmentTest.java
@@ -0,0 +1,38 @@
+package org.openecomp.sdc.heat.datatypes.model;
+
+import org.openecomp.core.utilities.yaml.YamlUtil;
+import org.junit.Test;
+
+import java.io.InputStream;
+
+public class EnvironmentTest {
+
+ @Test
+ public void testYamlToServiceTemplateObj() {
+ YamlUtil yamlUtil = new YamlUtil();
+ InputStream yamlFile = yamlUtil.loadYamlFileIs("/mock/model/envSettings.env");
+ Environment envVars = yamlUtil.yamlToObject(yamlFile, Environment.class);
+ envVars.toString();
+ }
+
+ @Test
+ public void test() {
+ String heatResourceName = "server_abc_0u";
+ String novaServerPrefix = "server_";
+ if (heatResourceName.startsWith(novaServerPrefix)) {
+ heatResourceName = heatResourceName.substring(novaServerPrefix.length());
+ }
+ int lastIndexOfUnderscore = heatResourceName.lastIndexOf("_");
+ if (heatResourceName.length() == lastIndexOfUnderscore) {
+ System.out.println(heatResourceName);
+ } else {
+ String heatResourceNameSuffix = heatResourceName.substring(lastIndexOfUnderscore + 1);
+ try {
+ Integer.parseInt(heatResourceNameSuffix);
+ System.out.println(heatResourceName.substring(0, lastIndexOfUnderscore));
+ } catch (NumberFormatException ignored) {
+ System.out.println(heatResourceName);
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/test/java/org/openecomp/sdc/heat/datatypes/model/HeatOrchestrationTemplateTest.java b/openecomp-be/lib/openecomp-heat-lib/src/test/java/org/openecomp/sdc/heat/datatypes/model/HeatOrchestrationTemplateTest.java
new file mode 100644
index 0000000000..09c83ca217
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/test/java/org/openecomp/sdc/heat/datatypes/model/HeatOrchestrationTemplateTest.java
@@ -0,0 +1,122 @@
+package org.openecomp.sdc.heat.datatypes.model;
+
+import org.openecomp.core.utilities.yaml.YamlUtil;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class HeatOrchestrationTemplateTest {
+
+ @Test
+ public void testYamlToServiceTemplateObj() {
+ YamlUtil yamlUtil = new YamlUtil();
+ InputStream yamlFile = yamlUtil.loadYamlFileIs("/mock/model/testHeat.yml");
+ HeatOrchestrationTemplate heatOrchestrationTemplate =
+ yamlUtil.yamlToObject(yamlFile, HeatOrchestrationTemplate.class);
+ heatOrchestrationTemplate.toString();
+ }
+
+ @Test
+ public void createHotTemplate() {
+ HeatOrchestrationTemplate template = new HeatOrchestrationTemplate();
+ template.setHeat_template_version("2016-04-14");
+ template.setDescription("test description for hot template");
+ Map<String, Parameter> params = createParameters();
+ template.setParameters(params);
+ List<ParameterGroup> parameterGroup = new ArrayList<>();
+ ParameterGroup paramsGroup = new ParameterGroup();
+ paramsGroup.setDescription("params group test description");
+ paramsGroup.setLabel("params group test label");
+ String paramName = params.get("param1").getLabel();
+ List<String> paramsNames = new ArrayList<>();
+ paramsNames.add(paramName);
+ paramsGroup.setParameters(paramsNames);
+ parameterGroup.add(paramsGroup);
+ template.setParameter_groups(parameterGroup);
+ Map<String, Object> conditions = new HashMap<>();
+ conditions.put("key1", "val1");
+ HashMap<String, Object> mapValue = new HashMap<>();
+ mapValue.put("innerKey", "innerVal");
+ conditions.put("key2", mapValue);
+ template.setConditions(conditions);
+
+ Map<String, Resource> resources = new HashMap<>();
+ Resource resource = new Resource();
+ resource.setMetadata("resource metadata");
+ resource.setType("resource type");
+ //Map<String, String> resourceProps = new ;
+ Map<String, Object> resourceProps = new HashMap<>();
+ resourceProps.put("aaa", "bbb");
+ //resourceProps.add(resourceProp);
+ resource.setProperties(resourceProps);
+ resources.put("R1", resource);
+ resource = new Resource();
+ resource.setMetadata("resource2 metadata");
+ resource.setType("resource2 type");
+ //resourceProps = new ArrayList<>();
+ resourceProps = new HashMap<>();
+ resourceProps.put("aaa2", "bbb2");
+ //resourceProps.add(resourceProp);
+ resource.setProperties(resourceProps);
+ List<String> dependsOn = new ArrayList<>();
+ dependsOn.add("R1");
+ resource.setDepends_on(dependsOn);
+ resource.setDeletion_policy("all");
+ resource.setUpdate_policy("once");
+ resources.put("R2", resource);
+ template.setResources(resources);
+
+ YamlUtil yamlUtil = new YamlUtil();
+ String yml = yamlUtil.objectToYaml(template);
+ Assert.assertNotNull(yml);
+ try {
+ HeatOrchestrationTemplate heatOrchestrationTemplate =
+ yamlUtil.yamlToObject(yml, HeatOrchestrationTemplate.class);
+ Assert.assertNotNull(heatOrchestrationTemplate);
+ } catch (Exception ignored) {
+ }
+ }
+
+ private Map<String, Parameter> createParameters() {
+ Map<String, Parameter> params = new HashMap<>();
+ Parameter param;
+ for (int i = 0; i < 2; i++) {
+ param = new Parameter();
+ param.setDescription("param " + i + " desc");
+ param.setLabel("param " + i + " label");
+ param.set_default("PARAM " + i + " default");
+ param.setHidden(i % 2 == 0);
+ param.setImmutable(i % 2 == 0);
+ param.setType(i % 2 == 0 ? ParameterType.STRING.getDisplayName()
+ : ParameterType.BOOLEAN.getDisplayName());
+ params.put("param" + i, param);
+ }
+
+ return params;
+ }
+
+ private List<Constraint> createConstraints() {
+ List<Constraint> constraints = new ArrayList<>();
+ Constraint constraint = new Constraint();
+ constraint.setLength(new Integer[]{2, 4});
+ constraints.add(constraint);
+ constraint = new Constraint();
+ constraint.setPattern("some regex");
+ constraints.add(constraint);
+ constraint = new Constraint();
+ constraint.setRange(new Integer[]{5, 8});
+ constraints.add(constraint);
+ constraint = new Constraint();
+ List<Object> validValues = new ArrayList<>();
+ validValues.add("abc");
+ validValues.add("def");
+ constraint.setValid_values(validValues);
+ constraints.add(constraint);
+ return constraints;
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/test/resources/mock/model/envSettings.env b/openecomp-be/lib/openecomp-heat-lib/src/test/resources/mock/model/envSettings.env
new file mode 100644
index 0000000000..4f5e20a55f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/test/resources/mock/model/envSettings.env
@@ -0,0 +1,36 @@
+parameters:
+ czid: RDM1
+ vf_inst_number: 01
+ admin_password: cisco123
+ vpc_vip_addr: 172.17.32.112
+ vpc_vip_gateway: 172.17.32.1
+ availability_zone: nova
+
+ instance_image_cf1: SGW_19.2.0v-CF1-ATTM1.0.1_nimbus
+ instance_image_cf2: SGW_19.2.0v-CF2-ATTM1.0.1_nimbus
+ instance_image_sf: SGW_19.2.0v-SFn-ATTM1.0.1_nimbus
+ instance_flavor_cf: m1.xlarge
+ instance_flavor_sf: m1.xlarge
+
+
+ instance_network: mns-oam_direct_net_0
+ cgw_int_di2_net: nimbus_int_sae_gw_di-2_net_0
+ cgw_gn_net: mns-gn_direct_net_0
+ cgw_cor_net: mns-cor_direct_net_0
+ cgw_sgi_protected_net: nimbus_sgi_protected_net_0
+ cgw_sgi_ims_net: nimbus_sgi_ims_net_0
+ cgw_oam_calea_net: nimbus_oam_calea_net_0
+ cgw_int_icsr_net: nimbus_int_icsr_net_0
+
+ # CF VNFs Neutron static IP for management port
+ CF01-OAM-IP: 172.17.32.110
+ CF02-OAM-IP: 172.17.32.111
+ # SF VNFs Neutron static IPs for port 1-6
+ SF03-IP: { gn_ip: [107.243.0.5, "2606:ae00:2e01:140::5"], cor_ip: [107.243.3.5, "fd00:ae00:2e01:40::5"], sgi_prot_ip: [107.243.1.5, "fd00:ae00:2030:a40::5"], sgi_ims_ip: [107.243.2.5, "fd00:ae00:2030:b40::5"], oam_calea_ip: [107.243.4.5], int_icsr_ip: [172.26.0.5, "fd00:2600:2600::5"]}
+ SF04-IP: { gn_ip: [107.243.0.6, "2606:ae00:2e01:140::6"], cor_ip: [107.243.3.6, "fd00:ae00:2e01:40::6"], sgi_prot_ip: [107.243.1.6, "fd00:ae00:2030:a40::6"], sgi_ims_ip: [107.243.2.6, "fd00:ae00:2030:b40::6"], oam_calea_ip: [107.243.4.6], int_icsr_ip: [172.26.0.10, "fd00:2600:2600::10"]}
+ SF05-IP: { gn_ip: [107.243.0.7, "2606:ae00:2e01:140::7"], cor_ip: [107.243.3.7, "fd00:ae00:2e01:40::7"], sgi_prot_ip: [107.243.1.7, "fd00:ae00:2030:a40::7"], sgi_ims_ip: [107.243.2.7, "fd00:ae00:2030:b40::7"], oam_calea_ip: [107.243.4.7], int_icsr_ip: [172.26.0.9, "fd00:2600:2600::9"]}
+ SF06-IP: { gn_ip: [107.243.0.8, "2606:ae00:2e01:140::8"], cor_ip: [107.243.3.8, "fd00:ae00:2e01:40::8"], sgi_prot_ip: [107.243.1.8, "fd00:ae00:2030:a40::8"], sgi_ims_ip: [107.243.2.8, "fd00:ae00:2030:b40::8"], oam_calea_ip: [107.243.4.8], int_icsr_ip: [172.26.0.8, "fd00:2600:2600::8"]}
+ # Volume size for HDD attaching to CF card for CDR storage
+ vol_size_1: 16
+ vol_size_2: 16
+
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/test/resources/mock/model/testHeat.yml b/openecomp-be/lib/openecomp-heat-lib/src/test/resources/mock/model/testHeat.yml
new file mode 100644
index 0000000000..d1eb621731
--- /dev/null
+++ b/openecomp-be/lib/openecomp-heat-lib/src/test/resources/mock/model/testHeat.yml
@@ -0,0 +1,524 @@
+heat_template_version: 2013-05-23
+
+description: vSeGW/vSRX Firewall Template
+
+parameter_groups:
+- label: System Settings
+ description: System Level Settings
+ parameters:
+ - availability_zone_0
+ - vnf_name
+ - vnf_id
+
+parameters:
+ availability_zone_0:
+ type: string
+ description: Availability Zone
+ vnf_name:
+ type: string
+ description: Unique name for this VNF instance
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+
+# Note we are requesting a flavor with 10 physical CPU cores and may be limited by 16 vCPU flavor.
+ flavor_segw_name:
+ type: string
+ description: flavor type
+# The image will be provided as a qcow2 KVM image.
+ image_segw_name:
+ type: string
+ description: Image use to boot a server
+
+ flavor_vsrxfw_name:
+ type: string
+ description: flavor type
+ image_vsrxfw_name:
+ type: string
+ description: Image use to boot a server
+
+ INTERNET_direct_net_id:
+ type: string
+ description: The Internet
+
+ oam_mgmt_net_0_id:
+ type: string
+ description: Name of OAM mgmt network
+
+ oam_protected_net_0_id:
+ type: string
+ description: Name of OAM protected network
+
+ Mobility_OAM_protected_net_0_id:
+ type: string
+ description: Network name for OAM
+
+ GN_direct_net_0_id:
+ type: string
+ description: Network name for GN network
+
+ Mobility_OAM_protected_net_1_id:
+ type: string
+ description: Network name for OAM
+
+ GN_direct_net_1_id:
+ type: string
+ description: Network name for GN network
+
+ HSL_direct_net_id:
+ type: string
+ description: Name of HSL (Logging) network
+ HSL_direct_net_cidr:
+ type: string
+ description: HSL (Logging) network address (CIDR notation)
+
+ int_dummi0_net_id:
+ type: string
+ description: Dummi Parent Network for port
+ int_dummi1_net_id:
+ type: string
+ description: Dummi Parent Network for port
+# int_dummi2_net_id:
+# type: string
+# description: Dummi Parent Network for port
+# int_dummi3_net_id:
+# type: string
+# description: Dummi Parent Network for port
+# int_dummi4_net_id:
+# type: string
+# description: Dummi Parent Network for port
+# int_dummi5_net_id:
+# type: string
+# description: Dummi Parent Network for port
+
+ int_dummi0_cidr:
+ type: string
+ description: IPv4 prefix (CIDR notation)
+ int_dummi1_cidr:
+ type: string
+ description: IPv4 prefix (CIDR notation)
+# int_dummi2_cidr:
+# type: string
+# description: IPv4 prefix (CIDR notation)
+# int_dummi3_cidr:
+# type: string
+# description: IPv4 prefix (CIDR notation)
+# int_dummi4_cidr:
+# type: string
+# description: IPv4 prefix (CIDR notation)
+# int_dummi5_cidr:
+# type: string
+# description: IPv4 prefix (CIDR notation)
+
+ segw_0_inet_ip_0:
+ type: string
+ label: segw_0 port ens10 Ingress IP address alias_0
+ description: SeGW's Ingress interface IPv4 address, primary
+ segw_0_inet_ip_1:
+ type: string
+ label: segw_0 port ens10 Ingress IP address alias_1
+ description: SeGW's Ingress interface IPv4 address, alias 1
+ segw_0_inet_ip_2:
+ type: string
+ label: segw_0 port ens10 Ingress IP address alias_2
+ description: SeGW's Ingress interface IPv4 address, alias 2
+
+ segw_1_inet_ip_0:
+ type: string
+ label: segw_1 port ens10 Ingress IP address alias_0
+ description: SeGW's Ingress interface IPv4 address, primary
+ segw_1_inet_ip_1:
+ type: string
+ label: segw_1 port ens10 Ingress IP address alias_1
+ description: SeGW's Ingress interface IPv4 address, alias 1
+ segw_1_inet_ip_2:
+ type: string
+ label: segw_1 port ens10 Ingress IP address alias_2
+ description: SeGW's Ingress interface IPv4 address, alias 2
+ segw_0_oam_protected_ip:
+ type: string
+ label: segw_0 OAM MGMT IP address
+ description: segw_0 OAM MGMT IP address
+ segw_1_oam_protected_ip:
+ type: string
+ label: segw_1 OAM MGMT IP address
+ description: segw_1 OAM MGMT IP address
+
+# vsrx_fw_0_GN_direct_ip:
+# type: string
+# label: vsrx_fw_0 GN Direct IP address
+# description: vsrx_fw_0 GN Direct IP address
+# vsrx_fw_1_GN_direct_ip:
+# type: string
+# label: vsrx_fw_1 GN Direct IP address
+# description: vsrx_fw_1 GN Direct IP address
+# vsrx_fw_2_OAM_protected_ip:
+# type: string
+# label: vsrx_fw_2 OAM Protected IP address
+# description: vsrx_fw_2 OAM Protected IP address
+# vsrx_fw_3_OAM_protected_ip:
+# type: string
+# label: vsrx_fw_3 OAM Protected IP address
+# description: vsrx_fw_3 OAM Protected IP address
+
+ segw_0_name:
+ type: string
+ default: vSeGW_0
+ description: name of VM
+ segw_1_name:
+ type: string
+ default: vSeGW_1
+ description: name of VM
+ vsrx_fw_0_name:
+ type: string
+ default: vSRX_FW_0
+ description: name of VM
+ vsrx_fw_1_name:
+ type: string
+ default: vSRX_FW_1
+ description: name of VM
+ vsrx_fw_2_name:
+ type: string
+ default: vSRX_FW_2
+ description: name of VM
+ vsrx_fw_3_name:
+ type: string
+ default: vSRX_FW_3
+ description: name of VM
+
+ security_group_name:
+ type: string
+ label: SEGW security group name
+ description: SEGW security group name
+
+resources:
+
+ SeGW_Affinity:
+ type: OS::Nova::ServerGroup
+ properties:
+ policies: ["anti-affinity"]
+ vSRXFW_Affinity:
+ type: OS::Nova::ServerGroup
+ properties:
+ policies: ["anti-affinity"]
+
+ Dummi0_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: int_dummi0_net_id }
+ Dummi0_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: Dummi0_net }
+ cidr: { get_param: int_dummi0_cidr }
+
+ Dummi1_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: int_dummi1_net_id }
+ Dummi1_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: Dummi1_net }
+ cidr: { get_param: int_dummi1_cidr }
+
+ hsl_direct_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: HSL_direct_net_id }
+
+ hsl_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: hsl_direct_net }
+ cidr: { get_param: HSL_direct_net_cidr }
+
+ segw_security_group:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: vscp security group
+ name: {get_param: security_group_name}
+# Need to add any-any rule through GUI to get SCTP traffic to work - any-any rules are not supported in heat template
+ rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0}
+ ]
+
+ server_segw_segw_0:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: segw_0_name }
+ image: { get_param: image_segw_name }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: flavor_segw_name }
+ scheduler_hints: { group: { get_resource: SeGW_Affinity } }
+ networks:
+ - port: { get_resource: port_segw_0_oam_protected }
+ - port: { get_resource: port_segw_0_internet }
+ - port: { get_resource: port_segw_0_dummi }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+
+ port_segw_0_oam_protected:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_protected_net_0_id }
+ fixed_ips: [{"ip_address": {get_param: segw_0_oam_protected_ip}}]
+ security_groups: [{get_resource: segw_security_group}]
+
+ port_segw_0_internet:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: INTERNET_direct_net_id }
+ fixed_ips: [{"ip_address": {get_param: segw_0_inet_ip_0}}, {"ip_address": {get_param: segw_0_inet_ip_1}}, {"ip_address": {get_param: segw_0_inet_ip_2}}]
+ security_groups: [{get_resource: segw_security_group}]
+
+ port_segw_0_dummi:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Dummi0_net }
+ security_groups: [{get_resource: segw_security_group}]
+
+ server_segw_segw_1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: segw_1_name }
+ image: { get_param: image_segw_name }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: flavor_segw_name }
+ scheduler_hints: { group: { get_resource: SeGW_Affinity } }
+ networks:
+ - port: { get_resource: port_segw_1_oam_protected }
+ - port: { get_resource: port_segw_1_internet }
+ - port: { get_resource: port_segw_1_dummi }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+
+ port_segw_1_oam_protected:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_protected_net_0_id }
+ fixed_ips: [{"ip_address": {get_param: segw_1_oam_protected_ip}}]
+ security_groups: [{get_resource: segw_security_group}]
+
+ port_segw_1_internet:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: INTERNET_direct_net_id }
+ fixed_ips: [{"ip_address": {get_param: segw_1_inet_ip_0}}, {"ip_address": {get_param: segw_1_inet_ip_1}}, {"ip_address": {get_param: segw_1_inet_ip_2}}]
+ security_groups: [{get_resource: segw_security_group}]
+
+ port_segw_1_dummi:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Dummi1_net }
+ security_groups: [{get_resource: segw_security_group}]
+
+ server_vsrx_fw_0:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: vsrx_fw_0_name }
+ image: { get_param: image_vsrxfw_name }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: flavor_vsrxfw_name }
+ scheduler_hints: { group: { get_resource: vSRXFW_Affinity } }
+ networks:
+ - port: { get_resource: port_vsrx_fw_0_oam_mgmt }
+ - port: { get_resource: port_vsrx_fw_0_dummi }
+ - port: { get_resource: port_vsrx_fw_0_GN }
+ - port: { get_resource: port_vsrx_fw_0_HSL }
+
+ metadata:
+ vnf_id: { get_param: vnf_id }
+
+ port_vsrx_fw_0_oam_mgmt:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_mgmt_net_0_id }
+ security_groups: [{get_resource: segw_security_group}]
+
+ port_vsrx_fw_0_dummi:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Dummi0_net }
+ security_groups: [{get_resource: segw_security_group}]
+
+ port_vsrx_fw_0_GN:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: GN_direct_net_0_id }
+# fixed_ips: [{"ip_address": {get_param: vsrx_fw_0_GN_direct_ip}}]
+ security_groups: [{get_resource: segw_security_group}]
+
+ port_vsrx_fw_0_HSL:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: hsl_direct_net }
+ security_groups: [{get_resource: segw_security_group}]
+
+ server_vsrx_fw_1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: vsrx_fw_1_name }
+ image: { get_param: image_vsrxfw_name }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: flavor_vsrxfw_name }
+ scheduler_hints: { group: { get_resource: vSRXFW_Affinity } }
+ networks:
+ - port: { get_resource: port_vsrx_fw_1_oam_mgmt }
+ - port: { get_resource: port_vsrx_fw_1_dummi }
+ - port: { get_resource: port_vsrx_fw_1_GN }
+ - port: { get_resource: port_vsrx_fw_1_HSL }
+
+ metadata:
+ vnf_id: { get_param: vnf_id }
+
+ port_vsrx_fw_1_oam_mgmt:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_mgmt_net_0_id }
+ security_groups: [{get_resource: segw_security_group}]
+
+ port_vsrx_fw_1_dummi:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Dummi1_net }
+ security_groups: [{get_resource: segw_security_group}]
+
+ port_vsrx_fw_1_GN:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: GN_direct_net_1_id }
+# fixed_ips: [{"ip_address": {get_param: vsrx_fw_1_GN_direct_ip}}]
+ security_groups: [{get_resource: segw_security_group}]
+
+ port_vsrx_fw_1_HSL:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: hsl_direct_net }
+ security_groups: [{get_resource: segw_security_group}]
+
+ server_vsrx_fw_2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: vsrx_fw_2_name }
+ image: { get_param: image_vsrxfw_name }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: flavor_vsrxfw_name }
+ scheduler_hints: { group: { get_resource: vSRXFW_Affinity } }
+ networks:
+ - port: { get_resource: port_vsrx_fw_2_oam_mgmt }
+ - port: { get_resource: port_vsrx_fw_2_dummi }
+ - port: { get_resource: port_vsrx_fw_2_OAM }
+ - port: { get_resource: port_vsrx_fw_2_HSL }
+
+ metadata:
+ vnf_id: { get_param: vnf_id }
+
+ port_vsrx_fw_2_oam_mgmt:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_mgmt_net_0_id }
+ security_groups: [{get_resource: segw_security_group}]
+
+ port_vsrx_fw_2_dummi:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Dummi0_net }
+ security_groups: [{get_resource: segw_security_group}]
+
+ port_vsrx_fw_2_OAM:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: Mobility_OAM_protected_net_0_id }
+# fixed_ips: [{"ip_address": {get_param: vsrx_fw_2_OAM_protected_ip}}]
+ security_groups: [{get_resource: segw_security_group}]
+
+ port_vsrx_fw_2_HSL:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: hsl_direct_net }
+ security_groups: [{get_resource: segw_security_group}]
+
+ server_vsrx_fw_3:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: vsrx_fw_3_name }
+ image: { get_param: image_vsrxfw_name }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: flavor_vsrxfw_name }
+ scheduler_hints: { group: { get_resource: vSRXFW_Affinity } }
+ networks:
+ - port: { get_resource: port_vsrx_fw_3_oam_mgmt }
+ - port: { get_resource: port_vsrx_fw_3_dummi }
+ - port: { get_resource: port_vsrx_fw_3_OAM }
+ - port: { get_resource: port_vsrx_fw_3_HSL }
+
+ metadata:
+ vnf_id: { get_param: vnf_id }
+
+ port_vsrx_fw_3_oam_mgmt:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_mgmt_net_0_id }
+ security_groups: [{get_resource: segw_security_group}]
+
+ port_vsrx_fw_3_dummi:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Dummi1_net }
+ security_groups: [{get_resource: segw_security_group}]
+
+ port_vsrx_fw_3_OAM:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: Mobility_OAM_protected_net_1_id }
+# fixed_ips: [{"ip_address": {get_param: vsrx_fw_3_OAM_protected_ip}}]
+ security_groups: [{get_resource: segw_security_group}]
+
+ port_vsrx_fw_3_HSL:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: hsl_direct_net }
+ security_groups: [{get_resource: segw_security_group}]
+
+conditions:
+ cd1: True
+ cd2:
+ get_param: param1
+ cd3:
+ equals:
+ - get_param: param2
+ - yes
+ cd4:
+ not:
+ equals:
+ - get_param: param3
+ - yes
+ cd5:
+ and:
+ - equals:
+ - get_param: env_type
+ - prod
+ - not:
+ equals:
+ - get_param: zone
+ - beijing
+ cd6:
+ or:
+ - equals:
+ - get_param: zone
+ - shanghai
+ - equals:
+ - get_param: zone
+ - beijing
+ cd7:
+ not: cd4
+ cd8:
+ and:
+ - cd1
+ - cd2
+ create_prod_res: {equals : [{get_param: env_type}, "prod"]} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/pom.xml b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/pom.xml
new file mode 100644
index 0000000000..d0512a480d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/pom.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-action-lib</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>openecomp-sdc-action-api</artifactId>
+
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-core-lib</artifactId>
+ <type>pom</type>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-facade-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-nosqldb-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-versioning-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-annotations</artifactId>
+ <version>2.7.4</version>
+ </dependency>
+ </dependencies>
+
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/ActionConstants.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/ActionConstants.java
new file mode 100644
index 0000000000..625ce7efe8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/ActionConstants.java
@@ -0,0 +1,104 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.action;
+
+public class ActionConstants {
+
+ //
+ public static final long MAX_ACTION_ARTIFACT_SIZE = 20 * 1024 * 1024; //20 MB
+ //REST layer constants
+ public static final String X_ECOMP_INSTANCE_ID_HEADER_PARAM = "X-ECOMP-InstanceID";
+ public static final String X_ECOMP_REQUEST_ID_HEADER_PARAM = "X-ECOMP-RequestID";
+ public static final String WWW_AUTHENTICATE_HEADER_PARAM = "WWW-Authenticate";
+
+ public static final String ACTION_REQUEST_PARAM_NAME = "name";
+ public static final String ACTION_REQUEST_PARAM_END_POINT_URI = "endpointUri";
+ public static final String SUPPORTED_MODELS_VERSION_ID = "versionId";
+ public static final String SUPPORTED_COMPONENTS_ID = "Id";
+ public static final String ACTION_REQUEST_PARAM_SUPPORTED_MODELS = SUPPORTED_MODELS_VERSION_ID
+ + " in supportedModels";
+ public static final String ACTION_REQUEST_PARAM_SUPPORTED_COMPONENTS =
+ SUPPORTED_COMPONENTS_ID + " in supportedComponents";
+
+ public static final String REQUEST_EMPTY_BODY = "{}";
+ public static final String REQUEST_TYPE_CREATE_ACTION = "REQUEST_CREATE_ACTION";
+ public static final String REQUEST_TYPE_UPDATE_ACTION = "REQUEST_UPDATE_ACTION";
+ public static final String REQUEST_TYPE_VERSION_ACTION = "REQUEST_VERSION_ACTION";
+
+ //DAO layer constants
+ public static final String ACTION_VERSIONABLE_TYPE = "Action";
+
+ //Manager constants
+ public static final String UNIQUE_ID = "actionUuId";
+ public static final String VERSION = "version";
+ public static final String INVARIANTUUID = "actionInvariantUuId";
+ public static final String STATUS = "status";
+ public static final String ARTIFACTS = "artifacts";
+ public static final String TIMESTAMP = "timeStamp";
+ public static final String UPDATED_BY = "updatedBy";
+ public static final String ARTIFACT_NAME = "artifactName";
+ public static final String ARTIFACT_FILE = "Artifact to be uploaded";
+
+ // Status
+ public static final String UNDO_CHECKOUT_RESPONSE_TEXT =
+ "Changes to the Action object successfully reverted back.";
+
+ //GET Request Filter Types
+ public static final String FILTER_TYPE_VENDOR = "VENDOR";
+ public static final String FILTER_TYPE_CATEGORY = "CATEGORY";
+ public static final String FILTER_TYPE_NAME = "NAME";
+ public static final String FILTER_TYPE_MODEL = "MODEL";
+ public static final String FILTER_TYPE_ECOMP_COMPONENT = "ECOMP_COMPONENT";
+ public static final String FILTER_TYPE_NONE = "NONE";
+
+ public static final String ARTIFACT_METADATA_ATTR_UUID = "ARTIFACT_UUID";
+ public static final String ARTIFACT_METADATA_ATTR_NAME = "ARTIFACT_NAME";
+
+ public static final String REQUEST_ID = "uuid";
+ public static final String SERVICE_INSTANCE_ID = "serviceInstanceID";
+ public static final String PARTNER_NAME = "userId";
+ public static final String SERVICE_NAME = "ServiceName";
+ public static final String INSTANCE_UUID = "InstanceUUID";
+ public static final String REMOTE_HOST = "RemoteHost";
+ public static final String CLIENT_IP = "ClientIP";
+ public static final String CATEGORY_LOG_LEVEL = "level";
+ public static final String STATUS_CODE = "StatusCode";
+ public static final String RESPONSE_CODE = "ResponseCode";
+ public static final String RESPONSE_DESCRIPTION = "ResponseDescription";
+ public static final String ELAPSED_TIME = "ElapsedTime";
+ public static final String BEGIN_TIMESTAMP = "BeginTimestamp";
+ public static final String TARGET_SERVICE_NAME = "TargetServiceName";
+ public static final String TARGET_ENTITY = "TargetEntity";
+ public static final String TARGET_ENTITY_API = "API";
+ public static final String TARGET_ENTITY_DB = "DB";
+ public static final String END_TIMESTAMP = "EndTimestamp";
+ public static final String ERROR_CATEGORY = "ErrorCategory";
+ public static final String ERROR_CODE = "ErrorCode";
+ public static final String ERROR_DESCRIPTION = "ErrorDescription";
+ public static final String MDC_ASDC_INSTANCE_UUID = "ASDC";
+ public static final String SERVICE_METRIC_BEGIN_TIMESTAMP = "SERVICE-METRIC-BEGIN-TIMESTAMP";
+ public static final String LOCAL_ADDR = "localAddr"; //map ServerIPAddress from loggingfilter
+ public static final String BE_FQDN = "beFqdn"; //map ServerFQDN from logging filter
+
+ public final class UniqueValues {
+ public static final String ACTION_NAME = "Action name";
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/ActionArtifactDao.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/ActionArtifactDao.java
new file mode 100644
index 0000000000..a120645512
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/ActionArtifactDao.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.action.dao;
+
+import org.openecomp.core.dao.BaseDao;
+import org.openecomp.sdc.action.dao.types.ActionArtifactEntity;
+import org.openecomp.sdc.action.types.ActionArtifact;
+
+public interface ActionArtifactDao extends BaseDao<ActionArtifactEntity> {
+
+ void uploadArtifact(ActionArtifact data);
+
+ ActionArtifact downloadArtifact(int effectiveVersion, String artifactUuId);
+
+ void updateArtifact(ActionArtifact data);
+}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/ActionArtifactDaoFactory.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/ActionArtifactDaoFactory.java
new file mode 100644
index 0000000000..f0936976ba
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/ActionArtifactDaoFactory.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.action.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class ActionArtifactDaoFactory extends AbstractComponentFactory<ActionArtifactDao> {
+
+ public static ActionArtifactDaoFactory getInstance() {
+ return AbstractFactory.getInstance(ActionArtifactDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/ActionDao.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/ActionDao.java
new file mode 100644
index 0000000000..01f5014ad4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/ActionDao.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.action.dao;
+
+import org.openecomp.core.dao.BaseDao;
+import org.openecomp.sdc.action.dao.types.ActionEntity;
+import org.openecomp.sdc.action.errors.ActionException;
+import org.openecomp.sdc.action.types.Action;
+import org.openecomp.sdc.action.types.EcompComponent;
+import org.openecomp.sdc.versioning.dao.VersionableDao;
+
+import java.util.List;
+
+public interface ActionDao extends VersionableDao, BaseDao<ActionEntity> {
+
+ Action createAction(Action actionDto) throws ActionException;
+
+ Action updateAction(Action actionDto) throws ActionException;
+
+ void deleteAction(String actionInvariantUuId) throws ActionException;
+
+ List<Action> getFilteredActions(String filterType, String filterId) throws ActionException;
+
+ Action getActionsByActionUuId(String uniqueId) throws ActionException;
+
+ List<EcompComponent> getEcompComponents() throws ActionException;
+
+ List<Action> getActionsByActionInvariantUuId(String actionInvariantUuId)
+ throws ActionException;
+
+ Action getLockedAction(String actionInvariantUuId, String user) throws ActionException;
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/ActionDaoFactory.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/ActionDaoFactory.java
new file mode 100644
index 0000000000..d8b0c1889e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/ActionDaoFactory.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.action.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class ActionDaoFactory extends AbstractComponentFactory<ActionDao> {
+
+ public static ActionDaoFactory getInstance() {
+ return AbstractFactory.getInstance(ActionDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionArtifactEntity.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionArtifactEntity.java
new file mode 100644
index 0000000000..7e56a04e1b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionArtifactEntity.java
@@ -0,0 +1,89 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.action.dao.types;
+
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+import org.openecomp.sdc.action.types.ActionArtifact;
+
+import java.nio.ByteBuffer;
+
+@Table(keyspace = "dox", name = "action_artifact")
+public class ActionArtifactEntity {
+
+ @PartitionKey
+ @Column(name = "artifactuuid")
+ private String artifactUuId;
+
+ @PartitionKey(value = 1)
+ @Column(name = "effective_version")
+ private int effectiveVersion;
+
+ @Column(name = "artifact")
+ private ByteBuffer artifact;
+
+ public ActionArtifactEntity() {
+ //Default constructor implementation
+ }
+
+ public ActionArtifactEntity(String artifactUuId, int effectiveVersion) {
+ this.artifactUuId = artifactUuId;
+ this.effectiveVersion = effectiveVersion;
+ }
+
+ public String getArtifactUuId() {
+ return artifactUuId;
+ }
+
+ public void setArtifactUuId(String artifactUuId) {
+ this.artifactUuId = artifactUuId;
+ }
+
+ public int getEffectiveVersion() {
+ return effectiveVersion;
+ }
+
+ public void setEffectiveVersion(int effectiveVersion) {
+ this.effectiveVersion = effectiveVersion;
+ }
+
+ public ByteBuffer getArtifact() {
+ return artifact;
+ }
+
+ public void setArtifact(ByteBuffer artifact) {
+ this.artifact = artifact;
+ }
+
+ /**
+ * To dto action artifact.
+ *
+ * @return the action artifact
+ */
+ public ActionArtifact toDto() {
+ ActionArtifact destination = new ActionArtifact();
+ destination.setArtifactUuId(this.getArtifactUuId());
+ destination.setEffectiveVersion(this.getEffectiveVersion());
+ destination.setArtifact(this.getArtifact().array());
+ return destination;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionEntity.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionEntity.java
new file mode 100644
index 0000000000..9aa9e8d375
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionEntity.java
@@ -0,0 +1,224 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.action.dao.types;
+
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+import org.openecomp.core.utilities.json.JsonUtil;
+import org.openecomp.sdc.action.types.Action;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Table(keyspace = "dox", name = "Action")
+public class ActionEntity {
+
+ @Column(name = "actionUUID")
+ private String actionUuId;
+ @PartitionKey(value = 0)
+ @Column(name = "actionInvariantUUID")
+ private String actionInvariantUuId;
+ @PartitionKey(value = 1)
+ @Frozen
+ @Column(name = "version")
+ private Version version;
+ @Column(name = "status")
+ private String status;
+ @Column(name = "name")
+ private String name;
+ @Column(name = "vendor_list")
+ private List<String> vendorList;
+ @Column(name = "category_list")
+ private List<String> categoryList;
+ @Column(name = "timestamp")
+ private Date timestamp;
+ @Column(name = "user")
+ private String user;
+ @Column(name = "supportedModels")
+ private List<String> supportedModels;
+ @Column(name = "supportedComponents")
+ private List<String> supportedComponents;
+ @Column(name = "data")
+ private String data;
+
+ public ActionEntity() {
+ }
+
+ public ActionEntity(String actionInvariantUuId, Version version) {
+ this.actionInvariantUuId = actionInvariantUuId;
+ this.version = version;
+ }
+
+ public String getActionUuId() {
+ return actionUuId;
+ }
+
+ public void setActionUuId(String actionUuId) {
+ this.actionUuId = actionUuId;
+ }
+
+ public String getActionInvariantUuId() {
+ return actionInvariantUuId;
+ }
+
+ public void setActionInvariantUuId(String actionInvariantUuId) {
+ this.actionInvariantUuId = actionInvariantUuId;
+ }
+
+ public Version getVersion() {
+ return version;
+ }
+
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public List<String> getVendorList() {
+ return vendorList;
+ }
+
+ /**
+ * Sets vendor list.
+ *
+ * @param vendorList the vendor list
+ */
+ public void setVendorList(List<String> vendorList) {
+ if (vendorList != null && !vendorList.isEmpty()) {
+ List<String> lowerCaseVendorList = new ArrayList<>();
+ lowerCaseVendorList
+ .addAll(vendorList.stream().map(String::toLowerCase).collect(Collectors.toList()));
+ this.vendorList = lowerCaseVendorList;
+ } else {
+ this.vendorList = vendorList;
+ }
+ }
+
+ public List<String> getCategoryList() {
+ return categoryList;
+ }
+
+ /**
+ * Sets category list.
+ *
+ * @param categoryList the category list
+ */
+ public void setCategoryList(List<String> categoryList) {
+ if (categoryList != null && !categoryList.isEmpty()) {
+ List<String> lowerCaseCategoryList = new ArrayList<>();
+ lowerCaseCategoryList
+ .addAll(categoryList.stream().map(String::toLowerCase).collect(Collectors.toList()));
+ this.categoryList = lowerCaseCategoryList;
+ } else {
+ this.categoryList = categoryList;
+ }
+ }
+
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ public String getUser() {
+ return user;
+ }
+
+ public void setUser(String user) {
+ this.user = user;
+ }
+
+ public List<String> getSupportedModels() {
+ return supportedModels;
+ }
+
+ public void setSupportedModels(List<String> supportedModels) {
+ this.supportedModels = supportedModels;
+ }
+
+ public List<String> getSupportedComponents() {
+ return supportedComponents;
+ }
+
+ public void setSupportedComponents(List<String> supportedComponents) {
+ this.supportedComponents = supportedComponents;
+ }
+
+ public String getData() {
+ return data;
+ }
+
+ public void setData(String data) {
+ this.data = data;
+ }
+
+ /**
+ * To dto action.
+ *
+ * @return the action
+ */
+ public Action toDto() {
+ //Action destination = new Action();
+
+ Action destination = JsonUtil.json2Object(this.getData(), Action.class);
+ destination.setData(this.getData());
+ destination.setTimestamp(this.getTimestamp());
+ destination.setUser(this.getUser());
+ destination.setData(this.getData());
+ return destination;
+ }
+
+ /*private List<HashMap<String,String>> createMapFromList(List<String> list, String idName){
+ List<HashMap<String,String>> keyValueList = new ArrayList<>();
+ if(list != null && !list.isEmpty()){
+ for(String attributeId : list){
+ HashMap<String,String> attributeIdMap = new HashMap<>();
+ attributeIdMap.put(idName,attributeId);
+ keyValueList.add(attributeIdMap);
+ }
+ return keyValueList;
+ }
+ return null;
+ }*/
+}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/EcompComponentEntity.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/EcompComponentEntity.java
new file mode 100644
index 0000000000..9a71023629
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/EcompComponentEntity.java
@@ -0,0 +1,73 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.action.dao.types;
+
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+import org.openecomp.sdc.action.types.EcompComponent;
+
+@Table(keyspace = "dox", name = "ECOMPComponent")
+public class EcompComponentEntity {
+
+ @PartitionKey
+ @Column(name = "id")
+ private String id;
+
+ @Column(name = "name")
+ private String name;
+
+ public EcompComponentEntity() {
+ }
+
+ public EcompComponentEntity(String id, String name) {
+ this.id = id;
+ this.name = name;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * To dto ecomp component.
+ *
+ * @return the ecomp component
+ */
+ public EcompComponent toDto() {
+ EcompComponent destination = new EcompComponent();
+ destination.setId(this.getId());
+ destination.setName(this.getName());
+ return destination;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/errors/ActionErrorConstants.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/errors/ActionErrorConstants.java
new file mode 100644
index 0000000000..092d9abee5
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/errors/ActionErrorConstants.java
@@ -0,0 +1,136 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.action.errors;
+
+public class ActionErrorConstants {
+
+ //Error Codes
+ public static final String ACTION_REQUEST_INVALID_GENERIC_CODE = "ACT0001";
+ public static final String ACTION_AUTHENTICATION_ERR_CODE = "ACT1000";
+ public static final String ACTION_AUTHORIZATION_ERR_CODE = "ACT1001";
+ public static final String ACTION_INVALID_INSTANCE_ID_CODE = "ACT1002";
+ public static final String ACTION_INVALID_REQUEST_ID_CODE = "ACT1003";
+ public static final String ACTION_INVALID_PARAM_CODE = "ACT1004";
+ //Operation <status> is not supported
+ public static final String ACTION_INVALID_REQUEST_BODY_CODE = "ACT1005";
+ //ACTION_REQUEST_BODY_EMPTY
+ public static final String ACTION_UPDATE_NOT_ALLOWED_CODE_NAME = "ACT1007";
+ public static final String ACTION_CHECKOUT_ON_LOCKED_ENTITY = "ACT1008";
+ public static final String ACTION_ENTITY_UNIQUE_VALUE_ERROR = "ACT1009";
+
+ public static final String ACTION_INVALID_SEARCH_CRITERIA = "ACT1011";
+ public static final String ACTION_MULT_SEARCH_CRITERIA = "ACT1012";
+ public static final String ACTION_UPDATE_ON_UNLOCKED_ENTITY = "ACT1013";
+ public static final String ACTION_UPDATE_INVALID_VERSION = "ACT1014";
+ public static final String ACTION_UPDATE_NOT_ALLOWED_CODE = "ACT1015";
+
+ public static final String ACTION_CHECKIN_ON_UNLOCKED_ENTITY = "ACT1017";
+ public static final String ACTION_SUBMIT_FINALIZED_ENTITY_NOT_ALLOWED = "ACT1018";
+ public static final String ACTION_SUBMIT_LOCKED_ENTITY_NOT_ALLOWED = "ACT1019";
+ public static final String ACTION_UNDO_CHECKOUT_ON_UNLOCKED_ENTITY = "ACT1020";
+ public static final String ACTION_NOT_LOCKED_CODE = "ACT1021";
+ public static final String ACTION_ARTIFACT_CHECKSUM_ERROR_CODE = "ACT1022";
+ public static final String ACTION_ARTIFACT_TOO_BIG_ERROR_CODE = "ACT1023";
+ public static final String ACTION_ARTIFACT_ALREADY_EXISTS_CODE = "ACT1025";
+ public static final String ACTION_ARTIFACT_UPDATE_READ_ONLY = "ACT1026";
+ public static final String ACTION_ARTIFACT_DELETE_READ_ONLY = "ACT1027";
+ public static final String ACTION_ARTIFACT_INVALID_PROTECTION_CODE = "ACT1028";
+ public static final String ACTION_ARTIFACT_INVALID_NAME_CODE = "ACT1029";
+
+ public static final String ACTION_EDIT_ON_ENTITY_LOCKED_BY_OTHER_USER = "ACT1041";
+ public static final String ACTION_CHECKIN_ON_ENTITY_LOCKED_BY_OTHER_USER = "ACT1042";
+ public static final String ACTION_CHECKOUT_ON_LOCKED_ENTITY_OTHER_USER = "ACT1043";
+ public static final String ACTION_UNDO_CHECKOUT_ON_ENTITY_LOCKED_BY_OTHER_USER = "ACT1044";
+ public static final String ACTION_ENTITY_NOT_EXIST_CODE = "ACT1045";
+ public static final String ACTION_ARTIFACT_ENTITY_NOT_EXIST_CODE = "ACT1046";
+ public static final String ACTION_ARTIFACT_DEL_LOCKED_OTHER_USER_CODE = "ACT1047";
+ public static final String ACTION_DELETE_ON_LOCKED_ENTITY_CODE = "ACT1048";
+
+ public static final String ACTION_INTERNAL_SERVER_ERR_CODE = "ACT1060";
+ public static final String ACTION_QUERY_FAILURE_CODE = "QUERY_FAILURE";
+ public static final String ACTION_QUERY_FAILURE_MSG = "Query Failure";
+
+
+ //Error Messages
+ public static final String ACTION_REQUEST_BODY_EMPTY = "Request Body is missing";
+ //"The API failed due to missing body";
+ public static final String ACTION_REQUEST_MISSING_MANDATORY_PARAM =
+ "Missing mandatory parameter(s) : ";
+ public static final String ACTION_REQUEST_ECOMP_INSTANCE_ID_INVALID =
+ "X-ECOMP-InstanceID HTTP header missing or empty";
+ public static final String ACTION_REQUEST_ECOMP_REQUEST_ID_INVALID =
+ "X-ECOMP-RequestID HTTP header missing or empty";
+ public static final String ACTION_REQUEST_CONTENT_TYPE_INVALID =
+ "Content-Type HTTP header missing or empty";
+ public static final String ACTION_REQUEST_AUTHORIZATION_HEADER_INVALID =
+ "Authentication is required to use the API";
+ public static final String ACTION_REQUEST_INVALID_NAME =
+ "Invalid syntax for action name. No whitespaces allowed.";
+ public static final String ACTION_REQUEST_FILTER_PARAM_INVALID =
+ "Invalid Search filter criteria provided";
+ public static final String ACTION_FILTER_MULTIPLE_QUERY_PARAM_NOT_SUPPORTED =
+ "Multiple filter criteria are not supported";
+ //"Operation supports filter by one property at a time";
+ public static final String ACTION_ARTIFACT_ENTITY_NOT_EXIST = "Specified artifact is not found";
+ public static final String ACTION_REQUEST_ARTIFACT_CHECKSUM_ERROR = "Checksum error";
+ public static final String ACTION_REQUEST_ARTIFACT_INVALID_PROTECTION_VALUE =
+ "Invalid artifact protection value";
+
+ public static final String ACTION_ARTIFACT_INVALID_NAME =
+ "Artifact name cannot contain any of the following characters : #<>$+%!`&*'|{}?=/:@ "
+ + "including whitespaces, double quotes and back-slash";
+ public static final String ACTION_ARTIFACT_READ_FILE_ERROR = "Error Occurred while reading file";
+ public static final String ACTION_REQUEST_ARTIFACT_OPERATION_ALLOWED =
+ "Artifacts cannot be created/updated using this operation";
+ public static final String ACTION_ARTIFACT_TOO_BIG_ERROR =
+ "Operation is not allowed. Artifact size exceeds the maximum file size limit (20MB).";
+
+ //Business Validation Error messages
+ public static final String ACTION_UPDATE_NOT_ALLOWED_FOR_NAME =
+ "Action Name update is not allowed";
+ public static final String ACTION_UPDATE_PARAM_INVALID =
+ "Update not allowed for the parameter(s) : %s";
+ public static final String ACTION_ENTITY_NOT_EXIST = "Specified Action is not found";
+ public static final String ACTION_REQUESTED_VERSION_INVALID = "Invalid requested version : %s";
+ public static final String ACTION_UNSUPPORTED_OPERATION = "Operation %s not supported";
+ public static final String ACTION_ENTITY_UNIQUE_VALUE_MSG =
+ "%s with the value '%s' already exists.";
+ public static final String ACTION_ARTIFACT_ALREADY_EXISTS =
+ "Artifact name already exists for Action with id %s. Please use another name.";
+ public static final String ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG =
+ "The request failed due to an internal ASDC problem. ECOMP Component should continue the "
+ + "attempts, with corrected data if required, to create the resource.";
+ public static final String ACTION_ARTIFACT_DELETE_READ_ONLY_MSG =
+ "Cannot delete read only artifact.";
+ public static final String ACTION_ARTIFACT_UPDATE_READ_ONLY_MSG =
+ "Cannot update read only artifact.";
+ public static final String ACTION_NOT_LOCKED_MSG =
+ "Operation is not allowed. Action status should be Locked.";
+ public static final String ACTION_ARTIFACT_UPDATE_NAME_INVALID =
+ "Artifact name cannot be updated.";
+ public static final String ACTION_ARTIFACT_DEL_LOCKED_OTHER_USER =
+ "Cannot delete artifact since it is locked by other user %s.";
+ public static final String UNDO_CHECKOUT_ON_UNLOCKED_ENTITY_MSG =
+ "Can not undo checkout on versionable entity %s with id %s since it is not checked out.";
+ public static final String UNDO_CHECKOUT_ON_ENTITY_LOCKED_BY_OTHER_USER_MSG =
+ "Can not undo checkout on versionable entity %s with id"
+ + " %s since it is checked out by other user: %s.";
+}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/errors/ActionException.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/errors/ActionException.java
new file mode 100644
index 0000000000..fff88d6f84
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/errors/ActionException.java
@@ -0,0 +1,52 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.action.errors;
+
+public class ActionException extends RuntimeException {
+
+ private String errorCode;
+ private String description;
+
+ public ActionException() {
+
+ }
+
+ public ActionException(String errorCode, String description) {
+ this.errorCode = errorCode;
+ this.description = description;
+ }
+
+ public String getErrorCode() {
+ return errorCode;
+ }
+
+ public void setErrorCode(String errorCode) {
+ this.errorCode = errorCode;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/errors/ActionExceptionMapper.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/errors/ActionExceptionMapper.java
new file mode 100644
index 0000000000..23c14aaaa2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/errors/ActionExceptionMapper.java
@@ -0,0 +1,114 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.action.errors;
+
+import org.openecomp.sdc.action.ActionConstants;
+
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.ext.ExceptionMapper;
+
+public class ActionExceptionMapper implements ExceptionMapper<ActionException> {
+
+ @Override
+ public Response toResponse(ActionException actionException) {
+ Response response;
+ String errorCode = actionException.getErrorCode();
+ switch (errorCode) {
+ case ActionErrorConstants.ACTION_REQUEST_INVALID_GENERIC_CODE:
+ case ActionErrorConstants.ACTION_INVALID_INSTANCE_ID_CODE:
+ case ActionErrorConstants.ACTION_INVALID_REQUEST_ID_CODE:
+ case ActionErrorConstants.ACTION_INVALID_REQUEST_BODY_CODE:
+ case ActionErrorConstants.ACTION_INVALID_PARAM_CODE:
+ case ActionErrorConstants.ACTION_UPDATE_NOT_ALLOWED_FOR_NAME:
+ case ActionErrorConstants.ACTION_CHECKOUT_ON_LOCKED_ENTITY:
+ case ActionErrorConstants.ACTION_ENTITY_UNIQUE_VALUE_ERROR:
+ case ActionErrorConstants.ACTION_INVALID_SEARCH_CRITERIA:
+ case ActionErrorConstants.ACTION_MULT_SEARCH_CRITERIA:
+ case ActionErrorConstants.ACTION_UPDATE_ON_UNLOCKED_ENTITY:
+ case ActionErrorConstants.ACTION_UPDATE_INVALID_VERSION:
+ case ActionErrorConstants.ACTION_UPDATE_NOT_ALLOWED_CODE:
+ case ActionErrorConstants.ACTION_CHECKIN_ON_UNLOCKED_ENTITY:
+ case ActionErrorConstants.ACTION_SUBMIT_FINALIZED_ENTITY_NOT_ALLOWED:
+ case ActionErrorConstants.ACTION_SUBMIT_LOCKED_ENTITY_NOT_ALLOWED:
+ case ActionErrorConstants.ACTION_UNDO_CHECKOUT_ON_UNLOCKED_ENTITY:
+ case ActionErrorConstants.ACTION_UPDATE_NOT_ALLOWED_CODE_NAME:
+ case ActionErrorConstants.ACTION_ARTIFACT_CHECKSUM_ERROR_CODE:
+ case ActionErrorConstants.ACTION_ARTIFACT_ALREADY_EXISTS_CODE:
+ case ActionErrorConstants.ACTION_ARTIFACT_INVALID_NAME_CODE:
+ case ActionErrorConstants.ACTION_ARTIFACT_TOO_BIG_ERROR_CODE:
+ case ActionErrorConstants.ACTION_ARTIFACT_INVALID_PROTECTION_CODE:
+ case ActionErrorConstants.ACTION_ARTIFACT_DELETE_READ_ONLY:
+ case ActionErrorConstants.ACTION_NOT_LOCKED_CODE:
+ response = Response
+ .status(Response.Status.BAD_REQUEST)
+ .entity(new ActionExceptionResponse(errorCode,
+ Response.Status.BAD_REQUEST.getReasonPhrase(), actionException.getDescription()))
+ .type(MediaType.APPLICATION_JSON)
+ .build();
+ break;
+ case ActionErrorConstants.ACTION_AUTHENTICATION_ERR_CODE:
+ response = Response
+ .status(Response.Status.UNAUTHORIZED)
+ .header(ActionConstants.WWW_AUTHENTICATE_HEADER_PARAM,
+ ActionErrorConstants.ACTION_REQUEST_AUTHORIZATION_HEADER_INVALID)
+ .entity(new ActionExceptionResponse(errorCode,
+ Response.Status.UNAUTHORIZED.getReasonPhrase(), actionException.getDescription()))
+ .type(MediaType.APPLICATION_JSON)
+ .build();
+ break;
+ case ActionErrorConstants.ACTION_AUTHORIZATION_ERR_CODE:
+ case ActionErrorConstants.ACTION_EDIT_ON_ENTITY_LOCKED_BY_OTHER_USER:
+ case ActionErrorConstants.ACTION_CHECKIN_ON_ENTITY_LOCKED_BY_OTHER_USER:
+ case ActionErrorConstants.ACTION_CHECKOUT_ON_LOCKED_ENTITY_OTHER_USER:
+ case ActionErrorConstants.ACTION_UNDO_CHECKOUT_ON_ENTITY_LOCKED_BY_OTHER_USER:
+ case ActionErrorConstants.ACTION_DELETE_ON_LOCKED_ENTITY_CODE:
+ case ActionErrorConstants.ACTION_ARTIFACT_DEL_LOCKED_OTHER_USER_CODE:
+ case ActionErrorConstants.ACTION_ARTIFACT_UPDATE_READ_ONLY:
+ response = Response
+ .status(Response.Status.FORBIDDEN)
+ .entity(
+ new ActionExceptionResponse(errorCode, Response.Status.FORBIDDEN.getReasonPhrase(),
+ actionException.getDescription())).type(MediaType.APPLICATION_JSON)
+ .build();
+ break;
+ case ActionErrorConstants.ACTION_ENTITY_NOT_EXIST_CODE:
+ case ActionErrorConstants.ACTION_ARTIFACT_ENTITY_NOT_EXIST_CODE:
+ response = Response
+ .status(Response.Status.NOT_FOUND)
+ .entity(
+ new ActionExceptionResponse(errorCode, Response.Status.NOT_FOUND.getReasonPhrase(),
+ actionException.getDescription())).type(MediaType.APPLICATION_JSON)
+ .build();
+ break;
+ case ActionErrorConstants.ACTION_INTERNAL_SERVER_ERR_CODE:
+ default:
+ response = Response
+ .status(Response.Status.INTERNAL_SERVER_ERROR)
+ .entity(new ActionExceptionResponse(errorCode,
+ Response.Status.INTERNAL_SERVER_ERROR.getReasonPhrase(),
+ actionException.getDescription()))
+ .type(MediaType.APPLICATION_JSON)
+ .build();
+ }
+ return response;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/errors/ActionExceptionResponse.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/errors/ActionExceptionResponse.java
new file mode 100644
index 0000000000..51848464a7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/errors/ActionExceptionResponse.java
@@ -0,0 +1,66 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.action.errors;
+
+public class ActionExceptionResponse {
+ private String code;
+ private String description;
+ private String message;
+
+ /**
+ * Instantiates a new Action exception response.
+ *
+ * @param code the code
+ * @param description the description
+ * @param message the message
+ */
+ public ActionExceptionResponse(String code, String description, String message) {
+ this.code = code;
+ this.description = description;
+ this.message = message;
+ }
+
+ public String getCode() {
+ return code;
+ }
+
+ public void setCode(String code) {
+ this.code = code;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/logging/CategoryLogLevel.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/logging/CategoryLogLevel.java
new file mode 100644
index 0000000000..d87bed310f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/logging/CategoryLogLevel.java
@@ -0,0 +1,29 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.action.logging;
+
+public enum CategoryLogLevel {
+ INFO,
+ WARN,
+ DEBUG,
+ ERROR,
+ FATAL
+}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/logging/StatusCode.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/logging/StatusCode.java
new file mode 100644
index 0000000000..b0d5bab12b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/logging/StatusCode.java
@@ -0,0 +1,26 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.action.logging;
+
+public enum StatusCode {
+ COMPLETE,
+ ERROR
+}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/Action.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/Action.java
new file mode 100644
index 0000000000..176d443a81
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/Action.java
@@ -0,0 +1,255 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.action.types;
+
+import org.openecomp.sdc.action.ActionConstants;
+import org.openecomp.sdc.action.dao.types.ActionEntity;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+
+public class Action implements Comparable {
+ private String actionUuId;
+ private String actionInvariantUuId;
+ private String version;
+ private ActionStatus status;
+ private String name;
+ private String displayName;
+ private String endpointUri;
+ private List<String> vendorList;
+ private List<String> categoryList;
+ private Date timestamp;
+ private String user;
+ private List<HashMap<String, String>> supportedModels;
+ private List<HashMap<String, String>> supportedComponents;
+ //private List<HashMap<String,String>> artifacts;
+ private List<ActionArtifact> artifacts;
+ private String data;
+
+ public Action() {
+ }
+
+ /**
+ * Instantiates a new Action.
+ *
+ * @param action the action
+ */
+ public Action(Action action) {
+ this.actionUuId = action.getActionUuId();
+ this.actionInvariantUuId = action.getActionInvariantUuId();
+ this.name = action.getName();
+ this.setDisplayName(action.getDisplayName());
+ this.setVendorList(action.getVendorList());
+ this.setCategoryList(action.getCategoryList());
+ this.setTimestamp(action.getTimestamp());
+ this.setUser(action.getUser());
+ this.version = action.getVersion();
+ this.status = action.getStatus();
+ this.data = action.getData();
+ this.supportedComponents = action.getSupportedComponents();
+ this.supportedModels = action.getSupportedModels();
+ this.artifacts = action.getArtifacts();
+ }
+
+ public String getActionUuId() {
+ return actionUuId;
+ }
+
+ public void setActionUuId(String actionUuId) {
+ this.actionUuId = actionUuId;
+ }
+
+ public String getActionInvariantUuId() {
+ return actionInvariantUuId;
+ }
+
+ public void setActionInvariantUuId(String actionInvariantUuId) {
+ this.actionInvariantUuId = actionInvariantUuId;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public ActionStatus getStatus() {
+ return status;
+ }
+
+ public void setStatus(ActionStatus status) {
+ this.status = status;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+ public void setDisplayName(String displayName) {
+ this.displayName = displayName;
+ }
+
+ public String getEndpointUri() {
+ return endpointUri;
+ }
+
+ public void setEndpointUri(String endpointUri) {
+ this.endpointUri = endpointUri;
+ }
+
+ public List<String> getVendorList() {
+ return vendorList;
+ }
+
+ public void setVendorList(List<String> vendorList) {
+ this.vendorList = vendorList;
+ }
+
+ public List<String> getCategoryList() {
+ return categoryList;
+ }
+
+ public void setCategoryList(List<String> categoryList) {
+ this.categoryList = categoryList;
+ }
+
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ public String getUser() {
+ return user;
+ }
+
+ public void setUser(String user) {
+ this.user = user;
+ }
+
+ public List<HashMap<String, String>> getSupportedModels() {
+ return supportedModels;
+ }
+
+ public void setSupportedModels(List<HashMap<String, String>> supportedModels) {
+ this.supportedModels = supportedModels;
+ }
+
+ public List<HashMap<String, String>> getSupportedComponents() {
+ return supportedComponents;
+ }
+
+ public void setSupportedComponents(List<HashMap<String, String>> supportedComponents) {
+ this.supportedComponents = supportedComponents;
+ }
+
+ public List<ActionArtifact> getArtifacts() {
+ return artifacts;
+ }
+
+ public void setArtifacts(List<ActionArtifact> artifacts) {
+ this.artifacts = artifacts;
+ }
+
+ public String getData() {
+ return data;
+ }
+
+ public void setData(String data) {
+ this.data = data;
+ }
+
+ /**
+ * To entity action entity.
+ *
+ * @return the action entity
+ */
+ public ActionEntity toEntity() {
+ ActionEntity destination = new ActionEntity();
+
+ destination
+ .setActionUuId(this.getActionUuId() != null ? this.getActionUuId().toUpperCase() : null);
+ destination.setActionInvariantUuId(
+ this.getActionInvariantUuId() != null ? this.getActionInvariantUuId().toUpperCase() : null);
+ destination.setName(this.getName() != null ? this.getName().toLowerCase() : null);
+ destination.setVendorList(this.getVendorList());
+ destination.setCategoryList(this.getCategoryList());
+ destination.setTimestamp(this.getTimestamp());
+ destination.setUser(this.getUser());
+ destination.setVersion(Version.valueOf(this.getVersion()));
+ if (this.getStatus() != null) {
+ destination.setStatus(this.getStatus().name());
+ }
+ destination.setSupportedComponents(
+ getIdFromMap(this.getSupportedComponents(), ActionConstants.SUPPORTED_COMPONENTS_ID));
+ destination.setSupportedModels(
+ getIdFromMap(this.getSupportedModels(), ActionConstants.SUPPORTED_MODELS_VERSION_ID));
+ destination.setData(this.getData());
+ return destination;
+ }
+
+ private List<String> getIdFromMap(List<HashMap<String, String>> map, String idName) {
+ List<String> list = new ArrayList<>();
+ if (map != null && !map.isEmpty()) {
+ map.forEach(entry -> {
+ if (entry.containsKey(idName)) {
+ list.add(entry.get(idName) != null ? entry.get(idName).toLowerCase() : null);
+ }
+ });
+ return list;
+ }
+ return null;
+ }
+
+ @Override
+ public int compareTo(Object object) {
+ Action obj = (Action) object;
+ Version thisVersion = Version.valueOf(this.version);
+ Version objVersion = Version.valueOf(obj.getVersion());
+ if (obj.getName().compareTo(this.getName()) == 0) {
+ return compareVersions(objVersion, thisVersion);
+ }
+ return obj.getName().compareTo(this.getName());
+ }
+
+ private int compareVersions(Version objVersion, Version thisVersion) {
+ if (objVersion.getMajor() == thisVersion.getMajor()) {
+ return Integer.compare(objVersion.getMinor(), thisVersion.getMinor());
+ }
+ return Integer.compare(objVersion.getMajor(), thisVersion.getMajor());
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/ActionArtifact.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/ActionArtifact.java
new file mode 100644
index 0000000000..ef41673541
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/ActionArtifact.java
@@ -0,0 +1,139 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.action.types;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.openecomp.sdc.action.dao.types.ActionArtifactEntity;
+
+import java.nio.ByteBuffer;
+import java.util.Date;
+
+public class ActionArtifact {
+ private String artifactUuId;
+
+ @JsonIgnore
+ private Integer effectiveVersion;
+
+ private String artifactName;
+ private String artifactLabel;
+ private String artifactCategory;
+ private String artifactDescription;
+ private String artifactProtection;
+ private Date timestamp;
+ private byte[] artifact;
+
+ public String getArtifactUuId() {
+ return artifactUuId;
+ }
+
+ public void setArtifactUuId(String artifactUuId) {
+ this.artifactUuId = artifactUuId;
+ }
+
+ public Integer getEffectiveVersion() {
+ return effectiveVersion;
+ }
+
+ public void setEffectiveVersion(Integer effectiveVersion) {
+ this.effectiveVersion = effectiveVersion;
+ }
+
+ public String getArtifactName() {
+ return artifactName;
+ }
+
+ public void setArtifactName(String artifactName) {
+ this.artifactName = artifactName;
+ }
+
+ public String getArtifactLabel() {
+ return artifactLabel;
+ }
+
+ public void setArtifactLabel(String artifactLabel) {
+ this.artifactLabel = artifactLabel;
+ }
+
+ public String getArtifactCategory() {
+ return artifactCategory;
+ }
+
+ public void setArtifactCategory(String artifactCategory) {
+ this.artifactCategory = artifactCategory;
+ }
+
+ public String getArtifactDescription() {
+ return artifactDescription;
+ }
+
+ public void setArtifactDescription(String artifactDescription) {
+ this.artifactDescription = artifactDescription;
+ }
+
+ public String getArtifactProtection() {
+ return artifactProtection;
+ }
+
+ public void setArtifactProtection(String artifactProtection) {
+ this.artifactProtection = artifactProtection;
+ }
+
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ public byte[] getArtifact() {
+ return artifact;
+ }
+
+ public void setArtifact(byte[] artifact) {
+ this.artifact = artifact;
+ }
+
+ /**
+ * To entity action artifact entity.
+ *
+ * @return the action artifact entity
+ */
+ public ActionArtifactEntity toEntity() {
+ ActionArtifactEntity destination = new ActionArtifactEntity();
+ destination.setArtifactUuId(this.getArtifactUuId());
+ destination.setEffectiveVersion(this.getEffectiveVersion());
+ destination.setArtifact(ByteBuffer.wrap(this.getArtifact()));
+
+ return destination;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj instanceof ActionArtifact) {
+ ActionArtifact temp = (ActionArtifact) obj;
+ if (artifactUuId.equals(temp.getArtifactUuId())) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/ActionArtifactProtection.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/ActionArtifactProtection.java
new file mode 100644
index 0000000000..636f24d781
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/ActionArtifactProtection.java
@@ -0,0 +1,26 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.action.types;
+
+public enum ActionArtifactProtection {
+ readOnly,
+ readWrite
+}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/ActionLogResponseCode.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/ActionLogResponseCode.java
new file mode 100644
index 0000000000..c3de8aa4dc
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/ActionLogResponseCode.java
@@ -0,0 +1,90 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.action.types;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum ActionLogResponseCode {
+
+ MISSING_AUTHORIZATION(100),
+ FORBIDDEN(101),
+ UPDATE_ON_LOCKED_ENTITY(102),
+ CHECKIN_ON_LOCKED_ENTITY_OTHER_USER(103),
+ CHECKOUT_ON_LOCKED_ENTITY(104),
+ UNDO_CHECKOUT_ON_LOCKED_ENTITY(105),
+ DELETE_ARTIFACT_ON_LOCKED_ENTITY(106),
+ DELETE_ON_LOCKED_ENTITY_OTHER_USER(107),
+ INTERNAL_SERVER_ERROR(201),
+ MISSING_MANDATORY_PARAMS(300),
+ MISSING_INSTANCE_ID_HEADER(301),
+ MISSING_REQUEST_ID_HEADER(302),
+ MISSING_REQUEST_BODY(303),
+ INVALID_SEARCH_FILTER_CRITERIA(304),
+ INVALID_REQUESTED_VERSION(305),
+ CHECKSUM_ERROR(306),
+ ARTIFACT_TOO_BIG(307),
+ ACTION_NOT_FOUND(308),
+ ARTIFACT_NOT_FOUND(309),
+ METHOD_NOT_ALLOWED(310),
+ INVALID_REQUEST_PARAM(311),
+ ARTIFACT_PROTECTION_INVALID(312),
+ ACTION_NAME_UPDATE_NOT_ALLOWED(501),
+ //METHOD_NOT_ALLOWED(502),
+ ACTION_NAME_ALREADY_EXISTS(503),
+ MULTIPLE_FILTER_CRITERIA_NOT_SUPPORTED(504),
+ UPDATE_ON_UNLOCKED_ENTITY(505),
+ UPDATE_NOT_ALLOWED(506),
+ //METHOD_NOT_ALLOWED(507),
+ CHECKIN_ON_UNLOCKED_ENTITY(508),
+ SUBMIT_ON_FINAL_ENTITY(509),
+ SUBMIT_ON_LOCKED_ENTITY_OTHER_USER(510),
+ UNDO_CHECKOUT_ON_UNLOCKED_ENTITY(511),
+ ACTION_NOT_LOCKED(512),
+ ARTIFACT_ALREADY_EXISTS(513),
+ ARTIFACT_UPDATE_READ_ONLY(514),
+ ARTIFACT_DELETE_READ_ONLY(515),
+ ARTIFACT_NAME_INVALID(516),
+ ARTIFACT_CREATE_UPDATE_NOT_ALLOWED(518),
+ QUERY_FAILURE(519);
+
+ private static Map<Integer, ActionLogResponseCode> mapValueToEnum = new HashMap<>();
+
+ static {
+ for (ActionLogResponseCode responseCode : ActionLogResponseCode.values()) {
+ mapValueToEnum.put(responseCode.value, responseCode);
+ }
+ }
+
+ private int value;
+
+ ActionLogResponseCode(int value) {
+ this.value = value;
+ }
+
+ public static ActionLogResponseCode parseValue(int value) {
+ return mapValueToEnum.get(value);
+ }
+
+ public int getValue() {
+ return value;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/ActionRequest.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/ActionRequest.java
new file mode 100644
index 0000000000..1a20f9ecb7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/ActionRequest.java
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.action.types;
+
+public enum ActionRequest {
+ CREATE_ACTION,
+ UPDATE_ACTION,
+ DELETE_ACTION,
+ GET_FILTERED_ACTIONS,
+ GET_ACTIONS_INVARIANT_ID,
+ GET_ECOMP_COMPONENTS,
+ ACTION_VERSIONING,
+ CHECKOUT_ACTION,
+ CHECKIN_ACTION,
+ SUBMIT_ACTION,
+ UNDO_CHECKOUT_ACTION,
+ UPLOAD_ARTIFACT,
+ DOWNLOAD_ARTIFACT,
+ UPDATE_ARTIFACT,
+ DELETE_ARTIFACT,
+ GET_ACTION_UUID
+}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/ActionStatus.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/ActionStatus.java
new file mode 100644
index 0000000000..af3516e1eb
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/ActionStatus.java
@@ -0,0 +1,28 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.action.types;
+
+public enum ActionStatus {
+ Locked,
+ Available,
+ Final,
+ Deleted
+}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/ActionSubOperation.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/ActionSubOperation.java
new file mode 100644
index 0000000000..0dd97e6646
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/ActionSubOperation.java
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.action.types;
+
+public enum ActionSubOperation {
+ //Versioning operations
+ CREATE_ACTION_VERSION,
+ CREATE_ACTION_UNIQUE_VALUE,
+ GET_ACTION_VERSION,
+ //Action DAO operations
+ CREATE_ACTION_ENTITY,
+ GET_ACTIONENTITY_BY_ACTIONINVID,
+ GET_ACTIONENTITY_BY_ACTIONUUID,
+ GET_ACTIONENTITY_BY_VENDOR,
+ GET_ACTIONENTITY_BY_CATEGORY,
+ GET_ACTIONENTITY_BY_MODEL,
+ GET_ACTIONENTITY_BY_COMPONENT,
+ GET_ACTIONENTITY_BY_VERSION,
+ GET_ALL_ACTIONS,
+ GET_ACTIONINVID_BY_NAME,
+ GET_ECOMP_COMPONENTS_ENTITY,
+ GET_VERSIONINFO_FOR_ALL_ACTIONS,
+ GET_NAME_BY_ACTIONINVID,
+ CHECKOUT_ACTION,
+ UNDO_CHECKOUT_ACTION,
+ CHECKIN_ACTION,
+ SUBMIT_ACTION,
+ UPDATE_ACTION,
+ UPDATE_ACTION_STATUS,
+ DELETE_UNIQUEVALUE,
+ DELETE_ACTIONVERSION,
+ DELETE_ARTIFACT,
+ DELETE_ACTION,
+ //Validations
+ VALIDATE_ACTION_UNIQUE_NAME,
+ //Artifacts
+ GET_ARTIFACT_BY_ARTIFACTUUID,
+ CREATE_ACTION_ARTIFACT,
+ UPDATE_ACTION_ARTIFACT,
+ DELETE_ACTION_ARTIFACT,
+}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/EcompComponent.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/EcompComponent.java
new file mode 100644
index 0000000000..cbcebb13ef
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/EcompComponent.java
@@ -0,0 +1,104 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.action.types;
+
+import org.openecomp.sdc.action.dao.types.EcompComponentEntity;
+
+public class EcompComponent {
+
+ private String id;
+ private String name;
+
+ public EcompComponent() {
+ //Default constructor
+ }
+
+ public EcompComponent(String name, String id) {
+ this.name = name;
+ this.id = id;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * To entity ecomp component entity.
+ *
+ * @return the ecomp component entity
+ */
+ public EcompComponentEntity toEntity() {
+ EcompComponentEntity destination = new EcompComponentEntity();
+ destination.setId(this.getId());
+ destination.setName(this.getName());
+ return destination;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((id == null) ? 0 : id.hashCode());
+ result = prime * result + ((name == null) ? 0 : name.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object object) {
+ if (this == object) {
+ return true;
+ }
+ if (object == null) {
+ return false;
+ }
+ if (this.getClass() != object.getClass()) {
+ return false;
+ }
+ EcompComponent obj = (EcompComponent) object;
+ if (id == null) {
+ if (obj.id != null) {
+ return false;
+ }
+ } else if (!id.equals(obj.id)) {
+ return false;
+ }
+ if (name == null) {
+ if (obj.name != null) {
+ return false;
+ }
+ } else if (!name.equals(obj.name)) {
+ return false;
+ }
+ return true;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/util/ActionUtil.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/util/ActionUtil.java
new file mode 100644
index 0000000000..787f6abc26
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/util/ActionUtil.java
@@ -0,0 +1,372 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.action.util;
+
+import static org.openecomp.sdc.action.ActionConstants.BEGIN_TIMESTAMP;
+import static org.openecomp.sdc.action.ActionConstants.ELAPSED_TIME;
+import static org.openecomp.sdc.action.ActionConstants.END_TIMESTAMP;
+import static org.openecomp.sdc.action.ActionConstants.ERROR_CATEGORY;
+import static org.openecomp.sdc.action.ActionConstants.ERROR_CODE;
+import static org.openecomp.sdc.action.ActionConstants.ERROR_DESCRIPTION;
+import static org.openecomp.sdc.action.ActionConstants.RESPONSE_CODE;
+import static org.openecomp.sdc.action.ActionConstants.RESPONSE_DESCRIPTION;
+import static org.openecomp.sdc.action.ActionConstants.SERVICE_METRIC_BEGIN_TIMESTAMP;
+import static org.openecomp.sdc.action.ActionConstants.STATUS_CODE;
+import static org.openecomp.sdc.action.ActionConstants.TARGET_ENTITY;
+import static org.openecomp.sdc.action.ActionConstants.TARGET_SERVICE_NAME;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ARTIFACT_ALREADY_EXISTS_CODE;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ARTIFACT_CHECKSUM_ERROR_CODE;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ARTIFACT_DELETE_READ_ONLY;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ARTIFACT_DEL_LOCKED_OTHER_USER_CODE;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ARTIFACT_ENTITY_NOT_EXIST_CODE;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ARTIFACT_INVALID_NAME_CODE;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ARTIFACT_INVALID_PROTECTION_CODE;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ARTIFACT_TOO_BIG_ERROR_CODE;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ARTIFACT_UPDATE_READ_ONLY;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_AUTHENTICATION_ERR_CODE;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_AUTHORIZATION_ERR_CODE;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_CHECKIN_ON_ENTITY_LOCKED_BY_OTHER_USER;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_CHECKIN_ON_UNLOCKED_ENTITY;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_CHECKOUT_ON_LOCKED_ENTITY;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_CHECKOUT_ON_LOCKED_ENTITY_OTHER_USER;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_DELETE_ON_LOCKED_ENTITY_CODE;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_EDIT_ON_ENTITY_LOCKED_BY_OTHER_USER;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ENTITY_NOT_EXIST_CODE;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ENTITY_UNIQUE_VALUE_ERROR;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_INTERNAL_SERVER_ERR_CODE;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_INVALID_INSTANCE_ID_CODE;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_INVALID_PARAM_CODE;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_INVALID_REQUEST_BODY_CODE;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_INVALID_REQUEST_ID_CODE;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_INVALID_SEARCH_CRITERIA;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_MULT_SEARCH_CRITERIA;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_NOT_LOCKED_CODE;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_QUERY_FAILURE_CODE;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_REQUEST_INVALID_GENERIC_CODE;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_SUBMIT_FINALIZED_ENTITY_NOT_ALLOWED;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_SUBMIT_LOCKED_ENTITY_NOT_ALLOWED;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_UNDO_CHECKOUT_ON_ENTITY_LOCKED_BY_OTHER_USER;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_UNDO_CHECKOUT_ON_UNLOCKED_ENTITY;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_UPDATE_INVALID_VERSION;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_UPDATE_NOT_ALLOWED_CODE;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_UPDATE_NOT_ALLOWED_CODE_NAME;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_UPDATE_ON_UNLOCKED_ENTITY;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.ACTION_NAME_ALREADY_EXISTS;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.ACTION_NAME_UPDATE_NOT_ALLOWED;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.ACTION_NOT_FOUND;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.ACTION_NOT_LOCKED;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.ARTIFACT_ALREADY_EXISTS;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.ARTIFACT_DELETE_READ_ONLY;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.ARTIFACT_NAME_INVALID;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.ARTIFACT_NOT_FOUND;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.ARTIFACT_PROTECTION_INVALID;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.ARTIFACT_TOO_BIG;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.ARTIFACT_UPDATE_READ_ONLY;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.CHECKIN_ON_LOCKED_ENTITY_OTHER_USER;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.CHECKIN_ON_UNLOCKED_ENTITY;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.CHECKOUT_ON_LOCKED_ENTITY;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.CHECKSUM_ERROR;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.DELETE_ARTIFACT_ON_LOCKED_ENTITY;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.DELETE_ON_LOCKED_ENTITY_OTHER_USER;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.INTERNAL_SERVER_ERROR;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.INVALID_REQUESTED_VERSION;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.INVALID_REQUEST_PARAM;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.INVALID_SEARCH_FILTER_CRITERIA;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.MISSING_AUTHORIZATION;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.MISSING_INSTANCE_ID_HEADER;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.MISSING_REQUEST_BODY;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.MISSING_REQUEST_ID_HEADER;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.MULTIPLE_FILTER_CRITERIA_NOT_SUPPORTED;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.QUERY_FAILURE;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.SUBMIT_ON_FINAL_ENTITY;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.SUBMIT_ON_LOCKED_ENTITY_OTHER_USER;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.UNDO_CHECKOUT_ON_LOCKED_ENTITY;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.UNDO_CHECKOUT_ON_UNLOCKED_ENTITY;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.UPDATE_NOT_ALLOWED;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.UPDATE_ON_LOCKED_ENTITY;
+import static org.openecomp.sdc.action.types.ActionLogResponseCode.UPDATE_ON_UNLOCKED_ENTITY;
+
+import org.openecomp.sdc.action.logging.CategoryLogLevel;
+import org.openecomp.sdc.action.logging.StatusCode;
+import org.openecomp.sdc.action.types.ActionLogResponseCode;
+import org.openecomp.sdc.action.types.ActionSubOperation;
+import org.slf4j.MDC;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.time.ZoneOffset;
+import java.util.Date;
+import java.util.TimeZone;
+
+
+public class ActionUtil {
+
+ private static final String UTC_DATE_FORMAT = "dd MMM yyyy kk:mm:ss z";
+ private static final String LOG_UTC_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSS";
+
+ /**
+ * Get Current Timestamp in UTC format.
+ *
+ * @return Current Timestamp in UTC format.
+ */
+ public static Date getCurrentTimeStampUtc() {
+ return Date.from(java.time.ZonedDateTime.now(ZoneOffset.UTC).toInstant());
+ }
+
+ /**
+ * Convert timestamp to UTC format date string.
+ *
+ * @param timeStamp UTC timestamp to be converted to the UTC Date format.
+ * @return UTC formatted Date string from timestamp.
+ */
+ public static String getUtcDateStringFromTimestamp(Date timeStamp) {
+ DateFormat df = new SimpleDateFormat(UTC_DATE_FORMAT);
+ df.setTimeZone(TimeZone.getTimeZone("GMT"));
+ return df.format(timeStamp);
+ }
+
+ /**
+ * Convert timestamp to UTC format date string.
+ *
+ * @param timeStamp UTC timestamp to be converted to the UTC Date format.
+ * @return UTC formatted Date string from timestamp.
+ */
+ public static String getLogUtcDateStringFromTimestamp(Date timeStamp) {
+ DateFormat df = new SimpleDateFormat(LOG_UTC_DATE_FORMAT);
+ df.setTimeZone(TimeZone.getTimeZone("GMT"));
+ return df.format(timeStamp);
+ }
+
+ /**
+ * Method to set up specific attributes MDC for the current logging operation.
+ *
+ * @param subOperation Request Name.
+ */
+ public static void actionLogPreProcessor(ActionSubOperation subOperation, String targetEntity) {
+ MDC.put(BEGIN_TIMESTAMP, String.valueOf(System.currentTimeMillis()));
+ if (subOperation != null) {
+ MDC.put(TARGET_SERVICE_NAME, subOperation.name());
+ }
+
+ MDC.put(TARGET_ENTITY, targetEntity);
+ }
+
+ /**
+ * Method to enhance the MDC after the logging operation for Metrics and Audit logs.
+ *
+ * @param statusCode Response code for the current operation.
+ */
+ public static void actionLogPostProcessor(StatusCode statusCode) {
+ actionLogPostProcessor(statusCode, false);
+ }
+
+ public static void actionLogPostProcessor(StatusCode statusCode, boolean isServiceMetricLog) {
+ actionLogPostProcessor(statusCode, null, isServiceMetricLog);
+ }
+
+ public static void actionLogPostProcessor(StatusCode statusCode, String responseCode,
+ boolean isServiceMetricLog) {
+ actionLogPostProcessor(statusCode, responseCode, null, isServiceMetricLog);
+ }
+
+ /**
+ * Method to enhance the MDC after the logging operation for Metrics and Audit logs.
+ *
+ * @param statusCode Response code for the current operation.
+ */
+
+ public static void actionLogPostProcessor(StatusCode statusCode, String responseCode,
+ String responseDescription,
+ boolean isServiceMetricLog) {
+ MDC.put(STATUS_CODE, statusCode.name());
+ if (responseCode != null) {
+ int logResponseCode = getLogResponseCode(responseCode);
+ MDC.put(RESPONSE_CODE, Integer.toString(logResponseCode));
+ }
+ MDC.put(RESPONSE_DESCRIPTION, responseDescription);
+ long beginTimestamp;
+ if (isServiceMetricLog) {
+ beginTimestamp = Long.valueOf(MDC.get(SERVICE_METRIC_BEGIN_TIMESTAMP));
+ } else {
+ beginTimestamp = Long.valueOf(MDC.get(BEGIN_TIMESTAMP));
+ }
+ long endTimestamp = System.currentTimeMillis();
+ MDC.put(BEGIN_TIMESTAMP, getLogUtcDateStringFromTimestamp(new Date(beginTimestamp)));
+ MDC.put(END_TIMESTAMP, getLogUtcDateStringFromTimestamp(new Date(endTimestamp)));
+ MDC.put(ELAPSED_TIME, String.valueOf(endTimestamp - beginTimestamp));
+ }
+
+ /**
+ * Action Library Error logging Helper.
+ *
+ * @param errorCategory WARN or ERROR.
+ * @param errorCode Action Library exception code.
+ * @param errorDescription Description of the error.
+ */
+ public static void actionErrorLogProcessor(CategoryLogLevel errorCategory, String errorCode,
+ String errorDescription) {
+ MDC.put(ERROR_CATEGORY, errorCategory.name());
+ if (errorCode != null) {
+ String errorType = "";
+ switch (errorCategory) {
+ case WARN:
+ errorType = "W";
+ break;
+ case ERROR:
+ errorType = "E";
+ break;
+ case FATAL:
+ errorType = "F";
+ break;
+ default:
+ break;
+ }
+ MDC.put(ERROR_CODE, getLogResponseCode(errorCode) + errorType);
+ }
+ MDC.put(ERROR_DESCRIPTION, errorDescription);
+ }
+
+ /**
+ * Method to convert Action Library exception codes to OPENECOMP Audit codes in {@link.
+ * ActionLogResponseCode} e.g: ACT1060 --> 201.
+ *
+ * @param errorCode Action library exception code.
+ * @return Audit log code corresponding to the Action Library exception.
+ */
+ public static int getLogResponseCode(String errorCode) {
+ ActionLogResponseCode responseCode = INTERNAL_SERVER_ERROR;
+ switch (errorCode) {
+ case ACTION_REQUEST_INVALID_GENERIC_CODE:
+ responseCode = INVALID_REQUEST_PARAM;
+ break;
+ case ACTION_AUTHENTICATION_ERR_CODE:
+ break;
+ case ACTION_AUTHORIZATION_ERR_CODE:
+ responseCode = MISSING_AUTHORIZATION;
+ break;
+ case ACTION_INVALID_INSTANCE_ID_CODE:
+ responseCode = MISSING_INSTANCE_ID_HEADER;
+ break;
+ case ACTION_INVALID_REQUEST_ID_CODE:
+ responseCode = MISSING_REQUEST_ID_HEADER;
+ break;
+ case ACTION_INVALID_PARAM_CODE:
+ responseCode = INVALID_REQUEST_PARAM;
+ break;
+ case ACTION_INVALID_REQUEST_BODY_CODE:
+ responseCode = MISSING_REQUEST_BODY;
+ break;
+ case ACTION_UPDATE_NOT_ALLOWED_CODE_NAME:
+ responseCode = ACTION_NAME_UPDATE_NOT_ALLOWED;
+ break;
+ case ACTION_CHECKOUT_ON_LOCKED_ENTITY:
+ responseCode = CHECKOUT_ON_LOCKED_ENTITY;
+ break;
+ case ACTION_ENTITY_UNIQUE_VALUE_ERROR:
+ responseCode = ACTION_NAME_ALREADY_EXISTS;
+ break;
+ case ACTION_INVALID_SEARCH_CRITERIA:
+ responseCode = INVALID_SEARCH_FILTER_CRITERIA;
+ break;
+ case ACTION_MULT_SEARCH_CRITERIA:
+ responseCode = MULTIPLE_FILTER_CRITERIA_NOT_SUPPORTED;
+ break;
+ case ACTION_UPDATE_ON_UNLOCKED_ENTITY:
+ responseCode = UPDATE_ON_UNLOCKED_ENTITY;
+ break;
+ case ACTION_UPDATE_INVALID_VERSION:
+ responseCode = INVALID_REQUESTED_VERSION;
+ break;
+ case ACTION_UPDATE_NOT_ALLOWED_CODE:
+ responseCode = UPDATE_NOT_ALLOWED;
+ break;
+ case ACTION_CHECKIN_ON_UNLOCKED_ENTITY:
+ responseCode = CHECKIN_ON_UNLOCKED_ENTITY;
+ break;
+ case ACTION_SUBMIT_FINALIZED_ENTITY_NOT_ALLOWED:
+ responseCode = SUBMIT_ON_FINAL_ENTITY;
+ break;
+ case ACTION_SUBMIT_LOCKED_ENTITY_NOT_ALLOWED:
+ responseCode = SUBMIT_ON_LOCKED_ENTITY_OTHER_USER;
+ break;
+ case ACTION_UNDO_CHECKOUT_ON_UNLOCKED_ENTITY:
+ responseCode = UNDO_CHECKOUT_ON_UNLOCKED_ENTITY;
+ break;
+ case ACTION_NOT_LOCKED_CODE:
+ responseCode = ACTION_NOT_LOCKED;
+ break;
+ case ACTION_ARTIFACT_CHECKSUM_ERROR_CODE:
+ responseCode = CHECKSUM_ERROR;
+ break;
+ case ACTION_ARTIFACT_TOO_BIG_ERROR_CODE:
+ responseCode = ARTIFACT_TOO_BIG;
+ break;
+ case ACTION_ARTIFACT_ALREADY_EXISTS_CODE:
+ responseCode = ARTIFACT_ALREADY_EXISTS;
+ break;
+ case ACTION_ARTIFACT_UPDATE_READ_ONLY:
+ responseCode = ARTIFACT_UPDATE_READ_ONLY;
+ break;
+ case ACTION_ARTIFACT_DELETE_READ_ONLY:
+ responseCode = ARTIFACT_DELETE_READ_ONLY;
+ break;
+ case ACTION_ARTIFACT_INVALID_PROTECTION_CODE:
+ responseCode = ARTIFACT_PROTECTION_INVALID;
+ break;
+ case ACTION_ARTIFACT_INVALID_NAME_CODE:
+ responseCode = ARTIFACT_NAME_INVALID;
+ break;
+ case ACTION_EDIT_ON_ENTITY_LOCKED_BY_OTHER_USER:
+ responseCode = UPDATE_ON_LOCKED_ENTITY;
+ break;
+ case ACTION_CHECKIN_ON_ENTITY_LOCKED_BY_OTHER_USER:
+ responseCode = CHECKIN_ON_LOCKED_ENTITY_OTHER_USER;
+ break;
+ case ACTION_CHECKOUT_ON_LOCKED_ENTITY_OTHER_USER:
+ responseCode = CHECKOUT_ON_LOCKED_ENTITY;
+ break;
+ case ACTION_UNDO_CHECKOUT_ON_ENTITY_LOCKED_BY_OTHER_USER:
+ responseCode = UNDO_CHECKOUT_ON_LOCKED_ENTITY;
+ break;
+ case ACTION_ENTITY_NOT_EXIST_CODE:
+ responseCode = ACTION_NOT_FOUND;
+ break;
+ case ACTION_ARTIFACT_ENTITY_NOT_EXIST_CODE:
+ responseCode = ARTIFACT_NOT_FOUND;
+ break;
+ case ACTION_ARTIFACT_DEL_LOCKED_OTHER_USER_CODE:
+ responseCode = DELETE_ARTIFACT_ON_LOCKED_ENTITY;
+ break;
+ case ACTION_DELETE_ON_LOCKED_ENTITY_CODE:
+ responseCode = DELETE_ON_LOCKED_ENTITY_OTHER_USER;
+ break;
+ case ACTION_INTERNAL_SERVER_ERR_CODE:
+ responseCode = INTERNAL_SERVER_ERROR;
+ break;
+ case ACTION_QUERY_FAILURE_CODE:
+ responseCode = QUERY_FAILURE;
+ break;
+ default:
+ break;
+ }
+ return responseCode.getValue();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/resources/factoryConfiguration.json b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/resources/factoryConfiguration.json
new file mode 100644
index 0000000000..44da8f085e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/resources/factoryConfiguration.json
@@ -0,0 +1,4 @@
+{
+ "org.openecomp.sdc.action.dao.ActionDaoFactory":"org.openecomp.sdc.action.dao.impl.ActionDaoFactoryImpl",
+ "org.openecomp.sdc.action.dao.ActionArtifactDaoFactory":"org.openecomp.sdc.action.dao.impl.ActionArtifactDaoFactoryImpl"
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-core/pom.xml b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-core/pom.xml
new file mode 100644
index 0000000000..3abcbb55e7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-core/pom.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+
+ <parent>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-action-lib</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+
+ <artifactId>openecomp-sdc-action-core</artifactId>
+
+
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-action-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-versioning-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc.sdc_common</groupId>
+ <artifactId>openecomp-logging-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-core/src/main/java/org/openecomp/sdc/action/dao/impl/ActionArtifactDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-core/src/main/java/org/openecomp/sdc/action/dao/impl/ActionArtifactDaoFactoryImpl.java
new file mode 100644
index 0000000000..2767c9eeca
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-core/src/main/java/org/openecomp/sdc/action/dao/impl/ActionArtifactDaoFactoryImpl.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.action.dao.impl;
+
+import org.openecomp.sdc.action.dao.ActionArtifactDao;
+import org.openecomp.sdc.action.dao.ActionArtifactDaoFactory;
+
+public class ActionArtifactDaoFactoryImpl extends ActionArtifactDaoFactory {
+ private static final ActionArtifactDao INSTANCE = new ActionArtifactDaoImpl();
+
+ @Override
+ public ActionArtifactDao createInterface() {
+ return INSTANCE;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-core/src/main/java/org/openecomp/sdc/action/dao/impl/ActionArtifactDaoImpl.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-core/src/main/java/org/openecomp/sdc/action/dao/impl/ActionArtifactDaoImpl.java
new file mode 100644
index 0000000000..3e884c24e3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-core/src/main/java/org/openecomp/sdc/action/dao/impl/ActionArtifactDaoImpl.java
@@ -0,0 +1,150 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.action.dao.impl;
+
+import static org.openecomp.sdc.action.ActionConstants.TARGET_ENTITY_DB;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_INTERNAL_SERVER_ERR_CODE;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_QUERY_FAILURE_CODE;
+import static org.openecomp.sdc.action.errors.ActionErrorConstants.ACTION_QUERY_FAILURE_MSG;
+import static org.openecomp.sdc.action.util.ActionUtil.actionLogPostProcessor;
+
+import com.datastax.driver.core.exceptions.NoHostAvailableException;
+import com.datastax.driver.mapping.Mapper;
+import com.datastax.driver.mapping.Result;
+import com.datastax.driver.mapping.annotations.Accessor;
+import com.datastax.driver.mapping.annotations.Query;
+import org.openecomp.core.dao.impl.CassandraBaseDao;
+import org.openecomp.core.logging.api.Logger;
+import org.openecomp.core.logging.api.LoggerFactory;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import org.openecomp.sdc.action.dao.ActionArtifactDao;
+import org.openecomp.sdc.action.dao.types.ActionArtifactEntity;
+import org.openecomp.sdc.action.errors.ActionException;
+import org.openecomp.sdc.action.logging.CategoryLogLevel;
+import org.openecomp.sdc.action.logging.StatusCode;
+import org.openecomp.sdc.action.types.ActionArtifact;
+import org.openecomp.sdc.action.types.ActionSubOperation;
+import org.openecomp.sdc.action.util.ActionUtil;
+
+import java.util.Collection;
+import java.util.List;
+
+public class ActionArtifactDaoImpl extends CassandraBaseDao<ActionArtifactEntity>
+ implements ActionArtifactDao {
+ private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static final Mapper<ActionArtifactEntity> mapper =
+ noSqlDb.getMappingManager().mapper(ActionArtifactEntity.class);
+ private static final ActionArtifactAccessor accessor =
+ noSqlDb.getMappingManager().createAccessor(ActionArtifactAccessor.class);
+ private final Logger log = (Logger) LoggerFactory.getLogger(this.getClass().getName());
+
+ @Override
+ protected Mapper<ActionArtifactEntity> getMapper() {
+ return mapper;
+ }
+
+ @Override
+ protected Object[] getKeys(ActionArtifactEntity entity) {
+ return new Object[]{entity.getArtifactUuId(), entity.getEffectiveVersion()};
+ }
+
+ @Override
+ public Collection<ActionArtifactEntity> list(ActionArtifactEntity entity) {
+ return null;
+ }
+
+
+ @Override
+ public void uploadArtifact(ActionArtifact data) {
+ log.debug(" entering uploadArtifact with artifactName= " + data.getArtifactName());
+ try {
+ ActionUtil.actionLogPreProcessor(ActionSubOperation.CREATE_ACTION_ARTIFACT, TARGET_ENTITY_DB);
+ this.create(data.toEntity());
+ ActionUtil.actionLogPostProcessor(StatusCode.COMPLETE, null, "", false);
+ log.metrics("");
+ } catch (NoHostAvailableException noHostAvailableException) {
+ logGenericException(noHostAvailableException);
+ throw new ActionException(ACTION_INTERNAL_SERVER_ERR_CODE,
+ ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG);
+ }
+ log.debug(" exit uploadArtifact with artifactName= " + data.getArtifactName());
+ }
+
+ @Override
+ public ActionArtifact downloadArtifact(int effectiveVersion, String artifactUuId) {
+ log.debug(" entering downloadArtifact with artifactUUID= " + artifactUuId);
+ ActionArtifact actionArtifact = null;
+ try {
+ ActionUtil
+ .actionLogPreProcessor(ActionSubOperation.GET_ARTIFACT_BY_ARTIFACTUUID, TARGET_ENTITY_DB);
+ Result<ActionArtifactEntity> result;
+ result = accessor.getArtifactByUuId(effectiveVersion, artifactUuId);
+ ActionUtil.actionLogPostProcessor(StatusCode.COMPLETE, null, "", false);
+ log.metrics("");
+ List<ActionArtifactEntity> artifactEntities = result.all();
+ if (artifactEntities != null && !artifactEntities.isEmpty()) {
+ ActionArtifactEntity artifactEntity = artifactEntities.get(0);
+ actionArtifact = artifactEntity.toDto();
+ }
+ } catch (NoHostAvailableException noHostAvailableException) {
+ logGenericException(noHostAvailableException);
+ throw new ActionException(ACTION_INTERNAL_SERVER_ERR_CODE,
+ ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG);
+ }
+ log.debug(" exit downloadArtifact with artifactUUID= " + artifactUuId);
+ return actionArtifact;
+ }
+
+ @Override
+ public void updateArtifact(ActionArtifact data) {
+ log.debug(" entering updateArtifact with artifactName= " + data.getArtifactName());
+ try {
+ ActionUtil.actionLogPreProcessor(ActionSubOperation.UPDATE_ACTION_ARTIFACT, TARGET_ENTITY_DB);
+ this.update(data.toEntity());
+ ActionUtil.actionLogPostProcessor(StatusCode.COMPLETE, null, "", false);
+ log.metrics("");
+ } catch (NoHostAvailableException noHostAvailableException) {
+ logGenericException(noHostAvailableException);
+ throw new ActionException(ACTION_INTERNAL_SERVER_ERR_CODE,
+ ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG);
+ }
+ log.debug(" exit updateArtifact with artifactName= " + data.getArtifactName());
+ }
+
+ private void logGenericException(Exception exception) {
+ ActionUtil.actionLogPostProcessor(StatusCode.ERROR, ACTION_QUERY_FAILURE_CODE,
+ ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG, false);
+ log.metrics("");
+ ActionUtil.actionErrorLogProcessor(CategoryLogLevel.FATAL, ACTION_QUERY_FAILURE_CODE,
+ ACTION_QUERY_FAILURE_MSG);
+ log.error(exception.getMessage());
+ }
+
+ @Accessor
+ interface ActionArtifactAccessor {
+
+ @Query(
+ "SELECT * FROM action_artifact WHERE effective_version <= ? and artifactuuid = ? limit 1")
+ Result<ActionArtifactEntity> getArtifactByUuId(int effectiveVersion, String artifactUuId);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-core/src/main/java/org/openecomp/sdc/action/dao/impl/ActionDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-core/src/main/java/org/openecomp/sdc/action/dao/impl/ActionDaoFactoryImpl.java
new file mode 100644
index 0000000000..66bd20687d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-core/src/main/java/org/openecomp/sdc/action/dao/impl/ActionDaoFactoryImpl.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.action.dao.impl;
+
+import org.openecomp.sdc.action.dao.ActionDao;
+import org.openecomp.sdc.action.dao.ActionDaoFactory;
+
+public class ActionDaoFactoryImpl extends ActionDaoFactory {
+ private static final ActionDao INSTANCE = new ActionDaoImpl();
+
+ @Override
+ public ActionDao createInterface() {
+ return INSTANCE;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-core/src/main/java/org/openecomp/sdc/action/dao/impl/ActionDaoImpl.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-core/src/main/java/org/openecomp/sdc/action/dao/impl/ActionDaoImpl.java
new file mode 100644
index 0000000000..29b5171470
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-core/src/main/java/org/openecomp/sdc/action/dao/impl/ActionDaoImpl.java
@@ -0,0 +1,583 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.action.dao.impl;
+
+import static com.datastax.driver.core.querybuilder.QueryBuilder.eq;
+import static com.datastax.driver.core.querybuilder.QueryBuilder.in;
+import static com.datastax.driver.core.querybuilder.QueryBuilder.set;
+import static org.openecomp.core.nosqldb.impl.cassandra.CassandraSessionFactory.getSession;
+import static org.openecomp.sdc.action.util.ActionUtil.actionLogPostProcessor;
+
+import com.datastax.driver.core.ResultSet;
+import com.datastax.driver.core.Row;
+import com.datastax.driver.core.Statement;
+import com.datastax.driver.core.UDTValue;
+import com.datastax.driver.core.exceptions.NoHostAvailableException;
+import com.datastax.driver.core.querybuilder.QueryBuilder;
+import com.datastax.driver.mapping.Mapper;
+import com.datastax.driver.mapping.Result;
+import com.datastax.driver.mapping.UDTMapper;
+import com.datastax.driver.mapping.annotations.Accessor;
+import com.datastax.driver.mapping.annotations.Query;
+import org.openecomp.core.dao.impl.CassandraBaseDao;
+import org.openecomp.core.logging.api.Logger;
+import org.openecomp.core.logging.api.LoggerFactory;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import org.openecomp.core.utilities.json.JsonUtil;
+import org.openecomp.sdc.action.ActionConstants;
+import org.openecomp.sdc.action.dao.ActionDao;
+import org.openecomp.sdc.action.dao.types.ActionEntity;
+import org.openecomp.sdc.action.dao.types.EcompComponentEntity;
+import org.openecomp.sdc.action.errors.ActionErrorConstants;
+import org.openecomp.sdc.action.errors.ActionException;
+import org.openecomp.sdc.action.logging.CategoryLogLevel;
+import org.openecomp.sdc.action.logging.StatusCode;
+import org.openecomp.sdc.action.types.Action;
+import org.openecomp.sdc.action.types.ActionStatus;
+import org.openecomp.sdc.action.types.ActionSubOperation;
+import org.openecomp.sdc.action.types.EcompComponent;
+import org.openecomp.sdc.action.util.ActionUtil;
+import org.openecomp.sdc.versioning.VersioningManagerFactory;
+import org.openecomp.sdc.versioning.dao.VersionInfoDao;
+import org.openecomp.sdc.versioning.dao.VersionInfoDaoFactory;
+import org.openecomp.sdc.versioning.dao.VersionInfoDeletedDao;
+import org.openecomp.sdc.versioning.dao.VersionInfoDeletedDaoFactory;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.dao.types.VersionInfoDeletedEntity;
+import org.openecomp.sdc.versioning.dao.types.VersionInfoEntity;
+import org.openecomp.sdc.versioning.types.VersionableEntityMetadata;
+import org.slf4j.MDC;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+public class ActionDaoImpl extends CassandraBaseDao<ActionEntity> implements ActionDao {
+ private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static final Mapper<ActionEntity> mapper =
+ noSqlDb.getMappingManager().mapper(ActionEntity.class);
+ private static final ActionAccessor accessor =
+ noSqlDb.getMappingManager().createAccessor(ActionAccessor.class);
+ private static final UDTMapper<Version> versionMapper =
+ noSqlDb.getMappingManager().udtMapper(Version.class);
+ private static final VersionInfoDao versionInfoDao =
+ VersionInfoDaoFactory.getInstance().createInterface();
+ private static final VersionInfoDeletedDao versionInfoDeletedDao =
+ VersionInfoDeletedDaoFactory.getInstance().createInterface();
+
+ private final Logger log = (Logger) LoggerFactory.getLogger(this.getClass().getName());
+
+
+ @Override
+ public void registerVersioning(String versionableEntityType) {
+ VersioningManagerFactory.getInstance().createInterface()
+ .register(versionableEntityType, new VersionableEntityMetadata(
+ mapper.getTableMetadata().getName(),
+ mapper.getTableMetadata().getPartitionKey().get(0).getName(),
+ mapper.getTableMetadata().getPartitionKey().get(1).getName()));
+ }
+
+ @Override
+ public Action createAction(Action actionDto) {
+ try {
+ ActionUtil.actionLogPreProcessor(
+ ActionSubOperation.CREATE_ACTION_ENTITY, ActionConstants.TARGET_ENTITY_DB);
+ this.create(actionDto.toEntity());
+ ActionUtil.actionLogPostProcessor(StatusCode.COMPLETE, null, "", false);
+ log.metrics("");
+ return actionDto;
+ } catch (NoHostAvailableException noHostAvailableException) {
+ logGenericException(noHostAvailableException);
+ throw new ActionException(ActionErrorConstants.ACTION_INTERNAL_SERVER_ERR_CODE,
+ ActionErrorConstants.ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG);
+ }
+ }
+
+ @Override
+ public Action updateAction(Action actionDto) {
+ try {
+ log.debug(" entering updateAction with actionUUID= " + actionDto.getActionUuId());
+ ActionUtil
+ .actionLogPreProcessor(ActionSubOperation.UPDATE_ACTION,
+ ActionConstants.TARGET_ENTITY_DB);
+ this.update(actionDto.toEntity());
+ ActionUtil.actionLogPostProcessor(StatusCode.COMPLETE, null, "", false);
+ log.metrics("");
+ log.debug(" exit updateAction with actionUUID= " + actionDto.getActionUuId());
+ return actionDto;
+ } catch (NoHostAvailableException noHostAvailableException) {
+ logGenericException(noHostAvailableException);
+ throw new ActionException(ActionErrorConstants.ACTION_INTERNAL_SERVER_ERR_CODE,
+ ActionErrorConstants.ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG);
+ }
+ }
+
+ @Override
+ public void deleteAction(String actionInvariantUuId) {
+ try {
+ log.debug("entering deleteAction with actionInvariantUUID = " + actionInvariantUuId);
+ ActionUtil
+ .actionLogPreProcessor(ActionSubOperation.GET_ACTION_VERSION,
+ ActionConstants.TARGET_ENTITY_DB);
+ VersionInfoDeletedEntity activeVersionEntity = versionInfoDeletedDao.get(
+ new VersionInfoDeletedEntity(ActionConstants.ACTION_VERSIONABLE_TYPE,
+ actionInvariantUuId));
+ ActionUtil.actionLogPostProcessor(StatusCode.COMPLETE, null, "", false);
+ log.metrics("");
+ Version activeVersion = activeVersionEntity.getActiveVersion();
+ Statement getNameFromInvUuId = QueryBuilder.select().column("name").from("dox", "Action")
+ .where(eq("actioninvariantuuid", actionInvariantUuId))
+ .and(in("version", versionMapper.toUDT(activeVersion)));
+ ActionUtil
+ .actionLogPreProcessor(ActionSubOperation.GET_NAME_BY_ACTIONINVID,
+ ActionConstants.TARGET_ENTITY_DB);
+ ResultSet results = getSession().execute(getNameFromInvUuId);
+ ActionUtil.actionLogPostProcessor(StatusCode.COMPLETE, null, "", false);
+ log.metrics("");
+ if (!results.isExhausted()) {
+ String name = results.one().getString("name");
+ List<Version> versions = getVersionsByName(name);
+ updateActionStatusForDelete(actionInvariantUuId, versions);
+ }
+ } catch (NoHostAvailableException noHostAvailableException) {
+ logGenericException(noHostAvailableException);
+ throw new ActionException(ActionErrorConstants.ACTION_INTERNAL_SERVER_ERR_CODE,
+ ActionErrorConstants.ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG);
+ }
+ log.debug("exit deleteAction");
+ }
+
+
+ @Override
+ public List<Action> getActionsByActionInvariantUuId(String actionInvariantUuId) {
+ List<Action> actions = new ArrayList<>();
+ try {
+ log.debug(" entering getActionsByActionInvariantUUID with actionInvariantUUID= "
+ + actionInvariantUuId);
+ Set<Version> viewableVersions = new HashSet<>();
+ VersionPredicate filter = new VersionPredicate();
+ ActionUtil
+ .actionLogPreProcessor(ActionSubOperation.GET_ACTION_VERSION,
+ ActionConstants.TARGET_ENTITY_DB);
+ VersionInfoEntity versionInfoEntity = versionInfoDao
+ .get(new VersionInfoEntity(ActionConstants.ACTION_VERSIONABLE_TYPE, actionInvariantUuId));
+ if (versionInfoEntity == null) {
+ //Check for action in the Delete version info table
+ VersionInfoDeletedEntity versionInfoDeletedEntity = versionInfoDeletedDao.get(
+ new VersionInfoDeletedEntity(ActionConstants.ACTION_VERSIONABLE_TYPE,
+ actionInvariantUuId));
+ if (versionInfoDeletedEntity != null) {
+ viewableVersions = versionInfoDeletedEntity.getViewableVersions();
+ //Remove intermediate minor versions from viewable versions
+ if (versionInfoDeletedEntity.getActiveVersion() != null) {
+ filter.activeVersion = versionInfoDeletedEntity.getActiveVersion();
+ filter.finalVersion = versionInfoDeletedEntity.getLatestFinalVersion();
+ viewableVersions.removeIf(filter::isIntermediateMinorVersion);
+ }
+ }
+ } else {
+ viewableVersions = versionInfoEntity.getViewableVersions();
+ //Remove intermediate minor versions from viewable versions
+ if (versionInfoEntity.getActiveVersion() != null) {
+ filter.activeVersion = versionInfoEntity.getActiveVersion();
+ filter.finalVersion = versionInfoEntity.getLatestFinalVersion();
+ viewableVersions.removeIf(filter::isIntermediateMinorVersion);
+ }
+ //Add candidate version if available
+ if (versionInfoEntity.getCandidate() != null) {
+ viewableVersions.add(versionInfoEntity.getCandidate().getVersion());
+ }
+ }
+ MDC.put(ActionConstants.TARGET_ENTITY, ActionConstants.TARGET_ENTITY_DB);
+ ActionUtil.actionLogPostProcessor(StatusCode.COMPLETE, null, "", false);
+ log.metrics("");
+
+ log.debug(
+ "Found " + viewableVersions + " viewable version for action with actionInvariantUUID "
+ + actionInvariantUuId);
+
+ //Fetch action data for the viewable versions
+ if (!viewableVersions.isEmpty()) {
+ ActionUtil.actionLogPreProcessor(ActionSubOperation.GET_ACTIONENTITY_BY_ACTIONINVID,
+ ActionConstants.TARGET_ENTITY_DB);
+ Result<ActionEntity> result =
+ accessor.getActionsByInvId(actionInvariantUuId, viewableVersions);
+ ActionUtil.actionLogPostProcessor(StatusCode.COMPLETE, null, "", false);
+ log.metrics("");
+ if (result != null) {
+ actions
+ .addAll(result.all().stream().map(ActionEntity::toDto).collect(Collectors.toList()));
+ }
+ }
+ } catch (NoHostAvailableException noHostAvailableException) {
+ logGenericException(noHostAvailableException);
+ throw new ActionException(ActionErrorConstants.ACTION_INTERNAL_SERVER_ERR_CODE,
+ ActionErrorConstants.ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG);
+ }
+ log.debug(
+ " exit getActionsByActionInvariantUUID with actionInvariantUUID= " + actionInvariantUuId);
+ return actions;
+ }
+
+ private void logGenericException(Exception exception) {
+ ActionUtil
+ .actionLogPostProcessor(StatusCode.ERROR, ActionErrorConstants.ACTION_QUERY_FAILURE_CODE,
+ ActionErrorConstants.ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG, false);
+ log.metrics("");
+ ActionUtil.actionErrorLogProcessor(
+ CategoryLogLevel.FATAL, ActionErrorConstants.ACTION_QUERY_FAILURE_CODE,
+ ActionErrorConstants.ACTION_QUERY_FAILURE_MSG);
+ log.error(exception.getMessage());
+ }
+
+
+ @Override
+ public List<Action> getFilteredActions(String filterType, String filterId) {
+ List<Action> actions = new ArrayList<>();
+ Result<ActionEntity> result = null;
+ log.debug(
+ " entering getFilteredActions By filterType = " + filterType + " With value = " + filterId);
+ try {
+ switch (filterType) {
+ case ActionConstants.FILTER_TYPE_VENDOR:
+ ActionUtil
+ .actionLogPreProcessor(ActionSubOperation.GET_ACTIONENTITY_BY_VENDOR,
+ ActionConstants.TARGET_ENTITY_DB);
+ result = accessor.getActionsByVendor(filterId);
+ ActionUtil.actionLogPostProcessor(StatusCode.COMPLETE);
+ log.metrics("");
+ break;
+ case ActionConstants.FILTER_TYPE_CATEGORY:
+ ActionUtil.actionLogPreProcessor(ActionSubOperation.GET_ACTIONENTITY_BY_CATEGORY,
+ ActionConstants.TARGET_ENTITY_DB);
+ result = accessor.getActionsByCategory(filterId);
+ ActionUtil.actionLogPostProcessor(StatusCode.COMPLETE);
+ log.metrics("");
+ break;
+ case ActionConstants.FILTER_TYPE_MODEL:
+ ActionUtil
+ .actionLogPreProcessor(ActionSubOperation.GET_ACTIONENTITY_BY_MODEL,
+ ActionConstants.TARGET_ENTITY_DB);
+ result = accessor.getActionsByModel(filterId);
+ ActionUtil.actionLogPostProcessor(StatusCode.COMPLETE);
+ log.metrics("");
+ break;
+ case ActionConstants.FILTER_TYPE_ECOMP_COMPONENT:
+ ActionUtil.actionLogPreProcessor(ActionSubOperation.GET_ACTIONENTITY_BY_COMPONENT,
+ ActionConstants.TARGET_ENTITY_DB);
+ result = accessor.getActionsByEcompComponent(filterId);
+ ActionUtil.actionLogPostProcessor(StatusCode.COMPLETE);
+ log.metrics("");
+ break;
+ case ActionConstants.FILTER_TYPE_NONE:
+ ActionUtil
+ .actionLogPreProcessor(ActionSubOperation.GET_ALL_ACTIONS,
+ ActionConstants.TARGET_ENTITY_DB);
+ result = accessor.getAllActions();
+ ActionUtil.actionLogPostProcessor(StatusCode.COMPLETE);
+ log.metrics("");
+ break;
+ case ActionConstants.FILTER_TYPE_NAME:
+ ActionUtil
+ .actionLogPreProcessor(ActionSubOperation.GET_ACTIONINVID_BY_NAME,
+ ActionConstants.TARGET_ENTITY_DB);
+ result = accessor.getInvIdByName(filterId);
+ ActionUtil.actionLogPostProcessor(StatusCode.COMPLETE);
+ log.metrics("");
+ List<ActionEntity> actionEntities = result.all();
+ if (actionEntities != null && !actionEntities.isEmpty()) {
+ String actionInvariantUuId = actionEntities.get(0).getActionInvariantUuId();
+ if (actionInvariantUuId != null) {
+ return getActionsByActionInvariantUuId(actionInvariantUuId);
+ } else {
+ return actions;
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ if (result != null) {
+ actions.addAll(result.all().stream().map(ActionEntity::toDto).collect(Collectors.toList()));
+ }
+ log.debug(
+ " exit getFilteredActions By filterType = " + filterType + " With value = " + filterId);
+ } catch (NoHostAvailableException noHostAvailableException) {
+ logGenericException(noHostAvailableException);
+ throw new ActionException(ActionErrorConstants.ACTION_INTERNAL_SERVER_ERR_CODE,
+ ActionErrorConstants.ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG);
+ }
+ return actions;
+ }
+
+ @Override
+ public List<EcompComponent> getEcompComponents() {
+ List<EcompComponent> ecompComponents = new ArrayList<>();
+ Result<EcompComponentEntity> result;
+ try {
+ log.debug(" entering getECOMPComponents ");
+ ActionUtil
+ .actionLogPreProcessor(ActionSubOperation.GET_ECOMP_COMPONENTS_ENTITY,
+ ActionConstants.TARGET_ENTITY_DB);
+ result = accessor.getEcompComponents();
+ ActionUtil.actionLogPostProcessor(StatusCode.COMPLETE, null, "", false);
+ log.metrics("");
+ if (result != null) {
+ ecompComponents.addAll(
+ result.all().stream().map(EcompComponentEntity::toDto).collect(Collectors.toList()));
+ }
+ } catch (NoHostAvailableException noHostAvailableException) {
+ logGenericException(noHostAvailableException);
+ throw new ActionException(ActionErrorConstants.ACTION_INTERNAL_SERVER_ERR_CODE,
+ ActionErrorConstants.ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG);
+ }
+ log.debug(" exit getECOMPComponents ");
+ return ecompComponents;
+ }
+
+ @Override
+ public Action getActionsByActionUuId(String uniqueId) {
+ try {
+ log.debug(" entering getActionsByActionUUID with actionUUID= " + uniqueId);
+ ActionUtil
+ .actionLogPreProcessor(ActionSubOperation.GET_ACTIONENTITY_BY_ACTIONUUID,
+ ActionConstants.TARGET_ENTITY_DB);
+ Result<ActionEntity> result = accessor.actionInvariantUuId(uniqueId);
+ ActionUtil.actionLogPostProcessor(StatusCode.COMPLETE, null, "", false);
+ log.metrics("");
+ if (result != null) {
+ log.debug(" exit getActionsByActionUUID with actionUUID= " + uniqueId);
+ ActionEntity entity = result.one();
+ if (entity != null) {
+ return entity.toDto();
+ }
+ }
+ log.debug(" exit getActionsByActionUUID with actionUUID= " + uniqueId);
+ return null;
+ } catch (NoHostAvailableException noHostAvailableException) {
+ logGenericException(noHostAvailableException);
+ throw new ActionException(ActionErrorConstants.ACTION_INTERNAL_SERVER_ERR_CODE,
+ ActionErrorConstants.ACTION_ENTITY_INTERNAL_SERVER_ERROR_MSG);
+ }
+ }
+
+ @Override
+ public Action getLockedAction(String actionInvariantUuId, String user) throws ActionException {
+ log.debug(" entering getLockedAction with actionInvariantUUID= " + actionInvariantUuId);
+ ActionUtil
+ .actionLogPreProcessor(ActionSubOperation.GET_ACTION_VERSION,
+ ActionConstants.TARGET_ENTITY_DB);
+ Action action = null;
+ VersionInfoEntity versionInfoEntity = versionInfoDao
+ .get(new VersionInfoEntity(ActionConstants.ACTION_VERSIONABLE_TYPE, actionInvariantUuId));
+ ActionUtil.actionLogPostProcessor(StatusCode.COMPLETE, null, "", false);
+ log.metrics("");
+ if (versionInfoEntity != null) {
+ if (versionInfoEntity.getCandidate() != null) {
+ String actionUser = versionInfoEntity.getCandidate().getUser();
+ if (actionUser != null && actionUser.equals(user)) {
+ Set<Version> versions = new HashSet<>();
+ versions.add(versionInfoEntity.getCandidate().getVersion());
+ ActionUtil.actionLogPreProcessor(ActionSubOperation.GET_ACTIONENTITY_BY_ACTIONINVID,
+ ActionConstants.TARGET_ENTITY_DB);
+ Result<ActionEntity> result = accessor.getActionsByInvId(actionInvariantUuId, versions);
+ ActionUtil.actionLogPostProcessor(StatusCode.COMPLETE, null, "", false);
+ log.metrics("");
+ if (result != null) {
+ ActionEntity actionEntity = result.one();
+ action = actionEntity != null ? actionEntity.toDto() : null;
+ }
+ } else {
+ throw new ActionException(ActionErrorConstants.ACTION_ARTIFACT_DEL_LOCKED_OTHER_USER_CODE,
+ String
+ .format(ActionErrorConstants.ACTION_ARTIFACT_DEL_LOCKED_OTHER_USER, actionUser));
+ }
+ } else {
+ throw new ActionException(
+ ActionErrorConstants.ACTION_NOT_LOCKED_CODE,
+ ActionErrorConstants.ACTION_NOT_LOCKED_MSG);
+ }
+ } else {
+ throw new ActionException(ActionErrorConstants.ACTION_ENTITY_NOT_EXIST_CODE,
+ ActionErrorConstants.ACTION_ENTITY_NOT_EXIST);
+ }
+ return action;
+ }
+
+ @Override
+ protected Mapper<ActionEntity> getMapper() {
+ return mapper;
+ }
+
+
+ @Override
+ protected Object[] getKeys(ActionEntity entity) {
+ return new Object[]{entity.getActionInvariantUuId(), versionMapper.toUDT(entity.getVersion())};
+ }
+
+ @Override
+ public Collection<ActionEntity> list(ActionEntity entity) {
+ return accessor.getAllActions().all();
+ }
+
+ /**
+ * param actionInvariantUuId. param versions.
+ */
+ private void updateActionStatusForDelete(String actionInvariantUuId, List<Version> versions) {
+ log.debug(
+ "entering updateActionStatusForDelete with actionInvariantUUID = " + actionInvariantUuId
+ + " for versions " + versions);
+ List<UDTValue> versionUdt = new ArrayList<>();
+
+ versions.forEach(v -> versionMapper.toUDT(v));
+ ActionUtil
+ .actionLogPreProcessor(ActionSubOperation.UPDATE_ACTION_STATUS,
+ ActionConstants.TARGET_ENTITY_DB);
+
+ //Update the status column of action table
+ Statement updateStatusStatement =
+ QueryBuilder.update("dox", "Action").with(set("status", ActionStatus.Deleted.name()))
+ .where(eq("actioninvariantuuid", actionInvariantUuId)).and(in("version", versionUdt));
+ getSession().execute(updateStatusStatement);
+ ActionUtil.actionLogPostProcessor(StatusCode.COMPLETE, null, "", false);
+ log.metrics("");
+ //Update the status in the data field of action table
+ updateStatusInActionData(actionInvariantUuId, versions, ActionStatus.Deleted);
+ log.debug("exit updateActionStatusForDelete with actionInvariantUUID = " + actionInvariantUuId
+ + " for versions " + versions);
+ }
+
+ /**
+ * Update status for a list of versions for a given action.
+ *
+ * @param actionInvariantUuId Invariant UUID of the action.
+ * @param versions List of {@link Version} for which the status has to be updated.
+ * @param status The status value.
+ */
+ private void updateStatusInActionData(String actionInvariantUuId, List<Version> versions,
+ ActionStatus status) {
+ log.debug("entering updateStatusInActionData for actionInvariantUUID = " + actionInvariantUuId
+ + " and status = " + status + " for versions " + versions);
+ for (Version v : versions) {
+ ActionEntity entity = this.get(new ActionEntity(actionInvariantUuId, v));
+ String currentData = entity.getData();
+ Map<String, Object> currentDataMap = JsonUtil.json2Object(currentData, LinkedHashMap.class);
+ currentDataMap.put(ActionConstants.STATUS, status);
+ String updatedActionData = JsonUtil.object2Json(currentDataMap);
+ entity.setData(updatedActionData);
+ this.updateAction(entity.toDto());
+ }
+ log.debug("exit updateStatusInActionData");
+ }
+
+ /**
+ * Get list of all major and minor version values for a given action by action name.
+ *
+ * @param name Name of the action
+ * @return List of {@link Version} objects for the action
+ */
+ private List<Version> getVersionsByName(String name) {
+ log.debug("entering getVersionsByName for Action Name = " + name);
+ ActionUtil
+ .actionLogPreProcessor(ActionSubOperation.GET_ACTION_VERSION,
+ ActionConstants.TARGET_ENTITY_DB);
+ Statement statement =
+ QueryBuilder.select().column("version").from("dox", "Action").where(eq("name", name));
+ ResultSet results = getSession().execute(statement);
+ ActionUtil.actionLogPostProcessor(StatusCode.COMPLETE, null, "", false);
+ log.metrics("");
+ List<Version> versionList = new ArrayList<>();
+ for (Row row : results) {
+ Version version = versionMapper.fromUDT((UDTValue) row.getObject("version"));
+ versionList.add(version);
+ }
+ log.debug("exit getVersionsByName for Action Name = " + name);
+ return versionList;
+ }
+
+ @Accessor
+ interface ActionAccessor {
+
+ @Query("SELECT * FROM Action")
+ Result<ActionEntity> getAllActions();
+
+ @Query("SELECT * FROM Action where actionInvariantUuId = ? and version in ? ")
+ Result<ActionEntity> getActionsByInvId(String actionInvariantUuId, Set<Version> versions);
+
+ @Query("SELECT * FROM Action where supportedModels CONTAINS ?")
+ Result<ActionEntity> getActionsByModel(String resource);
+
+ @Query("SELECT * FROM Action where supportedComponents CONTAINS ?")
+ Result<ActionEntity> getActionsByEcompComponent(String resource);
+
+ @Query("SELECT * FROM Action where vendor_list CONTAINS ?")
+ Result<ActionEntity> getActionsByVendor(String vendor);
+
+ @Query("SELECT * FROM Action where category_list CONTAINS ?")
+ Result<ActionEntity> getActionsByCategory(String vendor);
+
+ @Query("SELECT actionInvariantUuId FROM Action where name = ? limit 1")
+ Result<ActionEntity> getInvIdByName(String name);
+
+ @Query("SELECT * FROM ECOMPComponent")
+ Result<EcompComponentEntity> getEcompComponents();
+
+ @Query("SELECT * FROM Action where actionUUID = ?")
+ Result<ActionEntity> actionInvariantUuId(String actionUuId);
+
+ }
+
+ class VersionPredicate {
+ Version activeVersion;
+ Version finalVersion;
+
+ public boolean isIntermediateMinorVersion(Version version) {
+ int activeMajorVersion = activeVersion.getMajor();
+ int activeMinorVersion = activeVersion.getMinor();
+ int currentMinorVersion = version.getMinor();
+ int currentMajorVersion = version.getMajor();
+
+ if (finalVersion != null) {
+ if (finalVersion.getMajor() == activeMajorVersion
+ && currentMajorVersion == finalVersion.getMajor()) {
+ if (currentMinorVersion < activeMinorVersion && currentMinorVersion != 0) {
+ return true;
+ }
+ } else {
+ return false;
+ }
+ } else {
+ if (!version.equals(activeVersion)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/pom.xml b/openecomp-be/lib/openecomp-sdc-action-lib/pom.xml
new file mode 100644
index 0000000000..7ff15d6bce
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/pom.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>openecomp-sdc-action-lib</artifactId>
+ <packaging>pom</packaging>
+
+
+
+
+ <modules>
+ <module>openecomp-sdc-action-api</module>
+ <module>openecomp-sdc-action-core</module>
+ </modules>
+
+
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-datatypes-lib/pom.xml b/openecomp-be/lib/openecomp-sdc-datatypes-lib/pom.xml
new file mode 100644
index 0000000000..d9c7beb3e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-datatypes-lib/pom.xml
@@ -0,0 +1,38 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <groupId>org.openecomp.sdc</groupId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>openecomp-sdc-datatypes-lib</artifactId>
+ <name>openecomp-sdc-datatypes-lib</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-collections4</artifactId>
+ <version>4.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.jackson</groupId>
+ <artifactId>jackson-mapper-asl</artifactId>
+ <version>1.9.13</version>
+ </dependency>
+ <dependency>
+ <groupId>io.swagger</groupId>
+ <artifactId>swagger-annotations</artifactId>
+ <version>1.5.3</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>${commons.lang.version}</version>
+ </dependency>
+ </dependencies>
+
+
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/error/ErrorLevel.java b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/error/ErrorLevel.java
new file mode 100644
index 0000000000..44b0733388
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/error/ErrorLevel.java
@@ -0,0 +1,25 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.datatypes.error;
+
+public enum ErrorLevel {
+ ERROR, WARNING, INFO
+}
diff --git a/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/error/ErrorMessage.java b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/error/ErrorMessage.java
new file mode 100644
index 0000000000..29a443c1a0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/error/ErrorMessage.java
@@ -0,0 +1,91 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.datatypes.error;
+
+import org.apache.commons.collections4.CollectionUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public class ErrorMessage {
+ private final ErrorLevel level;
+ private final String message;
+
+ public ErrorMessage(ErrorLevel level, String message) {
+ this.level = level;
+ this.message = message;
+ }
+
+ public ErrorLevel getLevel() {
+ return level;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ @Override
+ public boolean equals(Object object) {
+ if (this == object) {
+ return true;
+ }
+ if (object == null || getClass() != object.getClass()) {
+ return false;
+ }
+
+ ErrorMessage that = (ErrorMessage) object;
+
+ return level == that.level && message.equals(that.message);
+
+ }
+
+ @Override
+ public int hashCode() {
+ int result = level.hashCode();
+ result = 31 * result + message.hashCode();
+ return result;
+ }
+
+ public static class ErrorMessageUtil {
+
+ /**
+ * Add message list.
+ *
+ * @param fileName the file name
+ * @param errorMap the error map
+ * @return the list
+ */
+ public static List<ErrorMessage> addMessage(String fileName,
+ Map<String, List<ErrorMessage>> errorMap) {
+ List<ErrorMessage> fileErrorList;
+ fileErrorList = errorMap.get(fileName);
+ if (CollectionUtils.isEmpty(fileErrorList)) {
+ fileErrorList = new ArrayList<>();
+ errorMap.put(fileName, fileErrorList);
+ }
+
+ return fileErrorList;
+ }
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/AsdcModel.java b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/AsdcModel.java
new file mode 100644
index 0000000000..7d873432b9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/AsdcModel.java
@@ -0,0 +1,24 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.datatypes.model;
+
+public interface AsdcModel {
+}
diff --git a/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/heat/ForbiddenHeatResourceTypes.java b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/heat/ForbiddenHeatResourceTypes.java
new file mode 100644
index 0000000000..a8df6bbbe4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/heat/ForbiddenHeatResourceTypes.java
@@ -0,0 +1,56 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.datatypes.model.heat;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+public enum ForbiddenHeatResourceTypes {
+ HEAT_FLOATING_IP_TYPE("OS::Neutron::FloatingIP");
+
+
+ private static Map<String, ForbiddenHeatResourceTypes> stringToForbiddenHeatResourceTypeMap;
+
+ static {
+ stringToForbiddenHeatResourceTypeMap = new HashMap<>();
+
+ for (ForbiddenHeatResourceTypes type : ForbiddenHeatResourceTypes.values()) {
+ stringToForbiddenHeatResourceTypeMap.put(type.forbiddenType, type);
+ }
+ }
+
+ private String forbiddenType;
+
+
+ ForbiddenHeatResourceTypes(String forbiddenType) {
+ this.forbiddenType = forbiddenType;
+ }
+
+ public static ForbiddenHeatResourceTypes findByForbiddenHeatResource(String heatResource) {
+ return stringToForbiddenHeatResourceTypeMap.get(heatResource);
+ }
+
+
+ public static boolean isResourceTypeValid(String resourceType) {
+ return Objects.nonNull(findByForbiddenHeatResource(resourceType));
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/pom.xml b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/pom.xml
new file mode 100644
index 0000000000..a2038a212e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/pom.xml
@@ -0,0 +1,46 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+
+
+ <parent>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../..</relativePath>
+ </parent>
+
+ <name>openecomp-sdc-enrichment-api</name>
+ <artifactId>openecomp-sdc-enrichment-api</artifactId>
+
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-facade-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.swagger</groupId>
+ <artifactId>swagger-annotations</artifactId>
+ <version>1.5.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-datatypes-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <version>1.1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-versioning-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/EnrichmentArtifactsServiceFactory.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/EnrichmentArtifactsServiceFactory.java
new file mode 100644
index 0000000000..63daa03f15
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/EnrichmentArtifactsServiceFactory.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.enrichment;
+
+import org.openecomp.core.enrichment.enrichmentartifacts.EnrichmentArtifactsService;
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class EnrichmentArtifactsServiceFactory
+ extends AbstractComponentFactory<EnrichmentArtifactsService> {
+
+ public static EnrichmentArtifactsServiceFactory getInstance() {
+ return AbstractFactory.getInstance(EnrichmentArtifactsServiceFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/EnrichmentConstants.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/EnrichmentConstants.java
new file mode 100644
index 0000000000..c3726aa4e9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/EnrichmentConstants.java
@@ -0,0 +1,29 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.enrichment;
+
+import java.io.File;
+
+public final class EnrichmentConstants {
+ public static final String EXTERNAL_ARTIFACTS_DIR =
+ "Artifacts" + File.separator + "ExternalArtifacts";
+ //public static final String HEAT_META_FILNAME = "HEAT.meta";
+}
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/api/EnrichmentManager.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/api/EnrichmentManager.java
new file mode 100644
index 0000000000..2ddde6001b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/api/EnrichmentManager.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.enrichment.api;
+
+import org.openecomp.core.enrichment.types.EntityInfo;
+import org.openecomp.sdc.datatypes.error.ErrorMessage;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.util.List;
+import java.util.Map;
+
+public interface EnrichmentManager<T> {
+
+
+ Map<String, List<ErrorMessage>> enrich();
+
+ void addEntityInput(String type, EntityInfo info);
+
+ void initInput(String key, Version version);
+
+ void addModel(T model);
+
+ T getModel();
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/enrichmentartifacts/EnrichmentArtifactsService.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/enrichmentartifacts/EnrichmentArtifactsService.java
new file mode 100644
index 0000000000..0eab0a916c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/enrichmentartifacts/EnrichmentArtifactsService.java
@@ -0,0 +1,29 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.enrichment.enrichmentartifacts;
+
+import org.openecomp.core.utilities.file.FileContentHandler;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+public interface EnrichmentArtifactsService {
+
+ FileContentHandler addMibs(String vspId, Version version);
+}
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/factory/EnrichmentManagerFactory.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/factory/EnrichmentManagerFactory.java
new file mode 100644
index 0000000000..9199aeff6c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/factory/EnrichmentManagerFactory.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.enrichment.factory;
+
+import org.openecomp.core.enrichment.api.EnrichmentManager;
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class EnrichmentManagerFactory extends AbstractComponentFactory<EnrichmentManager> {
+
+ public static EnrichmentManagerFactory getInstance() {
+ return AbstractFactory.getInstance(EnrichmentManagerFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/CeilometerInfo.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/CeilometerInfo.java
new file mode 100644
index 0000000000..71c1ff5cec
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/CeilometerInfo.java
@@ -0,0 +1,71 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.enrichment.types;
+
+public class CeilometerInfo {
+
+ private String name;
+ private String type;
+ private String unit;
+ private String category;
+ private String description;
+
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getUnit() {
+ return unit;
+ }
+
+ public void setUnit(String unit) {
+ this.unit = unit;
+ }
+
+ public String getCategory() {
+ return category;
+ }
+
+ public void setCategory(String category) {
+ this.category = category;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ComponentArtifactType.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ComponentArtifactType.java
new file mode 100644
index 0000000000..c91cff0e1e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ComponentArtifactType.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.enrichment.types;
+
+public enum ComponentArtifactType {
+ SNMP_POLL,
+ SNMP_TRAP;
+
+
+ public static ComponentArtifactType getComponentArtifactType(boolean isTrap) {
+ return isTrap ? SNMP_TRAP : SNMP_POLL;
+ }
+
+}
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ComponentCeilometerInfo.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ComponentCeilometerInfo.java
new file mode 100644
index 0000000000..a0c1be51e9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ComponentCeilometerInfo.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.enrichment.types;
+
+import java.util.List;
+
+public class ComponentCeilometerInfo {
+
+ private List<CeilometerInfo> ceilometerInfoList;
+
+ public List<CeilometerInfo> getCeilometerInfoList() {
+ return ceilometerInfoList;
+ }
+
+ public void setCeilometerInfoList(List<CeilometerInfo> ceilometerInfoList) {
+ this.ceilometerInfoList = ceilometerInfoList;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ComponentMibInfo.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ComponentMibInfo.java
new file mode 100644
index 0000000000..88dbedc136
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ComponentMibInfo.java
@@ -0,0 +1,45 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.enrichment.types;
+
+public class ComponentMibInfo {
+ private MibInfo snmpTrap;
+ private MibInfo snmpPoll;
+
+
+ public MibInfo getSnmpTrap() {
+ return snmpTrap;
+ }
+
+ public void setSnmpTrap(MibInfo snmpTrap) {
+ this.snmpTrap = snmpTrap;
+ }
+
+ public MibInfo getSnmpPoll() {
+ return snmpPoll;
+ }
+
+ public void setSnmpPoll(MibInfo snmpPoll) {
+ this.snmpPoll = snmpPoll;
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/EntityInfo.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/EntityInfo.java
new file mode 100644
index 0000000000..ac80eb9d03
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/EntityInfo.java
@@ -0,0 +1,27 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.enrichment.types;
+
+
+public interface EntityInfo {
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/MibInfo.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/MibInfo.java
new file mode 100644
index 0000000000..f5d2fcb90d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/MibInfo.java
@@ -0,0 +1,45 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.enrichment.types;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
+public class MibInfo {
+ private String name;
+ private byte[] content;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public InputStream getContent() {
+ return new ByteArrayInputStream(this.content);
+ }
+
+ public void setContent(byte[] content) {
+ this.content = content;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/resources/factoryConfiguration.json b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/resources/factoryConfiguration.json
new file mode 100644
index 0000000000..d22184e3da
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/resources/factoryConfiguration.json
@@ -0,0 +1,4 @@
+{
+ "org.openecomp.core.enrichment.factory.EnrichmentManagerFactory": "org.openecomp.sdc.enrichment.impl.EnrichmentManagerFactoryImpl",
+ "org.openecomp.core.enrichment.EnrichmentArtifactsServiceFactory": "org.openecomp.sdc.enrichment.EnrichmentArtifactsServiceFactoryImpl"
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/pom.xml b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/pom.xml
new file mode 100644
index 0000000000..1f0452cdfb
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/pom.xml
@@ -0,0 +1,90 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+
+
+
+ <parent>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../..</relativePath>
+ </parent>
+
+ <name>openecomp-sdc-enrichment-core</name>
+ <artifactId>openecomp-sdc-enrichment-core</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.7.10</version>
+
+ </dependency>
+
+
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <version>1.1.2</version>
+
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <scope>test</scope>
+ <version>6.8.5</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>snakeyaml</artifactId>
+ <groupId>org.yaml</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>RELEASE</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-utilities-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-enrichment-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-enrichment-impl</artifactId>
+ <version>${project.version}</version>
+ <!--scope>runtime</scope-->
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-datatypes-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <scope>test</scope>
+ <version>1.10.19</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <version>19.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-model-impl</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/main/java/org/openecomp/sdc/enrichment/EnrichmentArtifactsServiceFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/main/java/org/openecomp/sdc/enrichment/EnrichmentArtifactsServiceFactoryImpl.java
new file mode 100644
index 0000000000..1075b07a49
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/main/java/org/openecomp/sdc/enrichment/EnrichmentArtifactsServiceFactoryImpl.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.enrichment;
+
+import org.openecomp.core.enrichment.EnrichmentArtifactsServiceFactory;
+import org.openecomp.core.enrichment.enrichmentartifacts.EnrichmentArtifactsService;
+import org.openecomp.sdc.enrichment.enrichmentartifacts.EnrichmentArtifactsServiceImpl;
+
+public class EnrichmentArtifactsServiceFactoryImpl extends EnrichmentArtifactsServiceFactory {
+ private static EnrichmentArtifactsService INSTANCE = new EnrichmentArtifactsServiceImpl();
+
+ @Override
+ public EnrichmentArtifactsService createInterface() {
+ return INSTANCE;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/main/java/org/openecomp/sdc/enrichment/enrichmentartifacts/EnrichmentArtifactsServiceImpl.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/main/java/org/openecomp/sdc/enrichment/enrichmentartifacts/EnrichmentArtifactsServiceImpl.java
new file mode 100644
index 0000000000..2b7fef1e6b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/main/java/org/openecomp/sdc/enrichment/enrichmentartifacts/EnrichmentArtifactsServiceImpl.java
@@ -0,0 +1,61 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.enrichment.enrichmentartifacts;
+
+import org.openecomp.core.enrichment.enrichmentartifacts.EnrichmentArtifactsService;
+import org.openecomp.core.model.dao.EnrichedServiceModelDao;
+import org.openecomp.core.model.dao.EnrichedServiceModelDaoFactory;
+import org.openecomp.core.model.types.ServiceArtifact;
+import org.openecomp.core.model.types.ServiceElement;
+import org.openecomp.core.utilities.file.FileContentHandler;
+import org.openecomp.sdc.common.utils.AsdcCommon;
+import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.util.List;
+
+public class EnrichmentArtifactsServiceImpl implements EnrichmentArtifactsService {
+ EnrichedServiceModelDao<ToscaServiceModel, ServiceElement> enrichedServiceModelDao =
+ EnrichedServiceModelDaoFactory.getInstance().createInterface();
+
+ @Override
+ public FileContentHandler addMibs(String vspId, Version version) {
+ FileContentHandler externalArtifacts = new FileContentHandler();
+ List<ServiceArtifact> mibsList = enrichedServiceModelDao.getExternalArtifacts(vspId, version);
+ addMibsToFileContentHandler(mibsList, externalArtifacts);
+
+ return externalArtifacts;
+ }
+
+
+ private void addMibsToFileContentHandler(List<ServiceArtifact> mibsList,
+ FileContentHandler externalArtifacts) {
+ for (ServiceArtifact serviceArtifact : mibsList) {
+ String filename = serviceArtifact.getName();
+ externalArtifacts.addFile(filename, serviceArtifact.getContent());
+ }
+ }
+
+
+ private boolean isFileArtifact(String filename) {
+ return !filename.contains(AsdcCommon.HEAT_META) && !filename.contains(AsdcCommon.MANIFEST_NAME);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/main/java/org/openecomp/sdc/enrichment/impl/EnrichmentManagerFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/main/java/org/openecomp/sdc/enrichment/impl/EnrichmentManagerFactoryImpl.java
new file mode 100644
index 0000000000..abbb577075
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/main/java/org/openecomp/sdc/enrichment/impl/EnrichmentManagerFactoryImpl.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.enrichment.impl;
+
+
+import org.openecomp.core.enrichment.api.EnrichmentManager;
+import org.openecomp.core.enrichment.factory.EnrichmentManagerFactory;
+
+
+public class EnrichmentManagerFactoryImpl extends EnrichmentManagerFactory {
+
+ @Override
+ public EnrichmentManager createInterface() {
+ return new EnrichmentManagerImpl();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/main/java/org/openecomp/sdc/enrichment/impl/EnrichmentManagerImpl.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/main/java/org/openecomp/sdc/enrichment/impl/EnrichmentManagerImpl.java
new file mode 100644
index 0000000000..ef29108402
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/main/java/org/openecomp/sdc/enrichment/impl/EnrichmentManagerImpl.java
@@ -0,0 +1,84 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.enrichment.impl;
+
+import org.openecomp.core.enrichment.api.EnrichmentManager;
+import org.openecomp.core.enrichment.types.EntityInfo;
+import org.openecomp.sdc.datatypes.error.ErrorMessage;
+import org.openecomp.sdc.enrichment.EnrichmentInfo;
+import org.openecomp.sdc.enrichment.factory.EnricherHandlerFactory;
+import org.openecomp.sdc.enrichment.inter.Enricher;
+import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+import java.util.Map;
+
+public class EnrichmentManagerImpl implements EnrichmentManager<ToscaServiceModel> {
+
+ private static Logger logger = LoggerFactory.getLogger(EnrichmentManagerImpl.class);
+
+ private EnrichmentInfo input = null;
+ private ToscaServiceModel model;
+
+
+ @Override
+ public Map<String, List<ErrorMessage>> enrich() {
+ List<Enricher> enricherList =
+ EnricherHandlerFactory.getInstance().createInterface().getEnrichers();
+ for (Enricher enricher : enricherList) {
+ enricher.setInput(input);
+ enricher.setModel(model);
+ enricher.enrich();
+ }
+
+ return null;
+ }
+
+ @Override
+ public void addEntityInput(String type, EntityInfo info) {
+ this.input.addEntityInfo(type, info);
+ }
+
+
+ @Override
+ public void initInput(String key, Version version) {
+ input = new EnrichmentInfo();
+ input.setKey(key);
+ input.setVersion(version);
+ }
+
+ @Override
+ public void addModel(ToscaServiceModel model) {
+
+ this.model = model;
+ }
+
+
+ @Override
+ public ToscaServiceModel getModel() {
+ return this.model;
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/java/org/openecomp/sdc/enrichment/impl/EnrichmentManagerImplTest.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/java/org/openecomp/sdc/enrichment/impl/EnrichmentManagerImplTest.java
new file mode 100644
index 0000000000..6bc5a0e864
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/java/org/openecomp/sdc/enrichment/impl/EnrichmentManagerImplTest.java
@@ -0,0 +1,245 @@
+package org.openecomp.sdc.enrichment.impl;
+
+import org.openecomp.sdc.enrichment.impl.tosca.ComponentInfo;
+import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.services.ToscaFileOutputService;
+import org.openecomp.sdc.tosca.services.impl.ToscaFileOutputServiceCsarImpl;
+import org.openecomp.sdc.tosca.services.yamlutil.ToscaExtensionYamlUtil;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.core.enrichment.api.EnrichmentManager;
+import org.openecomp.core.enrichment.factory.EnrichmentManagerFactory;
+
+import org.openecomp.core.enrichment.types.CeilometerInfo;
+import org.openecomp.core.enrichment.types.ComponentCeilometerInfo;
+import org.openecomp.core.utilities.file.FileUtils;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+import java.io.*;
+import java.net.URL;
+import java.nio.file.NotDirectoryException;
+import java.util.*;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
+import static org.junit.Assert.assertEquals;
+
+
+public class EnrichmentManagerImplTest {
+
+
+ private static ToscaServiceModel loadToscaServiceModel(String serviceTemplatesPath,
+ String globalServiceTemplatesPath,
+ String entryDefinitionServiceTemplate)
+ throws IOException {
+ ToscaExtensionYamlUtil toscaExtensionYamlUtil = new ToscaExtensionYamlUtil();
+ Map<String, ServiceTemplate> serviceTemplates = new HashMap<>();
+ if (entryDefinitionServiceTemplate == null) {
+ entryDefinitionServiceTemplate = "MainServiceTemplate.yaml";
+ }
+
+ loadServiceTemplates(serviceTemplatesPath, toscaExtensionYamlUtil, serviceTemplates);
+ if (globalServiceTemplatesPath != null) {
+ loadServiceTemplates(globalServiceTemplatesPath, toscaExtensionYamlUtil, serviceTemplates);
+ }
+
+ return new ToscaServiceModel(null, serviceTemplates, entryDefinitionServiceTemplate);
+ }
+
+ private static void loadServiceTemplates(String serviceTemplatesPath,
+ ToscaExtensionYamlUtil toscaExtensionYamlUtil,
+ Map<String, ServiceTemplate> serviceTemplates)
+ throws IOException {
+ URL urlFile = EnrichmentManagerImplTest.class.getResource(serviceTemplatesPath);
+ if (urlFile != null) {
+ File pathFile = new File(urlFile.getFile());
+ File[] files = pathFile.listFiles();
+ if (files != null) {
+ addServiceTemplateFiles(serviceTemplates, files, toscaExtensionYamlUtil);
+ } else {
+ throw new NotDirectoryException(serviceTemplatesPath);
+ }
+ } else {
+ throw new NotDirectoryException(serviceTemplatesPath);
+ }
+ }
+
+ private static void addServiceTemplateFiles(Map<String, ServiceTemplate> serviceTemplates,
+ File[] files,
+ ToscaExtensionYamlUtil toscaExtensionYamlUtil)
+ throws IOException {
+ for (File file : files) {
+ if (!file.getName().equals("CSR.zip") && !file.isDirectory()) {
+ try (InputStream yamlFile = new FileInputStream(file)) {
+ ServiceTemplate serviceTemplateFromYaml =
+ toscaExtensionYamlUtil.yamlToObject(yamlFile, ServiceTemplate.class);
+ serviceTemplates.put(file.getName(), serviceTemplateFromYaml);
+ try {
+ yamlFile.close();
+ } catch (IOException ignore) {
+ }
+ } catch (FileNotFoundException e) {
+ throw e;
+ } catch (IOException e) {
+ throw e;
+ }
+ }
+ }
+ }
+
+// @Test
+ public void testEnrichmentManagerImpl() throws Exception {
+ Assert.assertTrue(
+ EnrichmentManagerFactory.getInstance().createInterface() instanceof EnrichmentManagerImpl);
+ }
+
+// @Test
+ public void testEnrichModel() throws Exception {
+ ToscaServiceModel toscaServiceModel =
+ loadToscaServiceModel("/extractServiceComposition/onlyComponents/",
+ "/extractServiceComposition/toscaGlobalServiceTemplates/", "OnlyComponentsST.yaml");
+ EnrichmentManager enrichmentManager = EnrichmentManagerFactory.getInstance().createInterface();
+ enrichmentManager.initInput("vsp_enrich", new Version(0, 1));
+ enrichmentManager.addModel(toscaServiceModel);
+
+ String[] componentNames = new String[]{"org.openecomp.resource.vfc.nodes.heat.pcrf_psm",
+ "org.openecomp.resource.vfc.nodes.heat.pcm"};
+ ComponentInfo componentInfo = new ComponentInfo();
+
+ CeilometerInfo ceilometerInfo;
+ ComponentCeilometerInfo componentCeilometerInfo = new ComponentCeilometerInfo();
+ componentCeilometerInfo.setCeilometerInfoList(new ArrayList<>());
+ componentInfo.setCeilometerInfo(componentCeilometerInfo);
+
+ for (String componentName : componentNames) {
+ ceilometerInfo =
+ getCeilometerInfo("instance", "Gauge", "instance", "compute", "Existence of instance");
+ componentInfo.getCeilometerInfo().getCeilometerInfoList().add(ceilometerInfo);
+ ceilometerInfo = getCeilometerInfo("memory", "Gauge", "MB", "compute",
+ "Volume of RAM allocated to the instance");
+ componentInfo.getCeilometerInfo().getCeilometerInfoList().add(ceilometerInfo);
+ ceilometerInfo = getCeilometerInfo("cpu", "Cumulative", "ns", "compute", "CPU time used");
+ componentInfo.getCeilometerInfo().getCeilometerInfoList().add(ceilometerInfo);
+ enrichmentManager.addEntityInput(componentName, componentInfo);
+ }
+
+ enrichmentManager.enrich();
+
+ File csrFile = getToscaModelAsFile(toscaServiceModel);
+ compareActualAndExpected(csrFile);
+
+ }
+
+// @Test
+ public void testAllEnrichModel() throws Exception {
+ ToscaServiceModel toscaServiceModel = loadToscaServiceModel("/extractServiceComposition/all/",
+ "/extractServiceComposition/toscaGlobalServiceTemplates/", "OnlyComponentsST.yaml");
+ EnrichmentManager enrichmentManager = EnrichmentManagerFactory.getInstance().createInterface();
+ enrichmentManager.initInput("vsp_enrich", new Version(0, 1));
+ enrichmentManager.addModel(toscaServiceModel);
+
+ String[] componentNames = new String[]{"org.openecomp.resource.vfc.nodes.heat.pcrf_psm",
+ "org.openecomp.resource.vfc.nodes.heat.pcm"};
+ ComponentInfo componentInfo = new ComponentInfo();
+
+ CeilometerInfo ceilometerInfo;
+ ComponentCeilometerInfo componentCeilometerInfo = new ComponentCeilometerInfo();
+ componentCeilometerInfo.setCeilometerInfoList(new ArrayList<>());
+ componentInfo.setCeilometerInfo(componentCeilometerInfo);
+
+ for (String componentName : componentNames) {
+ ceilometerInfo =
+ getCeilometerInfo("instance", "Gauge", "instance", "compute", "Existence of instance");
+ componentInfo.getCeilometerInfo().getCeilometerInfoList().add(ceilometerInfo);
+ ceilometerInfo = getCeilometerInfo("memory", "Gauge", "MB", "compute",
+ "Volume of RAM allocated to the instance");
+ componentInfo.getCeilometerInfo().getCeilometerInfoList().add(ceilometerInfo);
+ ceilometerInfo = getCeilometerInfo("cpu", "Cumulative", "ns", "compute", "CPU time used");
+ componentInfo.getCeilometerInfo().getCeilometerInfoList().add(ceilometerInfo);
+ enrichmentManager.addEntityInput(componentName, componentInfo);
+ }
+
+ enrichmentManager.enrich();
+
+ File csrFile = getToscaModelAsFile(toscaServiceModel);
+ compareActualAndExpected(csrFile);
+
+ }
+
+ private CeilometerInfo getCeilometerInfo(String name, String type, String unit, String category,
+ String description) {
+ CeilometerInfo ceilometerInfo = new CeilometerInfo();
+ ceilometerInfo.setName(name);
+ ceilometerInfo.setType(type);
+ ceilometerInfo.setUnit(unit);
+ ceilometerInfo.setCategory(category);
+ ceilometerInfo.setDescription(description);
+ return ceilometerInfo;
+ }
+
+ private File getToscaModelAsFile(ToscaServiceModel toscaServiceModel) throws IOException {
+
+ URL inputFilesUrl =
+ EnrichmentManagerImplTest.class.getResource("/extractServiceComposition/onlyComponents");
+ String path = inputFilesUrl.getPath();
+
+
+ File file = new File(path + "/" + "CSR.zip");
+ file.createNewFile();
+
+ try (FileOutputStream fos = new FileOutputStream(file))
+
+ {
+ ToscaFileOutputService toscaFileOutputService = new ToscaFileOutputServiceCsarImpl();
+ fos.write(toscaFileOutputService.createOutputFile(toscaServiceModel, null));
+ }
+
+ return file;
+ }
+
+ protected void compareActualAndExpected(File actualFile) throws IOException {
+
+ URL url = EnrichmentManagerImplTest.class
+ .getResource("/extractServiceComposition/onlyComponents/expectedOutput");
+ Set<String> expectedResultFileNameSet = new HashSet<>();
+ Map<String, byte[]> expectedResultMap = new HashMap<>();
+ String path = url.getPath();
+ File pathFile = new File(path);
+ File[] files = pathFile.listFiles();
+ org.junit.Assert.assertNotNull("manifest files is empty", files);
+ for (File expectedFile : files) {
+ expectedResultFileNameSet.add(expectedFile.getName());
+ try (FileInputStream input = new FileInputStream(expectedFile)) {
+ expectedResultMap.put(expectedFile.getName(), FileUtils.toByteArray(input));
+ }
+ }
+
+ try (FileInputStream fis = new FileInputStream(actualFile);
+ ZipInputStream zis = new ZipInputStream(new BufferedInputStream(fis))) {
+ ZipEntry entry;
+ String name;
+ String expected;
+ String actual;
+
+ while ((entry = zis.getNextEntry()) != null) {
+
+ name = entry.getName()
+ .substring(entry.getName().lastIndexOf(File.separator) + 1, entry.getName().length());
+ if (expectedResultFileNameSet.contains(name)) {
+ expected = new String(expectedResultMap.get(name)).trim().replace("\r", "");
+ actual = new String(FileUtils.toByteArray(zis)).trim().replace("\r", "");
+ assertEquals("difference in file: " + name, expected, actual);
+
+ expectedResultFileNameSet.remove(name);
+ }
+ }
+ if (expectedResultFileNameSet.isEmpty()) {
+ expectedResultFileNameSet.forEach(System.out::println);
+ }
+ }
+ assertEquals(0, expectedResultFileNameSet.size());
+ }
+
+
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/all/OnlyComponentsST.yaml b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/all/OnlyComponentsST.yaml
new file mode 100644
index 0000000000..54f39e4219
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/all/OnlyComponentsST.yaml
@@ -0,0 +1,350 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.pcrf_psm:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.pcm:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ Internal2_name:
+ label: Internal2_name
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_name
+ Internal1_shared:
+ label: Internal1_shared
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_shared
+ FSB1_volume_name:
+ label: FSB1_volume
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_volume_1
+ jsa_cidr:
+ label: jsa_cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: jsa_cidr
+ default: 107.243.7.128/26
+ availabilityzone_name:
+ label: availabilityzone_name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone_name
+ fsb1-name:
+ label: FSB1_name
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_name
+ pcm_image_name:
+ label: pcm_image_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_image_name
+ Internal2_external:
+ label: Internal2_external
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_external
+ Internal2_forwarding_mode:
+ label: Internal2_forwarding_mode
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_forwarding_mode
+ pcrf_psm_flavor_name:
+ label: pcrf_psm_flavor_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_flavor_name
+ pcrf_psm_image_name:
+ label: pcrf_psm_image_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_image_name
+ FSB_1_image:
+ label: MME_FSB1
+ hidden: false
+ immutable: false
+ type: string
+ description: MME_FSB1_15B-CP04-r5a01
+ volume_size:
+ label: volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: my volume size 320GB
+ fsb1-Internal1-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ Internal2_shared:
+ label: Internal2_shared
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_shared
+ pcm_server_name:
+ label: pcm_server_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_server_name
+ Internal1_net_name:
+ label: Internal1_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_net_name
+ oam_net_name:
+ label: oam_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: oam_net_name
+ fsb1-flavor:
+ label: FSB1_flavor
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_flavor
+ fsb1-Internal2-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ volume_type:
+ label: volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: volume type Gold
+ fsb1-zone:
+ label: FSB1_zone
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_zone
+ fsb_zone:
+ label: FSB1_zone
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_zone
+ security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: String
+ jsa_net_name:
+ label: jsa_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: jsa_net_name
+ default: jsa_log_net_0
+ pcrf_psm_server_name:
+ label: pcrf_psm_server_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_server_name
+ pcm_flavor_name:
+ label: pcm_flavor_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_flavor_name
+ oam_net_id:
+ label: oam_net_id
+ hidden: false
+ immutable: false
+ type: string
+ description: oam_net_id
+ fsb2-Internal1-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ Internal1_forwarding_mode:
+ label: Internal1_forwarding_mode
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_forwarding_mode
+ pcrf_cps_net_name:
+ label: pcrf_cps_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_cps_net_name
+ cps_net_name:
+ label: cps_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: cps_net_name
+ pcrf_security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: String
+ Internal1_external:
+ label: Internal1_external
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_external
+ node_templates:
+ nova_local_type_pcm1:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_local_type_pcm2:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_local_type_pcrf_psm:
+ type: org.openecomp.resource.vfc.nodes.heat.pcrf_psm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_global_type1:
+ type: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ properties:
+ flavor:
+ get_input: fsb1-flavor
+ availability_zone:
+ get_input: fsb_zone
+ name:
+ get_input: fsb1-name
+ nova_global_type2:
+ type: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ properties:
+ flavor:
+ get_input: fsb1-flavor
+ availability_zone:
+ get_input: fsb_zone
+ metadata:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: '0644'
+ content:
+ str_replace:
+ template:
+ get_artifact:
+ - SELF
+ - nimbus-ethernet
+ params:
+ $dev: eth0
+ $netmask:
+ get_input: cps_net_mask
+ $ip:
+ get_input: cps_net_ip
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth1
+ permissions: '0644'
+ content:
+ str_replace:
+ template:
+ get_artifact:
+ - SELF
+ - nimbus-ethernet-gw
+ params:
+ $dev: eth1
+ $netmask:
+ get_input: oam_net_mask
+ $gateway:
+ get_input: oam_net_gw
+ $ip:
+ get_input: oam_net_ip
+ name:
+ get_input: fsb1-name
+ artifacts:
+ nimbus-ethernet-gw:
+ type: tosca.artifacts.Deployment
+ file: ../Artifacts/nimbus-ethernet-gw
+ nimbus-ethernet:
+ type: tosca.artifacts.Deployment
+ file: ../Artifacts/nimbus-ethernet
+ groups:
+ ep-jsa_net:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/ep-jsa_net.yaml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - nova_local_type_pcm1
+ - nova_local_type_pcm2
+ - nova_local_type_pcrf_psm
+ - nova_global_type1
+ - nova_global_type2 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/all/OnlyComponentsST_01.yaml b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/all/OnlyComponentsST_01.yaml
new file mode 100644
index 0000000000..54f39e4219
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/all/OnlyComponentsST_01.yaml
@@ -0,0 +1,350 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.pcrf_psm:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.pcm:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ Internal2_name:
+ label: Internal2_name
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_name
+ Internal1_shared:
+ label: Internal1_shared
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_shared
+ FSB1_volume_name:
+ label: FSB1_volume
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_volume_1
+ jsa_cidr:
+ label: jsa_cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: jsa_cidr
+ default: 107.243.7.128/26
+ availabilityzone_name:
+ label: availabilityzone_name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone_name
+ fsb1-name:
+ label: FSB1_name
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_name
+ pcm_image_name:
+ label: pcm_image_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_image_name
+ Internal2_external:
+ label: Internal2_external
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_external
+ Internal2_forwarding_mode:
+ label: Internal2_forwarding_mode
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_forwarding_mode
+ pcrf_psm_flavor_name:
+ label: pcrf_psm_flavor_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_flavor_name
+ pcrf_psm_image_name:
+ label: pcrf_psm_image_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_image_name
+ FSB_1_image:
+ label: MME_FSB1
+ hidden: false
+ immutable: false
+ type: string
+ description: MME_FSB1_15B-CP04-r5a01
+ volume_size:
+ label: volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: my volume size 320GB
+ fsb1-Internal1-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ Internal2_shared:
+ label: Internal2_shared
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_shared
+ pcm_server_name:
+ label: pcm_server_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_server_name
+ Internal1_net_name:
+ label: Internal1_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_net_name
+ oam_net_name:
+ label: oam_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: oam_net_name
+ fsb1-flavor:
+ label: FSB1_flavor
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_flavor
+ fsb1-Internal2-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ volume_type:
+ label: volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: volume type Gold
+ fsb1-zone:
+ label: FSB1_zone
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_zone
+ fsb_zone:
+ label: FSB1_zone
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_zone
+ security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: String
+ jsa_net_name:
+ label: jsa_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: jsa_net_name
+ default: jsa_log_net_0
+ pcrf_psm_server_name:
+ label: pcrf_psm_server_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_server_name
+ pcm_flavor_name:
+ label: pcm_flavor_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_flavor_name
+ oam_net_id:
+ label: oam_net_id
+ hidden: false
+ immutable: false
+ type: string
+ description: oam_net_id
+ fsb2-Internal1-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ Internal1_forwarding_mode:
+ label: Internal1_forwarding_mode
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_forwarding_mode
+ pcrf_cps_net_name:
+ label: pcrf_cps_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_cps_net_name
+ cps_net_name:
+ label: cps_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: cps_net_name
+ pcrf_security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: String
+ Internal1_external:
+ label: Internal1_external
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_external
+ node_templates:
+ nova_local_type_pcm1:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_local_type_pcm2:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_local_type_pcrf_psm:
+ type: org.openecomp.resource.vfc.nodes.heat.pcrf_psm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_global_type1:
+ type: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ properties:
+ flavor:
+ get_input: fsb1-flavor
+ availability_zone:
+ get_input: fsb_zone
+ name:
+ get_input: fsb1-name
+ nova_global_type2:
+ type: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ properties:
+ flavor:
+ get_input: fsb1-flavor
+ availability_zone:
+ get_input: fsb_zone
+ metadata:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: '0644'
+ content:
+ str_replace:
+ template:
+ get_artifact:
+ - SELF
+ - nimbus-ethernet
+ params:
+ $dev: eth0
+ $netmask:
+ get_input: cps_net_mask
+ $ip:
+ get_input: cps_net_ip
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth1
+ permissions: '0644'
+ content:
+ str_replace:
+ template:
+ get_artifact:
+ - SELF
+ - nimbus-ethernet-gw
+ params:
+ $dev: eth1
+ $netmask:
+ get_input: oam_net_mask
+ $gateway:
+ get_input: oam_net_gw
+ $ip:
+ get_input: oam_net_ip
+ name:
+ get_input: fsb1-name
+ artifacts:
+ nimbus-ethernet-gw:
+ type: tosca.artifacts.Deployment
+ file: ../Artifacts/nimbus-ethernet-gw
+ nimbus-ethernet:
+ type: tosca.artifacts.Deployment
+ file: ../Artifacts/nimbus-ethernet
+ groups:
+ ep-jsa_net:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/ep-jsa_net.yaml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - nova_local_type_pcm1
+ - nova_local_type_pcm2
+ - nova_local_type_pcrf_psm
+ - nova_global_type1
+ - nova_global_type2 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/all/VariouseST.yaml b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/all/VariouseST.yaml
new file mode 100644
index 0000000000..1f39bfb314
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/all/VariouseST.yaml
@@ -0,0 +1,363 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.pcrf_psm:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.pcm:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ Internal2_name:
+ label: Internal2_name
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_name
+ Internal1_shared:
+ label: Internal1_shared
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_shared
+ FSB1_volume_name:
+ label: FSB1_volume
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_volume_1
+ jsa_cidr:
+ label: jsa_cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: jsa_cidr
+ default: 107.243.7.128/26
+ availabilityzone_name:
+ label: availabilityzone_name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone_name
+ fsb1-name:
+ label: FSB1_name
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_name
+ pcm_image_name:
+ label: pcm_image_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_image_name
+ Internal2_external:
+ label: Internal2_external
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_external
+ Internal2_forwarding_mode:
+ label: Internal2_forwarding_mode
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_forwarding_mode
+ pcrf_psm_flavor_name:
+ label: pcrf_psm_flavor_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_flavor_name
+ pcrf_psm_image_name:
+ label: pcrf_psm_image_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_image_name
+ FSB_1_image:
+ label: MME_FSB1
+ hidden: false
+ immutable: false
+ type: string
+ description: MME_FSB1_15B-CP04-r5a01
+ volume_size:
+ label: volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: my volume size 320GB
+ fsb1-Internal1-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ Internal2_shared:
+ label: Internal2_shared
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_shared
+ pcm_server_name:
+ label: pcm_server_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_server_name
+ Internal1_net_name:
+ label: Internal1_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_net_name
+ oam_net_name:
+ label: oam_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: oam_net_name
+ fsb1-flavor:
+ label: FSB1_flavor
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_flavor
+ fsb1-Internal2-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ volume_type:
+ label: volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: volume type Gold
+ fsb1-zone:
+ label: FSB1_zone
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_zone
+ fsb_zone:
+ label: FSB1_zone
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_zone
+ security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: String
+ jsa_net_name:
+ label: jsa_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: jsa_net_name
+ default: jsa_log_net_0
+ pcrf_psm_server_name:
+ label: pcrf_psm_server_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_server_name
+ pcm_flavor_name:
+ label: pcm_flavor_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_flavor_name
+ oam_net_id:
+ label: oam_net_id
+ hidden: false
+ immutable: false
+ type: string
+ description: oam_net_id
+ fsb2-Internal1-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ Internal1_forwarding_mode:
+ label: Internal1_forwarding_mode
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_forwarding_mode
+ pcrf_cps_net_name:
+ label: pcrf_cps_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_cps_net_name
+ cps_net_name:
+ label: cps_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: cps_net_name
+ pcrf_security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: String
+ Internal1_external:
+ label: Internal1_external
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_external
+ node_templates:
+
+ jsa_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ jsa_net1:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ nova_local_type_pcm1:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_local_type_pcm2:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_local_type_pcrf_psm:
+ type: org.openecomp.resource.vfc.nodes.heat.pcrf_psm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_global_type1:
+ type: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ properties:
+ flavor:
+ get_input: fsb1-flavor
+ availability_zone:
+ get_input: fsb_zone
+ name:
+ get_input: fsb1-name
+ nova_global_type2:
+ type: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ properties:
+ flavor:
+ get_input: fsb1-flavor
+ availability_zone:
+ get_input: fsb_zone
+ metadata:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: '0644'
+ content:
+ str_replace:
+ template:
+ get_artifact:
+ - SELF
+ - nimbus-ethernet
+ params:
+ $dev: eth0
+ $netmask:
+ get_input: cps_net_mask
+ $ip:
+ get_input: cps_net_ip
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth1
+ permissions: '0644'
+ content:
+ str_replace:
+ template:
+ get_artifact:
+ - SELF
+ - nimbus-ethernet-gw
+ params:
+ $dev: eth1
+ $netmask:
+ get_input: oam_net_mask
+ $gateway:
+ get_input: oam_net_gw
+ $ip:
+ get_input: oam_net_ip
+ name:
+ get_input: fsb1-name
+ artifacts:
+ nimbus-ethernet-gw:
+ type: tosca.artifacts.Deployment
+ file: ../Artifacts/nimbus-ethernet-gw
+ nimbus-ethernet:
+ type: tosca.artifacts.Deployment
+ file: ../Artifacts/nimbus-ethernet
+ groups:
+ ep-jsa_net:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/ep-jsa_net.yaml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - nova_local_type_pcm1
+ - nova_local_type_pcm2
+ - nova_local_type_pcrf_psm
+ - nova_global_type1
+ - nova_global_type2 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/all/expectedOutput/OnlyComponentsST.yaml b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/all/expectedOutput/OnlyComponentsST.yaml
new file mode 100644
index 0000000000..9ec1aa2a8d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/all/expectedOutput/OnlyComponentsST.yaml
@@ -0,0 +1,550 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.pcrf_psm:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ capabilities:
+ instance:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: Existence of instance
+ properties:
+ name:
+ type: string
+ description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+ required: true
+ default: instance
+ status: SUPPORTED
+ description:
+ type: string
+ description: Description of the metric
+ required: false
+ status: SUPPORTED
+ unit:
+ type: string
+ description: Unit of the metric value
+ required: true
+ default: instance
+ status: SUPPORTED
+ type:
+ type: string
+ description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+ required: true
+ default: Gauge
+ status: SUPPORTED
+ category:
+ type: string
+ description: Category of the metric, for an example, compute, disk, network, storage and etc.
+ required: false
+ default: compute
+ status: SUPPORTED
+ memory:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: Volume of RAM allocated to the instance
+ properties:
+ name:
+ type: string
+ description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+ required: true
+ default: memory
+ status: SUPPORTED
+ description:
+ type: string
+ description: Description of the metric
+ required: false
+ status: SUPPORTED
+ unit:
+ type: string
+ description: Unit of the metric value
+ required: true
+ default: MB
+ status: SUPPORTED
+ type:
+ type: string
+ description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+ required: true
+ default: Gauge
+ status: SUPPORTED
+ category:
+ type: string
+ description: Category of the metric, for an example, compute, disk, network, storage and etc.
+ required: false
+ default: compute
+ status: SUPPORTED
+ cpu:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: CPU time used
+ properties:
+ name:
+ type: string
+ description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+ required: true
+ default: cpu
+ status: SUPPORTED
+ description:
+ type: string
+ description: Description of the metric
+ required: false
+ status: SUPPORTED
+ unit:
+ type: string
+ description: Unit of the metric value
+ required: true
+ default: ns
+ status: SUPPORTED
+ type:
+ type: string
+ description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+ required: true
+ default: Cumulative
+ status: SUPPORTED
+ category:
+ type: string
+ description: Category of the metric, for an example, compute, disk, network, storage and etc.
+ required: false
+ default: compute
+ status: SUPPORTED
+ org.openecomp.resource.vfc.nodes.heat.pcm:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ capabilities:
+ instance:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: Existence of instance
+ properties:
+ name:
+ type: string
+ description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+ required: true
+ default: instance
+ status: SUPPORTED
+ description:
+ type: string
+ description: Description of the metric
+ required: false
+ status: SUPPORTED
+ unit:
+ type: string
+ description: Unit of the metric value
+ required: true
+ default: instance
+ status: SUPPORTED
+ type:
+ type: string
+ description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+ required: true
+ default: Gauge
+ status: SUPPORTED
+ category:
+ type: string
+ description: Category of the metric, for an example, compute, disk, network, storage and etc.
+ required: false
+ default: compute
+ status: SUPPORTED
+ memory:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: Volume of RAM allocated to the instance
+ properties:
+ name:
+ type: string
+ description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+ required: true
+ default: memory
+ status: SUPPORTED
+ description:
+ type: string
+ description: Description of the metric
+ required: false
+ status: SUPPORTED
+ unit:
+ type: string
+ description: Unit of the metric value
+ required: true
+ default: MB
+ status: SUPPORTED
+ type:
+ type: string
+ description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+ required: true
+ default: Gauge
+ status: SUPPORTED
+ category:
+ type: string
+ description: Category of the metric, for an example, compute, disk, network, storage and etc.
+ required: false
+ default: compute
+ status: SUPPORTED
+ cpu:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: CPU time used
+ properties:
+ name:
+ type: string
+ description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+ required: true
+ default: cpu
+ status: SUPPORTED
+ description:
+ type: string
+ description: Description of the metric
+ required: false
+ status: SUPPORTED
+ unit:
+ type: string
+ description: Unit of the metric value
+ required: true
+ default: ns
+ status: SUPPORTED
+ type:
+ type: string
+ description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+ required: true
+ default: Cumulative
+ status: SUPPORTED
+ category:
+ type: string
+ description: Category of the metric, for an example, compute, disk, network, storage and etc.
+ required: false
+ default: compute
+ status: SUPPORTED
+topology_template:
+ inputs:
+ Internal2_name:
+ label: Internal2_name
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_name
+ Internal1_shared:
+ label: Internal1_shared
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_shared
+ FSB1_volume_name:
+ label: FSB1_volume
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_volume_1
+ jsa_cidr:
+ label: jsa_cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: jsa_cidr
+ default: 107.243.7.128/26
+ availabilityzone_name:
+ label: availabilityzone_name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone_name
+ fsb1-name:
+ label: FSB1_name
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_name
+ pcm_image_name:
+ label: pcm_image_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_image_name
+ Internal2_external:
+ label: Internal2_external
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_external
+ Internal2_forwarding_mode:
+ label: Internal2_forwarding_mode
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_forwarding_mode
+ pcrf_psm_flavor_name:
+ label: pcrf_psm_flavor_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_flavor_name
+ pcrf_psm_image_name:
+ label: pcrf_psm_image_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_image_name
+ FSB_1_image:
+ label: MME_FSB1
+ hidden: false
+ immutable: false
+ type: string
+ description: MME_FSB1_15B-CP04-r5a01
+ volume_size:
+ label: volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: my volume size 320GB
+ fsb1-Internal1-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ Internal2_shared:
+ label: Internal2_shared
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_shared
+ pcm_server_name:
+ label: pcm_server_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_server_name
+ Internal1_net_name:
+ label: Internal1_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_net_name
+ oam_net_name:
+ label: oam_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: oam_net_name
+ fsb1-flavor:
+ label: FSB1_flavor
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_flavor
+ fsb1-Internal2-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ volume_type:
+ label: volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: volume type Gold
+ fsb1-zone:
+ label: FSB1_zone
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_zone
+ fsb_zone:
+ label: FSB1_zone
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_zone
+ security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: String
+ jsa_net_name:
+ label: jsa_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: jsa_net_name
+ default: jsa_log_net_0
+ pcrf_psm_server_name:
+ label: pcrf_psm_server_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_server_name
+ pcm_flavor_name:
+ label: pcm_flavor_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_flavor_name
+ oam_net_id:
+ label: oam_net_id
+ hidden: false
+ immutable: false
+ type: string
+ description: oam_net_id
+ fsb2-Internal1-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ Internal1_forwarding_mode:
+ label: Internal1_forwarding_mode
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_forwarding_mode
+ pcrf_cps_net_name:
+ label: pcrf_cps_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_cps_net_name
+ cps_net_name:
+ label: cps_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: cps_net_name
+ pcrf_security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: String
+ Internal1_external:
+ label: Internal1_external
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_external
+ node_templates:
+ nova_local_type_pcm1:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_local_type_pcm2:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_local_type_pcrf_psm:
+ type: org.openecomp.resource.vfc.nodes.heat.pcrf_psm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_global_type1:
+ type: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ properties:
+ flavor:
+ get_input: fsb1-flavor
+ availability_zone:
+ get_input: fsb_zone
+ name:
+ get_input: fsb1-name
+ nova_global_type2:
+ type: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ properties:
+ flavor:
+ get_input: fsb1-flavor
+ availability_zone:
+ get_input: fsb_zone
+ metadata:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: '0644'
+ content:
+ str_replace:
+ template:
+ get_artifact:
+ - SELF
+ - nimbus-ethernet
+ params:
+ $dev: eth0
+ $netmask:
+ get_input: cps_net_mask
+ $ip:
+ get_input: cps_net_ip
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth1
+ permissions: '0644'
+ content:
+ str_replace:
+ template:
+ get_artifact:
+ - SELF
+ - nimbus-ethernet-gw
+ params:
+ $dev: eth1
+ $netmask:
+ get_input: oam_net_mask
+ $gateway:
+ get_input: oam_net_gw
+ $ip:
+ get_input: oam_net_ip
+ name:
+ get_input: fsb1-name
+ artifacts:
+ nimbus-ethernet-gw:
+ type: tosca.artifacts.Deployment
+ file: ../Artifacts/nimbus-ethernet-gw
+ nimbus-ethernet:
+ type: tosca.artifacts.Deployment
+ file: ../Artifacts/nimbus-ethernet
+ groups:
+ ep-jsa_net:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/ep-jsa_net.yaml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - nova_local_type_pcm1
+ - nova_local_type_pcm2
+ - nova_local_type_pcrf_psm
+ - nova_global_type1
+ - nova_global_type2 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/all/expectedOutput/OnlyComponentsST_01.yaml b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/all/expectedOutput/OnlyComponentsST_01.yaml
new file mode 100644
index 0000000000..9ec1aa2a8d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/all/expectedOutput/OnlyComponentsST_01.yaml
@@ -0,0 +1,550 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.pcrf_psm:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ capabilities:
+ instance:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: Existence of instance
+ properties:
+ name:
+ type: string
+ description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+ required: true
+ default: instance
+ status: SUPPORTED
+ description:
+ type: string
+ description: Description of the metric
+ required: false
+ status: SUPPORTED
+ unit:
+ type: string
+ description: Unit of the metric value
+ required: true
+ default: instance
+ status: SUPPORTED
+ type:
+ type: string
+ description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+ required: true
+ default: Gauge
+ status: SUPPORTED
+ category:
+ type: string
+ description: Category of the metric, for an example, compute, disk, network, storage and etc.
+ required: false
+ default: compute
+ status: SUPPORTED
+ memory:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: Volume of RAM allocated to the instance
+ properties:
+ name:
+ type: string
+ description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+ required: true
+ default: memory
+ status: SUPPORTED
+ description:
+ type: string
+ description: Description of the metric
+ required: false
+ status: SUPPORTED
+ unit:
+ type: string
+ description: Unit of the metric value
+ required: true
+ default: MB
+ status: SUPPORTED
+ type:
+ type: string
+ description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+ required: true
+ default: Gauge
+ status: SUPPORTED
+ category:
+ type: string
+ description: Category of the metric, for an example, compute, disk, network, storage and etc.
+ required: false
+ default: compute
+ status: SUPPORTED
+ cpu:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: CPU time used
+ properties:
+ name:
+ type: string
+ description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+ required: true
+ default: cpu
+ status: SUPPORTED
+ description:
+ type: string
+ description: Description of the metric
+ required: false
+ status: SUPPORTED
+ unit:
+ type: string
+ description: Unit of the metric value
+ required: true
+ default: ns
+ status: SUPPORTED
+ type:
+ type: string
+ description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+ required: true
+ default: Cumulative
+ status: SUPPORTED
+ category:
+ type: string
+ description: Category of the metric, for an example, compute, disk, network, storage and etc.
+ required: false
+ default: compute
+ status: SUPPORTED
+ org.openecomp.resource.vfc.nodes.heat.pcm:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ capabilities:
+ instance:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: Existence of instance
+ properties:
+ name:
+ type: string
+ description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+ required: true
+ default: instance
+ status: SUPPORTED
+ description:
+ type: string
+ description: Description of the metric
+ required: false
+ status: SUPPORTED
+ unit:
+ type: string
+ description: Unit of the metric value
+ required: true
+ default: instance
+ status: SUPPORTED
+ type:
+ type: string
+ description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+ required: true
+ default: Gauge
+ status: SUPPORTED
+ category:
+ type: string
+ description: Category of the metric, for an example, compute, disk, network, storage and etc.
+ required: false
+ default: compute
+ status: SUPPORTED
+ memory:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: Volume of RAM allocated to the instance
+ properties:
+ name:
+ type: string
+ description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+ required: true
+ default: memory
+ status: SUPPORTED
+ description:
+ type: string
+ description: Description of the metric
+ required: false
+ status: SUPPORTED
+ unit:
+ type: string
+ description: Unit of the metric value
+ required: true
+ default: MB
+ status: SUPPORTED
+ type:
+ type: string
+ description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+ required: true
+ default: Gauge
+ status: SUPPORTED
+ category:
+ type: string
+ description: Category of the metric, for an example, compute, disk, network, storage and etc.
+ required: false
+ default: compute
+ status: SUPPORTED
+ cpu:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: CPU time used
+ properties:
+ name:
+ type: string
+ description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+ required: true
+ default: cpu
+ status: SUPPORTED
+ description:
+ type: string
+ description: Description of the metric
+ required: false
+ status: SUPPORTED
+ unit:
+ type: string
+ description: Unit of the metric value
+ required: true
+ default: ns
+ status: SUPPORTED
+ type:
+ type: string
+ description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+ required: true
+ default: Cumulative
+ status: SUPPORTED
+ category:
+ type: string
+ description: Category of the metric, for an example, compute, disk, network, storage and etc.
+ required: false
+ default: compute
+ status: SUPPORTED
+topology_template:
+ inputs:
+ Internal2_name:
+ label: Internal2_name
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_name
+ Internal1_shared:
+ label: Internal1_shared
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_shared
+ FSB1_volume_name:
+ label: FSB1_volume
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_volume_1
+ jsa_cidr:
+ label: jsa_cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: jsa_cidr
+ default: 107.243.7.128/26
+ availabilityzone_name:
+ label: availabilityzone_name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone_name
+ fsb1-name:
+ label: FSB1_name
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_name
+ pcm_image_name:
+ label: pcm_image_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_image_name
+ Internal2_external:
+ label: Internal2_external
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_external
+ Internal2_forwarding_mode:
+ label: Internal2_forwarding_mode
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_forwarding_mode
+ pcrf_psm_flavor_name:
+ label: pcrf_psm_flavor_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_flavor_name
+ pcrf_psm_image_name:
+ label: pcrf_psm_image_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_image_name
+ FSB_1_image:
+ label: MME_FSB1
+ hidden: false
+ immutable: false
+ type: string
+ description: MME_FSB1_15B-CP04-r5a01
+ volume_size:
+ label: volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: my volume size 320GB
+ fsb1-Internal1-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ Internal2_shared:
+ label: Internal2_shared
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_shared
+ pcm_server_name:
+ label: pcm_server_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_server_name
+ Internal1_net_name:
+ label: Internal1_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_net_name
+ oam_net_name:
+ label: oam_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: oam_net_name
+ fsb1-flavor:
+ label: FSB1_flavor
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_flavor
+ fsb1-Internal2-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ volume_type:
+ label: volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: volume type Gold
+ fsb1-zone:
+ label: FSB1_zone
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_zone
+ fsb_zone:
+ label: FSB1_zone
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_zone
+ security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: String
+ jsa_net_name:
+ label: jsa_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: jsa_net_name
+ default: jsa_log_net_0
+ pcrf_psm_server_name:
+ label: pcrf_psm_server_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_server_name
+ pcm_flavor_name:
+ label: pcm_flavor_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_flavor_name
+ oam_net_id:
+ label: oam_net_id
+ hidden: false
+ immutable: false
+ type: string
+ description: oam_net_id
+ fsb2-Internal1-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ Internal1_forwarding_mode:
+ label: Internal1_forwarding_mode
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_forwarding_mode
+ pcrf_cps_net_name:
+ label: pcrf_cps_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_cps_net_name
+ cps_net_name:
+ label: cps_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: cps_net_name
+ pcrf_security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: String
+ Internal1_external:
+ label: Internal1_external
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_external
+ node_templates:
+ nova_local_type_pcm1:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_local_type_pcm2:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_local_type_pcrf_psm:
+ type: org.openecomp.resource.vfc.nodes.heat.pcrf_psm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_global_type1:
+ type: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ properties:
+ flavor:
+ get_input: fsb1-flavor
+ availability_zone:
+ get_input: fsb_zone
+ name:
+ get_input: fsb1-name
+ nova_global_type2:
+ type: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ properties:
+ flavor:
+ get_input: fsb1-flavor
+ availability_zone:
+ get_input: fsb_zone
+ metadata:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: '0644'
+ content:
+ str_replace:
+ template:
+ get_artifact:
+ - SELF
+ - nimbus-ethernet
+ params:
+ $dev: eth0
+ $netmask:
+ get_input: cps_net_mask
+ $ip:
+ get_input: cps_net_ip
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth1
+ permissions: '0644'
+ content:
+ str_replace:
+ template:
+ get_artifact:
+ - SELF
+ - nimbus-ethernet-gw
+ params:
+ $dev: eth1
+ $netmask:
+ get_input: oam_net_mask
+ $gateway:
+ get_input: oam_net_gw
+ $ip:
+ get_input: oam_net_ip
+ name:
+ get_input: fsb1-name
+ artifacts:
+ nimbus-ethernet-gw:
+ type: tosca.artifacts.Deployment
+ file: ../Artifacts/nimbus-ethernet-gw
+ nimbus-ethernet:
+ type: tosca.artifacts.Deployment
+ file: ../Artifacts/nimbus-ethernet
+ groups:
+ ep-jsa_net:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/ep-jsa_net.yaml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - nova_local_type_pcm1
+ - nova_local_type_pcm2
+ - nova_local_type_pcrf_psm
+ - nova_global_type1
+ - nova_global_type2 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/all/expectedOutput/VariouseST.yaml b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/all/expectedOutput/VariouseST.yaml
new file mode 100644
index 0000000000..1f39bfb314
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/all/expectedOutput/VariouseST.yaml
@@ -0,0 +1,363 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.pcrf_psm:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.pcm:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ Internal2_name:
+ label: Internal2_name
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_name
+ Internal1_shared:
+ label: Internal1_shared
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_shared
+ FSB1_volume_name:
+ label: FSB1_volume
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_volume_1
+ jsa_cidr:
+ label: jsa_cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: jsa_cidr
+ default: 107.243.7.128/26
+ availabilityzone_name:
+ label: availabilityzone_name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone_name
+ fsb1-name:
+ label: FSB1_name
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_name
+ pcm_image_name:
+ label: pcm_image_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_image_name
+ Internal2_external:
+ label: Internal2_external
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_external
+ Internal2_forwarding_mode:
+ label: Internal2_forwarding_mode
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_forwarding_mode
+ pcrf_psm_flavor_name:
+ label: pcrf_psm_flavor_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_flavor_name
+ pcrf_psm_image_name:
+ label: pcrf_psm_image_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_image_name
+ FSB_1_image:
+ label: MME_FSB1
+ hidden: false
+ immutable: false
+ type: string
+ description: MME_FSB1_15B-CP04-r5a01
+ volume_size:
+ label: volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: my volume size 320GB
+ fsb1-Internal1-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ Internal2_shared:
+ label: Internal2_shared
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_shared
+ pcm_server_name:
+ label: pcm_server_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_server_name
+ Internal1_net_name:
+ label: Internal1_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_net_name
+ oam_net_name:
+ label: oam_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: oam_net_name
+ fsb1-flavor:
+ label: FSB1_flavor
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_flavor
+ fsb1-Internal2-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ volume_type:
+ label: volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: volume type Gold
+ fsb1-zone:
+ label: FSB1_zone
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_zone
+ fsb_zone:
+ label: FSB1_zone
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_zone
+ security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: String
+ jsa_net_name:
+ label: jsa_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: jsa_net_name
+ default: jsa_log_net_0
+ pcrf_psm_server_name:
+ label: pcrf_psm_server_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_server_name
+ pcm_flavor_name:
+ label: pcm_flavor_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_flavor_name
+ oam_net_id:
+ label: oam_net_id
+ hidden: false
+ immutable: false
+ type: string
+ description: oam_net_id
+ fsb2-Internal1-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ Internal1_forwarding_mode:
+ label: Internal1_forwarding_mode
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_forwarding_mode
+ pcrf_cps_net_name:
+ label: pcrf_cps_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_cps_net_name
+ cps_net_name:
+ label: cps_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: cps_net_name
+ pcrf_security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: String
+ Internal1_external:
+ label: Internal1_external
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_external
+ node_templates:
+
+ jsa_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ jsa_net1:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ nova_local_type_pcm1:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_local_type_pcm2:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_local_type_pcrf_psm:
+ type: org.openecomp.resource.vfc.nodes.heat.pcrf_psm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_global_type1:
+ type: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ properties:
+ flavor:
+ get_input: fsb1-flavor
+ availability_zone:
+ get_input: fsb_zone
+ name:
+ get_input: fsb1-name
+ nova_global_type2:
+ type: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ properties:
+ flavor:
+ get_input: fsb1-flavor
+ availability_zone:
+ get_input: fsb_zone
+ metadata:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: '0644'
+ content:
+ str_replace:
+ template:
+ get_artifact:
+ - SELF
+ - nimbus-ethernet
+ params:
+ $dev: eth0
+ $netmask:
+ get_input: cps_net_mask
+ $ip:
+ get_input: cps_net_ip
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth1
+ permissions: '0644'
+ content:
+ str_replace:
+ template:
+ get_artifact:
+ - SELF
+ - nimbus-ethernet-gw
+ params:
+ $dev: eth1
+ $netmask:
+ get_input: oam_net_mask
+ $gateway:
+ get_input: oam_net_gw
+ $ip:
+ get_input: oam_net_ip
+ name:
+ get_input: fsb1-name
+ artifacts:
+ nimbus-ethernet-gw:
+ type: tosca.artifacts.Deployment
+ file: ../Artifacts/nimbus-ethernet-gw
+ nimbus-ethernet:
+ type: tosca.artifacts.Deployment
+ file: ../Artifacts/nimbus-ethernet
+ groups:
+ ep-jsa_net:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/ep-jsa_net.yaml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - nova_local_type_pcm1
+ - nova_local_type_pcm2
+ - nova_local_type_pcrf_psm
+ - nova_global_type1
+ - nova_global_type2 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/onlyComponents/OnlyComponentsST.yaml b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/onlyComponents/OnlyComponentsST.yaml
new file mode 100644
index 0000000000..54f39e4219
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/onlyComponents/OnlyComponentsST.yaml
@@ -0,0 +1,350 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.pcrf_psm:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.pcm:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ Internal2_name:
+ label: Internal2_name
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_name
+ Internal1_shared:
+ label: Internal1_shared
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_shared
+ FSB1_volume_name:
+ label: FSB1_volume
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_volume_1
+ jsa_cidr:
+ label: jsa_cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: jsa_cidr
+ default: 107.243.7.128/26
+ availabilityzone_name:
+ label: availabilityzone_name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone_name
+ fsb1-name:
+ label: FSB1_name
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_name
+ pcm_image_name:
+ label: pcm_image_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_image_name
+ Internal2_external:
+ label: Internal2_external
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_external
+ Internal2_forwarding_mode:
+ label: Internal2_forwarding_mode
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_forwarding_mode
+ pcrf_psm_flavor_name:
+ label: pcrf_psm_flavor_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_flavor_name
+ pcrf_psm_image_name:
+ label: pcrf_psm_image_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_image_name
+ FSB_1_image:
+ label: MME_FSB1
+ hidden: false
+ immutable: false
+ type: string
+ description: MME_FSB1_15B-CP04-r5a01
+ volume_size:
+ label: volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: my volume size 320GB
+ fsb1-Internal1-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ Internal2_shared:
+ label: Internal2_shared
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_shared
+ pcm_server_name:
+ label: pcm_server_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_server_name
+ Internal1_net_name:
+ label: Internal1_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_net_name
+ oam_net_name:
+ label: oam_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: oam_net_name
+ fsb1-flavor:
+ label: FSB1_flavor
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_flavor
+ fsb1-Internal2-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ volume_type:
+ label: volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: volume type Gold
+ fsb1-zone:
+ label: FSB1_zone
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_zone
+ fsb_zone:
+ label: FSB1_zone
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_zone
+ security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: String
+ jsa_net_name:
+ label: jsa_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: jsa_net_name
+ default: jsa_log_net_0
+ pcrf_psm_server_name:
+ label: pcrf_psm_server_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_server_name
+ pcm_flavor_name:
+ label: pcm_flavor_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_flavor_name
+ oam_net_id:
+ label: oam_net_id
+ hidden: false
+ immutable: false
+ type: string
+ description: oam_net_id
+ fsb2-Internal1-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ Internal1_forwarding_mode:
+ label: Internal1_forwarding_mode
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_forwarding_mode
+ pcrf_cps_net_name:
+ label: pcrf_cps_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_cps_net_name
+ cps_net_name:
+ label: cps_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: cps_net_name
+ pcrf_security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: String
+ Internal1_external:
+ label: Internal1_external
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_external
+ node_templates:
+ nova_local_type_pcm1:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_local_type_pcm2:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_local_type_pcrf_psm:
+ type: org.openecomp.resource.vfc.nodes.heat.pcrf_psm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_global_type1:
+ type: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ properties:
+ flavor:
+ get_input: fsb1-flavor
+ availability_zone:
+ get_input: fsb_zone
+ name:
+ get_input: fsb1-name
+ nova_global_type2:
+ type: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ properties:
+ flavor:
+ get_input: fsb1-flavor
+ availability_zone:
+ get_input: fsb_zone
+ metadata:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: '0644'
+ content:
+ str_replace:
+ template:
+ get_artifact:
+ - SELF
+ - nimbus-ethernet
+ params:
+ $dev: eth0
+ $netmask:
+ get_input: cps_net_mask
+ $ip:
+ get_input: cps_net_ip
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth1
+ permissions: '0644'
+ content:
+ str_replace:
+ template:
+ get_artifact:
+ - SELF
+ - nimbus-ethernet-gw
+ params:
+ $dev: eth1
+ $netmask:
+ get_input: oam_net_mask
+ $gateway:
+ get_input: oam_net_gw
+ $ip:
+ get_input: oam_net_ip
+ name:
+ get_input: fsb1-name
+ artifacts:
+ nimbus-ethernet-gw:
+ type: tosca.artifacts.Deployment
+ file: ../Artifacts/nimbus-ethernet-gw
+ nimbus-ethernet:
+ type: tosca.artifacts.Deployment
+ file: ../Artifacts/nimbus-ethernet
+ groups:
+ ep-jsa_net:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/ep-jsa_net.yaml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - nova_local_type_pcm1
+ - nova_local_type_pcm2
+ - nova_local_type_pcrf_psm
+ - nova_global_type1
+ - nova_global_type2 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/onlyComponents/OnlyComponentsST_01.yaml b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/onlyComponents/OnlyComponentsST_01.yaml
new file mode 100644
index 0000000000..54f39e4219
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/onlyComponents/OnlyComponentsST_01.yaml
@@ -0,0 +1,350 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.pcrf_psm:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.pcm:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ Internal2_name:
+ label: Internal2_name
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_name
+ Internal1_shared:
+ label: Internal1_shared
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_shared
+ FSB1_volume_name:
+ label: FSB1_volume
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_volume_1
+ jsa_cidr:
+ label: jsa_cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: jsa_cidr
+ default: 107.243.7.128/26
+ availabilityzone_name:
+ label: availabilityzone_name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone_name
+ fsb1-name:
+ label: FSB1_name
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_name
+ pcm_image_name:
+ label: pcm_image_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_image_name
+ Internal2_external:
+ label: Internal2_external
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_external
+ Internal2_forwarding_mode:
+ label: Internal2_forwarding_mode
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_forwarding_mode
+ pcrf_psm_flavor_name:
+ label: pcrf_psm_flavor_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_flavor_name
+ pcrf_psm_image_name:
+ label: pcrf_psm_image_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_image_name
+ FSB_1_image:
+ label: MME_FSB1
+ hidden: false
+ immutable: false
+ type: string
+ description: MME_FSB1_15B-CP04-r5a01
+ volume_size:
+ label: volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: my volume size 320GB
+ fsb1-Internal1-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ Internal2_shared:
+ label: Internal2_shared
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_shared
+ pcm_server_name:
+ label: pcm_server_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_server_name
+ Internal1_net_name:
+ label: Internal1_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_net_name
+ oam_net_name:
+ label: oam_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: oam_net_name
+ fsb1-flavor:
+ label: FSB1_flavor
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_flavor
+ fsb1-Internal2-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ volume_type:
+ label: volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: volume type Gold
+ fsb1-zone:
+ label: FSB1_zone
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_zone
+ fsb_zone:
+ label: FSB1_zone
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_zone
+ security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: String
+ jsa_net_name:
+ label: jsa_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: jsa_net_name
+ default: jsa_log_net_0
+ pcrf_psm_server_name:
+ label: pcrf_psm_server_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_server_name
+ pcm_flavor_name:
+ label: pcm_flavor_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_flavor_name
+ oam_net_id:
+ label: oam_net_id
+ hidden: false
+ immutable: false
+ type: string
+ description: oam_net_id
+ fsb2-Internal1-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ Internal1_forwarding_mode:
+ label: Internal1_forwarding_mode
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_forwarding_mode
+ pcrf_cps_net_name:
+ label: pcrf_cps_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_cps_net_name
+ cps_net_name:
+ label: cps_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: cps_net_name
+ pcrf_security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: String
+ Internal1_external:
+ label: Internal1_external
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_external
+ node_templates:
+ nova_local_type_pcm1:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_local_type_pcm2:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_local_type_pcrf_psm:
+ type: org.openecomp.resource.vfc.nodes.heat.pcrf_psm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_global_type1:
+ type: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ properties:
+ flavor:
+ get_input: fsb1-flavor
+ availability_zone:
+ get_input: fsb_zone
+ name:
+ get_input: fsb1-name
+ nova_global_type2:
+ type: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ properties:
+ flavor:
+ get_input: fsb1-flavor
+ availability_zone:
+ get_input: fsb_zone
+ metadata:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: '0644'
+ content:
+ str_replace:
+ template:
+ get_artifact:
+ - SELF
+ - nimbus-ethernet
+ params:
+ $dev: eth0
+ $netmask:
+ get_input: cps_net_mask
+ $ip:
+ get_input: cps_net_ip
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth1
+ permissions: '0644'
+ content:
+ str_replace:
+ template:
+ get_artifact:
+ - SELF
+ - nimbus-ethernet-gw
+ params:
+ $dev: eth1
+ $netmask:
+ get_input: oam_net_mask
+ $gateway:
+ get_input: oam_net_gw
+ $ip:
+ get_input: oam_net_ip
+ name:
+ get_input: fsb1-name
+ artifacts:
+ nimbus-ethernet-gw:
+ type: tosca.artifacts.Deployment
+ file: ../Artifacts/nimbus-ethernet-gw
+ nimbus-ethernet:
+ type: tosca.artifacts.Deployment
+ file: ../Artifacts/nimbus-ethernet
+ groups:
+ ep-jsa_net:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/ep-jsa_net.yaml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - nova_local_type_pcm1
+ - nova_local_type_pcm2
+ - nova_local_type_pcrf_psm
+ - nova_global_type1
+ - nova_global_type2 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/onlyComponents/expectedOutput/OnlyComponentsST.yaml b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/onlyComponents/expectedOutput/OnlyComponentsST.yaml
new file mode 100644
index 0000000000..9ec1aa2a8d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/onlyComponents/expectedOutput/OnlyComponentsST.yaml
@@ -0,0 +1,550 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.pcrf_psm:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ capabilities:
+ instance:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: Existence of instance
+ properties:
+ name:
+ type: string
+ description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+ required: true
+ default: instance
+ status: SUPPORTED
+ description:
+ type: string
+ description: Description of the metric
+ required: false
+ status: SUPPORTED
+ unit:
+ type: string
+ description: Unit of the metric value
+ required: true
+ default: instance
+ status: SUPPORTED
+ type:
+ type: string
+ description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+ required: true
+ default: Gauge
+ status: SUPPORTED
+ category:
+ type: string
+ description: Category of the metric, for an example, compute, disk, network, storage and etc.
+ required: false
+ default: compute
+ status: SUPPORTED
+ memory:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: Volume of RAM allocated to the instance
+ properties:
+ name:
+ type: string
+ description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+ required: true
+ default: memory
+ status: SUPPORTED
+ description:
+ type: string
+ description: Description of the metric
+ required: false
+ status: SUPPORTED
+ unit:
+ type: string
+ description: Unit of the metric value
+ required: true
+ default: MB
+ status: SUPPORTED
+ type:
+ type: string
+ description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+ required: true
+ default: Gauge
+ status: SUPPORTED
+ category:
+ type: string
+ description: Category of the metric, for an example, compute, disk, network, storage and etc.
+ required: false
+ default: compute
+ status: SUPPORTED
+ cpu:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: CPU time used
+ properties:
+ name:
+ type: string
+ description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+ required: true
+ default: cpu
+ status: SUPPORTED
+ description:
+ type: string
+ description: Description of the metric
+ required: false
+ status: SUPPORTED
+ unit:
+ type: string
+ description: Unit of the metric value
+ required: true
+ default: ns
+ status: SUPPORTED
+ type:
+ type: string
+ description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+ required: true
+ default: Cumulative
+ status: SUPPORTED
+ category:
+ type: string
+ description: Category of the metric, for an example, compute, disk, network, storage and etc.
+ required: false
+ default: compute
+ status: SUPPORTED
+ org.openecomp.resource.vfc.nodes.heat.pcm:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ capabilities:
+ instance:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: Existence of instance
+ properties:
+ name:
+ type: string
+ description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+ required: true
+ default: instance
+ status: SUPPORTED
+ description:
+ type: string
+ description: Description of the metric
+ required: false
+ status: SUPPORTED
+ unit:
+ type: string
+ description: Unit of the metric value
+ required: true
+ default: instance
+ status: SUPPORTED
+ type:
+ type: string
+ description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+ required: true
+ default: Gauge
+ status: SUPPORTED
+ category:
+ type: string
+ description: Category of the metric, for an example, compute, disk, network, storage and etc.
+ required: false
+ default: compute
+ status: SUPPORTED
+ memory:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: Volume of RAM allocated to the instance
+ properties:
+ name:
+ type: string
+ description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+ required: true
+ default: memory
+ status: SUPPORTED
+ description:
+ type: string
+ description: Description of the metric
+ required: false
+ status: SUPPORTED
+ unit:
+ type: string
+ description: Unit of the metric value
+ required: true
+ default: MB
+ status: SUPPORTED
+ type:
+ type: string
+ description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+ required: true
+ default: Gauge
+ status: SUPPORTED
+ category:
+ type: string
+ description: Category of the metric, for an example, compute, disk, network, storage and etc.
+ required: false
+ default: compute
+ status: SUPPORTED
+ cpu:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: CPU time used
+ properties:
+ name:
+ type: string
+ description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+ required: true
+ default: cpu
+ status: SUPPORTED
+ description:
+ type: string
+ description: Description of the metric
+ required: false
+ status: SUPPORTED
+ unit:
+ type: string
+ description: Unit of the metric value
+ required: true
+ default: ns
+ status: SUPPORTED
+ type:
+ type: string
+ description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+ required: true
+ default: Cumulative
+ status: SUPPORTED
+ category:
+ type: string
+ description: Category of the metric, for an example, compute, disk, network, storage and etc.
+ required: false
+ default: compute
+ status: SUPPORTED
+topology_template:
+ inputs:
+ Internal2_name:
+ label: Internal2_name
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_name
+ Internal1_shared:
+ label: Internal1_shared
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_shared
+ FSB1_volume_name:
+ label: FSB1_volume
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_volume_1
+ jsa_cidr:
+ label: jsa_cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: jsa_cidr
+ default: 107.243.7.128/26
+ availabilityzone_name:
+ label: availabilityzone_name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone_name
+ fsb1-name:
+ label: FSB1_name
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_name
+ pcm_image_name:
+ label: pcm_image_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_image_name
+ Internal2_external:
+ label: Internal2_external
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_external
+ Internal2_forwarding_mode:
+ label: Internal2_forwarding_mode
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_forwarding_mode
+ pcrf_psm_flavor_name:
+ label: pcrf_psm_flavor_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_flavor_name
+ pcrf_psm_image_name:
+ label: pcrf_psm_image_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_image_name
+ FSB_1_image:
+ label: MME_FSB1
+ hidden: false
+ immutable: false
+ type: string
+ description: MME_FSB1_15B-CP04-r5a01
+ volume_size:
+ label: volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: my volume size 320GB
+ fsb1-Internal1-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ Internal2_shared:
+ label: Internal2_shared
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_shared
+ pcm_server_name:
+ label: pcm_server_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_server_name
+ Internal1_net_name:
+ label: Internal1_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_net_name
+ oam_net_name:
+ label: oam_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: oam_net_name
+ fsb1-flavor:
+ label: FSB1_flavor
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_flavor
+ fsb1-Internal2-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ volume_type:
+ label: volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: volume type Gold
+ fsb1-zone:
+ label: FSB1_zone
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_zone
+ fsb_zone:
+ label: FSB1_zone
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_zone
+ security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: String
+ jsa_net_name:
+ label: jsa_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: jsa_net_name
+ default: jsa_log_net_0
+ pcrf_psm_server_name:
+ label: pcrf_psm_server_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_server_name
+ pcm_flavor_name:
+ label: pcm_flavor_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_flavor_name
+ oam_net_id:
+ label: oam_net_id
+ hidden: false
+ immutable: false
+ type: string
+ description: oam_net_id
+ fsb2-Internal1-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ Internal1_forwarding_mode:
+ label: Internal1_forwarding_mode
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_forwarding_mode
+ pcrf_cps_net_name:
+ label: pcrf_cps_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_cps_net_name
+ cps_net_name:
+ label: cps_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: cps_net_name
+ pcrf_security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: String
+ Internal1_external:
+ label: Internal1_external
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_external
+ node_templates:
+ nova_local_type_pcm1:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_local_type_pcm2:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_local_type_pcrf_psm:
+ type: org.openecomp.resource.vfc.nodes.heat.pcrf_psm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_global_type1:
+ type: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ properties:
+ flavor:
+ get_input: fsb1-flavor
+ availability_zone:
+ get_input: fsb_zone
+ name:
+ get_input: fsb1-name
+ nova_global_type2:
+ type: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ properties:
+ flavor:
+ get_input: fsb1-flavor
+ availability_zone:
+ get_input: fsb_zone
+ metadata:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: '0644'
+ content:
+ str_replace:
+ template:
+ get_artifact:
+ - SELF
+ - nimbus-ethernet
+ params:
+ $dev: eth0
+ $netmask:
+ get_input: cps_net_mask
+ $ip:
+ get_input: cps_net_ip
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth1
+ permissions: '0644'
+ content:
+ str_replace:
+ template:
+ get_artifact:
+ - SELF
+ - nimbus-ethernet-gw
+ params:
+ $dev: eth1
+ $netmask:
+ get_input: oam_net_mask
+ $gateway:
+ get_input: oam_net_gw
+ $ip:
+ get_input: oam_net_ip
+ name:
+ get_input: fsb1-name
+ artifacts:
+ nimbus-ethernet-gw:
+ type: tosca.artifacts.Deployment
+ file: ../Artifacts/nimbus-ethernet-gw
+ nimbus-ethernet:
+ type: tosca.artifacts.Deployment
+ file: ../Artifacts/nimbus-ethernet
+ groups:
+ ep-jsa_net:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/ep-jsa_net.yaml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - nova_local_type_pcm1
+ - nova_local_type_pcm2
+ - nova_local_type_pcrf_psm
+ - nova_global_type1
+ - nova_global_type2 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/onlyComponents/expectedOutput/OnlyComponentsST_01.yaml b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/onlyComponents/expectedOutput/OnlyComponentsST_01.yaml
new file mode 100644
index 0000000000..9ec1aa2a8d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/onlyComponents/expectedOutput/OnlyComponentsST_01.yaml
@@ -0,0 +1,550 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.pcrf_psm:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ capabilities:
+ instance:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: Existence of instance
+ properties:
+ name:
+ type: string
+ description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+ required: true
+ default: instance
+ status: SUPPORTED
+ description:
+ type: string
+ description: Description of the metric
+ required: false
+ status: SUPPORTED
+ unit:
+ type: string
+ description: Unit of the metric value
+ required: true
+ default: instance
+ status: SUPPORTED
+ type:
+ type: string
+ description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+ required: true
+ default: Gauge
+ status: SUPPORTED
+ category:
+ type: string
+ description: Category of the metric, for an example, compute, disk, network, storage and etc.
+ required: false
+ default: compute
+ status: SUPPORTED
+ memory:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: Volume of RAM allocated to the instance
+ properties:
+ name:
+ type: string
+ description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+ required: true
+ default: memory
+ status: SUPPORTED
+ description:
+ type: string
+ description: Description of the metric
+ required: false
+ status: SUPPORTED
+ unit:
+ type: string
+ description: Unit of the metric value
+ required: true
+ default: MB
+ status: SUPPORTED
+ type:
+ type: string
+ description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+ required: true
+ default: Gauge
+ status: SUPPORTED
+ category:
+ type: string
+ description: Category of the metric, for an example, compute, disk, network, storage and etc.
+ required: false
+ default: compute
+ status: SUPPORTED
+ cpu:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: CPU time used
+ properties:
+ name:
+ type: string
+ description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+ required: true
+ default: cpu
+ status: SUPPORTED
+ description:
+ type: string
+ description: Description of the metric
+ required: false
+ status: SUPPORTED
+ unit:
+ type: string
+ description: Unit of the metric value
+ required: true
+ default: ns
+ status: SUPPORTED
+ type:
+ type: string
+ description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+ required: true
+ default: Cumulative
+ status: SUPPORTED
+ category:
+ type: string
+ description: Category of the metric, for an example, compute, disk, network, storage and etc.
+ required: false
+ default: compute
+ status: SUPPORTED
+ org.openecomp.resource.vfc.nodes.heat.pcm:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ capabilities:
+ instance:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: Existence of instance
+ properties:
+ name:
+ type: string
+ description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+ required: true
+ default: instance
+ status: SUPPORTED
+ description:
+ type: string
+ description: Description of the metric
+ required: false
+ status: SUPPORTED
+ unit:
+ type: string
+ description: Unit of the metric value
+ required: true
+ default: instance
+ status: SUPPORTED
+ type:
+ type: string
+ description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+ required: true
+ default: Gauge
+ status: SUPPORTED
+ category:
+ type: string
+ description: Category of the metric, for an example, compute, disk, network, storage and etc.
+ required: false
+ default: compute
+ status: SUPPORTED
+ memory:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: Volume of RAM allocated to the instance
+ properties:
+ name:
+ type: string
+ description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+ required: true
+ default: memory
+ status: SUPPORTED
+ description:
+ type: string
+ description: Description of the metric
+ required: false
+ status: SUPPORTED
+ unit:
+ type: string
+ description: Unit of the metric value
+ required: true
+ default: MB
+ status: SUPPORTED
+ type:
+ type: string
+ description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+ required: true
+ default: Gauge
+ status: SUPPORTED
+ category:
+ type: string
+ description: Category of the metric, for an example, compute, disk, network, storage and etc.
+ required: false
+ default: compute
+ status: SUPPORTED
+ cpu:
+ type: org.openecomp.capabilities.metric.Ceilometer
+ description: CPU time used
+ properties:
+ name:
+ type: string
+ description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+ required: true
+ default: cpu
+ status: SUPPORTED
+ description:
+ type: string
+ description: Description of the metric
+ required: false
+ status: SUPPORTED
+ unit:
+ type: string
+ description: Unit of the metric value
+ required: true
+ default: ns
+ status: SUPPORTED
+ type:
+ type: string
+ description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+ required: true
+ default: Cumulative
+ status: SUPPORTED
+ category:
+ type: string
+ description: Category of the metric, for an example, compute, disk, network, storage and etc.
+ required: false
+ default: compute
+ status: SUPPORTED
+topology_template:
+ inputs:
+ Internal2_name:
+ label: Internal2_name
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_name
+ Internal1_shared:
+ label: Internal1_shared
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_shared
+ FSB1_volume_name:
+ label: FSB1_volume
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_volume_1
+ jsa_cidr:
+ label: jsa_cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: jsa_cidr
+ default: 107.243.7.128/26
+ availabilityzone_name:
+ label: availabilityzone_name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone_name
+ fsb1-name:
+ label: FSB1_name
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_name
+ pcm_image_name:
+ label: pcm_image_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_image_name
+ Internal2_external:
+ label: Internal2_external
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_external
+ Internal2_forwarding_mode:
+ label: Internal2_forwarding_mode
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_forwarding_mode
+ pcrf_psm_flavor_name:
+ label: pcrf_psm_flavor_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_flavor_name
+ pcrf_psm_image_name:
+ label: pcrf_psm_image_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_image_name
+ FSB_1_image:
+ label: MME_FSB1
+ hidden: false
+ immutable: false
+ type: string
+ description: MME_FSB1_15B-CP04-r5a01
+ volume_size:
+ label: volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: my volume size 320GB
+ fsb1-Internal1-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ Internal2_shared:
+ label: Internal2_shared
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_shared
+ pcm_server_name:
+ label: pcm_server_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_server_name
+ Internal1_net_name:
+ label: Internal1_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_net_name
+ oam_net_name:
+ label: oam_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: oam_net_name
+ fsb1-flavor:
+ label: FSB1_flavor
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_flavor
+ fsb1-Internal2-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ volume_type:
+ label: volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: volume type Gold
+ fsb1-zone:
+ label: FSB1_zone
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_zone
+ fsb_zone:
+ label: FSB1_zone
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_zone
+ security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: String
+ jsa_net_name:
+ label: jsa_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: jsa_net_name
+ default: jsa_log_net_0
+ pcrf_psm_server_name:
+ label: pcrf_psm_server_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_server_name
+ pcm_flavor_name:
+ label: pcm_flavor_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_flavor_name
+ oam_net_id:
+ label: oam_net_id
+ hidden: false
+ immutable: false
+ type: string
+ description: oam_net_id
+ fsb2-Internal1-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ Internal1_forwarding_mode:
+ label: Internal1_forwarding_mode
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_forwarding_mode
+ pcrf_cps_net_name:
+ label: pcrf_cps_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_cps_net_name
+ cps_net_name:
+ label: cps_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: cps_net_name
+ pcrf_security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: String
+ Internal1_external:
+ label: Internal1_external
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_external
+ node_templates:
+ nova_local_type_pcm1:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_local_type_pcm2:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_local_type_pcrf_psm:
+ type: org.openecomp.resource.vfc.nodes.heat.pcrf_psm
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ user_data: UNSUPPORTED_RESOURCE_server_init
+ nova_global_type1:
+ type: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ properties:
+ flavor:
+ get_input: fsb1-flavor
+ availability_zone:
+ get_input: fsb_zone
+ name:
+ get_input: fsb1-name
+ nova_global_type2:
+ type: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ properties:
+ flavor:
+ get_input: fsb1-flavor
+ availability_zone:
+ get_input: fsb_zone
+ metadata:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: '0644'
+ content:
+ str_replace:
+ template:
+ get_artifact:
+ - SELF
+ - nimbus-ethernet
+ params:
+ $dev: eth0
+ $netmask:
+ get_input: cps_net_mask
+ $ip:
+ get_input: cps_net_ip
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth1
+ permissions: '0644'
+ content:
+ str_replace:
+ template:
+ get_artifact:
+ - SELF
+ - nimbus-ethernet-gw
+ params:
+ $dev: eth1
+ $netmask:
+ get_input: oam_net_mask
+ $gateway:
+ get_input: oam_net_gw
+ $ip:
+ get_input: oam_net_ip
+ name:
+ get_input: fsb1-name
+ artifacts:
+ nimbus-ethernet-gw:
+ type: tosca.artifacts.Deployment
+ file: ../Artifacts/nimbus-ethernet-gw
+ nimbus-ethernet:
+ type: tosca.artifacts.Deployment
+ file: ../Artifacts/nimbus-ethernet
+ groups:
+ ep-jsa_net:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/ep-jsa_net.yaml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - nova_local_type_pcm1
+ - nova_local_type_pcm2
+ - nova_local_type_pcrf_psm
+ - nova_global_type1
+ - nova_global_type2 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/AbstractSubstituteGlobalTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/AbstractSubstituteGlobalTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..8813b0abf6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/AbstractSubstituteGlobalTypesServiceTemplate.yaml
@@ -0,0 +1,47 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: AbstractSubstituteGlobalTypes
+ template_version: 1.0.0
+description: Abstract Substitute Global Types
+imports:
+ common_definitions:
+ file: CommonGlobalTypesServiceTemplate.yaml
+data_types:
+ org.openecomp.datatypes.heat.substitution.SubstitutionFilter:
+ derived_from: tosca.datatypes.Root
+ description: Substitution Filter
+ properties:
+ substitute_service_template:
+ type: string
+ description: Substitute Service Template
+ required: true
+ status: SUPPORTED
+ index_variable:
+ type: string
+ description: Index variable
+ required: false
+ default: '%index%'
+ status: SUPPORTED
+ constraints:
+ - min_length: 3
+ count:
+ type: string
+ description: Count
+ required: false
+ default: 1
+ status: SUPPORTED
+ mandatory:
+ type: boolean
+ description: Mandatory
+ required: false
+ default: true
+ status: SUPPORTED
+node_types:
+ org.openecomp.resource.abstract.nodes.AbstractSubstitute:
+ derived_from: tosca.nodes.Root
+ properties:
+ service_template_filter:
+ type: org.openecomp.datatypes.heat.substitution.SubstitutionFilter
+ description: Substitution Filter
+ required: true
+ status: SUPPORTED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/CinderVolumeGlobalTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/CinderVolumeGlobalTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..3ef94f22e7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/CinderVolumeGlobalTypesServiceTemplate.yaml
@@ -0,0 +1,176 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: CinderVolumeGlobalTypes
+ template_version: 1.0.0
+description: Cinder Volume TOSCA Global Types
+relationship_types:
+ org.openecomp.relationships.heat.cinder.VolumeAttachesTo:
+ derived_from: tosca.relationships.AttachesTo
+ description: This type represents an attachment relationship for associating volume
+ properties:
+ volume_id:
+ type: string
+ description: The ID of the volume to be attached
+ required: true
+ status: SUPPORTED
+ location:
+ type: string
+ description: The location where the volume is exposed on the instance, mountpoint
+ required: false
+ status: SUPPORTED
+ instance_uuid:
+ type: string
+ description: The ID of the server to which the volume attaches
+ required: true
+ status: SUPPORTED
+ attributes:
+ show:
+ type: string
+ description: Detailed information about resource
+ status: SUPPORTED
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cinder.Volume:
+ derived_from: tosca.nodes.BlockStorage
+ properties:
+ availability_zone:
+ type: string
+ description: The availability zone in which the volume will be created
+ required: false
+ status: SUPPORTED
+ image:
+ type: string
+ description: If specified, the name or ID of the image to create the volume from
+ required: false
+ status: SUPPORTED
+ metadata:
+ type: map
+ description: Key/value pairs to associate with the volume
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ volume_type:
+ type: string
+ description: If specified, the type of volume to use, mapping to a specific backend
+ required: false
+ status: SUPPORTED
+ description:
+ type: string
+ description: A description of the volume
+ required: false
+ status: SUPPORTED
+ device_type:
+ type: string
+ description: Device type
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - cdrom
+ - disk
+ disk_bus:
+ type: string
+ description: 'Bus of the device: hypervisor driver chooses a suitable default
+ if omitted'
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - ide
+ - lame_bus
+ - scsi
+ - usb
+ - virtio
+ backup_id:
+ type: string
+ description: If specified, the backup to create the volume from
+ required: false
+ status: SUPPORTED
+ source_volid:
+ type: string
+ description: If specified, the volume to use as source
+ required: false
+ status: SUPPORTED
+ boot_index:
+ type: integer
+ description: Integer used for ordering the boot disks
+ required: false
+ status: SUPPORTED
+ size:
+ type: scalar-unit.size
+ description: The requested storage size (default unit is MB)
+ required: false
+ status: SUPPORTED
+ constraints:
+ - greater_or_equal: 1 GB
+ read_only:
+ type: boolean
+ description: Enables or disables read-only access mode of volume
+ required: false
+ status: SUPPORTED
+ name:
+ type: string
+ description: A name used to distinguish the volume
+ required: false
+ status: SUPPORTED
+ scheduler_hints:
+ type: map
+ description: Arbitrary key-value pairs specified by the client to help the Cinder scheduler creating a volume
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ swap_size:
+ type: scalar-unit.size
+ description: The size of the swap, in MB
+ required: false
+ status: SUPPORTED
+ delete_on_termination:
+ type: boolean
+ description: Indicate whether the volume should be deleted when the server is terminated
+ required: false
+ status: SUPPORTED
+ multiattach:
+ type: boolean
+ description: Whether allow the volume to be attached more than once
+ required: false
+ status: SUPPORTED
+ attributes:
+ display_description:
+ type: string
+ description: Description of the volume
+ status: SUPPORTED
+ attachments:
+ type: string
+ description: The list of attachments of the volume
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ encrypted:
+ type: boolean
+ description: Boolean indicating if the volume is encrypted or not
+ status: SUPPORTED
+ show:
+ type: string
+ description: Detailed information about resource
+ status: SUPPORTED
+ created_at:
+ type: timestamp
+ description: The timestamp indicating volume creation
+ status: SUPPORTED
+ display_name:
+ type: string
+ description: Name of the volume
+ status: SUPPORTED
+ metadata_values:
+ type: map
+ description: Key/value pairs associated with the volume in raw dict form
+ status: SUPPORTED
+ bootable:
+ type: boolean
+ description: Boolean indicating if the volume can be booted or not
+ status: SUPPORTED
+ status:
+ type: string
+ description: The current status of the volume
+ status: SUPPORTED
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/CommonGlobalTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/CommonGlobalTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..3388d5a89b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/CommonGlobalTypesServiceTemplate.yaml
@@ -0,0 +1,213 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: CommonGlobalTypes
+ template_version: 1.0.0
+description: TOSCA Global Types
+imports:
+ NativeTypesServiceTemplate:
+ file: NativeTypesServiceTemplateServiceTemplate.yaml
+data_types:
+ org.openecomp.datatypes.heat.network.AddressPair:
+ derived_from: tosca.datatypes.Root
+ description: MAC/IP address pairs
+ properties:
+ mac_address:
+ type: string
+ description: MAC address
+ required: false
+ status: SUPPORTED
+ ip_address:
+ type: string
+ description: IP address
+ required: false
+ status: SUPPORTED
+ org.openecomp.datatypes.heat.network.subnet.HostRoute:
+ derived_from: tosca.datatypes.Root
+ description: Host route info for the subnet
+ properties:
+ destination:
+ type: string
+ description: The destination for static route
+ required: false
+ status: SUPPORTED
+ nexthop:
+ type: string
+ description: The next hop for the destination
+ required: false
+ status: SUPPORTED
+ org.openecomp.datatypes.heat.network.neutron.Subnet:
+ derived_from: tosca.datatypes.Root
+ description: A subnet represents an IP address block that can be used for assigning IP addresses to virtual instances
+ properties:
+ tenant_id:
+ type: string
+ description: The ID of the tenant who owns the network
+ required: false
+ status: SUPPORTED
+ enable_dhcp:
+ type: boolean
+ description: Set to true if DHCP is enabled and false if DHCP is disabled
+ required: false
+ default: true
+ status: SUPPORTED
+ ipv6_address_mode:
+ type: string
+ description: IPv6 address mode
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - dhcpv6-stateful
+ - dhcpv6-stateless
+ - slaac
+ ipv6_ra_mode:
+ type: string
+ description: IPv6 RA (Router Advertisement) mode
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - dhcpv6-stateful
+ - dhcpv6-stateless
+ - slaac
+ value_specs:
+ type: map
+ description: Extra parameters to include in the request
+ required: false
+ default: {
+ }
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ allocation_pools:
+ type: list
+ description: The start and end addresses for the allocation pools
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.AllocationPool
+ subnetpool:
+ type: string
+ description: The name or ID of the subnet pool
+ required: false
+ status: SUPPORTED
+ dns_nameservers:
+ type: list
+ description: A specified set of DNS name servers to be used
+ required: false
+ default: [
+ ]
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ host_routes:
+ type: list
+ description: The gateway IP address
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.subnet.HostRoute
+ ip_version:
+ type: integer
+ description: The gateway IP address
+ required: false
+ default: 4
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - '4'
+ - '6'
+ name:
+ type: string
+ description: The name of the subnet
+ required: false
+ status: SUPPORTED
+ prefixlen:
+ type: integer
+ description: Prefix length for subnet allocation from subnet pool
+ required: false
+ status: SUPPORTED
+ constraints:
+ - greater_or_equal: 0
+ cidr:
+ type: string
+ description: The CIDR
+ required: false
+ status: SUPPORTED
+ gateway_ip:
+ type: string
+ description: The gateway IP address
+ required: false
+ status: SUPPORTED
+ org.openecomp.datatypes.heat.network.AllocationPool:
+ derived_from: tosca.datatypes.Root
+ description: The start and end addresses for the allocation pool
+ properties:
+ start:
+ type: string
+ description: Start address for the allocation pool
+ required: false
+ status: SUPPORTED
+ end:
+ type: string
+ description: End address for the allocation pool
+ required: false
+ status: SUPPORTED
+relationship_types:
+ org.openecomp.relationships.AttachesTo:
+ derived_from: tosca.relationships.Root
+ description: This type represents an attachment relationship
+group_types:
+ org.openecomp.groups.heat.HeatStack:
+ derived_from: tosca.groups.Root
+ description: Grouped all heat resources which are in the same heat stack
+ properties:
+ heat_file:
+ type: string
+ description: Heat file which associate to this group/heat stack
+ required: true
+ status: SUPPORTED
+ description:
+ type: string
+ description: Heat file description
+ required: false
+ status: SUPPORTED
+policy_types:
+ org.openecomp.policies.placement.Colocate:
+ derived_from: tosca.policy.placement
+ description: Keep associated nodes (groups of nodes) based upon affinity value
+ properties:
+ name:
+ type: string
+ description: The name of the policy
+ required: false
+ status: SUPPORTED
+ affinity:
+ type: string
+ description: affinity
+ required: true
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - host
+ - region
+ - compute
+ org.openecomp.policies.placement.Antilocate:
+ derived_from: tosca.policy.placement
+ description: My placement policy for separation based upon container type value
+ properties:
+ name:
+ type: string
+ description: The name of the policy
+ required: false
+ status: SUPPORTED
+ container_type:
+ type: string
+ description: container type
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - host
+ - region
+ - compute
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/ContrailNetworkRuleGlobalTypeServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
new file mode 100644
index 0000000000..98317310fa
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
@@ -0,0 +1,117 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: ContrailNetworkRuleGlobalType
+ template_version: 1.0.0
+description: Contrail Network Rule Global Types
+imports:
+ common_definitions:
+ file: CommonGlobalTypesServiceTemplate.yaml
+data_types:
+ org.openecomp.datatypes.heat.contrail.network.rule.PortPairs:
+ derived_from: tosca.datatypes.Root
+ description: source and destination port pairs
+ properties:
+ start_port:
+ type: string
+ description: Start port
+ required: false
+ status: SUPPORTED
+ end_port:
+ type: string
+ description: End port
+ required: false
+ status: SUPPORTED
+ org.openecomp.datatypes.heat.contrail.network.rule.Rule:
+ derived_from: tosca.datatypes.Root
+ description: policy rule
+ properties:
+ src_ports:
+ type: list
+ description: Source ports
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.contrail.network.rule.PortPairs
+ protocol:
+ type: string
+ description: Protocol
+ required: false
+ status: SUPPORTED
+ dst_addresses:
+ type: list
+ description: Destination addresses
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.contrail.network.rule.VirtualNetwork
+ apply_service:
+ type: string
+ description: Service to apply
+ required: false
+ status: SUPPORTED
+ dst_ports:
+ type: list
+ description: Destination ports
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.contrail.network.rule.PortPairs
+ src_addresses:
+ type: list
+ description: Source addresses
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.contrail.network.rule.VirtualNetwork
+ direction:
+ type: string
+ description: Direction
+ required: false
+ status: SUPPORTED
+ org.openecomp.datatypes.heat.contrail.network.rule.RuleList:
+ derived_from: tosca.datatypes.Root
+ description: list of policy rules
+ properties:
+ policy_rule:
+ type: list
+ description: Contrail network rule
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.contrail.network.rule.Rule
+ org.openecomp.datatypes.heat.contrail.network.rule.VirtualNetwork:
+ derived_from: tosca.datatypes.Root
+ description: source and destination addresses
+ properties:
+ virtual_network:
+ type: string
+ description: Virtual network
+ required: false
+ status: SUPPORTED
+node_types:
+ org.openecomp.resource.nodes.heat.network.contrail.NetworkRules:
+ derived_from: tosca.nodes.Root
+ properties:
+ entries:
+ type: org.openecomp.datatypes.heat.contrail.network.rule.RuleList
+ description: A symbolic name for this contrail network rule
+ required: false
+ status: SUPPORTED
+ name:
+ type: string
+ description: A symbolic name for this contrail network rule
+ required: false
+ status: SUPPORTED
+ attributes:
+ fq_name:
+ type: string
+ description: fq_name
+ status: SUPPORTED
+ requirements:
+ - network:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.network.Network
+ relationship: org.openecomp.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
new file mode 100644
index 0000000000..0927e3dd0e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
@@ -0,0 +1,71 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: ContrailVirtualNetworkGlobalType
+ template_version: 1.0.0
+description: Contrail Virtual Network Global Types
+imports:
+ common_definitions:
+ file: CommonGlobalTypesServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork:
+ derived_from: tosca.nodes.network.Network
+ properties:
+ shared:
+ type: string
+ description: Is virtual network shared
+ required: false
+ status: SUPPORTED
+ forwarding_mode:
+ type: string
+ description: forwarding mode of the virtual network
+ required: false
+ status: SUPPORTED
+ external:
+ type: string
+ description: Is virtual network external
+ required: false
+ status: SUPPORTED
+ flood_unknown_unicast:
+ type: string
+ description: flood L2 packets on network
+ required: false
+ status: SUPPORTED
+ route_targets:
+ type: list
+ description: route targets associated with the virtual network
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ subnets:
+ type: map
+ description: Network related subnets
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.neutron.Subnet
+ attributes:
+ subnets_name:
+ type: list
+ description: Subnets name of this network
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ subnets_show:
+ type: map
+ description: Detailed information about each subnet
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ subnets:
+ type: map
+ description: Network related subnets
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.neutron.Subnet
+ capabilities:
+ attachment:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..08c47bc646
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,93 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.nested:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ cmaui_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: String
+ p1:
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ security_group_name:
+ description: not impotrtant
+ availability_zone_0:
+ type: string
+ description: availabilityzone name
+ requirements:
+ - local_storage_server_cmaui:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_cmaui_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ host_server_cmaui:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_0:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/NativeTypesServiceTemplateServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/NativeTypesServiceTemplateServiceTemplate.yaml
new file mode 100644
index 0000000000..e7dfd49ed9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/NativeTypesServiceTemplateServiceTemplate.yaml
@@ -0,0 +1,194 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: NativeTypesServiceTemplate
+ template_version: 1.0.0
+description: TOSCA Native Node Types
+node_types:
+ tosca.nodes.Compute:
+ derived_from: tosca.nodes.Root
+ attributes:
+ private_address:
+ type: string
+ description: private address
+ status: SUPPORTED
+ public_address:
+ type: string
+ description: public_address
+ status: SUPPORTED
+ networks:
+ type: map
+ description: networks
+ status: SUPPORTED
+ entry_schema:
+ type: tosca.datatypes.network.NetworkInfo
+ ports:
+ type: map
+ description: ports
+ status: SUPPORTED
+ entry_schema:
+ type: tosca.datatypes.network.PortInfo
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ capabilities:
+ scalable:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ tosca.nodes.network.Port:
+ derived_from: tosca.nodes.Root
+ properties:
+ ip_range_end:
+ type: string
+ required: false
+ status: SUPPORTED
+ ip_range_start:
+ type: string
+ required: false
+ status: SUPPORTED
+ ip_address:
+ type: string
+ required: false
+ status: SUPPORTED
+ is_default:
+ type: boolean
+ required: false
+ default: false
+ status: SUPPORTED
+ order:
+ type: integer
+ required: true
+ default: 0
+ status: SUPPORTED
+ constraints:
+ - greater_or_equal: 0
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.BindsTo
+ tosca.nodes.Root:
+ attributes:
+ tosca_name:
+ type: string
+ description: tosca name
+ status: SUPPORTED
+ state:
+ type: string
+ description: state
+ status: SUPPORTED
+ tosca_id:
+ type: string
+ description: tosca id
+ status: SUPPORTED
+ interfaces: {
+ }
+ tosca.nodes.network.Network:
+ derived_from: tosca.nodes.Root
+ properties:
+ physical_network:
+ type: string
+ required: false
+ status: SUPPORTED
+ segmentation_id:
+ type: string
+ required: false
+ status: SUPPORTED
+ network_id:
+ type: string
+ required: false
+ status: SUPPORTED
+ ip_version:
+ type: integer
+ required: false
+ default: 4
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - 4
+ - 6
+ start_ip:
+ type: string
+ required: false
+ status: SUPPORTED
+ network_name:
+ type: string
+ required: false
+ status: SUPPORTED
+ cidr:
+ type: string
+ required: false
+ status: SUPPORTED
+ gateway_ip:
+ type: string
+ required: false
+ status: SUPPORTED
+ network_type:
+ type: string
+ required: false
+ status: SUPPORTED
+ end_ip:
+ type: string
+ required: false
+ status: SUPPORTED
+ capabilities:
+ link:
+ type: tosca.capabilities.network.Linkable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ tosca.nodes.BlockStorage:
+ derived_from: tosca.nodes.Root
+ properties:
+ size:
+ type: scalar-unit.size
+ required: false
+ status: SUPPORTED
+ constraints:
+ - greater_or_equal: 1 MB
+ volume_id:
+ type: string
+ required: false
+ status: SUPPORTED
+ snapshot_id:
+ type: string
+ required: false
+ status: SUPPORTED
+ capabilities:
+ attachment:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/NeutronNetGlobalTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/NeutronNetGlobalTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..e80e2727c7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/NeutronNetGlobalTypesServiceTemplate.yaml
@@ -0,0 +1,97 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: NeutronNetGlobalTypes
+ template_version: 1.0.0
+description: Neutron Network TOSCA Global Types
+imports:
+ common_definitions:
+ file: CommonGlobalTypesServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vl.nodes.heat.network.neutron.Net:
+ derived_from: tosca.nodes.network.Network
+ properties:
+ dhcp_agent_ids:
+ type: list
+ description: The IDs of the DHCP agent to schedule the network
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ tenant_id:
+ type: string
+ description: The ID of the tenant which will own the network
+ required: false
+ status: SUPPORTED
+ port_security_enabled:
+ type: boolean
+ description: Flag to enable/disable port security on the network
+ required: false
+ status: SUPPORTED
+ shared:
+ type: boolean
+ description: Whether this network should be shared across all tenants
+ required: false
+ default: false
+ status: SUPPORTED
+ admin_state_up:
+ type: boolean
+ description: A boolean value specifying the administrative status of the network
+ required: false
+ default: true
+ status: SUPPORTED
+ qos_policy:
+ type: string
+ description: The name or ID of QoS policy to attach to this network
+ required: false
+ status: SUPPORTED
+ subnets:
+ type: map
+ description: Network related subnets
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.neutron.Subnet
+ value_specs:
+ type: map
+ description: Extra parameters to include in the request
+ required: false
+ default: {
+ }
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ attributes:
+ qos_policy_id:
+ type: string
+ description: The QoS policy ID attached to this network
+ status: SUPPORTED
+ show:
+ type: string
+ description: Detailed information about resource
+ status: SUPPORTED
+ subnets_name:
+ type: list
+ description: Subnets name of this network
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ subnets:
+ type: map
+ description: Network related subnets
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.neutron.Subnet
+ mtu:
+ type: scalar-unit.size
+ description: The maximum transmission unit size(in bytes) for the network
+ status: SUPPORTED
+ status:
+ type: string
+ description: The status of the network
+ status: SUPPORTED
+ capabilities:
+ attachment:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/NeutronPortGlobalTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/NeutronPortGlobalTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..a337d6ed18
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/NeutronPortGlobalTypesServiceTemplate.yaml
@@ -0,0 +1,151 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: NeutronPortGlobalTypes
+ template_version: 1.0.0
+description: Neutron Port TOSCA Global Types
+imports:
+ common_definitions:
+ file: CommonGlobalTypesServiceTemplate.yaml
+data_types:
+ org.openecomp.datatypes.heat.neutron.port.FixedIps:
+ derived_from: tosca.datatypes.Root
+ description: subnet/ip_address
+ properties:
+ subnet:
+ type: string
+ description: Subnet in which to allocate the IP address for this port
+ required: false
+ status: SUPPORTED
+ ip_address:
+ type: string
+ description: IP address desired in the subnet for this port
+ required: false
+ status: SUPPORTED
+node_types:
+ org.openecomp.resource.cp.nodes.heat.network.neutron.Port:
+ derived_from: tosca.nodes.network.Port
+ properties:
+ port_security_enabled:
+ type: boolean
+ description: Flag to enable/disable port security on the network
+ required: false
+ status: SUPPORTED
+ device_id:
+ type: string
+ description: Device ID of this port
+ required: false
+ status: SUPPORTED
+ qos_policy:
+ type: string
+ description: The name or ID of QoS policy to attach to this network
+ required: false
+ status: SUPPORTED
+ allowed_address_pairs:
+ type: list
+ description: Additional MAC/IP address pairs allowed to pass through the port
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.AddressPair
+ binding:vnic_type:
+ type: string
+ description: The vnic type to be bound on the neutron port
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - macvtap
+ - direct
+ - normal
+ value_specs:
+ type: map
+ description: Extra parameters to include in the request
+ required: false
+ default: {
+ }
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ device_owner:
+ type: string
+ description: Name of the network owning the port
+ required: false
+ status: SUPPORTED
+ network:
+ type: string
+ description: Network this port belongs to
+ required: false
+ status: SUPPORTED
+ replacement_policy:
+ type: string
+ description: Policy on how to respond to a stack-update for this resource
+ required: false
+ default: AUTO
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - REPLACE_ALWAYS
+ - AUTO
+ security_groups:
+ type: list
+ description: List of security group names or IDs
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ fixed_ips:
+ type: list
+ description: Desired IPs for this port
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.neutron.port.FixedIps
+ mac_address:
+ type: string
+ description: MAC address to give to this port
+ required: false
+ status: SUPPORTED
+ admin_state_up:
+ type: boolean
+ description: A boolean value specifying the administrative status of the network
+ required: false
+ default: true
+ status: SUPPORTED
+ name:
+ type: string
+ description: A symbolic name for this port
+ required: false
+ status: SUPPORTED
+ attributes:
+ tenant_id:
+ type: string
+ description: Tenant owning the port
+ status: SUPPORTED
+ network_id:
+ type: string
+ description: Unique identifier for the network owning the port
+ status: SUPPORTED
+ qos_policy_id:
+ type: string
+ description: The QoS policy ID attached to this network
+ status: SUPPORTED
+ show:
+ type: string
+ description: Detailed information about resource
+ status: SUPPORTED
+ subnets:
+ type: list
+ description: Subnets of this network
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ status:
+ type: string
+ description: The status of the network
+ status: SUPPORTED
+ capabilities:
+ attachment:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/NeutronSecurityRulesGlobalTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..49c9a102c8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
@@ -0,0 +1,116 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: NeutronSecurityRulesGlobalTypes
+ template_version: 1.0.0
+description: Neutron Security Rules TOSCA Global Types
+imports:
+ common_definitions:
+ file: CommonGlobalTypesServiceTemplate.yaml
+data_types:
+ org.openecomp.datatypes.heat.network.neutron.SecurityRules.Rule:
+ derived_from: tosca.datatypes.Root
+ description: Rules Pairs
+ properties:
+ remote_group_id:
+ type: string
+ description: The remote group ID to be associated with this security group rule
+ required: false
+ status: SUPPORTED
+ protocol:
+ type: string
+ description: The protocol that is matched by the security group rule
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - tcp
+ - udp
+ - icmp
+ ethertype:
+ type: string
+ description: Ethertype of the traffic
+ required: false
+ default: IPv4
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - IPv4
+ - IPv6
+ port_range_max:
+ type: integer
+ description: 'The maximum port number in the range that is matched by the
+ security group rule. '
+ required: false
+ status: SUPPORTED
+ constraints:
+ - in_range:
+ - 0
+ - 65535
+ remote_ip_prefix:
+ type: string
+ description: The remote IP prefix (CIDR) to be associated with this security group rule
+ required: false
+ status: SUPPORTED
+ remote_mode:
+ type: string
+ description: Whether to specify a remote group or a remote IP prefix
+ required: false
+ default: remote_ip_prefix
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - remote_ip_prefix
+ - remote_group_id
+ direction:
+ type: string
+ description: The direction in which the security group rule is applied
+ required: false
+ default: ingress
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - egress
+ - ingress
+ port_range_min:
+ type: integer
+ description: The minimum port number in the range that is matched by the security group rule.
+ required: false
+ status: SUPPORTED
+ constraints:
+ - in_range:
+ - 0
+ - 65535
+node_types:
+ org.openecomp.resource.nodes.heat.network.neutron.SecurityRules:
+ derived_from: tosca.nodes.Root
+ properties:
+ description:
+ type: string
+ description: Description of the security group
+ required: false
+ status: SUPPORTED
+ name:
+ type: string
+ description: A symbolic name for this security group, which is not required to be unique.
+ required: false
+ status: SUPPORTED
+ rules:
+ type: list
+ description: List of security group rules
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.neutron.SecurityRules.Rule
+ attributes:
+ show:
+ type: string
+ description: Detailed information about resource
+ status: SUPPORTED
+ requirements:
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ relationship: org.openecomp.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/NovaServerGlobalTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/NovaServerGlobalTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..2253a1e4af
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-core/src/test/resources/extractServiceComposition/toscaGlobalServiceTemplates/NovaServerGlobalTypesServiceTemplate.yaml
@@ -0,0 +1,249 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: NovaServerGlobalTypes
+ template_version: 1.0.0
+description: Nova Server TOSCA Global Types
+imports:
+ common_definitions:
+ file: CommonGlobalTypesServiceTemplate.yaml
+data_types:
+ org.openecomp.datatypes.heat.novaServer.network.PortExtraProperties:
+ derived_from: tosca.datatypes.Root
+ description: Nova server network expand properties for port
+ properties:
+ port_security_enabled:
+ type: boolean
+ description: Flag to enable/disable port security on the port
+ required: false
+ status: SUPPORTED
+ mac_address:
+ type: string
+ description: MAC address to give to this port
+ required: false
+ status: SUPPORTED
+ admin_state_up:
+ type: boolean
+ description: The administrative state of this port
+ required: false
+ default: true
+ status: SUPPORTED
+ qos_policy:
+ type: string
+ description: The name or ID of QoS policy to attach to this port
+ required: false
+ status: SUPPORTED
+ allowed_address_pairs:
+ type: list
+ description: Additional MAC/IP address pairs allowed to pass through the port
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.AddressPair
+ binding:vnic_type:
+ type: string
+ description: The vnic type to be bound on the neutron port
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - macvtap
+ - direct
+ - normal
+ value_specs:
+ type: map
+ description: Extra parameters to include in the request
+ required: false
+ default: {
+ }
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ org.openecomp.datatypes.heat.novaServer.network.AddressInfo:
+ derived_from: tosca.datatypes.network.NetworkInfo
+ description: Network addresses with corresponding port id
+ properties:
+ port_id:
+ type: string
+ description: Port id
+ required: false
+ status: SUPPORTED
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.nova.Server:
+ derived_from: tosca.nodes.Compute
+ properties:
+ admin_pass:
+ type: string
+ description: The administrator password for the server
+ required: false
+ status: SUPPORTED
+ availability_zone:
+ type: string
+ description: Availability zone to create servers in
+ required: false
+ status: SUPPORTED
+ image:
+ type: string
+ description: The ID or name of the image to boot with
+ required: false
+ status: SUPPORTED
+ image_update_policy:
+ type: string
+ description: Policy on how to apply an image-id update
+ required: false
+ default: REBUILD
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - REBUILD_PRESERVE_EPHEMERAL
+ - REPLACE
+ - REBUILD
+ metadata:
+ type: map
+ description: Arbitrary key/value metadata to store for this server
+ required: false
+ status: SUPPORTED
+ constraints:
+ - max_length: 255
+ entry_schema:
+ type: string
+ constraints:
+ - max_length: 255
+ user_data_update_policy:
+ type: string
+ description: Policy on how to apply a user_data update
+ required: false
+ default: REPLACE
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - REPLACE
+ - IGNORE
+ flavor_update_policy:
+ type: string
+ description: Policy on how to apply a flavor update
+ required: false
+ default: RESIZE
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - RESIZE
+ - REPLACE
+ user_data:
+ type: string
+ description: User data script to be executed by cloud-init
+ required: false
+ default: ''
+ status: SUPPORTED
+ flavor:
+ type: string
+ description: The ID or name of the flavor to boot onto
+ required: true
+ status: SUPPORTED
+ key_name:
+ type: string
+ description: Name of keypair to inject into the server
+ required: false
+ status: SUPPORTED
+ reservation_id:
+ type: string
+ description: A UUID for the set of servers being requested
+ required: false
+ status: SUPPORTED
+ security_groups:
+ type: list
+ description: List of security group names or IDs
+ required: false
+ default: [
+ ]
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ config_drive:
+ type: boolean
+ description: enable config drive on the server
+ required: false
+ status: SUPPORTED
+ personality:
+ type: map
+ description: A map of files to create/overwrite on the server upon boot
+ required: false
+ default: {
+ }
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ software_config_transport:
+ type: string
+ description: How the server should receive the metadata required for software configuration
+ required: false
+ default: POLL_SERVER_CFN
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - POLL_SERVER_CFN
+ - POLL_SERVER_HEAT
+ - POLL_TEMP_URL
+ - ZAQAR_MESSAGE
+ user_data_format:
+ type: string
+ description: How the user_data should be formatted for the server
+ required: false
+ default: HEAT_CFNTOOLS
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - SOFTWARE_CONFIG
+ - RAW
+ - HEAT_CFNTOOLS
+ diskConfig:
+ type: string
+ description: Control how the disk is partitioned when the server is created
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - AUTO
+ - MANUAL
+ name:
+ type: string
+ description: Server name
+ required: false
+ status: SUPPORTED
+ scheduler_hints:
+ type: map
+ description: Arbitrary key-value pairs specified by the client to help boot a server
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ attributes:
+ accessIPv4:
+ type: string
+ description: The manually assigned alternative public IPv4 address of the server
+ status: SUPPORTED
+ addresses:
+ type: map
+ description: A dict of all network addresses with corresponding port_id
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.novaServer.network.AddressInfo
+ accessIPv6:
+ type: string
+ description: The manually assigned alternative public IPv6 address of the server
+ status: SUPPORTED
+ instance_name:
+ type: string
+ description: AWS compatible instance name
+ status: SUPPORTED
+ name:
+ type: string
+ description: Name of the server
+ status: SUPPORTED
+ show:
+ type: string
+ description: Detailed information about resource
+ status: SUPPORTED
+ console_urls:
+ type: string
+ description: URLs of servers consoles
+ status: SUPPORTED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/pom.xml b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/pom.xml
new file mode 100644
index 0000000000..8f82967e74
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/pom.xml
@@ -0,0 +1,102 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+
+
+
+ <parent>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../..</relativePath>
+ </parent>
+
+ <name>openecomp-sdc-enrichment-impl</name>
+ <artifactId>openecomp-sdc-enrichment-impl</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.7.10</version>
+
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <version>1.1.2</version>
+
+ </dependency>
+
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <scope>test</scope>
+ <version>6.8.5</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>snakeyaml</artifactId>
+ <groupId>org.yaml</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>RELEASE</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-utilities-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-enrichment-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-model-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-common-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <scope>test</scope>
+ <version>1.10.19</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <version>19.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-heat-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-tosca-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-translator-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+
+ </dependencies>
+
+
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/EnrichmentInfo.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/EnrichmentInfo.java
new file mode 100644
index 0000000000..17c4091a28
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/EnrichmentInfo.java
@@ -0,0 +1,63 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.enrichment;
+
+import org.openecomp.core.enrichment.types.EntityInfo;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class EnrichmentInfo {
+ Map<String, List<Object>> additionalInfo = new HashMap<>();
+ Map<String, EntityInfo> entityInfo = new HashMap<>(); //componentName,EntityInfo
+ String key;
+ Version version;
+
+ public Map<String, List<Object>> getAdditionalInfo() {
+ return additionalInfo;
+ }
+
+ public Map<String, EntityInfo> getEntityInfo() {
+ return entityInfo;
+ }
+
+ public void addEntityInfo(String type, EntityInfo entityInfo) {
+ this.entityInfo.put(type, entityInfo);
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ public void setKey(String key) {
+ this.key = key;
+ }
+
+ public Version getVersion() {
+ return version;
+ }
+
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/factory/EnricherHandlerFactory.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/factory/EnricherHandlerFactory.java
new file mode 100644
index 0000000000..47821f6670
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/factory/EnricherHandlerFactory.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.enrichment.factory;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+import org.openecomp.sdc.enrichment.inter.EnricherHandler;
+
+public abstract class EnricherHandlerFactory extends AbstractComponentFactory<EnricherHandler> {
+
+ public static EnricherHandlerFactory getInstance() {
+ return AbstractFactory.getInstance(EnricherHandlerFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/EnricherHandlerFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/EnricherHandlerFactoryImpl.java
new file mode 100644
index 0000000000..00f5c91661
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/EnricherHandlerFactoryImpl.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.enrichment.impl;
+
+
+import org.openecomp.sdc.enrichment.factory.EnricherHandlerFactory;
+import org.openecomp.sdc.enrichment.inter.EnricherHandler;
+
+public class EnricherHandlerFactoryImpl extends EnricherHandlerFactory {
+
+ @Override
+ public EnricherHandler createInterface() {
+ return new EnricherHandlerImpl();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/EnricherHandlerImpl.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/EnricherHandlerImpl.java
new file mode 100644
index 0000000000..e2e5b47d2a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/EnricherHandlerImpl.java
@@ -0,0 +1,89 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.enrichment.impl;
+
+import org.openecomp.core.enrichment.types.EntityInfo;
+import org.openecomp.sdc.datatypes.error.ErrorMessage;
+import org.openecomp.sdc.datatypes.model.AsdcModel;
+import org.openecomp.sdc.enrichment.EnrichmentInfo;
+import org.openecomp.sdc.enrichment.impl.external.artifact.ExternalArtifactEnricher;
+import org.openecomp.sdc.enrichment.impl.tosca.ToscaEnricher;
+import org.openecomp.sdc.enrichment.inter.Enricher;
+import org.openecomp.sdc.enrichment.inter.EnricherHandler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * The type Enricher handler.
+ */
+public class EnricherHandlerImpl implements EnricherHandler {
+
+ private static Logger logger = LoggerFactory.getLogger(EnricherHandlerImpl.class);
+ private EnrichmentInfo input;
+ private AsdcModel model;
+
+ @Override
+ public List<Enricher> getEnrichers() {
+ List<Enricher> enricherList = new ArrayList<>();
+ enricherList.add(new ToscaEnricher());
+ enricherList.add(new ExternalArtifactEnricher());
+ return enricherList;
+ }
+
+ @Override
+ public Map<String, List<ErrorMessage>> enrich() {
+ Map<String, List<ErrorMessage>> errors = new HashMap<>();
+ Map<String, List<ErrorMessage>> enricherResponse;
+ for (Enricher enricher : getEnrichers()) {
+ enricher.setInput(this.input);
+ enricher.setModel(this.model);
+ enricherResponse = enricher.enrich();
+ errors.putAll(enricherResponse);
+ }
+ return errors;
+ }
+
+ /**
+ * Adds additional input.
+ *
+ * @param key key
+ * @param input input
+ */
+ public void addAdditionalInput(String key, Object input) {
+ if (!this.input.getAdditionalInfo().containsKey(key)) {
+ this.input.getAdditionalInfo().put(key, new ArrayList<>());
+ }
+ this.input.getAdditionalInfo().get(key).add(input);
+ }
+
+ public void addEntityInfo(String entityId, EntityInfo entityInfo) {
+ this.input.getEntityInfo().put(entityId, entityInfo);
+ }
+
+ public void setModel(AsdcModel model) {
+ this.model = model;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/external/artifact/ExternalArtifactEnricher.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/external/artifact/ExternalArtifactEnricher.java
new file mode 100644
index 0000000000..a276cfba7d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/external/artifact/ExternalArtifactEnricher.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.enrichment.impl.external.artifact;
+
+import org.openecomp.core.enrichment.types.ComponentArtifactType;
+import org.openecomp.core.enrichment.types.MibInfo;
+import org.openecomp.core.model.dao.EnrichedServiceModelDao;
+import org.openecomp.core.model.dao.EnrichedServiceModelDaoFactory;
+import org.openecomp.core.model.types.ServiceArtifact;
+import org.openecomp.core.utilities.file.FileContentHandler;
+import org.openecomp.core.utilities.file.FileUtils;
+import org.openecomp.core.validation.errors.Messages;
+import org.openecomp.sdc.datatypes.error.ErrorLevel;
+import org.openecomp.sdc.datatypes.error.ErrorMessage;
+import org.openecomp.sdc.enrichment.impl.tosca.ComponentInfo;
+import org.openecomp.sdc.enrichment.inter.Enricher;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+public class ExternalArtifactEnricher extends Enricher {
+
+ private static EnrichedServiceModelDao enrichedServiceModelDao =
+ EnrichedServiceModelDaoFactory.getInstance().createInterface();
+
+
+ @Override
+ public Map<String, List<ErrorMessage>> enrich() {
+
+ Map<String, List<ErrorMessage>> errors = new HashMap<>();
+ input.getEntityInfo().entrySet().stream().forEach(
+ entry -> enrichComponentMib(entry.getKey(), (ComponentInfo) entry.getValue(), errors));
+
+
+ return errors;
+ }
+
+
+ private void enrichComponentMib(String componentName, ComponentInfo componentInfo,
+ Map<String, List<ErrorMessage>> errors) {
+
+ String vspId = input.getKey();
+ Version version = input.getVersion();
+ ServiceArtifact mibServiceArtifact = new ServiceArtifact();
+ mibServiceArtifact.setVspId(vspId);
+ mibServiceArtifact.setVersion(version);
+ enrichMibFiles(mibServiceArtifact, componentInfo, errors);
+ }
+
+ private void enrichMibFiles(ServiceArtifact mibServiceArtifact, ComponentInfo componentInfo,
+ Map<String, List<ErrorMessage>> errors) {
+ if (componentInfo.getMibInfo() == null) {
+ return;
+ }
+ enrichMibByType(componentInfo.getMibInfo().getSnmpTrap(), ComponentArtifactType.SNMP_TRAP,
+ mibServiceArtifact, errors);
+ enrichMibByType(componentInfo.getMibInfo().getSnmpPoll(), ComponentArtifactType.SNMP_POLL,
+ mibServiceArtifact, errors);
+ }
+
+ private void enrichMibByType(MibInfo mibInfo, ComponentArtifactType type,
+ ServiceArtifact mibServiceArtifact,
+ Map<String, List<ErrorMessage>> errors) {
+ if (mibInfo == null) {
+ return;
+ }
+ FileContentHandler mibs;
+ try {
+ mibs = FileUtils.getFileContentMapFromZip(FileUtils.toByteArray(mibInfo.getContent()));
+ } catch (IOException ioException) {
+ ErrorMessage.ErrorMessageUtil
+ .addMessage(mibServiceArtifact.getName() + "." + type.name(), errors)
+ .add(new ErrorMessage(ErrorLevel.ERROR, Messages.INVALID_ZIP_FILE.getErrorMessage()));
+ return;
+ }
+ Set<String> fileList = mibs.getFileList();
+ for (String fileName : fileList) {
+ mibServiceArtifact.setContentData(FileUtils.toByteArray(mibs.getFileContent(fileName)));
+ mibServiceArtifact.setName(mibInfo.getName() + File.separator + fileName);
+ enrichedServiceModelDao.storeExternalArtifact(mibServiceArtifact);
+ }
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/tosca/CeilometerEnricher.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/tosca/CeilometerEnricher.java
new file mode 100644
index 0000000000..eb79787b59
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/tosca/CeilometerEnricher.java
@@ -0,0 +1,112 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.enrichment.impl.tosca;
+
+import org.apache.commons.collections4.MapUtils;
+import org.openecomp.core.enrichment.types.CeilometerInfo;
+import org.openecomp.sdc.datatypes.error.ErrorMessage;
+import org.openecomp.sdc.enrichment.EnrichmentInfo;
+import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
+import org.openecomp.sdc.tosca.datatypes.ToscaElementTypes;
+import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
+import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.CapabilityType;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.services.ToscaAnalyzerService;
+import org.openecomp.sdc.tosca.services.ToscaUtil;
+import org.openecomp.sdc.tosca.services.impl.ToscaAnalyzerServiceImpl;
+import org.openecomp.sdc.translator.services.heattotosca.globaltypes.CommonGlobalTypes;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class CeilometerEnricher {
+ /**
+ * Enrich map.
+ *
+ * @param toscaModel the tosca model
+ * @param modelNodeType the model node type
+ * @param input the input
+ * @return the map
+ */
+ public static Map<String, List<ErrorMessage>> enrich(ToscaServiceModel toscaModel,
+ Map<String, List<NodeType>> modelNodeType,
+ EnrichmentInfo input) {
+ Map<String, List<ErrorMessage>> errors = new HashMap<>();
+ input.getEntityInfo().entrySet().stream().forEach(
+ entry -> enrichNodeType(toscaModel, (ComponentInfo) entry.getValue(),
+ modelNodeType.get(entry.getKey())));
+
+ return errors;
+ }
+
+ private static void enrichNodeType(ToscaServiceModel toscaModel, ComponentInfo componentInfo,
+ List<NodeType> nodeTypes) {
+
+ for (CeilometerInfo ceilometerInfo : componentInfo.getCeilometerInfo()
+ .getCeilometerInfoList()) {
+ String capabilityId = ceilometerInfo.getName();
+
+ Map<String, Object> properties = getCeilometerProperties(ceilometerInfo);
+
+ //CapabilityType capabilityType = CommonGlobalTypes.createServiceTemplate()
+ // .getCapability_types().
+ // get(ToscaCapabilityType.METRIC_CEILOMETER.getDisplayName());
+ //CapabilityType metricCapabilityType = CommonGlobalTypes.createServiceTemplate().
+ // getCapability_types().get(ToscaCapabilityType.METRIC.getDisplayName());
+ ToscaAnalyzerService toscaAnalyzerService = new ToscaAnalyzerServiceImpl();
+ CapabilityType capabilityType = (CapabilityType) toscaAnalyzerService
+ .getFlatEntity(ToscaElementTypes.CAPABILITY_TYPE,
+ ToscaCapabilityType.METRIC_CEILOMETER.getDisplayName(),
+ CommonGlobalTypes.createServiceTemplate(), toscaModel);
+
+
+ nodeTypes.stream().forEach(nodeType ->
+ addCapability(nodeType, capabilityId, ToscaUtil
+ .convertTypeToDefinition(ToscaCapabilityType.METRIC_CEILOMETER.getDisplayName(),
+ capabilityType, properties, ceilometerInfo.getDescription())));
+ }
+ }
+
+ private static Map<String, Object> getCeilometerProperties(CeilometerInfo ceilometerInfo) {
+ Map<String, Object> properties = new HashMap<>();
+ properties.put("name", ceilometerInfo.getName());
+ properties.put("type", ceilometerInfo.getType());
+ properties.put("unit", ceilometerInfo.getUnit());
+ if (ceilometerInfo.getCategory() != null) {
+ properties.put("category", ceilometerInfo.getCategory());
+ }
+ return properties;
+ }
+
+ private static void addCapability(NodeType nodeType, String capabilityId,
+ CapabilityDefinition capabilityDefinition) {
+ if (MapUtils.isEmpty(nodeType.getCapabilities())) {
+ nodeType.setCapabilities(new HashMap<>());
+ }
+ //clean unnecessary info
+ capabilityDefinition.setAttributes(null);
+ capabilityDefinition.setOccurrences(null);
+
+ nodeType.getCapabilities().put(capabilityId, capabilityDefinition);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/tosca/ComponentInfo.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/tosca/ComponentInfo.java
new file mode 100644
index 0000000000..0a1f3d36ff
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/tosca/ComponentInfo.java
@@ -0,0 +1,47 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.enrichment.impl.tosca;
+
+import org.openecomp.core.enrichment.types.ComponentCeilometerInfo;
+import org.openecomp.core.enrichment.types.ComponentMibInfo;
+import org.openecomp.core.enrichment.types.EntityInfo;
+
+public class ComponentInfo implements EntityInfo {
+
+ private ComponentCeilometerInfo ceilometerInfo;
+ private ComponentMibInfo mibInfo;
+
+ public ComponentCeilometerInfo getCeilometerInfo() {
+ return ceilometerInfo;
+ }
+
+ public void setCeilometerInfo(ComponentCeilometerInfo ceilometerInfo) {
+ this.ceilometerInfo = ceilometerInfo;
+ }
+
+ public ComponentMibInfo getMibInfo() {
+ return mibInfo;
+ }
+
+ public void setMibInfo(ComponentMibInfo mibInfo) {
+ this.mibInfo = mibInfo;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/tosca/SnmpEnricher.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/tosca/SnmpEnricher.java
new file mode 100644
index 0000000000..42cbcdd50b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/tosca/SnmpEnricher.java
@@ -0,0 +1,38 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.enrichment.impl.tosca;
+
+import org.openecomp.sdc.datatypes.error.ErrorMessage;
+
+import org.openecomp.sdc.enrichment.EnrichmentInfo;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class SnmpEnricher {
+ public static Map<String, List<ErrorMessage>> enrich(Map<String, List<NodeType>> modelNodeType,
+ EnrichmentInfo input) {
+ return new HashMap<>();
+
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/tosca/ToscaEnricher.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/tosca/ToscaEnricher.java
new file mode 100644
index 0000000000..2c0f03480f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/tosca/ToscaEnricher.java
@@ -0,0 +1,73 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.enrichment.impl.tosca;
+
+import org.openecomp.sdc.datatypes.error.ErrorMessage;
+import org.openecomp.sdc.enrichment.inter.Enricher;
+import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.services.ToscaUtil;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class ToscaEnricher extends Enricher {
+
+ Map<String, List<NodeType>> componentTypNodeTypeMap;
+
+ @Override
+ public Map<String, List<ErrorMessage>> enrich() {
+ Map<String, List<ErrorMessage>> errors = new HashMap<>();
+ Map<String, List<ErrorMessage>> enrichResponse;
+ enrichResponse = enrichCilometer();
+ errors.putAll(enrichResponse);
+ enrichResponse = enrichSnmp();
+ errors.putAll(enrichResponse);
+
+
+ return errors;
+ }
+
+ private Map<String, List<ErrorMessage>> enrichCilometer() {
+ Map<String, List<ErrorMessage>> enrichResponse;
+
+ ToscaServiceModel toscaModel = (ToscaServiceModel) model;
+
+ componentTypNodeTypeMap =
+ ToscaUtil.normalizeComponentNameNodeType(toscaModel, input.getEntityInfo().keySet());
+
+ enrichResponse = CeilometerEnricher.enrich(toscaModel, componentTypNodeTypeMap, this.input);
+
+ return enrichResponse;
+ }
+
+
+ private Map<String, List<ErrorMessage>> enrichSnmp() {
+ Map<String, List<ErrorMessage>> enrichResponse;
+
+ enrichResponse = SnmpEnricher.enrich(componentTypNodeTypeMap, this.input);
+
+ return enrichResponse;
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/inter/Enricher.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/inter/Enricher.java
new file mode 100644
index 0000000000..1d6867d1f3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/inter/Enricher.java
@@ -0,0 +1,45 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.enrichment.inter;
+
+import org.openecomp.sdc.datatypes.error.ErrorMessage;
+import org.openecomp.sdc.datatypes.model.AsdcModel;
+import org.openecomp.sdc.enrichment.EnrichmentInfo;
+
+import java.util.List;
+import java.util.Map;
+
+public abstract class Enricher {
+
+
+ protected EnrichmentInfo input;
+ protected AsdcModel model;
+
+ public void setInput(EnrichmentInfo input) {
+ this.input = input;
+ }
+
+ public void setModel(AsdcModel model) {
+ this.model = model;
+ }
+
+ public abstract Map<String, List<ErrorMessage>> enrich();
+}
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/inter/EnricherHandler.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/inter/EnricherHandler.java
new file mode 100644
index 0000000000..717bbc8313
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/inter/EnricherHandler.java
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.enrichment.inter;
+
+import org.openecomp.sdc.datatypes.error.ErrorMessage;
+import org.openecomp.sdc.datatypes.model.AsdcModel;
+
+import java.util.List;
+import java.util.Map;
+
+public interface EnricherHandler {
+
+
+ List<Enricher> getEnrichers();
+
+ Map<String, List<ErrorMessage>> enrich();
+
+ void addAdditionalInput(String key, Object input);
+
+ void setModel(AsdcModel model);
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/resources/factoryConfiguration.json b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/resources/factoryConfiguration.json
new file mode 100644
index 0000000000..56510be13c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/resources/factoryConfiguration.json
@@ -0,0 +1,3 @@
+{
+ "org.openecomp.sdc.enrichment.factory.EnricherHandlerFactory": "org.openecomp.sdc.enrichment.impl.EnricherHandlerFactoryImpl"
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/pom.xml b/openecomp-be/lib/openecomp-sdc-enrichment-lib/pom.xml
new file mode 100644
index 0000000000..314dac2447
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/pom.xml
@@ -0,0 +1,41 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+
+
+ <parent>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <groupId>org.openecomp.sdc</groupId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>openecomp-sdc-enrichment-lib</artifactId>
+ <name>openecomp-sdc-enrichment-lib</name>
+ <packaging>pom</packaging>
+
+
+ <modules>
+ <module>openecomp-sdc-enrichment-api</module>
+ <module>openecomp-sdc-enrichment-core</module>
+ <module>openecomp-sdc-enrichment-impl</module>
+ </modules>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-enrichment-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-enrichment-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <!--dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-validation-impl</artifactId>
+ <version>${project.version}</version>
+ </dependency-->
+ </dependencies>
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/pom.xml b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/pom.xml
new file mode 100644
index 0000000000..81016a413b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/pom.xml
@@ -0,0 +1,49 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../..</relativePath>
+ </parent>
+
+ <name>openecomp-sdc-model-api</name>
+ <artifactId>openecomp-sdc-model-api</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-facade-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-validation-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-versioning-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.swagger</groupId>
+ <artifactId>swagger-annotations</artifactId>
+ <version>1.5.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-heat-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-tosca-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ </dependencies>
+
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceArtifactDao.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceArtifactDao.java
new file mode 100644
index 0000000000..e25845d319
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceArtifactDao.java
@@ -0,0 +1,28 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.model.dao;
+
+import org.openecomp.core.model.types.ServiceArtifact;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+public interface EnrichedServiceArtifactDao extends ServiceArtifactDaoInter {
+ ServiceArtifact getArtifactInfo(String vspId, Version version, String name);
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceArtifactDaoFactory.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceArtifactDaoFactory.java
new file mode 100644
index 0000000000..3852e983e5
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceArtifactDaoFactory.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.model.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class EnrichedServiceArtifactDaoFactory
+ extends AbstractComponentFactory<EnrichedServiceArtifactDao> {
+
+ public static EnrichedServiceArtifactDaoFactory getInstance() {
+ return AbstractFactory.getInstance(EnrichedServiceArtifactDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceModelDao.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceModelDao.java
new file mode 100644
index 0000000000..d547316ebf
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceModelDao.java
@@ -0,0 +1,42 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.model.dao;
+
+import org.openecomp.core.model.types.ServiceArtifact;
+import org.openecomp.sdc.versioning.dao.VersionableDao;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.util.List;
+
+public interface EnrichedServiceModelDao<M, E> extends VersionableDao {
+
+ M getServiceModel(String vspId, Version version);
+
+ void storeServiceModel(String vspId, Version version, M serviceModel);
+
+ void storeExternalArtifact(ServiceArtifact serviceArtifact);
+
+ List<ServiceArtifact> getExternalArtifacts(String vspId, Version version);
+
+ E getServiceModelInfo(String vspId, Version version, String name);
+
+ List<String> getServiceModelContentNames();
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceModelDaoFactory.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceModelDaoFactory.java
new file mode 100644
index 0000000000..9d18d6c9cf
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceModelDaoFactory.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.model.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class EnrichedServiceModelDaoFactory
+ extends AbstractComponentFactory<EnrichedServiceModelDao> {
+
+ public static EnrichedServiceModelDaoFactory getInstance() {
+ return AbstractFactory.getInstance(EnrichedServiceModelDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceTemplateDao.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceTemplateDao.java
new file mode 100644
index 0000000000..5ea2de7fd9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceTemplateDao.java
@@ -0,0 +1,26 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.model.dao;
+
+
+public interface EnrichedServiceTemplateDao extends ServiceTemplateDaoInter {
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceTemplateDaoFactory.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceTemplateDaoFactory.java
new file mode 100644
index 0000000000..cab3ca6247
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceTemplateDaoFactory.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.model.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class EnrichedServiceTemplateDaoFactory
+ extends AbstractComponentFactory<EnrichedServiceTemplateDao> {
+
+ public static EnrichedServiceTemplateDaoFactory getInstance() {
+ return AbstractFactory.getInstance(EnrichedServiceTemplateDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceArtifactDao.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceArtifactDao.java
new file mode 100644
index 0000000000..48f59d06ae
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceArtifactDao.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.model.dao;
+
+import org.openecomp.core.model.types.ServiceArtifact;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.util.Collection;
+
+public interface ServiceArtifactDao extends ServiceArtifactDaoInter {
+
+ Collection<ServiceArtifact> list(String vspId, Version version);
+
+ void create(ServiceArtifact entity);
+
+ void update(ServiceArtifact entity);
+
+ ServiceArtifact get(String vspId, Version version);
+
+ void delete(String vspId, Version version);
+
+ Object[] getKeys(String vspId, Version version);
+
+ ServiceArtifact getArtifactInfo(String vspId, Version version, String name);
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceArtifactDaoFactory.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceArtifactDaoFactory.java
new file mode 100644
index 0000000000..07c2191a7c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceArtifactDaoFactory.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.model.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class ServiceArtifactDaoFactory
+ extends AbstractComponentFactory<ServiceArtifactDao> {
+
+ public static ServiceArtifactDaoFactory getInstance() {
+ return AbstractFactory.getInstance(ServiceArtifactDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceArtifactDaoInter.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceArtifactDaoInter.java
new file mode 100644
index 0000000000..20d0c56c1b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceArtifactDaoInter.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.model.dao;
+
+import org.openecomp.core.model.types.ServiceArtifact;
+import org.openecomp.sdc.versioning.dao.VersionableDao;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.util.Collection;
+
+public interface ServiceArtifactDaoInter extends VersionableDao {
+
+ Collection<ServiceArtifact> list(String vspId, Version version);
+
+ void create(ServiceArtifact entity);
+
+ void update(ServiceArtifact entity);
+
+ ServiceArtifact get(String vspId, Version version);
+
+ void delete(String vspId, Version version);
+
+ Object[] getKeys(String vspId, Version version);
+
+ ServiceArtifact getArtifactInfo(String vspId, Version version, String name);
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceModelDao.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceModelDao.java
new file mode 100644
index 0000000000..30bb79c100
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceModelDao.java
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.model.dao;
+
+import org.openecomp.core.model.types.ServiceArtifact;
+import org.openecomp.sdc.versioning.dao.VersionableDao;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.util.List;
+
+public interface ServiceModelDao<M, E> extends VersionableDao {
+
+ M getServiceModel(String vspId, Version version);
+
+ void storeServiceModel(String vspId, Version version, M serviceModel);
+
+ E getServiceModelInfo(String vspId, Version version, String name);
+
+ void storeExternalArtifact(ServiceArtifact serviceArtifact);
+
+ List<String> getServiceModelContentNames();
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceModelDaoFactory.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceModelDaoFactory.java
new file mode 100644
index 0000000000..19f6cb5c8c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceModelDaoFactory.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.model.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class ServiceModelDaoFactory extends AbstractComponentFactory<ServiceModelDao> {
+
+ public static ServiceModelDaoFactory getInstance() {
+ return AbstractFactory.getInstance(ServiceModelDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceTemplateDao.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceTemplateDao.java
new file mode 100644
index 0000000000..c0c919b8a0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceTemplateDao.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.model.dao;
+
+import org.openecomp.core.model.types.ServiceTemplate;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.util.Collection;
+
+public interface ServiceTemplateDao extends ServiceTemplateDaoInter {
+ void create(ServiceTemplate entity);
+
+ void update(ServiceTemplate entity);
+
+ ServiceTemplate get(String vspId, Version version);
+
+ void delete(String vspId, Version version);
+
+ Object[] getKeys(String vspId, Version version);
+
+ ServiceTemplate getTemplateInfo(String vspId, Version version, String name);
+
+ Collection<ServiceTemplate> list(String vspId, Version version);
+
+ String getBase(String vspId, Version version);
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceTemplateDaoFactory.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceTemplateDaoFactory.java
new file mode 100644
index 0000000000..65aad1bb97
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceTemplateDaoFactory.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.model.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class ServiceTemplateDaoFactory
+ extends AbstractComponentFactory<ServiceTemplateDao> {
+
+ public static ServiceTemplateDaoFactory getInstance() {
+ return AbstractFactory.getInstance(ServiceTemplateDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceTemplateDaoInter.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceTemplateDaoInter.java
new file mode 100644
index 0000000000..c4c4cb19b7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceTemplateDaoInter.java
@@ -0,0 +1,46 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.model.dao;
+
+import org.openecomp.core.model.types.ServiceTemplate;
+import org.openecomp.sdc.versioning.dao.VersionableDao;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.util.Collection;
+
+public interface ServiceTemplateDaoInter extends VersionableDao {
+ void create(ServiceTemplate entity);
+
+ void update(ServiceTemplate entity);
+
+ ServiceTemplate get(String vspId, Version version);
+
+ void delete(String vspId, Version version);
+
+ Object[] getKeys(String vspId, Version version);
+
+ ServiceTemplate getTemplateInfo(String vspId, Version version, String name);
+
+ Collection<ServiceTemplate> list(String vspId, Version version);
+
+ String getBase(String vspId, Version version);
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceArtifactEntity.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceArtifactEntity.java
new file mode 100644
index 0000000000..87e25613fc
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceArtifactEntity.java
@@ -0,0 +1,136 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.model.types;
+
+import com.google.common.io.ByteStreams;
+
+import com.datastax.driver.mapping.annotations.ClusteringColumn;
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+
+@Table(keyspace = "dox", name = "vsp_enriched_service_artifact")
+public class EnrichedServiceArtifactEntity implements ServiceElementEntity {
+ private static final String ENTITY_TYPE;
+
+ static {
+ ENTITY_TYPE = "Vendor Software Product Service artifact";
+ }
+
+ @PartitionKey
+ @Column(name = "vsp_id")
+ public String id;
+
+ @PartitionKey(value = 1)
+ @Frozen
+ public Version version;
+
+ @ClusteringColumn
+ @Column(name = "name")
+ public String name;
+
+ @Column(name = "content_data")
+ public ByteBuffer contentData;
+
+ public EnrichedServiceArtifactEntity() {
+ }
+
+ /**
+ * Instantiates a new Enriched service artifact entity.
+ *
+ * @param entity the entity
+ */
+ public EnrichedServiceArtifactEntity(ServiceArtifact entity) {
+ this.id = entity.getVspId();
+ this.version = entity.getVersion();
+ this.name = entity.getName();
+
+ try {
+ this.contentData = ByteBuffer.wrap(ByteStreams.toByteArray(entity.getContent()));
+ } catch (IOException ioException) {
+ throw new RuntimeException(ioException);
+ }
+
+ }
+
+ @Override
+ public String getEntityType() {
+ return ENTITY_TYPE;
+ }
+
+ @Override
+ public String getFirstClassCitizenId() {
+ return getId();
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @Override
+ public Version getVersion() {
+ return version;
+ }
+
+ @Override
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public ByteBuffer getContentData() {
+ return contentData;
+ }
+
+ public void setContentData(ByteBuffer contentData) {
+ this.contentData = contentData;
+ }
+
+ /**
+ * Gets service artifact.
+ *
+ * @return the service artifact
+ */
+ public ServiceArtifact getServiceArtifact() {
+ ServiceArtifact serviceArtifact = new ServiceArtifact();
+ serviceArtifact.setName(this.getName());
+ serviceArtifact.setVersion(this.getVersion());
+ serviceArtifact.setContentData(this.getContentData().array());
+ serviceArtifact.setVspId(this.getId());
+ return serviceArtifact;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceTemplateEntity.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceTemplateEntity.java
new file mode 100644
index 0000000000..526a901e47
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceTemplateEntity.java
@@ -0,0 +1,154 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.model.types;
+
+import com.google.common.io.ByteStreams;
+
+import com.datastax.driver.mapping.annotations.ClusteringColumn;
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+
+@Table(keyspace = "dox", name = "vsp_enriched_service_template")
+public class EnrichedServiceTemplateEntity implements ServiceElementEntity {
+
+ private static final String ENTITY_TYPE;
+
+ static {
+ ENTITY_TYPE = "Vendor Software Product Service model";
+ }
+
+ @PartitionKey
+ @Column(name = "vsp_id")
+ public String id;
+
+ @PartitionKey(value = 1)
+ @Frozen
+ public Version version;
+
+ @ClusteringColumn
+ @Column(name = "name")
+ public String name;
+
+ @Column(name = "content_data")
+ public ByteBuffer contentData;
+
+
+ @Column(name = "base_name")
+ private String baseName;
+
+ public EnrichedServiceTemplateEntity() {
+ }
+
+ /**
+ * Instantiates a new Enriched service template entity.
+ *
+ * @param entity the entity
+ */
+ public EnrichedServiceTemplateEntity(ServiceTemplate entity) {
+ this.id = entity.getVspId();
+ this.version = entity.getVersion();
+ this.name = entity.getName();
+ this.setBaseName(entity.getBaseName());
+ try {
+ this.contentData = ByteBuffer.wrap(ByteStreams.toByteArray(entity.getContent()));
+ } catch (IOException ioException) {
+ throw new RuntimeException(ioException);
+ }
+
+ }
+
+
+ public String getBaseName() {
+ return baseName;
+ }
+
+ public void setBaseName(String baseName) {
+ this.baseName = baseName;
+ }
+
+
+ @Override
+ public String getEntityType() {
+ return ENTITY_TYPE;
+ }
+
+ @Override
+ public String getFirstClassCitizenId() {
+ return getId();
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @Override
+ public Version getVersion() {
+ return version;
+ }
+
+ @Override
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public ByteBuffer getContentData() {
+ return contentData;
+ }
+
+ public void setContentData(ByteBuffer contentData) {
+ this.contentData = contentData;
+ }
+
+
+ /**
+ * Gets service template.
+ *
+ * @return the service template
+ */
+ public ServiceTemplate getServiceTemplate() {
+ ServiceTemplate serviceTemplate = new ServiceTemplate();
+ serviceTemplate.setName(this.getName());
+ serviceTemplate.setVersion(this.getVersion());
+ serviceTemplate.setContentData(this.getContentData().array());
+ serviceTemplate.setVspId(this.getId());
+ serviceTemplate.setBaseName(this.getBaseName());
+ return serviceTemplate;
+
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifact.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifact.java
new file mode 100644
index 0000000000..fad3e604d6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifact.java
@@ -0,0 +1,29 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.model.types;
+
+public class ServiceArtifact extends ServiceElement {
+
+
+ public ServiceArtifact() {
+ super();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifactEntity.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifactEntity.java
new file mode 100644
index 0000000000..c5dfeced8a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifactEntity.java
@@ -0,0 +1,136 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.model.types;
+
+import com.google.common.io.ByteStreams;
+
+import com.datastax.driver.mapping.annotations.ClusteringColumn;
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+
+@Table(keyspace = "dox", name = "vsp_service_artifact")
+public class ServiceArtifactEntity implements ServiceElementEntity {
+ private static final String ENTITY_TYPE;
+
+ static {
+ ENTITY_TYPE = "Vendor Software Product Service artifact";
+ }
+
+ @PartitionKey
+ @Column(name = "vsp_id")
+ public String id;
+
+ @PartitionKey(value = 1)
+ @Frozen
+ public Version version;
+
+ @ClusteringColumn
+ @Column(name = "name")
+ public String name;
+
+ @Column(name = "content_data")
+ public ByteBuffer contentData;
+
+ public ServiceArtifactEntity() {
+ }
+
+ /**
+ * Instantiates a new Service artifact entity.
+ *
+ * @param entity the entity
+ */
+ public ServiceArtifactEntity(ServiceArtifact entity) {
+ this.id = entity.getVspId();
+ this.version = entity.getVersion();
+ this.name = entity.getName();
+
+ try {
+ this.contentData = ByteBuffer.wrap(ByteStreams.toByteArray(entity.getContent()));
+ } catch (IOException ioException) {
+ throw new RuntimeException(ioException);
+ }
+
+ }
+
+ @Override
+ public String getEntityType() {
+ return ENTITY_TYPE;
+ }
+
+ @Override
+ public String getFirstClassCitizenId() {
+ return getId();
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @Override
+ public Version getVersion() {
+ return version;
+ }
+
+ @Override
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public ByteBuffer getContentData() {
+ return contentData;
+ }
+
+ public void setContentData(ByteBuffer contentData) {
+ this.contentData = contentData;
+ }
+
+ /**
+ * Gets service artifact.
+ *
+ * @return the service artifact
+ */
+ public ServiceArtifact getServiceArtifact() {
+ ServiceArtifact serviceArtifact = new ServiceArtifact();
+ serviceArtifact.setName(this.getName());
+ serviceArtifact.setVersion(this.getVersion());
+ serviceArtifact.setContentData(this.getContentData().array());
+ serviceArtifact.setVspId(this.getId());
+ return serviceArtifact;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceElement.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceElement.java
new file mode 100644
index 0000000000..114cf03a39
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceElement.java
@@ -0,0 +1,77 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.model.types;
+
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
+public class ServiceElement {
+
+ private String vspId;
+ private Version version;
+ private String name;
+ private byte[] contentData;
+
+ public ServiceElement() {
+ }
+
+ public String getVspId() {
+ return vspId;
+ }
+
+ public void setVspId(String vspId) {
+ this.vspId = vspId;
+ }
+
+ public Version getVersion() {
+ return version;
+ }
+
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Gets content.
+ *
+ * @return the content
+ */
+ public InputStream getContent() {
+ if (this.contentData == null) {
+ return null;
+ }
+ return new ByteArrayInputStream(contentData);
+ }
+
+ public void setContentData(byte[] contentData) {
+ this.contentData = contentData;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceElementEntity.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceElementEntity.java
new file mode 100644
index 0000000000..02249039f8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceElementEntity.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.model.types;
+
+import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
+
+import java.nio.ByteBuffer;
+
+public interface ServiceElementEntity extends VersionableEntity {
+ String getName();
+
+ ByteBuffer getContentData();
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplate.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplate.java
new file mode 100644
index 0000000000..aa0285d6a9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplate.java
@@ -0,0 +1,38 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.model.types;
+
+public class ServiceTemplate extends ServiceElement {
+ private String baseName;
+
+ public ServiceTemplate() {
+ }
+
+
+ public String getBaseName() {
+ return baseName;
+ }
+
+
+ public void setBaseName(String baseName) {
+ this.baseName = baseName;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplateEntity.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplateEntity.java
new file mode 100644
index 0000000000..f29334678f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplateEntity.java
@@ -0,0 +1,154 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.model.types;
+
+import com.google.common.io.ByteStreams;
+
+import com.datastax.driver.mapping.annotations.ClusteringColumn;
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+
+@Table(keyspace = "dox", name = "vsp_service_template")
+public class ServiceTemplateEntity implements ServiceElementEntity {
+
+ private static final String ENTITY_TYPE;
+
+ static {
+ ENTITY_TYPE = "Vendor Software Product Service model";
+ }
+
+ @PartitionKey
+ @Column(name = "vsp_id")
+ public String id;
+
+ @PartitionKey(value = 1)
+ @Frozen
+ public Version version;
+
+ @ClusteringColumn
+ @Column(name = "name")
+ public String name;
+
+ @Column(name = "content_data")
+ public ByteBuffer contentData;
+
+
+ @Column(name = "base_name")
+ private String baseName;
+
+ public ServiceTemplateEntity() {
+ }
+
+ /**
+ * Instantiates a new Service template entity.
+ *
+ * @param entity the entity
+ */
+ public ServiceTemplateEntity(ServiceTemplate entity) {
+ this.id = entity.getVspId();
+ this.version = entity.getVersion();
+ this.name = entity.getName();
+ this.setBaseName(entity.getBaseName());
+ try {
+ this.contentData = ByteBuffer.wrap(ByteStreams.toByteArray(entity.getContent()));
+ } catch (IOException ioException) {
+ throw new RuntimeException(ioException);
+ }
+
+ }
+
+
+ public String getBaseName() {
+ return baseName;
+ }
+
+ public void setBaseName(String baseName) {
+ this.baseName = baseName;
+ }
+
+
+ @Override
+ public String getEntityType() {
+ return ENTITY_TYPE;
+ }
+
+ @Override
+ public String getFirstClassCitizenId() {
+ return getId();
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @Override
+ public Version getVersion() {
+ return version;
+ }
+
+ @Override
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public ByteBuffer getContentData() {
+ return contentData;
+ }
+
+ public void setContentData(ByteBuffer contentData) {
+ this.contentData = contentData;
+ }
+
+
+ /**
+ * Gets service template.
+ *
+ * @return the service template
+ */
+ public ServiceTemplate getServiceTemplate() {
+ ServiceTemplate serviceTemplate = new ServiceTemplate();
+ serviceTemplate.setName(this.getName());
+ serviceTemplate.setVersion(this.getVersion());
+ serviceTemplate.setContentData(this.getContentData().array());
+ serviceTemplate.setVspId(this.getId());
+ serviceTemplate.setBaseName(this.getBaseName());
+ return serviceTemplate;
+
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/resources/factoryConfiguration.json b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/resources/factoryConfiguration.json
new file mode 100644
index 0000000000..c228b29c57
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/resources/factoryConfiguration.json
@@ -0,0 +1,8 @@
+{
+ "org.openecomp.core.model.dao.ServiceModelDaoFactory":"org.openecomp.sdc.model.impl.ServiceModelDaoFactoryImpl",
+ "org.openecomp.core.model.dao.ServiceTemplateDaoFactory":"org.openecomp.sdc.model.impl.ServiceTemplateDaoCassandraFactoryImpl",
+ "org.openecomp.core.model.dao.ServiceArtifactDaoFactory":"org.openecomp.sdc.model.impl.ServiceArtifactDaoCassandraFactoryImpl",
+ "org.openecomp.core.model.dao.EnrichedServiceModelDaoFactory":"org.openecomp.sdc.model.impl.EnrichedServiceModelDaoFactoryImpl",
+ "org.openecomp.core.model.dao.EnrichedServiceTemplateDaoFactory":"org.openecomp.sdc.model.impl.EnrichedServiceTemplateDaoCassandraFactoryImpl",
+ "org.openecomp.core.model.dao.EnrichedServiceArtifactDaoFactory":"org.openecomp.sdc.model.impl.EnrichedServiceArtifactDaoCassandraFactoryImpl"
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-core/pom.xml b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-core/pom.xml
new file mode 100644
index 0000000000..ba4d404ae7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-core/pom.xml
@@ -0,0 +1,65 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../..</relativePath>
+ </parent>
+
+ <name>openecomp-sdc-model-core</name>
+ <artifactId>openecomp-sdc-model-core</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.7.10</version>
+
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <version>1.1.2</version>
+
+ </dependency>
+
+
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-utilities-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-model-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-versioning-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-datatypes-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <scope>test</scope>
+ <version>1.10.19</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <version>19.0</version>
+ </dependency>
+
+
+ </dependencies>
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-core/src/main/java/org/openecomp/sdc/model/impl/AbstractServiceModelDao.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-core/src/main/java/org/openecomp/sdc/model/impl/AbstractServiceModelDao.java
new file mode 100644
index 0000000000..eb993f6fb1
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-core/src/main/java/org/openecomp/sdc/model/impl/AbstractServiceModelDao.java
@@ -0,0 +1,191 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.model.impl;
+
+import org.openecomp.core.model.dao.ServiceArtifactDaoInter;
+import org.openecomp.core.model.dao.ServiceTemplateDaoInter;
+import org.openecomp.core.model.types.ServiceArtifact;
+import org.openecomp.core.model.types.ServiceElement;
+import org.openecomp.core.model.types.ServiceTemplate;
+import org.openecomp.core.utilities.file.FileContentHandler;
+import org.openecomp.core.utilities.file.FileUtils;
+import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
+import org.openecomp.sdc.tosca.services.yamlutil.ToscaExtensionYamlUtil;
+import org.openecomp.sdc.versioning.dao.VersionableDao;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.io.InputStream;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+public class AbstractServiceModelDao implements VersionableDao {
+
+ protected ServiceTemplateDaoInter templateDao;
+ protected ServiceArtifactDaoInter artifactDao;
+
+ @Override
+ public void registerVersioning(String versionableEntityType) {
+ templateDao.registerVersioning(versionableEntityType);
+ artifactDao.registerVersioning(versionableEntityType);
+ }
+
+
+ /**
+ * Gets service model.
+ *
+ * @param vspId the vsp id
+ * @param version the version
+ * @return the service model
+ */
+ public ToscaServiceModel getServiceModel(String vspId, Version version) {
+ if (vspId == null || version == null) {
+ //throw new CoreException()
+ throw new RuntimeException("missing service model key");
+ }
+
+
+ FileContentHandler artifactFiles = getArtifacts(vspId, version);
+ Map<String, org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate> serviceTemplates =
+ getTemplates(vspId, version);
+ String entryDefinitionServiceTemplate = getServiceBase(vspId, version);
+ return new ToscaServiceModel(artifactFiles, serviceTemplates, entryDefinitionServiceTemplate);
+ }
+
+
+ public void storeExternalArtifact(ServiceArtifact serviceArtifact) {
+ artifactDao.create(serviceArtifact);
+ //TODO: update last modification time
+ }
+
+
+ /**
+ * Store service model.
+ *
+ * @param vspId the vsp id
+ * @param version the version
+ * @param toscaServiceModel the tosca service model
+ */
+ public void storeServiceModel(String vspId, Version version,
+ ToscaServiceModel toscaServiceModel) {
+ ServiceArtifact entityArt;
+
+ for (String fileName : toscaServiceModel.getArtifactFiles().getFileList()) {
+ entityArt = new ServiceArtifact();
+ entityArt.setContentData(
+ FileUtils.toByteArray(toscaServiceModel.getArtifactFiles().getFileContent(fileName)));
+ entityArt.setVspId(vspId);
+ entityArt.setVersion(version);
+ entityArt.setName(fileName);
+
+ artifactDao.create(entityArt);
+ }
+
+ ServiceTemplate entityTmp;
+ String yaml;
+ for (Map.Entry<String, org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate>
+ entryTemplate : toscaServiceModel
+ .getServiceTemplates().entrySet()) {
+ entityTmp = new ServiceTemplate();
+
+ yaml = new ToscaExtensionYamlUtil().objectToYaml(entryTemplate.getValue());
+ entityTmp.setContentData(yaml.getBytes());
+ entityTmp.setVspId(vspId);
+ entityTmp.setVersion(version);
+ entityTmp.setName(entryTemplate.getKey());
+ entityTmp.setBaseName(toscaServiceModel.getEntryDefinitionServiceTemplate());
+
+ templateDao.create(entityTmp);
+ }
+
+ //TODO: update last modification time
+ }
+
+
+ /**
+ * Gets service model info.
+ *
+ * @param vspId the vsp id
+ * @param version the version
+ * @param name the name
+ * @return the service model info
+ */
+ public ServiceElement getServiceModelInfo(String vspId, Version version, String name) {
+ ServiceElement element = templateDao.getTemplateInfo(vspId, version, name);
+ if (element != null) {
+ return element;
+ }
+
+ element = artifactDao.getArtifactInfo(vspId, version, name);
+ if (element != null) {
+ return element;
+ }
+ return null;
+ }
+
+
+ /**
+ * Gets service model content names.
+ *
+ * @return the service model content names
+ */
+ public List<String> getServiceModelContentNames() {
+
+
+ return null;
+ }
+
+
+ private String getServiceBase(String vspId, Version version) {
+ return templateDao.getBase(vspId, version);
+ }
+
+ private Map<String, org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate> getTemplates(
+ String vspId, Version version) {
+
+ Collection<ServiceTemplate> templates = templateDao.list(vspId, version);
+ if (templates == null) {
+ return null;
+ }
+ return templates.stream().collect(Collectors.toMap(template -> template.getName(),
+ template -> getServiceTemplate(template.getContent())));
+ }
+
+ private org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate getServiceTemplate(
+ InputStream content) {
+ return new ToscaExtensionYamlUtil()
+ .yamlToObject(content, org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate.class);
+ }
+
+ private FileContentHandler getArtifacts(String vspId, Version version) {
+ Collection<ServiceArtifact> templates = artifactDao.list(vspId, version);
+ if (templates == null) {
+ return null;
+ }
+
+ FileContentHandler fileContentHandler = new FileContentHandler();
+ templates.stream().forEach(serviceArtifact -> fileContentHandler
+ .addFile(serviceArtifact.getName(), serviceArtifact.getContent()));
+
+ return fileContentHandler;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/pom.xml b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/pom.xml
new file mode 100644
index 0000000000..ff376f1e7d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/pom.xml
@@ -0,0 +1,61 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../..</relativePath>
+ </parent>
+
+ <name>openecomp-sdc-model-impl</name>
+ <artifactId>openecomp-sdc-model-impl</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.7.10</version>
+
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <version>1.1.2</version>
+
+ </dependency>
+
+
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-utilities-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-model-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-datatypes-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <scope>test</scope>
+ <version>1.10.19</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <version>19.0</version>
+ </dependency>
+
+
+ </dependencies>
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/EnrichedServiceArtifactDaoCassandraFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/EnrichedServiceArtifactDaoCassandraFactoryImpl.java
new file mode 100644
index 0000000000..13e351c257
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/EnrichedServiceArtifactDaoCassandraFactoryImpl.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.model.impl;
+
+
+import org.openecomp.core.model.dao.EnrichedServiceArtifactDao;
+import org.openecomp.core.model.dao.EnrichedServiceArtifactDaoFactory;
+
+public class EnrichedServiceArtifactDaoCassandraFactoryImpl
+ extends EnrichedServiceArtifactDaoFactory {
+ private static final EnrichedServiceArtifactDao INSTANCE =
+ new EnrichedServiceArtifactDaoCassandraImpl();
+
+ @Override
+ public EnrichedServiceArtifactDao createInterface() {
+ return INSTANCE;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/EnrichedServiceArtifactDaoCassandraImpl.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/EnrichedServiceArtifactDaoCassandraImpl.java
new file mode 100644
index 0000000000..d9ebe849e3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/EnrichedServiceArtifactDaoCassandraImpl.java
@@ -0,0 +1,137 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.model.impl;
+
+import com.datastax.driver.core.ResultSet;
+import com.datastax.driver.core.UDTValue;
+import com.datastax.driver.mapping.Mapper;
+import com.datastax.driver.mapping.Result;
+import com.datastax.driver.mapping.UDTMapper;
+import com.datastax.driver.mapping.annotations.Accessor;
+import com.datastax.driver.mapping.annotations.Query;
+import org.openecomp.core.model.dao.EnrichedServiceArtifactDao;
+import org.openecomp.core.model.types.EnrichedServiceArtifactEntity;
+import org.openecomp.core.model.types.ServiceArtifact;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import org.openecomp.sdc.versioning.VersioningManagerFactory;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.types.VersionableEntityMetadata;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class EnrichedServiceArtifactDaoCassandraImpl implements EnrichedServiceArtifactDao {
+
+ private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static final Mapper<EnrichedServiceArtifactEntity> mapper =
+ noSqlDb.getMappingManager().mapper(EnrichedServiceArtifactEntity.class);
+ private static final VspServiceArtifactAccessor accessor =
+ noSqlDb.getMappingManager().createAccessor(VspServiceArtifactAccessor.class);
+ private static final UDTMapper<Version> versionMapper =
+ noSqlDb.getMappingManager().udtMapper(Version.class);
+
+ @Override
+ public void registerVersioning(String versionableEntityType) {
+ VersioningManagerFactory.getInstance().createInterface()
+ .register(versionableEntityType, new VersionableEntityMetadata(
+ mapper.getTableMetadata().getName(),
+ mapper.getTableMetadata().getPartitionKey().get(0).getName(),
+ mapper.getTableMetadata().getPartitionKey().get(1).getName()));
+ }
+
+ @Override
+ public Collection<ServiceArtifact> list(String vspId, Version version) {
+ List<EnrichedServiceArtifactEntity> entityList;
+ if (vspId != null && version != null) {
+ entityList = accessor.list(vspId, versionMapper.toUDT(version)).all();
+ } else {
+ entityList = accessor.listAll().all();
+ }
+
+ return entityList.stream().map(entity -> entity.getServiceArtifact())
+ .collect(Collectors.toList());
+ }
+
+ @Override
+ public void create(ServiceArtifact entity) {
+ EnrichedServiceArtifactEntity vspEnrichedServiceArtifactEntity =
+ new EnrichedServiceArtifactEntity(entity);
+ mapper.save(vspEnrichedServiceArtifactEntity);
+ }
+
+ @Override
+ public void update(ServiceArtifact entity) {
+ EnrichedServiceArtifactEntity vspEnrichedServiceArtifactEntity =
+ new EnrichedServiceArtifactEntity(entity);
+ mapper.save(vspEnrichedServiceArtifactEntity);
+ }
+
+ @Override
+ public ServiceArtifact get(String vspId, Version version) {
+ return mapper.get(getKeys(vspId, version)).getServiceArtifact();
+ }
+
+ @Override
+ public void delete(String vspId, Version version) {
+ accessor.delete(vspId, versionMapper.toUDT(version));
+ }
+
+ @Override
+ public Object[] getKeys(String vspId, Version version) {
+ return new Object[]{vspId, versionMapper.toUDT(version)};
+ }
+
+ @Override
+ public ServiceArtifact getArtifactInfo(String vspId, Version version, String name) {
+ EnrichedServiceArtifactEntity enrichedServiceArtifactEntity =
+ accessor.getArtifactInfo(vspId, versionMapper.toUDT(version), name).one();
+ if (enrichedServiceArtifactEntity == null) {
+ return null;
+ }
+
+ return enrichedServiceArtifactEntity.getServiceArtifact();
+ }
+
+
+ @Accessor
+ interface VspServiceArtifactAccessor {
+
+ @Query("SELECT vsp_id, version, name ,content_data FROM vsp_enriched_service_artifact")
+ Result<EnrichedServiceArtifactEntity> listAll();
+
+ @Query(
+ "SELECT vsp_id, version, name ,content_data FROM vsp_enriched_service_artifact "
+ + "where vsp_id=? and version=? ")
+ Result<EnrichedServiceArtifactEntity> list(String vspId, UDTValue version);
+
+
+ @Query(
+ "SELECT vsp_id,version,name,content_data FROM vsp_enriched_service_artifact "
+ + "where vsp_id=? and version=? and name=?")
+ Result<EnrichedServiceArtifactEntity> getArtifactInfo(String vspId, UDTValue version,
+ String name);
+
+ @Query("DELETE from vsp_enriched_service_artifact where vsp_id=? and version=?")
+ ResultSet delete(String vspId, UDTValue version);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/EnrichedServiceModelDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/EnrichedServiceModelDaoFactoryImpl.java
new file mode 100644
index 0000000000..326e5e78fc
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/EnrichedServiceModelDaoFactoryImpl.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.model.impl;
+
+
+import org.openecomp.core.model.dao.EnrichedServiceModelDao;
+import org.openecomp.core.model.dao.EnrichedServiceModelDaoFactory;
+
+public class EnrichedServiceModelDaoFactoryImpl extends EnrichedServiceModelDaoFactory {
+ private static final EnrichedServiceModelDao INSTANCE = new EnrichedServiceModelDaoImpl();
+
+ @Override
+ public EnrichedServiceModelDao createInterface() {
+ return INSTANCE;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/EnrichedServiceModelDaoImpl.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/EnrichedServiceModelDaoImpl.java
new file mode 100644
index 0000000000..9e784c7fef
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/EnrichedServiceModelDaoImpl.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.model.impl;
+
+import org.openecomp.core.model.dao.EnrichedServiceArtifactDaoFactory;
+import org.openecomp.core.model.dao.EnrichedServiceModelDao;
+import org.openecomp.core.model.dao.EnrichedServiceTemplateDaoFactory;
+import org.openecomp.core.model.types.ServiceArtifact;
+import org.openecomp.core.model.types.ServiceElement;
+import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.util.List;
+
+public class EnrichedServiceModelDaoImpl extends AbstractServiceModelDao
+ implements EnrichedServiceModelDao<ToscaServiceModel, ServiceElement> {
+ public EnrichedServiceModelDaoImpl() {
+ templateDao = EnrichedServiceTemplateDaoFactory.getInstance().createInterface();
+ artifactDao = EnrichedServiceArtifactDaoFactory.getInstance().createInterface();
+ }
+
+ @Override
+ public List<ServiceArtifact> getExternalArtifacts(String vspId, Version version) {
+ return (List<ServiceArtifact>) artifactDao.list(vspId, version);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/EnrichedServiceTemplateDaoCassandraFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/EnrichedServiceTemplateDaoCassandraFactoryImpl.java
new file mode 100644
index 0000000000..8103b2cea6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/EnrichedServiceTemplateDaoCassandraFactoryImpl.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.model.impl;
+
+
+import org.openecomp.core.model.dao.EnrichedServiceTemplateDao;
+import org.openecomp.core.model.dao.EnrichedServiceTemplateDaoFactory;
+
+public class EnrichedServiceTemplateDaoCassandraFactoryImpl
+ extends EnrichedServiceTemplateDaoFactory {
+ private static final EnrichedServiceTemplateDao INSTANCE =
+ new EnrichedServiceTemplateDaoCassandraImpl();
+
+ @Override
+ public EnrichedServiceTemplateDao createInterface() {
+ return INSTANCE;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/EnrichedServiceTemplateDaoCassandraImpl.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/EnrichedServiceTemplateDaoCassandraImpl.java
new file mode 100644
index 0000000000..f0d4b56204
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/EnrichedServiceTemplateDaoCassandraImpl.java
@@ -0,0 +1,147 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.model.impl;
+
+import com.datastax.driver.core.UDTValue;
+import com.datastax.driver.mapping.Mapper;
+import com.datastax.driver.mapping.Result;
+import com.datastax.driver.mapping.UDTMapper;
+import com.datastax.driver.mapping.annotations.Accessor;
+import com.datastax.driver.mapping.annotations.Query;
+import org.openecomp.core.model.dao.EnrichedServiceTemplateDao;
+import org.openecomp.core.model.types.EnrichedServiceTemplateEntity;
+import org.openecomp.core.model.types.ServiceTemplate;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import org.openecomp.sdc.versioning.VersioningManagerFactory;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.types.VersionableEntityMetadata;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class EnrichedServiceTemplateDaoCassandraImpl implements EnrichedServiceTemplateDao {
+
+ private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static final Mapper<EnrichedServiceTemplateEntity> mapper =
+ noSqlDb.getMappingManager().mapper(EnrichedServiceTemplateEntity.class);
+ private static final VspServiceTemplateAccessor accessor =
+ noSqlDb.getMappingManager().createAccessor(VspServiceTemplateAccessor.class);
+ private static final UDTMapper<Version> versionMapper =
+ noSqlDb.getMappingManager().udtMapper(Version.class);
+
+ @Override
+ public void registerVersioning(String versionableEntityType) {
+ VersioningManagerFactory.getInstance().createInterface()
+ .register(versionableEntityType, new VersionableEntityMetadata(
+ mapper.getTableMetadata().getName(),
+ mapper.getTableMetadata().getPartitionKey().get(0).getName(),
+ mapper.getTableMetadata().getPartitionKey().get(1).getName()));
+ }
+
+ @Override
+ public Collection<ServiceTemplate> list(String vspId, Version version) {
+
+ List<EnrichedServiceTemplateEntity> entityList = accessor.list(vspId, version).all();
+ return entityList.stream().map(entity -> entity.getServiceTemplate())
+ .collect(Collectors.toList());
+ }
+
+ @Override
+ public void create(ServiceTemplate entity) {
+ EnrichedServiceTemplateEntity vspEnrichedServiceTemplateEntity =
+ new EnrichedServiceTemplateEntity(entity);
+ mapper.save(vspEnrichedServiceTemplateEntity);
+ }
+
+ @Override
+ public void update(ServiceTemplate entity) {
+ EnrichedServiceTemplateEntity vspEnrichedServiceTemplateEntity =
+ new EnrichedServiceTemplateEntity(entity);
+ mapper.save(vspEnrichedServiceTemplateEntity);
+ }
+
+ @Override
+ public ServiceTemplate get(String vspId, Version version) {
+ return (mapper.get(getKeys(vspId, version))).getServiceTemplate();
+ }
+
+ @Override
+ public void delete(String vspId, Version version) {
+ mapper.delete(vspId, version);
+ }
+
+
+ @Override
+ public Object[] getKeys(String vspId, Version version) {
+ return new Object[]{vspId, versionMapper.toUDT(version)};
+ }
+
+ @Override
+ public ServiceTemplate getTemplateInfo(String vspId, Version version, String name) {
+ EnrichedServiceTemplateEntity enrichedServiceTemplateEntity =
+ accessor.getTemplateInfo(vspId, versionMapper.toUDT(version), name).one();
+ if (enrichedServiceTemplateEntity == null) {
+ return null;
+ }
+ return enrichedServiceTemplateEntity.getServiceTemplate();
+ }
+
+ @Override
+ public String getBase(String vspId, Version version) {
+ Result<EnrichedServiceTemplateEntity> element =
+ accessor.getBase(vspId, versionMapper.toUDT(version));
+ if (element != null) {
+ EnrichedServiceTemplateEntity vspEnrichedServiceTemplateEntity = element.one();
+ if (vspEnrichedServiceTemplateEntity != null) {
+ return element.one().getBaseName();
+ }
+ }
+ return null;
+ }
+
+
+ @Accessor
+ interface VspServiceTemplateAccessor {
+
+ @Query(
+ "SELECT vsp_id, version, name, base_name ,content_data FROM vsp_enriched_service_template")
+ Result<EnrichedServiceTemplateEntity> listAll();
+
+ @Query(
+ "SELECT vsp_id, version, name, base_name ,content_data FROM vsp_enriched_service_template "
+ + "where vsp_id=? and version=?")
+ Result<EnrichedServiceTemplateEntity> list(String vspId, Version version);
+
+
+ @Query(
+ "SELECT vsp_id, version, name, base_name ,content_data FROM vsp_enriched_service_template "
+ + "where vsp_id=? and version=? and name=?")
+ Result<EnrichedServiceTemplateEntity> getTemplateInfo(String vspId, UDTValue version,
+ String name);
+
+ @Query(
+ "SELECT vsp_id, version, name, base_name FROM vsp_enriched_service_template "
+ + "where vsp_id=? and version=?")
+ Result<EnrichedServiceTemplateEntity> getBase(String vspId, UDTValue version);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/ServiceArtifactDaoCassandraFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/ServiceArtifactDaoCassandraFactoryImpl.java
new file mode 100644
index 0000000000..f24fb1b475
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/ServiceArtifactDaoCassandraFactoryImpl.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.model.impl;
+
+
+import org.openecomp.core.model.dao.ServiceArtifactDao;
+import org.openecomp.core.model.dao.ServiceArtifactDaoFactory;
+
+public class ServiceArtifactDaoCassandraFactoryImpl extends ServiceArtifactDaoFactory {
+ private static final ServiceArtifactDao INSTANCE = new ServiceArtifactDaoCassandraImpl();
+
+ @Override
+ public ServiceArtifactDao createInterface() {
+ return INSTANCE;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/ServiceArtifactDaoCassandraImpl.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/ServiceArtifactDaoCassandraImpl.java
new file mode 100644
index 0000000000..c7851c0fd9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/ServiceArtifactDaoCassandraImpl.java
@@ -0,0 +1,139 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.model.impl;
+
+import com.datastax.driver.core.ResultSet;
+import com.datastax.driver.core.UDTValue;
+import com.datastax.driver.mapping.Mapper;
+import com.datastax.driver.mapping.Result;
+import com.datastax.driver.mapping.UDTMapper;
+import com.datastax.driver.mapping.annotations.Accessor;
+import com.datastax.driver.mapping.annotations.Query;
+import org.openecomp.core.model.dao.ServiceArtifactDao;
+import org.openecomp.core.model.types.ServiceArtifact;
+import org.openecomp.core.model.types.ServiceArtifactEntity;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import org.openecomp.sdc.versioning.VersioningManagerFactory;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.types.VersionableEntityMetadata;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class ServiceArtifactDaoCassandraImpl implements ServiceArtifactDao {
+
+ private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static final Mapper<ServiceArtifactEntity> mapper =
+ noSqlDb.getMappingManager().mapper(ServiceArtifactEntity.class);
+ private static final VspServiceArtifactAccessor accessor =
+ noSqlDb.getMappingManager().createAccessor(VspServiceArtifactAccessor.class);
+ private static final UDTMapper<Version> versionMapper =
+ noSqlDb.getMappingManager().udtMapper(Version.class);
+
+ @Override
+ public void registerVersioning(String versionableEntityType) {
+ VersioningManagerFactory.getInstance().createInterface()
+ .register(versionableEntityType, new VersionableEntityMetadata(
+ mapper.getTableMetadata().getName(),
+ mapper.getTableMetadata().getPartitionKey().get(0).getName(),
+ mapper.getTableMetadata().getPartitionKey().get(1).getName()));
+ }
+
+ @Override
+ public Collection<ServiceArtifact> list(String vspId, Version version) {
+ List<ServiceArtifactEntity> entityList;
+ if (vspId != null && version != null) {
+ entityList = accessor.list(vspId, versionMapper.toUDT(version)).all();
+ } else {
+ entityList = accessor.listAll().all();
+ }
+
+ return entityList.stream().map(entity -> entity.getServiceArtifact())
+ .collect(Collectors.toList());
+ }
+
+ @Override
+ public void create(ServiceArtifact entity) {
+ ServiceArtifactEntity vspServiceArtifactEntity = new ServiceArtifactEntity(entity);
+ mapper.save(vspServiceArtifactEntity);
+ }
+
+ @Override
+ public void update(ServiceArtifact entity) {
+ ServiceArtifactEntity vspServiceArtifactEntity = new ServiceArtifactEntity(entity);
+ mapper.save(vspServiceArtifactEntity);
+ }
+
+ @Override
+ public ServiceArtifact get(String vspId, Version version) {
+ return mapper.get(getKeys(vspId, version)).getServiceArtifact();
+ }
+
+ @Override
+ public void delete(String vspId, Version version) {
+ accessor.delete(vspId, versionMapper.toUDT(version));
+ }
+
+ // @Override
+ // public void deleteArtifacts(String vspId, Version version){
+ // accessor.delete(vspId, versionMapper.toUDT(version));
+ // }
+
+ @Override
+ public Object[] getKeys(String vspId, Version version) {
+ return new Object[]{vspId, versionMapper.toUDT(version)};
+ }
+
+ @Override
+ public ServiceArtifact getArtifactInfo(String vspId, Version version, String name) {
+ ServiceArtifactEntity serviceArtifactEntity =
+ accessor.getArtifactInfo(vspId, versionMapper.toUDT(version), name).one();
+ if (serviceArtifactEntity == null) {
+ return null;
+ }
+
+ return serviceArtifactEntity.getServiceArtifact();
+ }
+
+
+ @Accessor
+ interface VspServiceArtifactAccessor {
+
+ @Query("SELECT vsp_id, version, name ,content_data FROM vsp_service_artifact")
+ Result<ServiceArtifactEntity> listAll();
+
+ @Query(
+ "SELECT vsp_id, version, name ,content_data "
+ + "FROM vsp_service_artifact where vsp_id=? and version=? ")
+ Result<ServiceArtifactEntity> list(String vspId, UDTValue version);
+
+ @Query(
+ "SELECT vsp_id,version,name,content_data FROM "
+ + "vsp_service_artifact where vsp_id=? and version=? and name=?")
+ Result<ServiceArtifactEntity> getArtifactInfo(String vspId, UDTValue version, String name);
+
+ @Query("DELETE from vsp_service_artifact where vsp_id=? and version=?")
+ ResultSet delete(String vspId, UDTValue version);
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/ServiceModelDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/ServiceModelDaoFactoryImpl.java
new file mode 100644
index 0000000000..1347636bf1
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/ServiceModelDaoFactoryImpl.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.model.impl;
+
+
+import org.openecomp.core.model.dao.ServiceModelDao;
+import org.openecomp.core.model.dao.ServiceModelDaoFactory;
+
+public class ServiceModelDaoFactoryImpl extends ServiceModelDaoFactory {
+ private static final ServiceModelDao INSTANCE = new ServiceModelDaoImpl();
+
+ @Override
+ public ServiceModelDao createInterface() {
+ return INSTANCE;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/ServiceModelDaoImpl.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/ServiceModelDaoImpl.java
new file mode 100644
index 0000000000..c397aec61d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/ServiceModelDaoImpl.java
@@ -0,0 +1,38 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.model.impl;
+
+import org.openecomp.core.model.dao.ServiceArtifactDaoFactory;
+import org.openecomp.core.model.dao.ServiceModelDao;
+import org.openecomp.core.model.dao.ServiceTemplateDaoFactory;
+import org.openecomp.core.model.types.ServiceElement;
+import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
+
+public class ServiceModelDaoImpl extends AbstractServiceModelDao
+ implements ServiceModelDao<ToscaServiceModel, ServiceElement> {
+
+
+ public ServiceModelDaoImpl() {
+ templateDao = ServiceTemplateDaoFactory.getInstance().createInterface();
+ artifactDao = ServiceArtifactDaoFactory.getInstance().createInterface();
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/ServiceTemplateDaoCassandraFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/ServiceTemplateDaoCassandraFactoryImpl.java
new file mode 100644
index 0000000000..23c43b76d3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/ServiceTemplateDaoCassandraFactoryImpl.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.model.impl;
+
+
+import org.openecomp.core.model.dao.ServiceTemplateDao;
+import org.openecomp.core.model.dao.ServiceTemplateDaoFactory;
+
+public class ServiceTemplateDaoCassandraFactoryImpl extends ServiceTemplateDaoFactory {
+ private static final ServiceTemplateDao INSTANCE = new ServiceTemplateDaoCassandraImpl();
+
+ @Override
+ public ServiceTemplateDao createInterface() {
+ return INSTANCE;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/ServiceTemplateDaoCassandraImpl.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/ServiceTemplateDaoCassandraImpl.java
new file mode 100644
index 0000000000..ffc9a24677
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-impl/src/main/java/org/openecomp/sdc/model/impl/ServiceTemplateDaoCassandraImpl.java
@@ -0,0 +1,145 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.model.impl;
+
+import com.datastax.driver.core.UDTValue;
+import com.datastax.driver.mapping.Mapper;
+import com.datastax.driver.mapping.Result;
+import com.datastax.driver.mapping.UDTMapper;
+import com.datastax.driver.mapping.annotations.Accessor;
+import com.datastax.driver.mapping.annotations.Query;
+import org.openecomp.core.model.dao.ServiceTemplateDao;
+import org.openecomp.core.model.types.ServiceTemplate;
+import org.openecomp.core.model.types.ServiceTemplateEntity;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import org.openecomp.sdc.versioning.VersioningManagerFactory;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.types.VersionableEntityMetadata;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class ServiceTemplateDaoCassandraImpl implements ServiceTemplateDao {
+
+
+ private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static final Mapper<ServiceTemplateEntity> mapper =
+ noSqlDb.getMappingManager().mapper(ServiceTemplateEntity.class);
+ private static final VspServiceTemplateAccessor accessor =
+ noSqlDb.getMappingManager().createAccessor(VspServiceTemplateAccessor.class);
+ private static final UDTMapper<Version> versionMapper =
+ noSqlDb.getMappingManager().udtMapper(Version.class);
+
+ @Override
+ public void registerVersioning(String versionableEntityType) {
+ VersioningManagerFactory.getInstance().createInterface()
+ .register(versionableEntityType, new VersionableEntityMetadata(
+ mapper.getTableMetadata().getName(),
+ mapper.getTableMetadata().getPartitionKey().get(0).getName(),
+ mapper.getTableMetadata().getPartitionKey().get(1).getName()));
+ }
+
+ @Override
+ public Collection<ServiceTemplate> list(String vspId, Version version) {
+
+ List<ServiceTemplateEntity> entityList = accessor.list(vspId, version).all();
+ return entityList.stream().map(entity -> entity.getServiceTemplate())
+ .collect(Collectors.toList());
+ }
+
+ @Override
+ public void create(ServiceTemplate entity) {
+ ServiceTemplateEntity vspServiceTemplateEntity = new ServiceTemplateEntity(entity);
+ mapper.save(vspServiceTemplateEntity);
+ }
+
+ @Override
+ public void update(ServiceTemplate entity) {
+ ServiceTemplateEntity vspServiceTemplateEntity = new ServiceTemplateEntity(entity);
+ mapper.save(vspServiceTemplateEntity);
+ }
+
+ @Override
+ public ServiceTemplate get(String vspId, Version version) {
+ return (mapper.get(getKeys(vspId, version))).getServiceTemplate();
+ }
+
+ @Override
+ public void delete(String vspId, Version version) {
+ mapper.delete(vspId, version);
+ }
+
+
+ @Override
+ public Object[] getKeys(String vspId, Version version) {
+ return new Object[]{vspId, versionMapper.toUDT(version)};
+ }
+
+ @Override
+ public ServiceTemplate getTemplateInfo(String vspId, Version version, String name) {
+ ServiceTemplateEntity serviceTemplateEntity =
+ accessor.getTemplateInfo(vspId, versionMapper.toUDT(version), name).one();
+ if (serviceTemplateEntity == null) {
+ return null;
+ }
+ return serviceTemplateEntity.getServiceTemplate();
+ }
+
+ @Override
+ public String getBase(String vspId, Version version) {
+ Result<ServiceTemplateEntity> element = accessor.getBase(vspId, versionMapper.toUDT(version));
+ if (element != null) {
+ ServiceTemplateEntity vspServiceTemplateEntity = element.one();
+ if (vspServiceTemplateEntity != null) {
+ return element.one().getBaseName();
+ }
+ }
+ return null;
+ }
+
+
+ @Accessor
+ interface VspServiceTemplateAccessor {
+
+ @Query("SELECT vsp_id, version, name, base_name ,content_data FROM vsp_service_template")
+ Result<ServiceTemplateEntity> listAll();
+
+ @Query(
+ "SELECT vsp_id, version, name, base_name ,content_data"
+ + " FROM vsp_service_template where vsp_id=? and version=?")
+ Result<ServiceTemplateEntity> list(String vspId, Version version);
+
+
+ @Query(
+ "SELECT vsp_id, version, name, base_name ,content_data "
+ + "FROM vsp_service_template where vsp_id=? and version=? and name=?")
+ Result<ServiceTemplateEntity> getTemplateInfo(String vspId, UDTValue version, String name);
+
+ @Query(
+ "SELECT vsp_id, version, name, base_name "
+ + "FROM vsp_service_template where vsp_id=? and version=?")
+ Result<ServiceTemplateEntity> getBase(String vspId, UDTValue version);
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/pom.xml b/openecomp-be/lib/openecomp-sdc-model-lib/pom.xml
new file mode 100644
index 0000000000..e8b51d8a49
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/pom.xml
@@ -0,0 +1,43 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <packaging>pom</packaging>
+ <parent>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <groupId>org.openecomp.sdc</groupId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <name>openecomp-sdc-model-lib</name>
+ <artifactId>openecomp-sdc-model-lib</artifactId>
+
+ <modules>
+ <module>openecomp-sdc-model-api</module>
+ <module>openecomp-sdc-model-core</module>
+ <module>openecomp-sdc-model-impl</module>
+ </modules>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-model-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-model-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-model-impl</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <!--dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-common-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency-->
+ </dependencies>
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/pom.xml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/pom.xml
new file mode 100644
index 0000000000..e6eca41134
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/pom.xml
@@ -0,0 +1,43 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../..</relativePath>
+ </parent>
+
+ <name>openecomp-sdc-translator-api</name>
+ <artifactId>openecomp-sdc-translator-api</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-facade-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-validation-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.swagger</groupId>
+ <artifactId>swagger-annotations</artifactId>
+ <version>1.5.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-heat-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-tosca-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/src/main/java/org/openecomp/core/translator/api/HeatToToscaTranslator.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/src/main/java/org/openecomp/core/translator/api/HeatToToscaTranslator.java
new file mode 100644
index 0000000000..62c098d146
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/src/main/java/org/openecomp/core/translator/api/HeatToToscaTranslator.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.translator.api;
+
+import org.openecomp.core.translator.datatypes.TranslatorOutput;
+import org.openecomp.sdc.datatypes.error.ErrorMessage;
+
+import java.io.InputStream;
+import java.util.List;
+import java.util.Map;
+
+public interface HeatToToscaTranslator {
+
+ void addManifest(String name, byte[] content);
+
+ void addFile(String name, byte[] content);
+
+ void addFile(String name, InputStream content);
+
+ // return Map, key - file name which has error
+ // value - the error code
+ Map<String, List<ErrorMessage>> validate();
+
+ TranslatorOutput translate();
+
+ void addExternalArtifacts(String name, byte[] content);
+
+ void addExternalArtifacts(String name, InputStream content);
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/src/main/java/org/openecomp/core/translator/datatypes/TranslatorOutput.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/src/main/java/org/openecomp/core/translator/datatypes/TranslatorOutput.java
new file mode 100644
index 0000000000..ec36625ced
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/src/main/java/org/openecomp/core/translator/datatypes/TranslatorOutput.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.translator.datatypes;
+
+import org.openecomp.sdc.datatypes.error.ErrorMessage;
+import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
+
+import java.util.List;
+import java.util.Map;
+
+public class TranslatorOutput {
+ private Map<String, List<ErrorMessage>> errorMessages;
+ private ToscaServiceModel toscaServiceModel;
+
+ public Map<String, List<ErrorMessage>> getErrorMessages() {
+ return errorMessages;
+ }
+
+ public void setErrorMessages(Map<String, List<ErrorMessage>> errorMessages) {
+ this.errorMessages = errorMessages;
+ }
+
+ public ToscaServiceModel getToscaServiceModel() {
+ return toscaServiceModel;
+ }
+
+ public void setToscaServiceModel(ToscaServiceModel toscaServiceModel) {
+ this.toscaServiceModel = toscaServiceModel;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/src/main/java/org/openecomp/core/translator/factory/HeatToToscaTranslatorFactory.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/src/main/java/org/openecomp/core/translator/factory/HeatToToscaTranslatorFactory.java
new file mode 100644
index 0000000000..b9234cd87a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/src/main/java/org/openecomp/core/translator/factory/HeatToToscaTranslatorFactory.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.translator.factory;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+import org.openecomp.core.translator.api.HeatToToscaTranslator;
+
+public abstract class HeatToToscaTranslatorFactory
+ extends AbstractComponentFactory<HeatToToscaTranslator> {
+
+ public static HeatToToscaTranslatorFactory getInstance() {
+ return AbstractFactory.getInstance(HeatToToscaTranslatorFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/src/main/resources/factoryConfiguration.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/src/main/resources/factoryConfiguration.json
new file mode 100644
index 0000000000..4e4e2c23f9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/src/main/resources/factoryConfiguration.json
@@ -0,0 +1,3 @@
+{
+ "org.openecomp.core.translator.factory.HeatToToscaTranslatorFactory": "org.openecomp.sdc.translator.impl.heattotosca.HeatToToscaTranslatorFactoryImpl"
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/pom.xml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/pom.xml
new file mode 100644
index 0000000000..2bfa7dfd31
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/pom.xml
@@ -0,0 +1,89 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../..</relativePath>
+ </parent>
+
+ <name>openecomp-sdc-translator-core</name>
+ <artifactId>openecomp-sdc-translator-core</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.google.code.gson</groupId>
+ <artifactId>gson</artifactId>
+ <version>2.3.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.yaml</groupId>
+ <artifactId>snakeyaml</artifactId>
+ <version>1.14</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.7.10</version>
+
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <version>1.1.2</version>
+
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>RELEASE</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-utilities-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-translator-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-validation-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-datatypes-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <scope>test</scope>
+ <version>1.10.19</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <version>19.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-validation-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-heat-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/AttachedResourceId.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/AttachedResourceId.java
new file mode 100644
index 0000000000..4286666392
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/AttachedResourceId.java
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.datatypes.heattotosca;
+
+public class AttachedResourceId {
+ private Object translatedId;
+ private Object entityId;
+ private ResourceReferenceType resourceReferenceType;
+
+ /**
+ * Instantiates a new Attached resource id.
+ *
+ * @param translatedId the translated id
+ * @param entityId the entity id
+ * @param resourceReferenceType the resource reference type
+ */
+ public AttachedResourceId(Object translatedId, Object entityId,
+ ResourceReferenceType resourceReferenceType) {
+ this.translatedId = translatedId;
+ this.resourceReferenceType = resourceReferenceType;
+ this.entityId = entityId;
+ }
+
+ public Object getEntityId() {
+ return entityId;
+ }
+
+ public Object getTranslatedId() {
+ return translatedId;
+ }
+
+ public ResourceReferenceType getResourceReferenceType() {
+ return resourceReferenceType;
+ }
+
+ public boolean isGetResource() {
+ return resourceReferenceType == ResourceReferenceType.GET_RESOURCE;
+ }
+
+ public boolean isGetParam() {
+ return resourceReferenceType == ResourceReferenceType.GET_PARAM;
+ }
+
+ public boolean isGetAttr() {
+ return resourceReferenceType == ResourceReferenceType.GET_ATTR;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/ResourceReferenceType.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/ResourceReferenceType.java
new file mode 100644
index 0000000000..81ccd69a66
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/ResourceReferenceType.java
@@ -0,0 +1,25 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.datatypes.heattotosca;
+
+public enum ResourceReferenceType {
+ GET_RESOURCE, GET_PARAM, GET_ATTR, OTHER
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/to/FileDataCollection.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/to/FileDataCollection.java
new file mode 100644
index 0000000000..a9147b838f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/to/FileDataCollection.java
@@ -0,0 +1,123 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.datatypes.heattotosca.to;
+
+
+import org.openecomp.sdc.heat.datatypes.manifest.FileData;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+public class FileDataCollection {
+
+ Collection<FileData> baseFiles;
+ Collection<FileData> addOnFiles;
+ Collection<FileData> nestedFiles;
+ Collection<FileData> artifactFiles;
+
+ public Collection<FileData> getBaseFile() {
+ return baseFiles;
+ }
+
+ public void setBaseFile(Collection<FileData> baseFiles) {
+ this.baseFiles = baseFiles;
+ }
+
+ public Collection<FileData> getAddOnFiles() {
+ return addOnFiles;
+ }
+
+ public void setAddOnFiles(Collection<FileData> addOnFiles) {
+ this.addOnFiles = addOnFiles;
+ }
+
+ public Collection<FileData> getNestedFiles() {
+ return nestedFiles;
+ }
+
+ public void setNestedFiles(Collection<FileData> nestedFiles) {
+ this.nestedFiles = nestedFiles;
+ }
+
+ public Collection<FileData> getBaseFiles() {
+ return baseFiles;
+ }
+
+ public void setBaseFiles(Collection<FileData> baseFiles) {
+ this.baseFiles = baseFiles;
+ }
+
+ public Collection<FileData> getArtifactFiles() {
+ return artifactFiles;
+ }
+
+ public void setArtifactFiles(Collection<FileData> artifactFiles) {
+ this.artifactFiles = artifactFiles;
+ }
+
+ /**
+ * Add add on files.
+ *
+ * @param addonFile the addon file
+ */
+ public void addAddOnFiles(FileData addonFile) {
+ if (this.addOnFiles == null) {
+ this.addOnFiles = new ArrayList<>();
+ }
+ this.addOnFiles.add(addonFile);
+ }
+
+ /**
+ * Add nested files.
+ *
+ * @param nestedFile the nested file
+ */
+ public void addNestedFiles(FileData nestedFile) {
+ if (this.nestedFiles == null) {
+ this.nestedFiles = new ArrayList<>();
+ }
+ this.nestedFiles.add(nestedFile);
+ }
+
+ /**
+ * Add base files.
+ *
+ * @param baseFile the base file
+ */
+ public void addBaseFiles(FileData baseFile) {
+ if (this.baseFiles == null) {
+ this.baseFiles = new ArrayList<>();
+ }
+ this.baseFiles.add(baseFile);
+ }
+
+ /**
+ * Add artifact files.
+ *
+ * @param artifactFile the artifact file
+ */
+ public void addArtifactFiles(FileData artifactFile) {
+ if (this.artifactFiles == null) {
+ this.artifactFiles = new ArrayList<>();
+ }
+ this.artifactFiles.add(artifactFile);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/to/ResourceFileDataAndIDs.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/to/ResourceFileDataAndIDs.java
new file mode 100644
index 0000000000..b8349444d7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/to/ResourceFileDataAndIDs.java
@@ -0,0 +1,70 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.datatypes.heattotosca.to;
+
+
+import org.openecomp.sdc.heat.datatypes.manifest.FileData;
+
+public class ResourceFileDataAndIDs {
+ private String resourceId;
+ private String translatedResourceId;
+ private FileData fileData;
+
+ public ResourceFileDataAndIDs() {
+ }
+
+ /**
+ * Instantiates a new Resource file data and i ds.
+ *
+ * @param resourceId the resource id
+ * @param translatedResourceId the translated resource id
+ * @param fileData the file data
+ */
+ public ResourceFileDataAndIDs(String resourceId, String translatedResourceId, FileData fileData) {
+ this.resourceId = resourceId;
+ this.translatedResourceId = translatedResourceId;
+ this.fileData = fileData;
+ }
+
+ public String getResourceId() {
+ return resourceId;
+ }
+
+ public void setResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ }
+
+ public String getTranslatedResourceId() {
+ return translatedResourceId;
+ }
+
+ public void setTranslatedResourceId(String translatedResourceId) {
+ this.translatedResourceId = translatedResourceId;
+ }
+
+ public FileData getFileData() {
+ return fileData;
+ }
+
+ public void setFileData(FileData fileData) {
+ this.fileData = fileData;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/to/TranslateTo.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/to/TranslateTo.java
new file mode 100644
index 0000000000..6c56715f79
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/to/TranslateTo.java
@@ -0,0 +1,132 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.datatypes.heattotosca.to;
+
+
+import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.translator.services.heattotosca.TranslationContext;
+
+public class TranslateTo {
+ private String heatFileName;
+ private ServiceTemplate serviceTemplate;
+ private HeatOrchestrationTemplate heatOrchestrationTemplate;
+ private Resource resource;
+ private String resourceId;
+ private String translatedId;
+ private TranslationContext context;
+
+ public TranslateTo() {
+ }
+
+ /**
+ * Instantiates a new Translate to.
+ *
+ * @param heatFileName the heat file name
+ * @param serviceTemplate the service template
+ * @param heatOrchestrationTemplate the heat orchestration template
+ * @param resource the resource
+ * @param resourceId the resource id
+ * @param translatedId the translated id
+ * @param context the context
+ */
+ public TranslateTo(String heatFileName, ServiceTemplate serviceTemplate,
+ HeatOrchestrationTemplate heatOrchestrationTemplate, Resource resource,
+ String resourceId, String translatedId, TranslationContext context) {
+ this.heatFileName = heatFileName;
+ this.serviceTemplate = serviceTemplate;
+ this.heatOrchestrationTemplate = heatOrchestrationTemplate;
+ this.resource = resource;
+ this.resourceId = resourceId;
+ this.translatedId = translatedId;
+ this.context = context;
+ }
+
+ public String getHeatFileName() {
+ return heatFileName;
+ }
+
+ public void setHeatFileName(String heatFileName) {
+ this.heatFileName = heatFileName;
+ }
+
+ public ServiceTemplate getServiceTemplate() {
+ return serviceTemplate;
+ }
+
+ public void setServiceTemplate(ServiceTemplate serviceTemplate) {
+ this.serviceTemplate = serviceTemplate;
+ }
+
+ public HeatOrchestrationTemplate getHeatOrchestrationTemplate() {
+ return heatOrchestrationTemplate;
+ }
+
+ public void setHeatOrchestrationTemplate(HeatOrchestrationTemplate heatOrchestrationTemplate) {
+ this.heatOrchestrationTemplate = heatOrchestrationTemplate;
+ }
+
+ public Resource getResource() {
+ return resource;
+ }
+
+ public void setResource(Resource resource) {
+ this.resource = resource;
+ }
+
+ public String getResourceId() {
+ return resourceId;
+ }
+
+ public void setResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ }
+
+ public String getTranslatedId() {
+ return translatedId;
+ }
+
+ public void setTranslatedId(String translatedId) {
+ this.translatedId = translatedId;
+ }
+
+ public TranslationContext getContext() {
+ return context;
+ }
+
+ public void setContext(TranslationContext context) {
+ this.context = context;
+ }
+
+ @Override
+ public String toString() {
+ return "TranslateTo{"
+ + "heatFileName='" + heatFileName + '\''
+ + ", serviceTemplate=" + serviceTemplate
+ + ", heatOrchestrationTemplate=" + heatOrchestrationTemplate
+ + ", resource=" + resource
+ + ", resourceId='" + resourceId + '\''
+ + ", translatedId='" + translatedId + '\''
+ + ", context=" + context
+ + '}';
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/to/TranslatedHeatResource.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/to/TranslatedHeatResource.java
new file mode 100644
index 0000000000..da46e56018
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/to/TranslatedHeatResource.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.datatypes.heattotosca.to;
+
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+
+public class TranslatedHeatResource {
+ private String translatedId;
+ private Resource heatResource;
+
+ public TranslatedHeatResource(String translatedId, Resource heatResource) {
+ this.translatedId = translatedId;
+ this.heatResource = heatResource;
+ }
+
+ public String getTranslatedId() {
+ return translatedId;
+ }
+
+ public void setTranslatedId(String translatedId) {
+ this.translatedId = translatedId;
+ }
+
+ public Resource getHeatResource() {
+ return heatResource;
+ }
+
+ public void setHeatResource(Resource heatResource) {
+ this.heatResource = heatResource;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/impl/heattotosca/HeatToToscaTranslatorFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/impl/heattotosca/HeatToToscaTranslatorFactoryImpl.java
new file mode 100644
index 0000000000..57f753f103
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/impl/heattotosca/HeatToToscaTranslatorFactoryImpl.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.impl.heattotosca;
+
+import org.openecomp.core.translator.api.HeatToToscaTranslator;
+import org.openecomp.core.translator.factory.HeatToToscaTranslatorFactory;
+
+public class HeatToToscaTranslatorFactoryImpl extends HeatToToscaTranslatorFactory {
+
+ private static HeatToToscaTranslator INSTANCE = new HeatToToscaTranslatorImpl();
+
+ @Override
+ public HeatToToscaTranslator createInterface() {
+ return new HeatToToscaTranslatorImpl();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/impl/heattotosca/HeatToToscaTranslatorImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/impl/heattotosca/HeatToToscaTranslatorImpl.java
new file mode 100644
index 0000000000..0a6986816c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/impl/heattotosca/HeatToToscaTranslatorImpl.java
@@ -0,0 +1,134 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.impl.heattotosca;
+
+import org.apache.commons.collections4.MapUtils;
+import org.openecomp.core.translator.api.HeatToToscaTranslator;
+import org.openecomp.core.translator.datatypes.TranslatorOutput;
+import org.openecomp.core.utilities.file.FileUtils;
+import org.openecomp.core.utilities.json.JsonUtil;
+import org.openecomp.core.validation.api.ValidationManager;
+import org.openecomp.core.validation.errors.Messages;
+import org.openecomp.core.validation.factory.ValidationManagerFactory;
+import org.openecomp.core.validation.types.MessageContainerUtil;
+import org.openecomp.sdc.common.utils.AsdcCommon;
+import org.openecomp.sdc.datatypes.error.ErrorLevel;
+import org.openecomp.sdc.datatypes.error.ErrorMessage;
+import org.openecomp.sdc.heat.datatypes.manifest.FileData;
+import org.openecomp.sdc.heat.datatypes.manifest.ManifestContent;
+import org.openecomp.sdc.heat.datatypes.manifest.ManifestFile;
+import org.openecomp.sdc.translator.services.heattotosca.TranslationContext;
+import org.openecomp.sdc.translator.services.heattotosca.TranslationService;
+
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class HeatToToscaTranslatorImpl implements HeatToToscaTranslator {
+
+ private TranslationContext translationContext = new TranslationContext();
+ private ValidationManager validationManager =
+ ValidationManagerFactory.getInstance().createInterface();
+ private boolean isValid = false;
+
+
+ @Override
+ public void addManifest(String name, byte[] content) {
+ ManifestContent manifestData = JsonUtil.json2Object(new String(content), ManifestContent.class);
+ ManifestFile manifest = new ManifestFile();
+ manifest.setName(name);
+ manifest.setContent(manifestData);
+ translationContext.setManifest(manifest);
+ translationContext.addFile(name, content);
+ validationManager.addFile(AsdcCommon.MANIFEST_NAME, content);
+ addFilesFromManifestToTranslationContextManifestFilesMap(manifestData.getData());
+ isValid = false;
+ }
+
+ @Override
+ public void addFile(String name, byte[] content) {
+ translationContext.addFile(name, content);
+ validationManager.addFile(name, content);
+ isValid = false;
+ }
+
+ @Override
+ public void addFile(String name, InputStream content) {
+ addFile(name, FileUtils.toByteArray(content));
+ }
+
+
+ @Override
+ public Map<String, List<ErrorMessage>> validate() {
+
+ Map<String, List<ErrorMessage>> errors = new HashMap<>();
+ if (translationContext.getManifest() == null) {
+ ErrorMessage.ErrorMessageUtil.addMessage(AsdcCommon.MANIFEST_NAME, errors)
+ .add(new ErrorMessage(ErrorLevel.ERROR, Messages.MANIFEST_NOT_EXIST.getErrorMessage()));
+ return errors;
+ }
+
+ if (MapUtils.isEmpty(errors)) {
+ errors = validationManager.validate();
+ }
+ if (MapUtils.isEmpty(errors)) {
+ isValid = true;
+ }
+ return errors;
+ }
+
+ @Override
+ public TranslatorOutput translate() {
+ TranslationService translationService = new TranslationService();
+ TranslatorOutput translatorOutput = new TranslatorOutput();
+ if (!isValid) {
+ Map<String, List<ErrorMessage>> errors = validate();
+
+ if (MapUtils.isNotEmpty(MessageContainerUtil.getMessageByLevel(ErrorLevel.ERROR, errors))) {
+ translatorOutput.setErrorMessages(errors);
+ return translatorOutput;
+ }
+ }
+
+ translatorOutput = translationService.translateHeatFiles(translationContext);
+ return translatorOutput;
+ }
+
+ @Override
+ public void addExternalArtifacts(String name, byte[] content) {
+ translationContext.addExternalArtifacts(name, content);
+ }
+
+ @Override
+ public void addExternalArtifacts(String name, InputStream content) {
+ addExternalArtifacts(name, FileUtils.toByteArray(content));
+ }
+
+ private void addFilesFromManifestToTranslationContextManifestFilesMap(
+ List<FileData> fileDataListFromManifest) {
+ for (FileData fileFromManfiest : fileDataListFromManifest) {
+ translationContext.addManifestFile(fileFromManfiest.getFile(), fileFromManfiest.getType());
+ }
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/Constants.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/Constants.java
new file mode 100644
index 0000000000..abd6c27a21
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/Constants.java
@@ -0,0 +1,60 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca;
+
+public class Constants {
+ //Service Template - Template Names
+ public static final String COMMON_GLOBAL_TEMPLATE_NAME = "CommonGlobalTypes";
+ public static final String CINDER_VOLUME_TEMPLATE_NAME = "CinderVolumeGlobalTypes";
+ public static final String CONTRAIL_VIRTUAL_NETWORK_TEMPLATE_NAME =
+ "ContrailVirtualNetworkGlobalType";
+ public static final String CONTRAIL_NETWORK_RULE_TEMPLATE_NAME = "ContrailNetworkRuleGlobalType";
+ public static final String CONTRAILV2_VIRTUAL_NETWORK_TEMPLATE_NAME =
+ "ContrailV2VirtualNetworkGlobalType";
+ public static final String CONTRAILV2_NETWORK_RULE_TEMPLATE_NAME =
+ "ContrailV2NetworkRuleGlobalType";
+ public static final String CONTRAILV2_VIRTUAL_MACHINE_INTERFACE_TEMPLATE_NAME =
+ "ContrailV2VirtualMachineInterfaceGlobalType";
+ public static final String NEUTRON_NET_TEMPLATE_NAME = "NeutronNetGlobalTypes";
+ public static final String NEUTRON_PORT_TEMPLATE_NAME = "NeutronPortGlobalTypes";
+ public static final String NEUTRON_SECURITY_RULES_TEMPLATE_NAME =
+ "NeutronSecurityRulesGlobalTypes";
+ public static final String NOVA_SERVER_TEMPLATE_NAME = "NovaServerGlobalTypes";
+ public static final String ABSTRACT_SUBSTITUTE_TEMPLATE_NAME = "AbstractSubstituteGlobalTypes";
+ public static final String GLOBAL_SUBSTITUTION_TYPES_TEMPLATE_NAME = "GlobalSubstitutionTypes";
+ public static final String CONTRAIL_COMPUTE_TEMPLATE_NAME = "ContrailComputeGlobalTypes";
+ public static final String CONTRAIL_PORT_TEMPLATE_NAME = "ContrailPortGlobalTypes";
+ public static final String CONTRAIL_ABSTRACT_SUBSTITUTE_TEMPLATE_NAME =
+ "ContrailAbstractSubstituteGlobalTypes";
+ //properties
+ public static final String MAX_INSTANCES_PROPERTY_NAME = "max_instances";
+ public static final String DESCRIPTION_PROPERTY_NAME = "description";
+ public static final String NAME_PROPERTY_NAME = "name";
+ public static final String RULES_PROPERTY_NAME = "rules";
+ public static final String SECURITY_GROUPS_PROPERTY_NAME = "security_groups";
+ public static final String PORT_PROPERTY_NAME = "port";
+ //General
+ public static final String PROP = "properties";
+ public static final String ATTR = "attributes";
+
+ private Constants() {
+ }
+}
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
new file mode 100644
index 0000000000..f245a6dee6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/HeatToToscaUtil.java
@@ -0,0 +1,503 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca;
+
+import org.apache.commons.collections4.CollectionUtils;
+import org.openecomp.core.utilities.yaml.YamlUtil;
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.heat.datatypes.HeatBoolean;
+import org.openecomp.sdc.heat.datatypes.manifest.FileData;
+import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
+import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.heat.services.HeatConstants;
+import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.services.ToscaUtil;
+import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
+import org.openecomp.sdc.translator.datatypes.heattotosca.ResourceReferenceType;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.FileDataCollection;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+import org.openecomp.sdc.translator.services.heattotosca.errors.ResourceNotFoundInHeatFileErrorBuilder;
+import org.openecomp.sdc.translator.services.heattotosca.mapping.TranslatorHeatToToscaFunctionConverter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+public class HeatToToscaUtil {
+
+ protected static Logger logger = LoggerFactory.getLogger(HeatToToscaUtil.class);
+
+
+ /**
+ * Build list of files to search optional.
+ *
+ * @param heatFileName the heat file name
+ * @param filesDataList the files data list
+ * @param types the types
+ * @return the optional
+ */
+ public static Optional<List<FileData>> buildListOfFilesToSearch(String heatFileName,
+ List<FileData> filesDataList,
+ FileData.Type... types) {
+ List<FileData> list = new ArrayList<>(filesDataList);
+ Optional<FileData> resourceFileData = HeatToToscaUtil.getFileData(heatFileName, filesDataList);
+ if (resourceFileData.isPresent() && Objects.nonNull(resourceFileData.get().getData())) {
+ list.addAll(resourceFileData.get().getData());
+ }
+ return Optional.ofNullable(HeatToToscaUtil.getFilteredListOfFileDataByTypes(list, types));
+ }
+
+ public static List<FileData> getFilteredListOfFileDataByTypes(List<FileData> filesToSearch,
+ FileData.Type... types) {
+ return filesToSearch.stream().filter(FileData.buildFileDataPredicateByType(types))
+ .collect(Collectors.toList());
+ }
+
+ /**
+ * Gets file data.
+ *
+ * @param heatFileName the heat file name
+ * @param fileDataList the file data list
+ * @return the file data
+ */
+ public static Optional<FileData> getFileData(String heatFileName,
+ Collection<FileData> fileDataList) {
+ for (FileData file : fileDataList) {
+ if (file.getFile().equals(heatFileName)) {
+ return Optional.of(file);
+ }
+ }
+ return Optional.empty();
+ }
+
+ static FileDataCollection getFileCollectionsByFilter(List<FileData> fileDataList,
+ Set<FileData.Type> typeFilter,
+ TranslationContext translationContext) {
+ FileDataCollection fileDataCollection = new FileDataCollection();
+ Map<String, FileData> filteredFiles = filterFileDataListByType(fileDataList, typeFilter);
+ Set<String> referenced = new HashSet<>();
+ List<String> filenames = extractFilenamesFromFileDataList(filteredFiles.values());
+
+ for (FileData fileData : filteredFiles.values()) {
+ String fileName = fileData.getFile();
+
+ if (FileData.isHeatFile(fileData.getType())) {
+ if (fileData.getBase() != null && fileData.getBase().equals(true)) {
+ fileDataCollection.addBaseFiles(fileData);
+ }
+ HeatOrchestrationTemplate heatOrchestrationTemplate = new YamlUtil()
+ .yamlToObject(translationContext.getFileContent(fileName),
+ HeatOrchestrationTemplate.class);
+ for (Resource resource : heatOrchestrationTemplate.getResources().values()) {
+ if (filenames.contains(resource.getType())) {
+ handleNestedFile(translationContext, fileDataCollection, filteredFiles, referenced,
+ resource.getType());
+ } else if (resource.getType()
+ .equals(HeatResourcesTypes.RESOURCE_GROUP_RESOURCE_TYPE.getHeatResource())) {
+ Object resourceDef =
+ resource.getProperties().get(HeatConstants.RESOURCE_DEF_PROPERTY_NAME);
+ Object innerTypeDef = ((Map) resourceDef).get("type");
+ if (innerTypeDef instanceof String) {
+ String internalResourceType = (String) innerTypeDef;
+ if (filenames.contains(internalResourceType)) {
+ handleNestedFile(translationContext, fileDataCollection, filteredFiles, referenced,
+ internalResourceType);
+ }
+ }
+ }
+ }
+
+ } else {
+ fileDataCollection.addArtifactFiles(fileData);
+ filteredFiles.remove(fileData.getFile());
+ }
+ }
+
+ referenced.forEach(filteredFiles::remove);
+ if (!CollectionUtils.isEmpty(fileDataCollection.getBaseFile())) {
+ for (FileData fileData : fileDataCollection.getBaseFile()) {
+ filteredFiles.remove(fileData.getFile());
+ }
+ }
+ fileDataCollection.setAddOnFiles(filteredFiles.values());
+ return fileDataCollection;
+ }
+
+ private static void handleNestedFile(TranslationContext translationContext,
+ FileDataCollection fileDataCollection,
+ Map<String, FileData> filteredFiles, Set<String> referenced,
+ String nestedFileName) {
+ referenced.add(nestedFileName);
+ fileDataCollection.addNestedFiles(filteredFiles.get(nestedFileName));
+ translationContext.getNestedHeatsFiles().add(nestedFileName);
+ }
+
+ private static Map<String, FileData> filterFileDataListByType(List<FileData> fileDataList,
+ Set<FileData.Type> typesToGet) {
+ Map<String, FileData> filtered = new HashMap<>();
+ fileDataList.stream().filter(file -> typesToGet.contains(file.getType()))
+ .forEach(file -> filtered.put(file.getFile(), file));
+ return filtered;
+ }
+
+ private static List<String> extractFilenamesFromFileDataList(Collection<FileData> fileDataList) {
+ return fileDataList.stream().map(FileData::getFile).collect(Collectors.toList());
+ }
+
+ /**
+ * Extract attached resource id optional.
+ *
+ * @param translateTo the translate to
+ * @param propertyName the property name
+ * @return the optional
+ */
+ public static Optional<AttachedResourceId> extractAttachedResourceId(TranslateTo translateTo,
+ String propertyName) {
+ Object propertyValue = translateTo.getResource().getProperties().get(propertyName);
+ if (propertyValue == null) {
+ return Optional.empty();
+ }
+ return extractAttachedResourceId(translateTo.getHeatFileName(),
+ translateTo.getHeatOrchestrationTemplate(), translateTo.getContext(), propertyValue);
+ }
+
+ /**
+ * Extract attached resource id optional.
+ *
+ * @param heatFileName the heat file name
+ * @param heatOrchestrationTemplate the heat orchestration template
+ * @param context the context
+ * @param propertyValue the property value
+ * @return the optional
+ */
+ public static Optional<AttachedResourceId> extractAttachedResourceId(String heatFileName,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ TranslationContext context,
+ Object propertyValue) {
+
+ Object entity;
+ Object translatedId;
+
+ if (Objects.isNull(propertyValue)) {
+ return Optional.empty();
+ }
+
+ ResourceReferenceType referenceType = ResourceReferenceType.OTHER;
+ if (propertyValue instanceof Map && !((Map) propertyValue).isEmpty()) {
+ Map<String, Object> propMap = (Map) propertyValue;
+ Map.Entry<String, Object> entry = propMap.entrySet().iterator().next();
+ entity = entry.getValue();
+ String key = entry.getKey();
+ switch (key) {
+ case "get_resource":
+ referenceType = ResourceReferenceType.GET_RESOURCE;
+ break;
+ case "get_param":
+ referenceType = ResourceReferenceType.GET_PARAM;
+ break;
+ case "get_attr":
+ referenceType = ResourceReferenceType.GET_ATTR;
+ break;
+ default:
+ }
+ translatedId = TranslatorHeatToToscaFunctionConverter
+ .getToscaFunction(entry.getKey(), entry.getValue(), heatFileName,
+ heatOrchestrationTemplate, null, context);
+ if (translatedId instanceof String
+ && !TranslatorHeatToToscaFunctionConverter.isResourceSupported((String) translatedId)) {
+ translatedId = null;
+ }
+
+ } else {
+ translatedId = propertyValue;
+ entity = propertyValue;
+ }
+
+ return Optional.of(new AttachedResourceId(translatedId, entity, referenceType));
+ }
+
+ /**
+ * Gets contrail attached heat resource id.
+ *
+ * @param attachedResource the attached resource
+ * @return the contrail attached heat resource id
+ */
+ public static Optional<String> getContrailAttachedHeatResourceId(
+ AttachedResourceId attachedResource) {
+ if (attachedResource == null) {
+ return Optional.empty();
+ }
+
+ if (attachedResource.isGetResource()) {
+ return Optional.of((String) attachedResource.getEntityId());
+ }
+ if (attachedResource.isGetAttr() && (attachedResource.getEntityId() instanceof List)
+ && ((List) attachedResource.getEntityId()).size() > 1
+ && ((List) attachedResource.getEntityId()).get(1).equals("fq_name")) {
+ return Optional.of((String) ((List) attachedResource.getEntityId()).get(0));
+ }
+
+ return Optional.empty();
+ }
+
+ /**
+ * Extract property optional.
+ *
+ * @param propertyValue the property value
+ * @return the optional
+ */
+ public static Optional<AttachedResourceId> extractProperty(Object propertyValue) {
+
+ Object entity;
+ if (Objects.isNull(propertyValue)) {
+ return Optional.empty();
+ }
+
+ ResourceReferenceType referenceType = ResourceReferenceType.OTHER;
+ if (propertyValue instanceof Map && !((Map) propertyValue).isEmpty()) {
+ Map<String, Object> propMap = (Map) propertyValue;
+ Map.Entry<String, Object> entry = propMap.entrySet().iterator().next();
+ entity = entry.getValue();
+ String key = entry.getKey();
+ switch (key) {
+ case "get_resource":
+ referenceType = ResourceReferenceType.GET_RESOURCE;
+ break;
+ case "get_param":
+ referenceType = ResourceReferenceType.GET_PARAM;
+ break;
+ case "get_attr":
+ referenceType = ResourceReferenceType.GET_ATTR;
+ break;
+ default:
+ }
+
+ } else {
+ entity = propertyValue;
+ }
+
+ return Optional.of(new AttachedResourceId(null, entity, referenceType));
+ }
+
+ /**
+ * Map boolean.
+ *
+ * @param nodeTemplate the node template
+ * @param propertyKey the property key
+ */
+ public static void mapBoolean(NodeTemplate nodeTemplate, String propertyKey) {
+ Object value = nodeTemplate.getProperties().get(propertyKey);
+ if (value != null && !(value instanceof Map)) {
+ nodeTemplate.getProperties().put(propertyKey, HeatBoolean.eval(value));
+ }
+ }
+
+ /**
+ * Map boolean list.
+ *
+ * @param nodeTemplate the node template
+ * @param propertyListKey the property list key
+ */
+ public static void mapBooleanList(NodeTemplate nodeTemplate, String propertyListKey) {
+ Object listValue = nodeTemplate.getProperties().get(propertyListKey);
+ if (listValue instanceof List) {
+ List booleanList = ((List) listValue);
+ for (int i = 0; i < booleanList.size(); i++) {
+ Object value = booleanList.get(i);
+ if (value != null && !(value instanceof Map)) {
+ booleanList.set(i, HeatBoolean.eval(value));
+ }
+ }
+ }
+ }
+
+
+ public static boolean isYmlFileType(String filename) {
+ return (filename.indexOf("yaml") > 0 || filename.indexOf("yml") > 0);
+ }
+
+ /**
+ * Is nested resource boolean.
+ *
+ * @param resource the resource
+ * @return the boolean
+ */
+ public static boolean isNestedResource(Resource resource) {
+ String resourceType = resource.getType();
+
+ if (resourceType.equals(HeatResourcesTypes.RESOURCE_GROUP_RESOURCE_TYPE.getHeatResource())) {
+ Object resourceDef = resource.getProperties().get(HeatConstants.RESOURCE_DEF_PROPERTY_NAME);
+ String internalResourceType = (String) ((Map) resourceDef).get("type");
+ if (isYamlFile(internalResourceType)) {
+ return true;
+ }
+ } else if (isYamlFile(resourceType)) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Gets nested file.
+ *
+ * @param resource the resource
+ * @return the nested file
+ */
+ public static Optional<String> getNestedFile(Resource resource) {
+ if (!isNestedResource(resource)) {
+ return Optional.empty();
+ }
+ String resourceType = resource.getType();
+ if (resourceType.equals(HeatResourcesTypes.RESOURCE_GROUP_RESOURCE_TYPE.getHeatResource())) {
+ Object resourceDef = resource.getProperties().get(HeatConstants.RESOURCE_DEF_PROPERTY_NAME);
+ String internalResourceType = (String) ((Map) resourceDef).get("type");
+ return Optional.of(internalResourceType);
+ } else {
+ return Optional.of(resourceType);
+ }
+ }
+
+ private static boolean isYamlFile(String fileName) {
+ return fileName.endsWith(".yaml") || fileName.endsWith(".yml");
+ }
+
+ /**
+ * Gets resource.
+ *
+ * @param heatOrchestrationTemplate the heat orchestration template
+ * @param resourceId the resource id
+ * @param heatFileName the heat file name
+ * @return the resource
+ */
+ public static Resource getResource(HeatOrchestrationTemplate heatOrchestrationTemplate,
+ String resourceId, String heatFileName) {
+ Resource resource = heatOrchestrationTemplate.getResources().get(resourceId);
+ if (resource == null) {
+ throw new CoreException(
+ new ResourceNotFoundInHeatFileErrorBuilder(resourceId, heatFileName).build());
+ }
+ return resource;
+ }
+
+ public static boolean isHeatFileNested(TranslateTo translateTo, String heatFileName) {
+ return translateTo.getContext().getNestedHeatsFiles().contains(heatFileName);
+ }
+
+ /**
+ * Extract contrail get resource attached heat resource id string.
+ *
+ * @param propertyValue the property value
+ * @return the string
+ */
+ public static String extractContrailGetResourceAttachedHeatResourceId(Object propertyValue) {
+ if (propertyValue == null) {
+ return null;
+ }
+
+ Object value;
+ if (propertyValue instanceof Map) {
+ if (((Map) propertyValue).containsKey("get_attr")) {
+ value = ((Map) propertyValue).get("get_attr");
+ if (value instanceof List) {
+ if (((List) value).size() == 2 && ((List) value).get(1).equals("fq_name")) {
+ if (((List) value).get(0) instanceof String) {
+ return (String) ((List) value).get(0);
+ } else {
+ logger.warn("invalid format of 'get_attr' function - " + propertyValue.toString());
+ }
+ }
+ }
+ } else if (((Map) propertyValue).containsKey("get_resource")) {
+ value = ((Map) propertyValue).get("get_resource");
+ if (value instanceof String) {
+ return (String) value;
+ } else {
+ logger.warn("invalid format of 'get_resource' function - " + propertyValue.toString());
+ }
+ } else {
+ Collection<Object> valCollection = ((Map) propertyValue).values();
+ for (Object entryValue : valCollection) {
+ String ret = extractContrailGetResourceAttachedHeatResourceId(entryValue);
+ if (ret != null) {
+ return ret;
+ }
+
+ }
+ }
+ } else if (propertyValue instanceof List) {
+ for (Object prop : (List) propertyValue) {
+ String ret = extractContrailGetResourceAttachedHeatResourceId(prop);
+ if (ret != null) {
+ return ret;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Gets tosca service model.
+ *
+ * @param translateTo the translate to
+ * @return the tosca service model
+ */
+ public static ToscaServiceModel getToscaServiceModel(TranslateTo translateTo) {
+ Map<String, ServiceTemplate> serviceTemplates =
+ new HashMap<>(translateTo.getContext().getGlobalServiceTemplates());
+ Collection<ServiceTemplate> tmpServiceTemplates =
+ translateTo.getContext().getTranslatedServiceTemplates().values();
+ for (ServiceTemplate serviceTemplate : tmpServiceTemplates) {
+ ToscaUtil.addServiceTemplateToMapWithKeyFileName(serviceTemplates, serviceTemplate);
+ }
+ return new ToscaServiceModel(null, serviceTemplates,
+ ToscaUtil.getServiceTemplateFileName(translateTo.getResource().getType()));
+ }
+
+ /**
+ * Gets service template from context.
+ *
+ * @param serviceTemplateFileName the service template file name
+ * @param context the context
+ * @return the service template from context
+ */
+ public static Optional<ServiceTemplate> getServiceTemplateFromContext(
+ String serviceTemplateFileName, TranslationContext context) {
+ for (ServiceTemplate serviceTemplate : context.getTranslatedServiceTemplates().values()) {
+ if (ToscaUtil.getServiceTemplateFileName(serviceTemplate).equals(serviceTemplateFileName)) {
+ return Optional.of(serviceTemplate);
+ }
+ }
+
+ return Optional.empty();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/ResourceTranslation.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/ResourceTranslation.java
new file mode 100644
index 0000000000..231eb42c03
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/ResourceTranslation.java
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca;
+
+
+import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+
+import java.util.Optional;
+
+public interface ResourceTranslation {
+
+ //return the Id of translated object (NodeTemplate, RelationshipTemplate and etc)
+ Optional<String> translateResource(String heatFileName, ServiceTemplate serviceTemplate,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ Resource resource, String resourceId,
+ TranslationContext context);
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/ResourceTranslationFactory.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/ResourceTranslationFactory.java
new file mode 100644
index 0000000000..730c2ddd7a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/ResourceTranslationFactory.java
@@ -0,0 +1,107 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca;
+
+
+import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+
+import org.openecomp.sdc.translator.services.heattotosca.impl.ResourceTranslationBase;
+import org.openecomp.sdc.translator.services.heattotosca.impl.ResourceTranslationCinderVolumeAttachmentImpl;
+import org.openecomp.sdc.translator.services.heattotosca.impl.ResourceTranslationCinderVolumeImpl;
+import org.openecomp.sdc.translator.services.heattotosca.impl.ResourceTranslationContrailAttachPolicyImpl;
+import org.openecomp.sdc.translator.services.heattotosca.impl.ResourceTranslationContrailNetworkPolicyImpl;
+import org.openecomp.sdc.translator.services.heattotosca.impl.ResourceTranslationContrailServiceInstanceImpl;
+import org.openecomp.sdc.translator.services.heattotosca.impl.ResourceTranslationContrailServiceTemplateImpl;
+import org.openecomp.sdc.translator.services.heattotosca.impl.ResourceTranslationContrailV2NetworkPolicyImpl;
+import org.openecomp.sdc.translator.services.heattotosca.impl.ResourceTranslationContrailV2VirtualNetworkImpl;
+import org.openecomp.sdc.translator.services.heattotosca.impl.ResourceTranslationContrailV2VmInterfaceImpl;
+import org.openecomp.sdc.translator.services.heattotosca.impl.ResourceTranslationContrailVirtualNetworkImpl;
+import org.openecomp.sdc.translator.services.heattotosca.impl.ResourceTranslationDefaultImpl;
+import org.openecomp.sdc.translator.services.heattotosca.impl.ResourceTranslationNestedImpl;
+import org.openecomp.sdc.translator.services.heattotosca.impl.ResourceTranslationNeutronNetImpl;
+import org.openecomp.sdc.translator.services.heattotosca.impl.ResourceTranslationNeutronPortImpl;
+import org.openecomp.sdc.translator.services.heattotosca.impl.ResourceTranslationNeutronSecurityGroupImpl;
+import org.openecomp.sdc.translator.services.heattotosca.impl.ResourceTranslationNeutronSubnetImpl;
+import org.openecomp.sdc.translator.services.heattotosca.impl.ResourceTranslationNovaServerGroupsImpl;
+import org.openecomp.sdc.translator.services.heattotosca.impl.ResourceTranslationNovaServerImpl;
+import org.openecomp.sdc.translator.services.heattotosca.impl.ResourceTranslationResourceGroupImpl;
+
+import java.util.Objects;
+
+public class ResourceTranslationFactory {
+
+ /**
+ * Gets instance.
+ *
+ * @param resource the resource
+ * @return the instance
+ */
+ public static ResourceTranslationBase getInstance(Resource resource) {
+ HeatResourcesTypes heatResource = HeatResourcesTypes.findByHeatResource(resource.getType());
+ if (Objects.isNull(heatResource)) {
+ if (HeatToToscaUtil.isYmlFileType(resource.getType())) {
+ return new ResourceTranslationNestedImpl();
+ }
+ return new ResourceTranslationDefaultImpl();
+ }
+ switch (heatResource) {
+ case NOVA_SERVER_RESOURCE_TYPE:
+ return new ResourceTranslationNovaServerImpl();
+ case NOVA_SERVER_GROUP_RESOURCE_TYPE:
+ return new ResourceTranslationNovaServerGroupsImpl();
+ case NEUTRON_SECURITY_GROUP_RESOURCE_TYPE:
+ return new ResourceTranslationNeutronSecurityGroupImpl();
+ case NEUTRON_PORT_RESOURCE_TYPE:
+ return new ResourceTranslationNeutronPortImpl();
+ case CONTRAIL_VIRTUAL_NETWORK_RESOURCE_TYPE:
+ return new ResourceTranslationContrailVirtualNetworkImpl();
+ case CONTRAIL_V2_VIRTUAL_NETWORK_RESOURCE_TYPE:
+ return new ResourceTranslationContrailV2VirtualNetworkImpl();
+ case CONTRAIL_V2_VIRTUAL_MACHINE_INTERFACE_RESOURCE_TYPE:
+ return new ResourceTranslationContrailV2VmInterfaceImpl();
+ case CINDER_VOLUME_RESOURCE_TYPE:
+ return new ResourceTranslationCinderVolumeImpl();
+ case CINDER_VOLUME_ATTACHMENT_RESOURCE_TYPE:
+ return new ResourceTranslationCinderVolumeAttachmentImpl();
+ case NEUTRON_NET_RESOURCE_TYPE:
+ return new ResourceTranslationNeutronNetImpl();
+ case NEUTRON_SUBNET_RESOURCE_TYPE:
+ return new ResourceTranslationNeutronSubnetImpl();
+ case CONTRAIL_NETWORK_RULE_RESOURCE_TYPE:
+ return new ResourceTranslationContrailNetworkPolicyImpl();
+ case CONTRAIL_V2_NETWORK_RULE_RESOURCE_TYPE:
+ return new ResourceTranslationContrailV2NetworkPolicyImpl();
+ case CONTRAIL_NETWORK_ATTACH_RULE_RESOURCE_TYPE:
+ return new ResourceTranslationContrailAttachPolicyImpl();
+ case RESOURCE_GROUP_RESOURCE_TYPE:
+ return new ResourceTranslationResourceGroupImpl();
+ case CONTRAIL_SERVICE_TEMPLATE:
+ return new ResourceTranslationContrailServiceTemplateImpl();
+ case CONTRAIL_SERVICE_INSTANCE:
+ return new ResourceTranslationContrailServiceInstanceImpl();
+ default:
+ return new ResourceTranslationDefaultImpl();
+ }
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/TranslationContext.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/TranslationContext.java
new file mode 100644
index 0000000000..a242eda3f0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/TranslationContext.java
@@ -0,0 +1,172 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca;
+
+import org.openecomp.core.utilities.file.FileContentHandler;
+import org.openecomp.core.utilities.file.FileUtils;
+import org.openecomp.core.utilities.json.JsonUtil;
+import org.openecomp.sdc.common.utils.AsdcCommon;
+import org.openecomp.sdc.heat.datatypes.manifest.FileData;
+import org.openecomp.sdc.heat.datatypes.manifest.ManifestFile;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslatedHeatResource;
+import org.openecomp.sdc.translator.services.heattotosca.globaltypes.GlobalTypesGenerator;
+
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+
+public class TranslationContext {
+
+
+ private static Map<String, Map<String, Map<String, String>>> translationMapping;
+ private static Map<String, ServiceTemplate> globalServiceTemplates;
+
+ static {
+
+ String propertyFileName = AsdcCommon.HEAT_TO_TOSCA_MAPPING_CONF;
+ InputStream is = FileUtils.getFileInputStream(propertyFileName);
+ translationMapping = JsonUtil.json2Object(is, Map.class);
+ globalServiceTemplates = GlobalTypesGenerator.getGlobalTypesServiceTemplate();
+ }
+
+ private ManifestFile manifest;
+
+ private FileContentHandler files = new FileContentHandler();
+
+ private Map<String, FileData.Type> manifestFiles = new HashMap<>();
+ //Key - file name, value - file type
+ private Set<String> nestedHeatsFiles = new HashSet<>();
+ private FileContentHandler externalArtifacts = new FileContentHandler();
+
+ private Map<String, Set<String>> translatedResources = new HashMap<>();
+ // Key - heat file name,value - set of heat resource ids which were translated
+ private Map<String, Set<String>> heatStackGroupMembers = new HashMap<>();
+ // Key - heat file name, value - translated Node template id
+ private Map<String, Map<String, String>> translatedIds = new HashMap<>();
+ // Key - heat file name, value - Map with Key - heat resource Id, Value - tosca entity template id
+ private Map<String, ServiceTemplate> translatedServiceTemplates = new HashMap<>();
+ // key - service template type, value - translated service templates
+ private Map<String, TranslatedHeatResource> heatSharedResourcesByParam = new HashMap<>();
+ //key - heat param name, value - shared resource data
+
+ public void addManifestFile(String fileName, FileData.Type fileType) {
+ this.manifestFiles.put(fileName, fileType);
+ }
+
+ public Set<String> getNestedHeatsFiles() {
+ return nestedHeatsFiles;
+ }
+
+ public Map<String, Set<String>> getHeatStackGroupMembers() {
+ return heatStackGroupMembers;
+ }
+
+ public FileContentHandler getFiles() {
+ return files;
+ }
+
+ public void setFiles(Map<String, byte[]> files) {
+ this.files.putAll(files);
+ }
+
+ public InputStream getFileContent(String fileName) {
+ return files.getFileContent(fileName);
+ }
+
+ public void addFile(String name, byte[] content) {
+ files.addFile(name, content);
+ }
+
+ public ManifestFile getManifest() {
+ return manifest;
+ }
+
+ public void setManifest(ManifestFile manifest) {
+ this.manifest = manifest;
+ }
+
+ public Map<String, Set<String>> getTranslatedResources() {
+ return translatedResources;
+ }
+
+ public Map<String, Map<String, String>> getTranslatedIds() {
+ return translatedIds;
+ }
+
+ // get tosca name from mapping configuration file
+ //element type - parameter/attribute
+ // element name - heat parameter/attribute name
+ //return value - tosca parameter/attribute name
+ public String getElementMapping(String resourceType, String elementType, String elementName) {
+ return translationMapping.get(resourceType).get(elementType).get(elementName);
+ }
+
+ public Map<String, String> getElementMapping(String resourceType, String elementType) {
+ return translationMapping.get(resourceType).get(elementType);
+ }
+
+ public Set<String> getElementSet(String resourceType, String elementType) {
+ return translationMapping.get(resourceType).get(elementType).keySet();
+ }
+
+ public Map<String, ServiceTemplate> getTranslatedServiceTemplates() {
+ return translatedServiceTemplates;
+ }
+
+ public ServiceTemplate getGlobalSubstitutionServiceTemplate() {
+ return getTranslatedServiceTemplates().get(Constants.GLOBAL_SUBSTITUTION_TYPES_TEMPLATE_NAME);
+ }
+
+ public FileContentHandler getExternalArtifacts() {
+ return externalArtifacts;
+ }
+
+ public void addExternalArtifacts(String name, byte[] content) {
+ this.externalArtifacts.addFile(name, content);
+ }
+
+
+ public Map<String, TranslatedHeatResource> getHeatSharedResourcesByParam() {
+ return heatSharedResourcesByParam;
+ }
+
+ public void addHeatSharedResourcesByParam(String parameterName, String resourceId,
+ Resource resource) {
+ this.addHeatSharedResourcesByParam(parameterName,
+ new TranslatedHeatResource(resourceId, resource));
+ }
+
+ public void addHeatSharedResourcesByParam(String parameterName,
+ TranslatedHeatResource translatedHeatResource) {
+ this.heatSharedResourcesByParam.put(parameterName, translatedHeatResource);
+ }
+
+ public Map<String, ServiceTemplate> getGlobalServiceTemplates() {
+ return globalServiceTemplates;
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/TranslationService.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/TranslationService.java
new file mode 100644
index 0000000000..1d90d8b2af
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/TranslationService.java
@@ -0,0 +1,344 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca;
+
+import org.openecomp.core.translator.datatypes.TranslatorOutput;
+import org.openecomp.core.utilities.file.FileContentHandler;
+import org.openecomp.core.utilities.file.FileUtils;
+import org.openecomp.core.utilities.yaml.YamlUtil;
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.heat.datatypes.manifest.FileData;
+import org.openecomp.sdc.heat.datatypes.model.Environment;
+import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
+import org.openecomp.sdc.heat.datatypes.model.Output;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.heat.datatypes.structure.ValidationStructureList;
+import org.openecomp.sdc.heat.services.tree.HeatTreeManager;
+import org.openecomp.sdc.heat.services.tree.HeatTreeManagerUtil;
+import org.openecomp.sdc.tosca.datatypes.ToscaGroupType;
+import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
+import org.openecomp.sdc.tosca.datatypes.model.GroupDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.Metadata;
+import org.openecomp.sdc.tosca.datatypes.model.ParameterDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.TopologyTemplate;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.tosca.services.ToscaFileOutputService;
+import org.openecomp.sdc.tosca.services.ToscaUtil;
+import org.openecomp.sdc.tosca.services.impl.ToscaFileOutputServiceCsarImpl;
+import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.FileDataCollection;
+import org.openecomp.sdc.translator.services.heattotosca.errors.ResourceNotFoundInHeatFileErrorBuilder;
+import org.openecomp.sdc.translator.services.heattotosca.globaltypes.GlobalTypesGenerator;
+import org.openecomp.sdc.translator.services.heattotosca.mapping.TranslatorHeatToToscaParameterConverter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+
+
+public class TranslationService {
+
+ protected static Logger logger = LoggerFactory.getLogger(TranslationService.class);
+
+ /**
+ * Gets types to process by translator.
+ *
+ * @return the types to process by translator
+ */
+ public static Set<FileData.Type> getTypesToProcessByTranslator() {
+ Set<FileData.Type> types = new HashSet<>();
+ types.add(FileData.Type.HEAT);
+ types.add(FileData.Type.HEAT_VOL);
+ return types;
+ }
+
+ /**
+ * Translate heat files translator output.
+ *
+ * @param translationContext the translation context
+ * @return the translator output
+ */
+ public TranslatorOutput translateHeatFiles(TranslationContext translationContext) {
+ ServiceTemplate mainServiceTemplate = createMainServiceTemplate(translationContext);
+ List<FileData> fileDataList = translationContext.getManifest().getContent().getData();
+ FileDataCollection fileDataCollection = HeatToToscaUtil.getFileCollectionsByFilter(fileDataList,
+ TranslationService.getTypesToProcessByTranslator(), translationContext);
+
+ if (fileDataCollection.getBaseFile() != null) {
+ for (FileData fileData : fileDataCollection.getBaseFile()) {
+ translateHeatFile(mainServiceTemplate, fileData, translationContext);
+ }
+ }
+ if (fileDataCollection.getAddOnFiles() != null) {
+ for (FileData fileData : fileDataCollection.getAddOnFiles()) {
+ translateHeatFile(mainServiceTemplate, fileData, translationContext);
+ }
+ }
+
+ ToscaServiceModel toscaServiceModel =
+ createToscaServiceModel(mainServiceTemplate, translationContext);
+
+ TranslatorOutput translatorOutput = new TranslatorOutput();
+ translatorOutput.setToscaServiceModel(toscaServiceModel);
+ return translatorOutput;
+ }
+
+ private ToscaServiceModel createToscaServiceModel(ServiceTemplate entryDefinitionServiceTemplate,
+ TranslationContext translationContext) {
+ return new ToscaServiceModel(getCsarArtifactFiles(translationContext),
+ getServiceTemplates(translationContext),
+ ToscaUtil.getServiceTemplateFileName(entryDefinitionServiceTemplate));
+ }
+
+ private Map<String, ServiceTemplate> getServiceTemplates(TranslationContext translationContext) {
+ List<ServiceTemplate> serviceTemplates = new ArrayList<>();
+ serviceTemplates.addAll(GlobalTypesGenerator.getGlobalTypesServiceTemplate().values());
+ serviceTemplates.addAll(translationContext.getTranslatedServiceTemplates().values());
+ Map<String, ServiceTemplate> serviceTemplatesMap = new HashMap<>();
+
+ for (ServiceTemplate template : serviceTemplates) {
+ serviceTemplatesMap.put(ToscaUtil.getServiceTemplateFileName(template), template);
+ }
+ return serviceTemplatesMap;
+ }
+
+ private FileContentHandler getCsarArtifactFiles(TranslationContext translationContext) {
+ FileContentHandler artifactFiles = new FileContentHandler();
+ artifactFiles.setFiles(translationContext.getFiles());
+ artifactFiles.setFiles(translationContext.getExternalArtifacts());
+
+ HeatTreeManager heatTreeManager =
+ HeatTreeManagerUtil.initHeatTreeManager(translationContext.getFiles());
+ heatTreeManager.createTree();
+ ValidationStructureList validationStructureList =
+ new ValidationStructureList(heatTreeManager.getTree());
+ byte[] validationStructureFile =
+ FileUtils.convertToBytes(validationStructureList, FileUtils.FileExtension.JSON);
+ artifactFiles.addFile("HEAT.meta", validationStructureFile);
+
+ return artifactFiles;
+ }
+
+ private ServiceTemplate createMainServiceTemplate(TranslationContext translationContext) {
+ ServiceTemplate mainServiceTemplate = new ServiceTemplate();
+ translationContext.getTranslatedServiceTemplates().put("Main", mainServiceTemplate);
+ Metadata templateMetadata = new Metadata();
+ templateMetadata.setTemplate_name("Main");
+ mainServiceTemplate.setTosca_definitions_version(ToscaConstants.TOSCA_DEFINITIONS_VERSION);
+ mainServiceTemplate.setMetadata(templateMetadata);
+ mainServiceTemplate.setTopology_template(new TopologyTemplate());
+ mainServiceTemplate.setImports(GlobalTypesGenerator.getGlobalTypesImportList());
+
+ return mainServiceTemplate;
+ }
+
+ /**
+ * Translate heat file.
+ *
+ * @param serviceTemplate the service template
+ * @param heatFileData the heat file data
+ * @param context the context
+ */
+ public void translateHeatFile(ServiceTemplate serviceTemplate, FileData heatFileData,
+ TranslationContext context) {
+ String heatFileName = heatFileData.getFile();
+ HeatOrchestrationTemplate heatOrchestrationTemplate = new YamlUtil()
+ .yamlToObject(context.getFileContent(heatFileName), HeatOrchestrationTemplate.class);
+
+ translateInputParameters(serviceTemplate, heatOrchestrationTemplate, heatFileData, context,
+ heatFileName);
+ translateResources(heatFileName, serviceTemplate, heatOrchestrationTemplate, context);
+ translateOutputParameters(serviceTemplate, heatOrchestrationTemplate, heatFileData,
+ heatFileName, context);
+ createHeatStackGroup(serviceTemplate, heatFileData, heatOrchestrationTemplate, context);
+
+ if (Objects.nonNull(heatFileData.getData())) {
+ heatFileData.getData().stream().filter(data -> data.getType() == FileData.Type.HEAT_VOL)
+ .forEach(data -> translateHeatFile(serviceTemplate, data, context));
+ }
+ }
+
+ private void createHeatStackGroup(ServiceTemplate serviceTemplate, FileData heatFileData,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ TranslationContext context) {
+ ToscaFileOutputService toscaFileOutputService = new ToscaFileOutputServiceCsarImpl();
+ String fileName = heatFileData.getFile();
+ final String fileNameWoExtension =
+ FileUtils.getFileWithoutExtention(fileName);//.heatFileData.getFile().split("\\.")[0];
+
+ GroupDefinition groupDefinition = new GroupDefinition();
+ groupDefinition.setType(ToscaGroupType.HEAT_STACK.getDisplayName());
+ groupDefinition.setProperties(new HashMap<>());
+ groupDefinition.getProperties()
+ .put("heat_file", "../" + toscaFileOutputService.getArtifactsFolderName() + "/" + fileName);
+ String hotDescription = heatOrchestrationTemplate.getDescription();
+ if (hotDescription != null && !hotDescription.isEmpty()) {
+ groupDefinition.getProperties().put(Constants.DESCRIPTION_PROPERTY_NAME, hotDescription);
+ }
+ groupDefinition.setMembers(new ArrayList<>());
+ Map<String, Set<String>> heatStackGroupMembers = context.getHeatStackGroupMembers();
+ if (heatStackGroupMembers.get(fileName) == null) {
+ return; //not creating a group when no resources are present in the heat input
+ }
+ groupDefinition.getMembers().addAll(heatStackGroupMembers.get(fileName));
+ if (serviceTemplate.getTopology_template().getGroups() == null) {
+ Map<String, GroupDefinition> groups = new HashMap<>();
+ serviceTemplate.getTopology_template().setGroups(groups);
+ }
+ serviceTemplate.getTopology_template().getGroups().put(fileNameWoExtension, groupDefinition);
+ }
+
+ private void translateInputParameters(ServiceTemplate serviceTemplate,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ FileData heatFileData, TranslationContext context,
+ String heatFileName) {
+
+ if (heatOrchestrationTemplate.getParameters() == null) {
+ return;
+ }
+
+ Map<String, ParameterDefinition> parameterDefinitionMap =
+ TranslatorHeatToToscaParameterConverter
+ .parameterConverter(heatOrchestrationTemplate.getParameters(),
+ heatOrchestrationTemplate, heatFileName, context);
+ Environment heatEnvFile = getHeatEnvFile(heatFileData, context);
+ Map<String, Object> parameters = heatEnvFile.getParameters();
+ Object parameterValue;
+ if (parameters != null) {
+ for (Map.Entry<String, ParameterDefinition> entry : parameterDefinitionMap.entrySet()) {
+ String paramName = entry.getKey();
+ parameterValue = parameters.get(paramName);
+ if (parameterValue != null) {
+ entry.getValue().set_default(TranslatorHeatToToscaParameterConverter
+ .getToscaParameterDefaultValue(parameterValue, entry.getValue().getType(),
+ heatFileName, heatOrchestrationTemplate, context));
+ }
+ }
+ }
+
+ Map<String, ParameterDefinition> inputs = serviceTemplate.getTopology_template().getInputs();
+ if (Objects.isNull(inputs)) {
+ serviceTemplate.getTopology_template().setInputs(parameterDefinitionMap);
+ } else {
+ inputs.putAll(parameterDefinitionMap);
+ }
+ }
+
+ private void translateOutputParameters(ServiceTemplate serviceTemplate,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ FileData heatFileData, String heatFileName,
+ TranslationContext context) {
+ if (heatOrchestrationTemplate.getOutputs() == null) {
+ return;
+ }
+ Map<String, ParameterDefinition> parameterDefinitionMap =
+ TranslatorHeatToToscaParameterConverter
+ .parameterOutputConverter(heatOrchestrationTemplate.getOutputs(),
+ heatOrchestrationTemplate, heatFileName, context);
+ if (serviceTemplate.getTopology_template().getOutputs() != null) {
+ serviceTemplate.getTopology_template().getOutputs().putAll(parameterDefinitionMap);
+ } else {
+ serviceTemplate.getTopology_template().setOutputs(parameterDefinitionMap);
+ }
+
+ if (heatFileData.getBase() != null && heatFileData.getBase().equals(true)) {
+ updateSharedResources(serviceTemplate, heatFileName, heatOrchestrationTemplate,
+ heatOrchestrationTemplate.getOutputs(), context);
+ }
+ }
+
+ private void updateSharedResources(ServiceTemplate serviceTemplate, String heatFileName,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ Map<String, Output> outputs, TranslationContext context) {
+ for (Map.Entry<String, Output> paramName : outputs.entrySet()) {
+ Optional<AttachedResourceId> attachedSharedResourceId = HeatToToscaUtil
+ .extractAttachedResourceId(heatFileName, heatOrchestrationTemplate, context,
+ paramName.getValue().getValue());
+ if (attachedSharedResourceId.isPresent() && attachedSharedResourceId.get().isGetResource()
+ && attachedSharedResourceId.get().getTranslatedId() != null) {
+ String sharedTranslatedResourceId =
+ attachedSharedResourceId.get().getTranslatedId().toString();
+ updateSharedResource(serviceTemplate, context, paramName, sharedTranslatedResourceId,
+ heatOrchestrationTemplate.getResources()
+ .get(attachedSharedResourceId.get().getEntityId()));
+ } else {
+ String contrailSharedResourceId = HeatToToscaUtil
+ .extractContrailGetResourceAttachedHeatResourceId(paramName.getValue().getValue());
+ if (contrailSharedResourceId != null
+ && context.getTranslatedIds().get(heatFileName).get(contrailSharedResourceId) != null) {
+ updateSharedResource(serviceTemplate, context, paramName,
+ context.getTranslatedIds().get(heatFileName).get(contrailSharedResourceId),
+ heatOrchestrationTemplate.getResources().get(contrailSharedResourceId));
+ }
+ }
+ }
+ if (serviceTemplate.getTopology_template().getOutputs() != null
+ && serviceTemplate.getTopology_template().getOutputs().size() == 0) {
+ serviceTemplate.getTopology_template().setOutputs(null);
+ }
+ }
+
+ private void updateSharedResource(ServiceTemplate serviceTemplate, TranslationContext context,
+ Map.Entry<String, Output> paramName,
+ String sharedTranslatedResourceId, Resource resource) {
+ context.addHeatSharedResourcesByParam(paramName.getKey(), sharedTranslatedResourceId, resource);
+ serviceTemplate.getTopology_template().getOutputs().remove(paramName.getKey());
+ }
+
+ private void translateResources(String heatFileName, ServiceTemplate serviceTemplate,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ TranslationContext context) {
+ for (String resourceId : heatOrchestrationTemplate.getResources().keySet()) {
+ Resource resource = heatOrchestrationTemplate.getResources().get(resourceId);
+ if (resource == null) {
+ throw new CoreException(
+ new ResourceNotFoundInHeatFileErrorBuilder(resourceId, heatFileName).build());
+ }
+ ResourceTranslationFactory.getInstance(resource)
+ .translateResource(heatFileName, serviceTemplate, heatOrchestrationTemplate, resource,
+ resourceId, context);
+ }
+ }
+
+ private Environment getHeatEnvFile(FileData heatFileData, TranslationContext context) {
+ List<FileData> fileRelatedDataList = heatFileData.getData();
+ if (fileRelatedDataList == null) {
+ return new Environment();
+ }
+ for (FileData fileRelatedData : fileRelatedDataList) {
+ if (fileRelatedData.getType().equals(FileData.Type.HEAT_ENV)) {
+ return new YamlUtil().yamlToObject(context.getFileContent(fileRelatedData.getFile()),
+ Environment.class);
+ }
+ }
+ return new Environment();
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/IncorrectResourceReferenceErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/IncorrectResourceReferenceErrorBuilder.java
new file mode 100644
index 0000000000..c713855f60
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/IncorrectResourceReferenceErrorBuilder.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.errors;
+
+import org.openecomp.sdc.common.errors.BaseErrorBuilder;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+
+public class IncorrectResourceReferenceErrorBuilder extends BaseErrorBuilder {
+
+ private static final String INCORRECT_RESOURCE_REFERENCE_MSG =
+ "resource id '%s' with type '%s' has reference to resource '%s' with"
+ + " type '%s' in property '%s'. Invalid type, resource type should be type of '%s'.";
+
+ /**
+ * Instantiates a new Incorrect resource reference error builder.
+ *
+ * @param sourceResourceId the source resource id
+ * @param sourceResourceType the source resource type
+ * @param targetResourceId the target resource id
+ * @param targetResourceType the target resource type
+ * @param property the property
+ * @param validType the valid type
+ */
+ public IncorrectResourceReferenceErrorBuilder(String sourceResourceId, String sourceResourceType,
+ String targetResourceId, String targetResourceType,
+ String property, String validType) {
+ getErrorCodeBuilder().withId(TranslatorErrorCodes.INCORRECT_RESOURCE_REFERENCE);
+ getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
+ getErrorCodeBuilder().withMessage(String
+ .format(INCORRECT_RESOURCE_REFERENCE_MSG, sourceResourceId, sourceResourceType,
+ targetResourceId, targetResourceType, property, validType));
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/InvalidPropertyValueErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/InvalidPropertyValueErrorBuilder.java
new file mode 100644
index 0000000000..a16c341545
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/InvalidPropertyValueErrorBuilder.java
@@ -0,0 +1,47 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.errors;
+
+import org.openecomp.sdc.common.errors.BaseErrorBuilder;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+
+
+public class InvalidPropertyValueErrorBuilder extends BaseErrorBuilder {
+
+ private static final String INVALID_FILED_VALUE_MSG =
+ "'%s' property has invalid value. Actual value is '%s' while '%s' value expected.";
+
+ /**
+ * Instantiates a new Invalid property value error builder.
+ *
+ * @param propertyName the property name
+ * @param actualValue the actual value
+ * @param expectedValue the expected value
+ */
+ public InvalidPropertyValueErrorBuilder(String propertyName, String actualValue,
+ String expectedValue) {
+ getErrorCodeBuilder().withId(TranslatorErrorCodes.INVALID_PROPERTY_VALUE);
+ getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
+ getErrorCodeBuilder().withMessage(
+ String.format(INVALID_FILED_VALUE_MSG, propertyName, actualValue, expectedValue));
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/MissingMandatoryPropertyErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/MissingMandatoryPropertyErrorBuilder.java
new file mode 100644
index 0000000000..6e06fef930
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/MissingMandatoryPropertyErrorBuilder.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.errors;
+
+import org.openecomp.sdc.common.errors.BaseErrorBuilder;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+
+
+public class MissingMandatoryPropertyErrorBuilder extends BaseErrorBuilder {
+
+ private static final String MANDATORY_PROPERTY_IS_MISSING_MSG =
+ "Mandatory property '%s' is missing";
+
+ /**
+ * Instantiates a new Missing mandatory property error builder.
+ *
+ * @param propertyName the property name
+ */
+ public MissingMandatoryPropertyErrorBuilder(String propertyName) {
+ getErrorCodeBuilder().withId(TranslatorErrorCodes.MISSING_MANDATORY_PROPERTY);
+ getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
+ getErrorCodeBuilder()
+ .withMessage(String.format(MANDATORY_PROPERTY_IS_MISSING_MSG, propertyName));
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/NotInSyncNumberOfInterfacesErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/NotInSyncNumberOfInterfacesErrorBuilder.java
new file mode 100644
index 0000000000..810c09880e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/NotInSyncNumberOfInterfacesErrorBuilder.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.errors;
+
+import org.openecomp.sdc.common.errors.BaseErrorBuilder;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+
+
+public class NotInSyncNumberOfInterfacesErrorBuilder extends BaseErrorBuilder {
+
+ private static final String NOT_IN_SYNC_NUMBER_OF_INTERFACES_MSG =
+ "More than one ServiceInstance pointing to the same "
+ + "ServiceTemplate '%s', with different number of interfaces.";
+
+ /**
+ * Instantiates a new Not in sync number of interfaces error builder.
+ *
+ * @param serviceTemplateResourceId the service template resource id
+ */
+ public NotInSyncNumberOfInterfacesErrorBuilder(String serviceTemplateResourceId) {
+ getErrorCodeBuilder().withId(TranslatorErrorCodes.NOT_IN_SYNC_NUMBER_OF_INTERFACES);
+ getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
+ getErrorCodeBuilder().withMessage(
+ String.format(NOT_IN_SYNC_NUMBER_OF_INTERFACES_MSG, serviceTemplateResourceId));
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/ReferenceToUnsupportedResourceErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/ReferenceToUnsupportedResourceErrorBuilder.java
new file mode 100644
index 0000000000..5b48cb2c59
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/ReferenceToUnsupportedResourceErrorBuilder.java
@@ -0,0 +1,52 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.errors;
+
+import org.openecomp.sdc.common.errors.BaseErrorBuilder;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+
+
+public class ReferenceToUnsupportedResourceErrorBuilder extends BaseErrorBuilder {
+
+ private static final String REFERENCE_TO_UNSUPPORTED_RESOURCE_MSG =
+ "Resource id '%s' with type '%s' has reference to"
+ + " unsupported resource '%s' with type '%s' in property '%s'";
+
+ /**
+ * Instantiates a new Reference to unsupported resource error builder.
+ *
+ * @param sourceResourceId the source resource id
+ * @param sourceResourceType the source resource type
+ * @param targetResourceId the target resource id
+ * @param targetResourceType the target resource type
+ * @param property the property
+ */
+ public ReferenceToUnsupportedResourceErrorBuilder(String sourceResourceId,
+ String sourceResourceType,
+ String targetResourceId,
+ String targetResourceType, String property) {
+ getErrorCodeBuilder().withId(TranslatorErrorCodes.REFERENCE_TO_UNSUPPORTED_RESOURCE);
+ getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
+ getErrorCodeBuilder().withMessage(String
+ .format(REFERENCE_TO_UNSUPPORTED_RESOURCE_MSG, sourceResourceId, sourceResourceType,
+ targetResourceId, targetResourceType, property));
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/ResourceNotFoundInHeatFileErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/ResourceNotFoundInHeatFileErrorBuilder.java
new file mode 100644
index 0000000000..7fac501e76
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/ResourceNotFoundInHeatFileErrorBuilder.java
@@ -0,0 +1,52 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.errors;
+
+import org.openecomp.sdc.common.errors.ErrorCategory;
+import org.openecomp.sdc.common.errors.ErrorCode;
+
+public class ResourceNotFoundInHeatFileErrorBuilder {
+
+ private static final String RESOURCE_NOT_FOUND_IN_FILE_ERR_ID =
+ "RESOURCE_NOT_FOUND_IN_FILE_ERR_ID";
+ private static final String RESOURCE_NOT_FOUND_IN_FILE_ERR_MSG =
+ "resource with id = %s was not found in heat file = %s.";
+
+ private final ErrorCode.ErrorCodeBuilder builder = new ErrorCode.ErrorCodeBuilder();
+
+ /**
+ * Instantiates a new Resource not found in heat file error builder.
+ *
+ * @param resourceId the resource id
+ * @param heatfileName the heatfile name
+ */
+ public ResourceNotFoundInHeatFileErrorBuilder(String resourceId, String heatfileName) {
+ builder.withId(RESOURCE_NOT_FOUND_IN_FILE_ERR_ID);
+ builder.withCategory(ErrorCategory.APPLICATION);
+ builder
+ .withMessage(String.format(RESOURCE_NOT_FOUND_IN_FILE_ERR_MSG, resourceId, heatfileName));
+ }
+
+ public ErrorCode build() {
+ return builder.build();
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/TranslatorErrorCodes.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/TranslatorErrorCodes.java
new file mode 100644
index 0000000000..f9b873adca
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/TranslatorErrorCodes.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.errors;
+
+public class TranslatorErrorCodes {
+ public static final String MISSING_MANDATORY_PROPERTY = "MISSING_MANDATORY_PROPERTY";
+ public static final String HEAT_TO_TOSCA_MAPPING_COLLISION = "HEAT_TO_TOSCA_MAPPING_COLLISION";
+ public static final String INCORRECT_RESOURCE_REFERENCE = "INCORRECT_RESOURCE_REFERENCE";
+ public static final String REFERENCE_TO_UNSUPPORTED_RESOURCE =
+ "REFERENCE_TO_UNSUPPORTED_RESOURCE";
+ public static final String NOT_IN_SYNC_NUMBER_OF_INTERFACES = "NOT_IN_SYNC_NUMBER_OF_INTERFACES";
+ public static final String INVALID_PROPERTY_VALUE = "INVALID_PROPERTY_VALUE";
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/AbstractSubstituteGlobalType.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/AbstractSubstituteGlobalType.java
new file mode 100644
index 0000000000..221a9e522b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/AbstractSubstituteGlobalType.java
@@ -0,0 +1,167 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.globaltypes;
+
+import org.openecomp.sdc.tosca.datatypes.ToscaDataType;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.model.Constraint;
+import org.openecomp.sdc.tosca.datatypes.model.DataType;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.translator.services.heattotosca.Constants;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+public class AbstractSubstituteGlobalType {
+
+ private AbstractSubstituteGlobalType() {
+ }
+
+ /**
+ * Create service template service template.
+ *
+ * @return the service template
+ */
+ public static ServiceTemplate createServiceTemplate() {
+ ServiceTemplate serviceTemplate = new ServiceTemplate();
+ serviceTemplate.setTosca_definitions_version(ToscaConstants.TOSCA_DEFINITIONS_VERSION);
+ serviceTemplate.setMetadata(
+ DataModelUtil.createMetadata(Constants.ABSTRACT_SUBSTITUTE_TEMPLATE_NAME, "1.0.0", null));
+ serviceTemplate.setImports(GlobalTypesUtil.createCommonImportList());
+ serviceTemplate.setDescription("Abstract Substitute Global Types");
+ serviceTemplate.setData_types(createGlobalDataTypes());
+ serviceTemplate.setNode_types(createGlobalNodeTypes());
+ return serviceTemplate;
+ }
+
+ private static Map<String, NodeType> createGlobalNodeTypes() {
+ Map<String, NodeType> globalNodeTypes = new HashMap<>();
+ globalNodeTypes.put(ToscaNodeType.ABSTRACT_SUBSTITUTE.getDisplayName(),
+ createAbstractSubstituteNodeType());
+ return globalNodeTypes;
+ }
+
+ private static NodeType createAbstractSubstituteNodeType() {
+ NodeType nodeType = new NodeType();
+ nodeType.setDerived_from(ToscaNodeType.ROOT.getDisplayName());
+ nodeType.setProperties(createAbstractSubstituteProperties());
+ return nodeType;
+ }
+
+ private static Map<String, PropertyDefinition> createAbstractSubstituteProperties() {
+ Map<String, PropertyDefinition> props = new HashMap<>();
+ props.put(ToscaConstants.SERVICE_TEMPLATE_FILTER_PROPERTY_NAME, DataModelUtil
+ .createPropertyDefinition(ToscaDataType.SUBSTITUTION_FILTERING.getDisplayName(),
+ "Substitution Filter", true, null, null, null, null));
+
+ return props;
+ }
+
+
+ private static Map<String, DataType> createGlobalDataTypes() {
+ Map<String, DataType> globalDataTypes = new HashMap<>();
+ globalDataTypes.put(ToscaDataType.SUBSTITUTION_FILTER.getDisplayName(),
+ createSubstitutionFilterDataType());
+ globalDataTypes.put(ToscaDataType.SUBSTITUTION_FILTERING.getDisplayName(),
+ createSubstitutionFilteringDataType());
+ return globalDataTypes;
+ }
+
+ private static DataType createSubstitutionFilterDataType() {
+ DataType dataType = new DataType();
+ dataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ dataType.setDescription("Substitution Filter");
+ Map<String, PropertyDefinition> properties = new HashMap<>();
+ properties.put(ToscaConstants.COUNT_PROPERTY_NAME, DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Count", false, null, null,
+ null, 1));
+ properties.put(ToscaConstants.SCALING_ENABLED_PROPERTY_NAME, DataModelUtil
+ .createPropertyDefinition(PropertyType.BOOLEAN.getDisplayName(),
+ "Indicates whether service scaling is enabled", false, null, null, null, true));
+ properties.put(ToscaConstants.SUBSTITUTE_SERVICE_TEMPLATE_PROPERTY_NAME, DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Substitute Service Template", true, null, null, null, null));
+ properties.put("mandatory", DataModelUtil
+ .createPropertyDefinition(PropertyType.BOOLEAN.getDisplayName(), "Mandatory", false, null,
+ null, null, true));
+ properties.put("index_variable", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Index variable", false,
+ createMinLengthConstraint(), null, null, "%index%"));
+
+ dataType.setProperties(properties);
+ return dataType;
+ }
+
+ private static List<Constraint> createMinLengthConstraint() {
+ List<Constraint> constraints;
+ constraints = new ArrayList<>();
+ Constraint constraint = new Constraint();
+ constraint.setMin_length(3);
+ constraints.add(constraint);
+ return constraints;
+ }
+
+ private static DataType createSubstitutionFilteringDataType() {
+ DataType dataType = new DataType();
+ dataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ dataType.setDescription("Substitution Filter");
+ Map<String, PropertyDefinition> properties = new HashMap<>();
+ properties.put(ToscaConstants.COUNT_PROPERTY_NAME, DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Count", false, null, null,
+ null, 1));
+ properties.put(ToscaConstants.INDEX_VALUE_PROPERTY_NAME, DataModelUtil
+ .createPropertyDefinition(PropertyType.INTEGER.getDisplayName(),
+ "Index value of the substitution service template runtime instance", false,
+ createIndexValueConstraint(), null, null, 0));
+ properties.put(ToscaConstants.SCALING_ENABLED_PROPERTY_NAME, DataModelUtil
+ .createPropertyDefinition(PropertyType.BOOLEAN.getDisplayName(),
+ "Indicates whether service scaling is enabled", false, null, null, null, true));
+ properties.put(ToscaConstants.SUBSTITUTE_SERVICE_TEMPLATE_PROPERTY_NAME, DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Substitute Service Template", true, null, null, null, null));
+ properties.put("mandatory", DataModelUtil
+ .createPropertyDefinition(PropertyType.BOOLEAN.getDisplayName(), "Mandatory", false, null,
+ null, null, true));
+
+
+ dataType.setProperties(properties);
+ return dataType;
+ }
+
+ private static List<Constraint> createIndexValueConstraint() {
+ List<Constraint> constraints;
+ constraints = new ArrayList<>();
+ Constraint constraint = new Constraint();
+ constraint.setGreater_or_equal(0);
+ constraints.add(constraint);
+ return constraints;
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/CinderVolumeGlobalType.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/CinderVolumeGlobalType.java
new file mode 100644
index 0000000000..72f3043225
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/CinderVolumeGlobalType.java
@@ -0,0 +1,242 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.globaltypes;
+
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
+import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.Constraint;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
+import org.openecomp.sdc.tosca.datatypes.model.RelationshipType;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.translator.services.heattotosca.Constants;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class CinderVolumeGlobalType {
+
+ /**
+ * Create service template service template.
+ *
+ * @return the service template
+ */
+ public static ServiceTemplate createServiceTemplate() {
+ ServiceTemplate cinderVolumeServiceTemplate = new ServiceTemplate();
+ cinderVolumeServiceTemplate
+ .setTosca_definitions_version(ToscaConstants.TOSCA_DEFINITIONS_VERSION);
+ cinderVolumeServiceTemplate.setMetadata(
+ DataModelUtil.createMetadata(Constants.CINDER_VOLUME_TEMPLATE_NAME, "1.0.0", null));
+ cinderVolumeServiceTemplate.setDescription("Cinder Volume TOSCA Global Types");
+ cinderVolumeServiceTemplate.setRelationship_types(createGlobalRelationshipTypes());
+ cinderVolumeServiceTemplate.setNode_types(createGlobalNodeTypes());
+ return cinderVolumeServiceTemplate;
+ }
+
+ private static Map<String, NodeType> createGlobalNodeTypes() {
+ Map<String, NodeType> globalNodeTypes = new HashMap<>();
+ globalNodeTypes.put(ToscaNodeType.CINDER_VOLUME.getDisplayName(), createCinderVolumeNodeType());
+ return globalNodeTypes;
+ }
+
+ private static NodeType createCinderVolumeNodeType() {
+ NodeType cinderVolumeNodeType = new NodeType();
+ cinderVolumeNodeType.setDerived_from(ToscaNodeType.BLOCK_STORAGE.getDisplayName());
+ cinderVolumeNodeType.setProperties(createCinderVolumeProperties());
+ cinderVolumeNodeType.setAttributes(createCinderVolumeAttributes());
+ return cinderVolumeNodeType;
+ }
+
+ private static Map<String, RelationshipType> createGlobalRelationshipTypes() {
+ Map<String, RelationshipType> globalRelationshipTypes = new HashMap<>();
+ globalRelationshipTypes.put(ToscaRelationshipType.CINDER_VOLUME_ATTACHES_TO.getDisplayName(),
+ createCinderVolumeAttachesToRelationshipType());
+ return globalRelationshipTypes;
+ }
+
+ private static RelationshipType createCinderVolumeAttachesToRelationshipType() {
+ RelationshipType cinderVolumeAttachesToRelationType = new RelationshipType();
+ cinderVolumeAttachesToRelationType
+ .setDerived_from(ToscaRelationshipType.NATIVE_ATTACHES_TO.getDisplayName());
+ cinderVolumeAttachesToRelationType
+ .setDescription("This type represents an attachment relationship for associating volume");
+
+ Map<String, PropertyDefinition> cinderVolumeAttachesToProps = new HashMap<>();
+ cinderVolumeAttachesToProps.put("location", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "The location where the volume is exposed on the instance, mountpoint", false, null,
+ null, null, null)); //overridden location prop from attachesTo
+ cinderVolumeAttachesToProps.put("instance_uuid", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "The ID of the server to which the volume attaches", true, null, null, null, null));
+ cinderVolumeAttachesToProps.put("volume_id", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "The ID of the volume to be attached", true, null, null, null, null));
+ cinderVolumeAttachesToRelationType.setProperties(cinderVolumeAttachesToProps);
+
+ Map<String, AttributeDefinition> cinderVolumeAttachesToAttributes = new HashMap<>();
+ cinderVolumeAttachesToAttributes.put("show", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(),
+ "Detailed information about resource", null, null, null));
+ cinderVolumeAttachesToRelationType.setAttributes(cinderVolumeAttachesToAttributes);
+
+ return cinderVolumeAttachesToRelationType;
+ }
+
+ private static Map<String, PropertyDefinition> createCinderVolumeProperties() {
+ Map<String, PropertyDefinition> cinderVolumePropertyDefMap = new HashMap<>();
+ cinderVolumePropertyDefMap.put("availability_zone", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "The availability zone in which the volume will be created", false, null, null, null,
+ null));
+ cinderVolumePropertyDefMap.put("backup_id", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "If specified, the backup to create the volume from", false, null, null, null, null));
+ cinderVolumePropertyDefMap.put(Constants.DESCRIPTION_PROPERTY_NAME, DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "A description of the volume", false, null, null, null, null));
+ cinderVolumePropertyDefMap.put("image", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "If specified, the name or ID of the image to create the volume from", false, null,
+ null, null, null));
+ cinderVolumePropertyDefMap.put("metadata", DataModelUtil
+ .createPropertyDefinition(PropertyType.MAP.getDisplayName(),
+ "Key/value pairs to associate with the volume", false, null, null,
+ DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ null));
+ cinderVolumePropertyDefMap.put("multiattach", DataModelUtil
+ .createPropertyDefinition(PropertyType.BOOLEAN.getDisplayName(),
+ "Whether allow the volume to be attached more than once", false, null, null, null,
+ null));
+ cinderVolumePropertyDefMap.put(Constants.NAME_PROPERTY_NAME, DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "A name used to distinguish the volume", false, null, null, null, null));
+ cinderVolumePropertyDefMap.put("read_only", DataModelUtil
+ .createPropertyDefinition(PropertyType.BOOLEAN.getDisplayName(),
+ "Enables or disables read-only access mode of volume", false, null, null, null, null));
+ cinderVolumePropertyDefMap.put("scheduler_hints", DataModelUtil
+ .createPropertyDefinition(PropertyType.MAP.getDisplayName(),
+ "Arbitrary key-value pairs specified by the client "
+ + "to help the Cinder scheduler creating a volume",
+ false, null, null,
+ DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ null));
+ cinderVolumePropertyDefMap.put("size", DataModelUtil
+ .createPropertyDefinition(PropertyType.SCALAR_UNIT_SIZE.getDisplayName(),
+ "The requested storage size (default unit is MB)", false, getSizeConstraints(), null,
+ null, null));
+ cinderVolumePropertyDefMap.put("source_volid", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "If specified, the volume to use as source", false, null, null, null, null));
+ cinderVolumePropertyDefMap.put("volume_type", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "If specified, the type of volume to use, mapping to a specific backend", false, null,
+ null, null, null));
+ cinderVolumePropertyDefMap.put("delete_on_termination", DataModelUtil
+ .createPropertyDefinition(PropertyType.BOOLEAN.getDisplayName(),
+ "Indicate whether the volume should be deleted when the server is terminated", false,
+ null, null, null, null));
+ cinderVolumePropertyDefMap.put("boot_index", DataModelUtil
+ .createPropertyDefinition(PropertyType.INTEGER.getDisplayName(),
+ "Integer used for ordering the boot disks", false, null, null, null, null));
+ cinderVolumePropertyDefMap.put("device_type", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Device type", false,
+ getDeviceTypeConstraints(), null, null, null));
+ cinderVolumePropertyDefMap.put("disk_bus", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Bus of the device: hypervisor driver chooses a suitable default if omitted", false,
+ getDiskBusConstraints(), null, null, null));
+ cinderVolumePropertyDefMap.put("swap_size", DataModelUtil
+ .createPropertyDefinition(PropertyType.SCALAR_UNIT_SIZE.getDisplayName(),
+ "The size of the swap, in MB", false, null, null, null, null));
+
+ return cinderVolumePropertyDefMap;
+ }
+
+ private static Map<String, AttributeDefinition> createCinderVolumeAttributes() {
+ Map<String, AttributeDefinition> cinderVolumeAttributesDefMap = new HashMap<>();
+ cinderVolumeAttributesDefMap.put("attachments", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(),
+ "The list of attachments of the volume", null,
+ DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ null));
+ cinderVolumeAttributesDefMap.put("bootable", DataModelUtil
+ .createAttributeDefinition(PropertyType.BOOLEAN.getDisplayName(),
+ "Boolean indicating if the volume can be booted or not", null, null, null));
+ cinderVolumeAttributesDefMap.put("created_at", DataModelUtil
+ .createAttributeDefinition(PropertyType.TIMESTAMP.getDisplayName(),
+ "The timestamp indicating volume creation", null, null, null));
+ cinderVolumeAttributesDefMap.put("display_description", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(),
+ "Description of the volume", null, null, null));
+ cinderVolumeAttributesDefMap.put("display_name", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(), "Name of the volume", null,
+ null, null));
+ cinderVolumeAttributesDefMap.put("encrypted", DataModelUtil
+ .createAttributeDefinition(PropertyType.BOOLEAN.getDisplayName(),
+ "Boolean indicating if the volume is encrypted or not", null, null, null));
+ cinderVolumeAttributesDefMap.put("metadata_values", DataModelUtil
+ .createAttributeDefinition(PropertyType.MAP.getDisplayName(),
+ "Key/value pairs associated with the volume in raw dict form", null,
+ DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ null));
+ cinderVolumeAttributesDefMap.put("show", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(),
+ "Detailed information about resource", null, null, null));
+ cinderVolumeAttributesDefMap.put("status", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(),
+ "The current status of the volume", null, null, null));
+ return cinderVolumeAttributesDefMap;
+ }
+
+ private static List<Constraint> getDeviceTypeConstraints() {
+ Constraint validValues;
+ List<Constraint> constraints = new ArrayList<>();
+ validValues = DataModelUtil.createValidValuesConstraint("cdrom", "disk");
+ constraints.add(validValues);
+ return constraints;
+ }
+
+ private static List<Constraint> getDiskBusConstraints() {
+ Constraint validValues;
+ List<Constraint> constraints = new ArrayList<>();
+ validValues =
+ DataModelUtil.createValidValuesConstraint("ide", "lame_bus", "scsi", "usb", "virtio");
+ constraints.add(validValues);
+ return constraints;
+ }
+
+
+ private static List<Constraint> getSizeConstraints() {
+ List<Constraint> constraints;
+ constraints = new ArrayList<>();
+ Constraint constraint = new Constraint();
+ constraint.setGreater_or_equal("1 GB");
+ constraints.add(constraint);
+ return constraints;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/CommonGlobalTypes.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/CommonGlobalTypes.java
new file mode 100644
index 0000000000..43a4782149
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/CommonGlobalTypes.java
@@ -0,0 +1,500 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.globaltypes;
+
+
+import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
+import org.openecomp.sdc.tosca.datatypes.ToscaDataType;
+import org.openecomp.sdc.tosca.datatypes.ToscaGroupType;
+import org.openecomp.sdc.tosca.datatypes.ToscaPolicyType;
+import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
+import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.CapabilityType;
+import org.openecomp.sdc.tosca.datatypes.model.Constraint;
+import org.openecomp.sdc.tosca.datatypes.model.DataType;
+import org.openecomp.sdc.tosca.datatypes.model.GroupType;
+import org.openecomp.sdc.tosca.datatypes.model.Import;
+import org.openecomp.sdc.tosca.datatypes.model.PolicyType;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
+import org.openecomp.sdc.tosca.datatypes.model.RelationshipType;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.tosca.services.ToscaUtil;
+import org.openecomp.sdc.translator.services.heattotosca.Constants;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class CommonGlobalTypes {
+
+ /**
+ * Create service template service template.
+ *
+ * @return the service template
+ */
+ public static ServiceTemplate createServiceTemplate() {
+ ServiceTemplate serviceTemplate = new ServiceTemplate();
+ serviceTemplate.setTosca_definitions_version(ToscaConstants.TOSCA_DEFINITIONS_VERSION);
+ serviceTemplate.setMetadata(
+ DataModelUtil.createMetadata(Constants.COMMON_GLOBAL_TEMPLATE_NAME, "1.0.0", null));
+ serviceTemplate.setDescription("TOSCA Global Types");
+ serviceTemplate.setData_types(createGlobalDataTypes());
+ serviceTemplate.setGroup_types(createGroupTypes());
+ serviceTemplate.setPolicy_types(createPolicyTypes());
+ serviceTemplate.setRelationship_types(createRelationTypes());
+ serviceTemplate.setCapability_types(createCapabilityTypes());
+ serviceTemplate.setImports(createImportList());
+ return serviceTemplate;
+ }
+
+ private static Map<String, CapabilityType> createCapabilityTypes() {
+ Map<String, CapabilityType> capabilityMap = new HashMap<>();
+ capabilityMap.put(ToscaCapabilityType.METRIC.getDisplayName(), createMetricCapabilityType());
+ capabilityMap
+ .put(ToscaCapabilityType.METRIC_CEILOMETER.getDisplayName(), createMetricCeilometerType());
+ capabilityMap.put(ToscaCapabilityType.METRIC_SNMP_TRAP.getDisplayName(), createMetricSnmpType(
+ "A node type that includes the Metric capability"
+ + " indicates that it can be monitored using snmp trap."));
+ capabilityMap.put(ToscaCapabilityType.METRIC_SNMP_POLLING.getDisplayName(),
+ createMetricSnmpType(
+ "A node type that includes the Metric capability indicates"
+ + " that it can be monitored using snmp polling."));
+ return capabilityMap;
+ }
+
+
+ private static CapabilityType createMetricSnmpType(String description) {
+ CapabilityType capabilityType = new CapabilityType();
+ capabilityType.setDerived_from(ToscaCapabilityType.METRIC.getDisplayName());
+ capabilityType.setDescription(description);
+ capabilityType.setProperties(createCapabilityMetricSnmpProperties());
+
+ return capabilityType;
+ }
+
+
+ private static Map<String, PropertyDefinition> createCapabilityMetricSnmpProperties() {
+ Map<String, PropertyDefinition> propertyDefinitionMap = new HashMap<>();
+ propertyDefinitionMap.put("oid", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Object Id of the metric",
+ true, null, null, null, null));
+ return propertyDefinitionMap;
+ }
+
+ private static CapabilityType createMetricCeilometerType() {
+ CapabilityType capabilityType = new CapabilityType();
+ capabilityType.setDerived_from(ToscaCapabilityType.METRIC.getDisplayName());
+ capabilityType.setDescription(
+ "A node type that includes the Metric capability"
+ + " indicates that it can be monitored using ceilometer.");
+ capabilityType.setProperties(createCapabilityMetricCeilometerProperties());
+ return capabilityType;
+ }
+
+
+ private static Map<String, PropertyDefinition> createCapabilityMetricCeilometerProperties() {
+ Map<String, PropertyDefinition> propertyDefinitionMap = new HashMap<>();
+ propertyDefinitionMap.put(Constants.NAME_PROPERTY_NAME, DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Ceilometer metric type name to monitor. (The name ceilometer is using)", true, null,
+ null, null, null));
+ return propertyDefinitionMap;
+ }
+
+ private static Map<String, Import> createImportList() {
+ Map<String, Import> importsMap = new HashMap<>();
+ importsMap.put(ToscaConstants.NATIVE_TYPES_SERVICE_TEMPLATE_NAME, GlobalTypesUtil
+ .createServiceTemplateImport(ToscaConstants.NATIVE_TYPES_SERVICE_TEMPLATE_NAME));
+ return importsMap;
+ }
+
+ /**
+ * Create metric capability type capability type.
+ *
+ * @return the capability type
+ */
+ public static CapabilityType createMetricCapabilityType() {
+ CapabilityType capabilityType = new CapabilityType();
+ capabilityType.setDerived_from(ToscaCapabilityType.NFV_METRIC.getDisplayName());
+ capabilityType.setDescription(
+ "A node type that includes the Metric capability indicates that it can be monitored.");
+ capabilityType.setProperties(createCapabilityMetricProperties());
+ capabilityType.setAttributes(createCapabilityMetricAttributes());
+ return capabilityType;
+ }
+
+ private static Map<String, AttributeDefinition> createCapabilityMetricAttributes() {
+ Map<String, AttributeDefinition> attributeDefinitionMap = new HashMap<>();
+
+ attributeDefinitionMap.put("value", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(), "Runtime monitored value",
+ null, null, null));
+ return attributeDefinitionMap;
+ }
+
+ private static Map<String, PropertyDefinition> createCapabilityMetricProperties() {
+ Map<String, PropertyDefinition> propertyDefinitionMap = new HashMap<>();
+ propertyDefinitionMap.put("type", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.", true,
+ null, null, null, null));
+ propertyDefinitionMap.put("unit", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Unit of the metric value",
+ true, null, null, null, null));
+ propertyDefinitionMap.put("category", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Category of the metric, for an example, compute, disk, network, storage and etc.",
+ false, null, null, null, null));
+ propertyDefinitionMap.put(Constants.DESCRIPTION_PROPERTY_NAME, DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Description of the metric",
+ false, null, null, null, null));
+ return propertyDefinitionMap;
+ }
+
+ private static Map<String, RelationshipType> createRelationTypes() {
+ Map<String, RelationshipType> globalRelationshipTypes = new HashMap<>();
+ globalRelationshipTypes.put(ToscaRelationshipType.ATTACHES_TO.getDisplayName(),
+ createAttachesToRelationshipType());
+ return globalRelationshipTypes;
+ }
+
+ private static RelationshipType createAttachesToRelationshipType() {
+ RelationshipType attachesToRelationType = new RelationshipType();
+ attachesToRelationType.setDerived_from(ToscaRelationshipType.ROOT.getDisplayName());
+ attachesToRelationType.setDescription("This type represents an attachment relationship");
+ return attachesToRelationType;
+ }
+
+ private static Map<String, PolicyType> createPolicyTypes() {
+ Map<String, PolicyType> globalPolicyTypes = new HashMap<>();
+ globalPolicyTypes
+ .put(ToscaPolicyType.PLACEMENT_ANTILOCATE.getDisplayName(), createAntilocatePolicyType());
+ globalPolicyTypes
+ .put(ToscaPolicyType.PLACEMENT_COLOCATE.getDisplayName(), createColocatePolicyType());
+ globalPolicyTypes.put(ToscaPolicyType.PLACEMENT_VALET_AFFINITY.getDisplayName(),
+ createValetAffinityPolicyType());
+ globalPolicyTypes.put(ToscaPolicyType.PLACEMENT_VALET_DIVERSITY.getDisplayName(),
+ createValetDiversityPolicyType());
+ globalPolicyTypes.put(ToscaPolicyType.PLACEMENT_VALET_EXCLUSIVITY.getDisplayName(),
+ createValetExclusivityPolicyType());
+ return globalPolicyTypes;
+ }
+
+ private static PolicyType createValetDiversityPolicyType() {
+ PolicyType policyType = new PolicyType();
+ policyType.setDerived_from(ToscaPolicyType.PLACEMENT.getDisplayName());
+ policyType.setDescription("Valet Diversity");
+ policyType.setProperties(new HashMap<>());
+ policyType.getProperties().put("level", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "diversity", false,
+ DataModelUtil.createValidValuesConstraintsList("host", "rack"), null, null, "host"));
+
+ return policyType;
+ }
+
+ private static PolicyType createValetExclusivityPolicyType() {
+ PolicyType policyType = new PolicyType();
+ policyType.setDerived_from(ToscaPolicyType.PLACEMENT.getDisplayName());
+ policyType.setDescription("Valet Exclusivity");
+ policyType.setProperties(addNamePropertyToPolicyType());
+ policyType.setProperties(new HashMap<>());
+ policyType.getProperties().put("level", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "exclusivity", false,
+ DataModelUtil.createValidValuesConstraintsList("host", "rack"), null, null, "host"));
+ return policyType;
+ }
+
+ private static PolicyType createValetAffinityPolicyType() {
+ PolicyType policyType = new PolicyType();
+ policyType.setDerived_from(ToscaPolicyType.PLACEMENT.getDisplayName());
+ policyType.setDescription("Valet Affinity");
+ policyType.setProperties(new HashMap<>());
+ policyType.getProperties().put("level", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "affinity", false,
+ DataModelUtil.createValidValuesConstraintsList("host", "rack"), null, null, "host"));
+
+ return policyType;
+ }
+
+
+ private static PolicyType createColocatePolicyType() {
+ PolicyType policyType = new PolicyType();
+ policyType.setDerived_from(ToscaPolicyType.PLACEMENT.getDisplayName());
+ policyType.setDescription("Keep associated nodes (groups of nodes) based upon affinity value");
+ policyType.setProperties(addNamePropertyToPolicyType());
+ policyType.getProperties().put("affinity", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "affinity", true,
+ DataModelUtil.createValidValuesConstraintsList("host", "region", "compute"), null, null,
+ null));
+
+ return policyType;
+ }
+
+ private static PolicyType createAntilocatePolicyType() {
+ PolicyType policyType = new PolicyType();
+ policyType.setDerived_from(ToscaPolicyType.PLACEMENT.getDisplayName());
+ policyType.setDescription("My placement policy for separation based upon container type value");
+ policyType.setProperties(addNamePropertyToPolicyType());
+ policyType.getProperties().put("container_type", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "container type", false,
+ DataModelUtil.createValidValuesConstraintsList("host", "region", "compute"), null, null,
+ null));
+ return policyType;
+ }
+
+ private static Map<String, PropertyDefinition> addNamePropertyToPolicyType() {
+ Map<String, PropertyDefinition> policyTypeProperties = new HashMap<>();
+ policyTypeProperties.put(Constants.NAME_PROPERTY_NAME, DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "The name of the policy",
+ false, null, null, null, null));
+ return policyTypeProperties;
+ }
+
+ private static Map<String, GroupType> createGroupTypes() {
+ Map<String, GroupType> globalGroupTypes = new HashMap<>();
+ globalGroupTypes.put(ToscaGroupType.HEAT_STACK.getDisplayName(), createHeatStackGroupType());
+ return globalGroupTypes;
+ }
+
+ private static GroupType createHeatStackGroupType() {
+ GroupType heatStackGroupType = new GroupType();
+ heatStackGroupType.setDerived_from(ToscaGroupType.ROOT.getDisplayName());
+ heatStackGroupType
+ .setDescription("Grouped all heat resources which are in the same heat stack");
+ heatStackGroupType.setProperties(createHeatStackGroupProperties());
+
+ return heatStackGroupType;
+ }
+
+ private static Map<String, PropertyDefinition> createHeatStackGroupProperties() {
+ Map<String, PropertyDefinition> propertiesDef = new HashMap<>();
+ propertiesDef.put("heat_file", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Heat file which associate to this group/heat stack", true, null, null, null, null));
+ propertiesDef.put(Constants.DESCRIPTION_PROPERTY_NAME, DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Heat file description",
+ false, null, null, null, null));
+ return propertiesDef;
+ }
+
+
+ /**
+ * Create common service template import import.
+ *
+ * @return the import
+ */
+ public static Import createCommonServiceTemplateImport() {
+ Import commonServiceTemplateImport = new Import();
+ commonServiceTemplateImport
+ .setFile(ToscaUtil.getServiceTemplateFileName(Constants.COMMON_GLOBAL_TEMPLATE_NAME));
+ return commonServiceTemplateImport;
+ }
+
+ private static Map<String, DataType> createGlobalDataTypes() {
+ Map<String, DataType> globalDataTypes = new HashMap<>();
+ globalDataTypes.put(ToscaDataType.NETWORK_ALLOCATION_POOL.getDisplayName(),
+ createAllocationPoolDataType());
+ globalDataTypes
+ .put(ToscaDataType.NETWORK_HOST_ROUTE.getDisplayName(), createHostRouteDataType());
+ globalDataTypes.put(ToscaDataType.NEUTRON_SUBNET.getDisplayName(), createSubnetDataType());
+ globalDataTypes
+ .put(ToscaDataType.NETWORK_ADDRESS_PAIR.getDisplayName(), createAddressPairDataType());
+ globalDataTypes.put(ToscaDataType.CONTRAIL_STATIC_ROUTE.getDisplayName(),
+ createContrailStaticRouteDataType());
+ globalDataTypes.put(ToscaDataType.CONTRAIL_ADDRESS_PAIR.getDisplayName(),
+ createContrailAddressPairDataType());
+ return globalDataTypes;
+ }
+
+ private static DataType createContrailStaticRouteDataType() {
+ DataType dataType = new DataType();
+ dataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ dataType.setDescription("static route");
+ Map<String, PropertyDefinition> prop = new HashMap<>();
+
+ prop.put("prefix", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Route prefix", false, null,
+ null, null, null));
+ prop.put("next_hop", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Next hop", false, null,
+ null, null, null));
+ prop.put("next_hop_type", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Next hop type", false,
+ null, null, null, null));
+
+ dataType.setProperties(prop);
+ return dataType;
+ }
+
+ private static DataType createContrailAddressPairDataType() {
+ DataType dataType = new DataType();
+ dataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ dataType.setDescription("Address Pair");
+ Map<String, PropertyDefinition> prop = new HashMap<>();
+
+ prop.put("prefix", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "IP address prefix", false,
+ null, null, null, null));
+ prop.put("mac_address", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Mac address", false, null,
+ null, null, null));
+ prop.put("address_mode", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Address mode active-active or active-standy", false,
+ DataModelUtil.createValidValuesConstraintsList("active-active", "active-standby"), null,
+ null, null));
+
+ dataType.setProperties(prop);
+ return dataType;
+ }
+
+ private static DataType createAddressPairDataType() {
+ DataType addressPairDataType = new DataType();
+ addressPairDataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ addressPairDataType.setDescription("MAC/IP address pairs");
+ Map<String, PropertyDefinition> addressPairProp = new HashMap<>();
+
+ addressPairProp.put("ip_address", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "IP address", false, null,
+ null, null, null));
+ addressPairProp.put("mac_address", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "MAC address", false, null,
+ null, null, null));
+ addressPairDataType.setProperties(addressPairProp);
+
+ return addressPairDataType;
+ }
+
+ private static DataType createHostRouteDataType() {
+ DataType hostRouteDataType = new DataType();
+ hostRouteDataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ hostRouteDataType.setDescription("Host route info for the subnet");
+
+ Map<String, PropertyDefinition> hostRoutePoolProp = new HashMap<>();
+ hostRoutePoolProp.put("destination", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "The destination for static route", false, null, null, null, null));
+ hostRoutePoolProp.put("nexthop", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "The next hop for the destination", false, null, null, null, null));
+ hostRouteDataType.setProperties(hostRoutePoolProp);
+
+ return hostRouteDataType;
+ }
+
+ private static DataType createAllocationPoolDataType() {
+ DataType allocationPoolDataType = new DataType();
+ allocationPoolDataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ allocationPoolDataType.setDescription("The start and end addresses for the allocation pool");
+
+ Map<String, PropertyDefinition> allocationPoolProp = new HashMap<>();
+ allocationPoolProp.put("start", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Start address for the allocation pool", false, null, null, null, null));
+ allocationPoolProp.put("end", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "End address for the allocation pool", false, null, null, null, null));
+ allocationPoolDataType.setProperties(allocationPoolProp);
+
+ return allocationPoolDataType;
+ }
+
+ private static DataType createSubnetDataType() {
+ DataType subnetDataType = new DataType();
+ subnetDataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ subnetDataType.setDescription(
+ "A subnet represents an IP address block that can "
+ + "be used for assigning IP addresses to virtual instances");
+
+ Map<String, PropertyDefinition> subnetProp = new HashMap<>();
+ subnetProp.put("allocation_pools", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(),
+ "The start and end addresses for the allocation pools", false, null, null, DataModelUtil
+ .createEntrySchema(ToscaDataType.NETWORK_ALLOCATION_POOL.getDisplayName(), null,
+ null), null));
+ subnetProp.put("cidr", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "The CIDR", false, null,
+ null, null, null));
+ subnetProp.put("dns_nameservers", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(),
+ "A specified set of DNS name servers to be used", false, null, null,
+ DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ new ArrayList<String>()));
+ subnetProp.put("enable_dhcp", DataModelUtil
+ .createPropertyDefinition(PropertyType.BOOLEAN.getDisplayName(),
+ "Set to true if DHCP is enabled and false if DHCP is disabled", false, null, null, null,
+ true));
+ subnetProp.put("gateway_ip", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "The gateway IP address",
+ false, null, null, null, null));
+ subnetProp.put("host_routes", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(), "The gateway IP address",
+ false, null, null, DataModelUtil
+ .createEntrySchema(ToscaDataType.NETWORK_HOST_ROUTE.getDisplayName(), null, null),
+ null));
+ subnetProp.put("ip_version", DataModelUtil
+ .createPropertyDefinition(PropertyType.INTEGER.getDisplayName(), "The gateway IP address",
+ false, DataModelUtil.createValidValuesConstraintsList("4", "6"), null, null, 4));
+ subnetProp.put("ipv6_address_mode", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "IPv6 address mode", false,
+ DataModelUtil
+ .createValidValuesConstraintsList("dhcpv6-stateful", "dhcpv6-stateless", "slaac"),
+ null, null, null));
+ subnetProp.put("ipv6_ra_mode", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "IPv6 RA (Router Advertisement) mode", false, DataModelUtil
+ .createValidValuesConstraintsList("dhcpv6-stateful", "dhcpv6-stateless", "slaac"),
+ null, null, null));
+ subnetProp.put(Constants.NAME_PROPERTY_NAME, DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "The name of the subnet",
+ false, null, null, null, null));
+ subnetProp.put("prefixlen", DataModelUtil
+ .createPropertyDefinition(PropertyType.INTEGER.getDisplayName(),
+ "Prefix length for subnet allocation from subnet pool", false,
+ createPrefixlenConstraint(), null, null, null));
+ subnetProp.put("subnetpool", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "The name or ID of the subnet pool", false, null, null, null, null));
+ subnetProp.put("tenant_id", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "The ID of the tenant who owns the network", false, null, null, null, null));
+ subnetProp.put("value_specs", DataModelUtil
+ .createPropertyDefinition(PropertyType.MAP.getDisplayName(),
+ "Extra parameters to include in the request", false, null, null,
+ DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ new HashMap<>()));
+ subnetDataType.setProperties(subnetProp);
+
+ return subnetDataType;
+ }
+
+ private static List<Constraint> createPrefixlenConstraint() {
+ List<Constraint> constraints = new ArrayList<>();
+ Constraint constraint = new Constraint();
+ constraint.setGreater_or_equal(0);
+ constraints.add(constraint);
+ return constraints;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailAbstractSubstituteGlobalType.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailAbstractSubstituteGlobalType.java
new file mode 100644
index 0000000000..7b0b810b61
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailAbstractSubstituteGlobalType.java
@@ -0,0 +1,196 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.globaltypes;
+
+import org.openecomp.sdc.tosca.datatypes.ToscaDataType;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.DataType;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.translator.services.heattotosca.Constants;
+
+import java.util.HashMap;
+import java.util.Map;
+
+
+public class ContrailAbstractSubstituteGlobalType {
+
+ /**
+ * Create service template service template.
+ *
+ * @return the service template
+ */
+ public static ServiceTemplate createServiceTemplate() {
+ ServiceTemplate serviceTemplate = new ServiceTemplate();
+ serviceTemplate.setTosca_definitions_version(ToscaConstants.TOSCA_DEFINITIONS_VERSION);
+ serviceTemplate.setMetadata(
+ DataModelUtil.createMetadata(Constants
+ .CONTRAIL_ABSTRACT_SUBSTITUTE_TEMPLATE_NAME, "1.0.0", null));
+ serviceTemplate.setImports(GlobalTypesUtil.createCommonImportList());
+ serviceTemplate.setDescription("Contrail Abstract Substitute Global Types");
+ serviceTemplate.setData_types(createGlobalDataTypes());
+ serviceTemplate.setNode_types(createGlobalNodeTypes());
+ return serviceTemplate;
+ }
+
+ private static Map<String, NodeType> createGlobalNodeTypes() {
+ Map<String, NodeType> globalNodeTypes = new HashMap<>();
+ globalNodeTypes.put(ToscaNodeType.CONTRAIL_ABSTRACT_SUBSTITUTE.getDisplayName(),
+ createContrailAbstractSubstituteNodeType());
+ return globalNodeTypes;
+ }
+
+ private static NodeType createContrailAbstractSubstituteNodeType() {
+ NodeType nodeType = new NodeType();
+ nodeType.setDerived_from(ToscaNodeType.ABSTRACT_SUBSTITUTE.getDisplayName());
+ nodeType.setProperties(createContrailAbstractSubstituteProperties());
+ nodeType.setAttributes(createContrailAbstractSubstituteAttributes());
+
+ return nodeType;
+ }
+
+ private static Map<String, AttributeDefinition> createContrailAbstractSubstituteAttributes() {
+ Map<String, AttributeDefinition> attributesDefMap = new HashMap<>();
+ attributesDefMap.put("service_instance_name", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(),
+ "The name of the service instance", null, null, null));
+ attributesDefMap.put("fq_name", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(),
+ "The FQ name of the service instance", null, null, null));
+ attributesDefMap.put("status", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(),
+ "Status of the service instance", null, null, null));
+ attributesDefMap.put("service_template_name", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(),
+ "Service Template of the Service Instance", null, null, null));
+ attributesDefMap.put("virtual_machines", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(),
+ "Service VMs for the Service Instance", null, null, null));
+ attributesDefMap.put("active_vms", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(),
+ "Number of service VMs active for this Service Instance", null, null, null));
+ attributesDefMap.put("tenant_id", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(),
+ "Tenant id of the Service Instance", null, null, null));
+ attributesDefMap.put("show", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(), "All attributes", null,
+ null, null));
+
+ return attributesDefMap;
+ }
+
+ private static Map<String, PropertyDefinition> createContrailAbstractSubstituteProperties() {
+ Map<String, PropertyDefinition> props = new HashMap<>();
+ props.put("service_template_name", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Service template name",
+ false, null, null, null, null));
+ props.put("service_mode", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Service mode", true,
+ DataModelUtil
+ .createValidValuesConstraintsList("transparent", "in-network", "in-network-nat"),
+ null, null, null));
+ props.put("service_type", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Service type", true,
+ DataModelUtil.createValidValuesConstraintsList("firewall", "analyzer", "source-nat",
+ "loadbalancer"), null, null, null));
+ props.put("image_name", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Image name", true, null,
+ null, null, null));
+ props.put("flavor", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "flavor", false, null, null,
+ null, null));
+ props.put("service_interface_type_list", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(), "List of interface types",
+ true, null, null, DataModelUtil
+ .createEntrySchema(PropertyType.STRING.getDisplayName(), null, DataModelUtil
+ .createValidValuesConstraintsList("management", "left", "right", "other")),
+ null));
+ props.put("shared_ip_list", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(), "Shared ips enabled", false,
+ null, null,
+ DataModelUtil.createEntrySchema(PropertyType.BOOLEAN.getDisplayName(), null, null),
+ null));
+ props.put("static_routes_list", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(), "Static routes enabled",
+ false, null, null,
+ DataModelUtil.createEntrySchema(PropertyType.BOOLEAN.getDisplayName(), null, null),
+ null));
+ props.put("ordered_interfaces", DataModelUtil
+ .createPropertyDefinition(PropertyType.BOOLEAN.getDisplayName(),
+ "Indicates if service interface are ordered", false, null, null, null, false));
+ props.put("availability_zone_enable", DataModelUtil
+ .createPropertyDefinition(PropertyType.BOOLEAN.getDisplayName(),
+ "Indicates availability zone is enabled", false, null, null, null, false));
+ props.put("availability_zone", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Availability zone to create servers in", false, null, null, null, null));
+ props.put("service_instance_name", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Service instance name",
+ true, null, null, null, null));
+ props.put("interface_list", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(), "List of interfaces", false,
+ null, null, DataModelUtil
+ .createEntrySchema(ToscaDataType.CONTRAIL_INTERFACE_DATA.getDisplayName(), null,
+ null), null));
+ return props;
+ }
+
+
+ private static Map<String, DataType> createGlobalDataTypes() {
+ Map<String, DataType> globalDataTypes = new HashMap<>();
+ globalDataTypes
+ .put(ToscaDataType.CONTRAIL_INTERFACE_DATA.getDisplayName(), createInterfaceDataType());
+ return globalDataTypes;
+ }
+
+ private static DataType createInterfaceDataType() {
+ DataType dataType = new DataType();
+ dataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ dataType.setDescription("Interface Data");
+ Map<String, PropertyDefinition> propertyDefMap = new HashMap<>();
+ propertyDefMap.put("virtual_network", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Virtual Network for this interface", true, null, null, null, null));
+ propertyDefMap.put("ip_address", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "IP for this interface",
+ false, null, null, null, null));
+ propertyDefMap.put("static_routes", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(),
+ "An ordered list of static routes to be added to this interface", false, null, null,
+ DataModelUtil
+ .createEntrySchema(ToscaDataType.CONTRAIL_STATIC_ROUTE.getDisplayName(), null,
+ null), null));
+ propertyDefMap.put("allowed_address_pairs", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(),
+ "List of allowed address pair for this interface", false, null, null, DataModelUtil
+ .createEntrySchema(ToscaDataType.CONTRAIL_ADDRESS_PAIR.getDisplayName(), null,
+ null), null));
+ dataType.setProperties(propertyDefMap);
+ return dataType;
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailComputeGlobalType.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailComputeGlobalType.java
new file mode 100644
index 0000000000..50faec0c69
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailComputeGlobalType.java
@@ -0,0 +1,128 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.globaltypes;
+
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.translator.services.heattotosca.Constants;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class ContrailComputeGlobalType {
+
+ /**
+ * Create service template service template.
+ *
+ * @return the service template
+ */
+ public static ServiceTemplate createServiceTemplate() {
+ ServiceTemplate serviceTemplate = new ServiceTemplate();
+ serviceTemplate.setTosca_definitions_version(ToscaConstants.TOSCA_DEFINITIONS_VERSION);
+ serviceTemplate.setMetadata(
+ DataModelUtil.createMetadata(Constants.CONTRAIL_COMPUTE_TEMPLATE_NAME, "1.0.0", null));
+ serviceTemplate.setDescription("Contrail Compute TOSCA Global Types");
+ serviceTemplate.setImports(GlobalTypesUtil.createCommonImportList());
+ serviceTemplate.setNode_types(createGlobalNodeTypes());
+ return serviceTemplate;
+ }
+
+
+ private static Map<String, NodeType> createGlobalNodeTypes() {
+ Map<String, NodeType> globalNodeTypes = new HashMap<>();
+ globalNodeTypes
+ .put(ToscaNodeType.CONTRAIL_COMPUTE.getDisplayName(), createContrailComputeNodeType());
+ return globalNodeTypes;
+ }
+
+ private static NodeType createContrailComputeNodeType() {
+ NodeType nodeType = new NodeType();
+ nodeType.setDerived_from(ToscaNodeType.COMPUTE.getDisplayName());
+ nodeType.setProperties(createContrailComputeProperties());
+ nodeType.setAttributes(createContrailComputeAttributes());
+ return nodeType;
+ }
+
+
+ private static Map<String, PropertyDefinition> createContrailComputeProperties() {
+ Map<String, PropertyDefinition> propertyDefMap = new HashMap<>();
+ propertyDefMap.put("service_instance_name", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Service instance name",
+ true, null, null, null, null));
+ propertyDefMap.put("service_template_name", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Service template name",
+ false, null, null, null, null));
+ propertyDefMap.put("image_name", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Image name", true, null,
+ null, null, null));
+ propertyDefMap.put("service_mode", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Service mode", true,
+ DataModelUtil
+ .createValidValuesConstraintsList("transparent", "in-network", "in-network-nat"),
+ null, null, null));
+ propertyDefMap.put("service_type", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Service type", true,
+ DataModelUtil.createValidValuesConstraintsList("firewall", "analyzer", "source-nat",
+ "loadbalancer"), null, null, null));
+ propertyDefMap.put("image_name", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Image name", true, null,
+ null, null, null));
+ propertyDefMap.put("flavor", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "flavor", false, null, null,
+ null, null));
+ propertyDefMap.put("availability_zone_enable", DataModelUtil
+ .createPropertyDefinition(PropertyType.BOOLEAN.getDisplayName(),
+ "Indicates availability zone is enabled", false, null, null, null, false));
+ propertyDefMap.put("availability_zone", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Availability zone to create servers in", false, null, null, null, null));
+ return propertyDefMap;
+ }
+
+ private static Map<String, AttributeDefinition> createContrailComputeAttributes() {
+ Map<String, AttributeDefinition> attributesDefMap = new HashMap<>();
+ attributesDefMap.put("fq_name", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(), "fq_name", null, null,
+ null));
+ attributesDefMap.put("status", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(), "status of the compute",
+ null, null, null));
+ attributesDefMap.put("virtual_machines", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(), "VMs of this compute",
+ null, null, null));
+ attributesDefMap.put("active_vms", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(), "Number of active VMs",
+ null, null, null));
+ attributesDefMap.put("tenant_id", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(), "Tenant id of the VM",
+ null, null, null));
+ attributesDefMap.put("show", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(), "All attributes", null,
+ null, null));
+ return attributesDefMap;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailNetworkRuleGlobalType.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailNetworkRuleGlobalType.java
new file mode 100644
index 0000000000..0081ad5a78
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailNetworkRuleGlobalType.java
@@ -0,0 +1,227 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.globaltypes;
+
+import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
+import org.openecomp.sdc.tosca.datatypes.ToscaDataType;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
+import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.DataType;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.translator.services.heattotosca.Constants;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class ContrailNetworkRuleGlobalType {
+ /**
+ * Create service template service template.
+ *
+ * @return the service template
+ */
+ public static ServiceTemplate createServiceTemplate() {
+ ServiceTemplate contrailNetworkRuleServiceTemplate = new ServiceTemplate();
+ contrailNetworkRuleServiceTemplate
+ .setTosca_definitions_version(ToscaConstants.TOSCA_DEFINITIONS_VERSION);
+ contrailNetworkRuleServiceTemplate.setMetadata(
+ DataModelUtil.createMetadata(Constants.CONTRAIL_NETWORK_RULE_TEMPLATE_NAME, "1.0.0", null));
+ contrailNetworkRuleServiceTemplate.setImports(GlobalTypesUtil.createCommonImportList());
+ contrailNetworkRuleServiceTemplate.setDescription("Contrail Network Rule Global Types");
+ contrailNetworkRuleServiceTemplate.setData_types(createGlobalDataTypes());
+ contrailNetworkRuleServiceTemplate.setNode_types(createGlobalNodeTypes());
+ return contrailNetworkRuleServiceTemplate;
+ }
+
+
+ private static Map<String, DataType> createGlobalDataTypes() {
+ Map<String, DataType> globalDataTypes = new HashMap<>();
+ globalDataTypes.put(ToscaDataType.CONTRAIL_NETWORK_RULE_PORT_PAIRS.getDisplayName(),
+ createRulePortPairsDataType());
+ globalDataTypes.put(ToscaDataType.CONTRAIL_NETWORK_RULE.getDisplayName(), createRuleDataType());
+ globalDataTypes.put(ToscaDataType.CONTRAIL_NETWORK_RULE_VIRTUAL_NETWORK.getDisplayName(),
+ createRuleVirtualNetworkDataType());
+ globalDataTypes.put(ToscaDataType.CONTRAIL_NETWORK_RULE_LIST.getDisplayName(),
+ createPolicyRulesListDataType());
+ return globalDataTypes;
+ }
+
+ private static DataType createRuleDataType() {
+ DataType dataType = new DataType();
+ dataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ dataType.setDescription("policy rule");
+ Map<String, PropertyDefinition> properties = new HashMap<>();
+ properties.put("direction", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Direction", false, null,
+ null, null, null));
+ properties.put("protocol", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Protocol", false, null,
+ null, null, null));
+ properties.put("src_ports", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(), "Source ports", false, null,
+ null, DataModelUtil
+ .createEntrySchema(ToscaDataType.CONTRAIL_NETWORK_RULE_PORT_PAIRS.getDisplayName(),
+ null, null), null));
+ properties.put("dst_ports", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(), "Destination ports", false,
+ null, null, DataModelUtil
+ .createEntrySchema(ToscaDataType.CONTRAIL_NETWORK_RULE_PORT_PAIRS.getDisplayName(),
+ null, null), null));
+ properties.put("dst_addresses", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(), "Destination addresses",
+ false, null, null, DataModelUtil.createEntrySchema(
+ ToscaDataType.CONTRAIL_NETWORK_RULE_VIRTUAL_NETWORK.getDisplayName(), null, null),
+ null));
+ properties.put("apply_service", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Service to apply", false,
+ null, null, null, null));
+ properties.put("src_addresses", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(), "Source addresses", false,
+ null, null, DataModelUtil.createEntrySchema(
+ ToscaDataType.CONTRAIL_NETWORK_RULE_VIRTUAL_NETWORK.getDisplayName(), null, null),
+ null));
+
+ dataType.setProperties(properties);
+ return dataType;
+
+ }
+
+
+ private static DataType createRuleVirtualNetworkDataType() {
+ DataType dataType = new DataType();
+ dataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ dataType.setDescription("source and destination addresses");
+ Map<String, PropertyDefinition> properties = new HashMap<>();
+
+ properties.put("virtual_network", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Virtual network", false,
+ null, null, null, null));
+
+ dataType.setProperties(properties);
+ return dataType;
+ }
+
+ private static DataType createPolicyRulesListDataType() {
+ DataType dataType = new DataType();
+ dataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ dataType.setDescription("list of policy rules");
+ Map<String, PropertyDefinition> properties = new HashMap<>();
+
+ properties.put("policy_rule", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(), "Contrail network rule",
+ false, null, null, DataModelUtil
+ .createEntrySchema(ToscaDataType.CONTRAIL_NETWORK_RULE.getDisplayName(), null,
+ null), null));
+
+ dataType.setProperties(properties);
+ return dataType;
+ }
+
+
+ private static DataType createRulePortPairsDataType() {
+ DataType dataType = new DataType();
+ dataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ dataType.setDescription("source and destination port pairs");
+ Map<String, PropertyDefinition> properties = new HashMap<>();
+
+ properties.put("start_port", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Start port", false, null,
+ null, null, null));
+ properties.put("end_port", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "End port", false, null,
+ null, null, null));
+
+ dataType.setProperties(properties);
+ return dataType;
+ }
+
+ private static Map<String, NodeType> createGlobalNodeTypes() {
+ Map<String, NodeType> globalNodeTypes = new HashMap<>();
+ globalNodeTypes.put(ToscaNodeType.CONTRAIL_NETWORK_RULE.getDisplayName(),
+ createContrailNetworkRuleNodeType());
+ return globalNodeTypes;
+ }
+
+ private static NodeType createContrailNetworkRuleNodeType() {
+ NodeType contrailNetworkRuleNodeType = new NodeType();
+ contrailNetworkRuleNodeType.setDerived_from(ToscaNodeType.ROOT.getDisplayName());
+ contrailNetworkRuleNodeType.setProperties(createContrailNetworkRuleProperties());
+ contrailNetworkRuleNodeType.setAttributes(createContrailNetworkRuleAttributes());
+ contrailNetworkRuleNodeType.setRequirements(createContrailNetworkRuleRequirements());
+ return contrailNetworkRuleNodeType;
+ }
+
+
+ private static Map<String, PropertyDefinition> createContrailNetworkRuleProperties() {
+ Map<String, PropertyDefinition> contrailNetworkRulePropertyDefMap = new HashMap<>();
+ contrailNetworkRulePropertyDefMap.put(Constants.NAME_PROPERTY_NAME, DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "A symbolic name for this contrail network rule", false, null, null, null, null));
+ contrailNetworkRulePropertyDefMap.put("entries", DataModelUtil
+ .createPropertyDefinition(ToscaDataType.CONTRAIL_NETWORK_RULE_LIST.getDisplayName(),
+ "A symbolic name for this contrail network rule", false, null, null, null, null));
+
+ return contrailNetworkRulePropertyDefMap;
+ }
+
+
+ private static Map<String, AttributeDefinition> createContrailNetworkRuleAttributes() {
+ Map<String, AttributeDefinition> contrailNetworkRuleAttributesDefMap = new HashMap<>();
+ contrailNetworkRuleAttributesDefMap.put("fq_name", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(), "fq_name", null, null,
+ null));
+ contrailNetworkRuleAttributesDefMap.put("tenant_id", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(), "tenant_id", null, null,
+ null));
+ contrailNetworkRuleAttributesDefMap.put("rules", DataModelUtil
+ .createAttributeDefinition(PropertyType.LIST.getDisplayName(), "List of rules", null,
+ DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ null));
+ contrailNetworkRuleAttributesDefMap.put("show", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(), "All attributes.", null,
+ null, null));
+
+ return contrailNetworkRuleAttributesDefMap;
+ }
+
+ private static List<Map<String, RequirementDefinition>> createContrailNetworkRuleRequirements() {
+ final List<Map<String, RequirementDefinition>> requirements = new ArrayList<>();
+ final Map<String, RequirementDefinition>
+ contrailNetworkRuleRequirementsDefMap = new HashMap<>();
+ RequirementDefinition req = new RequirementDefinition();
+ req.setCapability(ToscaCapabilityType.ATTACHMENT.getDisplayName());
+ req.setOccurrences(new Object[]{0, ToscaConstants.UNBOUNDED});
+ req.setNode(ToscaNodeType.NETWORK.getDisplayName());
+ req.setRelationship(ToscaRelationshipType.ATTACHES_TO.getDisplayName());
+ contrailNetworkRuleRequirementsDefMap.put("network", req);
+ requirements.add(contrailNetworkRuleRequirementsDefMap);
+
+ return requirements;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailPortGlobalType.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailPortGlobalType.java
new file mode 100644
index 0000000000..1590372813
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailPortGlobalType.java
@@ -0,0 +1,107 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.globaltypes;
+
+import org.openecomp.sdc.tosca.datatypes.ToscaDataType;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.translator.services.heattotosca.Constants;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class ContrailPortGlobalType {
+ /**
+ * Create service template service template.
+ *
+ * @return the service template
+ */
+ public static ServiceTemplate createServiceTemplate() {
+ ServiceTemplate serviceTemplate = new ServiceTemplate();
+ serviceTemplate.setTosca_definitions_version(ToscaConstants.TOSCA_DEFINITIONS_VERSION);
+ serviceTemplate.setMetadata(
+ DataModelUtil.createMetadata(Constants.CONTRAIL_PORT_TEMPLATE_NAME, "1.0.0", null));
+ serviceTemplate.setImports(GlobalTypesUtil.createCommonImportList());
+ serviceTemplate.setDescription("Contrail Port TOSCA Global Types");
+ serviceTemplate.setNode_types(createGlobalNodeTypes());
+ return serviceTemplate;
+ }
+
+ private static Map<String, NodeType> createGlobalNodeTypes() {
+ Map<String, NodeType> globalNodeTypes = new HashMap<>();
+ globalNodeTypes.put(ToscaNodeType.CONTRAIL_PORT.getDisplayName(), createContrailPortNodeType());
+ return globalNodeTypes;
+ }
+
+ private static NodeType createContrailPortNodeType() {
+ NodeType nodeType = new NodeType();
+ nodeType.setDerived_from(ToscaNodeType.NETWORK_PORT.getDisplayName());
+ nodeType.setProperties(createContrailPortProperties());
+ nodeType.setAttributes(createContrailPortAttributes());
+ return nodeType;
+ }
+
+ private static Map<String, PropertyDefinition> createContrailPortProperties() {
+ Map<String, PropertyDefinition> propertyDefMap = new HashMap<>();
+ propertyDefMap.put("interface_type", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Interface type", true,
+ DataModelUtil.createValidValuesConstraintsList("management", "left", "right", "other"),
+ null, null, null));
+ propertyDefMap.put("shared_ip", DataModelUtil
+ .createPropertyDefinition(PropertyType.BOOLEAN.getDisplayName(), "Shared ip enabled", false,
+ null, null, null, false));
+ propertyDefMap.put("static_route", DataModelUtil
+ .createPropertyDefinition(PropertyType.BOOLEAN.getDisplayName(), "Static route enabled",
+ false, null, null, null, false));
+ propertyDefMap.put("virtual_network", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Virtual Network for this interface", true, null, null, null, null));
+ propertyDefMap.put("static_routes", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(),
+ "An ordered list of static routes to be added to this interface", false, null, null,
+ DataModelUtil
+ .createEntrySchema(ToscaDataType.CONTRAIL_STATIC_ROUTE.getDisplayName(), null,
+ null), null));
+ propertyDefMap.put("allowed_address_pairs", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(),
+ "List of allowed address pair for this interface", false, null, null, DataModelUtil
+ .createEntrySchema(ToscaDataType.CONTRAIL_ADDRESS_PAIR.getDisplayName(), null,
+ null), null));
+ propertyDefMap.put("ip_address", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "IP for this interface",
+ false, null, null, null, null));
+ return propertyDefMap;
+ }
+
+ private static Map<String, AttributeDefinition> createContrailPortAttributes() {
+ Map<String, AttributeDefinition> attributesDefMap = new HashMap<>();
+ attributesDefMap.put("fq_name", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(), "fq_name", null, null,
+ null));
+ return attributesDefMap;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailV2NetworkRuleGlobalType.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailV2NetworkRuleGlobalType.java
new file mode 100644
index 0000000000..4141aa7f0a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailV2NetworkRuleGlobalType.java
@@ -0,0 +1,274 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.globaltypes;
+
+import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
+import org.openecomp.sdc.tosca.datatypes.ToscaDataType;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
+import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.DataType;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.translator.services.heattotosca.Constants;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class ContrailV2NetworkRuleGlobalType {
+ /**
+ * Create service template service template.
+ *
+ * @return the service template
+ */
+ public static ServiceTemplate createServiceTemplate() {
+ ServiceTemplate contrailNetworkRuleServiceTemplate = new ServiceTemplate();
+ contrailNetworkRuleServiceTemplate
+ .setTosca_definitions_version(ToscaConstants.TOSCA_DEFINITIONS_VERSION);
+ contrailNetworkRuleServiceTemplate.setMetadata(
+ DataModelUtil.createMetadata(Constants
+ .CONTRAILV2_NETWORK_RULE_TEMPLATE_NAME, "1.0.0", null));
+ contrailNetworkRuleServiceTemplate.setImports(GlobalTypesUtil.createCommonImportList());
+ contrailNetworkRuleServiceTemplate.setDescription("Contrail V2 Network Rule Global Types");
+ contrailNetworkRuleServiceTemplate.setData_types(createGlobalDataTypes());
+ contrailNetworkRuleServiceTemplate.setNode_types(createGlobalNodeTypes());
+ return contrailNetworkRuleServiceTemplate;
+ }
+
+
+ private static Map<String, DataType> createGlobalDataTypes() {
+ Map<String, DataType> globalDataTypes = new HashMap<>();
+ globalDataTypes.put(ToscaDataType.CONTRAILV2_NETWORK_RULE_SRC_PORT_PAIRS.getDisplayName(),
+ createRuleSrcPortPairsDataType());
+ globalDataTypes.put(ToscaDataType.CONTRAILV2_NETWORK_RULE_DST_PORT_PAIRS.getDisplayName(),
+ createRuleDstPortPairsDataType());
+ globalDataTypes
+ .put(ToscaDataType.CONTRAILV2_NETWORK_RULE.getDisplayName(), createRuleDataType());
+ globalDataTypes.put(ToscaDataType.CONTRAILV2_NETWORK_RULE_DST_VIRTUAL_NETWORK.getDisplayName(),
+ createRuleDstVirtualNetworkDataType());
+ globalDataTypes.put(ToscaDataType.CONTRAILV2_NETWORK_RULE_SRC_VIRTUAL_NETWORK.getDisplayName(),
+ createRuleSrcVirtualNetworkDataType());
+ globalDataTypes.put(ToscaDataType.CONTRAILV2_NETWORK_RULE_LIST.getDisplayName(),
+ createPolicyRulesListDataType());
+ globalDataTypes.put(ToscaDataType.CONTRAILV2_NETWORK_RULE_ACTION_LIST.getDisplayName(),
+ createRuleActionListDataType());
+ return globalDataTypes;
+ }
+
+ private static DataType createRuleDataType() {
+ DataType dataType = new DataType();
+ dataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ dataType.setDescription("policy rule");
+ Map<String, PropertyDefinition> properties = new HashMap<>();
+ properties.put("network_policy_entries_policy_rule_direction", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Direction", false, null,
+ null, null, null));
+ properties.put("network_policy_entries_policy_rule_protocol", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Protocol", false, null,
+ null, null, null));
+ properties.put("network_policy_entries_policy_rule_src_ports", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(), "Source ports", false, null,
+ null, DataModelUtil.createEntrySchema(
+ ToscaDataType.CONTRAILV2_NETWORK_RULE_SRC_PORT_PAIRS.getDisplayName(), null, null),
+ null));
+ properties.put("network_policy_entries_policy_rule_dst_ports", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(), "Destination ports", false,
+ null, null, DataModelUtil.createEntrySchema(
+ ToscaDataType.CONTRAILV2_NETWORK_RULE_DST_PORT_PAIRS.getDisplayName(), null, null),
+ null));
+ properties.put("network_policy_entries_policy_rule_dst_addresses", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(), "Destination addresses",
+ false, null, null, DataModelUtil.createEntrySchema(
+ ToscaDataType.CONTRAILV2_NETWORK_RULE_DST_VIRTUAL_NETWORK.getDisplayName(), null,
+ null), null));
+ properties.put("network_policy_entries_policy_rule_src_addresses", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(), "Source addresses", false,
+ null, null, DataModelUtil.createEntrySchema(
+ ToscaDataType.CONTRAILV2_NETWORK_RULE_SRC_VIRTUAL_NETWORK.getDisplayName(), null,
+ null), null));
+ properties.put("network_policy_entries_policy_rule_action_list", DataModelUtil
+ .createPropertyDefinition(
+ ToscaDataType.CONTRAILV2_NETWORK_RULE_ACTION_LIST.getDisplayName(), "Action list",
+ false, null, null, null, null));
+
+ dataType.setProperties(properties);
+ return dataType;
+
+ }
+
+
+ private static DataType createRuleDstVirtualNetworkDataType() {
+ DataType dataType = new DataType();
+ dataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ dataType.setDescription("destination addresses");
+ Map<String, PropertyDefinition> properties = new HashMap<>();
+
+ properties.put("network_policy_entries_policy_rule_dst_addresses_virtual_network", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Destination addresses Virtual network", false, null, null, null, null));
+
+ dataType.setProperties(properties);
+ return dataType;
+ }
+
+ private static DataType createRuleSrcVirtualNetworkDataType() {
+ DataType dataType = new DataType();
+ dataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ dataType.setDescription("source addresses");
+ Map<String, PropertyDefinition> properties = new HashMap<>();
+
+ properties.put("network_policy_entries_policy_rule_src_addresses_virtual_network", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Source addresses Virtual network", false, null, null, null, null));
+
+ dataType.setProperties(properties);
+ return dataType;
+ }
+
+ private static DataType createPolicyRulesListDataType() {
+ DataType dataType = new DataType();
+ dataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ dataType.setDescription("list of policy rules");
+ Map<String, PropertyDefinition> properties = new HashMap<>();
+
+ properties.put("network_policy_entries_policy_rule", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(), "Contrail network rule",
+ false, null, null, DataModelUtil
+ .createEntrySchema(ToscaDataType.CONTRAILV2_NETWORK_RULE.getDisplayName(), null,
+ null), null));
+
+ dataType.setProperties(properties);
+ return dataType;
+ }
+
+ private static DataType createRuleActionListDataType() {
+ DataType dataType = new DataType();
+ dataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ dataType.setDescription("Action List");
+ Map<String, PropertyDefinition> properties = new HashMap<>();
+
+ properties.put("network_policy_entries_policy_rule_action_list_simple_action", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Simple Action", false,
+ null, null, null, null));
+ properties.put("network_policy_entries_policy_rule_action_list_apply_service", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(), "Apply Service", false, null,
+ null, DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ null));
+
+ dataType.setProperties(properties);
+ return dataType;
+ }
+
+ private static DataType createRuleDstPortPairsDataType() {
+ DataType dataType = new DataType();
+ dataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ dataType.setDescription("destination port pairs");
+ Map<String, PropertyDefinition> properties = new HashMap<>();
+
+ properties.put("network_policy_entries_policy_rule_dst_ports_start_port", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Start port", false, null,
+ null, null, null));
+ properties.put("network_policy_entries_policy_rule_dst_ports_end_port", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "End port", false, null,
+ null, null, null));
+
+ dataType.setProperties(properties);
+ return dataType;
+ }
+
+ private static DataType createRuleSrcPortPairsDataType() {
+ DataType dataType = new DataType();
+ dataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ dataType.setDescription("source port pairs");
+ Map<String, PropertyDefinition> properties = new HashMap<>();
+
+ properties.put("network_policy_entries_policy_rule_src_ports_start_port", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Start port", false, null,
+ null, null, null));
+ properties.put("network_policy_entries_policy_rule_src_ports_end_port", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "End port", false, null,
+ null, null, null));
+
+ dataType.setProperties(properties);
+ return dataType;
+ }
+
+ private static Map<String, NodeType> createGlobalNodeTypes() {
+ Map<String, NodeType> globalNodeTypes = new HashMap<>();
+ globalNodeTypes.put(ToscaNodeType.CONTRAILV2_NETWORK_RULE.getDisplayName(),
+ createContrailV2NetworkRuleNodeType());
+ return globalNodeTypes;
+ }
+
+ private static NodeType createContrailV2NetworkRuleNodeType() {
+ NodeType contrailNetworkRuleNodeType = new NodeType();
+ contrailNetworkRuleNodeType.setDerived_from(ToscaNodeType.ROOT.getDisplayName());
+ contrailNetworkRuleNodeType.setProperties(createContrailNetworkRuleProperties());
+ contrailNetworkRuleNodeType.setAttributes(createContrailNetworkRuleAttributes());
+ contrailNetworkRuleNodeType.setRequirements(createContrailNetworkRuleRequirements());
+ return contrailNetworkRuleNodeType;
+ }
+
+
+ private static Map<String, PropertyDefinition> createContrailNetworkRuleProperties() {
+ Map<String, PropertyDefinition> contrailNetworkRulePropertyDefMap = new HashMap<>();
+ contrailNetworkRulePropertyDefMap.put(Constants.NAME_PROPERTY_NAME, DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "A symbolic name for this contrail v2 network rule", false, null, null, null, null));
+ contrailNetworkRulePropertyDefMap.put("network_policy_entries", DataModelUtil
+ .createPropertyDefinition(ToscaDataType.CONTRAILV2_NETWORK_RULE_LIST.getDisplayName(),
+ "A symbolic name for this contrail v2 network rule", false, null, null, null, null));
+
+ return contrailNetworkRulePropertyDefMap;
+ }
+
+
+ private static Map<String, AttributeDefinition> createContrailNetworkRuleAttributes() {
+ Map<String, AttributeDefinition> contrailNetworkRuleAttributesDefMap = new HashMap<>();
+ contrailNetworkRuleAttributesDefMap.put("fq_name", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(), "fq_name", null, null,
+ null));
+
+ return contrailNetworkRuleAttributesDefMap;
+ }
+
+ private static List<Map<String, RequirementDefinition>> createContrailNetworkRuleRequirements() {
+ final List<Map<String, RequirementDefinition>> requirements = new ArrayList<>();
+ final Map<String, RequirementDefinition>
+ contrailNetworkRuleRequirementsDefMap = new HashMap<>();
+ RequirementDefinition req = new RequirementDefinition();
+ req.setCapability(ToscaCapabilityType.ATTACHMENT.getDisplayName());
+ req.setOccurrences(new Object[]{0, ToscaConstants.UNBOUNDED});
+ req.setNode(ToscaNodeType.NETWORK.getDisplayName());
+ req.setRelationship(ToscaRelationshipType.ATTACHES_TO.getDisplayName());
+ contrailNetworkRuleRequirementsDefMap.put("network", req);
+ requirements.add(contrailNetworkRuleRequirementsDefMap);
+
+ return requirements;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailV2VirtualMachineInterfaceGlobalType.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailV2VirtualMachineInterfaceGlobalType.java
new file mode 100644
index 0000000000..75501cb8d4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailV2VirtualMachineInterfaceGlobalType.java
@@ -0,0 +1,136 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.globaltypes;
+
+import org.openecomp.sdc.tosca.datatypes.ToscaDataType;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.DataType;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.translator.services.heattotosca.Constants;
+
+import java.util.HashMap;
+import java.util.Map;
+
+class ContrailV2VirtualMachineInterfaceGlobalType {
+ private ContrailV2VirtualMachineInterfaceGlobalType() {
+ }
+
+ public static ServiceTemplate createServiceTemplate() {
+ ServiceTemplate contrailVirtualMachineInterface = new ServiceTemplate();
+ contrailVirtualMachineInterface
+ .setTosca_definitions_version(ToscaConstants.TOSCA_DEFINITIONS_VERSION);
+ contrailVirtualMachineInterface.setMetadata(DataModelUtil
+ .createMetadata(Constants.CONTRAILV2_VIRTUAL_MACHINE_INTERFACE_TEMPLATE_NAME, "1.0.0",
+ null));
+ contrailVirtualMachineInterface.setImports(GlobalTypesUtil.createCommonImportList());
+ contrailVirtualMachineInterface
+ .setDescription("Contrail Virtual Machine Interface TOSCA Global Types");
+ contrailVirtualMachineInterface.setNode_types(createGlobalNodeTypes());
+ contrailVirtualMachineInterface.setData_types(createGlobalDataTypes());
+ return contrailVirtualMachineInterface;
+ }
+
+ private static Map<String, DataType> createGlobalDataTypes() {
+ Map<String, DataType> globalDataTypes = new HashMap<>();
+ globalDataTypes
+ .put(ToscaDataType.CONTRAILV2_VIRTUAL_MACHINE_INTERFACE_PROPERTIES.getDisplayName(),
+ createVmiPropertiesDataType());
+ return globalDataTypes;
+ }
+
+ private static DataType createVmiPropertiesDataType() {
+ DataType dataType = new DataType();
+ dataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ dataType.setDescription("Virtual Machine Interface Properties.");
+ Map<String, PropertyDefinition> properties = new HashMap<>();
+
+ properties.put("virtual_machine_interface_properties_service_interface_type", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Service Interface Type.",
+ false, null, null, null, null));
+ dataType.setProperties(properties);
+ return dataType;
+ }
+
+ private static Map<String, NodeType> createGlobalNodeTypes() {
+ Map<String, NodeType> globalNodeTypes = new HashMap<>();
+ globalNodeTypes.put(ToscaNodeType.CONTRAILV2_VIRTUAL_MACHINE_INTERFACE.getDisplayName(),
+ createVmiNodeType());
+ return globalNodeTypes;
+ }
+
+ private static NodeType createVmiNodeType() {
+ NodeType nodeType = new NodeType();
+ nodeType.setDerived_from(ToscaNodeType.NETWORK_PORT.getDisplayName());
+ nodeType.setProperties(createVmiProperties());
+ nodeType.setAttributes(createVmiAttributes());
+ return nodeType;
+ }
+
+ private static Map<String, AttributeDefinition> createVmiAttributes() {
+ Map<String, AttributeDefinition> vmiAttributesDefMap = new HashMap<>();
+ vmiAttributesDefMap.put("fq_name", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(),
+ "The FQ name of the Virtual Network.", null, null, null));
+ vmiAttributesDefMap.put("show", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(), "All attributes.", null,
+ null, null));
+ return vmiAttributesDefMap;
+ }
+
+ private static Map<String, PropertyDefinition> createVmiProperties() {
+ Map<String, PropertyDefinition> virtualMachineInterfacePropertyDefMap = new HashMap<>();
+ virtualMachineInterfacePropertyDefMap.put(Constants.NAME_PROPERTY_NAME, DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Virtual Machine Interface name", false, null, null, null, null));
+ virtualMachineInterfacePropertyDefMap.put("virtual_machine_intefrace_mac_addresses",
+ DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(), "List of mac addresses.",
+ false, null, null,
+ DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ null));
+ virtualMachineInterfacePropertyDefMap.put("virtual_network_refs", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(), "List of virtual networks.",
+ false, null, null,
+ DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ null));
+ virtualMachineInterfacePropertyDefMap.put("port_tuple_refs", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(), "List of port tuples.", false,
+ null, null,
+ DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ null));
+ virtualMachineInterfacePropertyDefMap.put("security_group_refs", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(), "List of security groups.",
+ false, null, null,
+ DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ null));
+ virtualMachineInterfacePropertyDefMap.put("virtual_machine_interface_properties", DataModelUtil
+ .createPropertyDefinition(
+ ToscaDataType.CONTRAILV2_VIRTUAL_MACHINE_INTERFACE_PROPERTIES.getDisplayName(),
+ "virtual machine interface properties.", false, null, null, null, null));
+ return virtualMachineInterfacePropertyDefMap;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailV2VirtualNetworkGlobalType.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailV2VirtualNetworkGlobalType.java
new file mode 100644
index 0000000000..728b9f6149
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailV2VirtualNetworkGlobalType.java
@@ -0,0 +1,239 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.globaltypes;
+
+import org.openecomp.sdc.tosca.datatypes.ToscaDataType;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.DataType;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.translator.services.heattotosca.Constants;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class ContrailV2VirtualNetworkGlobalType {
+
+ /**
+ * Create service template service template.
+ *
+ * @return the service template
+ */
+ public static ServiceTemplate createServiceTemplate() {
+ ServiceTemplate contrailVirtualNetworkServiceTemplate = new ServiceTemplate();
+ contrailVirtualNetworkServiceTemplate
+ .setTosca_definitions_version(ToscaConstants.TOSCA_DEFINITIONS_VERSION);
+ contrailVirtualNetworkServiceTemplate.setMetadata(DataModelUtil
+ .createMetadata(Constants.CONTRAILV2_VIRTUAL_NETWORK_TEMPLATE_NAME, "1.0.0", null));
+ contrailVirtualNetworkServiceTemplate
+ .setDescription("Contrail V2 Virtual Network Global Types");
+ contrailVirtualNetworkServiceTemplate.setImports(GlobalTypesUtil.createCommonImportList());
+ contrailVirtualNetworkServiceTemplate.setNode_types(createGlobalNodeTypes());
+ contrailVirtualNetworkServiceTemplate.setData_types(createGlobalDataTypes());
+ return contrailVirtualNetworkServiceTemplate;
+ }
+
+ private static Map<String, NodeType> createGlobalNodeTypes() {
+ Map<String, NodeType> globalNodeTypes = new HashMap<>();
+ globalNodeTypes.put(ToscaNodeType.CONTRAILV2_VIRTUAL_NETWORK.getDisplayName(),
+ createContrailVirtualNetworkNodeType());
+ return globalNodeTypes;
+ }
+
+ private static NodeType createContrailVirtualNetworkNodeType() {
+ NodeType contrailV2VirtualNetworkNodeType = new NodeType();
+ contrailV2VirtualNetworkNodeType.setDerived_from(ToscaNodeType.NETWORK.getDisplayName());
+ contrailV2VirtualNetworkNodeType.setProperties(createContrailVirtualNetworkProperties());
+ contrailV2VirtualNetworkNodeType.setAttributes(createContrailVirtualNetworkAttributes());
+ contrailV2VirtualNetworkNodeType.setCapabilities(createContrailVirtualNetworkCapabilities());
+ return contrailV2VirtualNetworkNodeType;
+ }
+
+ private static Map<String, CapabilityDefinition> createContrailVirtualNetworkCapabilities() {
+ Map<String, CapabilityDefinition> capabilities = new HashMap<>();
+ capabilities.put("attachment", GlobalTypesUtil.createAttachmentCapability());
+ return capabilities;
+ }
+
+ private static Map<String, PropertyDefinition> createContrailVirtualNetworkProperties() {
+ Map<String, PropertyDefinition> contrailVirtualNetworkPropertyDefMap = new HashMap<>();
+ //contrailVirtualNetworkPropertyDefMap.put("name", DataModelUtil.
+ // createPropertyDefinition(PropertyType.STRING.getDisplayName()
+ // , "Name", false, null, null, null, null));
+ contrailVirtualNetworkPropertyDefMap.put("network_ipam_refs", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(), "IPAM references", false,
+ null, null,
+ DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ null));
+ contrailVirtualNetworkPropertyDefMap.put("network_ipam_refs_data", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(), "IPAM references Data", false,
+ null, null, DataModelUtil.createEntrySchema(
+ ToscaDataType.CONTRAILV2_VIRTUAL_NETWORK_IPAM_REF_DATA.getDisplayName(), null,
+ null), null));
+ contrailVirtualNetworkPropertyDefMap.put("network_policy_refs", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(), "Policy references", false,
+ null, null,
+ DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ null));
+ contrailVirtualNetworkPropertyDefMap.put("network_policy_refs_data", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(), "Policy references data",
+ false, null, null, DataModelUtil.createEntrySchema(
+ ToscaDataType.CONTRAILV2_VIRTUAL_NETWORK_POLICY_REF_DATA.getDisplayName(), null,
+ null), null));
+ contrailVirtualNetworkPropertyDefMap.put("subnets", DataModelUtil
+ .createPropertyDefinition(PropertyType.MAP.getDisplayName(), "Network related subnets",
+ false, null, null, DataModelUtil
+ .createEntrySchema(ToscaDataType.NEUTRON_SUBNET.getDisplayName(), null, null),
+ null));
+ return contrailVirtualNetworkPropertyDefMap;
+ }
+
+ private static Map<String, DataType> createGlobalDataTypes() {
+ Map<String, DataType> globalDataTypes = new HashMap<>();
+ globalDataTypes.put(ToscaDataType.CONTRAILV2_VIRTUAL_NETWORK_IPAM_REF_DATA.getDisplayName(),
+ createVirtualNetworkIpamRefDataDataType());
+ globalDataTypes.put(
+ ToscaDataType.CONTRAILV2_VIRTUAL_NETWORK_IPAM_REF_DATA_IPAM_SUBNET_LIST.getDisplayName(),
+ createVirtualNetworkIpamRefDataIpanSubnetListDataType());
+ globalDataTypes
+ .put(ToscaDataType.CONTRAILV2_VIRTUAL_NETWORK_IPAM_REF_DATA_IPAM_SUBNET.getDisplayName(),
+ createVirtualNetworkIpamRefDataIpanSubnetDataType());
+ globalDataTypes.put(ToscaDataType.CONTRAILV2_VIRTUAL_NETWORK_POLICY_REF_DATA.getDisplayName(),
+ createVirtualNetworkPolicyRefDataDataType());
+ globalDataTypes
+ .put(ToscaDataType.CONTRAILV2_VIRTUAL_NETWORK_POLICY_REF_DATA_SEQUENCE.getDisplayName(),
+ createVirtualNetworkPolicyRefSequenceDataDataType());
+ return globalDataTypes;
+ }
+
+ private static DataType createVirtualNetworkIpamRefDataDataType() {
+ DataType dataType = new DataType();
+ dataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ dataType.setDescription("Network Ipam Ref Data");
+ Map<String, PropertyDefinition> properties = new HashMap<>();
+
+ properties.put("network_ipam_refs_data_ipam_subnets", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(),
+ "Network ipam refs data ipam subnets", false, null, null, DataModelUtil
+ .createEntrySchema(
+ ToscaDataType.CONTRAILV2_VIRTUAL_NETWORK_IPAM_REF_DATA_IPAM_SUBNET_LIST
+ .getDisplayName(), null, null), null));
+ dataType.setProperties(properties);
+ return dataType;
+ }
+
+ private static DataType createVirtualNetworkIpamRefDataIpanSubnetListDataType() {
+ DataType dataType = new DataType();
+ dataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ dataType.setDescription("Network Ipam Ref Data Subnet List");
+ Map<String, PropertyDefinition> properties = new HashMap<>();
+
+ properties.put("network_ipam_refs_data_ipam_subnets_subnet", DataModelUtil
+ .createPropertyDefinition(
+ ToscaDataType.CONTRAILV2_VIRTUAL_NETWORK_IPAM_REF_DATA_IPAM_SUBNET.getDisplayName(),
+ "Network ipam refs data ipam subnets", false, null, null, null, null));
+ properties.put("network_ipam_refs_data_ipam_subnets_addr_from_start", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Network ipam refs data ipam subnets addr from start", false, null, null, null, null));
+
+ dataType.setProperties(properties);
+ return dataType;
+ }
+
+ private static DataType createVirtualNetworkIpamRefDataIpanSubnetDataType() {
+ DataType dataType = new DataType();
+ dataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ dataType.setDescription("Network Ipam Ref Data Subnet");
+ Map<String, PropertyDefinition> properties = new HashMap<>();
+
+ properties.put("network_ipam_refs_data_ipam_subnets_subnet_ip_prefix", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Network ipam refs data ipam subnets ip prefix", false, null, null, null, null));
+ properties.put("network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Network ipam refs data ipam subnets ip prefix len", false, null, null, null, null));
+ dataType.setProperties(properties);
+ return dataType;
+ }
+
+
+ private static DataType createVirtualNetworkPolicyRefDataDataType() {
+ DataType dataType = new DataType();
+ dataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ dataType.setDescription("network policy refs data");
+ Map<String, PropertyDefinition> properties = new HashMap<>();
+
+ properties.put("network_policy_refs_data_sequence", DataModelUtil.createPropertyDefinition(
+ ToscaDataType.CONTRAILV2_VIRTUAL_NETWORK_POLICY_REF_DATA_SEQUENCE.getDisplayName(),
+ "Network Policy ref data sequence", false, null, null, null, null));
+
+
+ dataType.setProperties(properties);
+ return dataType;
+ }
+
+
+ private static DataType createVirtualNetworkPolicyRefSequenceDataDataType() {
+ DataType dataType = new DataType();
+ dataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ dataType.setDescription("network policy refs data sequence");
+ Map<String, PropertyDefinition> properties = new HashMap<>();
+
+ properties.put("network_policy_refs_data_sequence_major", DataModelUtil
+ .createPropertyDefinition(PropertyType.INTEGER.getDisplayName(),
+ "Network Policy ref data sequence Major", false, null, null, null, null));
+ properties.put("network_policy_refs_data_sequence_minor", DataModelUtil
+ .createPropertyDefinition(PropertyType.INTEGER.getDisplayName(),
+ "Network Policy ref data sequence Minor", false, null, null, null, null));
+
+ dataType.setProperties(properties);
+ return dataType;
+ }
+
+ private static Map<String, AttributeDefinition> createContrailVirtualNetworkAttributes() {
+ Map<String, AttributeDefinition> contrailVirtualNetworkAttributesDefMap = new HashMap<>();
+ contrailVirtualNetworkAttributesDefMap.put("subnets_name", DataModelUtil
+ .createAttributeDefinition(PropertyType.LIST.getDisplayName(),
+ "Subnets name of this network", null,
+ DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ null));
+ contrailVirtualNetworkAttributesDefMap.put("subnets", DataModelUtil
+ .createAttributeDefinition(PropertyType.MAP.getDisplayName(), "Network related subnets",
+ null, DataModelUtil
+ .createEntrySchema(ToscaDataType.NEUTRON_SUBNET.getDisplayName(), null, null),
+ null));
+ contrailVirtualNetworkAttributesDefMap.put("subnets_show", DataModelUtil
+ .createAttributeDefinition(PropertyType.MAP.getDisplayName(),
+ "Detailed information about each subnet", null,
+ DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ null));
+ contrailVirtualNetworkAttributesDefMap.put("fq_name", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(), "fq_name", null, null,
+ null));
+ return contrailVirtualNetworkAttributesDefMap;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailVirtualNetworkGlobalType.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailVirtualNetworkGlobalType.java
new file mode 100644
index 0000000000..1014757a2c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/ContrailVirtualNetworkGlobalType.java
@@ -0,0 +1,134 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.globaltypes;
+
+import org.openecomp.sdc.tosca.datatypes.ToscaDataType;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.translator.services.heattotosca.Constants;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class ContrailVirtualNetworkGlobalType {
+
+ /**
+ * Create service template service template.
+ *
+ * @return the service template
+ */
+ public static ServiceTemplate createServiceTemplate() {
+ ServiceTemplate contrailVirtualNetworkServiceTemplate = new ServiceTemplate();
+ contrailVirtualNetworkServiceTemplate
+ .setTosca_definitions_version(ToscaConstants.TOSCA_DEFINITIONS_VERSION);
+ contrailVirtualNetworkServiceTemplate.setMetadata(DataModelUtil
+ .createMetadata(Constants.CONTRAIL_VIRTUAL_NETWORK_TEMPLATE_NAME, "1.0.0", null));
+ contrailVirtualNetworkServiceTemplate.setDescription("Contrail Virtual Network Global Types");
+ contrailVirtualNetworkServiceTemplate.setImports(GlobalTypesUtil.createCommonImportList());
+ contrailVirtualNetworkServiceTemplate.setNode_types(createGlobalNodeTypes());
+ return contrailVirtualNetworkServiceTemplate;
+ }
+
+ private static Map<String, NodeType> createGlobalNodeTypes() {
+ Map<String, NodeType> globalNodeTypes = new HashMap<>();
+ globalNodeTypes.put(ToscaNodeType.CONTRAIL_VIRTUAL_NETWORK.getDisplayName(),
+ createContrailVirtualNetworkNodeType());
+ return globalNodeTypes;
+ }
+
+ private static NodeType createContrailVirtualNetworkNodeType() {
+ NodeType contrailVirtualNetworkNodeType = new NodeType();
+ contrailVirtualNetworkNodeType.setDerived_from(ToscaNodeType.NETWORK.getDisplayName());
+ contrailVirtualNetworkNodeType.setProperties(createContrailVirtualNetworkProperties());
+ contrailVirtualNetworkNodeType.setAttributes(createContrailVirtualNetworkAttributes());
+ contrailVirtualNetworkNodeType.setCapabilities(createContrailVirtualNetworkCapabilities());
+ return contrailVirtualNetworkNodeType;
+ }
+
+ private static Map<String, CapabilityDefinition> createContrailVirtualNetworkCapabilities() {
+ Map<String, CapabilityDefinition> capabilities = new HashMap<>();
+ capabilities.put("attachment", GlobalTypesUtil.createAttachmentCapability());
+ return capabilities;
+ }
+
+ private static Map<String, PropertyDefinition> createContrailVirtualNetworkProperties() {
+ Map<String, PropertyDefinition> contrailVirtualNetworkPropertyDefMap = new HashMap<>();
+ contrailVirtualNetworkPropertyDefMap.put("shared", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Is virtual network shared",
+ false, null, null, null, null));
+ contrailVirtualNetworkPropertyDefMap.put("external", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Is virtual network external", false, null, null, null, null));
+ contrailVirtualNetworkPropertyDefMap.put("allow_transit", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Whether this network should be transitive.", false, null, null, null, null));
+ contrailVirtualNetworkPropertyDefMap.put("route_targets", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(),
+ "route targets associated with the virtual network", false, null, null,
+ DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ null));
+ contrailVirtualNetworkPropertyDefMap.put("forwarding_mode", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "forwarding mode of the virtual network", false, null, null, null, null));
+ contrailVirtualNetworkPropertyDefMap.put("flood_unknown_unicast", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "flood L2 packets on network", false, null, null, null, null));
+ contrailVirtualNetworkPropertyDefMap.put("subnets", DataModelUtil
+ .createPropertyDefinition(PropertyType.MAP.getDisplayName(), "Network related subnets",
+ false, null, null, DataModelUtil
+ .createEntrySchema(ToscaDataType.NEUTRON_SUBNET.getDisplayName(), null, null),
+ null));
+ return contrailVirtualNetworkPropertyDefMap;
+ }
+
+ private static Map<String, AttributeDefinition> createContrailVirtualNetworkAttributes() {
+ Map<String, AttributeDefinition> contrailVirtualNetworkAttributesDefMap = new HashMap<>();
+ contrailVirtualNetworkAttributesDefMap.put("subnets_name", DataModelUtil
+ .createAttributeDefinition(PropertyType.LIST.getDisplayName(),
+ "Subnets name of this network", null,
+ DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ null));
+ contrailVirtualNetworkAttributesDefMap.put("subnets", DataModelUtil
+ .createAttributeDefinition(PropertyType.MAP.getDisplayName(), "Network related subnets",
+ null, DataModelUtil
+ .createEntrySchema(ToscaDataType.NEUTRON_SUBNET.getDisplayName(), null, null),
+ null));
+ contrailVirtualNetworkAttributesDefMap.put("subnets_show", DataModelUtil
+ .createAttributeDefinition(PropertyType.MAP.getDisplayName(),
+ "Detailed information about each subnet", null,
+ DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ null));
+ contrailVirtualNetworkAttributesDefMap.put("fq_name", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(), "fq_name", null, null,
+ null));
+ contrailVirtualNetworkAttributesDefMap.put("show", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(), "All attributes.", null,
+ null, null));
+ return contrailVirtualNetworkAttributesDefMap;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/GlobalTypesGenerator.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/GlobalTypesGenerator.java
new file mode 100644
index 0000000000..a4ec764e14
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/GlobalTypesGenerator.java
@@ -0,0 +1,128 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.globaltypes;
+
+import org.openecomp.sdc.tosca.datatypes.model.Import;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.services.ToscaNativeTypesServiceTemplate;
+import org.openecomp.sdc.tosca.services.ToscaUtil;
+import org.openecomp.sdc.translator.services.heattotosca.Constants;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class GlobalTypesGenerator {
+
+ private GlobalTypesGenerator() {
+ }
+
+ /**
+ * Gets global types service template.
+ *
+ * @return the global types service template
+ */
+ public static Map<String, ServiceTemplate> getGlobalTypesServiceTemplate() {
+ Map<String, ServiceTemplate> serviceTemplates = new HashMap<>();
+
+ ToscaUtil.addServiceTemplateToMapWithKeyFileName(serviceTemplates,
+ CommonGlobalTypes.createServiceTemplate());
+ ToscaUtil.addServiceTemplateToMapWithKeyFileName(serviceTemplates,
+ NovaServerGlobalType.createServiceTemplate());
+ ToscaUtil.addServiceTemplateToMapWithKeyFileName(serviceTemplates,
+ CinderVolumeGlobalType.createServiceTemplate());
+ ToscaUtil.addServiceTemplateToMapWithKeyFileName(serviceTemplates,
+ ContrailVirtualNetworkGlobalType.createServiceTemplate());
+ ToscaUtil.addServiceTemplateToMapWithKeyFileName(serviceTemplates,
+ ContrailV2VirtualNetworkGlobalType.createServiceTemplate());
+ ToscaUtil.addServiceTemplateToMapWithKeyFileName(serviceTemplates,
+ ContrailV2VirtualMachineInterfaceGlobalType.createServiceTemplate());
+ ToscaUtil.addServiceTemplateToMapWithKeyFileName(serviceTemplates,
+ NeutronNetGlobalType.createServiceTemplate());
+ ToscaUtil.addServiceTemplateToMapWithKeyFileName(serviceTemplates,
+ NeutronPortGlobalType.createServiceTemplate());
+ ToscaUtil.addServiceTemplateToMapWithKeyFileName(serviceTemplates,
+ ContrailNetworkRuleGlobalType.createServiceTemplate());
+ ToscaUtil.addServiceTemplateToMapWithKeyFileName(serviceTemplates,
+ ContrailV2NetworkRuleGlobalType.createServiceTemplate());
+ ToscaUtil.addServiceTemplateToMapWithKeyFileName(serviceTemplates,
+ NeutronSecurityRulesGlobalType.createServiceTemplate());
+ ToscaUtil.addServiceTemplateToMapWithKeyFileName(serviceTemplates,
+ AbstractSubstituteGlobalType.createServiceTemplate());
+ ToscaUtil.addServiceTemplateToMapWithKeyFileName(serviceTemplates,
+ ToscaNativeTypesServiceTemplate.createServiceTemplate());
+ ToscaUtil.addServiceTemplateToMapWithKeyFileName(serviceTemplates,
+ ContrailComputeGlobalType.createServiceTemplate());
+ ToscaUtil.addServiceTemplateToMapWithKeyFileName(serviceTemplates,
+ ContrailPortGlobalType.createServiceTemplate());
+ ToscaUtil.addServiceTemplateToMapWithKeyFileName(serviceTemplates,
+ ContrailV2NetworkRuleGlobalType.createServiceTemplate());
+ ToscaUtil.addServiceTemplateToMapWithKeyFileName(serviceTemplates,
+ ContrailV2VirtualNetworkGlobalType.createServiceTemplate());
+ ToscaUtil.addServiceTemplateToMapWithKeyFileName(serviceTemplates,
+ ContrailAbstractSubstituteGlobalType.createServiceTemplate());
+ return serviceTemplates;
+ }
+
+ private static void addGlobalServiceTemplate(Map<String, ServiceTemplate> serviceTemplates,
+ ServiceTemplate commonServiceTemplate) {
+ serviceTemplates
+ .put(ToscaUtil.getServiceTemplateFileName(commonServiceTemplate), commonServiceTemplate);
+ }
+
+ /**
+ * Gets global types import list.
+ *
+ * @return the global types import list
+ */
+ public static Map<String, Import> getGlobalTypesImportList() {
+ Map<String, Import> globalImportMap = new HashMap<>();
+ globalImportMap.put(Constants.COMMON_GLOBAL_TEMPLATE_NAME,
+ GlobalTypesUtil.createServiceTemplateImport(Constants.COMMON_GLOBAL_TEMPLATE_NAME));
+ globalImportMap.put(Constants.NOVA_SERVER_TEMPLATE_NAME,
+ GlobalTypesUtil.createServiceTemplateImport(Constants.NOVA_SERVER_TEMPLATE_NAME));
+ globalImportMap.put(Constants.NEUTRON_PORT_TEMPLATE_NAME,
+ GlobalTypesUtil.createServiceTemplateImport(Constants.NEUTRON_PORT_TEMPLATE_NAME));
+ globalImportMap.put(Constants.NEUTRON_SECURITY_RULES_TEMPLATE_NAME, GlobalTypesUtil
+ .createServiceTemplateImport(Constants.NEUTRON_SECURITY_RULES_TEMPLATE_NAME));
+ globalImportMap.put(Constants.NEUTRON_NET_TEMPLATE_NAME,
+ GlobalTypesUtil.createServiceTemplateImport(Constants.NEUTRON_NET_TEMPLATE_NAME));
+ globalImportMap.put(Constants.CINDER_VOLUME_TEMPLATE_NAME,
+ GlobalTypesUtil.createServiceTemplateImport(Constants.CINDER_VOLUME_TEMPLATE_NAME));
+ globalImportMap.put(Constants.CONTRAIL_VIRTUAL_NETWORK_TEMPLATE_NAME, GlobalTypesUtil
+ .createServiceTemplateImport(Constants.CONTRAIL_VIRTUAL_NETWORK_TEMPLATE_NAME));
+ globalImportMap.put(Constants.CONTRAIL_NETWORK_RULE_TEMPLATE_NAME,
+ GlobalTypesUtil.createServiceTemplateImport(Constants.CONTRAIL_NETWORK_RULE_TEMPLATE_NAME));
+ globalImportMap.put(Constants.ABSTRACT_SUBSTITUTE_TEMPLATE_NAME,
+ GlobalTypesUtil.createServiceTemplateImport(Constants.ABSTRACT_SUBSTITUTE_TEMPLATE_NAME));
+ globalImportMap.put(Constants.CONTRAILV2_VIRTUAL_MACHINE_INTERFACE_TEMPLATE_NAME,
+ GlobalTypesUtil.createServiceTemplateImport(
+ Constants.CONTRAILV2_VIRTUAL_MACHINE_INTERFACE_TEMPLATE_NAME));
+ globalImportMap.put(Constants.CONTRAIL_COMPUTE_TEMPLATE_NAME,
+ GlobalTypesUtil.createServiceTemplateImport(Constants.CONTRAIL_COMPUTE_TEMPLATE_NAME));
+ globalImportMap.put(Constants.CONTRAIL_PORT_TEMPLATE_NAME,
+ GlobalTypesUtil.createServiceTemplateImport(Constants.CONTRAIL_PORT_TEMPLATE_NAME));
+ globalImportMap.put(Constants.CONTRAIL_ABSTRACT_SUBSTITUTE_TEMPLATE_NAME, GlobalTypesUtil
+ .createServiceTemplateImport(Constants.CONTRAIL_ABSTRACT_SUBSTITUTE_TEMPLATE_NAME));
+ return globalImportMap;
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/GlobalTypesUtil.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/GlobalTypesUtil.java
new file mode 100644
index 0000000000..9566dec581
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/GlobalTypesUtil.java
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.globaltypes;
+
+
+import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
+import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.Import;
+import org.openecomp.sdc.tosca.services.ToscaUtil;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class GlobalTypesUtil {
+
+
+ /**
+ * Create common import list map.
+ *
+ * @return the map
+ */
+ public static Map<String, Import> createCommonImportList() {
+ Map<String, Import> importsMap = new HashMap<>();
+ importsMap.put("common_definitions", CommonGlobalTypes.createCommonServiceTemplateImport());
+ return importsMap;
+ }
+
+ /**
+ * Create attachment capability capability definition.
+ *
+ * @return the capability definition
+ */
+ public static CapabilityDefinition createAttachmentCapability() {
+ CapabilityDefinition capability = new CapabilityDefinition();
+ capability.setType(ToscaCapabilityType.ATTACHMENT.getDisplayName());
+
+ return capability;
+ }
+
+ /**
+ * Create service template import import.
+ *
+ * @param serviceTemplateName the service template name
+ * @return the import
+ */
+ public static Import createServiceTemplateImport(String serviceTemplateName) {
+ Import serviceTemplateImport = new Import();
+ serviceTemplateImport.setFile(ToscaUtil.getServiceTemplateFileName(serviceTemplateName));
+ return serviceTemplateImport;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/NeutronNetGlobalType.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/NeutronNetGlobalType.java
new file mode 100644
index 0000000000..2532f87cf5
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/NeutronNetGlobalType.java
@@ -0,0 +1,143 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.globaltypes;
+
+import org.openecomp.sdc.tosca.datatypes.ToscaDataType;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.translator.services.heattotosca.Constants;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class NeutronNetGlobalType {
+ /**
+ * Create service template service template.
+ *
+ * @return the service template
+ */
+ public static ServiceTemplate createServiceTemplate() {
+ ServiceTemplate neutronNetServiceTemplate = new ServiceTemplate();
+ neutronNetServiceTemplate
+ .setTosca_definitions_version(ToscaConstants.TOSCA_DEFINITIONS_VERSION);
+ neutronNetServiceTemplate.setMetadata(
+ DataModelUtil.createMetadata(Constants.NEUTRON_NET_TEMPLATE_NAME, "1.0.0", null));
+ neutronNetServiceTemplate.setDescription("Neutron Network TOSCA Global Types");
+ neutronNetServiceTemplate.setImports(GlobalTypesUtil.createCommonImportList());
+ neutronNetServiceTemplate.setNode_types(createGlobalNodeTypes());
+ return neutronNetServiceTemplate;
+ }
+
+
+ private static Map<String, NodeType> createGlobalNodeTypes() {
+ Map<String, NodeType> globalNodeTypes = new HashMap<>();
+ globalNodeTypes.put(ToscaNodeType.NEUTRON_NET.getDisplayName(), createNeutronNetworkNodeType());
+ return globalNodeTypes;
+ }
+
+ private static NodeType createNeutronNetworkNodeType() {
+ NodeType neutronNetworkNode = new NodeType();
+ neutronNetworkNode.setDerived_from(ToscaNodeType.NETWORK.getDisplayName());
+ neutronNetworkNode.setProperties(createNeutronNetworkProperties());
+ neutronNetworkNode.setAttributes(createNeutronNetworkAttributes());
+ neutronNetworkNode.setCapabilities(createNeutronNetworkCapabilities());
+
+ return neutronNetworkNode;
+ }
+
+ private static Map<String, CapabilityDefinition> createNeutronNetworkCapabilities() {
+ Map<String, CapabilityDefinition> capabilities = new HashMap<>();
+ capabilities.put("attachment", GlobalTypesUtil.createAttachmentCapability());
+ return capabilities;
+ }
+
+ private static Map<String, PropertyDefinition> createNeutronNetworkProperties() {
+ Map<String, PropertyDefinition> neutronNetworkPropertyDefMap = new HashMap<>();
+ neutronNetworkPropertyDefMap.put("admin_state_up", DataModelUtil
+ .createPropertyDefinition(PropertyType.BOOLEAN.getDisplayName(),
+ "A boolean value specifying the administrative status of the network", false, null,
+ null, null, true));
+ neutronNetworkPropertyDefMap.put("dhcp_agent_ids", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(),
+ "The IDs of the DHCP agent to schedule the network", false, null, null,
+ DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ null));
+ neutronNetworkPropertyDefMap.put("port_security_enabled", DataModelUtil
+ .createPropertyDefinition(PropertyType.BOOLEAN.getDisplayName(),
+ "Flag to enable/disable port security on the network", false, null, null, null, null));
+ neutronNetworkPropertyDefMap.put("qos_policy", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "The name or ID of QoS policy to attach to this network", false, null, null, null,
+ null));
+ neutronNetworkPropertyDefMap.put("shared", DataModelUtil
+ .createPropertyDefinition(PropertyType.BOOLEAN.getDisplayName(),
+ "Whether this network should be shared across all tenants", false, null, null, null,
+ false));
+ neutronNetworkPropertyDefMap.put("tenant_id", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "The ID of the tenant which will own the network", false, null, null, null, null));
+ neutronNetworkPropertyDefMap.put("value_specs", DataModelUtil
+ .createPropertyDefinition(PropertyType.MAP.getDisplayName(),
+ "Extra parameters to include in the request", false, null, null,
+ DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ new HashMap<String, String>()));
+ neutronNetworkPropertyDefMap.put("subnets", DataModelUtil
+ .createPropertyDefinition(PropertyType.MAP.getDisplayName(), "Network related subnets",
+ false, null, null, DataModelUtil
+ .createEntrySchema(ToscaDataType.NEUTRON_SUBNET.getDisplayName(), null, null),
+ null));
+ return neutronNetworkPropertyDefMap;
+ }
+
+ private static Map<String, AttributeDefinition> createNeutronNetworkAttributes() {
+ Map<String, AttributeDefinition> neutronNetworkAttributesDefMap = new HashMap<>();
+ neutronNetworkAttributesDefMap.put("mtu", DataModelUtil
+ .createAttributeDefinition(PropertyType.SCALAR_UNIT_SIZE.getDisplayName(),
+ "The maximum transmission unit size(in bytes) for the network", null, null, null));
+ neutronNetworkAttributesDefMap.put("qos_policy_id", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(),
+ "The QoS policy ID attached to this network", null, null, null));
+ neutronNetworkAttributesDefMap.put("show", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(),
+ "Detailed information about resource", null, null, null));
+ neutronNetworkAttributesDefMap.put("status", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(),
+ "The status of the network", null, null, null));
+ neutronNetworkAttributesDefMap.put("subnets_name", DataModelUtil
+ .createAttributeDefinition(PropertyType.LIST.getDisplayName(),
+ "Subnets name of this network", null,
+ DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ null));
+ neutronNetworkAttributesDefMap.put("subnets", DataModelUtil
+ .createAttributeDefinition(PropertyType.MAP.getDisplayName(), "Network related subnets",
+ null, DataModelUtil
+ .createEntrySchema(ToscaDataType.NEUTRON_SUBNET.getDisplayName(), null, null),
+ null));
+ return neutronNetworkAttributesDefMap;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/NeutronPortGlobalType.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/NeutronPortGlobalType.java
new file mode 100644
index 0000000000..2106b9b3bc
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/NeutronPortGlobalType.java
@@ -0,0 +1,203 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.globaltypes;
+
+import org.openecomp.sdc.tosca.datatypes.ToscaDataType;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.Constraint;
+import org.openecomp.sdc.tosca.datatypes.model.DataType;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.translator.services.heattotosca.Constants;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class NeutronPortGlobalType {
+ /**
+ * Create service template service template.
+ *
+ * @return the service template
+ */
+ public static ServiceTemplate createServiceTemplate() {
+ ServiceTemplate neutronPortServiceTemplate = new ServiceTemplate();
+ neutronPortServiceTemplate
+ .setTosca_definitions_version(ToscaConstants.TOSCA_DEFINITIONS_VERSION);
+ neutronPortServiceTemplate.setMetadata(
+ DataModelUtil.createMetadata(Constants.NEUTRON_PORT_TEMPLATE_NAME, "1.0.0", null));
+ neutronPortServiceTemplate.setImports(GlobalTypesUtil.createCommonImportList());
+ neutronPortServiceTemplate.setDescription("Neutron Port TOSCA Global Types");
+ neutronPortServiceTemplate.setData_types(createGlobalDataTypes());
+ neutronPortServiceTemplate.setNode_types(createGlobalNodeTypes());
+ return neutronPortServiceTemplate;
+ }
+
+ private static Map<String, DataType> createGlobalDataTypes() {
+ Map<String, DataType> globalDataTypes = new HashMap<>();
+ globalDataTypes
+ .put(ToscaDataType.NEUTRON_PORT_FIXED_IPS.getDisplayName(), createFixedIpsDataType());
+ return globalDataTypes;
+ }
+
+ private static DataType createFixedIpsDataType() {
+ DataType dataType = new DataType();
+ dataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ dataType.setDescription("subnet/ip_address");
+ Map<String, PropertyDefinition> prop = new HashMap<>();
+
+ prop.put("subnet", DataModelUtil.createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Subnet in which to allocate the IP address for this port", false, null, null, null, null));
+ prop.put("ip_address", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "IP address desired in the subnet for this port", false, null, null, null, null));
+
+ dataType.setProperties(prop);
+ return dataType;
+ }
+
+ private static Map<String, NodeType> createGlobalNodeTypes() {
+ Map<String, NodeType> globalNodeTypes = new HashMap<>();
+ globalNodeTypes.put(ToscaNodeType.NEUTRON_PORT.getDisplayName(), createNeutronPortNodeType());
+ return globalNodeTypes;
+ }
+
+ private static NodeType createNeutronPortNodeType() {
+ NodeType nodeType = new NodeType();
+ nodeType.setDerived_from(ToscaNodeType.NETWORK_PORT.getDisplayName());
+ nodeType.setProperties(createNeutronPortProperties());
+ nodeType.setAttributes(createNeutronPortAttributes());
+ nodeType.setCapabilities(createNeutronPortCapabilities());
+ return nodeType;
+ }
+
+ private static Map<String, CapabilityDefinition> createNeutronPortCapabilities() {
+ Map<String, CapabilityDefinition> capabilities = new HashMap<>();
+ capabilities.put("attachment", GlobalTypesUtil.createAttachmentCapability());
+ return capabilities;
+ }
+
+ private static Map<String, PropertyDefinition> createNeutronPortProperties() {
+ Map<String, PropertyDefinition> neutronPortPropertyDefMap = new HashMap<>();
+ neutronPortPropertyDefMap.put("admin_state_up", DataModelUtil
+ .createPropertyDefinition(PropertyType.BOOLEAN.getDisplayName(),
+ "A boolean value specifying the administrative status of the network", false, null,
+ null, null, true));
+ neutronPortPropertyDefMap.put("allowed_address_pairs", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(),
+ "Additional MAC/IP address pairs allowed to pass through the port", false, null, null,
+ DataModelUtil
+ .createEntrySchema(ToscaDataType.NETWORK_ADDRESS_PAIR.getDisplayName(), null, null),
+ null));
+ neutronPortPropertyDefMap.put("binding:vnic_type", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "The vnic type to be bound on the neutron port", false, createBindingConstraint(), null,
+ null, null));
+ neutronPortPropertyDefMap.put("device_id", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Device ID of this port",
+ false, null, null, null, null));
+ neutronPortPropertyDefMap.put("device_owner", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Name of the network owning the port", false, null, null, null, null));
+ neutronPortPropertyDefMap.put("fixed_ips", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(), "Desired IPs for this port",
+ false, null, null, DataModelUtil
+ .createEntrySchema(ToscaDataType.NEUTRON_PORT_FIXED_IPS.getDisplayName(), null,
+ null), null));
+ neutronPortPropertyDefMap.put("mac_address", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "MAC address to give to this port", false, null, null, null, null));
+ neutronPortPropertyDefMap.put(Constants.NAME_PROPERTY_NAME, DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "A symbolic name for this port", false, null, null, null, null));
+ neutronPortPropertyDefMap.put("port_security_enabled", DataModelUtil
+ .createPropertyDefinition(PropertyType.BOOLEAN.getDisplayName(),
+ "Flag to enable/disable port security on the network", false, null, null, null, null));
+ neutronPortPropertyDefMap.put("qos_policy", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "The name or ID of QoS policy to attach to this network", false, null, null, null,
+ null));
+ neutronPortPropertyDefMap.put(Constants.SECURITY_GROUPS_PROPERTY_NAME, DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(),
+ "List of security group names or IDs", false, null, null,
+ DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ null));
+ neutronPortPropertyDefMap.put("value_specs", DataModelUtil
+ .createPropertyDefinition(PropertyType.MAP.getDisplayName(),
+ "Extra parameters to include in the request", false, null, null,
+ DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ new HashMap<String, String>()));
+ neutronPortPropertyDefMap.put("replacement_policy", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Policy on how to respond to a stack-update for this resource", false,
+ createReplacementPolicyConstrain(), null, null, "AUTO"));
+ neutronPortPropertyDefMap.put("network", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Network this port belongs to", false, null, null, null, null));
+ return neutronPortPropertyDefMap;
+ }
+
+ private static List<Constraint> createBindingConstraint() {
+ List<Constraint> constraints = new ArrayList<>();
+ Constraint validValues =
+ DataModelUtil.createValidValuesConstraint("macvtap", "direct", "normal");
+ constraints.add(validValues);
+ return constraints;
+ }
+
+ private static List<Constraint> createReplacementPolicyConstrain() {
+ List<Constraint> constraints = new ArrayList<>();
+ Constraint validValues = DataModelUtil.createValidValuesConstraint("REPLACE_ALWAYS", "AUTO");
+ constraints.add(validValues);
+ return constraints;
+ }
+
+ private static Map<String, AttributeDefinition> createNeutronPortAttributes() {
+ Map<String, AttributeDefinition> neutronPortAttributesDefMap = new HashMap<>();
+ neutronPortAttributesDefMap.put("network_id", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(),
+ "Unique identifier for the network owning the port", null, null, null));
+ neutronPortAttributesDefMap.put("qos_policy_id", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(),
+ "The QoS policy ID attached to this network", null, null, null));
+ neutronPortAttributesDefMap.put("show", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(),
+ "Detailed information about resource", null, null, null));
+ neutronPortAttributesDefMap.put("status", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(),
+ "The status of the network", null, null, null));
+ neutronPortAttributesDefMap.put("subnets", DataModelUtil
+ .createAttributeDefinition(PropertyType.LIST.getDisplayName(), "Subnets of this network",
+ null, DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ null));
+ neutronPortAttributesDefMap.put("tenant_id", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(), "Tenant owning the port",
+ null, null, null));
+ return neutronPortAttributesDefMap;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/NeutronSecurityRulesGlobalType.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/NeutronSecurityRulesGlobalType.java
new file mode 100644
index 0000000000..4c5b033e0e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/NeutronSecurityRulesGlobalType.java
@@ -0,0 +1,175 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.globaltypes;
+
+import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
+import org.openecomp.sdc.tosca.datatypes.ToscaDataType;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
+import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.Constraint;
+import org.openecomp.sdc.tosca.datatypes.model.DataType;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.translator.services.heattotosca.Constants;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class NeutronSecurityRulesGlobalType {
+ /**
+ * Create service template service template.
+ *
+ * @return the service template
+ */
+ public static ServiceTemplate createServiceTemplate() {
+ ServiceTemplate neutronSecurityRulesServiceTemplate = new ServiceTemplate();
+ neutronSecurityRulesServiceTemplate
+ .setTosca_definitions_version(ToscaConstants.TOSCA_DEFINITIONS_VERSION);
+ neutronSecurityRulesServiceTemplate.setMetadata(DataModelUtil
+ .createMetadata(Constants.NEUTRON_SECURITY_RULES_TEMPLATE_NAME, "1.0.0", null));
+ neutronSecurityRulesServiceTemplate.setImports(GlobalTypesUtil.createCommonImportList());
+ neutronSecurityRulesServiceTemplate.setDescription("Neutron Security Rules TOSCA Global Types");
+ neutronSecurityRulesServiceTemplate.setData_types(createGlobalDataTypes());
+ neutronSecurityRulesServiceTemplate.setNode_types(createGlobalNodeTypes());
+ return neutronSecurityRulesServiceTemplate;
+ }
+
+
+ private static Map<String, DataType> createGlobalDataTypes() {
+ Map<String, DataType> globalDataTypes = new HashMap<>();
+ globalDataTypes.put(ToscaDataType.NEUTRON_SECURITY_RULES_RULE.getDisplayName(),
+ createSecurityRulesDataType());
+ return globalDataTypes;
+ }
+
+ private static DataType createSecurityRulesDataType() {
+ DataType addressPairDataType = new DataType();
+ addressPairDataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ addressPairDataType.setDescription("Rules Pairs");
+ Map<String, PropertyDefinition> addressPairProp = new HashMap<>();
+
+ addressPairProp.put("direction", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "The direction in which the security group rule is applied", false,
+ DataModelUtil.createValidValuesConstraintsList("egress", "ingress"), null, null,
+ "ingress"));
+ addressPairProp.put("ethertype", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Ethertype of the traffic",
+ false, DataModelUtil.createValidValuesConstraintsList("IPv4", "IPv6"), null, null,
+ "IPv4"));
+ Constraint portRangeMaxConstraint = new Constraint();
+ portRangeMaxConstraint.setIn_range(new Integer[]{0, 65535});
+ addressPairProp.put("port_range_max", DataModelUtil
+ .createPropertyDefinition(PropertyType.INTEGER.getDisplayName(),
+ "The maximum port number in the range that is matched by the security group rule. ",
+ false, DataModelUtil.getConstrainList(portRangeMaxConstraint), null, null, null));
+ Constraint portRangeMinConstraint = new Constraint();
+ portRangeMinConstraint.setIn_range(new Integer[]{0, 65535});
+ addressPairProp.put("port_range_min", DataModelUtil
+ .createPropertyDefinition(PropertyType.INTEGER.getDisplayName(),
+ "The minimum port number in the range that is matched by the security group rule.",
+ false, DataModelUtil.getConstrainList(portRangeMinConstraint), null, null, null));
+ addressPairProp.put("protocol", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "The protocol that is matched by the security group rule", false,
+ DataModelUtil.createValidValuesConstraintsList("tcp", "udp", "icmp"), null, null,
+ null));
+ addressPairProp.put("remote_group_id", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "The remote group ID to be associated with this security group rule", false, null, null,
+ null, null));
+ addressPairProp.put("remote_ip_prefix", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "The remote IP prefix (CIDR) to be associated with this security group rule", false,
+ null, null, null, null));
+ addressPairProp.put("remote_mode", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Whether to specify a remote group or a remote IP prefix", false,
+ DataModelUtil.createValidValuesConstraintsList("remote_ip_prefix", "remote_group_id"),
+ null, null, "remote_ip_prefix"));
+ addressPairDataType.setProperties(addressPairProp);
+
+ return addressPairDataType;
+ }
+
+ private static Map<String, NodeType> createGlobalNodeTypes() {
+ Map<String, NodeType> globalNodeTypes = new HashMap<>();
+ globalNodeTypes.put(ToscaNodeType.NEUTRON_SECURITY_RULES.getDisplayName(),
+ createNeutronSecurityRulesNodeType());
+ return globalNodeTypes;
+ }
+
+ private static NodeType createNeutronSecurityRulesNodeType() {
+ NodeType novaServerNodeType = new NodeType();
+ novaServerNodeType.setDerived_from(ToscaNodeType.ROOT.getDisplayName());
+ novaServerNodeType.setProperties(createNeutronSecurityRulesProperties());
+ novaServerNodeType.setAttributes(createNeutronSecurityRulesAttributes());
+ novaServerNodeType.setRequirements(createNeutronSecurityRequirements());
+ return novaServerNodeType;
+ }
+
+ private static List<Map<String, RequirementDefinition>> createNeutronSecurityRequirements() {
+ final List<Map<String, RequirementDefinition>> requirements = new ArrayList<>();
+ final Map<String, RequirementDefinition> portRequirement = new HashMap<>();
+ RequirementDefinition requirementDefinition = new RequirementDefinition();
+ requirementDefinition.setCapability(ToscaCapabilityType.ATTACHMENT.getDisplayName());
+ requirementDefinition.setNode(ToscaNodeType.NEUTRON_PORT.getDisplayName());
+ requirementDefinition.setRelationship(ToscaRelationshipType.ATTACHES_TO.getDisplayName());
+ requirementDefinition.setOccurrences(new Object[]{0, ToscaConstants.UNBOUNDED});
+ portRequirement.put(ToscaConstants.PORT_REQUIREMENT_ID, requirementDefinition);
+ requirements.add(portRequirement);
+
+ return requirements;
+ }
+
+ private static Map<String, PropertyDefinition> createNeutronSecurityRulesProperties() {
+ Map<String, PropertyDefinition> neutronSecurityRulesPropertyDefMap = new HashMap<>();
+ neutronSecurityRulesPropertyDefMap.put(Constants.NAME_PROPERTY_NAME, DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "A symbolic name for this security group, which is not required to be unique.", false,
+ null, null, null, null));
+ neutronSecurityRulesPropertyDefMap.put(Constants.DESCRIPTION_PROPERTY_NAME, DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Description of the security group", false, null, null, null, null));
+ neutronSecurityRulesPropertyDefMap.put(Constants.RULES_PROPERTY_NAME, DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(),
+ "List of security group rules", false, null, null, DataModelUtil
+ .createEntrySchema(ToscaDataType.NEUTRON_SECURITY_RULES_RULE.getDisplayName(), null,
+ null), null));
+ return neutronSecurityRulesPropertyDefMap;
+ }
+
+ private static Map<String, AttributeDefinition> createNeutronSecurityRulesAttributes() {
+ Map<String, AttributeDefinition> neutronSecurityRulesAttributesDefMap = new HashMap<>();
+ neutronSecurityRulesAttributesDefMap.put("show", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(),
+ "Detailed information about resource", null, null, null));
+ return neutronSecurityRulesAttributesDefMap;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/NovaServerGlobalType.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/NovaServerGlobalType.java
new file mode 100644
index 0000000000..d38d70a4f7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/globaltypes/NovaServerGlobalType.java
@@ -0,0 +1,307 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.globaltypes;
+
+import org.openecomp.sdc.tosca.datatypes.ToscaDataType;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.Constraint;
+import org.openecomp.sdc.tosca.datatypes.model.DataType;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.heatextend.PropertyTypeExt;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.translator.services.heattotosca.Constants;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class NovaServerGlobalType {
+
+ /**
+ * Create service template service template.
+ *
+ * @return the service template
+ */
+ public static ServiceTemplate createServiceTemplate() {
+ ServiceTemplate novaeServerServiceTemplate = new ServiceTemplate();
+ novaeServerServiceTemplate
+ .setTosca_definitions_version(ToscaConstants.TOSCA_DEFINITIONS_VERSION);
+ novaeServerServiceTemplate.setMetadata(
+ DataModelUtil.createMetadata(Constants.NOVA_SERVER_TEMPLATE_NAME, "1.0.0", null));
+ novaeServerServiceTemplate.setDescription("Nova Server TOSCA Global Types");
+ novaeServerServiceTemplate.setImports(GlobalTypesUtil.createCommonImportList());
+ novaeServerServiceTemplate.setData_types(createGlobalDataTypes());
+ novaeServerServiceTemplate.setNode_types(createGlobalNodeTypes());
+ return novaeServerServiceTemplate;
+ }
+
+
+ private static Map<String, NodeType> createGlobalNodeTypes() {
+ Map<String, NodeType> globalNodeTypes = new HashMap<>();
+ globalNodeTypes.put(ToscaNodeType.NOVA_SERVER.getDisplayName(), createNovaServerNodeType());
+ return globalNodeTypes;
+ }
+
+ private static NodeType createNovaServerNodeType() {
+ NodeType novaServerNodeType = new NodeType();
+ novaServerNodeType.setDerived_from(ToscaNodeType.COMPUTE.getDisplayName());
+ novaServerNodeType.setProperties(createNovaServerProperties());
+ novaServerNodeType.setAttributes(createNovaServerAttributes());
+ return novaServerNodeType;
+ }
+
+
+ private static Map<String, PropertyDefinition> createNovaServerProperties() {
+ Map<String, PropertyDefinition> novaServerPropertyDefMap = new HashMap<>();
+ novaServerPropertyDefMap.put("flavor", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "The ID or name of the flavor to boot onto", true, null, null, null, null));
+ novaServerPropertyDefMap.put("admin_pass", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "The administrator password for the server", false, null, null, null, null));
+ novaServerPropertyDefMap.put("availability_zone", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Availability zone to create servers in", false, null, null, null, null));
+ novaServerPropertyDefMap.put("config_drive", DataModelUtil
+ .createPropertyDefinition(PropertyType.BOOLEAN.getDisplayName(),
+ "enable config drive on the server", false, null, null, null, null));
+ novaServerPropertyDefMap.put("contrail_service_instance_ind", DataModelUtil
+ .createPropertyDefinition(PropertyType.BOOLEAN.getDisplayName(),
+ "Nova server related to service instance indicator", false, null, null, null, false));
+ novaServerPropertyDefMap.put("diskConfig", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Control how the disk is partitioned when the server is created", false,
+ getDiskConfigConstraints(), null, null, null));
+ novaServerPropertyDefMap.put("flavor_update_policy", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Policy on how to apply a flavor update", false, getFlavorUpdatePolicyConstraints(),
+ null, null, "RESIZE"));
+ novaServerPropertyDefMap.put("image", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "The ID or name of the image to boot with", false, null, null, null, null));
+ novaServerPropertyDefMap.put("image_update_policy", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Policy on how to apply an image-id update", false, getImageUpdatePolicyConstraints(),
+ null, null, "REBUILD"));
+ novaServerPropertyDefMap.put("key_name", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Name of keypair to inject into the server", false, null, null, null, null));
+ novaServerPropertyDefMap.put("metadata", DataModelUtil
+ .createPropertyDefinition(PropertyTypeExt.JSON.getDisplayName(),
+ "Arbitrary JSON metadata to store for this server", false, null, null, null, null));
+ novaServerPropertyDefMap.put(Constants.NAME_PROPERTY_NAME, DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Server name", false, null,
+ null, null, null));
+ novaServerPropertyDefMap.put("personality", DataModelUtil
+ .createPropertyDefinition(PropertyType.MAP.getDisplayName(),
+ "A map of files to create/overwrite on the server upon boot", false, null, null,
+ DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ new HashMap<String, String>()));
+ novaServerPropertyDefMap.put("reservation_id", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "A UUID for the set of servers being requested", false, null, null, null, null));
+ novaServerPropertyDefMap.put("scheduler_hints", DataModelUtil
+ .createPropertyDefinition(PropertyType.MAP.getDisplayName(),
+ "Arbitrary key-value pairs specified by the client to help boot a server", false, null,
+ null, DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ null));
+ novaServerPropertyDefMap.put(Constants.SECURITY_GROUPS_PROPERTY_NAME, DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(),
+ "List of security group names or IDs", false, null, null,
+ DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ new ArrayList<>()));
+ novaServerPropertyDefMap.put("software_config_transport", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "How the server should receive the metadata required for software configuration", false,
+ getSoftwareConfigTransportConstraints(), null, null, "POLL_SERVER_CFN"));
+ novaServerPropertyDefMap.put("user_data", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "User data script to be executed by cloud-init", false, null, null, null, ""));
+ novaServerPropertyDefMap.put("user_data_format", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "How the user_data should be formatted for the server", false,
+ getUserDataFormatConstraint(), null, null, "HEAT_CFNTOOLS"));
+ novaServerPropertyDefMap.put("user_data_update_policy", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "Policy on how to apply a user_data update", false,
+ getUserDataUpdatePolicyConstraints(), null, null, "REPLACE"));
+ return novaServerPropertyDefMap;
+ }
+
+ private static Map<String, AttributeDefinition> createNovaServerAttributes() {
+ Map<String, AttributeDefinition> novaServerAttributesDefMap = new HashMap<>();
+ novaServerAttributesDefMap.put("accessIPv4", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(),
+ "The manually assigned alternative public IPv4 address of the server", null, null,
+ null));
+ novaServerAttributesDefMap.put("accessIPv6", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(),
+ "The manually assigned alternative public IPv6 address of the server", null, null,
+ null));
+ novaServerAttributesDefMap.put("addresses", DataModelUtil
+ .createAttributeDefinition(PropertyType.MAP.getDisplayName(),
+ "A dict of all network addresses with corresponding port_id", null, DataModelUtil
+ .createEntrySchema(ToscaDataType.NOVA_SERVER_NETWORK_ADDRESS_INFO.getDisplayName(),
+ null, null), null));
+ novaServerAttributesDefMap.put("console_urls", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(), "URLs of servers consoles",
+ null, null, null));
+ novaServerAttributesDefMap.put("instance_name", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(),
+ "AWS compatible instance name", null, null, null));
+ novaServerAttributesDefMap.put(Constants.NAME_PROPERTY_NAME, DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(), "Name of the server", null,
+ null, null));
+ novaServerAttributesDefMap.put("show", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(),
+ "Detailed information about resource", null, null, null));
+ return novaServerAttributesDefMap;
+ }
+
+ private static List<Constraint> getUserDataFormatConstraint() {
+ List<Constraint> constraints;
+ Constraint validValues;
+ constraints = new ArrayList<>();
+ validValues =
+ DataModelUtil.createValidValuesConstraint("SOFTWARE_CONFIG", "RAW", "HEAT_CFNTOOLS");
+ constraints.add(validValues);
+ return constraints;
+ }
+
+ private static List<Constraint> getUserDataUpdatePolicyConstraints() {
+ List<Constraint> constraints;
+ Constraint validValues;
+ constraints = new ArrayList<>();
+ validValues = DataModelUtil.createValidValuesConstraint("REPLACE", "IGNORE");
+ constraints.add(validValues);
+ return constraints;
+ }
+
+ private static List<Constraint> getSoftwareConfigTransportConstraints() {
+ List<Constraint> constraints;
+ Constraint validValues;
+ constraints = new ArrayList<>();
+ validValues = DataModelUtil
+ .createValidValuesConstraint("POLL_SERVER_CFN", "POLL_SERVER_HEAT", "POLL_TEMP_URL",
+ "ZAQAR_MESSAGE");
+ constraints.add(validValues);
+ return constraints;
+ }
+
+ private static List<Constraint> getImageUpdatePolicyConstraints() {
+ List<Constraint> constraints;
+ Constraint validValues;
+ constraints = new ArrayList<>();
+ validValues = DataModelUtil
+ .createValidValuesConstraint("REBUILD_PRESERVE_EPHEMERAL", "REPLACE", "REBUILD");
+ constraints.add(validValues);
+ return constraints;
+ }
+
+ private static List<Constraint> getFlavorUpdatePolicyConstraints() {
+ Constraint validValues;
+ List<Constraint> constraints = new ArrayList<>();
+ validValues = DataModelUtil.createValidValuesConstraint("RESIZE", "REPLACE");
+ constraints.add(validValues);
+ return constraints;
+ }
+
+ private static List<Constraint> getDiskConfigConstraints() {
+ List<Constraint> constraints = new ArrayList<>();
+ Constraint validValues = DataModelUtil.createValidValuesConstraint("AUTO", "MANUAL");
+ constraints.add(validValues);
+ return constraints;
+ }
+
+ private static Map<String, DataType> createGlobalDataTypes() {
+ Map<String, DataType> globalDataTypes = new HashMap<>();
+ globalDataTypes.put(ToscaDataType.NOVA_SERVER_PORT_EXTRA_PROPERTIES.getDisplayName(),
+ createPortExtraDataDataType());
+ globalDataTypes.put(ToscaDataType.NOVA_SERVER_NETWORK_ADDRESS_INFO.getDisplayName(),
+ createAddressInfoDataType());
+ return globalDataTypes;
+ }
+
+ private static DataType createAddressInfoDataType() {
+ DataType addressInfoDataType = new DataType();
+ addressInfoDataType.setDerived_from(ToscaDataType.NETWORK_NETWORK_INFO.getDisplayName());
+ addressInfoDataType.setDescription("Network addresses with corresponding port id");
+
+ Map<String, PropertyDefinition> addressInfoProp = new HashMap<>();
+ addressInfoProp.put("port_id", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), "Port id", false, null,
+ null, null, null));
+ addressInfoDataType.setProperties(addressInfoProp);
+
+ return addressInfoDataType;
+ }
+
+
+ private static DataType createPortExtraDataDataType() {
+ DataType portExtraDataType = new DataType();
+ portExtraDataType.setDerived_from(ToscaDataType.ROOT.getDisplayName());
+ portExtraDataType.setDescription("Nova server network expand properties for port");
+ Map<String, PropertyDefinition> portExtraPropMap = new HashMap<>();
+
+ portExtraPropMap.put("admin_state_up", DataModelUtil
+ .createPropertyDefinition(PropertyType.BOOLEAN.getDisplayName(),
+ "The administrative state of this port", false, null, null, null, true));
+ portExtraPropMap.put("allowed_address_pairs", DataModelUtil
+ .createPropertyDefinition(PropertyType.LIST.getDisplayName(),
+ "Additional MAC/IP address pairs allowed to pass through the port", false, null, null,
+ DataModelUtil
+ .createEntrySchema(ToscaDataType.NETWORK_ADDRESS_PAIR.getDisplayName(), null, null),
+ null));
+
+ List<Constraint> bindingVnicConstraints = new ArrayList<>();
+ Constraint validValues =
+ DataModelUtil.createValidValuesConstraint("macvtap", "direct", "normal");
+ bindingVnicConstraints.add(validValues);
+ portExtraPropMap.put("binding:vnic_type", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "The vnic type to be bound on the neutron port", false, bindingVnicConstraints, null,
+ null, null));
+
+ portExtraPropMap.put("mac_address", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "MAC address to give to this port", false, null, null, null, null));
+ portExtraPropMap.put("port_security_enabled", DataModelUtil
+ .createPropertyDefinition(PropertyType.BOOLEAN.getDisplayName(),
+ "Flag to enable/disable port security on the port", false, null, null, null, null));
+ portExtraPropMap.put("qos_policy", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(),
+ "The name or ID of QoS policy to attach to this port", false, null, null, null, null));
+ portExtraPropMap.put("value_specs", DataModelUtil
+ .createPropertyDefinition(PropertyType.MAP.getDisplayName(),
+ "Extra parameters to include in the request", false, null, null,
+ DataModelUtil.createEntrySchema(PropertyType.STRING.getDisplayName(), null, null),
+ new HashMap<String, String>()));
+ portExtraDataType.setProperties(portExtraPropMap);
+ return portExtraDataType;
+ }
+
+}
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
new file mode 100644
index 0000000000..2e1aa9e372
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/ContrailTranslationHelper.java
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.helper;
+
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.translator.services.heattotosca.helper.impl.NameExtractorServiceImpl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Optional;
+
+public class ContrailTranslationHelper {
+ /**
+ * Gets compute node type id.
+ *
+ * @param serviceTemplateTranslatedId the service template translated id
+ * @param serviceTemplateResource the service template resource
+ * @return the compute node type id
+ */
+ public String getComputeNodeTypeId(String serviceTemplateTranslatedId,
+ Resource serviceTemplateResource) {
+ NameExtractorService nodeTypeNameExtractor = new NameExtractorServiceImpl();
+ List<PropertyRegexMatcher> propertyRegexMatchers =
+ getPropertiesAndRegexMatchers(nodeTypeNameExtractor);
+ Optional<String> extractedNodeTypeName = nodeTypeNameExtractor
+ .extractNodeTypeNameByPropertiesPriority(serviceTemplateResource.getProperties(),
+ propertyRegexMatchers);
+
+ return ToscaConstants.NODES_PREFIX
+ + (extractedNodeTypeName.isPresent() ? extractedNodeTypeName.get()
+ : "compute_" + serviceTemplateTranslatedId);
+ }
+
+ private List<PropertyRegexMatcher> getPropertiesAndRegexMatchers(
+ NameExtractorService nodeTypeNameExtractor) {
+ List<PropertyRegexMatcher> propertyRegexMatchers = new ArrayList<>();
+ propertyRegexMatchers.add(nodeTypeNameExtractor
+ .getPropertyRegexMatcher("image_name", Collections.singletonList(".+_image_name$"),
+ "_image_name"));
+ propertyRegexMatchers.add(nodeTypeNameExtractor
+ .getPropertyRegexMatcher("flavor", Collections.singletonList(".+_flavor_name$"),
+ "_flavor_name"));
+ return propertyRegexMatchers;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/NameExtractorService.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/NameExtractorService.java
new file mode 100644
index 0000000000..ed338e2bf5
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/NameExtractorService.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.helper;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+public interface NameExtractorService {
+ Optional<String> extractNodeTypeNameByPropertiesPriority(
+ Map<String, Object> properties,List<PropertyRegexMatcher> propertiesRegexMatchers);
+
+ PropertyRegexMatcher getPropertyRegexMatcher(String propertyName, List<String> regexMatchers,
+ String propertyValueSearchTerm);
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/PropertyRegexMatcher.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/PropertyRegexMatcher.java
new file mode 100644
index 0000000000..b04234b413
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/PropertyRegexMatcher.java
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.helper;
+
+import org.apache.commons.collections.CollectionUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Pattern;
+
+public class PropertyRegexMatcher {
+ private String propertyName;
+ private List<Pattern> regexPatterns;
+ private String stringToSearchForPropertyValue;
+
+ public String getPropertyName() {
+ return propertyName;
+ }
+
+ public void setPropertyName(String propertyName) {
+ this.propertyName = propertyName;
+ }
+
+ /**
+ * Sets regex.
+ *
+ * @param regexPatterns the regex patterns
+ */
+ public void setRegex(List<String> regexPatterns) {
+ if (CollectionUtils.isEmpty(this.regexPatterns)) {
+ this.regexPatterns = new ArrayList<>();
+ }
+
+ for (String regexPattern : regexPatterns) {
+ this.regexPatterns.add(Pattern.compile(regexPattern));
+ }
+ }
+
+ public List<Pattern> getRegexPatterns() {
+ return regexPatterns;
+ }
+
+ public String getStringToSearchForPropertyValue() {
+ return stringToSearchForPropertyValue;
+ }
+
+ public void setStringToSearchForPropertyValue(String stringToSearchForPropertyValue) {
+ this.stringToSearchForPropertyValue = stringToSearchForPropertyValue;
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/VolumeTranslationHelper.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/VolumeTranslationHelper.java
new file mode 100644
index 0000000000..ebd38c89d2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/VolumeTranslationHelper.java
@@ -0,0 +1,172 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.helper;
+
+import org.apache.commons.collections4.CollectionUtils;
+import org.openecomp.core.utilities.yaml.YamlUtil;
+import org.openecomp.sdc.heat.datatypes.manifest.FileData;
+import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
+import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes;
+import org.openecomp.sdc.heat.datatypes.model.Output;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.ResourceFileDataAndIDs;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
+import org.openecomp.sdc.translator.services.heattotosca.TranslationContext;
+import org.openecomp.sdc.translator.services.heattotosca.impl.ResourceTranslationBase;
+import org.slf4j.Logger;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.function.Predicate;
+import java.util.stream.Collectors;
+
+public class VolumeTranslationHelper {
+ private final Logger logger;
+
+ public VolumeTranslationHelper(Logger logger) {
+ this.logger = logger;
+ }
+
+ /**
+ * Gets file data containing volume.
+ *
+ * @param filesToSearch the files to search
+ * @param resourceId the resource id
+ * @param translateTo the translate to
+ * @param types the types
+ * @return the file data containing volume
+ */
+ public Optional<ResourceFileDataAndIDs> getFileDataContainingVolume(List<FileData> filesToSearch,
+ String resourceId,
+ TranslateTo translateTo,
+ FileData.Type... types) {
+ if (CollectionUtils.isEmpty(filesToSearch)) {
+ return Optional.empty();
+ }
+
+ List<FileData> fileDatas = Objects.isNull(types) ? filesToSearch
+ : HeatToToscaUtil.getFilteredListOfFileDataByTypes(filesToSearch, types);
+ Optional<ResourceFileDataAndIDs> fileDataAndIDs =
+ getResourceFileDataAndIDsForVolumeConnection(resourceId, translateTo, fileDatas);
+ if (fileDataAndIDs.isPresent()) {
+ return fileDataAndIDs;
+ }
+ return Optional.empty();
+ }
+
+ private Optional<ResourceFileDataAndIDs> getResourceFileDataAndIDsForVolumeConnection(
+ String resourceId, TranslateTo translateTo, List<FileData> fileDatas) {
+ for (FileData data : fileDatas) {
+ HeatOrchestrationTemplate heatOrchestrationTemplate = new YamlUtil()
+ .yamlToObject(translateTo.getContext().getFiles().getFileContent(data.getFile()),
+ HeatOrchestrationTemplate.class);
+ Map<String, Output> outputs = heatOrchestrationTemplate.getOutputs();
+ if (Objects.isNull(outputs)) {
+ continue;
+ }
+ Output output = outputs.get(resourceId);
+ if (Objects.nonNull(output)) {
+ Optional<AttachedResourceId> attachedOutputId = HeatToToscaUtil
+ .extractAttachedResourceId(data.getFile(), heatOrchestrationTemplate,
+ translateTo.getContext(), output.getValue());
+ if (attachedOutputId.isPresent()) {
+ AttachedResourceId attachedResourceId = attachedOutputId.get();
+ if (!isOutputIsGetResource(resourceId, data, attachedResourceId)) {
+ continue;
+ }
+ String translatedId = (String) attachedResourceId.getTranslatedId();
+ if (isOutputOfTypeCinderVolume(translateTo, data, heatOrchestrationTemplate,
+ translatedId)) {
+ ResourceFileDataAndIDs fileDataAndIDs =
+ new ResourceFileDataAndIDs((String) attachedResourceId.getEntityId(),
+ translatedId,
+ data);
+ return Optional.of(fileDataAndIDs);
+ } else {
+ logger.warn(
+ "output: '" + resourceId + "' in file '" + data.getFile() + "' is not of type '"
+ + HeatResourcesTypes.CINDER_VOLUME_RESOURCE_TYPE.getHeatResource() + "'");
+ }
+ }
+ } else {
+ logger.warn("output: '" + resourceId + "' in file '" + data.getFile() + "' is not found");
+ }
+ }
+ return Optional.empty();
+ }
+
+ private boolean isOutputOfTypeCinderVolume(TranslateTo translateTo, FileData data,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ String translatedId) {
+ return getResourceByTranslatedResourceId(data.getFile(), heatOrchestrationTemplate,
+ translatedId, translateTo,
+ HeatResourcesTypes.CINDER_VOLUME_RESOURCE_TYPE.getHeatResource())
+ .isPresent();
+ }
+
+ private Optional<List<Map.Entry<String, Resource>>> getResourceByTranslatedResourceId(
+ String fileName, HeatOrchestrationTemplate heatOrchestrationTemplate,
+ String translatedResourceId, TranslateTo translateTo, String heatResourceType) {
+ List<Map.Entry<String, Resource>> list = heatOrchestrationTemplate.getResources().entrySet()
+ .stream()
+ .filter(
+ entry -> getPredicatesForTranslatedIdToResourceId(fileName, heatOrchestrationTemplate,
+ translatedResourceId, translateTo.getContext(), heatResourceType)
+ .stream()
+ .allMatch(p -> p.test(entry)))
+ .collect(Collectors.toList());
+ if (CollectionUtils.isEmpty(list)) {
+ return Optional.empty();
+ } else {
+ return Optional.of(list);
+ }
+ }
+
+ private List<Predicate<Map.Entry<String, Resource>>> getPredicatesForTranslatedIdToResourceId(
+ String fileName, HeatOrchestrationTemplate heatOrchestrationTemplate,
+ String translatedResourceId, TranslationContext context, String heatResourceType) {
+ List<Predicate<Map.Entry<String, Resource>>> list = new ArrayList<>();
+ list.add(entry -> entry.getValue().getType().equals(heatResourceType));
+ list.add(entry -> {
+ Optional<String> resourceTranslatedId = ResourceTranslationBase
+ .getResourceTranslatedId(fileName, heatOrchestrationTemplate, entry.getKey(), context);
+ return resourceTranslatedId.isPresent()
+ && resourceTranslatedId.get().equals(translatedResourceId);
+ });
+ return list;
+ }
+
+ private boolean isOutputIsGetResource(String resourceId, FileData data,
+ AttachedResourceId attachedResourceId) {
+ if (attachedResourceId.isGetResource()) {
+ return true;
+ } else {
+ logger.warn("output: '" + resourceId + "' in file '" + data.getFile()
+ + "' is not defined as get_resource and therefor not supported.");
+ return false;
+ }
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/impl/NameExtractorServiceImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/impl/NameExtractorServiceImpl.java
new file mode 100644
index 0000000000..9bd3494698
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/impl/NameExtractorServiceImpl.java
@@ -0,0 +1,95 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.helper.impl;
+
+import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
+import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
+import org.openecomp.sdc.translator.services.heattotosca.helper.NameExtractorService;
+import org.openecomp.sdc.translator.services.heattotosca.helper.PropertyRegexMatcher;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.regex.Pattern;
+
+public class NameExtractorServiceImpl implements NameExtractorService {
+
+ @Override
+ public Optional<String> extractNodeTypeNameByPropertiesPriority(
+ Map<String, Object> properties,List<PropertyRegexMatcher> propertiesRegexMatchers) {
+ for (PropertyRegexMatcher propertyRegexMatcher : propertiesRegexMatchers) {
+ Optional<String> parameterNameValue =
+ getPropertyParameterNameValue(properties, propertyRegexMatcher.getPropertyName());
+ if (parameterNameValue.isPresent()) {
+ if (isPropertyValueMatchNamingConvention(propertyRegexMatcher, parameterNameValue.get())) {
+ return Optional.of(parameterNameValue.get().substring(0, parameterNameValue.get()
+ .lastIndexOf(propertyRegexMatcher.getStringToSearchForPropertyValue())));
+ }
+ }
+ }
+
+ return Optional.empty();
+ }
+
+ private boolean isPropertyValueMatchNamingConvention(PropertyRegexMatcher propertyRegexMatcher,
+ String propertyValue) {
+ for (Pattern pattern : propertyRegexMatcher.getRegexPatterns()) {
+ if (pattern.matcher(propertyValue).matches()) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private Optional<String> getPropertyParameterNameValue(Map<String, Object> properties,
+ String prop) {
+ Object propObj = properties.get(prop);
+ Optional<AttachedResourceId> property = HeatToToscaUtil.extractProperty(propObj);
+ if (property.isPresent()) {
+ AttachedResourceId extractedProperty = property.get();
+ return getParameterName(extractedProperty);
+ }
+ return Optional.empty();
+ }
+
+ private Optional<String> getParameterName(AttachedResourceId extractedProperty) {
+ if (!extractedProperty.isGetParam()) {
+ return Optional.empty();
+ }
+ Object entityId = extractedProperty.getEntityId();
+ if (entityId instanceof String) {
+ return Optional.of((String) entityId);
+ } else {
+ return Optional.of((String) ((List) entityId).get(0));
+ }
+ }
+
+ @Override
+ public PropertyRegexMatcher getPropertyRegexMatcher(String propertyName,
+ List<String> regexMatchers,
+ String propertyValueSearchTerm) {
+ PropertyRegexMatcher propertyRegexMatcher = new PropertyRegexMatcher();
+ propertyRegexMatcher.setPropertyName(propertyName);
+ propertyRegexMatcher.setRegex(regexMatchers);
+ propertyRegexMatcher.setStringToSearchForPropertyValue(propertyValueSearchTerm);
+ return propertyRegexMatcher;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/BaseResourceConnection.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/BaseResourceConnection.java
new file mode 100644
index 0000000000..d901ae9c98
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/BaseResourceConnection.java
@@ -0,0 +1,174 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.apache.commons.collections4.MapUtils;
+import org.openecomp.core.utilities.yaml.YamlUtil;
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+import org.openecomp.sdc.common.errors.ErrorCode;
+import org.openecomp.sdc.heat.datatypes.manifest.FileData;
+import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+import org.openecomp.sdc.translator.services.heattotosca.errors.TranslatorErrorCodes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.function.Predicate;
+
+abstract class BaseResourceConnection<T> {
+ protected static Logger logger =
+ LoggerFactory.getLogger(ResourceTranslationCinderVolumeAttachmentImpl.class);
+ protected TranslateTo translateTo;
+ FileData nestedFileData;
+ NodeTemplate substitutionNodeTemplate;
+ NodeType nodeType;
+ ResourceTranslationBase resourceTranslationBase;
+
+ BaseResourceConnection(ResourceTranslationBase resourceTranslationBase, TranslateTo translateTo,
+ FileData nestedFileData, NodeTemplate substitutionNodeTemplate,
+ NodeType nodeType) {
+ this.translateTo = translateTo;
+ this.nestedFileData = nestedFileData;
+ this.substitutionNodeTemplate = substitutionNodeTemplate;
+ this.nodeType = nodeType;
+ this.resourceTranslationBase = resourceTranslationBase;
+ }
+
+ abstract boolean isDesiredNodeTemplateType(NodeTemplate nodeTemplate);
+
+ abstract List<Predicate<T>> getPredicatesListForConnectionPoints();
+
+ abstract Optional<List<String>> getConnectorParamName(String heatResourceId,
+ Resource heatResource,
+ HeatOrchestrationTemplate
+ nestedHeatOrchestrationTemplate);
+
+ abstract String getDesiredResourceType();
+
+ abstract String getTranslatedResourceIdFromSubstitutionMapping(
+ ServiceTemplate nestedServiceTemplate, Map.Entry<String, T> entry);
+
+ abstract void addRequirementToConnectResources(Map.Entry<String, T> entry,
+ List<String> paramNames);
+
+ abstract List<Map<String, T>> getAllConnectionPoints();
+
+ void connect() {
+ ServiceTemplate nestedServiceTemplate = translateTo.getContext().getTranslatedServiceTemplates()
+ .get(translateTo.getResource().getType());
+ List<String> paramNames = null;
+ HeatOrchestrationTemplate nestedHeatOrchestrationTemplate = new YamlUtil()
+ .yamlToObject(translateTo.getContext().getFileContent(nestedFileData.getFile()),
+ HeatOrchestrationTemplate.class);
+ List<Map<String, T>> exposedConnectionPoints = getAllConnectionPoints();
+ for (Map<String, T> connectionPointsMap : exposedConnectionPoints) {
+ for (Map.Entry<String, T> entry : connectionPointsMap.entrySet()) {
+ String translatedResourceId =
+ getTranslatedResourceIdFromSubstitutionMapping(nestedServiceTemplate, entry);
+ NodeTemplate nodeTemplate = nestedServiceTemplate.getTopology_template().getNode_templates()
+ .get(translatedResourceId);
+ if (!isDesiredNodeTemplateType(nodeTemplate)) {
+ continue;
+ }
+ paramNames = createResourcesConnection(translatedResourceId, paramNames,
+ nestedHeatOrchestrationTemplate, entry);
+ }
+ }
+ }
+
+ private List<String> createResourcesConnection(String translatedResourceId,
+ List<String> paramNames,
+ HeatOrchestrationTemplate
+ nestedHeatOrchestrationTemplate,
+ Map.Entry<String, T> entry) {
+ List<String> params = paramNames;
+ Optional<List<Map.Entry<String, Resource>>> heatResources =
+ getResourceByTranslatedResourceId(translatedResourceId, nestedHeatOrchestrationTemplate);
+ if (heatResources.isPresent()) {
+ params =
+ addRequirementAndGetConnectorParamsFromResourceProperties(nestedHeatOrchestrationTemplate,
+ entry, params, heatResources.get());
+ }
+ return params;
+ }
+
+ private List<String> addRequirementAndGetConnectorParamsFromResourceProperties(
+ HeatOrchestrationTemplate nestedHeatOrchestrationTemplate, Map.Entry<String, T> entry,
+ List<String> params, List<Map.Entry<String, Resource>> heatResources) {
+ Resource heatResource;
+ for (Map.Entry<String, Resource> resourceEntry : heatResources) {
+ heatResource = resourceEntry.getValue();
+ if (!MapUtils.isEmpty(heatResource.getProperties())) {
+ Optional<List<String>> connectorParamName =
+ getConnectorParamName(resourceEntry.getKey(), heatResource,
+ nestedHeatOrchestrationTemplate);
+ if (!connectorParamName.isPresent()) {
+ break;
+ } else {
+ params = connectorParamName.get();
+ }
+ }
+ Objects.requireNonNull(params);
+ addRequirementToConnectResources(entry, params);
+ }
+ return params;
+ }
+
+ protected Optional<List<Map.Entry<String, Resource>>> getResourceByTranslatedResourceId(
+ String translatedResourceId, HeatOrchestrationTemplate nestedHeatOrchestrationTemplate) {
+ Optional<List<Map.Entry<String, Resource>>> resourceByTranslatedResourceId =
+ resourceTranslationBase.getResourceByTranslatedResourceId(nestedFileData.getFile(),
+ nestedHeatOrchestrationTemplate, translatedResourceId, translateTo,
+ getDesiredResourceType());
+ if (!resourceByTranslatedResourceId.isPresent()) {
+ throw new CoreException((new ErrorCode.ErrorCodeBuilder()).withMessage(
+ "Failed to get original resource from heat for translate resource id '"
+ + translatedResourceId + "'")
+ .withId(TranslatorErrorCodes.HEAT_TO_TOSCA_MAPPING_COLLISION)
+ .withCategory(ErrorCategory.APPLICATION).build());
+ }
+ return resourceByTranslatedResourceId;
+ }
+
+ void createRequirementAssignment(Map.Entry<String, RequirementDefinition> entry, String node,
+ NodeTemplate nodeTemplate) {
+ if (Objects.nonNull(node)) {
+ RequirementAssignment requirementAssignment;
+ requirementAssignment = new RequirementAssignment();
+ requirementAssignment.setRelationship(entry.getValue().getRelationship());
+ requirementAssignment.setCapability(entry.getValue().getCapability());
+ requirementAssignment.setNode(node);
+ DataModelUtil.addRequirementAssignment(nodeTemplate, entry.getKey(), requirementAssignment);
+ }
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ContrailV2VmInterfaceToNetResourceConnection.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ContrailV2VmInterfaceToNetResourceConnection.java
new file mode 100644
index 0000000000..890d2a76af
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ContrailV2VmInterfaceToNetResourceConnection.java
@@ -0,0 +1,139 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.openecomp.sdc.heat.datatypes.manifest.FileData;
+import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
+import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslatedHeatResource;
+import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.function.Predicate;
+
+public class ContrailV2VmInterfaceToNetResourceConnection extends PortToNetResourceConnection {
+
+ public ContrailV2VmInterfaceToNetResourceConnection(
+ ResourceTranslationBase resourceTranslationBase, TranslateTo translateTo,
+ FileData nestedFileData, NodeTemplate substitutionNodeTemplate, NodeType nodeType) {
+ super(resourceTranslationBase, translateTo, nestedFileData, substitutionNodeTemplate, nodeType);
+ }
+
+ @Override
+ protected boolean isDesiredNodeTemplateType(NodeTemplate nodeTemplate) {
+ return nodeTemplate.getType()
+ .equals(ToscaNodeType.CONTRAILV2_VIRTUAL_MACHINE_INTERFACE.getDisplayName());
+ }
+
+ @Override
+ protected Optional<List<String>> getConnectorParamName(String heatResourceId,
+ Resource heatResource,
+ HeatOrchestrationTemplate nestedHeatOrchestrationTemplate) {
+ List<String> networks = new ArrayList<>();
+ Object virtualNetworkRefs = heatResource.getProperties().get("virtual_network_refs");
+ if (Objects.isNull(virtualNetworkRefs) || !(virtualNetworkRefs instanceof List)
+ || ((List) virtualNetworkRefs).size() == 0) {
+ return Optional.empty();
+ }
+ if (((List) virtualNetworkRefs).size() > 1) {
+ logger.warn("Heat resource: '" + translateTo.getResourceId() + "' with nested heat file: '"
+ + translateTo.getResource().getType()
+ + "' has resource '" + heatResourceId + "' with type '"
+ + HeatResourcesTypes.CONTRAIL_V2_VIRTUAL_MACHINE_INTERFACE_RESOURCE_TYPE.getHeatResource()
+ + "' which include 'virtual_network_refs' property with more than one network values, "
+ + "only the first network will be translated, all rest will be ignored in TOSCA "
+ + "translation.");
+ }
+ Object virtualNetworkRef = ((List) virtualNetworkRefs).get(0);
+ Optional<AttachedResourceId> network = HeatToToscaUtil
+ .extractAttachedResourceId(nestedFileData.getFile(), nestedHeatOrchestrationTemplate,
+ translateTo.getContext(), virtualNetworkRef);
+ if (network.isPresent() && network.get().isGetParam()) {
+ networks.add((String) network.get().getEntityId());
+ }
+ return Optional.of(networks);
+ }
+
+ @Override
+ protected String getDesiredResourceType() {
+ return HeatResourcesTypes.CONTRAIL_V2_VIRTUAL_MACHINE_INTERFACE_RESOURCE_TYPE.getHeatResource();
+ }
+
+ @Override
+ protected void addRequirementToConnectResources(Map.Entry<String, RequirementDefinition> entry,
+ List<String> paramNames) {
+ for (String paramName : paramNames) {
+ Object paramValue = translateTo.getResource().getProperties().get(paramName);
+ String contrailAttachedResourceId =
+ HeatToToscaUtil.extractContrailGetResourceAttachedHeatResourceId(paramValue);
+ Optional<String> node;
+ if (contrailAttachedResourceId != null) { // contrail get resource
+ node = ResourceTranslationBase.getResourceTranslatedId(translateTo.getHeatFileName(),
+ translateTo.getHeatOrchestrationTemplate(), contrailAttachedResourceId,
+ translateTo.getContext());
+ if (node.isPresent()) {
+ createRequirementAssignment(entry, node.get(), substitutionNodeTemplate);
+ }
+ } else {
+ Optional<AttachedResourceId> attachedResourceId =
+ HeatToToscaUtil.extractAttachedResourceId(translateTo, paramName);
+ if (!attachedResourceId.isPresent()) {
+ return;
+ }
+ AttachedResourceId resourceId = attachedResourceId.get();
+ if (resourceId.isGetParam()) {
+ TranslatedHeatResource shareResource =
+ translateTo.getContext().getHeatSharedResourcesByParam()
+ .get(resourceId.getEntityId());
+ if (Objects.nonNull(shareResource)
+ && !HeatToToscaUtil.isHeatFileNested(translateTo, translateTo.getHeatFileName())) {
+ createRequirementAssignment(entry, shareResource.getTranslatedId(),
+ substitutionNodeTemplate);
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ protected List<Predicate<RequirementDefinition>> getPredicatesListForConnectionPoints() {
+ ArrayList<Predicate<RequirementDefinition>> predicates = new ArrayList<>();
+ predicates.add(
+ req -> req.getCapability().equals(ToscaCapabilityType.NETWORK_LINKABLE.getDisplayName())
+ && req.getNode().equals(ToscaNodeType.ROOT.getDisplayName())
+ && req.getRelationship().equals(ToscaRelationshipType.NETWORK_LINK_TO.getDisplayName())
+ );
+ return predicates;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/NovaAndPortResourceConnectionHelper.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/NovaAndPortResourceConnectionHelper.java
new file mode 100644
index 0000000000..bc60a24223
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/NovaAndPortResourceConnectionHelper.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.openecomp.sdc.heat.datatypes.manifest.FileData;
+import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.function.Predicate;
+
+public class NovaAndPortResourceConnectionHelper
+ extends BaseResourceConnection<RequirementDefinition> {
+ public NovaAndPortResourceConnectionHelper(ResourceTranslationBase resourceTranslationBase,
+ TranslateTo translateTo, FileData nestedFileData,
+ NodeTemplate substitutionNodeTemplate,
+ NodeType nodeType) {
+ super(resourceTranslationBase, translateTo, nestedFileData, substitutionNodeTemplate, nodeType);
+ }
+
+ @Override
+ boolean isDesiredNodeTemplateType(NodeTemplate nodeTemplate) {
+ return false;
+ }
+
+ @Override
+ List<Predicate<RequirementDefinition>> getPredicatesListForConnectionPoints() {
+ return null;
+ }
+
+ @Override
+ Optional<List<String>> getConnectorParamName(String heatResourceId,
+ Resource heatResource,
+ HeatOrchestrationTemplate
+ nestedHeatOrchestrationTemplate) {
+ return null;
+ }
+
+ @Override
+ String getDesiredResourceType() {
+ return null;
+ }
+
+ @Override
+ String getTranslatedResourceIdFromSubstitutionMapping(
+ ServiceTemplate nestedServiceTemplate,Map.Entry<String,
+ RequirementDefinition> entry) {
+ return null;
+ }
+
+ @Override
+ void addRequirementToConnectResources(Map.Entry<String, RequirementDefinition> entry,
+ List<String> paramNames) {
+
+ }
+
+ @Override
+ List<Map<String, RequirementDefinition>> getAllConnectionPoints() {
+ List<Map<String, RequirementDefinition>> exposedRequirementsList = new ArrayList<>();
+ List<Predicate<RequirementDefinition>> predicates = getPredicatesListForConnectionPoints();
+ List<Map<String, RequirementDefinition>> requirements = this.nodeType.getRequirements();
+ if (requirements == null) {
+ return exposedRequirementsList;
+ }
+ requirements.stream()
+ .map(Map::entrySet)
+ .forEach(x -> x.stream()
+ .filter(entry -> predicates
+ .stream()
+ .anyMatch(p -> p.test(entry.getValue())))
+ .forEach(entry -> {
+ Map<String, RequirementDefinition> exposedRequirementsMap = new HashMap<>();
+ exposedRequirementsMap.put(entry.getKey(), entry.getValue());
+ exposedRequirementsList.add(exposedRequirementsMap);
+ }));
+
+ return exposedRequirementsList;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/NovaToVolResourceConnection.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/NovaToVolResourceConnection.java
new file mode 100644
index 0000000000..8bab0dbc50
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/NovaToVolResourceConnection.java
@@ -0,0 +1,228 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.heat.datatypes.manifest.FileData;
+import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
+import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
+import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.services.ToscaAnalyzerService;
+import org.openecomp.sdc.tosca.services.impl.ToscaAnalyzerServiceImpl;
+import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.ResourceFileDataAndIDs;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslatedHeatResource;
+import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
+import org.openecomp.sdc.translator.services.heattotosca.TranslationContext;
+import org.openecomp.sdc.translator.services.heattotosca.errors.MissingMandatoryPropertyErrorBuilder;
+import org.openecomp.sdc.translator.services.heattotosca.helper.VolumeTranslationHelper;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.function.Predicate;
+import java.util.stream.Collectors;
+
+class NovaToVolResourceConnection extends NovaAndPortResourceConnectionHelper {
+
+ public NovaToVolResourceConnection(ResourceTranslationBase resourceTranslationBase,
+ TranslateTo translateTo, FileData nestedFileData,
+ NodeTemplate substitutionNodeTemplate, NodeType nodeType) {
+ super(resourceTranslationBase, translateTo, nestedFileData, substitutionNodeTemplate, nodeType);
+ }
+
+ @Override
+ boolean isDesiredNodeTemplateType(NodeTemplate nodeTemplate) {
+ ToscaAnalyzerService toscaAnalyzerService = new ToscaAnalyzerServiceImpl();
+ ToscaServiceModel toscaServiceModel = HeatToToscaUtil.getToscaServiceModel(translateTo);
+ return toscaAnalyzerService.isTypeOf(nodeTemplate, ToscaNodeType.NOVA_SERVER.getDisplayName(),
+ translateTo.getContext().getTranslatedServiceTemplates()
+ .get(translateTo.getResource().getType()), toscaServiceModel);
+ }
+
+ @Override
+ List<Predicate<RequirementDefinition>> getPredicatesListForConnectionPoints() {
+ ArrayList<Predicate<RequirementDefinition>> predicates = new ArrayList<>();
+ predicates
+ .add(req -> req.getCapability().equals(ToscaCapabilityType.ATTACHMENT.getDisplayName())
+ && req.getNode().equals(ToscaNodeType.BLOCK_STORAGE.getDisplayName())
+ && req.getRelationship()
+ .equals(ToscaRelationshipType.NATIVE_ATTACHES_TO.getDisplayName()));
+ return predicates;
+ }
+
+ @Override
+ Optional<List<String>> getConnectorParamName(
+ String heatResourceId, Resource heatResource,
+ HeatOrchestrationTemplate nestedHeatOrchestrationTemplate) {
+ Optional<AttachedResourceId> volumeId = HeatToToscaUtil
+ .extractAttachedResourceId(nestedFileData.getFile(), nestedHeatOrchestrationTemplate,
+ translateTo.getContext(), heatResource.getProperties().get("volume_id"));
+ if (volumeId.isPresent() && volumeId.get().isGetParam()) {
+ return Optional.of(Collections.singletonList((String) volumeId.get().getEntityId()));
+ } else {
+ return Optional.empty();
+ }
+ }
+
+ @Override
+ String getDesiredResourceType() {
+ return HeatResourcesTypes.CINDER_VOLUME_ATTACHMENT_RESOURCE_TYPE.getHeatResource();
+ }
+
+ @Override
+ protected Optional<List<Map.Entry<String, Resource>>> getResourceByTranslatedResourceId(
+ String translatedResourceId, HeatOrchestrationTemplate nestedHeatOrchestrationTemplate) {
+
+ List<Predicate<Map.Entry<String, Resource>>> predicates =
+ buildPredicates(nestedFileData.getFile(), nestedHeatOrchestrationTemplate,
+ translatedResourceId);
+ List<Map.Entry<String, Resource>> list =
+ nestedHeatOrchestrationTemplate.getResources().entrySet()
+ .stream()
+ .filter(entry -> predicates
+ .stream()
+ .allMatch(p -> p.test(entry)))
+ .collect(Collectors.toList());
+ if (CollectionUtils.isEmpty(list)) {
+ return Optional.empty();
+ } else {
+ return Optional.of(list);
+ }
+ }
+
+ private List<Predicate<Map.Entry<String, Resource>>> buildPredicates(String fileName,
+ HeatOrchestrationTemplate
+ heatOrchestrationTemplate,
+ String
+ novaTranslatedResourceId) {
+ List<Predicate<Map.Entry<String, Resource>>> list = new ArrayList<>();
+ list.add(entry -> entry.getValue().getType().equals(getDesiredResourceType()));
+ list.add(entry -> {
+ Object instanceUuidProp = entry.getValue().getProperties().get("instance_uuid");
+ TranslationContext context = translateTo.getContext();
+ Optional<AttachedResourceId> instanceUuid = HeatToToscaUtil
+ .extractAttachedResourceId(fileName, heatOrchestrationTemplate, context,
+ instanceUuidProp);
+ if (instanceUuid.isPresent()) {
+ Optional<String> resourceTranslatedId = ResourceTranslationBase
+ .getResourceTranslatedId(fileName, heatOrchestrationTemplate,
+ (String) instanceUuid.get().getTranslatedId(), context);
+ return resourceTranslatedId.isPresent()
+ && resourceTranslatedId.get().equals(novaTranslatedResourceId);
+
+ } else {
+ throw new CoreException(new MissingMandatoryPropertyErrorBuilder("instance_uuid").build());
+ }
+ });
+ return list;
+ }
+
+ @Override
+ String getTranslatedResourceIdFromSubstitutionMapping(ServiceTemplate nestedServiceTemplate,
+ Map.Entry<String,
+ RequirementDefinition> entry) {
+ List<String> substitutionMapping =
+ nestedServiceTemplate.getTopology_template().getSubstitution_mappings().getRequirements()
+ .get(entry.getKey());
+ return substitutionMapping.get(0);
+ }
+
+ @Override
+ void addRequirementToConnectResources(Map.Entry<String, RequirementDefinition> entry,
+ List<String> paramNames) {
+ String paramName = paramNames.get(0);
+ Optional<AttachedResourceId> attachedResourceId =
+ HeatToToscaUtil.extractAttachedResourceId(translateTo, paramName);
+ String node;
+ if (!attachedResourceId.isPresent()) {
+ return;
+ }
+ AttachedResourceId attachedResource = attachedResourceId.get();
+ if (attachedResource.isGetResource()) {
+ String volTranslatedId = (String) attachedResource.getTranslatedId();
+ Resource volServerResource = HeatToToscaUtil
+ .getResource(translateTo.getHeatOrchestrationTemplate(), volTranslatedId,
+ translateTo.getHeatFileName());
+ if (!StringUtils.equals(HeatResourcesTypes.CINDER_VOLUME_RESOURCE_TYPE.getHeatResource(),
+ volServerResource.getType())) {
+ logger.warn("Volume attachment used from nested resource " + translateTo.getResourceId()
+ + " is pointing to incorrect resource type(" + volServerResource.getType()
+ + ") for relation through the parameter '" + paramName + "."
+ + " The connection to the volume is ignored. "
+ + "Supported types are: "
+ + HeatResourcesTypes.CINDER_VOLUME_RESOURCE_TYPE.getHeatResource());
+ return;
+ }
+ node = volTranslatedId;
+ createRequirementAssignment(entry, node, substitutionNodeTemplate);
+ } else if (attachedResource.isGetParam()) {
+ TranslatedHeatResource shareResource =
+ translateTo.getContext().getHeatSharedResourcesByParam()
+ .get(attachedResource.getEntityId());
+ if (Objects.nonNull(shareResource)
+ && !HeatToToscaUtil.isHeatFileNested(translateTo, translateTo.getHeatFileName())) {
+ if (!StringUtils.equals(HeatResourcesTypes.CINDER_VOLUME_RESOURCE_TYPE.getHeatResource(),
+ shareResource.getHeatResource().getType())) {
+ logger.warn("Volume attachment used from nested resource " + translateTo.getResourceId()
+ + " is pointing to incorrect resource type("
+ + shareResource.getHeatResource().getType() + ") for relation through the parameter '"
+ + paramName + "."
+ + " The connection to the volume is ignored. "
+ + "Supported types are: "
+ + HeatResourcesTypes.CINDER_VOLUME_RESOURCE_TYPE.getHeatResource());
+ return;
+ }
+ node = shareResource.getTranslatedId();
+ createRequirementAssignment(entry, node, substitutionNodeTemplate);
+ } else if (Objects.isNull(shareResource)) {
+ List<FileData> allFilesData = translateTo.getContext().getManifest().getContent().getData();
+ Optional<FileData> fileData =
+ HeatToToscaUtil.getFileData(translateTo.getHeatFileName(), allFilesData);
+ if (fileData.isPresent()) {
+ Optional<ResourceFileDataAndIDs> fileDataContainingResource =
+ new VolumeTranslationHelper(logger)
+ .getFileDataContainingVolume(fileData.get().getData(),
+ (String) attachedResource.getEntityId(), translateTo, FileData.Type.HEAT_VOL);
+ if (fileDataContainingResource.isPresent()) {
+ createRequirementAssignment(entry,
+ fileDataContainingResource.get().getTranslatedResourceId(),
+ substitutionNodeTemplate);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/PortToNetResourceConnection.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/PortToNetResourceConnection.java
new file mode 100644
index 0000000000..8adfca305e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/PortToNetResourceConnection.java
@@ -0,0 +1,200 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.openecomp.sdc.heat.datatypes.manifest.FileData;
+import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
+import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslatedHeatResource;
+import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.function.Predicate;
+
+public class PortToNetResourceConnection extends NovaAndPortResourceConnectionHelper {
+
+ public PortToNetResourceConnection(ResourceTranslationBase resourceTranslationBase,
+ TranslateTo translateTo, FileData nestedFileData,
+ NodeTemplate substitutionNodeTemplate, NodeType nodeType) {
+ super(resourceTranslationBase, translateTo, nestedFileData, substitutionNodeTemplate, nodeType);
+ }
+
+ @Override
+ protected boolean isDesiredNodeTemplateType(NodeTemplate nodeTemplate) {
+ return nodeTemplate.getType().equals(ToscaNodeType.NEUTRON_PORT.getDisplayName());
+ }
+
+ @Override
+ protected List<Predicate<RequirementDefinition>> getPredicatesListForConnectionPoints() {
+ ArrayList<Predicate<RequirementDefinition>> predicates = new ArrayList<>();
+ predicates.add(
+ req -> req.getCapability().equals(ToscaCapabilityType.NETWORK_LINKABLE.getDisplayName())
+ && req.getNode().equals(ToscaNodeType.ROOT.getDisplayName())
+ && req.getRelationship().equals(
+ ToscaRelationshipType.NETWORK_LINK_TO.getDisplayName()));
+ return predicates;
+ }
+
+ @Override
+ protected Optional<List<String>> getConnectorParamName(String heatResourceId,
+ Resource heatResource,
+ HeatOrchestrationTemplate
+ nestedHeatOrchestrationTemplate) {
+ Optional<AttachedResourceId> network = HeatToToscaUtil
+ .extractAttachedResourceId(nestedFileData.getFile(), nestedHeatOrchestrationTemplate,
+ translateTo.getContext(), heatResource.getProperties().get("network"));
+ if (network.isPresent() && network.get().isGetParam()) {
+ return Optional.of(Collections.singletonList((String) network.get().getEntityId()));
+ } else {
+ network = HeatToToscaUtil
+ .extractAttachedResourceId(nestedFileData.getFile(), nestedHeatOrchestrationTemplate,
+ translateTo.getContext(), heatResource.getProperties().get("network_id"));
+ if (network.isPresent() && network.get().isGetParam()) {
+ return Optional.of(Collections.singletonList((String) network.get().getEntityId()));
+ } else {
+ return Optional.empty();
+ }
+ }
+ }
+
+ @Override
+ protected String getDesiredResourceType() {
+ return HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource();
+ }
+
+ @Override
+ protected String getTranslatedResourceIdFromSubstitutionMapping(
+ ServiceTemplate nestedServiceTemplate, Map.Entry<String, RequirementDefinition> entry) {
+ List<String> substitutionMapping =
+ nestedServiceTemplate.getTopology_template().getSubstitution_mappings().getRequirements()
+ .get(entry.getKey());
+ return substitutionMapping.get(0);
+ }
+
+ @Override
+ protected void addRequirementToConnectResources(Map.Entry<String, RequirementDefinition> entry,
+ List<String> paramNames) {
+ String paramName = paramNames.get(
+ 0); // port can connect to one network only and
+ // we are expecting to have only one param(unlike security rules to port)
+ Object paramValue = translateTo.getResource().getProperties().get(paramName);
+ if (paramValue == null) {
+ logger.warn(
+ "Nested resource '" + translateTo.getResourceId() + "' is not including property '"
+ + paramName + "' with value for the nested heat file, therefore, '" + entry.getKey()
+ + "' TOSCA requirement will not be connected.");
+ return;
+ }
+ List<String> supportedNetworkTypes =
+ Arrays.asList(HeatResourcesTypes.NEUTRON_NET_RESOURCE_TYPE.getHeatResource(),
+ HeatResourcesTypes.CONTRAIL_VIRTUAL_NETWORK_RESOURCE_TYPE.getHeatResource(),
+ HeatResourcesTypes.CONTRAIL_V2_VIRTUAL_NETWORK_RESOURCE_TYPE.getHeatResource());
+
+ Optional<String> targetTranslatedNodeId =
+ getConnectionTargetNodeUsingGetResourceFunc(entry, paramName, paramValue,
+ supportedNetworkTypes);
+ if (targetTranslatedNodeId.isPresent()) {
+ createRequirementAssignment(entry, targetTranslatedNodeId.get(), substitutionNodeTemplate);
+ } else {
+ targetTranslatedNodeId =
+ getConnectionTargetNodeUsingGetParam(entry, paramName, supportedNetworkTypes);
+ if (targetTranslatedNodeId.isPresent()) {
+ createRequirementAssignment(entry, targetTranslatedNodeId.get(), substitutionNodeTemplate);
+ }
+ }
+ }
+
+ private boolean validateResourceTypeSupportedForReqCreation(String sourceResourceId,
+ final String sourcePropertyName,
+ String sourceReqId,
+ Resource targetResource,
+ List<String> supportedTypes) {
+ if (!resourceTranslationBase.isResourceTypeSupported(targetResource, supportedTypes)) {
+ logger.warn("Nested resource '" + sourceResourceId + "' property '" + sourcePropertyName
+ + "' is pointing to a resource with type '" + targetResource.getType()
+ + "' which is not supported for requirement '" + sourceReqId
+ + "' that connect port to network. \nSupported types are: '" + supportedTypes.toString()
+ + "', therefore, this TOSCA requirement will not be connected.");
+ return false;
+ }
+ return true;
+ }
+
+ private Optional<String> getConnectionTargetNodeUsingGetParam(
+ Map.Entry<String, RequirementDefinition> requirementDefinitionEntry, String paramName,
+ List<String> supportedTargetNodeTypes) {
+ Optional<AttachedResourceId> attachedResourceId =
+ HeatToToscaUtil.extractAttachedResourceId(translateTo, paramName);
+ if (!attachedResourceId.isPresent()) {
+ return Optional.empty();
+ }
+ AttachedResourceId resourceId = attachedResourceId.get();
+ if (resourceId.isGetParam()) {
+ TranslatedHeatResource shareResource =
+ translateTo.getContext().getHeatSharedResourcesByParam().get(resourceId.getEntityId());
+ if (Objects.nonNull(shareResource)
+ && !HeatToToscaUtil.isHeatFileNested(translateTo, translateTo.getHeatFileName())) {
+ if (validateResourceTypeSupportedForReqCreation(translateTo.getResourceId(), paramName,
+ requirementDefinitionEntry.getKey(), shareResource.getHeatResource(),
+ supportedTargetNodeTypes)) {
+ return Optional.of(shareResource.getTranslatedId());
+ }
+ }
+ }
+
+ return Optional.empty();
+ }
+
+ private Optional<String> getConnectionTargetNodeUsingGetResourceFunc(
+ Map.Entry<String, RequirementDefinition> requirementDefinitionEntry, String paramName,
+ Object paramValue, List<String> supportedTargetNodeTypes) {
+ String getResourceAttachedResourceId =
+ HeatToToscaUtil.extractContrailGetResourceAttachedHeatResourceId(paramValue);
+ if (getResourceAttachedResourceId != null) { // get resource
+ Resource resource = translateTo.getHeatOrchestrationTemplate().getResources()
+ .get(getResourceAttachedResourceId);
+ if (validateResourceTypeSupportedForReqCreation(translateTo.getResourceId(), paramName,
+ requirementDefinitionEntry.getKey(), resource, supportedTargetNodeTypes)) {
+ return ResourceTranslationBase.getResourceTranslatedId(translateTo.getHeatFileName(),
+ translateTo.getHeatOrchestrationTemplate(), getResourceAttachedResourceId,
+ translateTo.getContext());
+ }
+ }
+
+ return Optional.empty();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationBase.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationBase.java
new file mode 100644
index 0000000000..45e3830f6f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationBase.java
@@ -0,0 +1,456 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections4.MapUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.openecomp.core.utilities.yaml.YamlUtil;
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.heat.datatypes.manifest.FileData;
+import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
+import org.openecomp.sdc.heat.datatypes.model.Output;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
+import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
+import org.openecomp.sdc.tosca.datatypes.model.ArtifactDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.Import;
+import org.openecomp.sdc.tosca.datatypes.model.InterfaceDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.tosca.services.ToscaNativeTypesServiceTemplate;
+import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.ResourceFileDataAndIDs;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
+import org.openecomp.sdc.translator.services.heattotosca.ResourceTranslation;
+import org.openecomp.sdc.translator.services.heattotosca.ResourceTranslationFactory;
+import org.openecomp.sdc.translator.services.heattotosca.TranslationContext;
+import org.openecomp.sdc.translator.services.heattotosca.TranslationService;
+import org.openecomp.sdc.translator.services.heattotosca.errors.ResourceNotFoundInHeatFileErrorBuilder;
+import org.openecomp.sdc.translator.services.heattotosca.globaltypes.GlobalTypesGenerator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.function.Predicate;
+import java.util.stream.Collectors;
+
+public abstract class ResourceTranslationBase implements ResourceTranslation {
+
+ protected static Logger logger = LoggerFactory.getLogger(ResourceTranslationBase.class);
+
+ static Optional<ResourceFileDataAndIDs> getFileDataContainingResource(
+ List<FileData> filesToSearch, String resourceId, TranslationContext context,
+ FileData.Type... types) {
+ if (CollectionUtils.isEmpty(filesToSearch)) {
+ return Optional.empty();
+ }
+
+ List<FileData> fileDatas = Objects.isNull(types) ? filesToSearch
+ : HeatToToscaUtil.getFilteredListOfFileDataByTypes(filesToSearch, types);
+ for (FileData data : fileDatas) {
+ HeatOrchestrationTemplate heatOrchestrationTemplate = new YamlUtil()
+ .yamlToObject(context.getFiles().getFileContent(data.getFile()),
+ HeatOrchestrationTemplate.class);
+ Map<String, Output> outputs = heatOrchestrationTemplate.getOutputs();
+ if (Objects.isNull(outputs)) {
+ continue;
+ }
+ Output output = outputs.get(resourceId);
+ if (Objects.nonNull(output)) {
+ Optional<AttachedResourceId> attachedOutputId = HeatToToscaUtil
+ .extractAttachedResourceId(data.getFile(), heatOrchestrationTemplate, context,
+ output.getValue());
+ if (attachedOutputId.isPresent()) {
+ AttachedResourceId attachedResourceId = attachedOutputId.get();
+ if (!attachedResourceId.isGetResource()) {
+ logger.warn("output: '" + resourceId + "' in file '" + data.getFile()
+ + "' is not defined as get_resource and therefor not supported.");
+ continue;
+ }
+ ResourceFileDataAndIDs fileDataAndIDs =
+ new ResourceFileDataAndIDs((String) attachedResourceId.getEntityId(),
+ (String) attachedResourceId.getTranslatedId(),
+ data);
+ return Optional.of(fileDataAndIDs);
+ }
+ }
+ }
+ return Optional.empty();
+ }
+
+ /**
+ * Gets resource translated id.
+ *
+ * @param heatFileName the heat file name
+ * @param heatOrchestrationTemplate the heat orchestration template
+ * @param resourceId the resource id
+ * @param context the context
+ * @return the resource translated id
+ */
+ public static Optional<String> getResourceTranslatedId(String heatFileName,
+ HeatOrchestrationTemplate
+ heatOrchestrationTemplate,
+ String resourceId,
+ TranslationContext context) {
+ if (!context.getTranslatedIds().containsKey(heatFileName)) {
+ context.getTranslatedIds().put(heatFileName, new HashMap<>());
+ }
+
+ Map<String, String> translatedIdsPerFile = context.getTranslatedIds().get(heatFileName);
+ String translatedId = translatedIdsPerFile.get(resourceId);
+ if (translatedId != null) {
+ return Optional.of(translatedId);
+ }
+
+ Resource resource = heatOrchestrationTemplate.getResources().get(resourceId);
+ if (resource == null) {
+ throw new CoreException(
+ new ResourceNotFoundInHeatFileErrorBuilder(resourceId, heatFileName).build());
+ }
+ TranslateTo translateTo =
+ generateTranslationTo(heatFileName, null, heatOrchestrationTemplate, resource, resourceId,
+ null, context);
+ translatedId =
+ ResourceTranslationFactory.getInstance(resource).generateTranslatedId(translateTo);
+ if (translatedId != null) {
+ context.getTranslatedIds().get(heatFileName).put(resourceId, translatedId);
+ }
+ return Optional.ofNullable(translatedId);
+ }
+
+ private static TranslateTo generateTranslationTo(String heatFileName,
+ ServiceTemplate serviceTemplate,
+ HeatOrchestrationTemplate
+ heatOrchestrationTemplate,
+ Resource resource, String resourceId,
+ String translatedId,
+ TranslationContext context) {
+ TranslateTo to = new TranslateTo();
+ to.setHeatFileName(heatFileName);
+ to.setServiceTemplate(serviceTemplate);
+ to.setHeatOrchestrationTemplate(heatOrchestrationTemplate);
+ to.setResource(resource);
+ to.setResourceId(resourceId);
+ to.setTranslatedId(translatedId);
+ to.setContext(context);
+ return to;
+ }
+
+ protected abstract void translate(TranslateTo translateTo);
+
+ protected String generateTranslatedId(TranslateTo translateTo) {
+ isEssentialRequirementsValid(translateTo);
+ return translateTo.getResourceId();
+ }
+
+ protected boolean isEssentialRequirementsValid(TranslateTo translateTo) {
+ return true;
+ }
+
+ @Override
+ public Optional<String> translateResource(String heatFileName, ServiceTemplate serviceTemplate,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ Resource resource, String resourceId,
+ TranslationContext context) {
+ Optional<String> translatedId =
+ getResourceTranslatedId(heatFileName, heatOrchestrationTemplate, resourceId, context);
+ context.getTranslatedResources().putIfAbsent(heatFileName, new HashSet<>());
+ if (context.getTranslatedResources().get(heatFileName).contains(resourceId)) {
+ return translatedId;
+ }
+ if (!translatedId.isPresent()) {
+ return Optional.empty();
+ }
+ logger.debug("Translate- file:" + heatFileName + " resource Id:" + resourceId
+ + " translated resource id:" + translatedId.get());
+ translate(new TranslateTo(heatFileName, serviceTemplate, heatOrchestrationTemplate, resource,
+ resourceId, translatedId.get(), context));
+ context.getTranslatedResources().get(heatFileName).add(resourceId);
+
+ if (isNodeTemplate(translatedId.get(), serviceTemplate)) {
+ if (!context.getHeatStackGroupMembers().containsKey(heatFileName)) {
+ context.getHeatStackGroupMembers().put(heatFileName, new HashSet<>());
+ }
+ context.getHeatStackGroupMembers().get(heatFileName).add(translatedId.get());
+ updateResourceDependency(heatFileName, resource, heatOrchestrationTemplate,
+ translatedId.get(), serviceTemplate, context);
+ }
+
+ return translatedId;
+ }
+
+ private void updateResourceDependency(String heatFileName, Resource resource,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ String translatedId, ServiceTemplate serviceTemplate,
+ TranslationContext context) {
+ if (resource.getDepends_on() == null) {
+ return;
+ }
+
+ if (resource.getDepends_on() instanceof List) {
+ List<String> dependsOnList = (List<String>) resource.getDepends_on();
+ for (String dependsOnResourceId : dependsOnList) {
+ addDependOnRequirement(dependsOnResourceId, translatedId, serviceTemplate, heatFileName,
+ heatOrchestrationTemplate, context);
+ }
+ } else {
+ String dependsOnResourceId = (String) resource.getDepends_on();
+ addDependOnRequirement(dependsOnResourceId, translatedId, serviceTemplate, heatFileName,
+ heatOrchestrationTemplate, context);
+ }
+
+ }
+
+ private void addDependOnRequirement(String dependsOnResourceId, String nodeTemplateId,
+ ServiceTemplate serviceTemplate, String heatFileName,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ TranslationContext context) {
+ RequirementAssignment requirementAssignment = new RequirementAssignment();
+ Optional<String> resourceTranslatedId =
+ getResourceTranslatedId(heatFileName, heatOrchestrationTemplate, dependsOnResourceId,
+ context);
+
+ if (resourceTranslatedId.isPresent()
+ && isNodeTemplate(resourceTranslatedId.get(), serviceTemplate)) {
+ requirementAssignment.setNode(resourceTranslatedId.get());
+ requirementAssignment.setCapability(ToscaCapabilityType.NODE.getDisplayName());
+ requirementAssignment.setRelationship(ToscaRelationshipType.DEPENDS_ON.getDisplayName());
+ DataModelUtil.addRequirementAssignment(
+ serviceTemplate.getTopology_template().getNode_templates().get(nodeTemplateId),
+ ToscaConstants.DEPENDS_ON_REQUIREMENT_ID, requirementAssignment);
+ }
+ }
+
+ private boolean isNodeTemplate(String entryId, ServiceTemplate serviceTemplate) {
+ return serviceTemplate.getTopology_template().getNode_templates() != null
+ && serviceTemplate.getTopology_template().getNode_templates().get(entryId) != null;
+ }
+
+ FileData getFileData(String fileName, TranslationContext context) {
+
+ List<FileData> fileDataList = context.getManifest().getContent().getData();
+ for (FileData fileData : fileDataList) {
+ if (TranslationService.getTypesToProcessByTranslator().contains(fileData.getType())
+ && fileData.getFile().equals(fileName)) {
+ return fileData;
+ }
+ }
+ return null;
+ }
+
+ NodeType getNodeTypeWithFlatHierarchy(String nodeTypeId, ServiceTemplate serviceTemplate,
+ TranslationContext context) {
+ NodeType nodeType;
+ if (serviceTemplate != null && serviceTemplate.getNode_types() != null) {
+ nodeType = serviceTemplate.getNode_types().get(nodeTypeId);
+
+ if (nodeType != null) {
+ return enrichNodeType(nodeType, serviceTemplate, context);
+ }
+ }
+ Map<String, Map<String, NodeType>> globalNodeTypesMap = new HashMap<>();
+ Collection<ServiceTemplate> globalNodeTypes =
+ GlobalTypesGenerator.getGlobalTypesServiceTemplate().values();
+ ServiceTemplate nativeNodeTypeServiceTemplate =
+ ToscaNativeTypesServiceTemplate.createServiceTemplate();
+ for (ServiceTemplate globalNodeType : globalNodeTypes) {
+ globalNodeTypesMap
+ .put(globalNodeType.getMetadata().getTemplate_name(), globalNodeType.getNode_types());
+ }
+ if (Objects.nonNull(serviceTemplate) && MapUtils.isNotEmpty(serviceTemplate.getImports())) {
+ for (Map.Entry<String, Import> entry : serviceTemplate.getImports().entrySet()) {
+ if (globalNodeTypesMap.containsKey(entry.getKey())) {
+ Map<String, NodeType> nodeTypes = globalNodeTypesMap.get(entry.getKey());
+ if (nodeTypes != null && nodeTypes.containsKey(nodeTypeId)) {
+ return enrichNodeType(nodeTypes.get(nodeTypeId), serviceTemplate, context);
+ }
+ }
+ if (context.getGlobalSubstitutionServiceTemplate() != null
+ && context.getGlobalSubstitutionServiceTemplate().getNode_types() != null
+ && context.getGlobalSubstitutionServiceTemplate().getNode_types()
+ .containsKey(nodeTypeId)) {
+ return enrichNodeType(
+ context.getGlobalSubstitutionServiceTemplate().getNode_types().get(nodeTypeId),
+ serviceTemplate, context);
+ }
+ if (nativeNodeTypeServiceTemplate.getNode_types().containsKey(nodeTypeId)) {
+ return enrichNodeType(nativeNodeTypeServiceTemplate.getNode_types().get(nodeTypeId),
+ serviceTemplate, context);
+ }
+ }
+ }
+ return new NodeType();
+
+ }
+
+ private NodeType enrichNodeType(NodeType nodeType, ServiceTemplate serviceTemplate,
+ TranslationContext context) {
+ NodeType clonedNodeType;
+
+ if (StringUtils.isEmpty(nodeType.getDerived_from())) {
+ return nodeType.clone();
+ }
+
+ clonedNodeType = enrichNodeType(
+ getNodeTypeWithFlatHierarchy(nodeType.getDerived_from(), serviceTemplate, context),
+ serviceTemplate, context);
+ mergeNodeTypes(clonedNodeType, nodeType);
+ return clonedNodeType;
+
+ }
+
+ private void mergeNodeTypes(NodeType target, NodeType source) {
+ target.setDerived_from(source.getDerived_from());
+ target.setDescription(source.getDescription());
+ target.setVersion(source.getVersion());
+ target.setProperties(
+ mergeMaps(target.getProperties(), source.getProperties(), PropertyDefinition.class));
+ target.setInterfaces(
+ mergeMaps(target.getInterfaces(), source.getInterfaces(), InterfaceDefinition.class));
+ target.setArtifacts(
+ mergeMaps(target.getArtifacts(), source.getArtifacts(), ArtifactDefinition.class));
+ target.setAttributes(
+ mergeMaps(target.getAttributes(), source.getAttributes(), AttributeDefinition.class));
+ target.setCapabilities(
+ mergeMaps(target.getCapabilities(), source.getCapabilities(), CapabilityDefinition.class));
+ target.setRequirements(mergeLists(target.getRequirements(), source.getRequirements(),
+ RequirementDefinition.class));
+ }
+
+ private <T, S> List<Map<T, S>> mergeLists(List<Map<T, S>> target, List<Map<T, S>> source,
+ Class<S> value) {
+ List<Map<T, S>> retList = new ArrayList<>();
+ if (Objects.nonNull(target)) {
+ retList.addAll(target);
+ }
+
+ if (Objects.nonNull(source)) {
+ for (Map<T, S> sourceMap : source) {
+ for (Map.Entry<T, S> entry : sourceMap.entrySet()) {
+ mergeEntryInList(entry.getKey(), entry.getValue(), retList);
+ }
+ }
+ }
+ return retList;
+ }
+
+ <T, S> void mergeEntryInList(T key, S value, List<Map<T, S>> target) {
+ boolean found = false;
+ for (Map<T, S> map : target) {
+ if (map.containsKey(key)) {
+ map.put(key, value);
+ found = true;
+ }
+ }
+
+ if (!found) {
+ Map<T, S> newMap = new HashMap<>();
+ newMap.put(key, value);
+ target.add(newMap);
+ }
+ }
+
+
+ private <T, S> Map<T, S> mergeMaps(Map<T, S> target, Map<T, S> source, Class<S> value) {
+ Map<T, S> retMap = new HashMap<>();
+ if (MapUtils.isNotEmpty(target)) {
+ retMap.putAll(target);
+ }
+
+ if (MapUtils.isNotEmpty(source)) {
+ retMap.putAll(source);
+ }
+ return retMap;
+ }
+
+ Optional<List<Map.Entry<String, Resource>>> getResourceByTranslatedResourceId(
+ String fileName,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ String translatedResourceId,TranslateTo translateTo,String heatResourceType) {
+ List<Map.Entry<String, Resource>> list = heatOrchestrationTemplate.getResources().entrySet()
+ .stream()
+ .filter(
+ entry -> getPredicatesForTranslatedIdToResourceId(fileName, heatOrchestrationTemplate,
+ translatedResourceId, translateTo.getContext(), heatResourceType)
+ .stream()
+ .allMatch(p -> p.test(entry)))
+ .collect(Collectors.toList());
+ if (CollectionUtils.isEmpty(list)) {
+ return Optional.empty();
+ } else {
+ return Optional.of(list);
+ }
+ }
+
+ private List<Predicate<Map.Entry<String, Resource>>> getPredicatesForTranslatedIdToResourceId(
+ String fileName, HeatOrchestrationTemplate heatOrchestrationTemplate,
+ String translatedResourceId, TranslationContext context, String heatResourceType) {
+ List<Predicate<Map.Entry<String, Resource>>> list = new ArrayList<>();
+ list.add(entry ->
+ entry.getValue().getType().equals(heatResourceType));
+ list.add(entry -> {
+ Optional<String> resourceTranslatedId =
+ getResourceTranslatedId(fileName, heatOrchestrationTemplate, entry.getKey(), context);
+ return resourceTranslatedId.isPresent()
+ && resourceTranslatedId.get().equals(translatedResourceId);
+ });
+ return list;
+ }
+
+ void addBindingReqFromPortToCompute(String computeNodeTemplateId, NodeTemplate portNodeTemplate) {
+ RequirementAssignment requirementAssignment = new RequirementAssignment();
+ requirementAssignment.setCapability(ToscaCapabilityType.NETWORK_BINDABLE.getDisplayName());
+ requirementAssignment.setRelationship(ToscaRelationshipType.NETWORK_BINDS_TO.getDisplayName());
+ requirementAssignment.setNode(computeNodeTemplateId);
+ DataModelUtil.addRequirementAssignment(portNodeTemplate, ToscaConstants.BINDING_REQUIREMENT_ID,
+ requirementAssignment);
+ }
+
+ void addLinkReqFromPortToNetwork(NodeTemplate nodeTemplate, String translatedId) {
+ RequirementAssignment requirement = new RequirementAssignment();
+ requirement.setCapability(ToscaCapabilityType.NETWORK_LINKABLE.getDisplayName());
+ requirement.setRelationship(ToscaRelationshipType.NETWORK_LINK_TO.getDisplayName());
+ requirement.setNode(translatedId);
+ DataModelUtil
+ .addRequirementAssignment(nodeTemplate, ToscaConstants.LINK_REQUIREMENT_ID, requirement);
+ }
+
+ boolean isResourceTypeSupported(Resource resource, List<String> supportedTypes) {
+ return Objects.nonNull(resource) && supportedTypes.contains(resource.getType());
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationCinderVolumeAttachmentImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationCinderVolumeAttachmentImpl.java
new file mode 100644
index 0000000000..cbad52a95d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationCinderVolumeAttachmentImpl.java
@@ -0,0 +1,202 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import static org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil.getResource;
+
+import org.apache.commons.lang3.StringUtils;
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.heat.datatypes.manifest.FileData;
+import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.RelationshipTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.ResourceFileDataAndIDs;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
+import org.openecomp.sdc.translator.services.heattotosca.ResourceTranslationFactory;
+import org.openecomp.sdc.translator.services.heattotosca.errors.MissingMandatoryPropertyErrorBuilder;
+import org.openecomp.sdc.translator.services.heattotosca.helper.VolumeTranslationHelper;
+import org.openecomp.sdc.translator.services.heattotosca.mapping.TranslatorHeatToToscaPropertyConverter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+import java.util.Optional;
+
+public class ResourceTranslationCinderVolumeAttachmentImpl extends ResourceTranslationBase {
+ protected static Logger logger =
+ LoggerFactory.getLogger(ResourceTranslationCinderVolumeAttachmentImpl.class);
+
+ @Override
+ protected void translate(TranslateTo translateTo) {
+ String volumeIdPropertyName = "volume_id";
+ RelationshipTemplate relationTemplate = new RelationshipTemplate();
+ relationTemplate.setType(ToscaRelationshipType.CINDER_VOLUME_ATTACHES_TO.getDisplayName());
+ String relationshipTemplateId = translateTo.getTranslatedId();
+ String heatFileName = translateTo.getHeatFileName();
+ relationTemplate.setProperties(TranslatorHeatToToscaPropertyConverter
+ .getToscaPropertiesSimpleConversion(translateTo.getResource().getProperties(),
+ relationTemplate.getProperties(), heatFileName,
+ translateTo.getHeatOrchestrationTemplate(), translateTo.getResource().getType(),
+ relationTemplate, translateTo.getContext()));
+
+ AttachedResourceId attachedVolumeId = getAttachedResourceId(translateTo, volumeIdPropertyName);
+ String instanceUuid = "instance_uuid";
+ AttachedResourceId attachedNovaServerId = getAttachedResourceId(translateTo, instanceUuid);
+
+ if (attachedNovaServerId.isGetResource()) {
+ handleNovaGetResource(translateTo, relationTemplate, relationshipTemplateId, heatFileName,
+ attachedVolumeId, (String) attachedNovaServerId.getEntityId());
+ } else {
+ logger.warn("Heat resource: '" + translateTo.getResourceId() + "' with type: '"
+ + translateTo.getResource().getType()
+ + "' include 'instance_uuid' property without 'get_resource' function, therefore this "
+ + "resource will be ignored in TOSCA translation.");
+ }
+ }
+
+ private AttachedResourceId getAttachedResourceId(TranslateTo translateTo, String propertyName) {
+ Optional<AttachedResourceId> attachedResourceId =
+ HeatToToscaUtil.extractAttachedResourceId(translateTo, propertyName);
+ if (!attachedResourceId.isPresent()) {
+ throw new CoreException(new MissingMandatoryPropertyErrorBuilder(propertyName).build());
+ }
+
+ return attachedResourceId.get();
+ }
+
+ private void handleNovaGetResource(TranslateTo translateTo, RelationshipTemplate relationTemplate,
+ String relationshipTemplateId, String heatFileName,
+ AttachedResourceId volResourceId, String novaResourceId) {
+ String toscaCapabilityAttachment = "tosca.capabilities.Attachment";
+ RequirementAssignment requirement = new RequirementAssignment();
+ requirement.setCapability(toscaCapabilityAttachment);
+ if (volResourceId.isGetResource()) {
+ Resource volServerResource = getResource(translateTo.getHeatOrchestrationTemplate(),
+ (String) volResourceId.getTranslatedId(), heatFileName);
+ if (!StringUtils.equals(HeatResourcesTypes.CINDER_VOLUME_RESOURCE_TYPE.getHeatResource(),
+ volServerResource.getType())) {
+ logger.warn("Volume attachment with id '" + translateTo.getResourceId()
+ + "' is pointing to unsupported resource type(" + volServerResource.getType()
+ + ") through the property 'volume_id'."
+ + " The connection to the volume is ignored. "
+ + "Supported types are: "
+ + HeatResourcesTypes.CINDER_VOLUME_RESOURCE_TYPE.getHeatResource());
+ return;
+ }
+ requirement.setNode((String) volResourceId.getTranslatedId());
+ requirement.setRelationship(relationshipTemplateId);
+ DataModelUtil
+ .addRelationshipTemplate(translateTo.getServiceTemplate(), relationshipTemplateId,
+ relationTemplate);
+ } else if (volResourceId.isGetParam()) {
+ String volumeResourceIdParamName = (String) volResourceId.getEntityId();
+ if (translateTo.getContext().getHeatSharedResourcesByParam()
+ .containsKey(volumeResourceIdParamName) && !isHeatFileNested(translateTo, heatFileName)) {
+ Resource volServerResource =
+ translateTo.getContext().getHeatSharedResourcesByParam().get(volumeResourceIdParamName)
+ .getHeatResource();
+ if (!StringUtils.equals(HeatResourcesTypes.CINDER_VOLUME_RESOURCE_TYPE.getHeatResource(),
+ volServerResource.getType())) {
+ logger.warn("Volume attachment with id '" + translateTo.getResourceId()
+ + "' is pointing to unsupported resource type(" + volServerResource.getType()
+ + ") through the property 'volume_id'."
+ + " The connection to the volume is ignored. "
+ + "Supported types are: "
+ + HeatResourcesTypes.CINDER_VOLUME_RESOURCE_TYPE.getHeatResource());
+ return;
+ }
+ requirement.setNode(
+ translateTo.getContext().getHeatSharedResourcesByParam().get(volumeResourceIdParamName)
+ .getTranslatedId());
+ requirement.setRelationship(relationshipTemplateId);
+ DataModelUtil
+ .addRelationshipTemplate(translateTo.getServiceTemplate(), relationshipTemplateId,
+ relationTemplate);
+ } else {
+ handleUnsharedVolume(translateTo, relationTemplate, relationshipTemplateId, heatFileName,
+ requirement, volumeResourceIdParamName);
+ }
+ }
+ Resource novaServerResource =
+ getResource(translateTo.getHeatOrchestrationTemplate(), novaResourceId, heatFileName);
+ if (!StringUtils.equals(HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
+ novaServerResource.getType())) {
+ logger.warn("Volume attachment with id '" + translateTo.getResourceId()
+ + "' is pointing to unsupported resource type(" + novaServerResource.getType()
+ + ") through the property 'instance_uuid'."
+ + " The connection to the nova server is ignored. "
+ + "Supported types are: " + HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE
+ .getHeatResource());
+ return;
+ }
+ Optional<String> translatedNovaServerId =
+ ResourceTranslationFactory.getInstance(novaServerResource)
+ .translateResource(heatFileName, translateTo.getServiceTemplate(),
+ translateTo.getHeatOrchestrationTemplate(), novaServerResource, novaResourceId,
+ translateTo.getContext());
+
+ if (translatedNovaServerId.isPresent() && StringUtils.isNotEmpty(requirement.getNode())) {
+ NodeTemplate novaServerNodeTemplate = DataModelUtil
+ .getNodeTemplate(translateTo.getServiceTemplate(), translatedNovaServerId.get());
+ DataModelUtil.addRequirementAssignment(novaServerNodeTemplate, "local_storage", requirement);
+ }
+ }
+
+ private void handleUnsharedVolume(TranslateTo translateTo, RelationshipTemplate relationTemplate,
+ String relationshipTemplateId, String heatFileName,
+ RequirementAssignment requirement, String volumeResourceId) {
+ List<FileData> allFilesData = translateTo.getContext().getManifest().getContent().getData();
+ Optional<FileData> fileData = HeatToToscaUtil.getFileData(heatFileName, allFilesData);
+ if (fileData.isPresent()) {
+ Optional<ResourceFileDataAndIDs> fileDataContainingResource =
+ new VolumeTranslationHelper(logger)
+ .getFileDataContainingVolume(fileData.get().getData(), volumeResourceId, translateTo,
+ FileData.Type.HEAT_VOL);
+ if (fileDataContainingResource.isPresent()) {
+ addRelationshipToServiceTemplate(translateTo, relationTemplate, relationshipTemplateId,
+ requirement, fileDataContainingResource.get());
+ }
+ }
+ }
+
+ private boolean isHeatFileNested(TranslateTo translateTo, String heatFileName) {
+ return translateTo.getContext().getNestedHeatsFiles().contains(heatFileName);
+ }
+
+ private void addRelationshipToServiceTemplate(TranslateTo translateTo,
+ RelationshipTemplate relationTemplate,
+ String relationshipTemplateId,
+ RequirementAssignment requirement,
+ ResourceFileDataAndIDs resourceFileDataAndIDs) {
+ String translatedId = resourceFileDataAndIDs.getTranslatedResourceId();
+ relationTemplate.getProperties().put("volume_id", translatedId);
+ requirement.setNode(translatedId);
+ requirement.setRelationship(relationshipTemplateId);
+ DataModelUtil.addRelationshipTemplate(translateTo.getServiceTemplate(), relationshipTemplateId,
+ relationTemplate);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationCinderVolumeImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationCinderVolumeImpl.java
new file mode 100644
index 0000000000..c1e5fe3900
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationCinderVolumeImpl.java
@@ -0,0 +1,77 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.openecomp.sdc.heat.datatypes.HeatBoolean;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+import org.openecomp.sdc.translator.services.heattotosca.mapping.TranslatorHeatToToscaPropertyConverter;
+
+import java.util.Map;
+import java.util.Optional;
+
+public class ResourceTranslationCinderVolumeImpl extends ResourceTranslationBase {
+
+ @Override
+ public void translate(TranslateTo translateTo) {
+ NodeTemplate nodeTemplate = new NodeTemplate();
+ nodeTemplate.setType(ToscaNodeType.CINDER_VOLUME.getDisplayName());
+
+ nodeTemplate.setProperties(TranslatorHeatToToscaPropertyConverter
+ .getToscaPropertiesSimpleConversion(translateTo.getResource().getProperties(),
+ nodeTemplate.getProperties(), translateTo.getHeatFileName(),
+ translateTo.getHeatOrchestrationTemplate(), translateTo.getResource().getType(),
+ nodeTemplate, translateTo.getContext()));
+ handleSizeProperty(nodeTemplate.getProperties());
+ Object readOnly = nodeTemplate.getProperties().get("read_only");
+ if (readOnly != null && !(readOnly instanceof Map)) {
+ nodeTemplate.getProperties().put("read_only", HeatBoolean.eval(readOnly));
+ }
+ Optional<String> resourceTranslatedId = getResourceTranslatedId(translateTo.getHeatFileName(),
+ translateTo.getHeatOrchestrationTemplate(), translateTo.getResourceId(),
+ translateTo.getContext());
+ if (resourceTranslatedId.isPresent()) {
+ DataModelUtil.addNodeTemplate(translateTo.getServiceTemplate(), resourceTranslatedId.get(),
+ nodeTemplate);
+ }
+ }
+
+ private void handleSizeProperty(Map<String, Object> nodeTemplateProperties) {
+ Object size = nodeTemplateProperties.get("size");
+ if (size == null) {
+ return;
+ }
+
+ if (size instanceof Map) {
+ Map<String, Object> propMap = (Map) size;
+ if (propMap.entrySet().iterator().hasNext()) {
+ Map.Entry entry = propMap.entrySet().iterator().next();
+ String val = "(" + entry.getKey() + " : " + entry.getValue() + ") * 1024";
+ nodeTemplateProperties.put("size", val);
+ return;
+ }
+ } else {
+ nodeTemplateProperties.put("size", size + "*1024");
+ }
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailAttachPolicyImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailAttachPolicyImpl.java
new file mode 100644
index 0000000000..307e407119
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailAttachPolicyImpl.java
@@ -0,0 +1,141 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
+import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
+import org.openecomp.sdc.translator.services.heattotosca.ResourceTranslationFactory;
+import org.openecomp.sdc.translator.services.heattotosca.errors.MissingMandatoryPropertyErrorBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Optional;
+
+public class ResourceTranslationContrailAttachPolicyImpl extends ResourceTranslationBase {
+ protected static Logger logger =
+ LoggerFactory.getLogger(ResourceTranslationContrailAttachPolicyImpl.class);
+
+ @Override
+ protected void translate(TranslateTo translateTo) {
+ String heatFileName = translateTo.getHeatFileName();
+ String translatedNetworkResourceId = getTranslatedNetworkResourceId(translateTo);
+ if (translatedNetworkResourceId == null) {
+ return;
+ }
+
+ NodeTemplate policyNodeTemplate = getTranslatedPolicyNodeTemplate(translateTo, heatFileName);
+ if (policyNodeTemplate != null) {
+ DataModelUtil
+ .addRequirementAssignment(policyNodeTemplate, ToscaConstants.NETWORK_REQUIREMENT_ID,
+ createRequirementAssignment(translatedNetworkResourceId));
+ }
+ }
+
+ private NodeTemplate getTranslatedPolicyNodeTemplate(TranslateTo translateTo,
+ String heatFileName) {
+ Optional<AttachedResourceId> attachedPolicyResourceId =
+ extractAttachedResourceIdHandleMissing(translateTo, "policy");
+ NodeTemplate policyNodeTemplate = new NodeTemplate();
+ Optional<String> policyResourceId =
+ HeatToToscaUtil.getContrailAttachedHeatResourceId(attachedPolicyResourceId.get());
+ if (policyResourceId.isPresent()) {
+ policyNodeTemplate = getPolicyNodeTemplate(translateTo, heatFileName, policyResourceId.get());
+ } else {
+ logger.warn("Heat resource: '" + translateTo.getResourceId() + "' with type: '"
+ + translateTo.getResource().getType()
+ + "' include 'policy' property without 'get_attr' of 'fq_name'/'get_resource'"
+ + " function, therefore this resource will be ignored in TOSCA translation.");
+ }
+ return policyNodeTemplate;
+ }
+
+ private NodeTemplate getPolicyNodeTemplate(TranslateTo translateTo, String heatFileName,
+ String policyResourceId) {
+ Resource policyResource = HeatToToscaUtil
+ .getResource(translateTo.getHeatOrchestrationTemplate(), policyResourceId, heatFileName);
+ Optional<String> translatedPolicyResourceId =
+ ResourceTranslationFactory.getInstance(policyResource)
+ .translateResource(heatFileName, translateTo.getServiceTemplate(),
+ translateTo.getHeatOrchestrationTemplate(), policyResource, policyResourceId,
+ translateTo.getContext());
+ if (!translatedPolicyResourceId.isPresent()) {
+ logger.warn("Heat resource: '" + translateTo.getResourceId() + "' with type: '"
+ + translateTo.getResource().getType()
+ + "' include unsupported policy resource, therefore this "
+ + "resource will be ignored in TOSCA translation. ");
+ return null;
+ }
+ return DataModelUtil
+ .getNodeTemplate(translateTo.getServiceTemplate(),
+ translatedPolicyResourceId.get());
+ }
+
+ private String getTranslatedNetworkResourceId(TranslateTo translateTo) {
+ Optional<AttachedResourceId> attachedNetworkResourceId =
+ extractAttachedResourceIdHandleMissing(translateTo, "network");
+
+ String translatedNetworkResourceId = null;
+ if (attachedNetworkResourceId.get().isGetResource()) {
+ translatedNetworkResourceId = (String) attachedNetworkResourceId.get().getTranslatedId();
+ } else {
+ logger.warn("Heat resource: '" + translateTo.getResourceId() + "' with type: '"
+ + translateTo.getResource().getType()
+ + "' include 'network' property without 'get_resource' function, "
+ + "therefore this resource will be ignored in TOSCA translation.");
+ }
+ return translatedNetworkResourceId;
+ }
+
+ private RequirementAssignment createRequirementAssignment(String translatedNetworkResourceId) {
+ RequirementAssignment requirement = new RequirementAssignment();
+ requirement.setCapability(ToscaCapabilityType.ATTACHMENT.getDisplayName());
+ requirement.setNode(translatedNetworkResourceId);
+ requirement.setRelationship(ToscaRelationshipType.ATTACHES_TO.getDisplayName());
+ return requirement;
+ }
+
+ private Optional<AttachedResourceId> extractAttachedResourceIdHandleMissing(
+ TranslateTo translateTo, String propertyName) {
+ Optional<AttachedResourceId> attachedResourceId =
+ HeatToToscaUtil.extractAttachedResourceId(translateTo, propertyName);
+
+ if (!attachedResourceId.isPresent()) {
+ throw new CoreException(new MissingMandatoryPropertyErrorBuilder(propertyName).build());
+ }
+ return attachedResourceId;
+ }
+
+
+ @Override
+ protected String generateTranslatedId(TranslateTo translateTo) {
+ return extractAttachedResourceIdHandleMissing(translateTo, "network").get().getEntityId()
+ .toString();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailNetworkPolicyImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailNetworkPolicyImpl.java
new file mode 100644
index 0000000000..8084433fd5
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailNetworkPolicyImpl.java
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+import org.openecomp.sdc.translator.services.heattotosca.mapping.TranslatorHeatToToscaPropertyConverter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ResourceTranslationContrailNetworkPolicyImpl extends ResourceTranslationBase {
+
+ protected static Logger logger =
+ LoggerFactory.getLogger(ResourceTranslationContrailNetworkPolicyImpl.class);
+
+ @Override
+ protected void translate(TranslateTo translateTo) {
+
+ NodeTemplate nodeTemplate = new NodeTemplate();
+ nodeTemplate.setType(ToscaNodeType.CONTRAIL_NETWORK_RULE.getDisplayName());
+
+ nodeTemplate.setProperties(TranslatorHeatToToscaPropertyConverter
+ .getToscaPropertiesSimpleConversion(translateTo.getResource().getProperties(),
+ nodeTemplate.getProperties(), translateTo.getHeatFileName(),
+ translateTo.getHeatOrchestrationTemplate(), translateTo.getResource().getType(),
+ nodeTemplate, translateTo.getContext()));
+
+ DataModelUtil.addNodeTemplate(translateTo.getServiceTemplate(), translateTo.getTranslatedId(),
+ nodeTemplate);
+
+
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailServiceInstanceImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailServiceInstanceImpl.java
new file mode 100644
index 0000000000..b2475f28a9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailServiceInstanceImpl.java
@@ -0,0 +1,663 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.heat.datatypes.HeatBoolean;
+import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.heat.services.HeatConstants;
+import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
+import org.openecomp.sdc.tosca.datatypes.ToscaFunctions;
+import org.openecomp.sdc.tosca.datatypes.ToscaGroupType;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
+import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.GroupDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.Metadata;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.ParameterDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.SubstitutionMapping;
+import org.openecomp.sdc.tosca.datatypes.model.TopologyTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.tosca.services.ToscaUtil;
+import org.openecomp.sdc.tosca.services.impl.ToscaFileOutputServiceCsarImpl;
+import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslatedHeatResource;
+import org.openecomp.sdc.translator.services.heattotosca.Constants;
+import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
+import org.openecomp.sdc.translator.services.heattotosca.ResourceTranslationFactory;
+import org.openecomp.sdc.translator.services.heattotosca.errors.MissingMandatoryPropertyErrorBuilder;
+import org.openecomp.sdc.translator.services.heattotosca.globaltypes.ContrailAbstractSubstituteGlobalType;
+import org.openecomp.sdc.translator.services.heattotosca.globaltypes.ContrailComputeGlobalType;
+import org.openecomp.sdc.translator.services.heattotosca.globaltypes.GlobalTypesGenerator;
+import org.openecomp.sdc.translator.services.heattotosca.globaltypes.GlobalTypesUtil;
+import org.openecomp.sdc.translator.services.heattotosca.helper.ContrailTranslationHelper;
+import org.openecomp.sdc.translator.services.heattotosca.mapping.TranslatorHeatToToscaFunctionConverter;
+import org.openecomp.sdc.translator.services.heattotosca.mapping.TranslatorHeatToToscaPropertyConverter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+public class ResourceTranslationContrailServiceInstanceImpl extends ResourceTranslationBase {
+ protected static Logger logger =
+ LoggerFactory.getLogger(ResourceTranslationContrailServiceInstanceImpl.class);
+
+ @Override
+ public void translate(TranslateTo translateTo) {
+ Resource serviceInstanceResource = translateTo.getResource();
+ AttachedResourceId contrailServiceTemplateAttached =
+ getServiceTemplateAttachedId(translateTo, serviceInstanceResource);
+ if (contrailServiceTemplateAttached.isGetResource()) {
+ String contrailServiceTemplateResourceId =
+ (String) contrailServiceTemplateAttached.getEntityId();
+ Resource contrailServiceTemplateResource = HeatToToscaUtil
+ .getResource(translateTo.getHeatOrchestrationTemplate(),
+ contrailServiceTemplateResourceId, translateTo.getHeatFileName());
+ if (!contrailServiceTemplateResource.getType()
+ .equals(HeatResourcesTypes.CONTRAIL_SERVICE_TEMPLATE.getHeatResource())) {
+ logger.warn("resource id '" + translateTo.getResourceId() + "' with type '"
+ + translateTo.getResource().getType()
+ + "+ has reference to resource '" + contrailServiceTemplateResourceId + "' with type "
+ + "'"
+ + contrailServiceTemplateResource.getType()
+ + "' in property service_template. Invalid type, resource type should be type of '"
+ + HeatResourcesTypes.CONTRAIL_SERVICE_TEMPLATE.getHeatResource()
+ + "', therefore this resource will be ignored in TOSCA translation.");
+ return;
+ }
+ Optional<String> contrailServiceTemplateTranslatedId =
+ ResourceTranslationFactory.getInstance(contrailServiceTemplateResource)
+ .translateResource(translateTo.getHeatFileName(), translateTo.getServiceTemplate(),
+ translateTo.getHeatOrchestrationTemplate(), contrailServiceTemplateResource,
+ contrailServiceTemplateResourceId, translateTo.getContext());
+ if (!contrailServiceTemplateTranslatedId.isPresent()) {
+ logger.warn("Resource id '" + translateTo.getResourceId() + "' with type '"
+ + translateTo.getResource().getType()
+ + "' has reference to unsupported resource '" + contrailServiceTemplateResourceId
+ + "' with type '" + contrailServiceTemplateResource.getType()
+ + "' in property 'service_template'"
+ + ", therefore this resource will be ignored in TOSCA translation.");
+ return;
+ }
+
+ ServiceTemplate globalSubstitutionServiceTemplate =
+ translateTo.getContext().getTranslatedServiceTemplates()
+ .get(Constants.GLOBAL_SUBSTITUTION_TYPES_TEMPLATE_NAME);
+ String contrailStId = ResourceTranslationContrailServiceTemplateImpl
+ .getContrailSubstitutedNodeTypeId(contrailServiceTemplateTranslatedId.get());
+ NodeType substitutedNodeType =
+ DataModelUtil.getNodeType(globalSubstitutionServiceTemplate, contrailStId);
+
+ int numberOfPorts = getServiceInstanceNumberOfPorts(serviceInstanceResource);
+ if (substitutedNodeType.getRequirements() != null
+ && substitutedNodeType.getRequirements().size() != numberOfPorts) {
+ logger.warn("More than one ServiceInstance pointing to the same ServiceTemplate '"
+ + contrailServiceTemplateResourceId + " ' with different number of interfaces."
+ + ", therefore this resource will be ignored in TOSCA translation.");
+ return;
+ }
+
+ addNetworkLinkRequirements(substitutedNodeType, numberOfPorts);
+ NodeTemplate substitutedNodeTemplate =
+ createSubstitutedNodeTemplate(translateTo, contrailServiceTemplateResource, contrailStId,
+ numberOfPorts);
+
+ String computeNodeTypeId = new ContrailTranslationHelper()
+ .getComputeNodeTypeId(contrailServiceTemplateTranslatedId.get(),
+ contrailServiceTemplateResource);
+ boolean orderedInterfaces = getOrderedInterfaces(contrailServiceTemplateResource);
+ ServiceTemplate nestedServiceTemplate =
+ createNestedServiceTemplate(translateTo, computeNodeTypeId, contrailStId,
+ substitutedNodeTemplate, orderedInterfaces);
+ addAbstractSubstitutionProperty(translateTo, substitutedNodeTemplate.getProperties(),
+ nestedServiceTemplate, contrailServiceTemplateResource);
+ translateTo.getContext().getTranslatedServiceTemplates()
+ .put(translateTo.getTranslatedId(), nestedServiceTemplate);
+
+ } else {
+ logger.warn("Heat resource: '" + translateTo.getResourceId() + "' with type: '"
+ + translateTo.getResource().getType()
+ + "' include 'service_template' property without 'get_resource' function, currently not "
+ + "supported, therefore this resource will be ignored in TOSCA translation.");
+ }
+
+ }
+
+ private void addAbstractSubstitutionProperty(TranslateTo translateTo,
+ Map<String, Object> substitutionProperties,
+ ServiceTemplate nestedServiceTemplate,
+ Resource contrailServiceTemplateResource) {
+ Map<String, Object> innerProps = new HashMap<>();
+ innerProps.put(ToscaConstants.SUBSTITUTE_SERVICE_TEMPLATE_PROPERTY_NAME,
+ ToscaUtil.getServiceTemplateFileName(nestedServiceTemplate));
+
+ Object countValue = handleScaleOutProperty(translateTo, innerProps);
+ handleServiceScalingProperty(translateTo, innerProps, contrailServiceTemplateResource);
+
+ boolean mandatory = false;
+ if (countValue instanceof Integer && (Integer) countValue > 0) {
+ mandatory = true;
+ }
+ if (countValue == null) {
+ mandatory = true;
+ }
+ innerProps.put("mandatory", mandatory);
+ substitutionProperties.put(ToscaConstants.SERVICE_TEMPLATE_FILTER_PROPERTY_NAME, innerProps);
+ }
+
+ private Object handleScaleOutProperty(TranslateTo translateTo, Map<String, Object> innerProps) {
+ Object scaleOutPropertyValue =
+ translateTo.getResource().getProperties().get(HeatConstants.SCALE_OUT_PROPERTY_NAME);
+ Object countValue = null;
+ if (scaleOutPropertyValue != null && scaleOutPropertyValue instanceof Map) {
+ countValue = TranslatorHeatToToscaPropertyConverter
+ .getToscaPropertyValue(Constants.MAX_INSTANCES_PROPERTY_NAME,
+ ((Map) scaleOutPropertyValue).get(Constants.MAX_INSTANCES_PROPERTY_NAME), null,
+ translateTo.getHeatFileName(), translateTo.getHeatOrchestrationTemplate(), null,
+ translateTo.getContext());
+ if (countValue != null) {
+ innerProps.put(ToscaConstants.COUNT_PROPERTY_NAME, countValue);
+ } else {
+ innerProps.put(ToscaConstants.COUNT_PROPERTY_NAME, 1);
+ }
+ } else {
+ innerProps.put(ToscaConstants.COUNT_PROPERTY_NAME, 1);
+ }
+ return countValue;
+ }
+
+ private void handleServiceScalingProperty(TranslateTo translateTo, Map<String, Object> innerProps,
+ Resource contrailServiceTemplateResource) {
+ Object serviceScalingPropertyValue = contrailServiceTemplateResource.getProperties()
+ .get(HeatConstants.SERVICE_SCALING_PROPERTY_NAME);
+ Object serviceScalingValue = null;
+ if (serviceScalingPropertyValue != null) {
+ serviceScalingValue = TranslatorHeatToToscaPropertyConverter
+ .getToscaPropertyValue(HeatConstants.SERVICE_SCALING_PROPERTY_NAME,
+ serviceScalingPropertyValue, null, translateTo.getHeatFileName(),
+ translateTo.getHeatOrchestrationTemplate(), null, translateTo.getContext());
+ if (serviceScalingValue != null) {
+ innerProps.put(ToscaConstants.SCALING_ENABLED_PROPERTY_NAME,
+ (HeatBoolean.isValueBoolean(serviceScalingValue)) ? HeatBoolean
+ .eval(serviceScalingValue) : serviceScalingValue);
+ }
+ }
+ }
+
+ private boolean getOrderedInterfaces(Resource contrailServiceTemplate) {
+ Object orderedInterfaces = contrailServiceTemplate.getProperties().get("ordered_interfaces");
+ if (orderedInterfaces == null) {
+ return false;
+ }
+ if (orderedInterfaces instanceof String) {
+ return HeatBoolean.eval(orderedInterfaces);
+ }
+ //if get_param, set default value to true
+ return true;
+ }
+
+ private ServiceTemplate createNestedServiceTemplate(TranslateTo translateTo,
+ String computeNodeTypeId,
+ String substitutedNodeTypeId,
+ NodeTemplate substitutedNodeTemplate,
+ boolean orderedInterfaces) {
+ ServiceTemplate nestedSubstitutionServiceTemplate = new ServiceTemplate();
+ setNestedServiceTemplateGeneralDetails(translateTo, nestedSubstitutionServiceTemplate);
+ String heatStackGroupKey = addHeatStackGroup(translateTo, nestedSubstitutionServiceTemplate);
+ addSubstitutionMappingEntry(nestedSubstitutionServiceTemplate, substitutedNodeTypeId);
+
+ handleInputParameters(nestedSubstitutionServiceTemplate);
+ String computeNodeTemplateId =
+ handleComputeNodeTemplate(translateTo, computeNodeTypeId, nestedSubstitutionServiceTemplate,
+ heatStackGroupKey);
+ handleOutputParameters(nestedSubstitutionServiceTemplate, computeNodeTemplateId);
+ handleServiceInstanceInterfaces(translateTo, nestedSubstitutionServiceTemplate,
+ substitutedNodeTemplate, heatStackGroupKey, orderedInterfaces, computeNodeTemplateId);
+
+ return nestedSubstitutionServiceTemplate;
+ }
+
+ private void handleOutputParameters(ServiceTemplate nestedSubstitutionServiceTemplate,
+ String nodeTemplateId) {
+ if (nodeTemplateId == null) {
+ return;
+ }
+ NodeType contrailAbstractNodeType =
+ ContrailAbstractSubstituteGlobalType.createServiceTemplate().getNode_types()
+ .get(ToscaNodeType.CONTRAIL_ABSTRACT_SUBSTITUTE.getDisplayName());
+ Map<String, AttributeDefinition> contrailAbstractAttributes =
+ contrailAbstractNodeType.getAttributes();
+ Map<String, ParameterDefinition> nestedSubstitutionServiceTemplateOutputs = new HashMap<>();
+
+ if (contrailAbstractAttributes == null) {
+ return;
+ }
+
+ for (String attributeKey : contrailAbstractAttributes.keySet()) {
+ AttributeDefinition abstractAttributeDef = contrailAbstractAttributes.get(attributeKey);
+ if (abstractAttributeDef != null) {
+ Map<String, List> outputValue = new HashMap<>();
+ List outputGetAttributeList = new ArrayList<>();
+ outputGetAttributeList.add(nodeTemplateId);
+ outputGetAttributeList.add(attributeKey);
+ outputValue.put(ToscaFunctions.GET_ATTRIBUTE.getDisplayName(), outputGetAttributeList);
+ nestedSubstitutionServiceTemplateOutputs.put(attributeKey,
+ DataModelUtil.convertAttributeDefToParameterDef(abstractAttributeDef, outputValue));
+ }
+ }
+ if (!nestedSubstitutionServiceTemplateOutputs.isEmpty()) {
+ nestedSubstitutionServiceTemplate.getTopology_template()
+ .setOutputs(nestedSubstitutionServiceTemplateOutputs);
+ }
+ }
+
+ private void handleServiceInstanceInterfaces(TranslateTo translateTo,
+ ServiceTemplate nestedSubstitutionServiceTemplate,
+ NodeTemplate substitutedNodeTemplate,
+ String heatStackGroupKey, boolean orderedInterfaces,
+ String computeNodeTemplateId) {
+ Resource serviceInstanceResource = translateTo.getResource();
+ Object interfaceListProperty = serviceInstanceResource.getProperties().get("interface_list");
+ if (interfaceListProperty == null) {
+ return;
+ }
+ if (interfaceListProperty instanceof List) {
+ for (int index = 0; index < ((List) interfaceListProperty).size(); index++) {
+ Object interfaceEntry = ((List) interfaceListProperty).get(index);
+ handleInterface(translateTo, interfaceEntry, index, nestedSubstitutionServiceTemplate,
+ heatStackGroupKey, substitutedNodeTemplate, orderedInterfaces, computeNodeTemplateId);
+ }
+ } else if (interfaceListProperty instanceof Map) {
+ handleInterface(translateTo, interfaceListProperty, null, nestedSubstitutionServiceTemplate,
+ heatStackGroupKey, substitutedNodeTemplate, orderedInterfaces, computeNodeTemplateId);
+ }
+ }
+
+ private void handleInterface(TranslateTo translateTo, Object interfacePropertyValue,
+ Integer index,
+ ServiceTemplate nestedSubstitutionServiceTemplate,
+ String heatStackGroupKey, NodeTemplate substitutedNodeTemplate,
+ boolean orderedInterfaces, String computeNodeTemplateId) {
+ if (index == null) {
+ index = new Integer(0);
+ }
+ NodeTemplate portNodeTemplate =
+ createPortNodeTemplate(index, orderedInterfaces, computeNodeTemplateId);
+ String portNodeTemplateId = "port_" + index;
+ String portReqMappingKey = "link_" + portNodeTemplateId;
+
+ DataModelUtil
+ .addNodeTemplate(nestedSubstitutionServiceTemplate, portNodeTemplateId, portNodeTemplate);
+ updateSubstitutionMappingRequirement(nestedSubstitutionServiceTemplate, portReqMappingKey,
+ portNodeTemplateId);
+ updateHeatStackGroup(nestedSubstitutionServiceTemplate, heatStackGroupKey, portNodeTemplateId);
+ connectPortToNetwork(translateTo, interfacePropertyValue, substitutedNodeTemplate,
+ portReqMappingKey);
+ }
+
+ private void connectPortToNetwork(TranslateTo translateTo, Object interfacePropertyValue,
+ NodeTemplate substitutedNodeTemplate,
+ String portReqMappingKey) {
+ List<String> validNetworksForConnections = Arrays
+ .asList(HeatResourcesTypes.NEUTRON_NET_RESOURCE_TYPE.getHeatResource(),
+ HeatResourcesTypes.CONTRAIL_VIRTUAL_NETWORK_RESOURCE_TYPE.getHeatResource());
+
+ if (interfacePropertyValue instanceof Map) {
+ Object virtualNetworkValue = ((Map) interfacePropertyValue).get("virtual_network");
+ if (virtualNetworkValue != null) {
+ Optional<AttachedResourceId> networkAttachedResourceId = HeatToToscaUtil
+ .extractAttachedResourceId(translateTo.getHeatFileName(),
+ translateTo.getHeatOrchestrationTemplate(), translateTo.getContext(),
+ virtualNetworkValue);
+ if (networkAttachedResourceId.isPresent()) {
+ Optional<String> networkResourceId =
+ HeatToToscaUtil.getContrailAttachedHeatResourceId(networkAttachedResourceId.get());
+ if (networkResourceId.isPresent()) {
+ Resource networkResource = HeatToToscaUtil
+ .getResource(translateTo.getHeatOrchestrationTemplate(), networkResourceId.get(),
+ translateTo.getHeatFileName());
+ if (validNetworksForConnections.contains(networkResource.getType())) {
+ Optional<String> networkTranslatedId =
+ getResourceTranslatedId(translateTo.getHeatFileName(),
+ translateTo.getHeatOrchestrationTemplate(), networkResourceId.get(),
+ translateTo.getContext());
+ if (networkTranslatedId.isPresent()) {
+ addLinkToNetworkRequirementAssignment(substitutedNodeTemplate,
+ networkTranslatedId.get(), portReqMappingKey);
+ }
+ } else {
+ logger.warn("Heat resource " + translateTo.getResourceId() + " with type "
+ + translateTo.getResource().getType()
+ + " has connection to invalid/not supported network resource, therefore, this "
+ + "connection will be ignored in the translation.");
+ }
+ } else if (networkAttachedResourceId.get().isGetParam()) {
+ TranslatedHeatResource translatedSharedResourceId =
+ translateTo.getContext().getHeatSharedResourcesByParam()
+ .get(networkAttachedResourceId.get().getEntityId());
+ if (Objects.nonNull(translatedSharedResourceId)
+ && !HeatToToscaUtil.isHeatFileNested(translateTo, translateTo.getHeatFileName())) {
+ addLinkToNetworkRequirementAssignment(substitutedNodeTemplate,
+ translatedSharedResourceId.getTranslatedId(), portReqMappingKey);
+ }
+ } else {
+ logger.warn("Heat resource: '" + translateTo.getResourceId() + "' with type: '"
+ + translateTo.getResource().getType()
+ + "' include 'virtual_network' property with value '"
+ + virtualNetworkValue.toString()
+ + "', the connection to this network wasn't found/not supported therefore this "
+ + "connection will be ignored in TOSCA translation for this property.");
+ }
+ }
+ } else {
+ logger.warn("Heat resource: '" + translateTo.getResourceId() + "' with type: '"
+ + translateTo.getResource().getType()
+ + "' missing 'virtual_network' property in 'interface_list' entry, therefore, no "
+ + "network connection is define for this entry.");
+ }
+ }
+ }
+
+ private NodeTemplate createPortNodeTemplate(Integer index, boolean orderedInterfaces,
+ String computeNodeTemplateId) {
+ NodeTemplate portNodeTemplate = new NodeTemplate();
+ portNodeTemplate.setType(ToscaNodeType.CONTRAIL_PORT.getDisplayName());
+ Map<String, Object> portProperties = new HashMap<>();
+ portProperties.put("static_routes", DataModelUtil
+ .createGetInputPropertyValueFromListParameter("interface_list", index, "static_routes"));
+ portProperties.put("virtual_network", DataModelUtil
+ .createGetInputPropertyValueFromListParameter("interface_list", index, "virtual_network"));
+ portProperties.put("allowed_address_pairs", DataModelUtil
+ .createGetInputPropertyValueFromListParameter("interface_list", index,
+ "allowed_address_pairs"));
+ portProperties.put("ip_address", DataModelUtil
+ .createGetInputPropertyValueFromListParameter("interface_list", index, "ip_address"));
+ portProperties.put("static_route",
+ DataModelUtil.createGetInputPropertyValueFromListParameter("static_routes_list", index));
+ portProperties.put("shared_ip",
+ DataModelUtil.createGetInputPropertyValueFromListParameter("shared_ip_list", index));
+ portProperties.put("interface_type", DataModelUtil
+ .createGetInputPropertyValueFromListParameter("service_interface_type_list", index));
+ if (orderedInterfaces) {
+ portProperties.put("order", index);
+ }
+ portNodeTemplate.setProperties(portProperties);
+ addBindingReqFromPortToCompute(computeNodeTemplateId, portNodeTemplate);
+ return portNodeTemplate;
+ }
+
+
+ private void addLinkToNetworkRequirementAssignment(NodeTemplate nodeTemplate,
+ String connectedNodeTranslatedId,
+ String requirementId) {
+ if (nodeTemplate == null || connectedNodeTranslatedId == null) {
+ return;
+ }
+
+ RequirementAssignment requirement = new RequirementAssignment();
+ requirement.setCapability(ToscaCapabilityType.NETWORK_LINKABLE.getDisplayName());
+ requirement.setRelationship(ToscaRelationshipType.NETWORK_LINK_TO.getDisplayName());
+ requirement.setNode(connectedNodeTranslatedId);
+ DataModelUtil.addRequirementAssignment(nodeTemplate, requirementId, requirement);
+ }
+
+ private void updateHeatStackGroup(ServiceTemplate serviceTemplate, String heatStackGroupKey,
+ String memberId) {
+ serviceTemplate.getTopology_template().getGroups().get(heatStackGroupKey).getMembers()
+ .add(memberId);
+ }
+
+ private void updateSubstitutionMappingRequirement(ServiceTemplate serviceTemplate,
+ String portReqMappingKey,
+ String portNodeTemplateId) {
+ List<String> portReqMappingValue = new ArrayList<>();
+ portReqMappingValue.add(portNodeTemplateId);
+ portReqMappingValue.add(ToscaConstants.LINK_REQUIREMENT_ID);
+ DataModelUtil
+ .addSubstitutionMappingReq(serviceTemplate, portReqMappingKey, portReqMappingValue);
+ }
+
+ private void addSubstitutionMappingEntry(ServiceTemplate nestedSubstitutionServiceTemplate,
+ String substitutedNodeTypeId) {
+ SubstitutionMapping substitutionMappings = new SubstitutionMapping();
+ substitutionMappings.setNode_type(substitutedNodeTypeId);
+ DataModelUtil.addSubstitutionMapping(nestedSubstitutionServiceTemplate, substitutionMappings);
+ }
+
+ private void handleInputParameters(ServiceTemplate nestedSubstitutionServiceTemplate) {
+ NodeType contrailAbstractNodeType =
+ ContrailAbstractSubstituteGlobalType.createServiceTemplate().getNode_types()
+ .get(ToscaNodeType.CONTRAIL_ABSTRACT_SUBSTITUTE.getDisplayName());
+ Map<String, PropertyDefinition> contrailAbstractProperties =
+ contrailAbstractNodeType.getProperties();
+ Map<String, ParameterDefinition> nestedSubstitutionServiceTemplateInputs = new HashMap<>();
+
+ for (String propertyKey : contrailAbstractProperties.keySet()) {
+ PropertyDefinition abstractPropertyDef = contrailAbstractProperties.get(propertyKey);
+ if (abstractPropertyDef != null) {
+ nestedSubstitutionServiceTemplateInputs
+ .put(propertyKey, DataModelUtil.convertPropertyDefToParameterDef(abstractPropertyDef));
+
+ }
+ }
+ if (!nestedSubstitutionServiceTemplateInputs.isEmpty()) {
+ nestedSubstitutionServiceTemplate.getTopology_template()
+ .setInputs(nestedSubstitutionServiceTemplateInputs);
+ }
+ }
+
+ private String handleComputeNodeTemplate(TranslateTo translateTo, String computeNodeTypeId,
+ ServiceTemplate nestedSubstitutionServiceTemplate,
+ String heatStackGroupKey) {
+ NodeType contrailComputeNodeType =
+ ContrailComputeGlobalType.createServiceTemplate().getNode_types()
+ .get(ToscaNodeType.CONTRAIL_COMPUTE.getDisplayName());
+ Map<String, PropertyDefinition> contrailComputeProperties =
+ contrailComputeNodeType.getProperties();
+ Map<String, Object> computeNodeTemplateProperties = new HashMap<>();
+
+ if (contrailComputeProperties != null) {
+ for (String computePropertyKey : contrailComputeProperties.keySet()) {
+ Map getInputProperty = new HashMap<>();
+ getInputProperty.put(ToscaFunctions.GET_INPUT.getDisplayName(), computePropertyKey);
+ computeNodeTemplateProperties.put(computePropertyKey, getInputProperty);
+ }
+ }
+
+ NodeTemplate computeNodeTemplate = new NodeTemplate();
+ computeNodeTemplate.setType(computeNodeTypeId);
+ if (!computeNodeTemplateProperties.isEmpty()) {
+ computeNodeTemplate.setProperties(computeNodeTemplateProperties);
+ }
+ String computeNodeTemplateId = translateTo.getTranslatedId();
+ DataModelUtil.addNodeTemplate(nestedSubstitutionServiceTemplate, computeNodeTemplateId,
+ computeNodeTemplate);
+ nestedSubstitutionServiceTemplate.getTopology_template().getGroups().get(heatStackGroupKey)
+ .getMembers().add(computeNodeTemplateId);
+
+ return computeNodeTemplateId;
+ }
+
+ private String addHeatStackGroup(TranslateTo translateTo, ServiceTemplate serviceTemplate) {
+ GroupDefinition serviceInstanceGroupDefinition = new GroupDefinition();
+ serviceInstanceGroupDefinition.setType(ToscaGroupType.HEAT_STACK.getDisplayName());
+ Map<String, Object> groupProperties = new HashMap<>();
+ groupProperties.put("heat_file",
+ "../" + (new ToscaFileOutputServiceCsarImpl()).getArtifactsFolderName() + "/"
+ + translateTo.getHeatFileName());
+ serviceInstanceGroupDefinition.setProperties(groupProperties);
+ serviceInstanceGroupDefinition.setMembers(new ArrayList<>());
+ String heatStackGroupKey = translateTo.getTranslatedId();
+ DataModelUtil.addGroupDefinitionToTopologyTemplate(serviceTemplate, heatStackGroupKey,
+ serviceInstanceGroupDefinition);
+
+ return heatStackGroupKey;
+ }
+
+
+ private void setNestedServiceTemplateGeneralDetails(TranslateTo translateTo,
+ ServiceTemplate nestedSubstitutionServiceTemplate) {
+ Metadata nestedTemplateMetadata = new Metadata();
+ String nestedTemplateName = translateTo.getResourceId();
+ nestedTemplateMetadata.setTemplate_name(nestedTemplateName);
+ nestedSubstitutionServiceTemplate.setMetadata(nestedTemplateMetadata);
+ nestedSubstitutionServiceTemplate
+ .setTosca_definitions_version(ToscaConstants.TOSCA_DEFINITIONS_VERSION);
+ nestedSubstitutionServiceTemplate.setTopology_template(new TopologyTemplate());
+ nestedSubstitutionServiceTemplate.setImports(GlobalTypesGenerator.getGlobalTypesImportList());
+ nestedSubstitutionServiceTemplate.getImports()
+ .put(Constants.GLOBAL_SUBSTITUTION_TYPES_TEMPLATE_NAME, GlobalTypesUtil
+ .createServiceTemplateImport(Constants.GLOBAL_SUBSTITUTION_TYPES_TEMPLATE_NAME));
+ }
+
+ private NodeTemplate createSubstitutedNodeTemplate(TranslateTo translateTo,
+ Resource contrailServiceTemplateResource,
+ String contrailServiceTemplateTranslatedId,
+ int numberOfPorts) {
+
+ translateTo.getServiceTemplate().getImports()
+ .put(Constants.GLOBAL_SUBSTITUTION_TYPES_TEMPLATE_NAME, GlobalTypesUtil
+ .createServiceTemplateImport(Constants.GLOBAL_SUBSTITUTION_TYPES_TEMPLATE_NAME));
+ NodeTemplate substitutesNodeTemplate = new NodeTemplate();
+ substitutesNodeTemplate.setType(contrailServiceTemplateTranslatedId);
+ List<String> directiveList = new ArrayList<>();
+ directiveList.add(ToscaConstants.NODE_TEMPLATE_DIRECTIVE_SUBSTITUTABLE);
+ substitutesNodeTemplate.setDirectives(directiveList);
+ substitutesNodeTemplate.setProperties(TranslatorHeatToToscaPropertyConverter
+ .getToscaPropertiesSimpleConversion(translateTo.getResource().getProperties(),
+ substitutesNodeTemplate.getProperties(), translateTo.getHeatFileName(),
+ translateTo.getHeatOrchestrationTemplate(),
+ HeatResourcesTypes.CONTRAIL_SERVICE_INSTANCE.getHeatResource(), substitutesNodeTemplate,
+ translateTo.getContext()));
+ substitutesNodeTemplate.setProperties(TranslatorHeatToToscaPropertyConverter
+ .getToscaPropertiesSimpleConversion(contrailServiceTemplateResource.getProperties(),
+ substitutesNodeTemplate.getProperties(), translateTo.getHeatFileName(),
+ translateTo.getHeatOrchestrationTemplate(),
+ HeatResourcesTypes.CONTRAIL_SERVICE_TEMPLATE.getHeatResource(), substitutesNodeTemplate,
+ translateTo.getContext()));
+ HeatToToscaUtil.mapBoolean(substitutesNodeTemplate, "availability_zone_enable");
+ HeatToToscaUtil.mapBoolean(substitutesNodeTemplate, "ordered_interfaces");
+
+ Object sharedIpListPropertyValue =
+ contrailServiceTemplateResource.getProperties().get("shared_ip_list");
+ Optional<List<Map<String, List>>> sharedIpTranslatedSplitFun =
+ TranslatorHeatToToscaFunctionConverter
+ .translateFnSplitFunction(sharedIpListPropertyValue, numberOfPorts, true);
+ if (sharedIpTranslatedSplitFun.isPresent()) {
+ substitutesNodeTemplate.getProperties()
+ .put("shared_ip_list", sharedIpTranslatedSplitFun.get());
+ } else {
+ HeatToToscaUtil.mapBooleanList(substitutesNodeTemplate, "shared_ip_list");
+ }
+
+ Object staticRouteListPropertyValue =
+ contrailServiceTemplateResource.getProperties().get("static_routes_list");
+ Optional<List<Map<String, List>>> staticRouteTranslatedSplitFun =
+ TranslatorHeatToToscaFunctionConverter
+ .translateFnSplitFunction(staticRouteListPropertyValue, numberOfPorts, true);
+ if (staticRouteTranslatedSplitFun.isPresent()) {
+ substitutesNodeTemplate.getProperties()
+ .put("static_routes_list", staticRouteTranslatedSplitFun.get());
+ } else {
+ HeatToToscaUtil.mapBooleanList(substitutesNodeTemplate, "static_routes_list");
+ }
+
+ Object serviceInterfaceTypeListPropertyValue =
+ contrailServiceTemplateResource.getProperties().get("service_interface_type_list");
+ Optional<List<Map<String, List>>> serviceInterfaceTypeTranslatedSplitFun =
+ TranslatorHeatToToscaFunctionConverter
+ .translateFnSplitFunction(serviceInterfaceTypeListPropertyValue, numberOfPorts, false);
+ if (serviceInterfaceTypeTranslatedSplitFun.isPresent()) {
+ substitutesNodeTemplate.getProperties()
+ .put("service_interface_type_list", serviceInterfaceTypeTranslatedSplitFun.get());
+ }
+
+ String substitutedNodeTemplateId = translateTo.getTranslatedId();
+ DataModelUtil.addNodeTemplate(translateTo.getServiceTemplate(), substitutedNodeTemplateId,
+ substitutesNodeTemplate);
+ return substitutesNodeTemplate;
+ }
+
+ private void addNetworkLinkRequirements(NodeType nodeType, int numberOfPorts) {
+ if (nodeType.getRequirements() == null) {
+ List<Map<String, RequirementDefinition>> requirementList = new ArrayList<>();
+ for (int i = 0; i < numberOfPorts; i++) {
+ Map<String, RequirementDefinition> requirementDefinitionMap = new HashMap<>();
+ requirementDefinitionMap.put(ToscaConstants.LINK_REQUIREMENT_ID + "_port_" + i,
+ DataModelUtil.createRequirement(ToscaCapabilityType.NETWORK_LINKABLE.getDisplayName(),
+ ToscaNodeType.ROOT.getDisplayName(),
+ ToscaRelationshipType.NETWORK_LINK_TO.getDisplayName(), null));
+ requirementList.add(requirementDefinitionMap);
+ }
+ if (numberOfPorts > 0) {
+ nodeType.setRequirements(requirementList);
+ }
+ }
+ }
+
+ private int getServiceInstanceNumberOfPorts(Resource serviceInstanceResource) {
+ int numberOfPorts;
+ Object interfaceTypeProperty = serviceInstanceResource.getProperties().get("interface_list");
+ if (interfaceTypeProperty == null) {
+ numberOfPorts = 0;
+ } else if (interfaceTypeProperty instanceof List) {
+ numberOfPorts = ((List) interfaceTypeProperty).size();
+ } else if (interfaceTypeProperty instanceof Map) {
+ numberOfPorts = 1;
+ } else {
+ numberOfPorts = 0;
+ }
+
+ return numberOfPorts;
+ }
+
+ private AttachedResourceId getServiceTemplateAttachedId(TranslateTo translateTo,
+ Resource serviceInstanceResource) {
+ Object serviceTemplateProperty =
+ serviceInstanceResource.getProperties().get("service_template");
+ Optional<AttachedResourceId> serviceTemplateId = HeatToToscaUtil
+ .extractAttachedResourceId(translateTo.getHeatFileName(),
+ translateTo.getHeatOrchestrationTemplate(), translateTo.getContext(),
+ serviceTemplateProperty);
+ if (serviceTemplateId.isPresent()) {
+ return serviceTemplateId.get();
+ } else {
+ throw new CoreException(new MissingMandatoryPropertyErrorBuilder("service_template").build());
+ }
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailServiceTemplateImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailServiceTemplateImpl.java
new file mode 100644
index 0000000000..e0a3ed422f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailServiceTemplateImpl.java
@@ -0,0 +1,100 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.model.Metadata;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+import org.openecomp.sdc.translator.services.heattotosca.Constants;
+import org.openecomp.sdc.translator.services.heattotosca.errors.MissingMandatoryPropertyErrorBuilder;
+import org.openecomp.sdc.translator.services.heattotosca.globaltypes.GlobalTypesGenerator;
+import org.openecomp.sdc.translator.services.heattotosca.helper.ContrailTranslationHelper;
+
+import java.util.Map;
+import java.util.Objects;
+
+public class ResourceTranslationContrailServiceTemplateImpl extends ResourceTranslationBase {
+
+ static String getContrailSubstitutedNodeTypeId(String serviceTemplateTranslatedId) {
+ return ToscaConstants.NODES_SUBSTITUTION_PREFIX + serviceTemplateTranslatedId;
+ }
+
+ @Override
+ protected boolean isEssentialRequirementsValid(TranslateTo translateTo) {
+ Map<String, Object> properties = translateTo.getResource().getProperties();
+ if (Objects.isNull(properties) || Objects.isNull(properties.get("image_name"))) {
+ throw new CoreException(new MissingMandatoryPropertyErrorBuilder("image_name").build());
+ }
+ return true;
+ }
+
+ @Override
+ public void translate(TranslateTo translateTo) {
+
+ ServiceTemplate globalSubstitutionServiceTemplate =
+ getGlobalSubstitutionTypesServiceTemplate(translateTo);
+ addSubstitutedNodeType(translateTo, globalSubstitutionServiceTemplate);
+ addComputeNodeType(translateTo, globalSubstitutionServiceTemplate);
+ }
+
+ private void addComputeNodeType(TranslateTo translateTo,
+ ServiceTemplate globalSubstitutionServiceTemplate) {
+ NodeType computeNodeType = new NodeType();
+ computeNodeType.setDerived_from(ToscaNodeType.CONTRAIL_COMPUTE.getDisplayName());
+ String computeNodeTypeId = new ContrailTranslationHelper()
+ .getComputeNodeTypeId(translateTo.getTranslatedId(), translateTo.getResource());
+ DataModelUtil
+ .addNodeType(globalSubstitutionServiceTemplate, computeNodeTypeId, computeNodeType);
+ }
+
+ private void addSubstitutedNodeType(TranslateTo translateTo,
+ ServiceTemplate globalSubstitutionServiceTemplate) {
+ NodeType substitutedNodeType = new NodeType();
+ substitutedNodeType
+ .setDerived_from(ToscaNodeType.CONTRAIL_ABSTRACT_SUBSTITUTE.getDisplayName());
+ DataModelUtil.addNodeType(globalSubstitutionServiceTemplate,
+ getContrailSubstitutedNodeTypeId(translateTo.getTranslatedId()), substitutedNodeType);
+ }
+
+ private ServiceTemplate getGlobalSubstitutionTypesServiceTemplate(TranslateTo translateTo) {
+ ServiceTemplate globalSubstitutionServiceTemplate =
+ translateTo.getContext().getTranslatedServiceTemplates()
+ .get(Constants.GLOBAL_SUBSTITUTION_TYPES_TEMPLATE_NAME);
+ if (globalSubstitutionServiceTemplate == null) {
+ globalSubstitutionServiceTemplate = new ServiceTemplate();
+ Metadata templateMetadata = new Metadata();
+ templateMetadata.setTemplate_name(Constants.GLOBAL_SUBSTITUTION_TYPES_TEMPLATE_NAME);
+ globalSubstitutionServiceTemplate.setMetadata(templateMetadata);
+ globalSubstitutionServiceTemplate.setImports(GlobalTypesGenerator.getGlobalTypesImportList());
+ globalSubstitutionServiceTemplate
+ .setTosca_definitions_version(ToscaConstants.TOSCA_DEFINITIONS_VERSION);
+ translateTo.getContext().getTranslatedServiceTemplates()
+ .put(Constants.GLOBAL_SUBSTITUTION_TYPES_TEMPLATE_NAME,
+ globalSubstitutionServiceTemplate);
+ }
+ return globalSubstitutionServiceTemplate;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailV2NetworkPolicyImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailV2NetworkPolicyImpl.java
new file mode 100644
index 0000000000..72a25985a8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailV2NetworkPolicyImpl.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+import org.openecomp.sdc.translator.services.heattotosca.mapping.TranslatorHeatToToscaPropertyConverter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ResourceTranslationContrailV2NetworkPolicyImpl extends ResourceTranslationBase {
+
+ protected static Logger logger =
+ LoggerFactory.getLogger(ResourceTranslationContrailV2NetworkPolicyImpl.class);
+
+ @Override
+ protected void translate(TranslateTo translateTo) {
+
+ NodeTemplate nodeTemplate = new NodeTemplate();
+ nodeTemplate.setType(ToscaNodeType.CONTRAILV2_NETWORK_RULE.getDisplayName());
+ nodeTemplate.setProperties(TranslatorHeatToToscaPropertyConverter
+ .getToscaPropertiesSimpleConversion(translateTo.getResource().getProperties(),
+ nodeTemplate.getProperties(), translateTo.getHeatFileName(),
+ translateTo.getHeatOrchestrationTemplate(), translateTo.getResource().getType(),
+ nodeTemplate, translateTo.getContext()));
+ DataModelUtil.addNodeTemplate(translateTo.getServiceTemplate(), translateTo.getTranslatedId(),
+ nodeTemplate);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailV2VirtualNetworkImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailV2VirtualNetworkImpl.java
new file mode 100644
index 0000000000..d81f3196a3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailV2VirtualNetworkImpl.java
@@ -0,0 +1,209 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.apache.commons.collections.CollectionUtils;
+import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
+import org.openecomp.sdc.translator.datatypes.heattotosca.ResourceReferenceType;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
+import org.openecomp.sdc.translator.services.heattotosca.ResourceTranslationFactory;
+import org.openecomp.sdc.translator.services.heattotosca.mapping.TranslatorHeatToToscaPropertyConverter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+public class ResourceTranslationContrailV2VirtualNetworkImpl extends ResourceTranslationBase {
+
+ protected static Logger logger =
+ LoggerFactory.getLogger(ResourceTranslationContrailV2VirtualNetworkImpl.class);
+
+ @Override
+ public void translate(TranslateTo translateTo) {
+
+ NodeTemplate nodeTemplate = new NodeTemplate();
+ nodeTemplate.setType(ToscaNodeType.CONTRAILV2_VIRTUAL_NETWORK.getDisplayName());
+ nodeTemplate.setProperties(TranslatorHeatToToscaPropertyConverter
+ .getToscaPropertiesSimpleConversion(translateTo.getResource().getProperties(),
+ nodeTemplate.getProperties(), translateTo.getHeatFileName(),
+ translateTo.getHeatOrchestrationTemplate(), translateTo.getResource().getType(),
+ nodeTemplate, translateTo.getContext()));
+ Optional<String> resourceTranslatedId = getResourceTranslatedId(translateTo.getHeatFileName(),
+ translateTo.getHeatOrchestrationTemplate(), translateTo.getResourceId(),
+ translateTo.getContext());
+ if (resourceTranslatedId.isPresent()) {
+ DataModelUtil.addNodeTemplate(translateTo.getServiceTemplate(), resourceTranslatedId.get(),
+ nodeTemplate);
+ }
+ linkToPolicyNodeTemplate(translateTo);
+ }
+
+ private void linkToPolicyNodeTemplate(TranslateTo translateTo) {
+ List<AttachedResourceId> networkPolicyIdList = extractNetworkPolicyIdList(translateTo);
+ if (CollectionUtils.isEmpty(networkPolicyIdList)) {
+ return;
+ }
+ for (AttachedResourceId attachedResourceId : networkPolicyIdList) {
+ NodeTemplate policyNodeTemplate = DataModelUtil
+ .getNodeTemplate(translateTo.getServiceTemplate(),
+ (String) attachedResourceId.getTranslatedId());
+ DataModelUtil
+ .addRequirementAssignment(policyNodeTemplate, ToscaConstants.NETWORK_REQUIREMENT_ID,
+ createRequirementAssignment(translateTo.getTranslatedId()));
+ }
+ }
+
+ private List<AttachedResourceId> extractNetworkPolicyIdList(TranslateTo translateTo) {
+
+ Object propertyValue = translateTo.getResource().getProperties().get("network_policy_refs");
+ if (propertyValue != null) {
+ return extractNetworkPolicyId(propertyValue, translateTo);
+ } else {
+ return null;
+ }
+ }
+
+ private List<AttachedResourceId> extractNetworkPolicyId(Object propertyValue,
+ TranslateTo translateTo) {
+ List<AttachedResourceId> attachedResourceIdList = new ArrayList<>();
+
+ if (propertyValue instanceof List) {
+ for (Object value : (List) propertyValue) {
+ attachedResourceIdList.addAll(extractNetworkPolicyId(value, translateTo));
+ }
+ } else {
+ AttachedResourceId resourceId = parsNetworkPolicyId(propertyValue, translateTo);
+ if (resourceId != null) {
+ attachedResourceIdList.add(resourceId);
+ }
+ }
+ return attachedResourceIdList;
+ }
+
+ private AttachedResourceId parsNetworkPolicyId(Object propertyValue, TranslateTo translateTo) {
+
+ Optional<String> translatedPolicyResourceId;
+ String policyResourceId = extractResourceId(propertyValue, translateTo);
+ if (policyResourceId == null) {
+ return null;
+ }
+
+ Resource policyResource = HeatToToscaUtil
+ .getResource(translateTo.getHeatOrchestrationTemplate(), policyResourceId,
+ translateTo.getHeatFileName());
+ if (!policyResource.getType()
+ .equals(HeatResourcesTypes.CONTRAIL_V2_NETWORK_RULE_RESOURCE_TYPE.getHeatResource())) {
+ return null;
+ }
+ translatedPolicyResourceId = ResourceTranslationFactory.getInstance(policyResource)
+ .translateResource(translateTo.getHeatFileName(), translateTo.getServiceTemplate(),
+ translateTo.getHeatOrchestrationTemplate(), policyResource, policyResourceId,
+ translateTo.getContext());
+ if (!translatedPolicyResourceId.isPresent()) {
+ logger.warn("Heat resource: '" + translateTo.getResourceId() + "' with type: '"
+ + translateTo.getResource().getType()
+ + "' property network_policy_refs is referenced to an "
+ + "unsupported resource the connection will be ignored in TOSCA translation.");
+ return null;
+ }
+ return
+ new AttachedResourceId(translatedPolicyResourceId.get(), policyResourceId,
+ ResourceReferenceType.GET_ATTR);
+ }
+
+ private String extractResourceId(Object propertyValue, TranslateTo translateTo) {
+
+ Object value;
+ if (propertyValue instanceof Map) {
+ if (((Map) propertyValue).containsKey("get_attr")) {
+ value = ((Map) propertyValue).get("get_attr");
+ if (value instanceof List) {
+ if (((List) value).size() == 2 && ((List) value).get(1).equals("fq_name")) {
+ if (((List) value).get(0) instanceof String) {
+ return (String) ((List) value).get(0);
+ } else {
+ logger.warn("Heat resource: '" + translateTo.getResourceId() + "' with type: '"
+ + translateTo.getResource().getType()
+ + "' has property with invalid format of 'get_attr' function "
+ + "with 'fq_name' value, therefore this property"
+ + " will be ignored in TOSCA translation.");
+ }
+ }
+ }
+ } else if (((Map) propertyValue).containsKey("get_resource")) {
+ value = ((Map) propertyValue).get("get_resource");
+ if (value instanceof String) {
+ return (String) value;
+ } else {
+ logger.warn("Heat resource: '" + translateTo.getResourceId() + "' with type: '"
+ + translateTo.getResource().getType()
+ + "' has property invalid format of 'get_resource' function, therefore"
+ + " this property will be ignored in TOSCA translation.");
+ }
+ } else {
+ Collection<Object> valCollection = ((Map) propertyValue).values();
+ for (Object entryValue : valCollection) {
+ String ret = extractResourceId(entryValue, translateTo);
+ if (ret != null) {
+ return ret;
+ }
+
+ }
+ }
+ } else if (propertyValue instanceof List) {
+ for (Object prop : (List) propertyValue) {
+ String ret = extractResourceId(prop, translateTo);
+ if (ret != null) {
+ return ret;
+ }
+ }
+ }
+ logger.warn("Heat resource: '" + translateTo.getResourceId() + "' with type: '"
+ + translateTo.getResource().getType()
+ + "' invalid format of property value, therefore "
+ + "this resource will be ignored in TOSCA translation.");
+ return null;
+ }
+
+ private RequirementAssignment createRequirementAssignment(String translatedNetworkResourceId) {
+ RequirementAssignment requirement = new RequirementAssignment();
+ requirement.setCapability(ToscaCapabilityType.ATTACHMENT.getDisplayName());
+ requirement.setNode(translatedNetworkResourceId);
+ requirement.setRelationship(ToscaRelationshipType.ATTACHES_TO.getDisplayName());
+ return requirement;
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailV2VmInterfaceImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailV2VmInterfaceImpl.java
new file mode 100644
index 0000000000..14403df002
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailV2VmInterfaceImpl.java
@@ -0,0 +1,126 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslatedHeatResource;
+import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
+import org.openecomp.sdc.translator.services.heattotosca.mapping.TranslatorHeatToToscaPropertyConverter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+
+
+public class ResourceTranslationContrailV2VmInterfaceImpl extends ResourceTranslationBase {
+ protected static Logger logger =
+ LoggerFactory.getLogger(ResourceTranslationContrailV2VmInterfaceImpl.class);
+
+ @Override
+ protected void translate(TranslateTo translateTo) {
+ NodeTemplate nodeTemplate = new NodeTemplate();
+ nodeTemplate.setType(ToscaNodeType.CONTRAILV2_VIRTUAL_MACHINE_INTERFACE.getDisplayName());
+
+ nodeTemplate.setProperties(TranslatorHeatToToscaPropertyConverter
+ .getToscaPropertiesSimpleConversion(translateTo.getResource().getProperties(),
+ nodeTemplate.getProperties(), translateTo.getHeatFileName(),
+ translateTo.getHeatOrchestrationTemplate(), translateTo.getResource().getType(),
+ nodeTemplate, translateTo.getContext()));
+ handleNetworkRequirement(translateTo, nodeTemplate);
+ Optional<String> resourceTranslatedId = getResourceTranslatedId(translateTo.getHeatFileName(),
+ translateTo.getHeatOrchestrationTemplate(), translateTo.getResourceId(),
+ translateTo.getContext());
+ if (resourceTranslatedId.isPresent()) {
+ DataModelUtil.addNodeTemplate(translateTo.getServiceTemplate(), resourceTranslatedId.get(),
+ nodeTemplate);
+ }
+ }
+
+ private void handleNetworkRequirement(TranslateTo translateTo, NodeTemplate nodeTemplate) {
+ Object virtualNetworkRefs =
+ translateTo.getResource().getProperties().get("virtual_network_refs");
+ if (Objects.isNull(virtualNetworkRefs) || !(virtualNetworkRefs instanceof List)
+ || ((List) virtualNetworkRefs).size() == 0) {
+ return;
+ }
+ List<String> acceptableResourceTypes = Arrays
+ .asList(HeatResourcesTypes.NEUTRON_NET_RESOURCE_TYPE.getHeatResource(),
+ HeatResourcesTypes.CONTRAIL_V2_VIRTUAL_NETWORK_RESOURCE_TYPE.getHeatResource());
+ List virtualNetworkRefList = (List) virtualNetworkRefs;
+ if (virtualNetworkRefList.size() > 1) {
+ logger.warn("Heat resource: '" + translateTo.getResourceId() + "' with type: '"
+ + translateTo.getResource().getType()
+ + "' include 'virtual_network_refs' property with more than one network values,"
+ + " only the first network will be translated, "
+ + "all rest will be ignored in TOSCA translation.");
+ }
+ Object virtualNetworkRef = virtualNetworkRefList.get(0);
+ String networkResourceId =
+ HeatToToscaUtil.extractContrailGetResourceAttachedHeatResourceId(virtualNetworkRef);
+ if (Objects.nonNull(networkResourceId)) { // get_resource
+ Resource networkResource = HeatToToscaUtil
+ .getResource(translateTo.getHeatOrchestrationTemplate(), networkResourceId,
+ translateTo.getHeatFileName());
+ if (acceptableResourceTypes.contains(networkResource.getType())) {
+ Optional<String> resourceTranslatedId =
+ getResourceTranslatedId(translateTo.getHeatFileName(),
+ translateTo.getHeatOrchestrationTemplate(), networkResourceId,
+ translateTo.getContext());
+ if (resourceTranslatedId.isPresent()) {
+ addLinkReqFromPortToNetwork(nodeTemplate, resourceTranslatedId.get());
+ }
+ } else {
+ logger.warn("Heat resource: '" + translateTo.getResourceId() + "' with type: '"
+ + translateTo.getResource().getType()
+ + "' include 'virtual_network_refs' property which is connect"
+ + " to unsupported/incorrect resource with type '"
+ + networkResource.getType()
+ + "', therefore, this connection will be ignored in TOSCA translation.");
+ }
+ } else {
+ Optional<AttachedResourceId> attachedResourceId = HeatToToscaUtil
+ .extractAttachedResourceId(translateTo.getHeatFileName(),
+ translateTo.getHeatOrchestrationTemplate(), translateTo.getContext(),
+ virtualNetworkRef);
+ if (attachedResourceId.isPresent() && attachedResourceId.get().isGetParam()) {
+ TranslatedHeatResource translatedSharedResourceId =
+ translateTo.getContext().getHeatSharedResourcesByParam()
+ .get(attachedResourceId.get().getEntityId());
+ if (Objects.nonNull(translatedSharedResourceId)
+ && !HeatToToscaUtil.isHeatFileNested(translateTo, translateTo.getHeatFileName())) {
+ addLinkReqFromPortToNetwork(nodeTemplate, translatedSharedResourceId.getTranslatedId());
+ }
+ }
+ }
+
+
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailVirtualNetworkImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailVirtualNetworkImpl.java
new file mode 100644
index 0000000000..3a3a532d59
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailVirtualNetworkImpl.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+import org.openecomp.sdc.translator.services.heattotosca.mapping.TranslatorHeatToToscaPropertyConverter;
+
+import java.util.Optional;
+
+public class ResourceTranslationContrailVirtualNetworkImpl extends ResourceTranslationBase {
+
+ @Override
+ public void translate(TranslateTo translateTo) {
+
+ NodeTemplate nodeTemplate = new NodeTemplate();
+ nodeTemplate.setType(ToscaNodeType.CONTRAIL_VIRTUAL_NETWORK.getDisplayName());
+ nodeTemplate.setProperties(TranslatorHeatToToscaPropertyConverter
+ .getToscaPropertiesSimpleConversion(translateTo.getResource().getProperties(),
+ nodeTemplate.getProperties(), translateTo.getHeatFileName(),
+ translateTo.getHeatOrchestrationTemplate(), translateTo.getResource().getType(),
+ nodeTemplate, translateTo.getContext()));
+ Optional<String> resourceTranslatedId = getResourceTranslatedId(translateTo.getHeatFileName(),
+ translateTo.getHeatOrchestrationTemplate(), translateTo.getResourceId(),
+ translateTo.getContext());
+ if (resourceTranslatedId.isPresent()) {
+ DataModelUtil.addNodeTemplate(translateTo.getServiceTemplate(), resourceTranslatedId.get(),
+ nodeTemplate);
+ }
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationDefaultImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationDefaultImpl.java
new file mode 100644
index 0000000000..1182b60a6a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationDefaultImpl.java
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+
+public class ResourceTranslationDefaultImpl extends ResourceTranslationBase {
+
+ @Override
+ protected String generateTranslatedId(TranslateTo translateTo) {
+ return null;
+ }
+
+ @Override
+ public void translate(TranslateTo translateTo) {
+ //no translation is needed, this default is used for unsupported resources
+ logger.warn("Heat resource: '" + translateTo.getResourceId() + "' with type: '"
+ + translateTo.getResource().getType()
+ + "' is not supported, will be ignored in TOSCA translation");
+
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNestedImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNestedImpl.java
new file mode 100644
index 0000000000..2573b6849d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNestedImpl.java
@@ -0,0 +1,781 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections4.MapUtils;
+import org.openecomp.core.utilities.file.FileUtils;
+import org.openecomp.sdc.heat.datatypes.manifest.FileData;
+import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
+import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.heat.services.HeatConstants;
+import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
+import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.Metadata;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.ParameterDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.SubstitutionMapping;
+import org.openecomp.sdc.tosca.datatypes.model.Template;
+import org.openecomp.sdc.tosca.datatypes.model.TopologyTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.tosca.services.ToscaUtil;
+import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.ResourceFileDataAndIDs;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+import org.openecomp.sdc.translator.services.heattotosca.Constants;
+import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
+import org.openecomp.sdc.translator.services.heattotosca.TranslationContext;
+import org.openecomp.sdc.translator.services.heattotosca.TranslationService;
+import org.openecomp.sdc.translator.services.heattotosca.globaltypes.GlobalTypesGenerator;
+import org.openecomp.sdc.translator.services.heattotosca.globaltypes.GlobalTypesUtil;
+import org.openecomp.sdc.translator.services.heattotosca.mapping.TranslatorHeatToToscaPropertyConverter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+public class ResourceTranslationNestedImpl extends ResourceTranslationBase {
+
+ protected static Logger logger = LoggerFactory.getLogger(ResourceTranslationNestedImpl.class);
+
+ @Override
+ public void translate(TranslateTo translateTo) {
+ FileData nestedFileData =
+ getFileData(translateTo.getResource().getType(), translateTo.getContext());
+ String templateName = FileUtils.getFileWithoutExtention(translateTo.getResource().getType());
+ String substitutionNodeTypeKey = ToscaConstants.NODES_SUBSTITUTION_PREFIX + templateName;
+
+ if (!translateTo.getContext().getTranslatedServiceTemplates()
+ .containsKey(translateTo.getResource().getType())) {
+
+ //substitution template
+ ServiceTemplate nestedSubstitutionServiceTemplate = new ServiceTemplate();
+ Metadata templateMetadata = new Metadata();
+ templateMetadata.setTemplate_name(templateName);
+ nestedSubstitutionServiceTemplate.setMetadata(templateMetadata);
+ nestedSubstitutionServiceTemplate
+ .setTosca_definitions_version(ToscaConstants.TOSCA_DEFINITIONS_VERSION);
+ nestedSubstitutionServiceTemplate.setTopology_template(new TopologyTemplate());
+ nestedSubstitutionServiceTemplate.setImports(GlobalTypesGenerator.getGlobalTypesImportList());
+ nestedSubstitutionServiceTemplate.getImports()
+ .put(Constants.GLOBAL_SUBSTITUTION_TYPES_TEMPLATE_NAME, GlobalTypesUtil
+ .createServiceTemplateImport(Constants.GLOBAL_SUBSTITUTION_TYPES_TEMPLATE_NAME));
+
+ TranslationService translationService = new TranslationService();
+
+ translationService.translateHeatFile(nestedSubstitutionServiceTemplate, nestedFileData,
+ translateTo.getContext());
+
+ //global substitution template
+ ServiceTemplate globalSubstitutionServiceTemplate;
+ globalSubstitutionServiceTemplate = translateTo.getContext().getTranslatedServiceTemplates()
+ .get(Constants.GLOBAL_SUBSTITUTION_TYPES_TEMPLATE_NAME);
+ if (globalSubstitutionServiceTemplate == null) {
+ globalSubstitutionServiceTemplate = new ServiceTemplate();
+ templateMetadata = new Metadata();
+ templateMetadata.setTemplate_name(Constants.GLOBAL_SUBSTITUTION_TYPES_TEMPLATE_NAME);
+ globalSubstitutionServiceTemplate.setMetadata(templateMetadata);
+ globalSubstitutionServiceTemplate
+ .setImports(GlobalTypesGenerator.getGlobalTypesImportList());
+ globalSubstitutionServiceTemplate
+ .setTosca_definitions_version(ToscaConstants.TOSCA_DEFINITIONS_VERSION);
+ }
+ translateTo.getServiceTemplate().getImports()
+ .put(Constants.GLOBAL_SUBSTITUTION_TYPES_TEMPLATE_NAME, GlobalTypesUtil
+ .createServiceTemplateImport(Constants.GLOBAL_SUBSTITUTION_TYPES_TEMPLATE_NAME));
+
+
+ //substitution node type
+ NodeType substitutionNodeType = new NodeType();
+ substitutionNodeType.setDerived_from(ToscaNodeType.ABSTRACT_SUBSTITUTE.getDisplayName());
+ substitutionNodeType.setDescription(nestedSubstitutionServiceTemplate.getDescription());
+ substitutionNodeType
+ .setProperties(manageSubstitutionNodeTypeProperties(nestedSubstitutionServiceTemplate));
+ substitutionNodeType
+ .setAttributes(manageSubstitutionNodeTypeAttributes(nestedSubstitutionServiceTemplate));
+ DataModelUtil.addNodeType(globalSubstitutionServiceTemplate, substitutionNodeTypeKey,
+ substitutionNodeType);
+ Map<String, Map<String, List<String>>> substitutionMapping =
+ manageSubstitutionNodeTypeCapabilitiesAndRequirements(substitutionNodeType,
+ nestedSubstitutionServiceTemplate, translateTo);
+ //calculate substitution mapping after capability and requirement expose calculation
+ nestedSubstitutionServiceTemplate.getTopology_template().setSubstitution_mappings(
+ manageSubstitutionTemplateSubstitutionMapping(substitutionNodeTypeKey,
+ substitutionNodeType, substitutionMapping));
+
+ //add new service template
+ translateTo.getContext().getTranslatedServiceTemplates()
+ .put(Constants.GLOBAL_SUBSTITUTION_TYPES_TEMPLATE_NAME,
+ globalSubstitutionServiceTemplate);
+ translateTo.getContext().getTranslatedServiceTemplates()
+ .put(translateTo.getResource().getType(), nestedSubstitutionServiceTemplate);
+ }
+
+ NodeTemplate substitutionNodeTemplate = new NodeTemplate();
+ List<String> directiveList = new ArrayList<>();
+ directiveList.add(ToscaConstants.NODE_TEMPLATE_DIRECTIVE_SUBSTITUTABLE);
+ substitutionNodeTemplate.setDirectives(directiveList);
+ substitutionNodeTemplate.setType(substitutionNodeTypeKey);
+ substitutionNodeTemplate.setProperties(
+ managerSubstitutionNodeTemplateProperties(translateTo, substitutionNodeTemplate,
+ templateName));
+ manageSubstitutionNodeTemplateConnectionPoint(translateTo, nestedFileData,
+ substitutionNodeTemplate);
+ DataModelUtil.addNodeTemplate(translateTo.getServiceTemplate(), translateTo.getTranslatedId(),
+ substitutionNodeTemplate);
+ }
+
+ private void manageSubstitutionNodeTemplateConnectionPoint(TranslateTo translateTo,
+ FileData nestedFileData,
+ NodeTemplate substitutionNodeTemplate) {
+ ServiceTemplate globalSubstitutionTemplate =
+ translateTo.getContext().getTranslatedServiceTemplates()
+ .get(Constants.GLOBAL_SUBSTITUTION_TYPES_TEMPLATE_NAME);
+ NodeType nodeType = globalSubstitutionTemplate.getNode_types().get(
+ ToscaConstants.NODES_SUBSTITUTION_PREFIX
+ + FileUtils.getFileWithoutExtention(translateTo.getResource().getType()));
+ handlePortToNetConnections(translateTo, nestedFileData, substitutionNodeTemplate, nodeType);
+ handleSecurityRulesToPortConnections(translateTo, nestedFileData, substitutionNodeTemplate,
+ nodeType);
+ handleNovaToVolConnection(translateTo, nestedFileData, substitutionNodeTemplate, nodeType);
+ handleContrailV2VmInterfaceToNetworkConnection(translateTo, nestedFileData,
+ substitutionNodeTemplate, nodeType);
+ }
+
+ private void handleContrailV2VmInterfaceToNetworkConnection(TranslateTo translateTo,
+ FileData nestedFileData,
+ NodeTemplate substitutionNodeTemplate,
+ NodeType nodeType) {
+ ContrailV2VmInterfaceToNetResourceConnection linker =
+ new ContrailV2VmInterfaceToNetResourceConnection(this, translateTo, nestedFileData,
+ substitutionNodeTemplate, nodeType);
+ linker.connect();
+ }
+
+ private void handleNovaToVolConnection(TranslateTo translateTo, FileData nestedFileData,
+ NodeTemplate substitutionNodeTemplate, NodeType nodeType) {
+ NovaToVolResourceConnection linker =
+ new NovaToVolResourceConnection(this, translateTo, nestedFileData, substitutionNodeTemplate,
+ nodeType);
+ linker.connect();
+ }
+
+ private void handleSecurityRulesToPortConnections(TranslateTo translateTo,
+ FileData nestedFileData,
+ NodeTemplate substitutionNodeTemplate,
+ NodeType nodeType) {
+ SecurityRulesToPortResourceConnection linker =
+ new SecurityRulesToPortResourceConnection(this, translateTo, nestedFileData,
+ substitutionNodeTemplate, nodeType);
+ linker.connect();
+ }
+
+ private void handlePortToNetConnections(TranslateTo translateTo, FileData nestedFileData,
+ NodeTemplate substitutionNodeTemplate,
+ NodeType nodeType) {
+ PortToNetResourceConnection linker =
+ new PortToNetResourceConnection(this, translateTo, nestedFileData, substitutionNodeTemplate,
+ nodeType);
+ linker.connect();
+ }
+
+ private List<Map<String, RequirementDefinition>> getVolumeRequirements(NodeType nodeType) {
+ List<Map<String, RequirementDefinition>> volumeRequirementsList = new ArrayList<>();
+ List<Map<String, RequirementDefinition>> requirementsList = nodeType.getRequirements();
+
+ for (int i = 0; requirementsList != null && i < requirementsList.size(); i++) {
+ RequirementDefinition req;
+ for (Map.Entry<String, RequirementDefinition> entry : requirementsList.get(i).entrySet()) {
+ req = entry.getValue();
+ if (isVolumeRequirement(req, ToscaCapabilityType.ATTACHMENT.getDisplayName(),
+ ToscaNodeType.BLOCK_STORAGE.getDisplayName(),
+ ToscaRelationshipType.NATIVE_ATTACHES_TO.getDisplayName())) {
+ Map<String, RequirementDefinition> volumeRequirementsMap = new HashMap<>();
+ volumeRequirementsMap.put(entry.getKey(), entry.getValue());
+ volumeRequirementsList.add(volumeRequirementsMap);
+ }
+
+ }
+ }
+ return volumeRequirementsList;
+ }
+
+ private boolean isVolumeRequirement(RequirementDefinition req, String capability, String node,
+ String relationship) {
+ return req.getCapability().equals(capability) && req.getRelationship().equals(relationship)
+ && req.getNode().equals(node);
+ }
+
+ private String getVolumeIdProperty(HeatOrchestrationTemplate heatOrchestrationTemplate,
+ String resourceId) {
+
+ String novaResourceId;
+ String volumeId = null;
+ for (Resource resource : heatOrchestrationTemplate.getResources().values()) {
+ if (resource.getType()
+ .equals(HeatResourcesTypes.CINDER_VOLUME_ATTACHMENT_RESOURCE_TYPE.getHeatResource())) {
+ Optional<String> optNovaResourceId =
+ getToscaPropertyValueSource(HeatConstants.INSTANCE_UUID_PROPERTY_NAME, resource,
+ "get_resource");
+ if (optNovaResourceId.isPresent()) {
+ novaResourceId = optNovaResourceId.get();
+ if (novaResourceId.equals(resourceId)) {
+ Optional<String> optVolumeId =
+ getToscaPropertyValueSource(HeatConstants.VOLUME_ID_PROPERTY_NAME, resource,
+ "get_param");
+ if (optVolumeId.isPresent()) {
+ volumeId = optVolumeId.get();
+ }
+ } else {
+ logger.warn("property:" + HeatConstants.VOLUME_ID_PROPERTY_NAME + " of resource type:"
+ + resource.getType() + " should contain 'get_param' function");
+ }
+ }
+ }
+ }
+ return volumeId;
+ }
+
+ private String getTranslatedVolumeIdByVolumeIdProperty(String volumeId, TranslateTo translateTo) {
+ Optional<AttachedResourceId> volumeIdInfo =
+ HeatToToscaUtil.extractAttachedResourceId(translateTo, volumeId);
+ if (volumeIdInfo.isPresent()) {
+ if (volumeIdInfo.get().isGetResource()) {
+ return null;//(String) volumeIdInfo.get().getTranslatedId();
+ } else if (volumeIdInfo.get().isGetParam()) {
+ List<FileData> allFilesData = translateTo.getContext().getManifest().getContent().getData();
+ Optional<List<FileData>> fileDataList = HeatToToscaUtil
+ .buildListOfFilesToSearch(translateTo.getHeatFileName(), allFilesData,
+ FileData.Type.HEAT_VOL);
+ if (fileDataList.isPresent()) {
+ Optional<ResourceFileDataAndIDs> resourceFileDataAndIDs =
+ getFileDataContainingResource(fileDataList.get(),
+ (String) volumeIdInfo.get().getEntityId(), translateTo.getContext(),
+ FileData.Type.HEAT_VOL);
+ if (resourceFileDataAndIDs.isPresent()) {
+ return resourceFileDataAndIDs.get().getTranslatedResourceId();
+ } else {
+ logger.warn("The attached volume based on volume_id property: " + volumeId + " in "
+ + translateTo.getResourceId()
+ + " can't be found, searching for volume resource id - "
+ + volumeIdInfo.get().getEntityId());
+ return null;
+ }
+ } else {
+ return null;
+ }
+ } else {
+ logger.warn("property:" + volumeId + " of resource :" + volumeIdInfo.get().getEntityId()
+ + " should contain 'get_param' or 'get_resource' function");
+ return null;
+ }
+ } else {
+ logger.warn("property:" + volumeId + " of resource :" + translateTo.getResource().toString()
+ + " is not exist");
+ return null;
+ }
+ }
+
+ private Optional<String> getToscaPropertyValueSource(String propertyName, Resource resource,
+ String key) {
+ Object propertyInstanceUuIdValue;
+ propertyInstanceUuIdValue = resource.getProperties().get(propertyName);
+ if (propertyInstanceUuIdValue instanceof Map) {
+ return Optional.ofNullable((String) ((Map) propertyInstanceUuIdValue).get(key));
+ } else {
+ logger.warn("property:" + propertyName + " of resource type:" + resource.getType()
+ + " should have a value in key value format");
+
+ }
+ return Optional.empty();
+
+ }
+
+ private Map<String, Map<String, List<String>>>
+ manageSubstitutionNodeTypeCapabilitiesAndRequirements(
+ NodeType substitutionNodeType, ServiceTemplate substitutionServiceTemplate,
+ TranslateTo translateTo) {
+
+ Map<String, NodeTemplate> nodeTemplates =
+ substitutionServiceTemplate.getTopology_template().getNode_templates();
+ String templateName;
+ NodeTemplate template;
+ String type;
+ Map<String, Map<String, List<String>>> substitutionMapping = new HashMap<>();
+ if (nodeTemplates == null) {
+ return substitutionMapping;
+ }
+
+ Map<String, List<String>> capabilitySubstitutionMapping = new HashMap<>();
+ Map<String, List<String>> requirementSubstitutionMapping = new HashMap<>();
+ substitutionMapping.put("capability", capabilitySubstitutionMapping);
+ substitutionMapping.put("requirement", requirementSubstitutionMapping);
+ List<Map<String, RequirementDefinition>> nodeTypeRequirementsDefinition;
+ Map<String, RequirementAssignment> nodeTemplateRequirementsAssignment;
+ List<Map<String, RequirementDefinition>> exposedRequirementsDefinition;
+ Map<String, Map<String, RequirementAssignment>> fullFilledRequirementsDefinition =
+ new HashMap<>();
+ Map<String, CapabilityDefinition> nodeTypeCapabilitiesDefinition = new HashMap<>();
+ Map<String, CapabilityDefinition> exposedCapabilitiesDefinition;
+
+ for (Map.Entry<String, NodeTemplate> entry : nodeTemplates.entrySet()) {
+ templateName = entry.getKey();
+ template = entry.getValue();
+ type = template.getType();
+
+ // get requirements
+ nodeTypeRequirementsDefinition =
+ getNodeTypeRequirements(type, templateName, substitutionServiceTemplate,
+ requirementSubstitutionMapping, translateTo.getContext());
+ nodeTemplateRequirementsAssignment = getNodeTemplateRequirements(template);
+ fullFilledRequirementsDefinition.put(templateName, nodeTemplateRequirementsAssignment);
+ //set substitution node type requirements
+ exposedRequirementsDefinition = calculateExposedRequirements(nodeTypeRequirementsDefinition,
+ nodeTemplateRequirementsAssignment);
+ addSubstitutionNodeTypeRequirements(substitutionNodeType, exposedRequirementsDefinition,
+ templateName);
+
+ //get capabilities
+ getNodeTypeCapabilities(nodeTypeCapabilitiesDefinition, capabilitySubstitutionMapping, type,
+ templateName, substitutionServiceTemplate, translateTo.getContext());
+
+ }
+
+ exposedCapabilitiesDefinition = calculateExposedCapabilities(nodeTypeCapabilitiesDefinition,
+ fullFilledRequirementsDefinition);
+ addSubstitutionNodeTypeCapabilities(substitutionNodeType, exposedCapabilitiesDefinition);
+ return substitutionMapping;
+ }
+
+ private Map<String, CapabilityDefinition> calculateExposedCapabilities(
+ Map<String, CapabilityDefinition> nodeTypeCapabilitiesDefinition,
+ Map<String, Map<String, RequirementAssignment>> fullFilledRequirementsDefinitionMap) {
+
+ String capabilityKey;
+ String capability;
+ String node;
+ CapabilityDefinition capabilityDefinition;
+ CapabilityDefinition clonedCapabilityDefinition;
+ for (Map.Entry<String, Map<String, RequirementAssignment>> entry
+ : fullFilledRequirementsDefinitionMap.entrySet()) {
+ for (Map.Entry<String, RequirementAssignment> fullFilledEntry : entry.getValue().entrySet()) {
+
+ capability = fullFilledEntry.getValue().getCapability();
+ fullFilledEntry.getValue().getOccurrences();
+ node = fullFilledEntry.getValue().getNode();
+ capabilityKey = capability + "_" + node;
+ capabilityDefinition = nodeTypeCapabilitiesDefinition.get(capabilityKey);
+ if (capabilityDefinition != null) {
+ clonedCapabilityDefinition = capabilityDefinition.clone();
+ nodeTypeCapabilitiesDefinition.put(capabilityKey, capabilityDefinition.clone());
+ if (evaluateCapabilityFullFilament(clonedCapabilityDefinition)) {
+ nodeTypeCapabilitiesDefinition.remove(capabilityKey);
+ } else {
+ nodeTypeCapabilitiesDefinition.put(capabilityKey, clonedCapabilityDefinition);
+ }
+ }
+ }
+ }
+
+ Map<String, CapabilityDefinition> exposedCapabilitiesDefinition = new HashMap<>();
+ for (Map.Entry<String, CapabilityDefinition> entry : nodeTypeCapabilitiesDefinition
+ .entrySet()) {
+ exposedCapabilitiesDefinition.put(entry.getKey(), entry.getValue());
+ }
+ return exposedCapabilitiesDefinition;
+ }
+
+ private boolean evaluateCapabilityFullFilament(CapabilityDefinition capabilityDefinition) {
+ Object[] occurrences = capabilityDefinition.getOccurrences();
+ if (occurrences == null) {
+ capabilityDefinition.setOccurrences(new Object[]{"0", ToscaConstants.UNBOUNDED});
+ return false;
+ }
+ if (occurrences[1].equals(ToscaConstants.UNBOUNDED)) {
+ return false;
+ }
+
+ if (occurrences[1].equals(1)) {
+ return true;
+ }
+ occurrences[1] = (Integer) occurrences[1] - 1;
+ return false;
+ }
+
+ private boolean evaluateRequirementFullFilament(RequirementDefinition requirementDefinition) {
+ Object[] occurrences = requirementDefinition.getOccurrences();
+ if (occurrences == null) {
+ requirementDefinition.setOccurrences(new Object[]{"0", ToscaConstants.UNBOUNDED});
+ return false;
+ }
+ if (occurrences[1].equals(ToscaConstants.UNBOUNDED)) {
+ return false;
+ }
+
+ if (occurrences[1].equals(1)) {
+ return true;
+ }
+ occurrences[1] = (Integer) occurrences[1] - 1;
+ return false;
+ }
+
+ private void getNodeTypeCapabilities(
+ Map<String, CapabilityDefinition> nodeTypeCapabilitiesDefinition,
+ Map<String, List<String>> capabilitySubstitutionMapping, String type, String templateName,
+ ServiceTemplate serviceTemplate, TranslationContext context) {
+ NodeType nodeType = getNodeTypeWithFlatHierarchy(type, serviceTemplate, context);
+ String capabilityKey;
+ List<String> capabilityMapping;
+ if (nodeType.getCapabilities() != null) {
+ for (Map.Entry<String, CapabilityDefinition> capabilityNodeEntry : nodeType.getCapabilities()
+ .entrySet()) {
+ capabilityKey = capabilityNodeEntry.getKey() + "_" + templateName;
+ nodeTypeCapabilitiesDefinition.put(capabilityKey, capabilityNodeEntry.getValue().clone());
+ capabilityMapping = new ArrayList<>();
+ capabilityMapping.add(templateName);
+ capabilityMapping.add(capabilityNodeEntry.getKey());
+ capabilitySubstitutionMapping.put(capabilityKey, capabilityMapping);
+ }
+ }
+
+ String derivedFrom = nodeType.getDerived_from();
+ if (derivedFrom != null) {
+ getNodeTypeCapabilities(nodeTypeCapabilitiesDefinition, capabilitySubstitutionMapping,
+ derivedFrom, templateName, serviceTemplate, context);
+ }
+ }
+
+ private List<Map<String, RequirementDefinition>> calculateExposedRequirements(
+ List<Map<String, RequirementDefinition>> nodeTypeRequirementsDefinitionList,
+ Map<String, RequirementAssignment> nodeTemplateRequirementsAssignment) {
+ if (nodeTypeRequirementsDefinitionList == null) {
+ return null;
+ }
+ for (Map.Entry<String, RequirementAssignment> entry : nodeTemplateRequirementsAssignment
+ .entrySet()) {
+ if (entry.getValue().getNode() != null) {
+ RequirementDefinition requirementDefinition =
+ getRequirementDefinition(nodeTypeRequirementsDefinitionList, entry.getKey());
+ RequirementDefinition cloneRequirementDefinition;
+ if (requirementDefinition != null) {
+ cloneRequirementDefinition = requirementDefinition.clone();
+ if (!evaluateRequirementFullFilament(cloneRequirementDefinition)) {
+ this.mergeEntryInList(entry.getKey(), cloneRequirementDefinition,
+ nodeTypeRequirementsDefinitionList);
+ } else {
+ removeRequirementsDefinition(nodeTypeRequirementsDefinitionList, entry.getKey());
+ }
+ }
+ } else {
+ for (Map<String, RequirementDefinition> nodeTypeRequirementsMap
+ : nodeTypeRequirementsDefinitionList) {
+ Object max = nodeTypeRequirementsMap.get(entry.getKey()).getOccurrences() != null
+ && nodeTypeRequirementsMap.get(entry.getKey()).getOccurrences().length > 0
+ ? nodeTypeRequirementsMap.get(entry.getKey()).getOccurrences()[1] : 1;
+ Object min = nodeTypeRequirementsMap.get(entry.getKey()).getOccurrences() != null
+ && nodeTypeRequirementsMap.get(entry.getKey()).getOccurrences().length > 0
+ ? nodeTypeRequirementsMap.get(entry.getKey()).getOccurrences()[0] : 1;
+ nodeTypeRequirementsMap.get(entry.getKey()).setOccurrences(new Object[]{min, max});
+ }
+ }
+ }
+ return nodeTypeRequirementsDefinitionList;
+ }
+
+ private void removeRequirementsDefinition(
+ List<Map<String, RequirementDefinition>> nodeTypeRequirementsDefinitionList,
+ String requirementKey) {
+ for (Map<String, RequirementDefinition> reqMap : nodeTypeRequirementsDefinitionList) {
+ reqMap.remove(requirementKey);
+ }
+ }
+
+ private RequirementDefinition getRequirementDefinition(
+ List<Map<String, RequirementDefinition>> nodeTypeRequirementsDefinitionList,
+ String requirementKey) {
+ for (Map<String, RequirementDefinition> requirementMap : nodeTypeRequirementsDefinitionList) {
+ if (requirementMap.containsKey(requirementKey)) {
+ return requirementMap.get(requirementKey);
+ }
+ }
+ return null;
+ }
+
+ private Map<String, RequirementAssignment> getNodeTemplateRequirements(NodeTemplate template) {
+ List<Map<String, RequirementAssignment>> templateRequirements = template.getRequirements();
+
+ Map<String, RequirementAssignment> nodeTemplateRequirementsDefinition = new HashMap<>();
+ if (CollectionUtils.isEmpty(templateRequirements)) {
+ return nodeTemplateRequirementsDefinition;
+ }
+ for (Map<String, RequirementAssignment> requirementAssignmentMap : templateRequirements) {
+ for (Map.Entry<String, RequirementAssignment> requirementEntry : requirementAssignmentMap
+ .entrySet()) {
+ nodeTemplateRequirementsDefinition
+ .put(requirementEntry.getKey(), requirementEntry.getValue());
+ }
+ }
+ return nodeTemplateRequirementsDefinition;
+ }
+
+ private List<Map<String, RequirementDefinition>> getNodeTypeRequirements(String type,
+ String templateName,
+ ServiceTemplate serviceTemplate,
+ Map<String, List<String>> requirementSubstitutionMapping,
+ TranslationContext context) {
+ List<Map<String, RequirementDefinition>> requirementList = null;
+ NodeType nodeType = getNodeTypeWithFlatHierarchy(type, serviceTemplate, context);
+ String derivedFrom = nodeType.getDerived_from();
+ List<String> requirementMapping;
+ if (derivedFrom != null) {
+ requirementList = getNodeTypeRequirements(derivedFrom, templateName, serviceTemplate,
+ requirementSubstitutionMapping, context);
+ }
+ if (requirementList == null) {
+ requirementList = new ArrayList<>();
+ }
+
+ if (nodeType.getRequirements() != null) {
+ for (Map<String, RequirementDefinition> requirementMap : nodeType.getRequirements()) {
+ for (Map.Entry<String, RequirementDefinition> requirementNodeEntry : requirementMap
+ .entrySet()) {
+ if (requirementNodeEntry.getValue().getOccurrences() == null) {
+ requirementNodeEntry.getValue().setOccurrences(new Object[]{1, 1});
+ }
+ Map<String, RequirementDefinition> requirementDef = new HashMap<>();
+ requirementDef.put(requirementNodeEntry.getKey(), requirementNodeEntry.getValue());
+ addRequirementToList(requirementList, requirementDef);
+ requirementMapping = new ArrayList<>();
+ requirementMapping.add(templateName);
+ requirementMapping.add(requirementNodeEntry.getKey());
+ requirementSubstitutionMapping
+ .put(requirementNodeEntry.getKey() + "_" + templateName, requirementMapping);
+ if (requirementNodeEntry.getValue().getNode() == null) {
+ requirementNodeEntry.getValue().setOccurrences(new Object[]{1, 1});
+ }
+ }
+ }
+ }
+
+ return requirementList;
+ }
+
+ private void addRequirementToList(List<Map<String, RequirementDefinition>> requirementList,
+ Map<String, RequirementDefinition> requirementDef) {
+ for (Map.Entry<String, RequirementDefinition> entry : requirementDef.entrySet()) {
+ this.mergeEntryInList(entry.getKey(), entry.getValue(), requirementList);
+ }
+ }
+
+ private void addSubstitutionNodeTypeCapabilities(NodeType substitutionNodeType,
+ Map<String, CapabilityDefinition> capabilities) {
+ if (capabilities == null || capabilities.entrySet().size() == 0) {
+ return;
+ }
+
+ if (MapUtils.isEmpty(substitutionNodeType.getCapabilities())) {
+ substitutionNodeType.setCapabilities(new HashMap<>());
+ }
+ if (capabilities.size() > 0) {
+ substitutionNodeType.setCapabilities(new HashMap<>());
+ }
+ for (Map.Entry<String, CapabilityDefinition> entry : capabilities.entrySet()) {
+ substitutionNodeType.getCapabilities().put(entry.getKey(), entry.getValue());
+ }
+ }
+
+ private void addSubstitutionNodeTypeRequirements(NodeType substitutionNodeType,
+ List<Map<String, RequirementDefinition>> requirementsList,
+ String templateName) {
+ if (requirementsList == null || requirementsList.size() == 0) {
+ return;
+ }
+
+ if (substitutionNodeType.getRequirements() == null) {
+ substitutionNodeType.setRequirements(new ArrayList<>());
+ }
+
+ for (Map<String, RequirementDefinition> requirementDef : requirementsList) {
+ for (Map.Entry<String, RequirementDefinition> entry : requirementDef.entrySet()) {
+ Map<String, RequirementDefinition> requirementMap = new HashMap<>();
+ requirementMap.put(entry.getKey() + "_" + templateName, entry.getValue().clone());
+ substitutionNodeType.getRequirements().add(requirementMap);
+ }
+ }
+ }
+
+
+ private SubstitutionMapping manageSubstitutionTemplateSubstitutionMapping(String nodeTypeKey,
+ NodeType substitutionNodeType,
+ Map<String, Map<String, List<String>>> mapping) {
+ SubstitutionMapping substitutionMapping = new SubstitutionMapping();
+ substitutionMapping.setNode_type(nodeTypeKey);
+ substitutionMapping.setCapabilities(
+ manageCapabilityMapping(substitutionNodeType.getCapabilities(), mapping.get("capability")));
+ substitutionMapping.setRequirements(
+ manageRequirementMapping(substitutionNodeType.getRequirements(),
+ mapping.get("requirement")));
+ return substitutionMapping;
+ }
+
+ private Map<String, List<String>> manageCapabilityMapping(
+ Map<String, CapabilityDefinition> capabilities,
+ Map<String, List<String>> capabilitySubstitutionMapping) {
+ if (capabilities == null) {
+ return null;
+ }
+
+ Map<String, List<String>> capabilityMapping = new HashMap<>();
+ String capabilityKey;
+ List<String> capabilityMap;
+ for (Map.Entry<String, CapabilityDefinition> entry : capabilities.entrySet()) {
+ capabilityKey = entry.getKey();
+ capabilityMap = capabilitySubstitutionMapping.get(capabilityKey);
+ capabilityMapping.put(capabilityKey, capabilityMap);
+ }
+ return capabilityMapping;
+ }
+
+ private Map<String, List<String>> manageRequirementMapping(
+ List<Map<String, RequirementDefinition>> requirementList,
+ Map<String, List<String>> requirementSubstitutionMapping) {
+ if (requirementList == null) {
+ return null;
+ }
+ Map<String, List<String>> requirementMapping = new HashMap<>();
+ String requirementKey;
+ List<String> requirementMap;
+ for (Map<String, RequirementDefinition> requirementDefMap : requirementList) {
+ for (Map.Entry<String, RequirementDefinition> entry : requirementDefMap.entrySet()) {
+ requirementKey = entry.getKey();
+ requirementMap = requirementSubstitutionMapping.get(requirementKey);
+ requirementMapping.put(requirementKey, requirementMap);
+ }
+ }
+ return requirementMapping;
+ }
+
+
+ private Map<String, AttributeDefinition> manageSubstitutionNodeTypeAttributes(
+ ServiceTemplate substitutionServiceTemplate) {
+
+ Map<String, AttributeDefinition> substitutionNodeTypeAttributes = new HashMap<>();
+ Map<String, ParameterDefinition> attributes =
+ substitutionServiceTemplate.getTopology_template().getOutputs();
+ if (attributes == null) {
+ return null;
+ }
+ AttributeDefinition attributeDefinition;
+ String toscaAttributeName;
+
+ for (Map.Entry<String, ParameterDefinition> entry : attributes.entrySet()) {
+ attributeDefinition = new AttributeDefinition();
+ toscaAttributeName = entry.getKey();
+ ParameterDefinition parameterDefinition =
+ substitutionServiceTemplate.getTopology_template().getOutputs().get(toscaAttributeName);
+ if (parameterDefinition.getType() != null && !parameterDefinition.getType().isEmpty()) {
+ attributeDefinition.setType(parameterDefinition.getType());
+ } else {
+ attributeDefinition.setType(PropertyType.STRING.getDisplayName());
+ }
+ attributeDefinition.setDescription(parameterDefinition.getDescription());
+ attributeDefinition.set_default(parameterDefinition.get_default());
+ attributeDefinition.setEntry_schema(parameterDefinition.getEntry_schema());
+ attributeDefinition.setStatus(parameterDefinition.getStatus());
+ substitutionNodeTypeAttributes.put(toscaAttributeName, attributeDefinition);
+ }
+ return substitutionNodeTypeAttributes;
+ }
+
+ private Map<String, PropertyDefinition> manageSubstitutionNodeTypeProperties(
+ ServiceTemplate substitutionServiceTemplate) {
+ Map<String, PropertyDefinition> substitutionNodeTypeProperties = new HashMap<>();
+ Map<String, ParameterDefinition> properties =
+ substitutionServiceTemplate.getTopology_template().getInputs();
+ if (properties == null) {
+ return null;
+ }
+
+ PropertyDefinition propertyDefinition;
+ String toscaPropertyName;
+ for (Map.Entry<String, ParameterDefinition> entry : properties.entrySet()) {
+ toscaPropertyName = entry.getKey();
+ propertyDefinition = new PropertyDefinition();
+ ParameterDefinition parameterDefinition =
+ substitutionServiceTemplate.getTopology_template().getInputs().get(toscaPropertyName);
+ propertyDefinition.setType(parameterDefinition.getType());
+ propertyDefinition.setDescription(parameterDefinition.getDescription());
+ propertyDefinition.setRequired(parameterDefinition.getRequired());
+ propertyDefinition.set_default(parameterDefinition.get_default());
+ propertyDefinition.setConstraints(parameterDefinition.getConstraints());
+ propertyDefinition.setEntry_schema(parameterDefinition.getEntry_schema());
+ propertyDefinition.setStatus(parameterDefinition.getStatus());
+ substitutionNodeTypeProperties.put(toscaPropertyName, propertyDefinition);
+ }
+ return substitutionNodeTypeProperties;
+ }
+
+ private Map<String, Object> managerSubstitutionNodeTemplateProperties(TranslateTo translateTo,
+ Template template,
+ String templateName) {
+ Map<String, Object> substitutionProperties = new HashMap<>();
+ Map<String, Object> heatProperties = translateTo.getResource().getProperties();
+ if (Objects.nonNull(heatProperties)) {
+ for (Map.Entry<String, Object> entry : heatProperties.entrySet()) {
+
+ Object property = TranslatorHeatToToscaPropertyConverter
+ .getToscaPropertyValue(entry.getKey(), entry.getValue(), null,
+ translateTo.getHeatFileName(), translateTo.getHeatOrchestrationTemplate(), template,
+ translateTo.getContext());
+ substitutionProperties.put(entry.getKey(), property);
+ }
+ }
+
+ return addAbstractSubstitutionProperty(templateName, substitutionProperties);
+ }
+
+ private Map<String, Object> addAbstractSubstitutionProperty(String templateName,
+ Map<String, Object> substitutionProperties) {
+ Map<String, Object> innerProps = new HashMap<>();
+ innerProps.put(ToscaConstants.SUBSTITUTE_SERVICE_TEMPLATE_PROPERTY_NAME,
+ ToscaUtil.getServiceTemplateFileName(templateName));
+ substitutionProperties.put(ToscaConstants.SERVICE_TEMPLATE_FILTER_PROPERTY_NAME, innerProps);
+ return substitutionProperties;
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNeutronNetImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNeutronNetImpl.java
new file mode 100644
index 0000000000..0b4ed61753
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNeutronNetImpl.java
@@ -0,0 +1,52 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
+import org.openecomp.sdc.translator.services.heattotosca.mapping.TranslatorHeatToToscaPropertyConverter;
+
+public class ResourceTranslationNeutronNetImpl extends ResourceTranslationBase {
+
+ @Override
+ public void translate(TranslateTo translateTo) {
+
+ NodeTemplate nodeTemplate = new NodeTemplate();
+ nodeTemplate.setType(ToscaNodeType.NEUTRON_NET.getDisplayName());
+ nodeTemplate.setProperties(TranslatorHeatToToscaPropertyConverter
+ .getToscaPropertiesSimpleConversion(translateTo.getResource().getProperties(),
+ nodeTemplate.getProperties(), translateTo.getHeatFileName(),
+ translateTo.getHeatOrchestrationTemplate(), translateTo.getResource().getType(),
+ nodeTemplate, translateTo.getContext()));
+
+ HeatToToscaUtil.mapBoolean(nodeTemplate, "port_security_enabled");
+ HeatToToscaUtil.mapBoolean(nodeTemplate, "shared");
+ HeatToToscaUtil.mapBoolean(nodeTemplate, "admin_state_up");
+
+ DataModelUtil.addNodeTemplate(translateTo.getServiceTemplate(), translateTo.getTranslatedId(),
+ nodeTemplate);
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNeutronPortImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNeutronPortImpl.java
new file mode 100644
index 0000000000..343462d266
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNeutronPortImpl.java
@@ -0,0 +1,233 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslatedHeatResource;
+import org.openecomp.sdc.translator.services.heattotosca.Constants;
+import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
+import org.openecomp.sdc.translator.services.heattotosca.ResourceTranslationFactory;
+import org.openecomp.sdc.translator.services.heattotosca.mapping.TranslatorHeatToToscaPropertyConverter;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+
+public class ResourceTranslationNeutronPortImpl extends ResourceTranslationBase {
+
+ @Override
+ public void translate(TranslateTo translateTo) {
+
+ NodeTemplate nodeTemplate = new NodeTemplate();
+ nodeTemplate.setType(ToscaNodeType.NEUTRON_PORT.getDisplayName());
+
+ nodeTemplate.setProperties(TranslatorHeatToToscaPropertyConverter
+ .getToscaPropertiesSimpleConversion(translateTo.getResource().getProperties(),
+ nodeTemplate.getProperties(), translateTo.getHeatFileName(),
+ translateTo.getHeatOrchestrationTemplate(), translateTo.getResource().getType(),
+ nodeTemplate, translateTo.getContext()));
+ handleNetworkRequirement(translateTo, nodeTemplate);
+ String resourceTranslatedId = handleSecurityRulesRequirement(translateTo);
+ DataModelUtil
+ .addNodeTemplate(translateTo.getServiceTemplate(), resourceTranslatedId, nodeTemplate);
+ }
+
+ private String handleSecurityRulesRequirement(TranslateTo translateTo) {
+ String resourceTranslatedId = translateTo.getTranslatedId();
+ Map<String, Object> properties = translateTo.getResource().getProperties();
+ Optional<Object> securityGroups =
+ Optional.ofNullable(properties.get(Constants.SECURITY_GROUPS_PROPERTY_NAME));
+ if (securityGroups.isPresent() && securityGroups.get() instanceof List) {
+ List securityGroupsList = (List) securityGroups.get();
+ securityGroupsList.forEach(resourceValue -> {
+ Optional<AttachedResourceId> securityGroupResourceId = HeatToToscaUtil
+ .extractAttachedResourceId(translateTo.getHeatFileName(),
+ translateTo.getHeatOrchestrationTemplate(), translateTo.getContext(),
+ resourceValue);
+ if (securityGroupResourceId.isPresent()) {
+ handleSecurityGroupResourceId(translateTo, resourceTranslatedId,
+ securityGroupResourceId.get());
+ }
+ });
+ }
+ return resourceTranslatedId;
+ }
+
+ private void handleSecurityGroupResourceId(TranslateTo translateTo, String resourceTranslatedId,
+ AttachedResourceId securityGroupResourceId) {
+ List<String> supportedSecurityGroupsTypes = Collections
+ .singletonList(HeatResourcesTypes.NEUTRON_SECURITY_GROUP_RESOURCE_TYPE.getHeatResource());
+ if (securityGroupResourceId.isGetResource()) {
+ handleGetResource(translateTo, resourceTranslatedId, securityGroupResourceId,
+ supportedSecurityGroupsTypes);
+ } else if (securityGroupResourceId.isGetParam()) {
+ handleGetParam(translateTo, resourceTranslatedId, securityGroupResourceId,
+ supportedSecurityGroupsTypes);
+ }
+ }
+
+ private void handleGetParam(TranslateTo translateTo, String resourceTranslatedId,
+ AttachedResourceId securityGroupResourceId,
+ List<String> supportedSecurityGroupsTypes) {
+ TranslatedHeatResource translatedSharedResourceId =
+ translateTo.getContext().getHeatSharedResourcesByParam()
+ .get(securityGroupResourceId.getEntityId());
+ if (Objects.nonNull(translatedSharedResourceId)
+ && !HeatToToscaUtil.isHeatFileNested(translateTo, translateTo.getHeatFileName())) {
+ if (validateResourceTypeSupportedForReqCreation(translateTo, supportedSecurityGroupsTypes,
+ translatedSharedResourceId.getHeatResource(), "security_groups")) {
+ return;
+ }
+ final NodeTemplate securityGroupNodeTemplate = DataModelUtil
+ .getNodeTemplate(translateTo.getServiceTemplate(),
+ translatedSharedResourceId.getTranslatedId());
+ RequirementAssignment requirement = new RequirementAssignment();
+ requirement.setCapability(ToscaCapabilityType.ATTACHMENT.getDisplayName());
+ requirement.setNode(resourceTranslatedId);
+ requirement.setRelationship(ToscaRelationshipType.ATTACHES_TO.getDisplayName());
+ DataModelUtil
+ .addRequirementAssignment(securityGroupNodeTemplate, ToscaConstants.PORT_REQUIREMENT_ID,
+ requirement);
+ }
+ }
+
+ private void handleGetResource(TranslateTo translateTo, String resourceTranslatedId,
+ AttachedResourceId securityGroupResourceId,
+ List<String> supportedSecurityGroupsTypes) {
+ String resourceId = (String) securityGroupResourceId.getEntityId();
+ Resource securityGroupResource = HeatToToscaUtil
+ .getResource(translateTo.getHeatOrchestrationTemplate(), resourceId,
+ translateTo.getHeatFileName());
+ Optional<String> securityGroupTranslatedId =
+ ResourceTranslationFactory.getInstance(securityGroupResource)
+ .translateResource(translateTo.getHeatFileName(), translateTo.getServiceTemplate(),
+ translateTo.getHeatOrchestrationTemplate(), securityGroupResource, resourceId,
+ translateTo.getContext());
+ if (securityGroupTranslatedId.isPresent()) {
+ if (validateResourceTypeSupportedForReqCreation(translateTo, supportedSecurityGroupsTypes,
+ securityGroupResource, "security_groups")) {
+ return;
+ }
+ final NodeTemplate securityGroupNodeTemplate = DataModelUtil
+ .getNodeTemplate(translateTo.getServiceTemplate(), securityGroupTranslatedId.get());
+ RequirementAssignment requirement = new RequirementAssignment();
+ requirement.setCapability(ToscaCapabilityType.ATTACHMENT.getDisplayName());
+ requirement.setNode(resourceTranslatedId);
+ requirement.setRelationship(ToscaRelationshipType.ATTACHES_TO.getDisplayName());
+ DataModelUtil
+ .addRequirementAssignment(securityGroupNodeTemplate, ToscaConstants.PORT_REQUIREMENT_ID,
+ requirement);
+ }
+ }
+
+ private void handleNetworkRequirement(TranslateTo translateTo, NodeTemplate nodeTemplate) {
+ Optional<AttachedResourceId> networkResourceId =
+ HeatToToscaUtil.extractAttachedResourceId(translateTo, "network");
+ if (networkResourceId.isPresent()) {
+ AttachedResourceId attachedResourceId = networkResourceId.get();
+ addRequirementAssignmentForNetworkResource(translateTo, nodeTemplate, attachedResourceId);
+ } else {
+ networkResourceId = HeatToToscaUtil.extractAttachedResourceId(translateTo, "network_id");
+ if (networkResourceId.isPresent()) {
+ AttachedResourceId attachedResourceId = networkResourceId.get();
+ addRequirementAssignmentForNetworkResource(translateTo, nodeTemplate, attachedResourceId);
+ }
+ }
+ }
+
+ private void addRequirementAssignmentForNetworkResource(TranslateTo translateTo,
+ NodeTemplate nodeTemplate,
+ AttachedResourceId attachedResourceId) {
+ String networkTranslatedId;
+ List<String> supportedNetworkTypes =
+ Arrays.asList(HeatResourcesTypes.NEUTRON_NET_RESOURCE_TYPE.getHeatResource(),
+ HeatResourcesTypes.CONTRAIL_VIRTUAL_NETWORK_RESOURCE_TYPE.getHeatResource(),
+ HeatResourcesTypes.CONTRAIL_V2_VIRTUAL_NETWORK_RESOURCE_TYPE.getHeatResource());
+ if (attachedResourceId.isGetResource()) {
+ Resource networkHeatResource = translateTo.getHeatOrchestrationTemplate().getResources()
+ .get(attachedResourceId.getEntityId());
+ if (validateResourceTypeSupportedForReqCreation(translateTo, supportedNetworkTypes,
+ networkHeatResource, "network'\\'network_id")) {
+ return;
+ }
+ networkTranslatedId = (String) attachedResourceId.getTranslatedId();
+ addRequirementAssignment(nodeTemplate, networkTranslatedId);
+ } else if (attachedResourceId.isGetParam()) {
+ TranslatedHeatResource translatedSharedResourceId =
+ translateTo.getContext().getHeatSharedResourcesByParam()
+ .get(attachedResourceId.getEntityId());
+ if (Objects.nonNull(translatedSharedResourceId)
+ && !HeatToToscaUtil.isHeatFileNested(translateTo, translateTo.getHeatFileName())) {
+ if (validateResourceTypeSupportedForReqCreation(translateTo, supportedNetworkTypes,
+ translatedSharedResourceId.getHeatResource(), "network'\\'network_id")) {
+ return;
+ }
+ addRequirementAssignment(nodeTemplate, translatedSharedResourceId.getTranslatedId());
+ }
+ }
+ }
+
+ private void addRequirementAssignment(NodeTemplate nodeTemplate, String translatedId) {
+ RequirementAssignment requirement = new RequirementAssignment();
+ requirement.setCapability(ToscaCapabilityType.NETWORK_LINKABLE.getDisplayName());
+ requirement.setRelationship(ToscaRelationshipType.NETWORK_LINK_TO.getDisplayName());
+ requirement.setNode(translatedId);
+ DataModelUtil
+ .addRequirementAssignment(nodeTemplate, ToscaConstants.LINK_REQUIREMENT_ID, requirement);
+ }
+
+
+ private boolean validateResourceTypeSupportedForReqCreation(TranslateTo translateTo,
+ List<String> supportedTypes,
+ Resource heatResource,
+ final String propertyName) {
+ if (!isResourceTypeValidForRequirement(heatResource, supportedTypes)) {
+ logger.warn(
+ "'" + propertyName + "' property of port resource('" + translateTo.getResourceId()
+ + "') is pointing to a resource of type '" + heatResource.getType() + "' "
+ + "which is not supported for this requirement. "
+ + "Supported types are: " + supportedTypes.toString());
+ return true;
+ }
+ return false;
+ }
+
+ private boolean isResourceTypeValidForRequirement(Resource networkHeatResource,
+ List<String> supportedNetworkTypes) {
+ return Objects.nonNull(networkHeatResource)
+ && supportedNetworkTypes.contains(networkHeatResource.getType());
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNeutronSecurityGroupImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNeutronSecurityGroupImpl.java
new file mode 100644
index 0000000000..cacaf4c5c7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNeutronSecurityGroupImpl.java
@@ -0,0 +1,47 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+import org.openecomp.sdc.translator.services.heattotosca.mapping.TranslatorHeatToToscaPropertyConverter;
+
+public class ResourceTranslationNeutronSecurityGroupImpl extends ResourceTranslationBase {
+
+ @Override
+ public void translate(TranslateTo translateTo) {
+
+ NodeTemplate nodeTemplate = new NodeTemplate();
+ nodeTemplate.setType(ToscaNodeType.NEUTRON_SECURITY_RULES.getDisplayName());
+ nodeTemplate.setProperties(TranslatorHeatToToscaPropertyConverter
+ .getToscaPropertiesSimpleConversion(translateTo.getResource().getProperties(),
+ nodeTemplate.getProperties(), translateTo.getHeatFileName(),
+ translateTo.getHeatOrchestrationTemplate(), translateTo.getResource().getType(),
+ nodeTemplate, translateTo.getContext()));
+
+ DataModelUtil.addNodeTemplate(translateTo.getServiceTemplate(), translateTo.getTranslatedId(),
+ nodeTemplate);
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNeutronSubnetImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNeutronSubnetImpl.java
new file mode 100644
index 0000000000..8306f57146
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNeutronSubnetImpl.java
@@ -0,0 +1,170 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.heat.datatypes.HeatBoolean;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.tosca.datatypes.ToscaFunctions;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.ParameterDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+
+import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
+import org.openecomp.sdc.translator.services.heattotosca.ResourceTranslationFactory;
+import org.openecomp.sdc.translator.services.heattotosca.errors.MissingMandatoryPropertyErrorBuilder;
+import org.openecomp.sdc.translator.services.heattotosca.mapping.TranslatorHeatToToscaPropertyConverter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Optional;
+
+public class ResourceTranslationNeutronSubnetImpl extends ResourceTranslationBase {
+ protected static Logger logger =
+ LoggerFactory.getLogger(ResourceTranslationNeutronSubnetImpl.class);
+
+ @Override
+ protected String generateTranslatedId(TranslateTo translateTo) {
+ Optional<AttachedResourceId> subnetNetwork = getAttachedNetworkResource(translateTo);
+
+ if (!subnetNetwork.get().isGetResource()) {
+ logger.warn("Heat resource: '" + translateTo.getResourceId() + "' with type: '"
+ + translateTo.getResource().getType()
+ + "' include 'network_id/'network'' property without 'get_resource' function,"
+ + " therefore this resource will be ignored in TOSCA translation.");
+ return null;
+ }
+ return (String) subnetNetwork.get().getTranslatedId();
+ }
+
+ @Override
+ public void translate(TranslateTo translateTo) {
+
+ Optional<AttachedResourceId> subnetNetwork = getAttachedNetworkResource(translateTo);
+
+ if (!subnetNetwork.get().isGetResource()) {
+ return;
+ }
+
+ Resource networkResource = HeatToToscaUtil
+ .getResource(translateTo.getHeatOrchestrationTemplate(),
+ (String) subnetNetwork.get().getEntityId(), translateTo.getHeatFileName());
+ Optional<String> translatedNetworkId = ResourceTranslationFactory.getInstance(networkResource)
+ .translateResource(translateTo.getHeatFileName(), translateTo.getServiceTemplate(),
+ translateTo.getHeatOrchestrationTemplate(), networkResource,
+ (String) subnetNetwork.get().getEntityId(), translateTo.getContext());
+ if (translatedNetworkId.isPresent()) {
+ NodeTemplate networkNodeTemplate = DataModelUtil
+ .getNodeTemplate(translateTo.getServiceTemplate(), translatedNetworkId.get());
+
+ Map<String, Map<String, Object>> subNetMap =
+ (Map<String, Map<String, Object>>) networkNodeTemplate.getProperties().get("subnets");
+ if (subNetMap == null) {
+ subNetMap = new HashMap<>();
+ networkNodeTemplate.getProperties().put("subnets", subNetMap);
+ TranslatorHeatToToscaPropertyConverter
+ .setSimpleProperty(translateTo.getResource().getProperties(),
+ translateTo.getHeatFileName(), translateTo.getResource().getType(),
+ translateTo.getHeatOrchestrationTemplate(), translateTo.getContext(),
+ networkNodeTemplate.getProperties(), "enable_dhcp",
+ ToscaConstants.DHCP_ENABLED_PROPERTY_NAME, networkNodeTemplate); //dhcp_enabled
+ TranslatorHeatToToscaPropertyConverter
+ .setSimpleProperty(translateTo.getResource().getProperties(),
+ translateTo.getHeatFileName(), translateTo.getResource().getType(),
+ translateTo.getHeatOrchestrationTemplate(), translateTo.getContext(),
+ networkNodeTemplate.getProperties(), "ip_version", null, networkNodeTemplate);
+ handleDhcpProperty(translateTo, networkNodeTemplate);
+ }
+
+ Map<String, Object> properties;
+ properties = TranslatorHeatToToscaPropertyConverter
+ .getToscaPropertiesSimpleConversion(translateTo.getResource().getProperties(), null,
+ translateTo.getHeatFileName(), translateTo.getHeatOrchestrationTemplate(),
+ translateTo.getResource().getType(), networkNodeTemplate, translateTo.getContext());
+
+ subNetMap.put(translateTo.getResourceId(), properties);
+ }
+ }
+
+ private void handleDhcpProperty(TranslateTo translateTo, NodeTemplate networkNodeTemplate) {
+ Object dhcpEnabled =
+ networkNodeTemplate.getProperties().get(ToscaConstants.DHCP_ENABLED_PROPERTY_NAME);
+ if (dhcpEnabled instanceof Map) {
+ Object dhcpEnabledParameterName =
+ ((Map) dhcpEnabled).get(ToscaFunctions.GET_INPUT.getDisplayName());
+ if (dhcpEnabledParameterName != null) {
+ ParameterDefinition dhcpParameterDefinition = null;
+ if (translateTo.getServiceTemplate().getTopology_template().getInputs() != null) {
+ dhcpParameterDefinition =
+ translateTo.getServiceTemplate().getTopology_template().getInputs()
+ .get(dhcpEnabledParameterName);
+ }
+ if (dhcpParameterDefinition == null) {
+ logger.warn("Missing input parameter " + dhcpEnabledParameterName);
+ } else {
+ Object defaultVal = dhcpParameterDefinition.get_default();
+ if (defaultVal != null) {
+ try {
+ Boolean booleanValue = HeatBoolean.eval(defaultVal);
+ dhcpParameterDefinition.set_default(booleanValue);
+ } catch (CoreException coreException) {
+ //if value is not valid value for boolean set with dhcp_enabled default value = true
+ dhcpParameterDefinition.set_default(true);
+ logger.warn("Parameter '" + dhcpEnabledParameterName + "' used for "
+ + ToscaConstants.DHCP_ENABLED_PROPERTY_NAME
+ + " boolean property, but it's value is not a valid boolean value, therefore "
+ + ToscaConstants.DHCP_ENABLED_PROPERTY_NAME
+ + " property will be set with default value of 'true'.");
+ }
+ dhcpParameterDefinition.setType(PropertyType.BOOLEAN.getDisplayName());
+ }
+ }
+ }
+ }
+ }
+
+ private Optional<AttachedResourceId> getAttachedNetworkResource(TranslateTo translateTo) {
+ Optional<AttachedResourceId> subnetNetwork = Optional.empty();
+ Optional<AttachedResourceId> attachedNetworkId =
+ HeatToToscaUtil.extractAttachedResourceId(translateTo, "network_id");
+ if (!attachedNetworkId.isPresent()) {
+ Optional<AttachedResourceId> attachedNetwork =
+ HeatToToscaUtil.extractAttachedResourceId(translateTo, "network");
+ if (!attachedNetwork.isPresent()) {
+ throw new CoreException(
+ new MissingMandatoryPropertyErrorBuilder("network_id/'network'").build());
+ } else {
+ subnetNetwork = attachedNetwork;
+ }
+ } else {
+ subnetNetwork = attachedNetworkId;
+ }
+ return subnetNetwork;
+ }
+}
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNovaServerGroupsImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNovaServerGroupsImpl.java
new file mode 100644
index 0000000000..7bc0a10957
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNovaServerGroupsImpl.java
@@ -0,0 +1,119 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.apache.commons.collections4.CollectionUtils;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.tosca.datatypes.ToscaGroupType;
+import org.openecomp.sdc.tosca.datatypes.ToscaPolicyType;
+import org.openecomp.sdc.tosca.datatypes.model.GroupDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.PolicyDefinition;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+import org.openecomp.sdc.translator.services.heattotosca.mapping.TranslatorHeatToToscaPropertyConverter;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+public class ResourceTranslationNovaServerGroupsImpl extends ResourceTranslationBase {
+ private static final String AFFINITY = "affinity";
+ private static final String ANTI_AFFINITY = "anti-affinity";
+ private static List<String> supportedPolicies = Arrays.asList(AFFINITY, ANTI_AFFINITY);
+
+ @Override
+ protected void translate(TranslateTo translateTo) {
+ String resourceId = translateTo.getResourceId();
+ List<String> toscaPolicyTypes = getToscaPolicies(translateTo.getResource(), resourceId);
+ if (!CollectionUtils.isEmpty(toscaPolicyTypes)) {
+ addGroupToTopology(translateTo, resourceId);
+ addPoliciesToTopology(translateTo, resourceId, toscaPolicyTypes);
+ }
+ }
+
+ private void addPoliciesToTopology(TranslateTo translateTo, String resourceId,
+ List<String> toscaPolicyTypes) {
+ logger.info("******** Start creating policies for resource '%s' ********", resourceId);
+ for (int i = 0; i < toscaPolicyTypes.size(); i++) {
+ String policy = toscaPolicyTypes.get(i);
+ logger.info("******** Creating policy '%s' ********", policy);
+ PolicyDefinition policyDefinition = new PolicyDefinition();
+ policyDefinition.setType(policy);
+ policyDefinition.setTargets(Arrays.asList(resourceId));
+ policyDefinition.setProperties(TranslatorHeatToToscaPropertyConverter
+ .getToscaPropertiesSimpleConversion(translateTo.getResource().getProperties(),
+ policyDefinition.getProperties(), translateTo.getHeatFileName(),
+ translateTo.getHeatOrchestrationTemplate(), translateTo.getResource().getType(),
+ policyDefinition, translateTo.getContext()));
+ policyDefinition.getProperties().put(
+ policy.equals(ToscaPolicyType.PLACEMENT_ANTILOCATE.getDisplayName()) ? "container_type"
+ : AFFINITY, "host");
+ String policyId = resourceId + (toscaPolicyTypes.size() > 1 ? i : "");
+ DataModelUtil
+ .addPolicyDefinition(translateTo.getServiceTemplate(), policyId, policyDefinition);
+ logger.info("******** Policy '%s' created ********", policy);
+ }
+
+ logger
+ .info("******** All policies for resource '%s' created successfully ********", resourceId);
+ }
+
+ private void addGroupToTopology(TranslateTo translateTo, String resourceId) {
+ logger.info("******** Start creating group for resource '%s' ********", resourceId);
+ GroupDefinition group = new GroupDefinition();
+ group.setMembers(new ArrayList<>());
+ group.setType(ToscaGroupType.ROOT.getDisplayName());
+ DataModelUtil
+ .addGroupDefinitionToTopologyTemplate(translateTo.getServiceTemplate(), resourceId, group);
+ logger.info("******** Creating group '%s' for resource '%s' ********", resourceId, resourceId);
+ }
+
+ private List<String> getToscaPolicies(Resource resource, String resourceId) {
+
+ Map<String, Object> properties = resource.getProperties();
+ if (Objects.isNull(properties) || Objects.isNull(properties.get("policies"))) {
+ return Arrays.asList(ToscaPolicyType.PLACEMENT_ANTILOCATE.getDisplayName());
+ }
+
+ List policies = (List) properties.get("policies");
+ List<String> retList = new ArrayList<>();
+ policies.forEach(policy -> {
+ if (!supportedPolicies.contains(policy)) {
+ logger.warn("Resource '" + resourceId + "'(" + resource.getType()
+ + ") contains unsupported policy '" + policy.toString()
+ + "'. This resource is been ignored during the translation");
+ } else {
+ retList.add(getToscaPolicyByHotPolicy((String) policy));
+ }
+ });
+ return retList;
+ }
+
+ private String getToscaPolicyByHotPolicy(String name) {
+ if (Objects.equals(name, AFFINITY)) {
+ return ToscaPolicyType.PLACEMENT_COLOCATE.getDisplayName();
+ } else {
+ return ToscaPolicyType.PLACEMENT_ANTILOCATE.getDisplayName();
+ }
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNovaServerImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNovaServerImpl.java
new file mode 100644
index 0000000000..59e0691b2b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNovaServerImpl.java
@@ -0,0 +1,419 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections4.MapUtils;
+import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
+import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.RelationshipTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslatedHeatResource;
+import org.openecomp.sdc.translator.services.heattotosca.Constants;
+import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
+import org.openecomp.sdc.translator.services.heattotosca.ResourceTranslationFactory;
+import org.openecomp.sdc.translator.services.heattotosca.TranslationContext;
+import org.openecomp.sdc.translator.services.heattotosca.helper.NameExtractorService;
+import org.openecomp.sdc.translator.services.heattotosca.helper.PropertyRegexMatcher;
+import org.openecomp.sdc.translator.services.heattotosca.helper.impl.NameExtractorServiceImpl;
+import org.openecomp.sdc.translator.services.heattotosca.mapping.TranslatorHeatToToscaPropertyConverter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+public class ResourceTranslationNovaServerImpl extends ResourceTranslationBase {
+ protected static Logger logger = LoggerFactory.getLogger(ResourceTranslationNovaServerImpl.class);
+
+ @Override
+ protected void translate(TranslateTo translateTo) {
+ TranslationContext context = translateTo.getContext();
+ Map<String, Object> properties = translateTo.getResource().getProperties();
+ String heatFileName = translateTo.getHeatFileName();
+
+ ServiceTemplate serviceTemplate = translateTo.getServiceTemplate();
+
+ String nodeTypeRef =
+ createLocalNodeType(serviceTemplate, translateTo.getResource().getProperties(),
+ translateTo.getTranslatedId());
+
+ NodeTemplate novaNodeTemplate = new NodeTemplate();
+ novaNodeTemplate.setType(nodeTypeRef);
+ HeatOrchestrationTemplate heatOrchestrationTemplate =
+ translateTo.getHeatOrchestrationTemplate();
+ novaNodeTemplate.setProperties(TranslatorHeatToToscaPropertyConverter
+ .getToscaPropertiesSimpleConversion(properties, novaNodeTemplate.getProperties(),
+ heatFileName, heatOrchestrationTemplate, translateTo.getResource().getType(),
+ novaNodeTemplate, context));
+
+ manageNovaServerNetwork(heatFileName, serviceTemplate, heatOrchestrationTemplate,
+ translateTo.getResource(), translateTo.getTranslatedId(), context, novaNodeTemplate);
+ manageNovaServerBlockDeviceMapping(heatFileName, serviceTemplate, novaNodeTemplate,
+ heatOrchestrationTemplate, translateTo.getResource(), translateTo.getResourceId(),
+ translateTo.getTranslatedId(), context);
+
+ manageNovaServerGroupMapping(translateTo, context, properties, heatFileName, serviceTemplate,
+ heatOrchestrationTemplate);
+ DataModelUtil.addNodeTemplate(serviceTemplate, translateTo.getTranslatedId(), novaNodeTemplate);
+ }
+
+ private void manageNovaServerGroupMapping(TranslateTo translateTo, TranslationContext context,
+ Map<String, Object> properties, String heatFileName,
+ ServiceTemplate serviceTemplate,
+ HeatOrchestrationTemplate heatOrchestrationTemplate) {
+ if (isSchedulerHintsPropExist(properties)) {
+ Object schedulerHints = properties.get("scheduler_hints");
+ if (schedulerHints instanceof Map) {
+ addServerGroupHintsToPoliciesProups(translateTo, context, heatFileName, serviceTemplate,
+ heatOrchestrationTemplate, (Map<String, Object>) schedulerHints);
+ } else {
+ logger.warn("'scheduler_hints' property of resource '" + translateTo.getResourceId()
+ + "' is not valid. This property should be a map");
+ }
+ }
+ }
+
+ private void addServerGroupHintsToPoliciesProups(TranslateTo translateTo,
+ TranslationContext context, String heatFileName,
+ ServiceTemplate serviceTemplate,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ Map<String, Object> schedulerHints) {
+ for (Object hint : schedulerHints.values()) {
+ Optional<AttachedResourceId> attachedResourceId = HeatToToscaUtil
+ .extractAttachedResourceId(heatFileName, heatOrchestrationTemplate, context, hint);
+ if (attachedResourceId.isPresent()) {
+ AttachedResourceId serverGroupResourceId = attachedResourceId.get();
+ Object serverGroupResourceToTranslate = serverGroupResourceId.getEntityId();
+ if (serverGroupResourceId.isGetResource()) {
+ boolean isHintOfTypeNovaServerGroup =
+ isHintOfTypeNovaServerGroup(heatOrchestrationTemplate,
+ serverGroupResourceToTranslate);
+ if (isHintOfTypeNovaServerGroup) {
+ addNovaServerToPolicyGroup(translateTo, context, heatFileName, serviceTemplate,
+ heatOrchestrationTemplate, (String) serverGroupResourceToTranslate);
+ }
+ } else if (serverGroupResourceId.isGetParam()) {
+ TranslatedHeatResource translatedServerGroupResource =
+ context.getHeatSharedResourcesByParam().get(serverGroupResourceToTranslate);
+ if (Objects.nonNull(translatedServerGroupResource)
+ && !HeatToToscaUtil.isHeatFileNested(translateTo, translateTo.getHeatFileName())) {
+ serviceTemplate.getTopology_template().getGroups()
+ .get(translatedServerGroupResource.getTranslatedId()).getMembers()
+ .add(translateTo.getTranslatedId());
+ }
+ }
+ }
+ }
+ }
+
+ private boolean isHintOfTypeNovaServerGroup(HeatOrchestrationTemplate heatOrchestrationTemplate,
+ Object resourceToTranslate) {
+ return heatOrchestrationTemplate.getResources().get(resourceToTranslate).getType()
+ .equals(HeatResourcesTypes.NOVA_SERVER_GROUP_RESOURCE_TYPE.getHeatResource());
+ }
+
+ private void addNovaServerToPolicyGroup(TranslateTo translateTo, TranslationContext context,
+ String heatFileName, ServiceTemplate serviceTemplate,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ String resourceToTranslate) {
+ Resource serverGroup =
+ HeatToToscaUtil.getResource(heatOrchestrationTemplate, resourceToTranslate, heatFileName);
+ Optional<String> serverGroupTranslatedId = ResourceTranslationFactory.getInstance(serverGroup)
+ .translateResource(heatFileName, serviceTemplate, heatOrchestrationTemplate, serverGroup,
+ resourceToTranslate, context);
+ if (serverGroupTranslatedId.isPresent()) {
+ serviceTemplate.getTopology_template().getGroups().get(serverGroupTranslatedId.get())
+ .getMembers().add(translateTo.getTranslatedId());
+ }
+ }
+
+ private boolean isSchedulerHintsPropExist(Map<String, Object> properties) {
+ return !MapUtils.isEmpty(properties) && Objects.nonNull(properties.get("scheduler_hints"));
+ }
+
+ private void manageNovaServerBlockDeviceMapping(String heatFileName,
+ ServiceTemplate serviceTemplate,
+ NodeTemplate novaNodeTemplate,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ Resource resource, String resourceId,
+ String novaServerTranslatedId,
+ TranslationContext context) {
+
+ List<Map<String, Object>> blockDeviceMappingList = getBlockDeviceMappingList(resource);
+ if (CollectionUtils.isEmpty(blockDeviceMappingList)) {
+ return;
+ }
+
+ Object volumeIdObject;
+ Object snapshotIdObject;
+ String volumeResourceId;
+ int index = 0;
+ for (Map<String, Object> blockDeviceMapping : blockDeviceMappingList) {
+ volumeIdObject = blockDeviceMapping.get("volume_id");
+ snapshotIdObject = blockDeviceMapping.get("snapshot_id");
+
+ if (volumeIdObject == null && snapshotIdObject == null) {
+ logger.warn("Resource '" + resourceId
+ + "' has block_device_mapping property with empty/missing volume_id and snapshot_id "
+ + "properties. Entry number "
+ + (index + 1) + ", this entry will be ignored in TOSCA translation.");
+ index++;
+ continue;
+ }
+ if (volumeIdObject == null) {
+ String deviceName = (String) blockDeviceMapping.get("device_name");
+ String relationshipId = novaServerTranslatedId + "_" + index;
+
+ Optional<AttachedResourceId> attachedSnapshotId = HeatToToscaUtil
+ .extractAttachedResourceId(heatFileName, heatOrchestrationTemplate, context,
+ snapshotIdObject);
+ volumeResourceId = novaServerTranslatedId + "_" + attachedSnapshotId.get().getEntityId();
+ createVolumeAttachesToRelationship(serviceTemplate, deviceName, novaServerTranslatedId,
+ volumeResourceId, relationshipId);
+ createCinderVolumeNodeTemplate(serviceTemplate, volumeResourceId, heatFileName,
+ blockDeviceMapping, heatOrchestrationTemplate, context);
+ connectNovaServerToVolume(novaNodeTemplate, volumeResourceId, relationshipId);
+ } else {
+ Optional<AttachedResourceId> attachedVolumeId = HeatToToscaUtil
+ .extractAttachedResourceId(heatFileName, heatOrchestrationTemplate, context,
+ volumeIdObject);
+ if (attachedVolumeId.get().isGetResource()) {
+ connectNovaServerToVolume(novaNodeTemplate,
+ (String) attachedVolumeId.get().getTranslatedId(), null);
+ }
+ }
+ index++;
+ }
+ }
+
+ private void connectNovaServerToVolume(NodeTemplate novaNodeTemplate, String volumeResourceId,
+ String relationshipId) {
+ RequirementAssignment requirementAssignment = new RequirementAssignment();
+ requirementAssignment.setCapability(ToscaCapabilityType.ATTACHMENT.getDisplayName());
+ requirementAssignment.setNode(volumeResourceId);
+ if (relationshipId != null) {
+ requirementAssignment.setRelationship(relationshipId);
+ } else {
+ requirementAssignment
+ .setRelationship(ToscaRelationshipType.NATIVE_ATTACHES_TO.getDisplayName());
+ }
+ DataModelUtil
+ .addRequirementAssignment(novaNodeTemplate, ToscaConstants.LOCAL_STORAGE_REQUIREMENT_ID,
+ requirementAssignment);
+ }
+
+ private void createCinderVolumeNodeTemplate(ServiceTemplate serviceTemplate,
+ String volumeResourceId, String heatFileName,
+ Map<String, Object> blockDeviceMapping,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ TranslationContext context) {
+ NodeTemplate cinderVolumeNodeTemplate = new NodeTemplate();
+ cinderVolumeNodeTemplate.setType(ToscaNodeType.CINDER_VOLUME.getDisplayName());
+ cinderVolumeNodeTemplate.setProperties(TranslatorHeatToToscaPropertyConverter
+ .getToscaPropertiesSimpleConversion(blockDeviceMapping, null, heatFileName,
+ heatOrchestrationTemplate,
+ HeatResourcesTypes.CINDER_VOLUME_RESOURCE_TYPE.getHeatResource(),
+ cinderVolumeNodeTemplate, context));
+ DataModelUtil.addNodeTemplate(serviceTemplate, volumeResourceId, cinderVolumeNodeTemplate);
+ }
+
+ private void createVolumeAttachesToRelationship(ServiceTemplate serviceTemplate,
+ String deviceName, String novaServerTranslatedId,
+ String volumeId, String relationshipId) {
+ RelationshipTemplate relationshipTemplate = new RelationshipTemplate();
+ relationshipTemplate.setType(ToscaRelationshipType.CINDER_VOLUME_ATTACHES_TO.getDisplayName());
+ Map<String, Object> properties = new HashMap<>();
+ properties.put("instance_uuid", novaServerTranslatedId);
+ properties.put("volume_id", volumeId);
+ if (deviceName != null) {
+ properties.put("device", deviceName);
+ }
+ relationshipTemplate.setProperties(properties);
+
+ DataModelUtil.addRelationshipTemplate(serviceTemplate, relationshipId, relationshipTemplate);
+ }
+
+ private List<Map<String, Object>> getBlockDeviceMappingList(Resource resource) {
+
+ if (Objects.isNull(resource.getProperties())) {
+ return Collections.emptyList();
+ }
+ List<Map<String, Object>> blockDeviceMappingList =
+ (List<Map<String, Object>>) resource.getProperties().get("block_device_mapping");
+ List<Map<String, Object>> blockDeviceMappingV2List =
+ (List<Map<String, Object>>) resource.getProperties().get("block_device_mapping_v2");
+
+ if (blockDeviceMappingList != null && blockDeviceMappingV2List != null) {
+ blockDeviceMappingList.addAll(blockDeviceMappingV2List);
+ } else if (CollectionUtils.isEmpty(blockDeviceMappingList)
+ && CollectionUtils.isEmpty(blockDeviceMappingV2List)) {
+ return null;
+
+ } else {
+ blockDeviceMappingList =
+ blockDeviceMappingList != null ? blockDeviceMappingList : blockDeviceMappingV2List;
+ }
+ return blockDeviceMappingList;
+ }
+
+ private void manageNovaServerNetwork(String heatFileName, ServiceTemplate serviceTemplate,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ Resource resource, String translatedId,
+ TranslationContext context, NodeTemplate novaNodeTemplate) {
+
+ if (resource.getProperties() == null) {
+ return;
+ }
+ List<Map<String, Object>> heatNetworkList =
+ (List<Map<String, Object>>) resource.getProperties().get("networks");
+
+ if (CollectionUtils.isEmpty(heatNetworkList)) {
+ return;
+ }
+
+ for (Map<String, Object> heatNetwork : heatNetworkList) {
+ getOrTranslatePortTemplate(heatFileName, heatOrchestrationTemplate,
+ heatNetwork.get(Constants.PORT_PROPERTY_NAME), serviceTemplate, translatedId, context,
+ novaNodeTemplate);
+ }
+
+ }
+
+ private void getOrTranslatePortTemplate(String heatFileName,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ Object port, ServiceTemplate serviceTemplate,
+ String novaServerResourceId, TranslationContext context,
+ NodeTemplate novaNodeTemplate) {
+ Optional<AttachedResourceId> attachedPortId = HeatToToscaUtil
+ .extractAttachedResourceId(heatFileName, heatOrchestrationTemplate, context, port);
+
+ if (!attachedPortId.isPresent()) {
+ return;
+ }
+
+ if (attachedPortId.get().isGetResource()) {
+ String resourceId = (String) attachedPortId.get().getEntityId();
+ Resource portResource =
+ HeatToToscaUtil.getResource(heatOrchestrationTemplate, resourceId, heatFileName);
+ if (!Arrays.asList(HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource(),
+ HeatResourcesTypes.CONTRAIL_V2_VIRTUAL_MACHINE_INTERFACE_RESOURCE_TYPE.getHeatResource())
+ .contains(portResource.getType())) {
+ logger.warn("NovaServer connect to port resource with id : " + resourceId + " and type : "
+ + portResource.getType()
+ + ". This resource type is not supported, therefore the connection to the port is "
+ + "ignored. "
+ + "Supported types are: "
+ + HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource() + ", "
+ + HeatResourcesTypes.CONTRAIL_V2_VIRTUAL_MACHINE_INTERFACE_RESOURCE_TYPE
+ .getHeatResource());
+ return;
+ } else if (HeatResourcesTypes.CONTRAIL_V2_VIRTUAL_MACHINE_INTERFACE_RESOURCE_TYPE
+ .getHeatResource().equals(portResource.getType())) {
+ Map<String, Object> properties = portResource.getProperties();
+ if (!MapUtils.isEmpty(properties) && Objects.nonNull(properties.get("port_tuple_refs"))) {
+ novaNodeTemplate.getProperties().put("contrail_service_instance_ind", true);
+ }
+ }
+ Optional<String> translatedPortId = ResourceTranslationFactory.getInstance(portResource)
+ .translateResource(heatFileName, serviceTemplate, heatOrchestrationTemplate, portResource,
+ resourceId, context);
+ if (translatedPortId.isPresent()) {
+ NodeTemplate portNodeTemplate =
+ DataModelUtil.getNodeTemplate(serviceTemplate, translatedPortId.get());
+ addBindingReqFromPortToCompute(novaServerResourceId, portNodeTemplate);
+ } else {
+ logger.warn("NovaServer connect to port resource with id : " + resourceId + " and type : "
+ + portResource.getType()
+ + ". This resource type is not supported, therefore the connection to the port is "
+ + "ignored.");
+ }
+ }
+ }
+
+ /**
+ * Create local node type string.
+ *
+ * @param serviceTemplate the service template
+ * @param properties the properties
+ * @param resourceTranslatedId the resource translated id
+ * @return the string
+ */
+ public String createLocalNodeType(ServiceTemplate serviceTemplate, Map<String, Object> properties,
+ String resourceTranslatedId) {
+ NameExtractorService nodeTypeNameExtractor = new NameExtractorServiceImpl();
+ List<PropertyRegexMatcher> propertyRegexMatchers =
+ getPropertiesAndRegexMatchers(nodeTypeNameExtractor);
+ Optional<String> extractedNodeTypeName = nodeTypeNameExtractor
+ .extractNodeTypeNameByPropertiesPriority(properties, propertyRegexMatchers);
+
+ String nodeTypeName = ToscaConstants.NODES_PREFIX
+ + (extractedNodeTypeName.isPresent() ? extractedNodeTypeName.get()
+ : resourceTranslatedId.replace(".", "_"));
+ if (!isNodeTypeCreated(serviceTemplate, nodeTypeName)) {
+ DataModelUtil.addNodeType(serviceTemplate, nodeTypeName, createNodeType());
+ }
+ return nodeTypeName;
+ }
+
+ private List<PropertyRegexMatcher> getPropertiesAndRegexMatchers(
+ NameExtractorService nodeTypeNameExtractor) {
+ List<PropertyRegexMatcher> propertyRegexMatchers = new ArrayList<>();
+ propertyRegexMatchers.add(nodeTypeNameExtractor
+ .getPropertyRegexMatcher(Constants.NAME_PROPERTY_NAME,
+ Arrays.asList(".+_name$", ".+_names$", ".+_name_[0-9]+"), "_name"));
+ propertyRegexMatchers.add(nodeTypeNameExtractor
+ .getPropertyRegexMatcher("image", Collections.singletonList(".+_image_name$"),
+ "_image_name"));
+ propertyRegexMatchers.add(nodeTypeNameExtractor
+ .getPropertyRegexMatcher("flavor", Collections.singletonList(".+_flavor_name$"),
+ "_flavor_name"));
+ return propertyRegexMatchers;
+ }
+
+ private boolean isNodeTypeCreated(ServiceTemplate serviceTemplate, String nodeTypeName) {
+ return !MapUtils.isEmpty(serviceTemplate.getNode_types())
+ && Objects.nonNull(serviceTemplate.getNode_types().get(nodeTypeName));
+ }
+
+ private NodeType createNodeType() {
+ NodeType nodeType = new NodeType();
+ nodeType.setDerived_from(ToscaNodeType.NOVA_SERVER.getDisplayName());
+ return nodeType;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationResourceGroupImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationResourceGroupImpl.java
new file mode 100644
index 0000000000..4665249351
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationResourceGroupImpl.java
@@ -0,0 +1,202 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.heat.services.HeatConstants;
+import org.openecomp.sdc.tosca.datatypes.ToscaFunctions;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
+import org.openecomp.sdc.translator.services.heattotosca.ResourceTranslationFactory;
+import org.openecomp.sdc.translator.services.heattotosca.errors.InvalidPropertyValueErrorBuilder;
+import org.openecomp.sdc.translator.services.heattotosca.mapping.TranslatorHeatToToscaPropertyConverter;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+public class ResourceTranslationResourceGroupImpl extends ResourceTranslationBase {
+
+ @Override
+ protected void translate(TranslateTo translateTo) {
+ final String heatFileName = translateTo.getHeatFileName();
+ Object resourceDef =
+ translateTo.getResource().getProperties().get(HeatConstants.RESOURCE_DEF_PROPERTY_NAME);
+ Resource nestedResource = new Resource();
+ Object typeDefinition = ((Map) resourceDef).get("type");
+ if (!(typeDefinition instanceof String)) {
+ logger.warn("Resource '" + translateTo.getResourceId() + "' of type'"
+ + HeatResourcesTypes.RESOURCE_GROUP_RESOURCE_TYPE.getHeatResource()
+ + "' with resourceDef which is not pointing to nested heat file "
+ + "is not supported and will be ignored in the translation ");
+ return;
+ }
+ String type = (String) typeDefinition;
+ if (!HeatToToscaUtil.isYmlFileType(type)) {
+ logger.warn("Resource '" + translateTo.getResourceId() + "' of type'"
+ + HeatResourcesTypes.RESOURCE_GROUP_RESOURCE_TYPE.getHeatResource()
+ + "' with resourceDef which is not pointing to nested heat "
+ + "file is not supported and will be ignored in the translation ");
+ return;
+ }
+
+ nestedResource.setType(type);
+ nestedResource.setProperties((Map<String, Object>) ((Map) resourceDef).get("properties"));
+ nestedResource.setMetadata(((Map) resourceDef).get("metadata"));
+
+ Optional<String> substitutionNodeTemplateId =
+ ResourceTranslationFactory.getInstance(nestedResource)
+ .translateResource(heatFileName, translateTo.getServiceTemplate(),
+ translateTo.getHeatOrchestrationTemplate(), nestedResource,
+ translateTo.getResourceId(), translateTo.getContext());
+ if (substitutionNodeTemplateId.isPresent()) {
+ NodeTemplate substitutionNodeTemplate = DataModelUtil
+ .getNodeTemplate(translateTo.getServiceTemplate(), substitutionNodeTemplateId.get());
+ Map serviceTemplateFilter = (Map<String, Object>) substitutionNodeTemplate.getProperties()
+ .get(ToscaConstants.SERVICE_TEMPLATE_FILTER_PROPERTY_NAME);
+
+ populateServiceTemplateFilterProperties(translateTo, substitutionNodeTemplate,
+ serviceTemplateFilter);
+ handlingIndexVar(translateTo, substitutionNodeTemplate);
+ DataModelUtil
+ .addNodeTemplate(translateTo.getServiceTemplate(), substitutionNodeTemplateId.get(),
+ substitutionNodeTemplate);
+ }
+
+ }
+
+ private void handlingIndexVar(TranslateTo translateTo, NodeTemplate substitutionNodeTemplate) {
+ String indexVarValue = getIndexVarValue(translateTo);
+ replacePropertiesIndexVarValue(indexVarValue, substitutionNodeTemplate.getProperties());
+ }
+
+ private Map<String, List> getNewIndexVarValue() {
+ final Map<String, List> newIndexVarValue = new HashMap<>();
+ List indexVarValList = new ArrayList<>();
+ 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);
+ return newIndexVarValue;
+ }
+
+ private void replacePropertiesIndexVarValue(String indexVarValue,
+ Map<String, Object> properties) {
+ if (properties == null || properties.isEmpty()) {
+ return;
+ }
+
+ for (Map.Entry<String, Object> propertyEntry : properties.entrySet()) {
+ Object propertyValue = propertyEntry.getValue();
+ Object newPropertyValue = getUpdatedPropertyValueWithIndex(indexVarValue, propertyValue);
+ if (newPropertyValue != null) {
+ properties.put(propertyEntry.getKey(), newPropertyValue);
+ }
+ }
+ }
+
+ private Object getUpdatedPropertyValueWithIndex(String indexVarValue, Object propertyValue) {
+ if (propertyValue instanceof String && propertyValue != null) {
+ if (propertyValue.equals(indexVarValue)) {
+ return getNewIndexVarValue();
+ }
+ if (((String) propertyValue).contains(indexVarValue)) {
+ Map<String, List<Object>> concatMap = new HashMap<>();
+ List<Object> concatList = new ArrayList<>();
+ String value = (String) propertyValue;
+
+ while (value.contains(indexVarValue)) {
+ if (value.indexOf(indexVarValue) == 0) {
+ concatList.add(getNewIndexVarValue());
+ value = value.substring(indexVarValue.length());
+ } else {
+ int end = value.indexOf(indexVarValue);
+ concatList.add(value.substring(0, end));
+ value = value.substring(end);
+ }
+ }
+ if (!value.isEmpty()) {
+ concatList.add(value);
+ }
+
+ concatMap.put(ToscaFunctions.CONCAT.getDisplayName(), concatList);
+ return concatMap;
+ }
+ return propertyValue; //no update is needed
+ } else if (propertyValue instanceof Map && !((Map) propertyValue).isEmpty()) {
+ replacePropertiesIndexVarValue(indexVarValue, (Map<String, Object>) propertyValue);
+ return propertyValue;
+ } else if (propertyValue instanceof List && !((List) propertyValue).isEmpty()) {
+ List newPropertyValueList = new ArrayList<>();
+ for (Object entry : ((List) propertyValue)) {
+ newPropertyValueList.add(getUpdatedPropertyValueWithIndex(indexVarValue, entry));
+ }
+ return newPropertyValueList;
+ }
+ return propertyValue;
+ }
+
+ private String getIndexVarValue(TranslateTo translateTo) {
+ Object indexVar =
+ translateTo.getResource().getProperties().get(HeatConstants.INDEX_PROPERTY_NAME);
+ if (indexVar == null) {
+ return HeatConstants.RESOURCE_GROUP_INDEX_VAR_DEFAULT_VALUE;
+ }
+
+ if (indexVar instanceof String) {
+ return (String) indexVar;
+ } else {
+ throw new CoreException(
+ new InvalidPropertyValueErrorBuilder("index_var", indexVar.toString(), "String").build());
+ }
+ }
+
+ private void populateServiceTemplateFilterProperties(TranslateTo translateTo,
+ NodeTemplate substitutionNodeTemplate,
+ Map serviceTemplateFilter) {
+ boolean mandatory = false;
+ Object countValue = TranslatorHeatToToscaPropertyConverter
+ .getToscaPropertyValue(ToscaConstants.COUNT_PROPERTY_NAME,
+ translateTo.getResource().getProperties().get(ToscaConstants.COUNT_PROPERTY_NAME), null,
+ translateTo.getHeatFileName(), translateTo.getHeatOrchestrationTemplate(),
+ substitutionNodeTemplate, translateTo.getContext());
+
+ if (countValue != null) {
+ serviceTemplateFilter.put(ToscaConstants.COUNT_PROPERTY_NAME, countValue);
+ } else {
+ serviceTemplateFilter.put(ToscaConstants.COUNT_PROPERTY_NAME, 1);
+ }
+ if (countValue instanceof Integer && (Integer) countValue > 0) {
+ mandatory = true;
+ }
+ if (countValue == null) {
+ mandatory = true;
+ }
+ serviceTemplateFilter.put("mandatory", mandatory);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/SecurityRulesToPortResourceConnection.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/SecurityRulesToPortResourceConnection.java
new file mode 100644
index 0000000000..3c6fef7ffb
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/SecurityRulesToPortResourceConnection.java
@@ -0,0 +1,203 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+
+import org.openecomp.sdc.heat.datatypes.manifest.FileData;
+import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
+import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
+import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
+import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslatedHeatResource;
+import org.openecomp.sdc.translator.services.heattotosca.Constants;
+import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
+import org.openecomp.sdc.translator.services.heattotosca.ResourceTranslationFactory;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.function.Predicate;
+
+
+class SecurityRulesToPortResourceConnection extends BaseResourceConnection<CapabilityDefinition> {
+ SecurityRulesToPortResourceConnection(ResourceTranslationNestedImpl resourceTranslationNested,
+ TranslateTo translateTo, FileData nestedFileData,
+ NodeTemplate substitutionNodeTemplate, NodeType nodeType) {
+ super(resourceTranslationNested, translateTo, nestedFileData, substitutionNodeTemplate,
+ nodeType);
+ }
+
+ @Override
+ protected boolean isDesiredNodeTemplateType(NodeTemplate nodeTemplate) {
+ return nodeTemplate.getType().equals(ToscaNodeType.NEUTRON_PORT.getDisplayName());
+ }
+
+ @Override
+ protected List<Predicate<CapabilityDefinition>> getPredicatesListForConnectionPoints() {
+ ArrayList<Predicate<CapabilityDefinition>> predicates = new ArrayList<>();
+ predicates.add(cap -> cap.getType().equals(ToscaCapabilityType.ATTACHMENT.getDisplayName()));
+ return predicates;
+ }
+
+ @Override
+ protected Optional<List<String>> getConnectorParamName(
+ String heatResourceId,Resource heatResource,
+ HeatOrchestrationTemplate nestedHeatOrchestrationTemplate) {
+ Object securityGroups =
+ heatResource.getProperties().get(Constants.SECURITY_GROUPS_PROPERTY_NAME);
+ List<String> paramsList = new ArrayList<>();
+ if (securityGroups instanceof List) {
+ ((List) securityGroups).forEach(group -> {
+ Optional<AttachedResourceId> attachedResourceId = HeatToToscaUtil
+ .extractAttachedResourceId(nestedFileData.getFile(), nestedHeatOrchestrationTemplate,
+ translateTo.getContext(), group);
+ if (attachedResourceId.isPresent()) {
+ paramsList.add((String) attachedResourceId.get().getEntityId());
+ }
+ });
+ return Optional.of(paramsList);
+ }
+ return Optional.empty();
+ }
+
+ @Override
+ protected String getDesiredResourceType() {
+ return HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource();
+ }
+
+ @Override
+ protected List<Map<String, CapabilityDefinition>> getAllConnectionPoints() {
+ List<Map<String, CapabilityDefinition>> exposedRequirementsList = new ArrayList<>();
+ List<Predicate<CapabilityDefinition>> predicates = getPredicatesListForConnectionPoints();
+ Map<String, CapabilityDefinition> capabilities = this.nodeType.getCapabilities();
+ if (capabilities == null) {
+ return exposedRequirementsList;
+ }
+ capabilities.entrySet()
+ .stream()
+ .filter(entry -> predicates
+ .stream()
+ .anyMatch(p -> p.test(entry.getValue())))
+ .forEach(entry -> {
+ Map<String, CapabilityDefinition> exposedRequirementsMap = new HashMap<>();
+ exposedRequirementsMap.put(entry.getKey(), entry.getValue());
+ exposedRequirementsList.add(exposedRequirementsMap);
+ });
+
+ return exposedRequirementsList;
+ }
+
+ @Override
+ void addRequirementToConnectResources(Map.Entry<String, CapabilityDefinition> entry,
+ List<String> paramNames) {
+ paramNames.forEach(p -> {
+ Optional<AttachedResourceId> attachedResourceId =
+ HeatToToscaUtil.extractAttachedResourceId(translateTo, p);
+ String securityRulesNodeId;
+ if (!attachedResourceId.isPresent()) {
+ return;
+ }
+ Map.Entry<String, RequirementDefinition> requirementDefinition =
+ createRequirementDefinition(entry.getKey());
+ AttachedResourceId securityGroupAttachedId = attachedResourceId.get();
+ if (securityGroupAttachedId.isGetResource()) {
+ String securityGroupResourceId = (String) attachedResourceId.get().getEntityId();
+ Resource securityGroupResource = HeatToToscaUtil
+ .getResource(translateTo.getHeatOrchestrationTemplate(), securityGroupResourceId,
+ translateTo.getHeatFileName());
+ Optional<String> translatedSecurityRuleId =
+ ResourceTranslationFactory.getInstance(securityGroupResource)
+ .translateResource(translateTo.getHeatFileName(), translateTo.getServiceTemplate(),
+ translateTo.getHeatOrchestrationTemplate(), securityGroupResource,
+ securityGroupResourceId, translateTo.getContext());
+ if (translatedSecurityRuleId.isPresent()) {
+ NodeTemplate securityRuleNodeTemplate = DataModelUtil
+ .getNodeTemplate(translateTo.getServiceTemplate(), translatedSecurityRuleId.get());
+ createRequirementAssignment(requirementDefinition, translateTo.getTranslatedId(),
+ securityRuleNodeTemplate);
+ } else {
+ logger.warn(
+ securityGroupResource.getType() + "connection to " + securityGroupResource.getType()
+ + " is not supported/invalid, therefore this connection "
+ + "will be ignored in the TOSCA translation");
+ }
+ } else if (securityGroupAttachedId.isGetParam()) {
+ TranslatedHeatResource shareResource =
+ translateTo.getContext().getHeatSharedResourcesByParam()
+ .get(securityGroupAttachedId.getEntityId());
+ if (Objects.nonNull(shareResource)
+ && !HeatToToscaUtil.isHeatFileNested(translateTo, translateTo.getHeatFileName())) {
+ NodeTemplate sharedNodeTemplate = DataModelUtil
+ .getNodeTemplate(translateTo.getServiceTemplate(), shareResource.getTranslatedId());
+ createRequirementAssignment(requirementDefinition, translateTo.getTranslatedId(),
+ sharedNodeTemplate);
+ }
+ }
+ });
+ }
+
+ @Override
+ protected String getTranslatedResourceIdFromSubstitutionMapping(
+ ServiceTemplate nestedServiceTemplate, Map.Entry<String, CapabilityDefinition> entry) {
+ List<String> substitutionMapping =
+ nestedServiceTemplate.getTopology_template().getSubstitution_mappings().getCapabilities()
+ .get(entry.getKey());
+ return substitutionMapping.get(0);
+ }
+
+ private Map.Entry<String, RequirementDefinition> createRequirementDefinition(String key) {
+ RequirementDefinition definition = new RequirementDefinition();
+ definition.setCapability(key);
+ definition.setRelationship(ToscaRelationshipType.ATTACHES_TO.getDisplayName());
+ return new Map.Entry<String, RequirementDefinition>() {
+ @Override
+ public String getKey() {
+ return ToscaConstants.PORT_REQUIREMENT_ID;
+ }
+
+ @Override
+ public RequirementDefinition getValue() {
+ return definition;
+ }
+
+ @Override
+ public RequirementDefinition setValue(RequirementDefinition value) {
+ return null;
+ }
+ };
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/mapping/TranslatorHeatToToscaFunctionConverter.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/mapping/TranslatorHeatToToscaFunctionConverter.java
new file mode 100644
index 0000000000..0aa5c5ff96
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/mapping/TranslatorHeatToToscaFunctionConverter.java
@@ -0,0 +1,410 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.mapping;
+
+import org.openecomp.core.utilities.yaml.YamlUtil;
+import org.openecomp.sdc.heat.datatypes.HeatBoolean;
+import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.heat.services.HeatConstants;
+import org.openecomp.sdc.tosca.datatypes.ToscaArtifactType;
+import org.openecomp.sdc.tosca.datatypes.ToscaFunctions;
+import org.openecomp.sdc.tosca.datatypes.model.ArtifactDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.Template;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.tosca.services.ToscaFileOutputService;
+import org.openecomp.sdc.tosca.services.impl.ToscaFileOutputServiceCsarImpl;
+import org.openecomp.sdc.translator.services.heattotosca.Constants;
+import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
+import org.openecomp.sdc.translator.services.heattotosca.TranslationContext;
+import org.openecomp.sdc.translator.services.heattotosca.impl.ResourceTranslationBase;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+
+public class TranslatorHeatToToscaFunctionConverter {
+ private static final String UNSUPPORTED_RESOURCE = "UNSUPPORTED_RESOURCE_";
+ private static final String UNSUPPORTED_ATTRIBUTE = "UNSUPPORTED_ATTRIBUTE_";
+
+ protected static Set<String> functionNameSet;
+
+ static {
+ functionNameSet = new HashSet<>();
+ functionNameSet.add("get_param");
+ functionNameSet.add("get_attr");
+ functionNameSet.add("get_resource");
+ functionNameSet.add("get_file");
+ }
+
+ /**
+ * Gets tosca function.
+ *
+ * @param functionName the function name
+ * @param function the function
+ * @param heatFileName the heat file name
+ * @param heatOrchestrationTemplate the heat orchestration template
+ * @param template the template
+ * @param context the context
+ * @return the tosca function
+ */
+ public static Object getToscaFunction(String functionName, Object function, String heatFileName,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ Template template, TranslationContext context) {
+ Object returnValue = null;
+ if ("get_param".equals(functionName)) {
+ returnValue =
+ handleGetParamFunction(function, heatFileName, heatOrchestrationTemplate, context);
+ } else if ("get_attr".equals(functionName)) {
+ returnValue =
+ handleGetAttrFunction(function, heatFileName, heatOrchestrationTemplate, context);
+ } else if ("get_resource".equals(functionName)) {
+ returnValue =
+ handleGetResourceFunction(function, heatFileName, heatOrchestrationTemplate, context);
+ } else if ("get_file".equals(functionName)) {
+ returnValue = handleGetFileFunction(function, template);
+ }
+ return returnValue;
+ }
+
+ private static Object handleGetFileFunction(Object function, Template template) {
+ String file = ((String) function).replace("file:///", "");
+ Object returnValue;
+ final String artifactId = file.split("\\.")[0];
+
+ returnValue = new HashMap<>();
+ List artifactParameters = new ArrayList();
+ artifactParameters.add(0, ToscaConstants.MODELABLE_ENTITY_NAME_SELF);
+ ((Map) returnValue).put(ToscaFunctions.GET_ARTIFACT.getDisplayName(), artifactParameters);
+ artifactParameters.add(1, artifactId);
+
+ ToscaFileOutputService toscaFileOutputService = new ToscaFileOutputServiceCsarImpl();
+ if (template != null) {
+ if (template instanceof NodeTemplate) {
+ NodeTemplate nodeTemplate = (NodeTemplate) template;
+ ArtifactDefinition artifactDefinition =
+ createArtifactDefinition(file, toscaFileOutputService);
+ if (nodeTemplate.getArtifacts() == null) {
+ nodeTemplate.setArtifacts(new HashMap<>());
+ }
+ nodeTemplate.getArtifacts().put(artifactId, artifactDefinition);
+ }
+ }
+ return returnValue;
+ }
+
+ private static Object handleGetResourceFunction(Object function, String heatFileName,
+ HeatOrchestrationTemplate
+ heatOrchestrationTemplate,
+ TranslationContext context) {
+ Object returnValue;
+ Optional<String> resourceTranslatedId = ResourceTranslationBase
+ .getResourceTranslatedId(heatFileName, heatOrchestrationTemplate, (String) function,
+ context);
+ if (resourceTranslatedId.isPresent()) {
+ returnValue = resourceTranslatedId.get();
+ } else {
+ returnValue = UNSUPPORTED_RESOURCE + function;
+ }
+ return returnValue;
+ }
+
+ private static Object handleGetAttrFunction(Object function, String heatFileName,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ TranslationContext context) {
+ Object returnValue = new HashMap<>();
+ List<Object> attributeFunctionExpression =
+ translateGetAttributeFunctionExpression(function, heatFileName, heatOrchestrationTemplate,
+ context);
+ if (isResourceSupported(attributeFunctionExpression.get(0).toString())
+ && isAttributeSupported(attributeFunctionExpression.get(0).toString())) {
+ ((Map) returnValue)
+ .put(ToscaFunctions.GET_ATTRIBUTE.getDisplayName(), attributeFunctionExpression);
+ } else {
+ returnValue = attributeFunctionExpression;
+ }
+ return returnValue;
+ }
+
+ private static Object handleGetParamFunction(Object function, String heatFileName,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ TranslationContext context) {
+ Map returnValue = new HashMap<>();
+ returnValue.put(ToscaFunctions.GET_INPUT.getDisplayName(),
+ translateGetParamFunctionExpression(function, heatFileName, heatOrchestrationTemplate,
+ context));
+ return returnValue;
+ }
+
+ private static ArtifactDefinition createArtifactDefinition(Object function,
+ ToscaFileOutputService
+ toscaFileOutputService) {
+ ArtifactDefinition artifactDefinition = new ArtifactDefinition();
+ artifactDefinition.setType(ToscaArtifactType.DEPLOYMENT.getDisplayName());
+ artifactDefinition
+ .setFile("../" + toscaFileOutputService.getArtifactsFolderName() + "/" + function);
+ return artifactDefinition;
+ }
+
+ private static Object translateGetParamFunctionExpression(Object function, String heatFileName,
+ HeatOrchestrationTemplate
+ heatOrchestrationTemplate,
+ TranslationContext context) {
+ Object returnValue = null;
+ if (function instanceof String) {
+ returnValue = function;
+ } else {
+ if (function instanceof List) {
+ returnValue = new ArrayList<>();
+ for (int i = 0; i < ((List) function).size(); i++) {
+ Object paramValue = ((List) function).get(i);
+ if ((paramValue instanceof Map && !((Map) paramValue).isEmpty())) {
+ Map<String, Object> paramMap = (Map) paramValue;
+ Map.Entry<String, Object> entry = paramMap.entrySet().iterator().next();
+ ((List) returnValue).add(
+ getToscaFunction(entry.getKey(), entry.getValue(), heatFileName,
+ heatOrchestrationTemplate, null, context));
+ } else {
+ ((List) returnValue).add(paramValue);
+ }
+ }
+ }
+ }
+
+ return returnValue;
+ }
+
+ private static List<Object> translateGetAttributeFunctionExpression(
+ Object function,String heatFileName,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ TranslationContext context) {
+ List<String> attributeParamList = (List) function;
+ List<Object> toscaAttributeParamList = new ArrayList<>();
+
+ Optional<String> resourceTranslatedId =
+ handleResourceName(attributeParamList.get(0), heatFileName, heatOrchestrationTemplate,
+ context);
+ if (!resourceTranslatedId.isPresent()) {
+ //unsupported resource
+ toscaAttributeParamList.add(UNSUPPORTED_RESOURCE + attributeParamList.get(0));
+ return toscaAttributeParamList;
+ } else {
+ toscaAttributeParamList.add(resourceTranslatedId.get());
+ }
+
+ Optional<List<Object>> toscaAttList =
+ handleAttributeName(attributeParamList, heatOrchestrationTemplate, heatFileName, context);
+ if (!toscaAttList.isPresent()) {
+ //Unsupported attribute
+ toscaAttributeParamList.clear();
+ toscaAttributeParamList
+ .add(UNSUPPORTED_ATTRIBUTE + attributeParamList.get(0) + "." + attributeParamList.get(1));
+ return toscaAttributeParamList;
+ } else {
+ toscaAttributeParamList.addAll(toscaAttList.get());
+ }
+
+ Optional<List<String>> toscaIndexOrKey = handleAttributeIndexOrKey(attributeParamList);
+ if (toscaIndexOrKey.isPresent()) {
+ toscaAttributeParamList.addAll(toscaIndexOrKey.get());
+ }
+
+ return toscaAttributeParamList;
+ }
+
+ private static Optional<List<String>> handleAttributeIndexOrKey(List<String> attributeParamList) {
+ List<String> attributeIndexOrKey = new ArrayList<>();
+ if (attributeParamList.size() < 2) {
+ return Optional.empty();
+ }
+
+ for (int i = 2; i < attributeParamList.size(); i++) {
+ attributeIndexOrKey.add(attributeParamList.get(i));
+ }
+
+ return Optional.of(attributeIndexOrKey);
+ }
+
+ private static Optional<List<Object>> handleAttributeName(List<String> attributeParamList,
+ HeatOrchestrationTemplate
+ heatOrchestrationTemplate,
+ String heatFileName,
+ TranslationContext context) {
+ String resourceId = attributeParamList.get(0);
+ Resource resource =
+ HeatToToscaUtil.getResource(heatOrchestrationTemplate, resourceId, heatFileName);
+
+ if (attributeParamList.size() == 1) {
+ return getResourceTranslatedAttributesList(resource, context);
+ }
+
+ if (HeatToToscaUtil.isNestedResource(resource)) {
+ return getNestedResourceTranslatedAttribute(attributeParamList.get(1));
+ } else {
+ return getResourceTranslatedAttribute(resource, attributeParamList.get(1), context);
+ }
+ }
+
+ private static Optional<List<Object>> getResourceTranslatedAttribute(Resource resource,
+ String attributeName,
+ TranslationContext context) {
+ List<Object> translatedAttributesList = new ArrayList<>();
+ String translatedAttribute =
+ context.getElementMapping(resource.getType(), Constants.ATTR, attributeName);
+ if (translatedAttribute != null) {
+ translatedAttributesList.add(translatedAttribute);
+ return Optional.of(translatedAttributesList);
+ } else { //unsupported attribute
+ return Optional.empty();
+ }
+ }
+
+ private static Optional<List<Object>> getNestedResourceTranslatedAttribute(String attributeName) {
+ List<Object> translatedAttributesList = new ArrayList<>();
+
+ if (attributeName.startsWith(HeatConstants.GET_ATT_FROM_RESOURCE_GROUP_PREFIX)) {
+ String[] attributeSplit = attributeName.split("\\.");
+ if (attributeSplit.length == 2) {
+ translatedAttributesList.add(attributeSplit[1]);
+ } else if (attributeSplit.length == 3) {
+ translatedAttributesList.add(attributeSplit[2]);
+ translatedAttributesList.add(Integer.valueOf(attributeSplit[1]));
+ } else {
+ return Optional.empty();
+ }
+ } else {
+ translatedAttributesList.add(attributeName);
+ }
+ return Optional.of(translatedAttributesList);
+ }
+
+ private static Optional<List<Object>> getResourceTranslatedAttributesList(Resource resource,
+ TranslationContext
+ context) {
+ List<Object> translatedAttributes = new ArrayList<>();
+ if (HeatToToscaUtil.isNestedResource(resource)) {
+ Optional<String> nestedFile = HeatToToscaUtil.getNestedFile(resource);
+ if (!nestedFile.isPresent()) {
+ return Optional.empty();
+ }
+ HeatOrchestrationTemplate nestedHeatOrchestrationTemplate = new YamlUtil()
+ .yamlToObject(context.getFiles().getFileContent(nestedFile.get()),
+ HeatOrchestrationTemplate.class);
+ translatedAttributes.addAll(nestedHeatOrchestrationTemplate.getOutputs().keySet());
+ return Optional.of(translatedAttributes);
+
+ } else {
+ Map<String, String> resourceMappingAttributes =
+ context.getElementMapping(resource.getType(), Constants.ATTR);
+ Set<String> mappingAttributes = new HashSet<>();
+ mappingAttributes
+ .addAll(resourceMappingAttributes.values().stream().collect(Collectors.toList()));
+ translatedAttributes.addAll(mappingAttributes);
+ return Optional.of(translatedAttributes);
+ }
+ }
+
+ private static Optional<String> handleResourceName(String resourceId, String heatFileName,
+ HeatOrchestrationTemplate
+ heatOrchestrationTemplate,
+ TranslationContext context) {
+ return ResourceTranslationBase
+ .getResourceTranslatedId(heatFileName, heatOrchestrationTemplate, resourceId, context);
+ }
+
+ public static boolean isResourceSupported(String translatedResourceId) {
+ return !translatedResourceId.startsWith(UNSUPPORTED_RESOURCE);
+ }
+
+ public static boolean isAttributeSupported(String translatedAttName) {
+ return !translatedAttName.startsWith(UNSUPPORTED_ATTRIBUTE);
+ }
+
+ /**
+ * Translate fn split function optional.
+ *
+ * @param propertyValue the property value
+ * @param listSize the list size
+ * @param includeBooleanValue the include boolean value
+ * @return the optional
+ */
+ public static Optional<List<Map<String, List>>> translateFnSplitFunction(
+ Object propertyValue,int listSize,
+ boolean includeBooleanValue) {
+ List<Map<String, List>> tokenPropertyValueList = new ArrayList<>();
+
+ if (propertyValue instanceof Map && !((Map) propertyValue).isEmpty()) {
+ Map<String, Object> propMap = (Map) propertyValue;
+ Map.Entry<String, Object> entry = propMap.entrySet().iterator().next();
+ Object entity = entry.getValue();
+ String key = entry.getKey();
+ String tokenChar;
+
+ if (key.equals("Fn::Split") && entity instanceof List) {
+ tokenChar = (String) ((List) entity).get(0);
+ Object refParameter = ((List) entity).get(1);
+
+ for (int substringIndex = 0; substringIndex < listSize; substringIndex++) {
+ Map<String, List> tokenPropertyValue = new HashMap<>();
+ tokenPropertyValue.put("token", new ArrayList<>());
+
+ 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"));
+ tokenPropertyValue.get("token").add(stringWithToken);
+ } else if (refParameter instanceof String) {
+ if (includeBooleanValue) {
+ StringBuffer booleanBuffer = new StringBuffer();
+ String[] booleanValueList = ((String) refParameter).split(tokenChar);
+ for (int i = 0; i < booleanValueList.length; i++) {
+ if (i == 0) {
+ booleanBuffer.append(HeatBoolean.eval(booleanValueList[i]));
+ } else {
+ booleanBuffer.append(tokenChar);
+ booleanBuffer.append(HeatBoolean.eval(booleanValueList[i]));
+ }
+ }
+ tokenPropertyValue.get("token").add(booleanBuffer.toString());
+ } else {
+ tokenPropertyValue.get("token").add(refParameter);
+ }
+ }
+ tokenPropertyValue.get("token").add(tokenChar);
+ tokenPropertyValue.get("token").add(substringIndex);
+ tokenPropertyValueList.add(tokenPropertyValue);
+ }
+
+ return Optional.of(tokenPropertyValueList);
+
+ }
+ }
+
+ return Optional.empty();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/mapping/TranslatorHeatToToscaParameterConverter.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/mapping/TranslatorHeatToToscaParameterConverter.java
new file mode 100644
index 0000000000..07ab6d1542
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/mapping/TranslatorHeatToToscaParameterConverter.java
@@ -0,0 +1,271 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.mapping;
+
+import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
+import org.openecomp.sdc.heat.datatypes.model.Output;
+import org.openecomp.sdc.heat.datatypes.model.Parameter;
+import org.openecomp.sdc.tosca.datatypes.model.Constraint;
+import org.openecomp.sdc.tosca.datatypes.model.EntrySchema;
+import org.openecomp.sdc.tosca.datatypes.model.ParameterDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.heatextend.ParameterDefinitionExt;
+import org.openecomp.sdc.translator.services.heattotosca.TranslationContext;
+
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class TranslatorHeatToToscaParameterConverter {
+
+
+ private static Map<String, String> parameterTypeMapping;
+ private static Map<String, String> parameterEntrySchemaTypeMapping;
+
+ static {
+ parameterEntrySchemaTypeMapping = new HashMap<>();
+ parameterEntrySchemaTypeMapping.put("list", "string");
+ }
+
+ static {
+ parameterTypeMapping = new HashMap<>();
+ parameterTypeMapping.put("string", "string");
+ parameterTypeMapping.put("number", "float");
+ parameterTypeMapping.put("comma_delimited_list", "list");
+ parameterTypeMapping.put("json", "json");
+ parameterTypeMapping.put("boolean", "boolean");
+ }
+
+ /**
+ * Parameter converter map.
+ *
+ * @param parameters the parameters
+ * @param heatOrchestrationTemplate the heat orchestration template
+ * @param heatFileName the heat file name
+ * @param context the context
+ * @return the map
+ */
+ public static Map<String, ParameterDefinition> parameterConverter(
+ Map<String, Parameter> parameters, HeatOrchestrationTemplate heatOrchestrationTemplate,
+ String heatFileName, TranslationContext context) {
+ Map<String, ParameterDefinition> parameterDefinitionMap = new HashMap<>();
+ for (Map.Entry<String, Parameter> entry : parameters.entrySet()) {
+ //parameterDefinitionMap.put(entry.getKey()+"_"+ FileUtils
+ // .getFileWithoutExtention(heatFileName),getToscaParameter(entry.getValue(),
+ // heatOrchestrationTemplate, heatFileName, context));
+ parameterDefinitionMap.put(entry.getKey(),
+ getToscaParameter(entry.getValue(), heatOrchestrationTemplate, heatFileName, context));
+ }
+ return parameterDefinitionMap;
+ }
+
+ /**
+ * Parameter output converter map.
+ *
+ * @param parameters the parameters
+ * @param heatOrchestrationTemplate the heat orchestration template
+ * @param heatFileName the heat file name
+ * @param context the context
+ * @return the map
+ */
+ public static Map<String, ParameterDefinition> parameterOutputConverter(
+ Map<String, Output> parameters, HeatOrchestrationTemplate heatOrchestrationTemplate,
+ String heatFileName, TranslationContext context) {
+ Map<String, ParameterDefinition> parameterDefinitionMap = new HashMap<>();
+ for (Map.Entry<String, Output> entry : parameters.entrySet()) {
+ //parameterDefinitionMap.put(entry.getKey()+"_"+FileUtils
+ // .getFileWithoutExtention(heatFileName),getToscaOutputParameter(entry.getValue(),
+ // heatOrchestrationTemplate, heatFileName, context));
+ parameterDefinitionMap.put(entry.getKey(),
+ getToscaOutputParameter(entry.getValue(), heatOrchestrationTemplate, heatFileName,
+ context));
+ }
+ return parameterDefinitionMap;
+ }
+
+ /**
+ * Gets tosca parameter.
+ *
+ * @param heatParameter the heat parameter
+ * @param heatOrchestrationTemplate the heat orchestration template
+ * @param heatFileName the heat file name
+ * @param context the context
+ * @return the tosca parameter
+ */
+ public static ParameterDefinitionExt getToscaParameter(Parameter heatParameter,
+ HeatOrchestrationTemplate
+ heatOrchestrationTemplate,
+ String heatFileName,
+ TranslationContext context) {
+
+ ParameterDefinitionExt toscaParameter = new ParameterDefinitionExt();
+ toscaParameter.setType(getToscaParameterType(heatParameter.getType()));
+ toscaParameter.setEntry_schema(getToscaParameterEntrySchema(toscaParameter.getType()));
+ toscaParameter.setLabel(heatParameter.getLabel());
+ toscaParameter.setDescription(heatParameter.getDescription());
+ toscaParameter.set_default(
+ getToscaParameterDefaultValue(heatParameter.get_default(), toscaParameter.getType(),
+ heatFileName, heatOrchestrationTemplate, context));
+ toscaParameter.setHidden(heatParameter.isHidden());
+ toscaParameter.setImmutable(heatParameter.isImmutable());
+ toscaParameter.setConstraints(getToscaConstrains(heatParameter.getConstraints()));
+ return toscaParameter;
+ }
+
+ /**
+ * Gets tosca output parameter.
+ *
+ * @param heatOutputParameter the heat output parameter
+ * @param heatOrchestrationTemplate the heat orchestration template
+ * @param heatFileName the heat file name
+ * @param context the context
+ * @return the tosca output parameter
+ */
+ public static ParameterDefinitionExt getToscaOutputParameter(Output heatOutputParameter,
+ HeatOrchestrationTemplate
+ heatOrchestrationTemplate,
+ String heatFileName,
+ TranslationContext context) {
+
+ ParameterDefinitionExt toscaParameter = new ParameterDefinitionExt();
+ toscaParameter.setDescription(heatOutputParameter.getDescription());
+ toscaParameter.setValue(
+ getToscaParameterDefaultValue(heatOutputParameter.getValue(), toscaParameter.getType(),
+ heatFileName, heatOrchestrationTemplate, context));
+ return toscaParameter;
+ }
+
+ /**
+ * Gets tosca parameter default value.
+ *
+ * @param defaultObj the a default
+ * @param type the type
+ * @param heatFileName the heat file name
+ * @param heatOrchestrationTemplate the heat orchestration template
+ * @param context the context
+ * @return the tosca parameter default value
+ */
+ public static Object getToscaParameterDefaultValue(Object defaultObj, String type,
+ String heatFileName,
+ HeatOrchestrationTemplate
+ heatOrchestrationTemplate,
+ TranslationContext context) {
+
+ if (defaultObj == null) {
+ return null;
+ }
+ if ("list".equals(type)) {
+ if (defaultObj instanceof String) {
+ return Arrays.asList(((String) defaultObj).split(","));
+ } else {
+ return defaultObj;
+ }
+ }
+
+ return getToscaParameterValue(defaultObj, heatFileName, heatOrchestrationTemplate,
+ context);
+ }
+
+ private static Object getToscaParameterValue(Object paramValue, String heatFileName,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ TranslationContext context) {
+ if (paramValue instanceof Map) {
+ Map.Entry<String, Object> functionMapEntry =
+ (Map.Entry<String, Object>) ((Map) paramValue).entrySet().iterator().next();
+ if (TranslatorHeatToToscaFunctionConverter.functionNameSet
+ .contains(functionMapEntry.getKey())) {
+ return TranslatorHeatToToscaFunctionConverter
+ .getToscaFunction(functionMapEntry.getKey(), functionMapEntry.getValue(), heatFileName,
+ heatOrchestrationTemplate, null, context);
+ }
+ }
+
+ return paramValue;
+ }
+
+ private static List<Constraint> getToscaConstrains(List<Map<String, Object>> constraints) {
+ if (constraints == null) {
+ return null;
+ }
+
+ List<Constraint> constraintList = new ArrayList<>();
+
+ for (Map<String, Object> constraint : constraints) {
+ constraintList.addAll(getToscaParameterConstraint(constraint));
+ }
+
+ return constraintList;
+ }
+
+ private static List<Constraint> getToscaParameterConstraint(Map<String, Object> constraint) {
+ List<Constraint> convertedConstraintList = new ArrayList<>();
+ Constraint convertedConstraint;
+
+ if (constraint.containsKey("range")) {
+ convertedConstraint = new Constraint();
+ convertedConstraintList.add(convertedConstraint);
+ Integer min = (Integer) ((Map) constraint.get("range")).get("min");
+ Integer max = (Integer) ((Map) constraint.get("range")).get("max");
+ convertedConstraint.setIn_range(new Integer[]{min, max});
+
+ } else if (constraint.containsKey("length")) {
+ Integer min = (Integer) ((Map) constraint.get("length")).get("min");
+ Integer max = (Integer) ((Map) constraint.get("length")).get("max");
+ if (max != null) {
+ convertedConstraint = new Constraint();
+ convertedConstraintList.add(convertedConstraint);
+ convertedConstraint.setMax_length(max);
+ }
+ if (min != null) {
+ convertedConstraint = new Constraint();
+ convertedConstraintList.add(convertedConstraint);
+ convertedConstraint.setMin_length(min);
+ }
+ } else if (constraint.containsKey("allowed_values")) {
+ convertedConstraint = new Constraint();
+ convertedConstraintList.add(convertedConstraint);
+ convertedConstraint.setValid_values((List) constraint.get("allowed_values"));
+ } else if (constraint.containsKey("allowed_pattern")) {
+ convertedConstraint = new Constraint();
+ convertedConstraintList.add(convertedConstraint);
+ convertedConstraint.setPattern(constraint.get("allowed_pattern"));
+ }
+
+ return convertedConstraintList;
+ }
+
+ private static EntrySchema getToscaParameterEntrySchema(String type) {
+
+ if (!parameterEntrySchemaTypeMapping.containsKey(type)) {
+ return null;
+ }
+
+ EntrySchema entrySchema = new EntrySchema();
+ entrySchema.setType(parameterEntrySchemaTypeMapping.get(type));
+ return entrySchema;
+ }
+
+ protected static String getToscaParameterType(String heatParameterType) {
+ return parameterTypeMapping.get(heatParameterType);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/mapping/TranslatorHeatToToscaPropertyConverter.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/mapping/TranslatorHeatToToscaPropertyConverter.java
new file mode 100644
index 0000000000..d1079c2dc5
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/mapping/TranslatorHeatToToscaPropertyConverter.java
@@ -0,0 +1,146 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.translator.services.heattotosca.mapping;
+
+import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.Template;
+import org.openecomp.sdc.translator.services.heattotosca.Constants;
+import org.openecomp.sdc.translator.services.heattotosca.TranslationContext;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class TranslatorHeatToToscaPropertyConverter {
+
+ /**
+ * Gets tosca properties simple conversion.
+ *
+ * @param heatProperties the heat properties
+ * @param toscaProperties the tosca properties
+ * @param heatFileName the heat file name
+ * @param heatOrchestrationTemplate the heat orchestration template
+ * @param resourceType the resource type
+ * @param template the template
+ * @param context the context
+ * @return the tosca properties simple conversion
+ */
+ //Convert property assuming the property type in heat is same as the property type in tosca
+ public static Map<String, Object> getToscaPropertiesSimpleConversion(
+ Map<String, Object> heatProperties, Map<String, Object> toscaProperties, String heatFileName,
+ HeatOrchestrationTemplate heatOrchestrationTemplate, String resourceType, Template template,
+ TranslationContext context) {
+
+ toscaProperties = toscaProperties != null ? toscaProperties : new HashMap<>();
+
+ for (String heatPropertyName : context.getElementSet(resourceType, Constants.PROP)) {
+
+ setSimpleProperty(heatProperties, heatFileName, resourceType, heatOrchestrationTemplate,
+ context, toscaProperties, heatPropertyName, null, template);
+ }
+ return toscaProperties;
+ }
+
+ /**
+ * Sets simple property.
+ *
+ * @param heatProperties the heat properties
+ * @param heatFileName the heat file name
+ * @param resourceType the resource type
+ * @param heatOrchestrationTemplate the heat orchestration template
+ * @param context the context
+ * @param toscaProperties the tosca properties
+ * @param heatPropertyName the heat property name
+ * @param toscaPropertyName the tosca property name
+ * @param template the template
+ */
+ public static void setSimpleProperty(Map<String, Object> heatProperties, String heatFileName,
+ String resourceType,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ TranslationContext context,
+ Map<String, Object> toscaProperties, String heatPropertyName,
+ String toscaPropertyName, Template template) {
+ Object propertyValue = null;
+ if (heatProperties != null) {
+ propertyValue = heatProperties.get(heatPropertyName);
+ }
+ if (propertyValue == null) {
+ return;
+ }
+
+ if (toscaPropertyName == null) {
+ toscaPropertyName = resourceType == null ? heatPropertyName
+ : context.getElementMapping(resourceType, Constants.PROP, heatPropertyName);
+ }
+ toscaProperties.put(toscaPropertyName,
+ getToscaPropertyValue(heatPropertyName, propertyValue, resourceType, heatFileName,
+ heatOrchestrationTemplate, template, context));
+ }
+
+
+ /**
+ * Gets tosca property value.
+ *
+ * @param propertyName the property name
+ * @param propertyValue the property value
+ * @param resourceType the resource type
+ * @param heatFileName the heat file name
+ * @param heatOrchestrationTemplate the heat orchestration template
+ * @param template the template
+ * @param context the context
+ * @return the tosca property value
+ */
+ public static Object getToscaPropertyValue(String propertyName, Object propertyValue,
+ String resourceType, String heatFileName,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ Template template, TranslationContext context) {
+ if (propertyValue instanceof Map && !((Map) propertyValue).isEmpty()) {
+ Map.Entry<String, Object> functionMapEntry =
+ (Map.Entry<String, Object>) ((Map) propertyValue).entrySet().iterator().next();
+ if (TranslatorHeatToToscaFunctionConverter.functionNameSet
+ .contains(functionMapEntry.getKey())) {
+ return TranslatorHeatToToscaFunctionConverter
+ .getToscaFunction(functionMapEntry.getKey(), functionMapEntry.getValue(), heatFileName,
+ heatOrchestrationTemplate, template, context);
+ }
+ Map<String, Object> propertyValueMap = new HashMap<>();
+ for (Map.Entry<String, Object> entry : ((Map<String, Object>) propertyValue).entrySet()) {
+ String toscaPropertyName = resourceType == null ? null : context
+ .getElementMapping(resourceType, Constants.PROP, propertyName + "." + entry.getKey());
+ toscaPropertyName = toscaPropertyName != null ? toscaPropertyName : entry.getKey();
+ propertyValueMap.put(toscaPropertyName,
+ getToscaPropertyValue(propertyName, entry.getValue(), resourceType, heatFileName,
+ heatOrchestrationTemplate, template, context));
+ }
+ return propertyValueMap;
+ } else if (propertyValue instanceof List && !((List) propertyValue).isEmpty()) {
+ List propertyValueArray = new ArrayList<>();
+ for (int i = 0; i < ((List) propertyValue).size(); i++) {
+ propertyValueArray.add(
+ getToscaPropertyValue(propertyName, ((List) propertyValue).get(i), resourceType,
+ heatFileName, heatOrchestrationTemplate, template, context));
+ }
+ return propertyValueArray;
+ }
+ return propertyValue;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/resources/heatToToscaMapping.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/resources/heatToToscaMapping.json
new file mode 100644
index 0000000000..ebe5df6b50
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/resources/heatToToscaMapping.json
@@ -0,0 +1,298 @@
+{
+ "OS::Contrail::VirtualNetwork": {
+ "properties": {
+ "name": "network_name",
+ "shared": "shared",
+ "external": "external",
+ "route_targets": "route_targets",
+ "forwarding_mode": "forwarding_mode",
+ "flood_unknown_unicast": "flood_unknown_unicast",
+ "allow_transit": "allow_transit"
+ },
+ "attributes": {
+ "fq_name": "fq_name",
+ "name": "network_name",
+ "shared": "shared",
+ "external": "external",
+ "route_targets": "route_targets",
+ "forwarding_mode": "forwarding_mode",
+ "flood_unknown_unicast": "flood_unknown_unicast",
+ "allow_transit": "allow_transit"
+ }
+ },
+ "OS::Contrail::NetworkPolicy": {
+ "properties": {
+ "name": "name",
+ "entries": "entries"
+ },
+ "attributes": {
+ "fq_name": "fq_name",
+ "name": "name",
+ "entries": "entries",
+ "tenant_id": "tenant_id",
+ "rules": "rules",
+ "show": "show"
+ }
+ },
+
+ "OS::ContrailV2::VirtualNetwork": {
+ "properties": {
+ "name": "network_name",
+ "network_ipam_refs": "network_ipam_refs",
+ "network_ipam_refs_data": "network_ipam_refs_data",
+ "network_policy_refs": "network_policy_refs",
+ "network_policy_refs_data": "network_policy_refs_data"
+ },
+ "attributes": {
+ "fq_name": "fq_name",
+ "name": "network_name",
+ "network_ipam_refs": "network_ipam_refs",
+ "network_ipam_refs_data": "network_ipam_refs_data",
+ "network_policy_refs": "network_policy_refs",
+ "network_policy_refs_data": "network_policy_refs_data"
+ }
+ },
+ "OS::ContrailV2::VirtualMachineInterface": {
+ "properties": {
+ "name": "name",
+ "virtual_machine_intefrace_mac_addresses": "virtual_machine_intefrace_mac_addresses",
+ "virtual_network_refs": "virtual_network_refs",
+ "port_tuple_refs": "port_tuple_refs",
+ "security_group_refs": "security_group_refs",
+ "virtual_machine_interface_properties": "virtual_machine_interface_properties"
+ },
+ "attributes": {
+ "name": "name",
+ "virtual_machine_intefrace_mac_addresses": "virtual_machine_intefrace_mac_addresses",
+ "virtual_network_refs": "virtual_network_refs",
+ "port_tuple_refs": "port_tuple_refs",
+ "virtual_machine_interface_properties": "virtual_machine_interface_properties",
+ "fq_name": "fq_name",
+ "show": "show"
+ }
+ },
+ "OS::ContrailV2::NetworkPolicy": {
+ "properties": {
+ "name":"name",
+ "network_policy_entries":"network_policy_entries"
+ },
+ "attributes": {
+ "fq_name": "fq_name",
+ "name":"name",
+ "network_policy_entries":"network_policy_entries"
+ }
+ },
+ "OS::Cinder::Volume": {
+ "properties": {
+ "availability_zone": "availability_zone",
+ "backup_id": "backup_id",
+ "description": "description",
+ "image": "image",
+ "metadata": "metadata",
+ "multiattach": "multiattach",
+ "name": "name",
+ "read_only": "read_only",
+ "scheduler_hints": "scheduler_hints",
+ "size": "size",
+ "snapshot_id": "snapshot_id",
+ "source_volid": "source_volid",
+ "volume_id": "volume_id",
+ "volume_type": "volume_type",
+ "delete_on_termination": "delete_on_termination",
+ "volume_size": "size",
+ "device_type": "device_type",
+ "disk_bus": "disk_bus",
+ "swap_size": "swap_size",
+ "image_id": "image"
+ },
+ "attributes": {
+ "attachments": "attachments",
+ "availability_zone": "availability_zone",
+ "created_at": "created_at",
+ "display_description": "display_description",
+ "display_name": "display_name",
+ "encrypted": "encrypted",
+ "metadata": "metadata",
+ "metadata_values": "metadata_values",
+ "multiattach": "multiattach",
+ "show": "show",
+ "size": "size",
+ "snapshot_id": "snapshot_id",
+ "source_volid": "source_volid",
+ "status": "status",
+ "volume_type": "volume_type"
+ }
+ },
+ "OS::Cinder::VolumeAttachment": {
+ "properties": {
+ "instance_uuid": "instance_uuid",
+ "volume_id": "volume_id",
+ "mountpoint": "location"
+ },
+ "attributes": {
+ "show": "show"
+ }
+ },
+ "OS::Neutron::Net": {
+ "properties": {
+ "name": "network_name",
+ "dhcp_agent_ids": "dhcp_agent_ids",
+ "tenant_id": "tenant_id",
+ "port_security_enabled": "port_security_enabled",
+ "shared": "shared",
+ "admin_state_up": "admin_state_up",
+ "qos_policy": "qos_policy",
+ "value_specs": "value_specs"
+ },
+ "attributes": {
+ "admin_state_up": "admin_state_up",
+ "mtu": "mtu",
+ "name": "network_name",
+ "port_security_enabled": "port_security_enabled",
+ "qos_policy_id": "qos_policy_id",
+ "show": "show",
+ "status": "status",
+ "subnets": "subnets",
+ "tenant_id": "tenant_id"
+ }
+ },
+ "OS::Neutron::Subnet": {
+ "properties": {
+ "allocation_pools": "allocation_pools",
+ "cidr": "cidr",
+ "enable_dhcp": "enable_dhcp",
+ "gateway_ip": "gateway_ip",
+ "host_routes": "host_routes",
+ "ip_version": "ip_version",
+ "ipv6_address_mode": "ipv6_address_mode",
+ "ipv6_ra_mode": "ipv6_ra_mode",
+ "name": "name",
+ "prefixlen": "prefixlen",
+ "subnetpool": "subnetpool",
+ "tenant_id": "tenant_id",
+ "value_specs": "value_specs",
+ "dns_nameservers": "dns_nameservers"
+ }
+ },
+ "OS::Nova::Server": {
+ "properties": {
+ "flavor": "flavor",
+ "admin_pass": "admin_pass",
+ "availability_zone": "availability_zone",
+ "config_drive": "config_drive",
+ "diskConfig": "diskConfig",
+ "flavor_update_policy": "flavor_update_policy",
+ "image": "image",
+ "image_update_policy": "image_update_policy",
+ "key_name": "key_name",
+ "metadata": "metadata",
+ "name": "name",
+ "personality": "personality",
+ "reservation_id": "reservation_id",
+ "scheduler_hints": "scheduler_hints",
+ "security_groups": "security_groups",
+ "software_config_transport": "software_config_transport",
+ "user_data_format": "user_data_format",
+ "user_data_update_policy": "user_data_update_policy"
+ },
+ "attributes": {
+ "accessIPv4": "accessIPv4",
+ "accessIPv6": "accessIPv6",
+ "addresses": "addresses",
+ "console_urls": "console_urls",
+ "instance_name": "instance_name",
+
+ "show": "show"
+ }
+ },
+ "OS::Neutron::Port": {
+ "properties": {
+ "network": "network",
+ "network_id": "network",
+ "admin_state_up": "admin_state_up",
+ "allowed_address_pairs": "allowed_address_pairs",
+ "binding:vnic_type": "binding:vnic_type",
+ "device_id": "device_id",
+ "device_owner": "device_owner",
+ "fixed_ips": "fixed_ips",
+ "mac_address": "mac_address",
+ "name": "name",
+ "port_security_enabled": "port_security_enabled",
+ "qos_policy": "qos_policy",
+ "security_groups": "security_groups",
+ "value_specs": "value_specs",
+ "replacement_policy": "replacement_policy",
+ "fixed_ips.subnet":"subnet",
+ "fixed_ips.ip_address":"ip_address"
+ },
+ "attributes": {
+ "admin_state_up": "admin_state_up",
+ "allowed_address_pairs": "allowed_address_pairs",
+ "device_id": "device_id",
+ "device_owner": "device_owner",
+ "fixed_ips": "fixed_ips",
+ "mac_address": "mac_address",
+ "name": "name",
+ "network_id": "network",
+ "network": "network",
+ "port_security_enabled": "port_security_enabled",
+ "qos_policy": "qos_policy",
+ "security_groups": "security_groups",
+ "show": "show",
+ "status": "status",
+ "subnets": "subnets",
+ "tenant_id": "tenant_id"
+ }
+ },
+ "OS::Nova::ServerGroup": {
+ "properties": {
+ "name": "name"
+ },
+ "attributes": {
+ "show": "show"
+ }
+ },
+ "OS::Neutron::SecurityGroup": {
+ "properties": {
+ "description": "description",
+ "name": "name",
+ "rules": "rules"
+ },
+ "attributes": {
+ "show": "show"
+ }
+ },
+ "OS::Contrail::ServiceTemplate": {
+ "properties": {
+ "name": "service_template_name",
+ "service_mode": "service_mode",
+ "service_type": "service_type",
+ "image_name": "image_name",
+ "availability_zone_enable": "availability_zone_enable",
+ "flavor": "flavor",
+ "service_interface_type_list": "service_interface_type_list",
+ "shared_ip_list": "shared_ip_list",
+ "static_routes_list": "static_routes_list",
+ "ordered_interfaces": "ordered_interfaces"
+ },
+ "attributes": {
+ }
+ },
+ "OS::Contrail::ServiceInstance": {
+ "properties": {
+ "availability_zone": "availability_zone",
+ "interface_list": "interface_list",
+ "name": "service_instance_name"
+ },
+ "attributes": {
+ "fq_name": "fq_name",
+ "name": "service_instance_name",
+ "status": "status",
+ "service_template": "service_template_name",
+ "virtual_machines": "virtual_machines",
+ "active_service_vms": "active_vms",
+ "tenant_id": "tenant_id",
+ "show": "show"
+ }
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/TestUtils.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/TestUtils.java
new file mode 100644
index 0000000000..b52abfa927
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/TestUtils.java
@@ -0,0 +1,43 @@
+package org.openecomp.sdc.translator;
+
+import org.openecomp.sdc.common.utils.AsdcCommon;
+import org.openecomp.core.translator.api.HeatToToscaTranslator;
+import org.openecomp.core.utilities.file.FileUtils;
+import org.junit.Assert;
+
+import java.io.*;
+
+public class TestUtils {
+ private static final String MANIFEST_NAME = AsdcCommon.MANIFEST_NAME;
+ private static String zipFilename = "VSP.zip";
+ private static String validationFilename = "validationOutput.json";
+
+ private TestUtils() {
+ }
+
+
+ public static void addFilesToTranslator(HeatToToscaTranslator heatToToscaTranslator, String path)
+ throws IOException {
+ File manifestFile = new File(path);
+ File[] files = manifestFile.listFiles();
+ byte[] fileContent;
+
+ Assert.assertNotNull("manifest files is empty", files);
+
+ for (File file : files) {
+
+ try (FileInputStream fis = new FileInputStream(file)) {
+
+ fileContent = FileUtils.toByteArray(fis);
+
+ if (file.getName().equals(MANIFEST_NAME)) {
+ heatToToscaTranslator.addManifest(MANIFEST_NAME, fileContent);
+ } else {
+ if (!file.getName().equals(zipFilename) && (!file.getName().equals(validationFilename))) {
+ heatToToscaTranslator.addFile(file.getName(), fileContent);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/multi/Translate_Heat_Nested_Multi.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/multi/Translate_Heat_Nested_Multi.java
new file mode 100644
index 0000000000..4be63258ae
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/multi/Translate_Heat_Nested_Multi.java
@@ -0,0 +1,17 @@
+package org.openecomp.sdc.translator.impl.heattotosca.nested.multi;
+
+import org.openecomp.sdc.translator.services.heattotosca.impl.BaseResourceTranslationTest;
+import org.junit.Test;
+
+public class Translate_Heat_Nested_Multi extends BaseResourceTranslationTest {
+
+ {
+ inputFilesPath = "/mock/heat/nested/multi/inputs";
+ outputFilesPath = "/mock/heat/nested/multi/expectedoutputfiles";
+ }
+
+ @Test
+ public void testTranslate() throws Exception {
+ testTranslation();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/nestedvolumelocal/NestedVolumelocal.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/nestedvolumelocal/NestedVolumelocal.java
new file mode 100644
index 0000000000..4f2f3af33a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/nestedvolumelocal/NestedVolumelocal.java
@@ -0,0 +1,17 @@
+package org.openecomp.sdc.translator.impl.heattotosca.nested.nestedvolumelocal;
+
+import org.openecomp.sdc.translator.services.heattotosca.impl.BaseResourceTranslationTest;
+import org.junit.Test;
+
+public class NestedVolumelocal extends BaseResourceTranslationTest {
+
+ {
+ inputFilesPath = "/mock/heat/nested/nestedvolumelocal/inputs";
+ outputFilesPath = "/mock/heat/nested/nestedvolumelocal/expectedoutputfiles";
+ }
+
+ @Test
+ public void testTranslate() throws Exception {
+ testTranslation();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/nestedvolumeseperatefile/NestedVolumeSeperateFile.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/nestedvolumeseperatefile/NestedVolumeSeperateFile.java
new file mode 100644
index 0000000000..02a8fb6ce4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/nestedvolumeseperatefile/NestedVolumeSeperateFile.java
@@ -0,0 +1,17 @@
+package org.openecomp.sdc.translator.impl.heattotosca.nested.nestedvolumeseperatefile;
+
+import org.openecomp.sdc.translator.services.heattotosca.impl.BaseResourceTranslationTest;
+import org.junit.Test;
+
+public class NestedVolumeSeperateFile extends BaseResourceTranslationTest {
+
+ {
+ inputFilesPath = "/mock/heat/nested/nestedvolumeseperatefile/inputs";
+ outputFilesPath = "/mock/heat/nested/nestedvolumeseperatefile/expectedoutputfiles";
+ }
+
+ @Test
+ public void testTranslate() throws Exception {
+ testTranslation();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/recursive/TranslateHeatNestedRecursiveTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/recursive/TranslateHeatNestedRecursiveTest.java
new file mode 100644
index 0000000000..792f4f4bf5
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/recursive/TranslateHeatNestedRecursiveTest.java
@@ -0,0 +1,43 @@
+package org.openecomp.sdc.translator.impl.heattotosca.nested.recursive;
+
+import org.openecomp.sdc.translator.services.heattotosca.impl.BaseResourceTranslationTest;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.IOException;
+
+public class TranslateHeatNestedRecursiveTest extends BaseResourceTranslationTest {
+
+
+ @Override
+ @Before
+ public void setUp() throws IOException {
+ // do not delete this function. it prevents the superclass setup from running
+ }
+
+ @Test
+ public void testTranslateRecursive() throws Exception {
+ inputFilesPath = "/mock/heat/nested/recursive/inputs";
+ outputFilesPath = "/mock/heat/nested/recursive/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testTranslateExposedReq2Level() throws Exception {
+ inputFilesPath = "/mock/heat/nested/nested2levels/inputs";
+ outputFilesPath = "/mock/heat/nested/nested2levels/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testTranslateExposedReq3Level() throws Exception {
+ inputFilesPath = "/mock/heat/nested/nested3levels/inputs";
+ outputFilesPath = "/mock/heat/nested/nested3levels/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/reusenestedfrommultibase/Translate_Heat_Nested_From_Multi_Base.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/reusenestedfrommultibase/Translate_Heat_Nested_From_Multi_Base.java
new file mode 100644
index 0000000000..005bcd0db0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/reusenestedfrommultibase/Translate_Heat_Nested_From_Multi_Base.java
@@ -0,0 +1,18 @@
+package org.openecomp.sdc.translator.impl.heattotosca.nested.reusenestedfrommultibase;
+
+import org.openecomp.sdc.translator.services.heattotosca.impl.BaseResourceTranslationTest;
+import org.junit.Test;
+
+public class Translate_Heat_Nested_From_Multi_Base extends BaseResourceTranslationTest {
+
+ {
+ inputFilesPath = "/mock/heat/nested/reusenestedfrommultibase/inputs";
+ outputFilesPath = "/mock/heat/nested/reusenestedfrommultibase/expectedoutputfiles";
+ }
+
+ @Test
+ public void testTranslate() throws Exception {
+ testTranslation();
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/separatevol/NestedAndSeparateVolTranslationTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/separatevol/NestedAndSeparateVolTranslationTest.java
new file mode 100644
index 0000000000..4269705923
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/separatevol/NestedAndSeparateVolTranslationTest.java
@@ -0,0 +1,22 @@
+package org.openecomp.sdc.translator.impl.heattotosca.nested.separatevol;
+
+import org.openecomp.sdc.translator.services.heattotosca.impl.BaseResourceTranslationTest;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.IOException;
+
+public class NestedAndSeparateVolTranslationTest extends BaseResourceTranslationTest {
+
+ @Before
+ public void setUp() throws IOException {
+ inputFilesPath = "/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles";
+ outputFilesPath = "/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out";
+ super.setUp();
+ }
+
+ @Test
+ public void testTranslate() throws Exception {
+ testTranslation();
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/single/TranslateHeatNestedSingle.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/single/TranslateHeatNestedSingle.java
new file mode 100644
index 0000000000..1d80551f27
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/single/TranslateHeatNestedSingle.java
@@ -0,0 +1,17 @@
+package org.openecomp.sdc.translator.impl.heattotosca.nested.single;
+
+import org.openecomp.sdc.translator.services.heattotosca.impl.BaseResourceTranslationTest;
+import org.junit.Test;
+
+public class TranslateHeatNestedSingle extends BaseResourceTranslationTest {
+
+ {
+ inputFilesPath = "/mock/heat/nested/single/inputs";
+ outputFilesPath = "/mock/heat/nested/single/expectedoutputfiles";
+ }
+
+ @Test
+ public void testTranslate() throws Exception {
+ testTranslation();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/outputs/HeatOutputConversionTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/outputs/HeatOutputConversionTest.java
new file mode 100644
index 0000000000..fd3543a051
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/outputs/HeatOutputConversionTest.java
@@ -0,0 +1,50 @@
+package org.openecomp.sdc.translator.impl.heattotosca.outputs;
+
+import org.openecomp.sdc.translator.services.heattotosca.impl.BaseResourceTranslationTest;
+import org.junit.Test;
+
+public class HeatOutputConversionTest extends BaseResourceTranslationTest {
+
+ {
+ inputFilesPath = "/mock/heat/outputs/inputs";
+ outputFilesPath = "/mock/heat/outputs/expectedoutputfiles";
+ }
+
+ @Test
+ public void testTranslate() throws Exception {
+ testTranslation();
+ }
+
+
+ //private static final String MANIFEST_NAME = "MANIFEST.json";
+
+ /* @Test
+ public void testTranslate_outputs() throws IOException {
+
+ HeatToToscaTranslator heatToToscaTranslator = HeatToToscaTranslatorFactory.getInstance().createInterface();
+ URL url = this.getClass().getResource("/mock/heat/outputs");
+ File manifestFile = new File(url.getPath());
+ File[] files = manifestFile.listFiles();
+ FileInputStream fis;
+ byte[] fileContent;
+ for (File file : files) {
+ fis = new FileInputStream(file);
+ fileContent = FileUtils.toByteArray(fis);
+ if (file.getName().equals(MANIFEST_NAME)) {
+ heatToToscaTranslator.addManifest(MANIFEST_NAME, new String(fileContent));
+ } else {
+ heatToToscaTranslator.addFile(file.getName(), fileContent);
+ }
+ }
+
+ TranslatorOutput translatorOutput = heatToToscaTranslator.translate();
+ Assert.assertNotNull(translatorOutput);
+ File file = new File("Outputs.zip");
+ FileOutputStream fos = new FileOutputStream(file);
+ fos.write(translatorOutput.getTranslationContent());
+ fos.close();
+
+ }*/
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/parameters/HeatParameterConversionTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/parameters/HeatParameterConversionTest.java
new file mode 100644
index 0000000000..4feef0e094
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/parameters/HeatParameterConversionTest.java
@@ -0,0 +1,54 @@
+package org.openecomp.sdc.translator.impl.heattotosca.parameters;
+
+import org.openecomp.sdc.translator.services.heattotosca.impl.BaseResourceTranslationTest;
+import org.junit.Test;
+
+public class HeatParameterConversionTest extends BaseResourceTranslationTest {
+
+ {
+ inputFilesPath = "/mock/heat/parameters/inputs";
+ outputFilesPath = "/mock/heat/parameters/expectedoutputfiles";
+ }
+
+ @Test
+ public void testTranslate() throws Exception {
+ testTranslation();
+ }
+
+
+ /*
+
+ private static final String MANIFEST_NAME = "MANIFEST.json";
+
+ @Test
+ public void testTranslate_parameters() throws IOException {
+
+
+
+ HeatToToscaTranslator heatToToscaTranslator = HeatToToscaTranslatorFactory.getInstance().createInterface();
+ URL url = this.getClass().getResource("/mock/heat/parameters");
+ File manifestFile = new File(url.getPath());
+ File[] files = manifestFile.listFiles();
+ FileInputStream fis;
+ byte[] fileContent;
+ for (File file : files) {
+ fis = new FileInputStream(file);
+ fileContent = FileUtils.toByteArray(fis);
+ if (file.getName().equals(MANIFEST_NAME)) {
+ heatToToscaTranslator.addManifest(MANIFEST_NAME, new String(fileContent));
+ } else {
+ heatToToscaTranslator.addFile(file.getName(), fileContent);
+ }
+ }
+
+ TranslatorOutput translatorOutput = heatToToscaTranslator.translate();
+ Assert.assertNotNull(translatorOutput);
+ File file = new File("Parameters.zip");
+ FileOutputStream fos = new FileOutputStream(file);
+ fos.write(translatorOutput.getTranslationContent());
+ fos.close();
+
+ }
+ */
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/resources/ContrailNetworkRuleTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/resources/ContrailNetworkRuleTest.java
new file mode 100644
index 0000000000..f8b3022155
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/resources/ContrailNetworkRuleTest.java
@@ -0,0 +1,18 @@
+package org.openecomp.sdc.translator.impl.heattotosca.resources;
+
+import org.openecomp.sdc.translator.services.heattotosca.impl.BaseResourceTranslationTest;
+import org.junit.Test;
+
+
+public class ContrailNetworkRuleTest extends BaseResourceTranslationTest {
+
+ {
+ inputFilesPath = "/mock/heat/resources/OS_Contrail_Network_Rule/inputs";
+ outputFilesPath = "/mock/heat/resources/OS_Contrail_Network_Rule/expectedoutputfiles";
+ }
+
+ @Test
+ public void testTranslate() throws Exception {
+ testTranslation();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/resources/OSContrailVirtualNetworkTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/resources/OSContrailVirtualNetworkTest.java
new file mode 100644
index 0000000000..b1305c3b2c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/resources/OSContrailVirtualNetworkTest.java
@@ -0,0 +1,18 @@
+package org.openecomp.sdc.translator.impl.heattotosca.resources;
+
+import org.openecomp.sdc.translator.services.heattotosca.impl.BaseResourceTranslationTest;
+import org.junit.Test;
+
+
+public class OSContrailVirtualNetworkTest extends BaseResourceTranslationTest {
+
+ {
+ inputFilesPath = "/mock/heat/resources/OS_Contrail_VirtualNetwork/inputs";
+ outputFilesPath = "/mock/heat/resources/OS_Contrail_VirtualNetwork/expectedoutputfiles";
+ }
+
+ @Test
+ public void testTranslate() throws Exception {
+ testTranslation();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/resources/OSNeutronNetTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/resources/OSNeutronNetTest.java
new file mode 100644
index 0000000000..3b312a804d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/resources/OSNeutronNetTest.java
@@ -0,0 +1,17 @@
+package org.openecomp.sdc.translator.impl.heattotosca.resources;
+
+import org.openecomp.sdc.translator.services.heattotosca.impl.BaseResourceTranslationTest;
+import org.junit.Test;
+
+public class OSNeutronNetTest extends BaseResourceTranslationTest {
+
+ {
+ inputFilesPath = "/mock/heat/resources/OS_Neutron_Net/inputs";
+ outputFilesPath = "/mock/heat/resources/OS_Neutron_Net/expectedoutputfiles";
+ }
+
+ @Test
+ public void testTranslate() throws Exception {
+ testTranslation();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/resources/OSNovaServerTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/resources/OSNovaServerTest.java
new file mode 100644
index 0000000000..6d194ea220
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/resources/OSNovaServerTest.java
@@ -0,0 +1,17 @@
+package org.openecomp.sdc.translator.impl.heattotosca.resources;
+
+import org.openecomp.sdc.translator.services.heattotosca.impl.BaseResourceTranslationTest;
+import org.junit.Test;
+
+public class OSNovaServerTest extends BaseResourceTranslationTest {
+
+ {
+ inputFilesPath = "/mock/heat/resources/OS_Nova_Server/inputs";
+ outputFilesPath = "/mock/heat/resources/OS_Nova_Server/expectedoutputfiles";
+ }
+
+ @Test
+ public void testTranslate() throws Exception {
+ testTranslation();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/sharedresource/HeatSharedResourceTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/sharedresource/HeatSharedResourceTest.java
new file mode 100644
index 0000000000..2395fa00db
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/sharedresource/HeatSharedResourceTest.java
@@ -0,0 +1,19 @@
+package org.openecomp.sdc.translator.impl.heattotosca.sharedresource;
+
+import org.openecomp.sdc.translator.services.heattotosca.impl.BaseResourceTranslationTest;
+import org.junit.Test;
+
+public class HeatSharedResourceTest extends BaseResourceTranslationTest {
+
+ {
+ inputFilesPath = "/mock/heat/sharedresources/inputs";
+ outputFilesPath = "/mock/heat/sharedresources/expectedoutputfiles";
+ }
+
+ @Test
+ public void testTranslate() throws Exception {
+ testTranslation();
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/GlobalTypesGeneratorTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/GlobalTypesGeneratorTest.java
new file mode 100644
index 0000000000..6afa9c1ea2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/GlobalTypesGeneratorTest.java
@@ -0,0 +1,18 @@
+package org.openecomp.sdc.translator.services.heattotosca;
+
+import org.openecomp.sdc.translator.services.heattotosca.impl.BaseResourceTranslationTest;
+import org.junit.Test;
+
+public class GlobalTypesGeneratorTest extends BaseResourceTranslationTest {
+
+ {
+ inputFilesPath = "/mock/services/heattotosca/global_types/inputfiles";
+ outputFilesPath = "/mock/services/heattotosca/global_types/expectedoutputfiles";
+ }
+
+ @Test
+ public void testTranslate() throws Exception {
+ testTranslation();
+ }
+
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/fullvfexample/hotmog/HotMogTranslationTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/fullvfexample/hotmog/HotMogTranslationTest.java
new file mode 100644
index 0000000000..13be7235d9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/fullvfexample/hotmog/HotMogTranslationTest.java
@@ -0,0 +1,17 @@
+package org.openecomp.sdc.translator.services.heattotosca.fullvfexample.hotmog;
+
+import org.openecomp.sdc.translator.services.heattotosca.impl.BaseResourceTranslationTest;
+import org.junit.Test;
+
+public class HotMogTranslationTest extends BaseResourceTranslationTest {
+
+ {
+ inputFilesPath = "/mock/services/heattotosca/hot-mog-0108-bs1271/inputfiles";
+ outputFilesPath = "/mock/services/heattotosca/hot-mog-0108-bs1271/expectedoutputfiles";
+ }
+
+ @Test
+ public void testTranslate() throws Exception {
+ testTranslation();
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/fullvfexample/vmmesmall/VmmeSmallTranslationTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/fullvfexample/vmmesmall/VmmeSmallTranslationTest.java
new file mode 100644
index 0000000000..4db0bdf339
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/fullvfexample/vmmesmall/VmmeSmallTranslationTest.java
@@ -0,0 +1,17 @@
+package org.openecomp.sdc.translator.services.heattotosca.fullvfexample.vmmesmall;
+
+import org.openecomp.sdc.translator.services.heattotosca.impl.BaseResourceTranslationTest;
+import org.junit.Test;
+
+public class VmmeSmallTranslationTest extends BaseResourceTranslationTest {
+
+ {
+ inputFilesPath = "/mock/services/heattotosca/vmme_small/inputfiles";
+ outputFilesPath = "/mock/services/heattotosca/vmme_small/expectedoutputfiles";
+ }
+
+ @Test
+ public void testTranslate() throws Exception {
+ testTranslation();
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/helper/impl/NameExtractorServiceImplTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/helper/impl/NameExtractorServiceImplTest.java
new file mode 100644
index 0000000000..1fb1b023e0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/helper/impl/NameExtractorServiceImplTest.java
@@ -0,0 +1,118 @@
+package org.openecomp.sdc.translator.services.heattotosca.helper.impl;
+
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.translator.services.heattotosca.Constants;
+import org.openecomp.sdc.translator.services.heattotosca.impl.ResourceTranslationNovaServerImpl;
+import org.junit.Test;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Avrahamg
+ * @since August 04, 2016
+ */
+public class NameExtractorServiceImplTest {
+ @Test
+ public void shouldReturnNamePrefixIfPropertyNameMatchWithIndex() throws Exception {
+ Map<String, Object> propertiesMap = new HashMap();
+ propertiesMap.put("a", "sss");
+ HashMap imageMap = new HashMap();
+ String name = "avi_test_name_1";
+ imageMap.put("get_param", name);
+ propertiesMap.put(Constants.NAME_PROPERTY_NAME, imageMap);
+ ResourceTranslationNovaServerImpl resourceTranslationNovaServer =
+ new ResourceTranslationNovaServerImpl();
+ String localNodeType = resourceTranslationNovaServer
+ .createLocalNodeType(new ServiceTemplate(), propertiesMap, "Ignore");
+ assertTrue(localNodeType.equals("org.openecomp.resource.vfc.nodes.heat.avi_test"));
+ }
+
+ @Test
+ public void shouldReturnNamePrefixIfPropertyNameMatchWithListObjectInGetParamVal()
+ throws Exception {
+ Map<String, Object> propertiesMap = new HashMap();
+ propertiesMap.put("a", "sss");
+ HashMap imageMap = new HashMap();
+ List val = Arrays.asList("virc_vm_names", "2");
+ imageMap.put("get_param", val);
+ propertiesMap.put(Constants.NAME_PROPERTY_NAME, imageMap);
+ ResourceTranslationNovaServerImpl resourceTranslationNovaServer =
+ new ResourceTranslationNovaServerImpl();
+ String localNodeType = resourceTranslationNovaServer
+ .createLocalNodeType(new ServiceTemplate(), propertiesMap, "Ignore");
+ assertTrue(localNodeType.equals("org.openecomp.resource.vfc.nodes.heat.virc_vm"));
+ }
+
+ @Test
+ public void shouldReturnNamePrefixIfPropertyNameMatchWithListObjectInGetParamValAndGetParamAsGetParamVal()
+ throws Exception {
+ Map<String, Object> propertiesMap = new HashMap();
+ propertiesMap.put("a", "sss");
+ HashMap nameMap = new HashMap();
+ HashMap nameValMap = new HashMap();
+ nameValMap.put("get_param", "anyParam");
+ List val = Arrays.asList("virc_vm_names", nameValMap);
+ nameMap.put("get_param", val);
+ propertiesMap.put(Constants.NAME_PROPERTY_NAME, nameMap);
+ ResourceTranslationNovaServerImpl resourceTranslationNovaServer =
+ new ResourceTranslationNovaServerImpl();
+ String localNodeType = resourceTranslationNovaServer
+ .createLocalNodeType(new ServiceTemplate(), propertiesMap, "Ignore");
+ assertTrue(localNodeType.equals("org.openecomp.resource.vfc.nodes.heat.virc_vm"));
+ }
+
+
+ @Test
+ public void shouldReturnNamePrefixIfPropertyNameMatchWithoutIndex() throws Exception {
+ Map<String, Object> propertiesMap = new HashMap();
+ propertiesMap.put("a", "sss");
+ HashMap imageMap = new HashMap();
+ String name = "avi_test_names";
+ imageMap.put("get_param", name);
+ propertiesMap.put(Constants.NAME_PROPERTY_NAME, imageMap);
+ ResourceTranslationNovaServerImpl resourceTranslationNovaServer =
+ new ResourceTranslationNovaServerImpl();
+ String localNodeType = resourceTranslationNovaServer
+ .createLocalNodeType(new ServiceTemplate(), propertiesMap, "Ignore");
+ assertTrue(localNodeType.equals("org.openecomp.resource.vfc.nodes.heat.avi_test"));
+ }
+
+ @Test
+ public void shouldReturnPrefixByPropertyOrder() throws Exception {
+ Map<String, Object> propertiesMap = new HashMap();
+ propertiesMap.put("a", "sss");
+ HashMap imageMap = new HashMap();
+ String name = "avi_test1_namesw";
+ imageMap.put("get_param", name);
+ propertiesMap.put(Constants.NAME_PROPERTY_NAME, imageMap);
+ String flavor = "avi_test2_flavor_name";
+ imageMap = new HashMap();
+ imageMap.put("get_param", flavor);
+ propertiesMap.put("flavor", imageMap);
+ ResourceTranslationNovaServerImpl resourceTranslationNovaServer =
+ new ResourceTranslationNovaServerImpl();
+ String localNodeType = resourceTranslationNovaServer
+ .createLocalNodeType(new ServiceTemplate(), propertiesMap, "Ignore");
+ assertTrue(localNodeType.equals("org.openecomp.resource.vfc.nodes.heat.avi_test2"));
+ }
+
+ @Test
+ public void shouldReturnEmptyIfPropertiesAreNotAsNamingConvention() throws Exception {
+ Map<String, Object> propertiesMap = new HashMap();
+ propertiesMap.put("a", "sss");
+ HashMap imageMap = new HashMap();
+ String name = "avi_test_namesw";
+ imageMap.put("get_param", name);
+ propertiesMap.put(Constants.NAME_PROPERTY_NAME, imageMap);
+ ResourceTranslationNovaServerImpl resourceTranslationNovaServer =
+ new ResourceTranslationNovaServerImpl();
+ String localNodeType = resourceTranslationNovaServer
+ .createLocalNodeType(new ServiceTemplate(), propertiesMap, "this.is.test.resource");
+ assertTrue(localNodeType.equals("org.openecomp.resource.vfc.nodes.heat.this_is_test_resource"));
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/BaseResourceTranslationTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/BaseResourceTranslationTest.java
new file mode 100644
index 0000000000..9282d4e4eb
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/BaseResourceTranslationTest.java
@@ -0,0 +1,130 @@
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+import org.openecomp.sdc.common.errors.ErrorCode;
+import org.openecomp.sdc.tosca.services.ToscaFileOutputService;
+import org.openecomp.sdc.tosca.services.impl.ToscaFileOutputServiceCsarImpl;
+import org.openecomp.sdc.translator.TestUtils;
+import org.openecomp.core.translator.api.HeatToToscaTranslator;
+import org.openecomp.core.translator.datatypes.TranslatorOutput;
+import org.openecomp.core.translator.factory.HeatToToscaTranslatorFactory;
+import org.openecomp.core.utilities.file.FileUtils;
+import org.openecomp.core.validation.types.MessageContainerUtil;
+import org.apache.commons.collections4.MapUtils;
+import org.junit.Assert;
+import org.junit.Before;
+
+import java.io.*;
+import java.net.URL;
+import java.util.*;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
+import static org.junit.Assert.assertEquals;
+
+public class BaseResourceTranslationTest {
+
+ protected String inputFilesPath;
+ protected String outputFilesPath;
+ private HeatToToscaTranslator heatToToscaTranslator;
+ private File translatedZipFile;
+
+ private Map<String, byte[]> expectedResultMap = new HashMap<>();
+ private Set<String> expectedResultFileNameSet = new HashSet<>();
+
+ @Before
+ public void setUp() throws IOException {
+ initTranslatorAndTranslate();
+ }
+
+ protected void initTranslatorAndTranslate() throws IOException {
+ heatToToscaTranslator = HeatToToscaTranslatorFactory.getInstance().createInterface();
+ translatedZipFile = translateZipFile();
+ }
+
+ protected void testTranslation() throws IOException {
+
+ URL url = BaseResourceTranslationTest.class.getResource(outputFilesPath);
+
+ String path = url.getPath();
+ File pathFile = new File(path);
+ File[] files = pathFile.listFiles();
+ Assert.assertNotNull("manifest files is empty", files);
+ for (File expectedFile : files) {
+ expectedResultFileNameSet.add(expectedFile.getName());
+ try (FileInputStream input = new FileInputStream(expectedFile)) {
+ expectedResultMap.put(expectedFile.getName(), FileUtils.toByteArray(input));
+ }
+ }
+
+ try (FileInputStream fis = new FileInputStream(translatedZipFile);
+ ZipInputStream zis = new ZipInputStream(new BufferedInputStream(fis))) {
+ ZipEntry entry;
+ String name;
+ String expected;
+ String actual;
+
+ while ((entry = zis.getNextEntry()) != null) {
+
+ name = entry.getName()
+ .substring(entry.getName().lastIndexOf(File.separator) + 1, entry.getName().length());
+ if (expectedResultFileNameSet.contains(name)) {
+ expected = new String(expectedResultMap.get(name)).trim().replace("\r", "");
+ actual = new String(FileUtils.toByteArray(zis)).trim().replace("\r", "");
+ assertEquals("difference in file: " + name, expected, actual);
+
+ expectedResultFileNameSet.remove(name);
+ }
+ }
+ if (expectedResultFileNameSet.isEmpty()) {
+ expectedResultFileNameSet.forEach(System.out::println);
+ }
+ }
+ assertEquals(0, expectedResultFileNameSet.size());
+ }
+
+ private File translateZipFile() throws IOException {
+ String zipFilename = "VSP.zip";
+ URL inputFilesUrl = this.getClass().getResource(inputFilesPath);
+ String path = inputFilesUrl.getPath();
+ TestUtils.addFilesToTranslator(heatToToscaTranslator, path);
+ TranslatorOutput translatorOutput = heatToToscaTranslator.translate();
+ Assert.assertNotNull(translatorOutput);
+ if (MapUtils.isNotEmpty(translatorOutput.getErrorMessages()) && MapUtils.isNotEmpty(
+ MessageContainerUtil
+ .getMessageByLevel(org.openecomp.sdc.datatypes.error.ErrorLevel.ERROR, translatorOutput.getErrorMessages()))) {
+ throw new CoreException((new ErrorCode.ErrorCodeBuilder()).withMessage(
+ "Error in validation " + getErrorAsString(translatorOutput.getErrorMessages()))
+ .withId("Validation Error").withCategory(ErrorCategory.APPLICATION).build());
+ }
+ File file = new File(path + "/" + zipFilename);
+ file.createNewFile();
+
+ try (FileOutputStream fos = new FileOutputStream(file)) {
+ ToscaFileOutputService toscaFileOutputService = new ToscaFileOutputServiceCsarImpl();
+ fos.write(
+ toscaFileOutputService.createOutputFile(translatorOutput.getToscaServiceModel(), null));
+ }
+
+ return file;
+ }
+
+ private String getErrorAsString(Map<String, List<org.openecomp.sdc.datatypes.error.ErrorMessage>> errorMessages) {
+ StringBuilder sb = new StringBuilder();
+ errorMessages.entrySet().forEach(
+ entry -> sb.append("File:").append(entry.getKey()).append(System.lineSeparator())
+ .append(getErrorList(entry.getValue())));
+
+ return sb.toString();
+ }
+
+ private String getErrorList(List<org.openecomp.sdc.datatypes.error.ErrorMessage> errors) {
+ StringBuilder sb = new StringBuilder();
+ errors.stream().forEach(
+ error -> sb.append(error.getMessage()).append("[").append(error.getLevel()).append("]")
+ .append(System.lineSeparator()));
+ return sb.toString();
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ContrailV2VMInterfaceToNetResourceConnectionTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ContrailV2VMInterfaceToNetResourceConnectionTest.java
new file mode 100644
index 0000000000..1dce2c8d70
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ContrailV2VMInterfaceToNetResourceConnectionTest.java
@@ -0,0 +1,46 @@
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.IOException;
+
+/**
+ * @author Avrahamg
+ * @since August 10, 2016
+ */
+public class ContrailV2VMInterfaceToNetResourceConnectionTest extends BaseResourceTranslationTest {
+ @Override
+ @Before
+ public void setUp() throws IOException {
+ // do not delete this function. it prevents the superclass setup from running
+ }
+
+ @Test
+ public void testTranslateVMIToNetNestedConnection() throws Exception {
+ inputFilesPath = "/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testTranslateVMIToSharedNetNestedConnection() throws Exception {
+ inputFilesPath = "/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testTranslateVMIToNetMultiConnection() throws Exception {
+ inputFilesPath = "/mock/services/heattotosca/VMInterfaceToNettworkConnection/multi/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/VMInterfaceToNettworkConnection/multi/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/DependsOnResourceBaseTranslationlTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/DependsOnResourceBaseTranslationlTest.java
new file mode 100644
index 0000000000..2ba2d936e8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/DependsOnResourceBaseTranslationlTest.java
@@ -0,0 +1,15 @@
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.junit.Test;
+
+public class DependsOnResourceBaseTranslationlTest extends BaseResourceTranslationTest {
+ public DependsOnResourceBaseTranslationlTest() {
+ inputFilesPath = "/mock/services/heattotosca/baseResourceTranslation/inputfiles";
+ outputFilesPath = "/mock/services/heattotosca/baseResourceTranslation/expectedoutputfiles";
+ }
+
+ @Test
+ public void testTranslate() throws Exception {
+ testTranslation();
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/MultipleHeatTranslationTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/MultipleHeatTranslationTest.java
new file mode 100644
index 0000000000..caec80c11b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/MultipleHeatTranslationTest.java
@@ -0,0 +1,31 @@
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.IOException;
+
+public class MultipleHeatTranslationTest extends BaseResourceTranslationTest {
+
+ @Override
+ @Before
+ public void setUp() throws IOException {
+ // do not delete this function. it prevents the superclass setup from running
+ }
+
+ @Test
+ public void testTranslateBaseHeats() throws Exception {
+ inputFilesPath = "/mock/multiHeat/allHeatsAreBase/inputs";
+ outputFilesPath = "/mock/multiHeat/allHeatsAreBase/expectedOutput/";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testTranslateOneOutOfFourFilesIsNotBase() throws Exception {
+ inputFilesPath = "/mock/multiHeat/referencedHeatResources/inputs";
+ outputFilesPath = "/mock/multiHeat/referencedHeatResources/expectedOutput/";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/NovaToVolResourceConnectionTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/NovaToVolResourceConnectionTest.java
new file mode 100644
index 0000000000..93a8668a2f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/NovaToVolResourceConnectionTest.java
@@ -0,0 +1,91 @@
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.IOException;
+
+/**
+ * @author avrahamg
+ * @since July 26, 2016
+ */
+public class NovaToVolResourceConnectionTest extends BaseResourceTranslationTest {
+ @Override
+ @Before
+ public void setUp() throws IOException {
+ // do not delete this function. it prevents the superclass setup from running
+ }
+
+ @Test
+ public void testNovaToVolumeConnectionMultiConnection() throws Exception {
+ inputFilesPath = "/mock/services/heattotosca/novatovolumeconnection/multiconnection/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/novatovolumeconnection/multiconnection/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testNovaToVolumeConnectionMultiNotCreatedIfVolPorpertyInVolAttacheIsNotAReferenceToVolume()
+ throws Exception {
+ inputFilesPath =
+ "/mock/services/heattotosca/novatovolumeconnection/multinotconnected/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/novatovolumeconnection/multinotconnected/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testNovaToVolumeConnectionNestedNotCreatedIfVolPorpertyInVolAttacheIsNotAReferenceToVolume()
+ throws Exception {
+ inputFilesPath =
+ "/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testTranslateNovaToVolumeNestedConnection() throws Exception {
+ inputFilesPath =
+ "/mock/services/heattotosca/novatovolumeconnection/nestedconnection/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/novatovolumeconnection/nestedconnection/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testTranslateNovaToVolumeSharedNestedConnection() throws Exception {
+ inputFilesPath =
+ "/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testTranslateNovaToVolumeSharedNestedNotCreatedIfVolPorpertyInVolAttacheIsNotAReferenceToVolume()
+ throws Exception {
+ inputFilesPath =
+ "/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testTranslateNovaToVolumeInnerNestedConnection() throws Exception {
+ inputFilesPath =
+ "/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/PortToContrailV2VirtualNetworkResourceConnectionTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/PortToContrailV2VirtualNetworkResourceConnectionTest.java
new file mode 100644
index 0000000000..156008edb9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/PortToContrailV2VirtualNetworkResourceConnectionTest.java
@@ -0,0 +1,45 @@
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.IOException;
+
+public class PortToContrailV2VirtualNetworkResourceConnectionTest
+ extends BaseResourceTranslationTest {
+ @Override
+ @Before
+ public void setUp() throws IOException {
+ // do not delete this function. it prevents the superclass setup from running
+ }
+
+ @Test
+ public void testPortToNetNestedConnection() throws Exception {
+ inputFilesPath =
+ "/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testPortToSharedNetNestedConnection() throws Exception {
+ inputFilesPath =
+ "/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testPortToNetMultiConnection() throws Exception {
+ inputFilesPath =
+ "/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/multi/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/multi/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/PortToNetResourceConnectionTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/PortToNetResourceConnectionTest.java
new file mode 100644
index 0000000000..6411d4759e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/PortToNetResourceConnectionTest.java
@@ -0,0 +1,38 @@
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.IOException;
+
+public class PortToNetResourceConnectionTest extends BaseResourceTranslationTest {
+ @Override
+ @Before
+ public void setUp() throws IOException {
+ // do not delete this function. it prevents the superclass setup from running
+ }
+
+ @Test
+ public void testTranslatePortToNetNestedConnection() throws Exception {
+ inputFilesPath = "/mock/services/heattotosca/porttonetconnection/nested/inputfiles";
+ outputFilesPath = "/mock/services/heattotosca/porttonetconnection/nested/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testTranslatePortToSharedNetNestedConnection() throws Exception {
+ inputFilesPath = "/mock/services/heattotosca/porttonetconnection/shared/inputfiles";
+ outputFilesPath = "/mock/services/heattotosca/porttonetconnection/shared/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testTranslatePortToNetMultiConnection() throws Exception {
+ inputFilesPath = "/mock/services/heattotosca/porttonetconnection/multi/inputfiles";
+ outputFilesPath = "/mock/services/heattotosca/porttonetconnection/multi/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationCinderVolumeAttachmentImplTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationCinderVolumeAttachmentImplTest.java
new file mode 100644
index 0000000000..54c06dd0d0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationCinderVolumeAttachmentImplTest.java
@@ -0,0 +1,52 @@
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.IOException;
+
+public class ResourceTranslationCinderVolumeAttachmentImplTest extends BaseResourceTranslationTest {
+
+ @Override
+ @Before
+ public void setUp() throws IOException {
+ // do not delete this function. it prevents the superclass setup from running
+ }
+
+ @Test
+ public void testTranslateAllResourcesInOneFile() throws Exception {
+ inputFilesPath = "/mock/services/heattotosca/vol_att/volume_and_attach_one_file/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/vol_att/volume_and_attach_one_file/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testVolFileIsNestedInMainHeatFile() throws Exception {
+ inputFilesPath =
+ "/mock/services/heattotosca/vol_att/volume_file_nested_in_main_file_in_manifest/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/vol_att/volume_file_nested_in_main_file_in_manifest/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testVolFileAsDataOfNested() throws Exception {
+ inputFilesPath = "/mock/services/heattotosca/vol_att/nested_with_inner_vol/inputfiles";
+ outputFilesPath = "/mock/services/heattotosca/vol_att/nested_with_inner_vol/out";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testVolFileIsParallelToMainHeatFile() throws Exception {
+ inputFilesPath =
+ "/mock/services/heattotosca/vol_att/volume_file_parallel_to_main_file/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/vol_att/volume_file_parallel_to_main_file/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationCinderVolumeImplTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationCinderVolumeImplTest.java
new file mode 100644
index 0000000000..30ccbdd53d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationCinderVolumeImplTest.java
@@ -0,0 +1,15 @@
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.junit.Test;
+
+public class ResourceTranslationCinderVolumeImplTest extends BaseResourceTranslationTest {
+ public ResourceTranslationCinderVolumeImplTest() {
+ inputFilesPath = "/mock/services/heattotosca/cinder_volume_translation/inputfiles";
+ outputFilesPath = "/mock/services/heattotosca/cinder_volume_translation/expectedoutputfiles";
+ }
+
+ @Test
+ public void testTranslate() throws Exception {
+ testTranslation();
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailServiceInstanceImplTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailServiceInstanceImplTest.java
new file mode 100644
index 0000000000..40f5eb1200
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailServiceInstanceImplTest.java
@@ -0,0 +1,72 @@
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.IOException;
+
+/**
+ * @author shiria
+ * @since August 07, 2016.
+ */
+public class ResourceTranslationContrailServiceInstanceImplTest
+ extends BaseResourceTranslationTest {
+
+ @Override
+ @Before
+ public void setUp() throws IOException {
+ // do not delete this function. it prevents the superclass setup from running
+ }
+
+ @Test
+ public void testTranslateOneServiceInstance() throws Exception {
+ inputFilesPath =
+ "/mock/services/heattotosca/contrail2serviceinstance/oneServiceInstance/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/contrail2serviceinstance/oneServiceInstance/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testTranslateDiffServiceTemplate() throws Exception {
+ inputFilesPath =
+ "/mock/services/heattotosca/contrail2serviceinstance/diffServiceTemplate/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/contrail2serviceinstance/diffServiceTemplate/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testTranslateSharedNetworkMulti() throws Exception {
+ inputFilesPath =
+ "/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkMulti/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkMulti/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testTranslateSameServiceTemplate() throws Exception {
+ inputFilesPath =
+ "/mock/services/heattotosca/contrail2serviceinstance/sameServiceTemplate/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/contrail2serviceinstance/sameServiceTemplate/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+
+ /*
+ //TODO -- need to be tested once the 2 level nested For shared resources bug will be fixed - ATTASDC-1065
+ @Test
+ public void testTranslateSharedNetworkNested() throws Exception {
+ inputFilesPath = "/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/inputfiles";
+ outputFilesPath = "/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+ */
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailServiceTemplateImplTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailServiceTemplateImplTest.java
new file mode 100644
index 0000000000..42b6db0e71
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailServiceTemplateImplTest.java
@@ -0,0 +1,55 @@
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.translator.services.heattotosca.helper.ContrailTranslationHelper;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author shiria
+ * @since August 09, 2016.
+ */
+public class ResourceTranslationContrailServiceTemplateImplTest {
+
+ @Rule
+ public ExpectedException thrown = ExpectedException.none();
+
+ @Test
+ public void testStaticGetComputeNodeTypeId() throws Exception {
+ Resource serviceTemplate = new Resource();
+ serviceTemplate.setProperties(new HashMap<>());
+ serviceTemplate.getProperties().put("image_name", "aaaa");
+ String computeNodeTypeId =
+ new ContrailTranslationHelper().getComputeNodeTypeId("123", serviceTemplate);
+ Assert.assertEquals("org.openecomp.resource.vfc.nodes.heat.compute_123", computeNodeTypeId);
+ }
+
+ @Test
+ public void testNamingConventionGetComputeNodeTypeId() throws Exception {
+ Resource serviceTemplate = new Resource();
+ serviceTemplate.setProperties(new HashMap<>());
+ Map image = new HashMap<>();
+ image.put("get_param", "bbb_image_name");
+ serviceTemplate.getProperties().put("image_name", image);
+ String computeNodeTypeId =
+ new ContrailTranslationHelper().getComputeNodeTypeId("123", serviceTemplate);
+ Assert.assertEquals(computeNodeTypeId, "org.openecomp.resource.vfc.nodes.heat.bbb");
+ }
+
+ @Test
+ public void testNoNamingConventionGetComputeNodeTypeId() throws Exception {
+ Resource serviceTemplate = new Resource();
+ serviceTemplate.setProperties(new HashMap<>());
+ Map image = new HashMap<>();
+ image.put("get_file", "bbb_image");
+ serviceTemplate.getProperties().put("image_name", image);
+ String computeNodeTypeId =
+ new ContrailTranslationHelper().getComputeNodeTypeId("123", serviceTemplate);
+ Assert.assertEquals(computeNodeTypeId, "org.openecomp.resource.vfc.nodes.heat.compute_123");
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailV2Test.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailV2Test.java
new file mode 100644
index 0000000000..e4e1ad9216
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailV2Test.java
@@ -0,0 +1,56 @@
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.IOException;
+
+public class ResourceTranslationContrailV2Test extends BaseResourceTranslationTest {
+
+ @Override
+ @Before
+ public void setUp() throws IOException {
+ // do not delete this function. it prevents the superclass setup from running
+ }
+
+ @Test
+ public void testTranslate() throws Exception {
+ inputFilesPath = "/mock/services/heattotosca/ContrailV2_translation/simple/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/ContrailV2_translation/simple/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testMultiPolicySingleNetTranslate() throws Exception {
+ inputFilesPath =
+ "/mock/services/heattotosca/ContrailV2_translation/ContrailV2_MultiPolicy_single_net_translation/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/ContrailV2_translation/ContrailV2_MultiPolicy_single_net_translation/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testMultiNetSinglePolicyTranslate() throws Exception {
+ inputFilesPath =
+ "/mock/services/heattotosca/ContrailV2_translation/ContrailV2_Multi_net_single_policy_translation/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/ContrailV2_translation/ContrailV2_Multi_net_single_policy_translation/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testInvalidPolicyResourceTypeTranslate() throws Exception {
+ inputFilesPath =
+ "/mock/services/heattotosca/ContrailV2_translation/invalid_policy_resource_type/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/ContrailV2_translation/invalid_policy_resource_type/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailV2VMInterfaceImplTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailV2VMInterfaceImplTest.java
new file mode 100644
index 0000000000..95757e7cf9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationContrailV2VMInterfaceImplTest.java
@@ -0,0 +1,36 @@
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.IOException;
+
+/**
+ * @author Avrahamg
+ * @since August 10, 2016
+ */
+public class ResourceTranslationContrailV2VMInterfaceImplTest extends BaseResourceTranslationTest {
+
+ @Override
+ @Before
+ public void setUp() throws IOException {
+ // do not delete this function. it prevents the superclass setup from running
+ }
+
+ @Test
+ public void testTranslateVMIWithGetResource() throws Exception {
+ inputFilesPath = "/mock/services/heattotosca/contrailv2VMinterface/oneNet/inputfiles";
+ outputFilesPath = "/mock/services/heattotosca/contrailv2VMinterface/oneNet/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testTranslateVMIWithListOfNetworks() throws Exception {
+ inputFilesPath = "/mock/services/heattotosca/contrailv2VMinterface/listNet/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/contrailv2VMinterface/listNet/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNeutronPortImplTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNeutronPortImplTest.java
new file mode 100644
index 0000000000..6e2c298346
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNeutronPortImplTest.java
@@ -0,0 +1,17 @@
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.junit.Test;
+
+public class ResourceTranslationNeutronPortImplTest extends BaseResourceTranslationTest {
+
+ {
+ inputFilesPath = "/mock/services/heattotosca/neutron_port_translation/inputfiles";
+ outputFilesPath = "/mock/services/heattotosca/neutron_port_translation/expectedoutputfiles";
+ }
+
+ @Test
+ public void testTranslate() throws Exception {
+ testTranslation();
+ }
+
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNeutronSecurityGroupImplTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNeutronSecurityGroupImplTest.java
new file mode 100644
index 0000000000..1791f10b1c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNeutronSecurityGroupImplTest.java
@@ -0,0 +1,19 @@
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.junit.Test;
+
+public class ResourceTranslationNeutronSecurityGroupImplTest extends BaseResourceTranslationTest {
+
+ {
+ inputFilesPath = "/mock/services/heattotosca/neutron_security_group_translation/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/neutron_security_group_translation/expectedoutputfiles";
+ }
+
+ @Test
+ public void testTranslate() throws Exception {
+ testTranslation();
+ }
+
+
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNovaServerGroupsImplTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNovaServerGroupsImplTest.java
new file mode 100644
index 0000000000..aabee8f56f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationNovaServerGroupsImplTest.java
@@ -0,0 +1,16 @@
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.junit.Test;
+
+public class ResourceTranslationNovaServerGroupsImplTest extends BaseResourceTranslationTest {
+ {
+ inputFilesPath = "/mock/services/heattotosca/novaservergroups/inputfiles";
+ outputFilesPath = "/mock/services/heattotosca/novaservergroups/expectedoutputfiles";
+ }
+
+ @Test
+ public void testTranslate() throws Exception {
+ testTranslation();
+ }
+
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationResourceGroupImplTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationResourceGroupImplTest.java
new file mode 100644
index 0000000000..de1b0bfe29
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/ResourceTranslationResourceGroupImplTest.java
@@ -0,0 +1,110 @@
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.openecomp.sdc.common.errors.CoreException;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import java.io.IOException;
+
+/**
+ * @author shiria
+ * @since July 21, 2016.
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class ResourceTranslationResourceGroupImplTest extends BaseResourceTranslationTest {
+ @Rule
+ public ExpectedException thrown = ExpectedException.none();
+
+ @Override
+ @Before
+ public void setUp() throws IOException {
+ // do not delete this function. it prevents the superclass setup from running
+ }
+
+ @Test
+ public void testTranslateResourceGroup() throws Exception {
+ inputFilesPath = "/mock/heat/nested/resource_group/inputs";
+ outputFilesPath = "/mock/heat/nested/resource_group/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testTranslateMultiResourceGroup() throws Exception {
+ inputFilesPath = "/mock/heat/nested/multiple_resource_groups/inputs";
+ outputFilesPath = "/mock/heat/nested/multiple_resource_groups/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testTranslateResourceGroupDynamicCount() throws Exception {
+ inputFilesPath = "/mock/heat/nested/resource_group_with_dynamic_count/inputs";
+ outputFilesPath = "/mock/heat/nested/resource_group_with_dynamic_count/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+
+ @Test
+ public void testTranslatePortToNetNestedByResourceGroupConnection() throws Exception {
+ inputFilesPath = "/mock/services/heattotosca/porttonetresourcegroupconnection/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/porttonetresourcegroupconnection/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testTranslatePortToNetSharedConnection() throws Exception {
+ inputFilesPath = "/mock/services/heattotosca/porttosharednetresourcegrouplinking/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/porttosharednetresourcegrouplinking/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testTranslateSecurityGroupToSharedPortConnection() throws Exception {
+ inputFilesPath =
+ "/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testTranslateResourceGroupIndexVar() throws Exception {
+ inputFilesPath = "/mock/heat/nested/resourceGroupIndexVar/inputs";
+ outputFilesPath = "/mock/heat/nested/resourceGroupIndexVar/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testTranslateResourceGroupInvalidIndexVar() throws Exception {
+ thrown.expect(CoreException.class);
+ thrown.expectMessage(
+ "'index_var' property has invalid value. Actual value is '{get_param=index_parameter}' while 'String' value expected.");
+
+ inputFilesPath = "/mock/heat/nested/resourceGroupInvalid/inputs";
+ outputFilesPath = "/mock/heat/nested/resourceGroupInvalid/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testTranslateMDNS() throws Exception {
+ inputFilesPath = "/mock/heat/nested/resourceGroupMDNS/inputs";
+ outputFilesPath = "/mock/heat/nested/resourceGroupMDNS/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/SecurityGroupToNovaResourceConnectionTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/SecurityGroupToNovaResourceConnectionTest.java
new file mode 100644
index 0000000000..ce55800d3a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/SecurityGroupToNovaResourceConnectionTest.java
@@ -0,0 +1,24 @@
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.IOException;
+
+public class SecurityGroupToNovaResourceConnectionTest extends BaseResourceTranslationTest {
+ @Override
+ @Before
+ public void setUp() throws IOException {
+ // do not delete this function. it prevents the superclass setup from running
+ }
+
+ @Test
+ public void testSecurityGroupToPortConnectionMultiConnection() throws Exception {
+ inputFilesPath = "/mock/services/heattotosca/securitygrouptonovaconnectionmulti/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/securitygrouptonovaconnectionmulti/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/SecurityRulesToPortResourceConnectionTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/SecurityRulesToPortResourceConnectionTest.java
new file mode 100644
index 0000000000..a75e0133d9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/SecurityRulesToPortResourceConnectionTest.java
@@ -0,0 +1,55 @@
+package org.openecomp.sdc.translator.services.heattotosca.impl;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.IOException;
+
+public class SecurityRulesToPortResourceConnectionTest extends BaseResourceTranslationTest {
+ @Override
+ @Before
+ public void setUp() throws IOException {
+ // do not delete this function. it prevents the superclass setup from running
+ }
+
+ @Test
+ public void testTranslateSecurityRuleToPortNestedConnection() throws Exception {
+ inputFilesPath =
+ "/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportnestedconnection/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportnestedconnection/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testTranslateSecurityRuleToPortSharedPortNestedConnection() throws Exception {
+ inputFilesPath =
+ "/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testSecurityRuleToPortConnectionMultiConnection() throws Exception {
+ inputFilesPath =
+ "/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectionmulti/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectionmulti/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+ @Test
+ public void testSecurityRuleToPortConnectionNestedGetResource() throws Exception {
+ inputFilesPath =
+ "/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles";
+ outputFilesPath =
+ "/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/expectedoutputfiles";
+ initTranslatorAndTranslate();
+ testTranslation();
+ }
+
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/mapping/TranslatorHeatToToscaFunctionConverterTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/mapping/TranslatorHeatToToscaFunctionConverterTest.java
new file mode 100644
index 0000000000..7fccd6c080
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/mapping/TranslatorHeatToToscaFunctionConverterTest.java
@@ -0,0 +1,68 @@
+package org.openecomp.sdc.translator.services.heattotosca.mapping;
+
+import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.tosca.services.ToscaFileOutputService;
+import org.openecomp.sdc.tosca.services.impl.ToscaFileOutputServiceCsarImpl;
+import org.openecomp.sdc.translator.services.heattotosca.TranslationContext;
+import org.openecomp.core.utilities.file.FileUtils;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.HashMap;
+import java.util.List;
+
+public class TranslatorHeatToToscaFunctionConverterTest {
+
+ @Test
+ public void testGetFileWithExtensionFunction() {
+ String functionName = "get_file";
+ Object function = "scripFileName.sh";
+ String heatFileName = "heatFileName";
+ HeatOrchestrationTemplate heatOrchestrationTemplate = new HeatOrchestrationTemplate();
+ NodeTemplate nodeTemplate = new NodeTemplate();
+ TranslationContext context = new TranslationContext();
+
+ testGetToscaFunctionForGetFile(functionName, function, heatFileName, heatOrchestrationTemplate,
+ nodeTemplate, context);
+ }
+
+ @Test
+ public void testGetFileWithoutExtensionFunction() {
+ String functionName = "get_file";
+ Object function = "scripFileName";
+ String heatFileName = "heatFileName";
+ HeatOrchestrationTemplate heatOrchestrationTemplate = new HeatOrchestrationTemplate();
+ NodeTemplate nodeTemplate = new NodeTemplate();
+ TranslationContext context = new TranslationContext();
+
+ //# route_targets: { "Fn::Split" : [ ",", Ref: route_targets ] }
+ testGetToscaFunctionForGetFile(functionName, function, heatFileName, heatOrchestrationTemplate,
+ nodeTemplate, context);
+ }
+
+ private void testGetToscaFunctionForGetFile(String functionName, Object function,
+ String heatFileName,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ NodeTemplate nodeTemplate,
+ TranslationContext context) {
+ Object result = TranslatorHeatToToscaFunctionConverter
+ .getToscaFunction(functionName, function, heatFileName, heatOrchestrationTemplate,
+ nodeTemplate, context);
+ Assert.assertNotNull(((HashMap) result).get("get_artifact"));
+ List artifactParameters = (List) ((HashMap) result).get("get_artifact");
+ Assert.assertNotNull(artifactParameters);
+ Assert.assertEquals(artifactParameters.size(), 2);
+ Assert.assertEquals(artifactParameters.get(0), ToscaConstants.MODELABLE_ENTITY_NAME_SELF);
+ Assert.assertEquals(artifactParameters.get(1), ((String) function).split("\\.")[0]);
+
+ Assert.assertNotNull(nodeTemplate.getArtifacts());
+ Assert.assertNotNull(
+ nodeTemplate.getArtifacts().get(FileUtils.getFileWithoutExtention((String) function)));
+ ToscaFileOutputService toscaFileOutputService = new ToscaFileOutputServiceCsarImpl();
+ Assert.assertEquals(
+ nodeTemplate.getArtifacts().get(FileUtils.getFileWithoutExtention((String) function))
+ .getFile(), "../" + toscaFileOutputService.getArtifactsFolderName() + "/" + function);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/ep-jsa-si/ep-jsa-si.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/ep-jsa-si/ep-jsa-si.env
new file mode 100644
index 0000000000..d1d7d9625f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/ep-jsa-si/ep-jsa-si.env
@@ -0,0 +1,14 @@
+parameters:
+ service_instance_name: ZRDM1LOGS01JSA
+ st_name: JSA-EP-Template
+ st_mode: in-network
+ st_type: firewall
+ st_image: MNS_JSA_2014R5.1-LATEST
+ st_flavor: lc.3xlarge
+ st_service_interface_type_list: management,left
+ st_shared_ip_list: False,True
+ st_static_routes_list: True,True
+ st_scaling: "True"
+ max_num_fw_instances: 24
+ mgmt_net: 'default-domain:MNS-25180-L-01Shared:oam_direct_net_0'
+ jsa_net: 'default-domain:MNS-25180-L-01Shared:jsa_log_net_0' \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/ep-jsa-si/ep-jsa-si.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/ep-jsa-si/ep-jsa-si.yaml
new file mode 100644
index 0000000000..d9f9e5b944
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/ep-jsa-si/ep-jsa-si.yaml
@@ -0,0 +1,76 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ mgmt_net:
+ type: string
+ description: network name of OAM network
+ jsa_net:
+ type: string
+ description: network name of jsa log network
+ st_name:
+ type: string
+ description: service template name or ID
+ st_type:
+ type: string
+ description: service type
+ st_image:
+ type: string
+ description: Name of the image
+ st_flavor:
+ type: string
+ description: Flavor
+ st_service_interface_type_list:
+ type: string
+ description: List of interface types
+ st_shared_ip_list:
+ type: string
+ description: List of shared ip enabled-disabled
+ st_static_routes_list:
+ type: string
+ description: List of static routes enabled-disabled
+ st_scaling:
+ type: string
+ description: Indicates whether service scaling is enabled
+ st_mode:
+ type: string
+ description: service mode
+ max_num_fw_instances:
+ type: number
+ description: maximum number of firewall instances for scaling
+ service_instance_name:
+ type: string
+ description: service instance name
+
+resources:
+ service_template:
+ type: OS::Contrail::ServiceTemplate
+ properties:
+ name: { get_param: st_name }
+ service_mode: { get_param: st_mode }
+ service_type: { get_param: st_type }
+ image_name: { get_param: st_image }
+ flavor: { get_param: st_flavor }
+ service_interface_type_list: { "Fn::Split" : [ ",", Ref: st_service_interface_type_list ] }
+ shared_ip_list: { "Fn::Split" : [ ",", Ref: st_shared_ip_list ] }
+ static_routes_list: { "Fn::Split" : [ ",", Ref: st_static_routes_list ]}
+ service_scaling: { get_param: st_scaling }
+
+ service_instance:
+ type: OS::Contrail::ServiceInstance
+ properties:
+ name: { get_param: service_instance_name }
+ service_template: { get_resource: service_template }
+ scale_out:
+ max_instances: { get_param: max_num_fw_instances }
+ interface_list: [
+ {
+ virtual_network: {get_param: mgmt_net}
+ },
+ {
+ virtual_network: {get_param: jsa_net}
+ },
+ ]
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/ep-jsa-si/ep-jsa_net.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/ep-jsa-si/ep-jsa_net.env
new file mode 100644
index 0000000000..9dd1cd441f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/ep-jsa-si/ep-jsa_net.env
@@ -0,0 +1,4 @@
+parameters:
+ jsa_net_name: jsa_log_net_0
+ jsa_cidr: 107.243.7.128/26
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/ep-jsa-si/ep-jsa_net.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/ep-jsa-si/ep-jsa_net.yaml
new file mode 100644
index 0000000000..1f7aec90fa
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/ep-jsa-si/ep-jsa_net.yaml
@@ -0,0 +1,26 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ jsa_net_name:
+ type: string
+ description: network name of jsa log network
+ jsa_cidr:
+ type: string
+ description: CIDR of jsa log network
+
+resources:
+ jsa_net:
+ type: OS::Neutron::Net
+ properties:
+ name: {get_param: jsa_net_name}
+ shared: True
+
+ jsa_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: {get_resource: jsa_net}
+ cidr: {get_param: jsa_cidr}
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/ep-jsa-si/master-jsa.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/ep-jsa-si/master-jsa.env
new file mode 100644
index 0000000000..9170b98627
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/ep-jsa-si/master-jsa.env
@@ -0,0 +1,6 @@
+parameters:
+ oam_net_name: oam_direct_net_0
+ security_group_name: jsa_security_group
+ MASTER_names: ZRDM1LOGS01CSL001
+ MASTER_image_name: MNS_JSA_2014R5.1-LATEST
+ MASTER_flavor_name: lc.4xlarge4
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/ep-jsa-si/master-jsa.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/ep-jsa-si/master-jsa.yaml
new file mode 100644
index 0000000000..6c6f52a681
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/ep-jsa-si/master-jsa.yaml
@@ -0,0 +1,57 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-11-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ oam_net_name:
+ type: string
+ description: network name of OAM network
+ security_group_name:
+ type: string
+ description: security group name of JSA
+ MASTER_names:
+ type: string
+ description: JSA MASTER instance name
+ MASTER_image_name:
+ type: string
+ description: JSA MASTER instance image name
+ MASTER_flavor_name:
+ type: string
+ description: the flavor name of JSA MASTER instance
+
+resources:
+ jsa_security_group:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: ems security group
+ name: {get_param: security_group_name}
+ rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"}
+ ]
+
+
+ MASTER_instance:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: MASTER_names}
+ image: {get_param: MASTER_image_name}
+ flavor: {get_param: MASTER_flavor_name}
+ networks:
+ - port: {get_resource: MASTER_mgmt_port}
+
+ MASTER_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ security_groups: [{get_resource: jsa_security_group}]
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..9e0e6efecd
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,236 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1_2:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ pcm_flavor_name:
+ type: string
+ description: flavor name of PCRF CM instance
+ availabilityzone_name:
+ type: string
+ description: availabilityzone name
+ pcm_image_name:
+ type: string
+ description: PCRF CM image name
+ pcm_vol:
+ type: string
+ description: CPS Cluman Cinder Volume
+ security_group_name:
+ type: string
+ description: the name of security group
+ cps_net_ip:
+ type: string
+ description: CPS network ip
+ pcm_server_name:
+ type: string
+ description: PCRF CM server name
+ cps_net_name:
+ type: string
+ description: CPS network name
+ cps_net_mask:
+ type: string
+ description: CPS network mask
+ oam_net_ip:
+ type: string
+ oam_net_name:
+ type: string
+ description: OAM network name
+ attributes:
+ server_pcm_id:
+ type: string
+ description: the pcm nova service id
+ requirements:
+ - link_pcm_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_server_pcm:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_pcm_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ endpoint_server_pcm:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_pcm:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_pcm:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_pcm:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_pcm:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_pcm_port_0:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_pcm_port_1:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ availabilityzone_name:
+ type: string
+ description: availabilityzone name
+ oam_net_gw:
+ type: string
+ description: CPS network gateway
+ pcm_image_name:
+ type: string
+ description: PCRF CM image name
+ security_group_name:
+ type: string
+ description: the name of security group
+ cps_net_ip:
+ type: string
+ description: CPS network ip
+ pcm_flavor_name:
+ type: string
+ description: flavor name of PCRF CM instance
+ pcm_vol:
+ type: string
+ description: CPS Cluman Cinder Volume
+ pcm_server_name:
+ type: string
+ description: PCRF CM server name
+ cps_net_name:
+ type: string
+ description: CPS network name
+ cps_net_mask:
+ type: string
+ description: CPS network mask
+ oam_net_ip:
+ type: string
+ description: OAM network ip
+ oam_net_mask:
+ type: string
+ description: CPS network mask
+ oam_net_name:
+ type: string
+ description: OAM network name
+ attributes:
+ server_pcm_id:
+ type: string
+ description: the pcm nova service id
+ requirements:
+ - link_pcm_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_server_pcm:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_pcm_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ endpoint_server_pcm:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_pcm:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_pcm:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_pcm:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_pcm:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_pcm_port_0:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_pcm_port_1:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..a0063b174e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,240 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ oam_net_ips:
+ label: OAM network ips
+ hidden: false
+ immutable: false
+ type: list
+ description: OAM network ips
+ entry_schema:
+ type: string
+ availabilityzone_name:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ oam_net_gw:
+ label: CPS network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network gateway
+ pcm_server_names:
+ label: PCRF CM server names
+ hidden: false
+ immutable: false
+ type: list
+ description: name of the PCRF CM instance
+ entry_schema:
+ type: string
+ pcm_image_name:
+ label: PCRF CM image name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF CM image name
+ cps_net_ips:
+ label: CPS network ips
+ hidden: false
+ immutable: false
+ type: list
+ description: CPS network ips
+ entry_schema:
+ type: string
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ pcm_volumes:
+ label: CPS Cluman Cinder Volume
+ hidden: false
+ immutable: false
+ type: list
+ description: CPS Cluman Cinder Volume
+ entry_schema:
+ type: string
+ pcm_flavor_name:
+ label: PCRF CM flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor name of PCRF CM instance
+ cps_net_name:
+ label: CPS network name
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network name
+ cps_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ oam_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ oam_net_name:
+ label: OAM network name
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM network name
+ node_templates:
+ server_pcm_002:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1
+ directives:
+ - substitutable
+ properties:
+ pcm_flavor_name:
+ get_input: pcm_flavor_name
+ service_template_filter:
+ substitute_service_template: nested-pcm_v0.1ServiceTemplate.yaml
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcm_image_name:
+ get_input: pcm_image_name
+ pcm_vol:
+ get_input:
+ - pcm_volumes
+ - 0
+ security_group_name:
+ get_input: security_group_name
+ pcm_server_name:
+ get_input:
+ - pcm_server_names
+ - 0
+ server_pcm_001:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nested-pcm_v0.1ServiceTemplate.yaml
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ oam_net_gw:
+ get_input: oam_net_gw
+ pcm_vol:
+ get_input:
+ - pcm_volumes
+ - 0
+ security_group_name:
+ get_input: security_group_name
+ cps_net_ip:
+ get_input:
+ - cps_net_ips
+ - 0
+ cps_net_name:
+ get_input: cps_net_name
+ cps_net_mask:
+ get_input: cps_net_mask
+ oam_net_ip:
+ get_input:
+ - oam_net_ips
+ - 0
+ oam_net_mask:
+ get_input: oam_net_mask
+ oam_net_name:
+ get_input: oam_net_name
+ server_pcm_004:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1_2
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nested-pcm_v0.1_2ServiceTemplate.yaml
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcm_vol:
+ get_input:
+ - pcm_volumes
+ - 0
+ security_group_name:
+ get_input: security_group_name
+ cps_net_ip:
+ get_input:
+ - cps_net_ips
+ - 0
+ cps_net_name:
+ get_input: cps_net_name
+ cps_net_mask:
+ get_input: cps_net_mask
+ server_pcm_003:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nested-pcm_v0.1ServiceTemplate.yaml
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcm_vol:
+ get_input:
+ - pcm_volumes
+ - 0
+ security_group_name:
+ get_input: security_group_name
+ cps_net_ip:
+ get_input:
+ - cps_net_ips
+ - 0
+ cps_net_name:
+ get_input: cps_net_name
+ cps_net_mask:
+ get_input: cps_net_mask
+ groups:
+ hot-nimbus-pcm_v0.4_2:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot-nimbus-pcm_v0.4_2.yaml
+ description: heat template that creates PCRF Cluman stack
+ members:
+ - server_pcm_004
+ - server_pcm_003
+ hot-nimbus-pcm_v0.4:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot-nimbus-pcm_v0.4.yaml
+ description: heat template that creates PCRF Cluman stack
+ members:
+ - server_pcm_002
+ - server_pcm_001 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml
new file mode 100644
index 0000000000..1b03021742
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml
@@ -0,0 +1,207 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested-pcm_v0.1
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.pcm_server:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ availabilityzone_name:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ oam_net_gw:
+ label: CPS network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network gateway
+ pcm_image_name:
+ label: image name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF CM image name
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ cps_net_ip:
+ label: CPS network ip
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network ip
+ pcm_flavor_name:
+ label: PCRF CM flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor name of PCRF CM instance
+ pcm_vol:
+ label: CPS Cluman Cinder Volume
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS Cluman Cinder Volume
+ pcm_server_name:
+ label: PCRF CM server name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF CM server name
+ cps_net_name:
+ label: CPS network name
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network name
+ cps_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ oam_net_ip:
+ label: OAM network ip
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM network ip
+ oam_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ oam_net_name:
+ label: OAM network name
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM network name
+ node_templates:
+ pcm_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: oam_net_ip
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pcm
+ relationship: tosca.relationships.network.BindsTo
+ server_pcm:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm_server
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ pcm_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: cps_net_ip
+ network:
+ get_input: cps_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pcm
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested-pcm_v0.1:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested-pcm_v0.1.yaml
+ description: heat template that creates PCRF Cluman stack
+ members:
+ - pcm_port_1
+ - server_pcm
+ - pcm_port_0
+ outputs:
+ server_pcm_id:
+ description: the pcm nova service id
+ value: server_pcm
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1
+ capabilities:
+ endpoint_server_pcm:
+ - server_pcm
+ - endpoint
+ os_server_pcm:
+ - server_pcm
+ - os
+ host_server_pcm:
+ - server_pcm
+ - host
+ scalable_server_pcm:
+ - server_pcm
+ - scalable
+ binding_server_pcm:
+ - server_pcm
+ - binding
+ attachment_pcm_port_0:
+ - pcm_port_0
+ - attachment
+ attachment_pcm_port_1:
+ - pcm_port_1
+ - attachment
+ requirements:
+ link_pcm_port_0:
+ - pcm_port_0
+ - link
+ link_pcm_port_1:
+ - pcm_port_1
+ - link
+ local_storage_server_pcm:
+ - server_pcm
+ - local_storage \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/nested-pcm_v0.1_2ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/nested-pcm_v0.1_2ServiceTemplate.yaml
new file mode 100644
index 0000000000..34d0c6d899
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/nested-pcm_v0.1_2ServiceTemplate.yaml
@@ -0,0 +1,193 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested-pcm_v0.1_2
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.pcm_server:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ pcm_flavor_name:
+ label: PCRF CM flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor name of PCRF CM instance
+ availabilityzone_name:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ pcm_image_name:
+ label: image name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF CM image name
+ pcm_vol:
+ label: CPS Cluman Cinder Volume
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS Cluman Cinder Volume
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ cps_net_ip:
+ label: CPS network ip
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network ip
+ pcm_server_name:
+ label: PCRF CM server name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF CM server name
+ cps_net_name:
+ label: CPS network name
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network name
+ cps_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ oam_net_ip:
+ hidden: false
+ immutable: false
+ type: string
+ oam_net_name:
+ label: OAM network name
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM network name
+ node_templates:
+ pcm_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: oam_net_ip
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pcm
+ relationship: tosca.relationships.network.BindsTo
+ server_pcm:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm_server
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ pcm_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: cps_net_ip
+ network:
+ get_input: cps_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pcm
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested-pcm_v0.1_2:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested-pcm_v0.1_2.yaml
+ description: heat template that creates PCRF Cluman stack
+ members:
+ - pcm_port_1
+ - server_pcm
+ - pcm_port_0
+ outputs:
+ server_pcm_id:
+ description: the pcm nova service id
+ value: server_pcm
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1_2
+ capabilities:
+ endpoint_server_pcm:
+ - server_pcm
+ - endpoint
+ os_server_pcm:
+ - server_pcm
+ - os
+ host_server_pcm:
+ - server_pcm
+ - host
+ scalable_server_pcm:
+ - server_pcm
+ - scalable
+ binding_server_pcm:
+ - server_pcm
+ - binding
+ attachment_pcm_port_0:
+ - pcm_port_0
+ - attachment
+ attachment_pcm_port_1:
+ - pcm_port_1
+ - attachment
+ requirements:
+ link_pcm_port_0:
+ - pcm_port_0
+ - link
+ link_pcm_port_1:
+ - pcm_port_1
+ - link
+ local_storage_server_pcm:
+ - server_pcm
+ - local_storage \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/MANIFEST.json
new file mode 100644
index 0000000000..b32b92ca11
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/MANIFEST.json
@@ -0,0 +1,30 @@
+{
+ "name": "vEP_JSA_Net",
+ "description": "Version 2.0 02-09-2016 (Authors: John Doe, user PROD)",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pcm_v0.4.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pcm_v0.4.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },{
+ "file": "nested-pcm_v0.1.yaml",
+ "type": "HEAT"
+ },{
+ "file": "hot-nimbus-pcm_v0.4_2.yaml",
+ "type": "HEAT"
+ },{
+ "file": "nested-pcm_v0.1_2.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nimbus-ethernet",
+ "type": "OTHER"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/hot-nimbus-pcm_v0.4.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/hot-nimbus-pcm_v0.4.env
new file mode 100644
index 0000000000..78cc03e2ea
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/hot-nimbus-pcm_v0.4.env
@@ -0,0 +1,14 @@
+parameters:
+ pcm_server_names: ZRDM1PCRF01PCM001
+ pcm_image_name: rhel2
+ pcm_flavor_name: cps
+ availabilityzone_name: nova
+ cps_net_name: int_pcrf_net_0
+ cps_net_ips: 172.26.16.113
+ cps_net_mask: 255.255.255.0
+ oam_net_name: oam_protected_net_0
+ oam_net_ips: 107.239.64.121
+ oam_net_gw: 107.239.64.1
+ oam_net_mask: 255.255.255.0
+ pcm_volumes: 249cb355-8fdf-4382-9c3c-a2ebe767d45b
+ security_group_name: nimbus_security_group
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/hot-nimbus-pcm_v0.4.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/hot-nimbus-pcm_v0.4.yaml
new file mode 100644
index 0000000000..f7d050790f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/hot-nimbus-pcm_v0.4.yaml
@@ -0,0 +1,82 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Cluman stack
+
+parameters:
+ pcm_server_names:
+ type: comma_delimited_list
+ label: PCRF CM server names
+ description: name of the PCRF CM instance
+ pcm_image_name:
+ type: string
+ label: PCRF CM image name
+ description: PCRF CM image name
+ pcm_flavor_name:
+ type: string
+ label: PCRF CM flavor name
+ description: flavor name of PCRF CM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ oam_net_name:
+ type: string
+ label: OAM network name
+ description: OAM network name
+ oam_net_ips:
+ type: comma_delimited_list
+ label: OAM network ips
+ description: OAM network ips
+ oam_net_gw:
+ type: string
+ label: CPS network gateway
+ description: CPS network gateway
+ oam_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcm_volumes:
+ type: comma_delimited_list
+ label: CPS Cluman Cinder Volume
+ description: CPS Cluman Cinder Volume
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+
+resources:
+ server_pcm_001:
+ type: nested-pcm_v0.1.yaml
+ properties:
+ availabilityzone_name: { get_param: availabilityzone_name }
+ security_group_name: { get_param: security_group_name }
+ pcm_vol: { get_param: [pcm_volumes, 0] }
+ cps_net_name: { get_param: cps_net_name }
+ cps_net_ip: { get_param: [cps_net_ips, 0] }
+ cps_net_mask: { get_param: cps_net_mask }
+ oam_net_name: { get_param: oam_net_name }
+ oam_net_ip: { get_param: [oam_net_ips, 0] }
+ oam_net_mask: { get_param: oam_net_mask }
+ oam_net_gw: { get_param: oam_net_gw }
+
+ server_pcm_002:
+ type: nested-pcm_v0.1.yaml
+ properties:
+ pcm_server_name: { get_param: [pcm_server_names, 0] }
+ pcm_image_name: { get_param: pcm_image_name }
+ pcm_flavor_name: { get_param: pcm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ security_group_name: { get_param: security_group_name }
+ pcm_vol: { get_param: [pcm_volumes, 0] }
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/hot-nimbus-pcm_v0.4_2.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/hot-nimbus-pcm_v0.4_2.yaml
new file mode 100644
index 0000000000..b59df84764
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/hot-nimbus-pcm_v0.4_2.yaml
@@ -0,0 +1,79 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Cluman stack
+
+parameters:
+ pcm_server_names:
+ type: comma_delimited_list
+ label: PCRF CM server names
+ description: name of the PCRF CM instance
+ pcm_image_name:
+ type: string
+ label: PCRF CM image name
+ description: PCRF CM image name
+ pcm_flavor_name:
+ type: string
+ label: PCRF CM flavor name
+ description: flavor name of PCRF CM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ oam_net_name:
+ type: string
+ label: OAM network name
+ description: OAM network name
+ oam_net_ips:
+ type: comma_delimited_list
+ label: OAM network ips
+ description: OAM network ips
+ oam_net_gw:
+ type: string
+ label: CPS network gateway
+ description: CPS network gateway
+ oam_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcm_volumes:
+ type: comma_delimited_list
+ label: CPS Cluman Cinder Volume
+ description: CPS Cluman Cinder Volume
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+
+resources:
+ server_pcm_003:
+ type: nested-pcm_v0.1.yaml
+ properties:
+ availabilityzone_name: { get_param: availabilityzone_name }
+ security_group_name: { get_param: security_group_name }
+ pcm_vol: { get_param: [pcm_volumes, 0] }
+ cps_net_name: { get_param: cps_net_name }
+ cps_net_ip: { get_param: [cps_net_ips, 0] }
+ cps_net_mask: { get_param: cps_net_mask }
+
+ server_pcm_004:
+ type: nested-pcm_v0.1_2.yaml
+ properties:
+ availabilityzone_name: { get_param: availabilityzone_name }
+ security_group_name: { get_param: security_group_name }
+ pcm_vol: { get_param: [pcm_volumes, 0] }
+ cps_net_name: { get_param: cps_net_name }
+ cps_net_ip: { get_param: [cps_net_ips, 0] }
+ cps_net_mask: { get_param: cps_net_mask }
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/nested-pcm_v0.1.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/nested-pcm_v0.1.yaml
new file mode 100644
index 0000000000..109bf86d24
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/nested-pcm_v0.1.yaml
@@ -0,0 +1,114 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Cluman stack
+
+parameters:
+ pcm_server_name:
+ type: string
+ label: PCRF CM server name
+ description: PCRF CM server name
+ pcm_image_name:
+ type: string
+ label: image name
+ description: PCRF CM image name
+ pcm_flavor_name:
+ type: string
+ label: PCRF CM flavor name
+ description: flavor name of PCRF CM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ oam_net_name:
+ type: string
+ label: OAM network name
+ description: OAM network name
+ oam_net_ip:
+ type: string
+ label: OAM network ip
+ description: OAM network ip
+ oam_net_gw:
+ type: string
+ label: CPS network gateway
+ description: CPS network gateway
+ oam_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcm_vol:
+ type: string
+ label: CPS Cluman Cinder Volume
+ description: CPS Cluman Cinder Volume
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+
+resources:
+ network:
+ type: net
+ script_init:
+ type: OS:INIT
+ server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ server_pcm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcm_server_name }
+ image: { get_param: pcm_image_name }
+ flavor: { get_param: pcm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcm_port_0}
+ - port: { get_resource: pcm_port_1}
+ block_device_mapping:
+ - device_name: vdb
+ volume_id: { get_param: pcm_vol}
+ user_data_format: RAW
+ user_data:
+ get_resource: server_init
+
+ pcm_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: cps_net_ip }
+ security_groups: [{ get_param: security_group_name }]
+
+ pcm_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips:
+ - ip_address: { get_param: oam_net_ip }
+ security_groups: [{ get_param: security_group_name }]
+
+ #pcm_vol_attachment:
+ # type: OS:: Cinder::VolumeAttachment
+ # properties:
+ # volume_id: { get_param: pcm_vol }
+ # mountpoint: /dev/vdb
+ # instance_uuid: { get_resource: server_pcm }
+outputs:
+ server_pcm_id:
+ description: the pcm nova service id
+ value: { get_resource: server_pcm } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/nested-pcm_v0.1_2.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/nested-pcm_v0.1_2.yaml
new file mode 100644
index 0000000000..3f117a8410
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/nested-pcm_v0.1_2.yaml
@@ -0,0 +1,120 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Cluman stack
+
+parameters:
+ pcm_server_name:
+ type: string
+ label: PCRF CM server name
+ description: PCRF CM server name
+ pcm_image_name:
+ type: string
+ label: image name
+ description: PCRF CM image name
+ pcm_flavor_name:
+ type: string
+ label: PCRF CM flavor name
+ description: flavor name of PCRF CM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcm_vol:
+ type: string
+ label: CPS Cluman Cinder Volume
+ description: CPS Cluman Cinder Volume
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ oam_net_name:
+ type: string
+ label: OAM network name
+ description: OAM network name
+ oam_net_ip:
+ type: string
+resources:
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: "file:///nimbus-ethernet" }
+ params:
+ $dev: eth0
+ $ip: { get_param: cps_net_ip }
+ $netmask: { get_param: cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+ - ifdown eth1 && ifup eth1
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ server_pcm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcm_server_name }
+ image: { get_param: pcm_image_name }
+ flavor: { get_param: pcm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcm_port_0}
+ - port: { get_resource: pcm_port_1}
+ block_device_mapping:
+ - device_name: vdb
+ volume_id: { get_param: pcm_vol}
+ user_data_format: RAW
+ user_data:
+ get_resource: server_init
+
+ pcm_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: cps_net_ip }
+ security_groups: [{ get_param: security_group_name }]
+
+ pcm_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips:
+ - ip_address: { get_param: oam_net_ip }
+ security_groups: [{ get_param: security_group_name }]
+
+ #pcm_vol_attachment:
+ # type: OS:: Cinder::VolumeAttachment
+ # properties:
+ # volume_id: { get_param: pcm_vol }
+ # mountpoint: /dev/vdb
+ # instance_uuid: { get_resource: server_pcm }
+outputs:
+ server_pcm_id:
+ description: the pcm nova service id
+ value: { get_resource: server_pcm } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/nimbus-ethernet b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/nimbus-ethernet
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/nimbus-ethernet
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..1b1c4dd621
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,166 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ vf_module_id:
+ type: string
+ description: Unique ID for this VF_MODULE instance
+ vf_name:
+ type: string
+ description: The VF Name; defaults to VMVM for the virtual MVM VNF.
+ constraints:
+ - pattern: '[a-zA-Z0-9]+'
+ - max_length: 4
+ - min_length: 4
+ cloud_zone_id:
+ type: string
+ description: The cloud zone for this VF instance
+ vf_instance_num:
+ type: string
+ description: The number for this VF instance
+ constraints:
+ - pattern: '[0-9]+'
+ - max_length: 2
+ - min_length: 2
+ virtual_mgmt_ip_0:
+ type: string
+ description: Virtual management network ip address
+ indx:
+ type: float
+ description: Index of the current instance
+ mvs_mgmt_ip_0:
+ type: list
+ description: List of Management network IP addresses for IPv4
+ entry_schema:
+ type: string
+ flavor:
+ type: string
+ description: Server flavor
+ constraints: [
+ ]
+ key_name:
+ type: string
+ description: SSH key name
+ constraints: [
+ ]
+ vnf_id:
+ type: string
+ description: Unique ID for this VF instance
+ availability_zone_0:
+ type: list
+ description: List of Availability Zone IDs or Names
+ entry_schema:
+ type: string
+ mgmt_net_id:
+ type: string
+ description: Neutron UUID for the Management network
+ constraints: [
+ ]
+ vm_instance_num:
+ type: list
+ description: VM instance number list must be a list of three-digit numeric value
+ entry_schema:
+ type: string
+ bootimage:
+ type: string
+ description: Master bootimage volume id
+ sec_groups:
+ type: list
+ description: Security groups
+ entry_schema:
+ type: string
+ vf_component:
+ type: string
+ description: The component that this VF instance is running
+ constraints:
+ - pattern: '[a-zA-Z0-9]+'
+ - max_length: 3
+ - min_length: 3
+ requirements:
+ - local_storage_vnfci:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_mgmt_port:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ os_vnfci:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_mgmt_port:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_vnfci:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_vnfci:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_vnfci:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_boot_volume:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_vnfci:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_data_volume:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..ffddcce43c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,240 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ vf_module_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VF_MODULE instance
+ vf_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: The VF Name; defaults to VMVM for the virtual MVM VNF.
+ constraints:
+ - pattern: '[a-zA-Z0-9]+'
+ - max_length: 4
+ - min_length: 4
+ cloud_zone_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: The cloud zone for this VF instance
+ vf_instance_num:
+ hidden: false
+ immutable: false
+ type: string
+ description: The number for this VF instance
+ constraints:
+ - pattern: '[0-9]+'
+ - max_length: 2
+ - min_length: 2
+ virtual_mgmt_ip_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: Virtual management network ip address
+ mvs_mgmt_ip_0:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of Management network IP addresses for IPv4
+ entry_schema:
+ type: string
+ flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Server flavor
+ constraints: [
+ ]
+ key_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: SSH key name
+ constraints: [
+ ]
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VF instance
+ availability_zone_0:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of Availability Zone IDs or Names
+ entry_schema:
+ type: string
+ mgmt_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Neutron UUID for the Management network
+ constraints: [
+ ]
+ vm_instance_num:
+ hidden: false
+ immutable: false
+ type: list
+ description: VM instance number list must be a list of three-digit numeric value
+ entry_schema:
+ type: string
+ bootimage:
+ hidden: false
+ immutable: false
+ type: string
+ description: Master bootimage volume id
+ sec_groups:
+ hidden: false
+ immutable: false
+ type: list
+ description: Security groups
+ entry_schema:
+ type: string
+ vf_component:
+ hidden: false
+ immutable: false
+ type: string
+ description: The component that this VF instance is running
+ constraints:
+ - pattern: '[a-zA-Z0-9]+'
+ - max_length: 3
+ - min_length: 3
+ num_instances:
+ hidden: false
+ immutable: false
+ type: float
+ description: number of instance of the VF_module
+ node_templates:
+ mvs_modules:
+ type: org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat
+ directives:
+ - substitutable
+ properties:
+ vf_module_id:
+ get_input: vf_module_id
+ vf_name:
+ get_input: vf_name
+ cloud_zone_id:
+ get_input: cloud_zone_id
+ vf_instance_num:
+ get_input: vf_instance_num
+ virtual_mgmt_ip_0:
+ get_input: virtual_mgmt_ip_0
+ indx:
+ get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ mvs_mgmt_ip_0:
+ get_input: mvs_mgmt_ip_0
+ flavor:
+ get_input: flavor
+ key_name:
+ get_input: key_name
+ service_template_filter:
+ substitute_service_template: mvs.nested.heatServiceTemplate.yaml
+ count:
+ get_input: num_instances
+ mandatory: false
+ vnf_id:
+ get_input: vnf_id
+ availability_zone_0:
+ get_input: availability_zone_0
+ mgmt_net_id:
+ get_input: mgmt_net_id
+ vm_instance_num:
+ get_input: vm_instance_num
+ bootimage:
+ get_input: bootimage
+ sec_groups:
+ get_input: sec_groups
+ vf_component:
+ get_input: vf_component
+ mvs_modules_same_nested_heat_file_no_count:
+ type: org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat
+ directives:
+ - substitutable
+ properties:
+ vf_module_id:
+ get_input: vf_module_id
+ vf_name:
+ get_input: vf_name
+ cloud_zone_id:
+ get_input: cloud_zone_id
+ vf_instance_num:
+ get_input: vf_instance_num
+ virtual_mgmt_ip_0:
+ get_input: virtual_mgmt_ip_0
+ indx:
+ get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ mvs_mgmt_ip_0:
+ get_input: mvs_mgmt_ip_0
+ flavor:
+ get_input: flavor
+ key_name:
+ get_input: key_name
+ service_template_filter:
+ substitute_service_template: mvs.nested.heatServiceTemplate.yaml
+ count: 1
+ mandatory: true
+ vnf_id:
+ get_input: vnf_id
+ availability_zone_0:
+ get_input: availability_zone_0
+ mgmt_net_id:
+ get_input: mgmt_net_id
+ vm_instance_num:
+ get_input: vm_instance_num
+ bootimage:
+ get_input: bootimage
+ sec_groups:
+ get_input: sec_groups
+ vf_component:
+ get_input: vf_component
+ groups:
+ mvs.vfmodule.heat:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/mvs.vfmodule.heat.yaml
+ description: |
+ Metaswitch MVS (Metaview Server)
+ members:
+ - mvs_modules
+ - mvs_modules_same_nested_heat_file_no_count \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml
new file mode 100644
index 0000000000..315318d4f6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml
@@ -0,0 +1,320 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: mvs.nested.heat
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.vnfci:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ vf_module_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VF_MODULE instance
+ vf_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: The VF Name; defaults to VMVM for the virtual MVM VNF.
+ constraints:
+ - pattern: '[a-zA-Z0-9]+'
+ - max_length: 4
+ - min_length: 4
+ cloud_zone_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: The cloud zone for this VF instance
+ vf_instance_num:
+ hidden: false
+ immutable: false
+ type: string
+ description: The number for this VF instance
+ constraints:
+ - pattern: '[0-9]+'
+ - max_length: 2
+ - min_length: 2
+ virtual_mgmt_ip_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: Virtual management network ip address
+ indx:
+ hidden: false
+ immutable: false
+ type: float
+ description: Index of the current instance
+ mvs_mgmt_ip_0:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of Management network IP addresses for IPv4
+ entry_schema:
+ type: string
+ flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Server flavor
+ constraints: [
+ ]
+ key_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: SSH key name
+ constraints: [
+ ]
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VF instance
+ availability_zone_0:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of Availability Zone IDs or Names
+ entry_schema:
+ type: string
+ mgmt_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Neutron UUID for the Management network
+ constraints: [
+ ]
+ vm_instance_num:
+ hidden: false
+ immutable: false
+ type: list
+ description: VM instance number list must be a list of three-digit numeric value
+ entry_schema:
+ type: string
+ bootimage:
+ hidden: false
+ immutable: false
+ type: string
+ description: Master bootimage volume id
+ sec_groups:
+ hidden: false
+ immutable: false
+ type: list
+ description: Security groups
+ entry_schema:
+ type: string
+ vf_component:
+ hidden: false
+ immutable: false
+ type: string
+ description: The component that this VF instance is running
+ constraints:
+ - pattern: '[a-zA-Z0-9]+'
+ - max_length: 3
+ - min_length: 3
+ node_templates:
+ boot_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ availability_zone:
+ Fn::Select:
+ - get_input: indx
+ - get_input:
+ - availability_zone_0
+ image:
+ get_input: bootimage
+ size: 35*1024
+ name:
+ str_replace:
+ template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-boot-volume
+ params:
+ $VF_NAME:
+ get_input: vf_name
+ $CLOUD_ZONE_ID:
+ get_input: cloud_zone_id
+ $VM_INSTANCE_NUM:
+ Fn::Select:
+ - get_input: indx
+ - get_input:
+ - vm_instance_num
+ $VF_COMPONENT:
+ get_input: vf_component
+ $VF_INSTANCE_NUM:
+ get_input: vf_instance_num
+ vnfci:
+ type: org.openecomp.resource.vfc.nodes.heat.vnfci
+ properties:
+ flavor:
+ get_input: flavor
+ key_name:
+ get_input: key_name
+ availability_zone:
+ Fn::Select:
+ - get_input: indx
+ - get_input:
+ - availability_zone_0
+ name:
+ str_replace:
+ template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM
+ params:
+ $VF_NAME:
+ get_input: vf_name
+ $CLOUD_ZONE_ID:
+ get_input: cloud_zone_id
+ $VM_INSTANCE_NUM:
+ Fn::Select:
+ - get_input: indx
+ - get_input:
+ - vm_instance_num
+ $VF_COMPONENT:
+ get_input: vf_component
+ $VF_INSTANCE_NUM:
+ get_input: vf_instance_num
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: boot_volume
+ relationship: tosca.relationships.AttachesTo
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: data_volume
+ relationship: tosca.relationships.AttachesTo
+ data_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ availability_zone:
+ Fn::Select:
+ - get_input: indx
+ - get_input:
+ - availability_zone_0
+ size: 265*1024
+ name:
+ str_replace:
+ template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-data-volume
+ params:
+ $VF_NAME:
+ get_input: vf_name
+ $CLOUD_ZONE_ID:
+ get_input: cloud_zone_id
+ $VM_INSTANCE_NUM:
+ Fn::Select:
+ - get_input: indx
+ - get_input:
+ - vm_instance_num
+ $VF_COMPONENT:
+ get_input: vf_component
+ $VF_INSTANCE_NUM:
+ get_input: vf_instance_num
+ mgmt_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: sec_groups
+ fixed_ips:
+ - ip_address:
+ Fn::Select:
+ - get_input: indx
+ - get_input:
+ - get_input: mvs_mgmt_ip_0
+ allowed_address_pairs:
+ - ip_address:
+ get_input: virtual_mgmt_ip_0
+ name:
+ str_replace:
+ template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-mgmt-port
+ params:
+ $VF_NAME:
+ get_input: vf_name
+ $CLOUD_ZONE_ID:
+ get_input: cloud_zone_id
+ $VM_INSTANCE_NUM:
+ Fn::Select:
+ - get_input: indx
+ - get_input:
+ - vm_instance_num
+ $VF_COMPONENT:
+ get_input: vf_component
+ $VF_INSTANCE_NUM:
+ get_input: vf_instance_num
+ network:
+ get_input: mgmt_net_id
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: vnfci
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ mvs.nested.heat:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/mvs.nested.heat.yaml
+ description: |
+ Metaswitch MVS (Metaview Server)
+ members:
+ - boot_volume
+ - vnfci
+ - data_volume
+ - mgmt_port
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat
+ capabilities:
+ os_vnfci:
+ - vnfci
+ - os
+ attachment_mgmt_port:
+ - mgmt_port
+ - attachment
+ endpoint_vnfci:
+ - vnfci
+ - endpoint
+ host_vnfci:
+ - vnfci
+ - host
+ binding_vnfci:
+ - vnfci
+ - binding
+ attachment_boot_volume:
+ - boot_volume
+ - attachment
+ scalable_vnfci:
+ - vnfci
+ - scalable
+ attachment_data_volume:
+ - data_volume
+ - attachment
+ requirements:
+ local_storage_vnfci:
+ - vnfci
+ - local_storage
+ link_mgmt_port:
+ - mgmt_port
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/inputs/MANIFEST.json
new file mode 100644
index 0000000000..c7729c8653
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/inputs/MANIFEST.json
@@ -0,0 +1,19 @@
+{
+ "name": "mvs.vfmodule.heat.yaml",
+ "description": "Metaswitch MVS (Metaview Server)",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "mvs.vfmodule.heat.yaml",
+ "type": "HEAT",
+ "data": [
+ ]
+ },
+ {
+ "file": "mvs.nested.heat.yaml",
+ "type": "HEAT",
+ "data": [
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/inputs/mvs.nested.heat.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/inputs/mvs.nested.heat.yaml
new file mode 100644
index 0000000000..8ddc5c6488
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/inputs/mvs.nested.heat.yaml
@@ -0,0 +1,165 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Metaswitch MVS (Metaview Server)
+
+parameters:
+ cloud_zone_id:
+ type: string
+ description: The cloud zone for this VF instance
+ vf_name:
+ type: string
+ description: The VF Name; defaults to VMVM for the virtual MVM VNF.
+ constraints:
+ - allowed_pattern: "[a-zA-Z0-9]+"
+ - length: { min: 4, max: 4 }
+ description: Each VF will have a 4-character alphanumeric identifier
+ vf_instance_num:
+ type: string
+ description: The number for this VF instance
+ constraints:
+ - allowed_pattern: "[0-9]+"
+ - length: { min: 2, max: 2 }
+ description: VF instance number must be a two-digit numeric value
+ vf_component:
+ type: string
+ description: The component that this VF instance is running
+ constraints:
+ - allowed_pattern: "[a-zA-Z0-9]+"
+ - length: { min: 3, max: 3 }
+ description: Each VF component will have a 3-character alphanumeric identifier
+ vm_instance_num:
+ type: comma_delimited_list
+ description: VM instance number list must be a list of three-digit numeric value
+ vnf_id:
+ type: string
+ description: Unique ID for this VF instance
+ vf_module_id:
+ type: string
+ description: Unique ID for this VF_MODULE instance
+ bootimage:
+ type: string
+ description: Master bootimage volume id
+ flavor:
+ type: string
+ description: Server flavor
+ constraints:
+ - custom_constraint: nova.flavor
+ key_name:
+ type: string
+ description: SSH key name
+ constraints:
+ - custom_constraint: nova.keypair
+
+ availability_zone_0:
+ type: comma_delimited_list
+ description: List of Availability Zone IDs or Names
+
+ sec_groups:
+ type: comma_delimited_list
+ description: Security groups
+ mgmt_net_id:
+ type: string
+ description: Neutron UUID for the Management network
+ constraints:
+ - custom_constraint: neutron.network
+ virtual_mgmt_ip_0:
+ type: string
+ description: Virtual management network ip address
+
+ mvs_mgmt_ip_0:
+ type: comma_delimited_list
+ description: List of Management network IP addresses for IPv4
+
+ indx:
+ type: number
+ description: Index of the current instance
+
+resources:
+ mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ name:
+ str_replace:
+ template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-mgmt-port
+ params:
+ $CLOUD_ZONE_ID: { get_param: cloud_zone_id }
+ $VF_NAME: { get_param: vf_name }
+ $VF_INSTANCE_NUM: { get_param: vf_instance_num }
+ $VF_COMPONENT: { get_param: vf_component }
+ $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] }
+ network_id: { get_param: mgmt_net_id }
+ security_groups: [{ get_param: sec_groups }]
+
+ fixed_ips:
+ - ip_address: { "Fn::Select" : [ { get_param: indx }, { get_param: [{ get_param: mvs_mgmt_ip_0 }] } ] }
+
+ allowed_address_pairs:
+ - ip_address: { get_param: virtual_mgmt_ip_0 }
+
+ boot_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: 35
+ name:
+ str_replace:
+ template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-boot-volume
+ params:
+ $CLOUD_ZONE_ID: { get_param: cloud_zone_id }
+ $VF_NAME: { get_param: vf_name }
+ $VF_INSTANCE_NUM: { get_param: vf_instance_num }
+ $VF_COMPONENT: { get_param: vf_component }
+ $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] }
+
+ image: { get_param: bootimage }
+
+
+ availability_zone: { "Fn::Select" : [ { get_param: indx }, { get_param: [availability_zone_0] } ] }
+
+
+ data_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: 265
+ name:
+ str_replace:
+ template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-data-volume
+ params:
+ $CLOUD_ZONE_ID: { get_param: cloud_zone_id }
+ $VF_NAME: { get_param: vf_name }
+ $VF_INSTANCE_NUM: { get_param: vf_instance_num }
+ $VF_COMPONENT: { get_param: vf_component }
+ $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] }
+
+ availability_zone: { "Fn::Select" : [ { get_param: indx }, { get_param: [availability_zone_0] } ] }
+
+
+ vnfci:
+ type: OS::Nova::Server
+ properties:
+ name:
+ str_replace:
+ template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM
+ params:
+ $CLOUD_ZONE_ID: { get_param: cloud_zone_id }
+ $VF_NAME: { get_param: vf_name }
+ $VF_INSTANCE_NUM: { get_param: vf_instance_num }
+ $VF_COMPONENT: { get_param: vf_component }
+ $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] }
+ block_device_mapping:
+ - device_name: vda
+ volume_id: { get_resource: boot_volume }
+ delete_on_termination: false
+ - device_name: vdb
+ volume_id: { get_resource: data_volume }
+ delete_on_termination: false
+ flavor: { get_param: flavor }
+ key_name: { get_param: key_name }
+ networks:
+ - port: { get_resource: mgmt_port }
+
+ availability_zone: { "Fn::Select" : [ { get_param: indx }, { get_param: [availability_zone_0] } ] }
+
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/inputs/mvs.vfmodule.heat.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/inputs/mvs.vfmodule.heat.yaml
new file mode 100644
index 0000000000..55c98053a4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/inputs/mvs.vfmodule.heat.yaml
@@ -0,0 +1,158 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Metaswitch MVS (Metaview Server)
+
+parameters:
+ cloud_zone_id:
+ type: string
+ description: The cloud zone for this VF instance
+ vf_name:
+ type: string
+ description: The VF Name; defaults to VMVM for the virtual MVM VNF.
+ constraints:
+ - allowed_pattern: "[a-zA-Z0-9]+"
+ - length: { min: 4, max: 4 }
+ description: Each VF will have a 4-character alphanumeric identifier
+ vf_instance_num:
+ type: string
+ description: The number for this VF instance
+ constraints:
+ - allowed_pattern: "[0-9]+"
+ - length: { min: 2, max: 2 }
+ description: VF instance number must be a two-digit numeric value
+ vf_component:
+ type: string
+ description: The component that this VF instance is running
+ constraints:
+ - allowed_pattern: "[a-zA-Z0-9]+"
+ - length: { min: 3, max: 3 }
+ description: Each VF component will have a 3-character alphanumeric identifier
+ vm_instance_num:
+ type: comma_delimited_list
+ description: VM instance number list must be a list of three-digit numeric value
+ vnf_id:
+ type: string
+ description: Unique ID for this VF instance
+ vf_module_id:
+ type: string
+ description: Unique ID for this VF_MODULE instance
+ bootimage:
+ type: string
+ description: Master bootimage volume id
+ flavor:
+ type: string
+ description: Server flavor
+ constraints:
+ - custom_constraint: nova.flavor
+ key_name:
+ type: string
+ description: SSH key name
+ constraints:
+ - custom_constraint: nova.keypair
+
+ availability_zone_0:
+ type: comma_delimited_list
+ description: List of Availability Zone IDs or Names
+
+ sec_groups:
+ type: comma_delimited_list
+ description: Security groups
+ mgmt_net_id:
+ type: string
+ description: Neutron UUID for the Management network
+ constraints:
+ - custom_constraint: neutron.network
+ virtual_mgmt_ip_0:
+ type: string
+ description: Virtual management network ip address
+
+ mvs_mgmt_ip_0:
+ type: comma_delimited_list
+ description: List of Management network IP addresses for IPv4
+
+ num_instances:
+ type: number
+ description: number of instance of the VF_module
+
+resources:
+ mvs_modules:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: { get_param: num_instances }
+ resource_def:
+ type: mvs.nested.heat.yaml
+ properties:
+ cloud_zone_id: { get_param: cloud_zone_id }
+ vf_name: { get_param: vf_name }
+ vf_instance_num: { get_param: vf_instance_num }
+ vf_component: { get_param: vf_component }
+ vm_instance_num: { get_param: vm_instance_num }
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ bootimage: { get_param: bootimage }
+ flavor: { get_param: flavor }
+ key_name: { get_param: key_name }
+
+ availability_zone_0: { get_param: availability_zone_0 }
+
+ sec_groups: { get_param: sec_groups }
+ mgmt_net_id: { get_param: mgmt_net_id }
+ virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 }
+
+ mvs_mgmt_ip_0: { get_param: mvs_mgmt_ip_0 }
+
+ indx: "%index%"
+ mvs_modules_same_nested_heat_file_no_count:
+ type: OS::Heat::ResourceGroup
+ properties:
+ resource_def:
+ type: mvs.nested.heat.yaml
+ properties:
+ cloud_zone_id: { get_param: cloud_zone_id }
+ vf_name: { get_param: vf_name }
+ vf_instance_num: { get_param: vf_instance_num }
+ vf_component: { get_param: vf_component }
+ vm_instance_num: { get_param: vm_instance_num }
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ bootimage: { get_param: bootimage }
+ flavor: { get_param: flavor }
+ key_name: { get_param: key_name }
+
+ availability_zone_0: { get_param: availability_zone_0 }
+
+ sec_groups: { get_param: sec_groups }
+ mgmt_net_id: { get_param: mgmt_net_id }
+ virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 }
+
+ mvs_mgmt_ip_0: { get_param: mvs_mgmt_ip_0 }
+
+ indx: "%index%"
+ shouldnt_get_translated:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: { get_param: num_instances }
+ resource_def:
+ type: OS::Nova::Server
+ properties:
+ cloud_zone_id: { get_param: cloud_zone_id }
+ vf_name: { get_param: vf_name }
+ vf_instance_num: { get_param: vf_instance_num }
+ vf_component: { get_param: vf_component }
+ vm_instance_num: { get_param: vm_instance_num }
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ bootimage: { get_param: bootimage }
+ flavor: { get_param: flavor }
+ key_name: { get_param: key_name }
+
+ availability_zone_0: { get_param: availability_zone_0 }
+
+ sec_groups: { get_param: sec_groups }
+ mgmt_net_id: { get_param: mgmt_net_id }
+ virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 }
+
+ mvs_mgmt_ip_0: { get_param: mvs_mgmt_ip_0 }
+
+ indx: "%index%" \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..e5cffd7233
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,267 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.nested:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ cmaui_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p2:
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ availability_zone_0:
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ type: string
+ description: cmaui_port_1
+ net:
+ type: string
+ description: UID of OAM network
+ shared_security_group_id1:
+ type: string
+ description: UID of OAM network
+ requirements:
+ - link_cmaui_port_2:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_cmaui_port_11_test_nested2:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_cmaui_port_22_test_nested2:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_server_cmaui_test_nested2:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - local_storage_server_cmaui:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_cmaui_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ os_server_cmaui:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_cmaui:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_11_test_nested2:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_2:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui_test_nested2:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_cmaui_test_nested2:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui_test_nested2:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui_test_nested2:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui_test_nested2:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_22_test_nested2:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_1:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ org.openecomp.resource.abstract.nodes.heat.nested2level:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ cmaui_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p2:
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ availability_zone_0:
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ type: string
+ description: cmaui_port_1
+ net:
+ type: string
+ description: UID of OAM network
+ shared_security_group_id1:
+ type: string
+ description: UID of OAM network
+ requirements:
+ - link_cmaui_port_11:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_cmaui_port_22:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_server_cmaui:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ capabilities:
+ host_server_cmaui:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_11:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_22:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..b619c99256
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,241 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ shared_security_group_id2:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ jsa_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ shared_security_group_id1:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ node_templates:
+ jsa_security_group1:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules
+ properties:
+ name:
+ get_input: security_group_name
+ description: ems security group
+ rules:
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: ingress
+ requirements:
+ - port:
+ capability: attachment_cmaui_port_2
+ node: test_nested
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: attachment_cmaui_port_1
+ node: test_nested
+ relationship: org.openecomp.relationships.AttachesTo
+ jsa_security_group2:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules
+ properties:
+ name:
+ get_input: security_group_name
+ description: ems security group
+ rules:
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: ingress
+ requirements:
+ - port:
+ capability: attachment_cmaui_port_1
+ node: test_nested
+ relationship: org.openecomp.relationships.AttachesTo
+ test_nested:
+ type: org.openecomp.resource.abstract.nodes.heat.nested
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nestedServiceTemplate.yaml
+ p2:
+ get_input: shared_security_group_id2
+ shared_security_group_id1:
+ get_input: shared_security_group_id1
+ groups:
+ addOn:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/addOn.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - test_nested
+ base:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/base.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - jsa_security_group1
+ - jsa_security_group2 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/nested2levelServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/nested2levelServiceTemplate.yaml
new file mode 100644
index 0000000000..e26b5c6c18
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/nested2levelServiceTemplate.yaml
@@ -0,0 +1,175 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested2level
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p2:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ description: cmaui_port_1
+ net:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ shared_security_group_id1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ node_templates:
+ cmaui_port_11:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: shared_security_group_id1
+ - get_input: p2
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: net
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ cmaui_port_22:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: shared_security_group_id1
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: net
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ groups:
+ nested2level:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested2level.yml
+ description: cmaui server template for vMMSC
+ members:
+ - cmaui_port_11
+ - cmaui_port_22
+ - server_cmaui
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested2level
+ capabilities:
+ host_server_cmaui:
+ - server_cmaui
+ - host
+ os_server_cmaui:
+ - server_cmaui
+ - os
+ attachment_cmaui_port_11:
+ - cmaui_port_11
+ - attachment
+ attachment_cmaui_port_22:
+ - cmaui_port_22
+ - attachment
+ endpoint_server_cmaui:
+ - server_cmaui
+ - endpoint
+ binding_server_cmaui:
+ - server_cmaui
+ - binding
+ scalable_server_cmaui:
+ - server_cmaui
+ - scalable
+ requirements:
+ local_storage_server_cmaui:
+ - server_cmaui
+ - local_storage
+ link_cmaui_port_11:
+ - cmaui_port_11
+ - link
+ link_cmaui_port_22:
+ - cmaui_port_22
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/nestedServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/nestedServiceTemplate.yaml
new file mode 100644
index 0000000000..8001ba9d7d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/nestedServiceTemplate.yaml
@@ -0,0 +1,217 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p2:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ description: cmaui_port_1
+ net:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ shared_security_group_id1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ node_templates:
+ cmaui_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: shared_security_group_id1
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: net
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ test_nested2:
+ type: org.openecomp.resource.abstract.nodes.heat.nested2level
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nested2levelServiceTemplate.yaml
+ p2:
+ get_input: p2
+ shared_security_group_id1:
+ get_input: shared_security_group_id1
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ cmaui_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: shared_security_group_id1
+ - get_input: p2
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: net
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested.yml
+ description: cmaui server template for vMMSC
+ members:
+ - cmaui_port_2
+ - test_nested2
+ - server_cmaui
+ - cmaui_port_1
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested
+ capabilities:
+ os_server_cmaui:
+ - server_cmaui
+ - os
+ scalable_server_cmaui:
+ - server_cmaui
+ - scalable
+ host_server_cmaui:
+ - server_cmaui
+ - host
+ endpoint_server_cmaui:
+ - server_cmaui
+ - endpoint
+ attachment_cmaui_port_11_test_nested2:
+ - test_nested2
+ - attachment_cmaui_port_11
+ binding_server_cmaui:
+ - server_cmaui
+ - binding
+ attachment_cmaui_port_2:
+ - cmaui_port_2
+ - attachment
+ endpoint_server_cmaui_test_nested2:
+ - test_nested2
+ - endpoint_server_cmaui
+ host_server_cmaui_test_nested2:
+ - test_nested2
+ - host_server_cmaui
+ binding_server_cmaui_test_nested2:
+ - test_nested2
+ - binding_server_cmaui
+ scalable_server_cmaui_test_nested2:
+ - test_nested2
+ - scalable_server_cmaui
+ os_server_cmaui_test_nested2:
+ - test_nested2
+ - os_server_cmaui
+ attachment_cmaui_port_22_test_nested2:
+ - test_nested2
+ - attachment_cmaui_port_22
+ attachment_cmaui_port_1:
+ - cmaui_port_1
+ - attachment
+ requirements:
+ local_storage_server_cmaui_test_nested2:
+ - test_nested2
+ - local_storage_server_cmaui
+ local_storage_server_cmaui:
+ - server_cmaui
+ - local_storage
+ link_cmaui_port_22_test_nested2:
+ - test_nested2
+ - link_cmaui_port_22
+ link_cmaui_port_2:
+ - cmaui_port_2
+ - link
+ link_cmaui_port_11_test_nested2:
+ - test_nested2
+ - link_cmaui_port_11
+ link_cmaui_port_1:
+ - cmaui_port_1
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/MANIFEST.json
new file mode 100644
index 0000000000..992097af43
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "base.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ },
+ {
+ "file": "nested.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ },
+ {
+ "file": "nested2level.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ },
+ {
+ "file": "addOn.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/addOn.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/addOn.yml
new file mode 100644
index 0000000000..0e7619a478
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/addOn.yml
@@ -0,0 +1,26 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ shared_security_group_id1:
+ type: string
+ description: network name of jsa log network
+ shared_security_group_id2:
+ type: string
+ description: network name of jsa log network
+ jsa_net_name:
+ type: string
+ description: network name of jsa log network
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+
+resources:
+ test_nested:
+ type: nested.yml
+ properties:
+ shared_security_group_id1: { get_param: shared_security_group_id1}
+ p2: { get_param: shared_security_group_id2}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/base.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/base.yml
new file mode 100644
index 0000000000..9167ffbafd
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/base.yml
@@ -0,0 +1,58 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ jsa_net_name:
+ type: string
+ description: network name of jsa log network
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+
+resources:
+ jsa_security_group1:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: ems security group
+ name: {get_param: security_group_name}
+ rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"}
+ ]
+
+ jsa_security_group2:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: ems security group
+ name: {get_param: security_group_name}
+ rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"}
+ ]
+outputs:
+ shared_security_group_id1:
+ value: {get_resource: jsa_security_group1}
+
+ shared_security_group_id2:
+ value: {get_resource: jsa_security_group2}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/nested.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/nested.yml
new file mode 100644
index 0000000000..b202fef7b0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/nested.yml
@@ -0,0 +1,65 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ shared_security_group_id1:
+ type: string
+ description: UID of OAM network
+ p2:
+ type: string
+ description: UID of OAM network
+ net:
+ type: string
+ description: UID of OAM network
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+ description: cmaui_port_1
+
+resources:
+
+ cmaui_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: net }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: shared_security_group_id1}, {get_param: p2}]
+ replacement_policy: AUTO
+
+ cmaui_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: net }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: shared_security_group_id1}]
+ replacement_policy: AUTO
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_1 }
+ - port: { get_resource: cmaui_port_2 }
+
+ test_nested2:
+ type: nested2level.yml
+ properties:
+ shared_security_group_id1: { get_param: shared_security_group_id1}
+ p2: { get_param: p2} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/nested2level.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/nested2level.yml
new file mode 100644
index 0000000000..6a123d1641
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/nested2level.yml
@@ -0,0 +1,59 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ shared_security_group_id1:
+ type: string
+ description: UID of OAM network
+ p2:
+ type: string
+ description: UID of OAM network
+ net:
+ type: string
+ description: UID of OAM network
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+ description: cmaui_port_1
+
+resources:
+
+ cmaui_port_11:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: net }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: shared_security_group_id1}, {get_param: p2}]
+ replacement_policy: AUTO
+
+ cmaui_port_22:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: net }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: shared_security_group_id1}]
+ replacement_policy: AUTO
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_11 }
+ - port: { get_resource: cmaui_port_22 } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..9aaa8caf18
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,472 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.nested:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ cmaui_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p2:
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ availability_zone_0:
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ type: string
+ description: cmaui_port_1
+ net:
+ type: string
+ description: UID of OAM network
+ shared_security_group_id1:
+ type: string
+ description: UID of OAM network
+ requirements:
+ - link_cmaui_port_2:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_cmaui_port_11_test_nested2:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_cmaui_port_22_test_nested2:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_cmaui_port_11_test_nested3_test_nested2:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_cmaui_port_22_test_nested3_test_nested2:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_server_cmaui_test_nested3_test_nested2:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - local_storage_server_cmaui_test_nested2:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - local_storage_server_cmaui:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_cmaui_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ os_server_cmaui:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui_test_nested3_test_nested2:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui_test_nested3_test_nested2:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_cmaui_test_nested3_test_nested2:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_22_test_nested3_test_nested2:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_cmaui:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_11_test_nested3_test_nested2:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_11_test_nested2:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_2:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui_test_nested2:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui_test_nested3_test_nested2:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui_test_nested2:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_cmaui_test_nested2:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui_test_nested2:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui_test_nested2:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_22_test_nested2:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui_test_nested3_test_nested2:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_1:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ org.openecomp.resource.abstract.nodes.heat.nested3level:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ cmaui_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p2:
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ availability_zone_0:
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ type: string
+ description: cmaui_port_1
+ net:
+ type: string
+ description: UID of OAM network
+ shared_security_group_id1:
+ type: string
+ description: UID of OAM network
+ requirements:
+ - link_cmaui_port_11:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_cmaui_port_22:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_server_cmaui:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ capabilities:
+ host_server_cmaui:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_11:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_22:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ org.openecomp.resource.abstract.nodes.heat.nested2level:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ cmaui_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p2:
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ availability_zone_0:
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ type: string
+ description: cmaui_port_1
+ net:
+ type: string
+ description: UID of OAM network
+ shared_security_group_id1:
+ type: string
+ description: UID of OAM network
+ requirements:
+ - link_cmaui_port_11:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_cmaui_port_22:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_cmaui_port_11_test_nested3:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_cmaui_port_22_test_nested3:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_server_cmaui_test_nested3:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - local_storage_server_cmaui:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ capabilities:
+ os_server_cmaui:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_22_test_nested3:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_11_test_nested3:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_cmaui:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_11:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_22:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_cmaui_test_nested3:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui_test_nested3:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui_test_nested3:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui_test_nested3:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui_test_nested3:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..b619c99256
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,241 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ shared_security_group_id2:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ jsa_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ shared_security_group_id1:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ node_templates:
+ jsa_security_group1:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules
+ properties:
+ name:
+ get_input: security_group_name
+ description: ems security group
+ rules:
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: ingress
+ requirements:
+ - port:
+ capability: attachment_cmaui_port_2
+ node: test_nested
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: attachment_cmaui_port_1
+ node: test_nested
+ relationship: org.openecomp.relationships.AttachesTo
+ jsa_security_group2:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules
+ properties:
+ name:
+ get_input: security_group_name
+ description: ems security group
+ rules:
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: ingress
+ requirements:
+ - port:
+ capability: attachment_cmaui_port_1
+ node: test_nested
+ relationship: org.openecomp.relationships.AttachesTo
+ test_nested:
+ type: org.openecomp.resource.abstract.nodes.heat.nested
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nestedServiceTemplate.yaml
+ p2:
+ get_input: shared_security_group_id2
+ shared_security_group_id1:
+ get_input: shared_security_group_id1
+ groups:
+ addOn:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/addOn.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - test_nested
+ base:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/base.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - jsa_security_group1
+ - jsa_security_group2 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/nested2levelServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/nested2levelServiceTemplate.yaml
new file mode 100644
index 0000000000..2c64802a2b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/nested2levelServiceTemplate.yaml
@@ -0,0 +1,217 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested2level
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p2:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ description: cmaui_port_1
+ net:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ shared_security_group_id1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ node_templates:
+ cmaui_port_11:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: shared_security_group_id1
+ - get_input: p2
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: net
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ cmaui_port_22:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: shared_security_group_id1
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: net
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ test_nested3:
+ type: org.openecomp.resource.abstract.nodes.heat.nested3level
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nested3levelServiceTemplate.yaml
+ p2:
+ get_input: p2
+ shared_security_group_id1:
+ get_input: shared_security_group_id1
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ groups:
+ nested2level:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested2level.yml
+ description: cmaui server template for vMMSC
+ members:
+ - cmaui_port_11
+ - cmaui_port_22
+ - test_nested3
+ - server_cmaui
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested2level
+ capabilities:
+ os_server_cmaui:
+ - server_cmaui
+ - os
+ attachment_cmaui_port_22_test_nested3:
+ - test_nested3
+ - attachment_cmaui_port_22
+ attachment_cmaui_port_11_test_nested3:
+ - test_nested3
+ - attachment_cmaui_port_11
+ scalable_server_cmaui:
+ - server_cmaui
+ - scalable
+ host_server_cmaui:
+ - server_cmaui
+ - host
+ attachment_cmaui_port_11:
+ - cmaui_port_11
+ - attachment
+ attachment_cmaui_port_22:
+ - cmaui_port_22
+ - attachment
+ host_server_cmaui_test_nested3:
+ - test_nested3
+ - host_server_cmaui
+ endpoint_server_cmaui:
+ - server_cmaui
+ - endpoint
+ binding_server_cmaui:
+ - server_cmaui
+ - binding
+ endpoint_server_cmaui_test_nested3:
+ - test_nested3
+ - endpoint_server_cmaui
+ os_server_cmaui_test_nested3:
+ - test_nested3
+ - os_server_cmaui
+ binding_server_cmaui_test_nested3:
+ - test_nested3
+ - binding_server_cmaui
+ scalable_server_cmaui_test_nested3:
+ - test_nested3
+ - scalable_server_cmaui
+ requirements:
+ local_storage_server_cmaui_test_nested3:
+ - test_nested3
+ - local_storage_server_cmaui
+ local_storage_server_cmaui:
+ - server_cmaui
+ - local_storage
+ link_cmaui_port_11:
+ - cmaui_port_11
+ - link
+ link_cmaui_port_22:
+ - cmaui_port_22
+ - link
+ link_cmaui_port_22_test_nested3:
+ - test_nested3
+ - link_cmaui_port_22
+ link_cmaui_port_11_test_nested3:
+ - test_nested3
+ - link_cmaui_port_11 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/nested3levelServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/nested3levelServiceTemplate.yaml
new file mode 100644
index 0000000000..d270626fa7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/nested3levelServiceTemplate.yaml
@@ -0,0 +1,175 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested3level
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p2:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ description: cmaui_port_1
+ net:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ shared_security_group_id1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ node_templates:
+ cmaui_port_11:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: shared_security_group_id1
+ - get_input: p2
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: net
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ cmaui_port_22:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: shared_security_group_id1
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: net
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ groups:
+ nested3level:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested3level.yml
+ description: cmaui server template for vMMSC
+ members:
+ - cmaui_port_11
+ - cmaui_port_22
+ - server_cmaui
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested3level
+ capabilities:
+ host_server_cmaui:
+ - server_cmaui
+ - host
+ os_server_cmaui:
+ - server_cmaui
+ - os
+ attachment_cmaui_port_11:
+ - cmaui_port_11
+ - attachment
+ attachment_cmaui_port_22:
+ - cmaui_port_22
+ - attachment
+ endpoint_server_cmaui:
+ - server_cmaui
+ - endpoint
+ binding_server_cmaui:
+ - server_cmaui
+ - binding
+ scalable_server_cmaui:
+ - server_cmaui
+ - scalable
+ requirements:
+ local_storage_server_cmaui:
+ - server_cmaui
+ - local_storage
+ link_cmaui_port_11:
+ - cmaui_port_11
+ - link
+ link_cmaui_port_22:
+ - cmaui_port_22
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/nestedServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/nestedServiceTemplate.yaml
new file mode 100644
index 0000000000..d78a252f4f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/nestedServiceTemplate.yaml
@@ -0,0 +1,247 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p2:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ description: cmaui_port_1
+ net:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ shared_security_group_id1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ node_templates:
+ cmaui_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: shared_security_group_id1
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: net
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ test_nested2:
+ type: org.openecomp.resource.abstract.nodes.heat.nested2level
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nested2levelServiceTemplate.yaml
+ p2:
+ get_input: p2
+ shared_security_group_id1:
+ get_input: shared_security_group_id1
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ cmaui_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: shared_security_group_id1
+ - get_input: p2
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: net
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested.yml
+ description: cmaui server template for vMMSC
+ members:
+ - cmaui_port_2
+ - test_nested2
+ - server_cmaui
+ - cmaui_port_1
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested
+ capabilities:
+ os_server_cmaui:
+ - server_cmaui
+ - os
+ binding_server_cmaui_test_nested3_test_nested2:
+ - test_nested2
+ - binding_server_cmaui_test_nested3
+ scalable_server_cmaui_test_nested3_test_nested2:
+ - test_nested2
+ - scalable_server_cmaui_test_nested3
+ host_server_cmaui_test_nested3_test_nested2:
+ - test_nested2
+ - host_server_cmaui_test_nested3
+ scalable_server_cmaui:
+ - server_cmaui
+ - scalable
+ attachment_cmaui_port_22_test_nested3_test_nested2:
+ - test_nested2
+ - attachment_cmaui_port_22_test_nested3
+ host_server_cmaui:
+ - server_cmaui
+ - host
+ attachment_cmaui_port_11_test_nested3_test_nested2:
+ - test_nested2
+ - attachment_cmaui_port_11_test_nested3
+ endpoint_server_cmaui:
+ - server_cmaui
+ - endpoint
+ attachment_cmaui_port_11_test_nested2:
+ - test_nested2
+ - attachment_cmaui_port_11
+ binding_server_cmaui:
+ - server_cmaui
+ - binding
+ attachment_cmaui_port_2:
+ - cmaui_port_2
+ - attachment
+ endpoint_server_cmaui_test_nested2:
+ - test_nested2
+ - endpoint_server_cmaui
+ endpoint_server_cmaui_test_nested3_test_nested2:
+ - test_nested2
+ - endpoint_server_cmaui_test_nested3
+ scalable_server_cmaui_test_nested2:
+ - test_nested2
+ - scalable_server_cmaui
+ host_server_cmaui_test_nested2:
+ - test_nested2
+ - host_server_cmaui
+ binding_server_cmaui_test_nested2:
+ - test_nested2
+ - binding_server_cmaui
+ os_server_cmaui_test_nested2:
+ - test_nested2
+ - os_server_cmaui
+ attachment_cmaui_port_22_test_nested2:
+ - test_nested2
+ - attachment_cmaui_port_22
+ os_server_cmaui_test_nested3_test_nested2:
+ - test_nested2
+ - os_server_cmaui_test_nested3
+ attachment_cmaui_port_1:
+ - cmaui_port_1
+ - attachment
+ requirements:
+ local_storage_server_cmaui_test_nested2:
+ - test_nested2
+ - local_storage_server_cmaui
+ local_storage_server_cmaui:
+ - server_cmaui
+ - local_storage
+ link_cmaui_port_11_test_nested3_test_nested2:
+ - test_nested2
+ - link_cmaui_port_11_test_nested3
+ link_cmaui_port_22_test_nested2:
+ - test_nested2
+ - link_cmaui_port_22
+ link_cmaui_port_22_test_nested3_test_nested2:
+ - test_nested2
+ - link_cmaui_port_22_test_nested3
+ local_storage_server_cmaui_test_nested3_test_nested2:
+ - test_nested2
+ - local_storage_server_cmaui_test_nested3
+ link_cmaui_port_2:
+ - cmaui_port_2
+ - link
+ link_cmaui_port_11_test_nested2:
+ - test_nested2
+ - link_cmaui_port_11
+ link_cmaui_port_1:
+ - cmaui_port_1
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/MANIFEST.json
new file mode 100644
index 0000000000..ea06fcc95a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/MANIFEST.json
@@ -0,0 +1,32 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "base.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ },
+ {
+ "file": "nested.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ },
+ {
+ "file": "nested2level.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ },
+ {
+ "file": "nested3level.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ },
+ {
+ "file": "addOn.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/addOn.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/addOn.yml
new file mode 100644
index 0000000000..0e7619a478
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/addOn.yml
@@ -0,0 +1,26 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ shared_security_group_id1:
+ type: string
+ description: network name of jsa log network
+ shared_security_group_id2:
+ type: string
+ description: network name of jsa log network
+ jsa_net_name:
+ type: string
+ description: network name of jsa log network
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+
+resources:
+ test_nested:
+ type: nested.yml
+ properties:
+ shared_security_group_id1: { get_param: shared_security_group_id1}
+ p2: { get_param: shared_security_group_id2}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/base.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/base.yml
new file mode 100644
index 0000000000..9167ffbafd
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/base.yml
@@ -0,0 +1,58 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ jsa_net_name:
+ type: string
+ description: network name of jsa log network
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+
+resources:
+ jsa_security_group1:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: ems security group
+ name: {get_param: security_group_name}
+ rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"}
+ ]
+
+ jsa_security_group2:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: ems security group
+ name: {get_param: security_group_name}
+ rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"}
+ ]
+outputs:
+ shared_security_group_id1:
+ value: {get_resource: jsa_security_group1}
+
+ shared_security_group_id2:
+ value: {get_resource: jsa_security_group2}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/nested.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/nested.yml
new file mode 100644
index 0000000000..b202fef7b0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/nested.yml
@@ -0,0 +1,65 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ shared_security_group_id1:
+ type: string
+ description: UID of OAM network
+ p2:
+ type: string
+ description: UID of OAM network
+ net:
+ type: string
+ description: UID of OAM network
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+ description: cmaui_port_1
+
+resources:
+
+ cmaui_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: net }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: shared_security_group_id1}, {get_param: p2}]
+ replacement_policy: AUTO
+
+ cmaui_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: net }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: shared_security_group_id1}]
+ replacement_policy: AUTO
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_1 }
+ - port: { get_resource: cmaui_port_2 }
+
+ test_nested2:
+ type: nested2level.yml
+ properties:
+ shared_security_group_id1: { get_param: shared_security_group_id1}
+ p2: { get_param: p2} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/nested2level.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/nested2level.yml
new file mode 100644
index 0000000000..14c137a884
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/nested2level.yml
@@ -0,0 +1,65 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ shared_security_group_id1:
+ type: string
+ description: UID of OAM network
+ p2:
+ type: string
+ description: UID of OAM network
+ net:
+ type: string
+ description: UID of OAM network
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+ description: cmaui_port_1
+
+resources:
+
+ cmaui_port_11:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: net }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: shared_security_group_id1}, {get_param: p2}]
+ replacement_policy: AUTO
+
+ cmaui_port_22:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: net }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: shared_security_group_id1}]
+ replacement_policy: AUTO
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_11 }
+ - port: { get_resource: cmaui_port_22 }
+
+ test_nested3:
+ type: nested3level.yml
+ properties:
+ shared_security_group_id1: { get_param: shared_security_group_id1}
+ p2: { get_param: p2} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/nested3level.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/nested3level.yml
new file mode 100644
index 0000000000..6a123d1641
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/nested3level.yml
@@ -0,0 +1,59 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ shared_security_group_id1:
+ type: string
+ description: UID of OAM network
+ p2:
+ type: string
+ description: UID of OAM network
+ net:
+ type: string
+ description: UID of OAM network
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+ description: cmaui_port_1
+
+resources:
+
+ cmaui_port_11:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: net }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: shared_security_group_id1}, {get_param: p2}]
+ replacement_policy: AUTO
+
+ cmaui_port_22:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: net }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: shared_security_group_id1}]
+ replacement_policy: AUTO
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_11 }
+ - port: { get_resource: cmaui_port_22 } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..ef081a9bec
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,79 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ nova_image_name:
+ type: string
+ description: PCRF CM server name
+ pcm_server_name:
+ type: string
+ description: PCRF CM server name
+ nove_001_vol_property:
+ type: string
+ description: PCRF CM server name
+ requirements:
+ - local_storage_nova_001:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ capabilities:
+ scalable_nova_001:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_nova_001:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_nova_001:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_nova_001:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_nova_001:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..136eb6309a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,65 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ not_null:
+ hidden: false
+ immutable: false
+ type: string
+ node_templates:
+ server_pcm_001:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nested-pcm_v0.1ServiceTemplate.yaml
+ nove_001_vol_property: nove_001_vol
+ requirements:
+ - local_storage_nova_001:
+ capability: tosca.capabilities.Attachment
+ node: nove_001_vol
+ relationship: tosca.relationships.AttachesTo
+ nove_001_vol:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties: {
+ }
+ groups:
+ hot-nimbus-pcm_v0.4:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot-nimbus-pcm_v0.4.yaml
+ description: heat template that creates PCRF Cluman stack
+ members:
+ - server_pcm_001
+ - nove_001_vol \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml
new file mode 100644
index 0000000000..1b9c34f1da
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml
@@ -0,0 +1,91 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested-pcm_v0.1
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.nova:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ nova_image_name:
+ label: nova_001 image name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF CM server name
+ pcm_server_name:
+ label: PCRF CM server name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF CM server name
+ nove_001_vol_property:
+ label: PCRF CM server name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF CM server name
+ node_templates:
+ nova_001:
+ type: org.openecomp.resource.vfc.nodes.heat.nova
+ properties:
+ image:
+ get_input: nova_image_name
+ groups:
+ nested-pcm_v0.1:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested-pcm_v0.1.yaml
+ description: heat template that creates PCRF Cluman stack
+ members:
+ - nova_001
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1
+ capabilities:
+ scalable_nova_001:
+ - nova_001
+ - scalable
+ host_nova_001:
+ - nova_001
+ - host
+ endpoint_nova_001:
+ - nova_001
+ - endpoint
+ os_nova_001:
+ - nova_001
+ - os
+ binding_nova_001:
+ - nova_001
+ - binding
+ requirements:
+ local_storage_nova_001:
+ - nova_001
+ - local_storage \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/inputs/MANIFEST.json
new file mode 100644
index 0000000000..44c5652ed6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/inputs/MANIFEST.json
@@ -0,0 +1,14 @@
+{
+ "name": "vEP_JSA_Net",
+ "description": "Version 2.0 02-09-2016 (Authors: John Doe, user PROD)",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pcm_v0.4.yaml",
+ "type": "HEAT"
+ },{
+ "file": "nested-pcm_v0.1.yaml",
+ "type": "HEAT"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/inputs/hot-nimbus-pcm_v0.4.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/inputs/hot-nimbus-pcm_v0.4.yaml
new file mode 100644
index 0000000000..93dd4470b8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/inputs/hot-nimbus-pcm_v0.4.yaml
@@ -0,0 +1,22 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Cluman stack
+
+parameters:
+ not_null:
+ type: string
+
+
+
+resources:
+ server_pcm_001:
+ type: nested-pcm_v0.1.yaml
+ properties:
+ nove_001_vol_property: { get_resource: nove_001_vol }
+
+ nove_001_vol:
+ type: OS::Cinder::Volume
+ properties:
+ not_null: not_null
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/inputs/nested-pcm_v0.1.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/inputs/nested-pcm_v0.1.yaml
new file mode 100644
index 0000000000..d444a691ff
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/inputs/nested-pcm_v0.1.yaml
@@ -0,0 +1,29 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Cluman stack
+
+parameters:
+ pcm_server_name:
+ type: string
+ label: PCRF CM server name
+ description: PCRF CM server name
+ nove_001_vol_property:
+ type: string
+ label: PCRF CM server name
+ description: PCRF CM server name
+ nova_image_name:
+ type: string
+ label: nova_001 image name
+ description: PCRF CM server name
+
+resources:
+ nova_001:
+ type: OS::Nova::Server
+ properties:
+ not_null: not_null
+ image: {get_param: nova_image_name}
+ nove_001_vol_attach:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_param: nove_001_vol_property}
+ instance_uuid: {get_resource: nova_001}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..5edf602a57
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,79 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ nova_image_name:
+ type: string
+ description: nova image name
+ pcm_server_name:
+ type: string
+ description: PCRF CM server name
+ nove_001_vol_property:
+ type: string
+ description: volume name
+ requirements:
+ - local_storage_nova_001:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ capabilities:
+ scalable_nova_001:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_nova_001:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_nova_001:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_nova_001:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_nova_001:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..30e792209b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,72 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ not_null:
+ hidden: false
+ immutable: false
+ type: string
+ nove_001_vol:
+ label: volume
+ hidden: false
+ immutable: false
+ type: string
+ description: volume name
+ node_templates:
+ server_pcm_001:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nested-pcm_v0.1ServiceTemplate.yaml
+ nove_001_vol_property:
+ get_input: nove_001_vol
+ nove_001_vol:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties: {
+ }
+ groups:
+ volume:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/volume.yaml
+ members:
+ - nove_001_vol
+ hot-nimbus-pcm_v0.4:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot-nimbus-pcm_v0.4.yaml
+ description: heat template that creates PCRF Cluman stack
+ members:
+ - server_pcm_001 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml
new file mode 100644
index 0000000000..3f03905588
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml
@@ -0,0 +1,91 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested-pcm_v0.1
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.nova:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ nova_image_name:
+ label: volume
+ hidden: false
+ immutable: false
+ type: string
+ description: nova image name
+ pcm_server_name:
+ label: PCRF CM server name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF CM server name
+ nove_001_vol_property:
+ label: volume
+ hidden: false
+ immutable: false
+ type: string
+ description: volume name
+ node_templates:
+ nova_001:
+ type: org.openecomp.resource.vfc.nodes.heat.nova
+ properties:
+ image:
+ get_input: nova_image_name
+ groups:
+ nested-pcm_v0.1:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested-pcm_v0.1.yaml
+ description: heat template that creates PCRF Cluman stack
+ members:
+ - nova_001
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1
+ capabilities:
+ scalable_nova_001:
+ - nova_001
+ - scalable
+ host_nova_001:
+ - nova_001
+ - host
+ endpoint_nova_001:
+ - nova_001
+ - endpoint
+ os_nova_001:
+ - nova_001
+ - os
+ binding_nova_001:
+ - nova_001
+ - binding
+ requirements:
+ local_storage_nova_001:
+ - nova_001
+ - local_storage \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/MANIFEST.json
new file mode 100644
index 0000000000..63b14401c8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "vEP_JSA_Net",
+ "description": "Version 2.0 02-09-2016 (Authors: John Doe, user PROD)",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pcm_v0.4.yaml",
+ "type": "HEAT"
+ },{
+ "file": "nested-pcm_v0.1.yaml",
+ "type": "HEAT"
+ },{
+ "file": "volume.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/hot-nimbus-pcm_v0.4.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/hot-nimbus-pcm_v0.4.yaml
new file mode 100644
index 0000000000..f6cfa047ef
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/hot-nimbus-pcm_v0.4.yaml
@@ -0,0 +1,23 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Cluman stack
+
+parameters:
+ not_null:
+ type: string
+
+ nove_001_vol:
+ type: string
+ label: volume
+ description: volume name
+
+
+
+resources:
+ server_pcm_001:
+ type: nested-pcm_v0.1.yaml
+ properties:
+ nove_001_vol_property: { get_param: nove_001_vol }
+
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/nested-pcm_v0.1.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/nested-pcm_v0.1.yaml
new file mode 100644
index 0000000000..b8ab56319a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/nested-pcm_v0.1.yaml
@@ -0,0 +1,31 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Cluman stack
+
+parameters:
+ pcm_server_name:
+ type: string
+ label: PCRF CM server name
+ description: PCRF CM server name
+
+ nove_001_vol_property:
+ type: string
+ label: volume
+ description: volume name
+
+ nova_image_name:
+ type: string
+ label: volume
+ description: nova image name
+
+resources:
+ nova_001:
+ type: OS::Nova::Server
+ properties:
+ not_null: not_null
+ image: {get_param: nova_image_name}
+ nove_001_vol_attach:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_param: nove_001_vol_property}
+ instance_uuid: {get_resource: nova_001}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/volume.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/volume.yaml
new file mode 100644
index 0000000000..dbb3859b37
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/volume.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+parameters:
+ not_null:
+ type: number
+ label: not_number
+
+
+resources:
+ nove_001_vol:
+ type: OS::Cinder::Volume
+ properties:
+ not_null: not_null
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..2dee4a9971
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,330 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1_2:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ pcm_flavor_name:
+ type: string
+ description: flavor name of PCRF CM instance
+ availabilityzone_name:
+ type: string
+ description: availabilityzone name
+ pcm_image_name:
+ type: string
+ description: PCRF CM image name
+ pcm_vol:
+ type: string
+ description: CPS Cluman Cinder Volume
+ security_group_name:
+ type: string
+ description: the name of security group
+ cps_net_ip:
+ type: string
+ description: CPS network ip
+ pcm_server_name:
+ type: string
+ description: PCRF CM server name
+ cps_net_name:
+ type: string
+ description: CPS network name
+ cps_net_mask:
+ type: string
+ description: CPS network mask
+ oam_net_ip:
+ type: string
+ oam_net_name:
+ type: string
+ description: OAM network name
+ attributes:
+ server_pcm_id:
+ type: string
+ description: the pcm nova service id
+ requirements:
+ - link_pcm_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_server_pcm:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_pcm_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ endpoint_server_pcm:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ link_network:
+ type: tosca.capabilities.network.Linkable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_pcm:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_pcm:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_pcm:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_network:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_pcm:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_pcm_port_0:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_pcm_port_1:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ availabilityzone_name:
+ type: string
+ description: availabilityzone name
+ oam_net_gw:
+ type: string
+ description: CPS network gateway
+ pcm_image_name:
+ type: string
+ description: PCRF CM image name
+ cps_net_ips:
+ type: string
+ description: CPS network ip
+ security_group_name:
+ type: string
+ description: the name of security group
+ cps_net_ip:
+ type: string
+ description: CPS network ip
+ pcm_volumes:
+ type: string
+ description: CPS Cluman Cinder Volume
+ pcm_flavor_name:
+ type: string
+ description: flavor name of PCRF CM instance
+ pcm_vol:
+ type: string
+ description: CPS Cluman Cinder Volume
+ pcm_server_name:
+ type: string
+ description: PCRF CM server name
+ cps_net_name:
+ type: string
+ description: CPS network name
+ cps_net_mask:
+ type: string
+ description: CPS network mask
+ oam_net_ip:
+ type: string
+ description: OAM network ip
+ oam_net_mask:
+ type: string
+ description: CPS network mask
+ oam_net_name:
+ type: string
+ description: OAM network name
+ attributes:
+ server_pcm_id:
+ type: string
+ description: the pcm nova service id
+ requirements:
+ - link_pcm_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_server_pcm:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_pcm_port_1_server_pcm_005:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_server_pcm_server_pcm_005:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_pcm_port_0_server_pcm_005:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_pcm_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ endpoint_server_pcm:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_pcm:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_pcm_server_pcm_005:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_pcm_server_pcm_005:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_pcm_server_pcm_005:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_pcm_server_pcm_005:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_pcm_server_pcm_005:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_network_server_pcm_005:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_network:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_pcm:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ link_network:
+ type: tosca.capabilities.network.Linkable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_pcm_port_0_server_pcm_005:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_pcm:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ link_network_server_pcm_005:
+ type: tosca.capabilities.network.Linkable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_pcm:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_pcm_port_0:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_pcm_port_1:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_pcm_port_1_server_pcm_005:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..a0063b174e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,240 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ oam_net_ips:
+ label: OAM network ips
+ hidden: false
+ immutable: false
+ type: list
+ description: OAM network ips
+ entry_schema:
+ type: string
+ availabilityzone_name:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ oam_net_gw:
+ label: CPS network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network gateway
+ pcm_server_names:
+ label: PCRF CM server names
+ hidden: false
+ immutable: false
+ type: list
+ description: name of the PCRF CM instance
+ entry_schema:
+ type: string
+ pcm_image_name:
+ label: PCRF CM image name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF CM image name
+ cps_net_ips:
+ label: CPS network ips
+ hidden: false
+ immutable: false
+ type: list
+ description: CPS network ips
+ entry_schema:
+ type: string
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ pcm_volumes:
+ label: CPS Cluman Cinder Volume
+ hidden: false
+ immutable: false
+ type: list
+ description: CPS Cluman Cinder Volume
+ entry_schema:
+ type: string
+ pcm_flavor_name:
+ label: PCRF CM flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor name of PCRF CM instance
+ cps_net_name:
+ label: CPS network name
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network name
+ cps_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ oam_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ oam_net_name:
+ label: OAM network name
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM network name
+ node_templates:
+ server_pcm_002:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1
+ directives:
+ - substitutable
+ properties:
+ pcm_flavor_name:
+ get_input: pcm_flavor_name
+ service_template_filter:
+ substitute_service_template: nested-pcm_v0.1ServiceTemplate.yaml
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcm_image_name:
+ get_input: pcm_image_name
+ pcm_vol:
+ get_input:
+ - pcm_volumes
+ - 0
+ security_group_name:
+ get_input: security_group_name
+ pcm_server_name:
+ get_input:
+ - pcm_server_names
+ - 0
+ server_pcm_001:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nested-pcm_v0.1ServiceTemplate.yaml
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ oam_net_gw:
+ get_input: oam_net_gw
+ pcm_vol:
+ get_input:
+ - pcm_volumes
+ - 0
+ security_group_name:
+ get_input: security_group_name
+ cps_net_ip:
+ get_input:
+ - cps_net_ips
+ - 0
+ cps_net_name:
+ get_input: cps_net_name
+ cps_net_mask:
+ get_input: cps_net_mask
+ oam_net_ip:
+ get_input:
+ - oam_net_ips
+ - 0
+ oam_net_mask:
+ get_input: oam_net_mask
+ oam_net_name:
+ get_input: oam_net_name
+ server_pcm_004:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1_2
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nested-pcm_v0.1_2ServiceTemplate.yaml
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcm_vol:
+ get_input:
+ - pcm_volumes
+ - 0
+ security_group_name:
+ get_input: security_group_name
+ cps_net_ip:
+ get_input:
+ - cps_net_ips
+ - 0
+ cps_net_name:
+ get_input: cps_net_name
+ cps_net_mask:
+ get_input: cps_net_mask
+ server_pcm_003:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nested-pcm_v0.1ServiceTemplate.yaml
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcm_vol:
+ get_input:
+ - pcm_volumes
+ - 0
+ security_group_name:
+ get_input: security_group_name
+ cps_net_ip:
+ get_input:
+ - cps_net_ips
+ - 0
+ cps_net_name:
+ get_input: cps_net_name
+ cps_net_mask:
+ get_input: cps_net_mask
+ groups:
+ hot-nimbus-pcm_v0.4_2:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot-nimbus-pcm_v0.4_2.yaml
+ description: heat template that creates PCRF Cluman stack
+ members:
+ - server_pcm_004
+ - server_pcm_003
+ hot-nimbus-pcm_v0.4:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot-nimbus-pcm_v0.4.yaml
+ description: heat template that creates PCRF Cluman stack
+ members:
+ - server_pcm_002
+ - server_pcm_001 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml
new file mode 100644
index 0000000000..39fb736465
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml
@@ -0,0 +1,291 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested-pcm_v0.1
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.pcm_server:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ availabilityzone_name:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ oam_net_gw:
+ label: CPS network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network gateway
+ pcm_image_name:
+ label: image name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF CM image name
+ cps_net_ips:
+ label: CPS network ip
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network ip
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ cps_net_ip:
+ label: CPS network ip
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network ip
+ pcm_volumes:
+ label: CPS Cluman Cinder Volume
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS Cluman Cinder Volume
+ pcm_flavor_name:
+ label: PCRF CM flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor name of PCRF CM instance
+ pcm_vol:
+ label: CPS Cluman Cinder Volume
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS Cluman Cinder Volume
+ pcm_server_name:
+ label: PCRF CM server name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF CM server name
+ cps_net_name:
+ label: CPS network name
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network name
+ cps_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ oam_net_ip:
+ label: OAM network ip
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM network ip
+ oam_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ oam_net_name:
+ label: OAM network name
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM network name
+ node_templates:
+ pcm_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: oam_net_ip
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pcm
+ relationship: tosca.relationships.network.BindsTo
+ server_pcm:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm_server
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ server_pcm_005:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1_2
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nested-pcm_v0.1_2ServiceTemplate.yaml
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcm_vol:
+ get_input:
+ - pcm_volumes
+ - 0
+ security_group_name:
+ get_input: security_group_name
+ cps_net_ip:
+ get_input:
+ - cps_net_ips
+ - 0
+ cps_net_name:
+ get_input: cps_net_name
+ cps_net_mask:
+ get_input: cps_net_mask
+ pcm_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: cps_net_ip
+ network:
+ get_input: cps_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pcm
+ relationship: tosca.relationships.network.BindsTo
+ network:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ network_name:
+ get_input: cps_net_name
+ groups:
+ nested-pcm_v0.1:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested-pcm_v0.1.yaml
+ description: heat template that creates PCRF Cluman stack
+ members:
+ - pcm_port_1
+ - server_pcm
+ - server_pcm_005
+ - pcm_port_0
+ - network
+ outputs:
+ server_pcm_id:
+ description: the pcm nova service id
+ value: server_pcm
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1
+ capabilities:
+ endpoint_server_pcm:
+ - server_pcm
+ - endpoint
+ host_server_pcm:
+ - server_pcm
+ - host
+ host_server_pcm_server_pcm_005:
+ - server_pcm_005
+ - host_server_pcm
+ os_server_pcm_server_pcm_005:
+ - server_pcm_005
+ - os_server_pcm
+ scalable_server_pcm_server_pcm_005:
+ - server_pcm_005
+ - scalable_server_pcm
+ binding_server_pcm_server_pcm_005:
+ - server_pcm_005
+ - binding_server_pcm
+ endpoint_server_pcm_server_pcm_005:
+ - server_pcm_005
+ - endpoint_server_pcm
+ attachment_network_server_pcm_005:
+ - server_pcm_005
+ - attachment_network
+ attachment_network:
+ - network
+ - attachment
+ binding_server_pcm:
+ - server_pcm
+ - binding
+ link_network:
+ - network
+ - link
+ attachment_pcm_port_0_server_pcm_005:
+ - server_pcm_005
+ - attachment_pcm_port_0
+ os_server_pcm:
+ - server_pcm
+ - os
+ link_network_server_pcm_005:
+ - server_pcm_005
+ - link_network
+ scalable_server_pcm:
+ - server_pcm
+ - scalable
+ attachment_pcm_port_0:
+ - pcm_port_0
+ - attachment
+ attachment_pcm_port_1:
+ - pcm_port_1
+ - attachment
+ attachment_pcm_port_1_server_pcm_005:
+ - server_pcm_005
+ - attachment_pcm_port_1
+ requirements:
+ link_pcm_port_0:
+ - pcm_port_0
+ - link
+ link_pcm_port_1:
+ - pcm_port_1
+ - link
+ link_pcm_port_1_server_pcm_005:
+ - server_pcm_005
+ - link_pcm_port_1
+ link_pcm_port_0_server_pcm_005:
+ - server_pcm_005
+ - link_pcm_port_0
+ local_storage_server_pcm:
+ - server_pcm
+ - local_storage
+ local_storage_server_pcm_server_pcm_005:
+ - server_pcm_005
+ - local_storage_server_pcm \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/nested-pcm_v0.1_2ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/nested-pcm_v0.1_2ServiceTemplate.yaml
new file mode 100644
index 0000000000..a80a5811b1
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/nested-pcm_v0.1_2ServiceTemplate.yaml
@@ -0,0 +1,205 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested-pcm_v0.1_2
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.pcm_server:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ pcm_flavor_name:
+ label: PCRF CM flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor name of PCRF CM instance
+ availabilityzone_name:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ pcm_image_name:
+ label: image name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF CM image name
+ pcm_vol:
+ label: CPS Cluman Cinder Volume
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS Cluman Cinder Volume
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ cps_net_ip:
+ label: CPS network ip
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network ip
+ pcm_server_name:
+ label: PCRF CM server name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF CM server name
+ cps_net_name:
+ label: CPS network name
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network name
+ cps_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ oam_net_ip:
+ hidden: false
+ immutable: false
+ type: string
+ oam_net_name:
+ label: OAM network name
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM network name
+ node_templates:
+ pcm_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: oam_net_ip
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pcm
+ relationship: tosca.relationships.network.BindsTo
+ server_pcm:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm_server
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ pcm_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: cps_net_ip
+ network:
+ get_input: cps_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pcm
+ relationship: tosca.relationships.network.BindsTo
+ network:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ network_name:
+ get_input: cps_net_name
+ groups:
+ nested-pcm_v0.1_2:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested-pcm_v0.1_2.yaml
+ description: heat template that creates PCRF Cluman stack
+ members:
+ - pcm_port_1
+ - server_pcm
+ - pcm_port_0
+ - network
+ outputs:
+ server_pcm_id:
+ description: the pcm nova service id
+ value: server_pcm
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1_2
+ capabilities:
+ endpoint_server_pcm:
+ - server_pcm
+ - endpoint
+ link_network:
+ - network
+ - link
+ os_server_pcm:
+ - server_pcm
+ - os
+ host_server_pcm:
+ - server_pcm
+ - host
+ scalable_server_pcm:
+ - server_pcm
+ - scalable
+ attachment_network:
+ - network
+ - attachment
+ binding_server_pcm:
+ - server_pcm
+ - binding
+ attachment_pcm_port_0:
+ - pcm_port_0
+ - attachment
+ attachment_pcm_port_1:
+ - pcm_port_1
+ - attachment
+ requirements:
+ link_pcm_port_0:
+ - pcm_port_0
+ - link
+ link_pcm_port_1:
+ - pcm_port_1
+ - link
+ local_storage_server_pcm:
+ - server_pcm
+ - local_storage \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/MANIFEST.json
new file mode 100644
index 0000000000..b4a1b43a1e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/MANIFEST.json
@@ -0,0 +1,26 @@
+{
+ "name": "vEP_JSA_Net",
+ "description": "Version 2.0 02-09-2016 (Authors: John Doe, user PROD)",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pcm_v0.4.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pcm_v0.4.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },{
+ "file": "nested-pcm_v0.1.yaml",
+ "type": "HEAT"
+ },{
+ "file": "hot-nimbus-pcm_v0.4_2.yaml",
+ "type": "HEAT"
+ },{
+ "file": "nested-pcm_v0.1_2.yaml",
+ "type": "HEAT"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/hot-nimbus-pcm_v0.4.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/hot-nimbus-pcm_v0.4.env
new file mode 100644
index 0000000000..78cc03e2ea
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/hot-nimbus-pcm_v0.4.env
@@ -0,0 +1,14 @@
+parameters:
+ pcm_server_names: ZRDM1PCRF01PCM001
+ pcm_image_name: rhel2
+ pcm_flavor_name: cps
+ availabilityzone_name: nova
+ cps_net_name: int_pcrf_net_0
+ cps_net_ips: 172.26.16.113
+ cps_net_mask: 255.255.255.0
+ oam_net_name: oam_protected_net_0
+ oam_net_ips: 107.239.64.121
+ oam_net_gw: 107.239.64.1
+ oam_net_mask: 255.255.255.0
+ pcm_volumes: 249cb355-8fdf-4382-9c3c-a2ebe767d45b
+ security_group_name: nimbus_security_group
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/hot-nimbus-pcm_v0.4.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/hot-nimbus-pcm_v0.4.yaml
new file mode 100644
index 0000000000..f7d050790f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/hot-nimbus-pcm_v0.4.yaml
@@ -0,0 +1,82 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Cluman stack
+
+parameters:
+ pcm_server_names:
+ type: comma_delimited_list
+ label: PCRF CM server names
+ description: name of the PCRF CM instance
+ pcm_image_name:
+ type: string
+ label: PCRF CM image name
+ description: PCRF CM image name
+ pcm_flavor_name:
+ type: string
+ label: PCRF CM flavor name
+ description: flavor name of PCRF CM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ oam_net_name:
+ type: string
+ label: OAM network name
+ description: OAM network name
+ oam_net_ips:
+ type: comma_delimited_list
+ label: OAM network ips
+ description: OAM network ips
+ oam_net_gw:
+ type: string
+ label: CPS network gateway
+ description: CPS network gateway
+ oam_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcm_volumes:
+ type: comma_delimited_list
+ label: CPS Cluman Cinder Volume
+ description: CPS Cluman Cinder Volume
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+
+resources:
+ server_pcm_001:
+ type: nested-pcm_v0.1.yaml
+ properties:
+ availabilityzone_name: { get_param: availabilityzone_name }
+ security_group_name: { get_param: security_group_name }
+ pcm_vol: { get_param: [pcm_volumes, 0] }
+ cps_net_name: { get_param: cps_net_name }
+ cps_net_ip: { get_param: [cps_net_ips, 0] }
+ cps_net_mask: { get_param: cps_net_mask }
+ oam_net_name: { get_param: oam_net_name }
+ oam_net_ip: { get_param: [oam_net_ips, 0] }
+ oam_net_mask: { get_param: oam_net_mask }
+ oam_net_gw: { get_param: oam_net_gw }
+
+ server_pcm_002:
+ type: nested-pcm_v0.1.yaml
+ properties:
+ pcm_server_name: { get_param: [pcm_server_names, 0] }
+ pcm_image_name: { get_param: pcm_image_name }
+ pcm_flavor_name: { get_param: pcm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ security_group_name: { get_param: security_group_name }
+ pcm_vol: { get_param: [pcm_volumes, 0] }
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/hot-nimbus-pcm_v0.4_2.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/hot-nimbus-pcm_v0.4_2.yaml
new file mode 100644
index 0000000000..b59df84764
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/hot-nimbus-pcm_v0.4_2.yaml
@@ -0,0 +1,79 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Cluman stack
+
+parameters:
+ pcm_server_names:
+ type: comma_delimited_list
+ label: PCRF CM server names
+ description: name of the PCRF CM instance
+ pcm_image_name:
+ type: string
+ label: PCRF CM image name
+ description: PCRF CM image name
+ pcm_flavor_name:
+ type: string
+ label: PCRF CM flavor name
+ description: flavor name of PCRF CM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ oam_net_name:
+ type: string
+ label: OAM network name
+ description: OAM network name
+ oam_net_ips:
+ type: comma_delimited_list
+ label: OAM network ips
+ description: OAM network ips
+ oam_net_gw:
+ type: string
+ label: CPS network gateway
+ description: CPS network gateway
+ oam_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcm_volumes:
+ type: comma_delimited_list
+ label: CPS Cluman Cinder Volume
+ description: CPS Cluman Cinder Volume
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+
+resources:
+ server_pcm_003:
+ type: nested-pcm_v0.1.yaml
+ properties:
+ availabilityzone_name: { get_param: availabilityzone_name }
+ security_group_name: { get_param: security_group_name }
+ pcm_vol: { get_param: [pcm_volumes, 0] }
+ cps_net_name: { get_param: cps_net_name }
+ cps_net_ip: { get_param: [cps_net_ips, 0] }
+ cps_net_mask: { get_param: cps_net_mask }
+
+ server_pcm_004:
+ type: nested-pcm_v0.1_2.yaml
+ properties:
+ availabilityzone_name: { get_param: availabilityzone_name }
+ security_group_name: { get_param: security_group_name }
+ pcm_vol: { get_param: [pcm_volumes, 0] }
+ cps_net_name: { get_param: cps_net_name }
+ cps_net_ip: { get_param: [cps_net_ips, 0] }
+ cps_net_mask: { get_param: cps_net_mask }
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/nested-pcm_v0.1.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/nested-pcm_v0.1.yaml
new file mode 100644
index 0000000000..66a03796fb
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/nested-pcm_v0.1.yaml
@@ -0,0 +1,138 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Cluman stack
+
+parameters:
+ pcm_server_name:
+ type: string
+ label: PCRF CM server name
+ description: PCRF CM server name
+ pcm_image_name:
+ type: string
+ label: image name
+ description: PCRF CM image name
+ pcm_flavor_name:
+ type: string
+ label: PCRF CM flavor name
+ description: flavor name of PCRF CM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ cps_net_ips:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ oam_net_name:
+ type: string
+ label: OAM network name
+ description: OAM network name
+ oam_net_ip:
+ type: string
+ label: OAM network ip
+ description: OAM network ip
+ oam_net_gw:
+ type: string
+ label: CPS network gateway
+ description: CPS network gateway
+ oam_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcm_vol:
+ type: string
+ label: CPS Cluman Cinder Volume
+ description: CPS Cluman Cinder Volume
+ pcm_volumes:
+ type: string
+ label: CPS Cluman Cinder Volume
+ description: CPS Cluman Cinder Volume
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+
+resources:
+ server_pcm_005:
+ type: nested-pcm_v0.1_2.yaml
+ properties:
+ availabilityzone_name: { get_param: availabilityzone_name }
+ security_group_name: { get_param: security_group_name }
+ pcm_vol: { get_param: [pcm_volumes, 0] }
+ cps_net_name: { get_param: cps_net_name }
+ cps_net_ip: { get_param: [cps_net_ips, 0] }
+ cps_net_mask: { get_param: cps_net_mask }
+ server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ script_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+
+ network:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: cps_net_name}
+
+ server_pcm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcm_server_name }
+ image: { get_param: pcm_image_name }
+ flavor: { get_param: pcm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcm_port_0}
+ - port: { get_resource: pcm_port_1}
+ block_device_mapping:
+ - device_name: vdb
+ volume_id: { get_param: pcm_vol}
+ user_data_format: RAW
+ user_data:
+ get_resource: server_init
+
+ pcm_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: cps_net_ip }
+ security_groups: [{ get_param: security_group_name }]
+
+ pcm_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips:
+ - ip_address: { get_param: oam_net_ip }
+ security_groups: [{ get_param: security_group_name }]
+
+ #pcm_vol_attachment:
+ # type: OS::Cinder::VolumeAttachment
+ # properties:
+ # volume_id: { get_param: pcm_vol }
+ # mountpoint: /dev/vdb
+ # instance_uuid: { get_resource: server_pcm }
+outputs:
+ server_pcm_id:
+ description: the pcm nova service id
+ value: { get_resource: server_pcm } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/nested-pcm_v0.1_2.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/nested-pcm_v0.1_2.yaml
new file mode 100644
index 0000000000..11be0dd63b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/nested-pcm_v0.1_2.yaml
@@ -0,0 +1,110 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Cluman stack
+
+parameters:
+ pcm_server_name:
+ type: string
+ label: PCRF CM server name
+ description: PCRF CM server name
+ pcm_image_name:
+ type: string
+ label: image name
+ description: PCRF CM image name
+ pcm_flavor_name:
+ type: string
+ label: PCRF CM flavor name
+ description: flavor name of PCRF CM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcm_vol:
+ type: string
+ label: CPS Cluman Cinder Volume
+ description: CPS Cluman Cinder Volume
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ oam_net_name:
+ type: string
+ label: OAM network name
+ description: OAM network name
+ oam_net_ip:
+ type: string
+resources:
+ server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ script_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+
+ network:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: cps_net_name}
+
+ server_pcm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcm_server_name }
+ image: { get_param: pcm_image_name }
+ flavor: { get_param: pcm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcm_port_0}
+ - port: { get_resource: pcm_port_1}
+ block_device_mapping:
+ - device_name: vdb
+ volume_id: { get_param: pcm_vol}
+ user_data_format: RAW
+ user_data:
+ get_resource: server_init
+
+ pcm_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: cps_net_ip }
+ security_groups: [{ get_param: security_group_name }]
+
+ pcm_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips:
+ - ip_address: { get_param: oam_net_ip }
+ security_groups: [{ get_param: security_group_name }]
+
+ #pcm_vol_attachment:
+ # type: OS::Cinder::VolumeAttachment
+ # properties:
+ # volume_id: { get_param: pcm_vol }
+ # mountpoint: /dev/vdb
+ # instance_uuid: { get_resource: server_pcm }
+outputs:
+ server_pcm_id:
+ description: the pcm nova service id
+ value: { get_resource: server_pcm } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..15b5e3b3a8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,161 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ vf_module_id:
+ type: string
+ description: Unique ID for this VF_MODULE instance
+ vf_name:
+ type: string
+ description: The VF Name; defaults to VMVM for the virtual MVM VNF.
+ constraints:
+ - pattern: '[a-zA-Z0-9]+'
+ - max_length: 4
+ - min_length: 4
+ cloud_zone_id:
+ type: string
+ description: The cloud zone for this VF instance
+ vf_instance_num:
+ type: string
+ description: The number for this VF instance
+ constraints:
+ - pattern: '[0-9]+'
+ - max_length: 2
+ - min_length: 2
+ virtual_mgmt_ip_0:
+ type: string
+ description: Virtual management network ip address
+ indx:
+ type: float
+ description: Index of the current instance
+ mvs_mgmt_ip_0:
+ type: list
+ description: List of Management network IP addresses for IPv4
+ entry_schema:
+ type: string
+ flavor:
+ type: string
+ description: Server flavor
+ constraints: [
+ ]
+ key_name:
+ type: string
+ description: SSH key name
+ constraints: [
+ ]
+ vnf_id:
+ type: string
+ description: Unique ID for this VF instance
+ availability_zone_0:
+ type: list
+ description: List of Availability Zone IDs or Names
+ entry_schema:
+ type: string
+ mgmt_net_id:
+ type: string
+ description: Neutron UUID for the Management network
+ constraints: [
+ ]
+ vm_instance_num:
+ type: list
+ description: VM instance number list must be a list of three-digit numeric value
+ entry_schema:
+ type: string
+ bootimage:
+ type: string
+ description: Master bootimage volume id
+ sec_groups:
+ type: list
+ description: Security groups
+ entry_schema:
+ type: string
+ vf_component:
+ type: string
+ description: The component that this VF instance is running
+ constraints:
+ - pattern: '[a-zA-Z0-9]+'
+ - max_length: 3
+ - min_length: 3
+ attributes:
+ vnfci_id_2:
+ type: string
+ vnfci_id_1:
+ type: string
+ requirements:
+ - local_storage_vnfci:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_mgmt_port:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ os_vnfci:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_mgmt_port:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_vnfci:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_vnfci:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_vnfci:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_vnfci:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..b07fa5b70b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,569 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.compute:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ vf_module_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VF_MODULE instance
+ vf_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: The VF Name; defaults to VMVM for the virtual MVM VNF.
+ constraints:
+ - pattern: '[a-zA-Z0-9]+'
+ - max_length: 4
+ - min_length: 4
+ type_name:
+ hidden: false
+ immutable: false
+ type: string
+ cloud_zone_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: The cloud zone for this VF instance
+ vf_instance_num:
+ hidden: false
+ immutable: false
+ type: string
+ description: The number for this VF instance
+ constraints:
+ - pattern: '[0-9]+'
+ - max_length: 2
+ - min_length: 2
+ virtual_mgmt_ip_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: Virtual management network ip address
+ mvs_mgmt_ip_0:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of Management network IP addresses for IPv4
+ entry_schema:
+ type: string
+ compute_image_name:
+ hidden: false
+ immutable: false
+ type: string
+ flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Server flavor
+ constraints: [
+ ]
+ key_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: SSH key name
+ constraints: [
+ ]
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VF instance
+ availability_zone_0:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of Availability Zone IDs or Names
+ entry_schema:
+ type: string
+ mgmt_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Neutron UUID for the Management network
+ constraints: [
+ ]
+ vm_instance_num:
+ hidden: false
+ immutable: false
+ type: list
+ description: VM instance number list must be a list of three-digit numeric value
+ entry_schema:
+ type: string
+ bootimage:
+ hidden: false
+ immutable: false
+ type: string
+ description: Master bootimage volume id
+ sec_groups:
+ hidden: false
+ immutable: false
+ type: list
+ description: Security groups
+ entry_schema:
+ type: string
+ vf_component:
+ hidden: false
+ immutable: false
+ type: string
+ description: The component that this VF instance is running
+ constraints:
+ - pattern: '[a-zA-Z0-9]+'
+ - max_length: 3
+ - min_length: 3
+ num_instances:
+ hidden: false
+ immutable: false
+ type: float
+ description: number of instance of the VF_module
+ node_templates:
+ mvs_modules_custIndexVar2:
+ type: org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat
+ directives:
+ - substitutable
+ properties:
+ vf_module_id:
+ - get_input: vf_module_id
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - concat:
+ - fff
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ vf_name:
+ concat:
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - vf_name
+ cloud_zone_id:
+ concat:
+ - cloud_zone_id_
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ vf_instance_num:
+ concat:
+ - vf_instance_num_
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - _bbbb
+ virtual_mgmt_ip_0:
+ get_input: virtual_mgmt_ip_0
+ indx:
+ get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ mvs_mgmt_ip_0: mvs_mgmt_ip_0
+ flavor:
+ a: a
+ b: b
+ e:
+ get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ w:
+ concat:
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - _pp
+ key_name:
+ - a
+ - b
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - concat:
+ - p
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ service_template_filter:
+ substitute_service_template: mvs.nested.heatServiceTemplate.yaml
+ count: 2
+ mandatory: true
+ vnf_id: null
+ availability_zone_0:
+ get_input: availability_zone_0
+ mgmt_net_id:
+ get_input: mgmt_net_id
+ vm_instance_num:
+ concat:
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - _vm_instance_num_
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - _hhh_
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - _pppp
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ bootimage:
+ get_input: bootimage
+ sec_groups:
+ get_input: sec_groups
+ vf_component:
+ get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ mvs_modules_custIndexVar1:
+ type: org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat
+ directives:
+ - substitutable
+ properties:
+ vf_module_id:
+ - get_input: vf_module_id
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - concat:
+ - fff
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ vf_name:
+ concat:
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - vf_name
+ cloud_zone_id:
+ concat:
+ - cloud_zone_id_
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ vf_instance_num:
+ concat:
+ - vf_instance_num_
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - _bbbb
+ virtual_mgmt_ip_0:
+ get_input: virtual_mgmt_ip_0
+ indx:
+ get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ mvs_mgmt_ip_0: mvs_mgmt_ip_0
+ flavor:
+ a: a
+ b: b
+ e:
+ get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ w:
+ concat:
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - _pp
+ key_name:
+ - a
+ - b
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - concat:
+ - p
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ service_template_filter:
+ substitute_service_template: mvs.nested.heatServiceTemplate.yaml
+ count: 2
+ mandatory: true
+ vnf_id: null
+ availability_zone_0:
+ get_input: availability_zone_0
+ mgmt_net_id:
+ get_input: mgmt_net_id
+ vm_instance_num:
+ concat:
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - _vm_instance_num_
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - _hhh_
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - _pppp
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ bootimage:
+ get_input: bootimage
+ sec_groups:
+ get_input: sec_groups
+ vf_component:
+ get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ mvs_modules_defaultIndexVar:
+ type: org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat
+ directives:
+ - substitutable
+ properties:
+ vf_module_id:
+ - get_input: vf_module_id
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - concat:
+ - fff
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ vf_name:
+ concat:
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - vf_name
+ cloud_zone_id:
+ concat:
+ - cloud_zone_id_
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ vf_instance_num:
+ concat:
+ - vf_instance_num_
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - _bbbb
+ virtual_mgmt_ip_0:
+ get_input: virtual_mgmt_ip_0
+ indx:
+ get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ mvs_mgmt_ip_0: mvs_mgmt_ip_0
+ flavor:
+ a: a
+ b:
+ aa:
+ - sss
+ - concat:
+ - dddd
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - ppp
+ - sd
+ ppp:
+ concat:
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - _pppp___
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ eeee: eeeeeee
+ e:
+ get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ w:
+ concat:
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - _pp
+ key_name:
+ - a
+ - b
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - concat:
+ - p
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ service_template_filter:
+ substitute_service_template: mvs.nested.heatServiceTemplate.yaml
+ count: 3
+ mandatory: true
+ vnf_id: null
+ availability_zone_0:
+ get_input: availability_zone_0
+ mgmt_net_id:
+ get_input: mgmt_net_id
+ vm_instance_num:
+ concat:
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - _vm_instance_num_
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - _hhh_
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ - _pppp
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ bootimage:
+ get_input: bootimage
+ sec_groups:
+ get_input: sec_groups
+ vf_component:
+ get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ server_compute_get_attr_test:
+ type: org.openecomp.resource.vfc.nodes.heat.compute
+ properties:
+ flavor: compute_flavor_name
+ image:
+ get_input: compute_image_name
+ config_drive:
+ get_attribute:
+ - mvs_modules_defaultIndexVar
+ - vnfci_id_1
+ - vnfci_id_2
+ user_data_format:
+ get_attribute:
+ - mvs_modules_defaultIndexVar
+ - vnfci_id_1
+ - 1
+ name: compute_name
+ groups:
+ mvs.vfmodule.heat:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/mvs.vfmodule.heat.yaml
+ description: |
+ Metaswitch MVS (Metaview Server)
+ members:
+ - mvs_modules_custIndexVar2
+ - mvs_modules_custIndexVar1
+ - mvs_modules_defaultIndexVar
+ - server_compute_get_attr_test \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml
new file mode 100644
index 0000000000..11369f9b68
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml
@@ -0,0 +1,254 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: mvs.nested.heat
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.vnfci:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ vf_module_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VF_MODULE instance
+ vf_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: The VF Name; defaults to VMVM for the virtual MVM VNF.
+ constraints:
+ - pattern: '[a-zA-Z0-9]+'
+ - max_length: 4
+ - min_length: 4
+ cloud_zone_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: The cloud zone for this VF instance
+ vf_instance_num:
+ hidden: false
+ immutable: false
+ type: string
+ description: The number for this VF instance
+ constraints:
+ - pattern: '[0-9]+'
+ - max_length: 2
+ - min_length: 2
+ virtual_mgmt_ip_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: Virtual management network ip address
+ indx:
+ hidden: false
+ immutable: false
+ type: float
+ description: Index of the current instance
+ mvs_mgmt_ip_0:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of Management network IP addresses for IPv4
+ entry_schema:
+ type: string
+ flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Server flavor
+ constraints: [
+ ]
+ key_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: SSH key name
+ constraints: [
+ ]
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VF instance
+ availability_zone_0:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of Availability Zone IDs or Names
+ entry_schema:
+ type: string
+ mgmt_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Neutron UUID for the Management network
+ constraints: [
+ ]
+ vm_instance_num:
+ hidden: false
+ immutable: false
+ type: list
+ description: VM instance number list must be a list of three-digit numeric value
+ entry_schema:
+ type: string
+ bootimage:
+ hidden: false
+ immutable: false
+ type: string
+ description: Master bootimage volume id
+ sec_groups:
+ hidden: false
+ immutable: false
+ type: list
+ description: Security groups
+ entry_schema:
+ type: string
+ vf_component:
+ hidden: false
+ immutable: false
+ type: string
+ description: The component that this VF instance is running
+ constraints:
+ - pattern: '[a-zA-Z0-9]+'
+ - max_length: 3
+ - min_length: 3
+ node_templates:
+ vnfci:
+ type: org.openecomp.resource.vfc.nodes.heat.vnfci
+ properties:
+ flavor:
+ get_input: flavor
+ key_name:
+ get_input: key_name
+ availability_zone:
+ Fn::Select:
+ - get_input: indx
+ - get_input:
+ - availability_zone_0
+ name:
+ str_replace:
+ template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM
+ params:
+ $VF_NAME:
+ get_input: vf_name
+ $CLOUD_ZONE_ID:
+ get_input: cloud_zone_id
+ $VM_INSTANCE_NUM:
+ Fn::Select:
+ - get_input: indx
+ - get_input:
+ - vm_instance_num
+ $VF_COMPONENT:
+ get_input: vf_component
+ $VF_INSTANCE_NUM:
+ get_input: vf_instance_num
+ mgmt_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: sec_groups
+ fixed_ips:
+ - ip_address:
+ Fn::Select:
+ - get_input: indx
+ - get_input:
+ - get_input: mvs_mgmt_ip_0
+ allowed_address_pairs:
+ - ip_address:
+ get_input: virtual_mgmt_ip_0
+ name:
+ str_replace:
+ template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-mgmt-port
+ params:
+ $VF_NAME:
+ get_input: vf_name
+ $CLOUD_ZONE_ID:
+ get_input: cloud_zone_id
+ $VM_INSTANCE_NUM:
+ Fn::Select:
+ - get_input: indx
+ - get_input:
+ - vm_instance_num
+ $VF_COMPONENT:
+ get_input: vf_component
+ $VF_INSTANCE_NUM:
+ get_input: vf_instance_num
+ network:
+ get_input: mgmt_net_id
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: vnfci
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ mvs.nested.heat:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/mvs.nested.heat.yaml
+ description: |
+ Metaswitch MVS (Metaview Server)
+ members:
+ - vnfci
+ - mgmt_port
+ outputs:
+ vnfci_id_2:
+ value: vnfci
+ vnfci_id_1:
+ value: vnfci
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat
+ capabilities:
+ os_vnfci:
+ - vnfci
+ - os
+ attachment_mgmt_port:
+ - mgmt_port
+ - attachment
+ endpoint_vnfci:
+ - vnfci
+ - endpoint
+ host_vnfci:
+ - vnfci
+ - host
+ binding_vnfci:
+ - vnfci
+ - binding
+ scalable_vnfci:
+ - vnfci
+ - scalable
+ requirements:
+ local_storage_vnfci:
+ - vnfci
+ - local_storage
+ link_mgmt_port:
+ - mgmt_port
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/inputs/MANIFEST.json
new file mode 100644
index 0000000000..c7729c8653
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/inputs/MANIFEST.json
@@ -0,0 +1,19 @@
+{
+ "name": "mvs.vfmodule.heat.yaml",
+ "description": "Metaswitch MVS (Metaview Server)",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "mvs.vfmodule.heat.yaml",
+ "type": "HEAT",
+ "data": [
+ ]
+ },
+ {
+ "file": "mvs.nested.heat.yaml",
+ "type": "HEAT",
+ "data": [
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/inputs/mvs.nested.heat.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/inputs/mvs.nested.heat.yaml
new file mode 100644
index 0000000000..01adb51d71
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/inputs/mvs.nested.heat.yaml
@@ -0,0 +1,129 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Metaswitch MVS (Metaview Server)
+
+parameters:
+ cloud_zone_id:
+ type: string
+ description: The cloud zone for this VF instance
+ vf_name:
+ type: string
+ description: The VF Name; defaults to VMVM for the virtual MVM VNF.
+ constraints:
+ - allowed_pattern: "[a-zA-Z0-9]+"
+ - length: { min: 4, max: 4 }
+ description: Each VF will have a 4-character alphanumeric identifier
+ vf_instance_num:
+ type: string
+ description: The number for this VF instance
+ constraints:
+ - allowed_pattern: "[0-9]+"
+ - length: { min: 2, max: 2 }
+ description: VF instance number must be a two-digit numeric value
+ vf_component:
+ type: string
+ description: The component that this VF instance is running
+ constraints:
+ - allowed_pattern: "[a-zA-Z0-9]+"
+ - length: { min: 3, max: 3 }
+ description: Each VF component will have a 3-character alphanumeric identifier
+ vm_instance_num:
+ type: comma_delimited_list
+ description: VM instance number list must be a list of three-digit numeric value
+ vnf_id:
+ type: string
+ description: Unique ID for this VF instance
+ vf_module_id:
+ type: string
+ description: Unique ID for this VF_MODULE instance
+ bootimage:
+ type: string
+ description: Master bootimage volume id
+ flavor:
+ type: string
+ description: Server flavor
+ constraints:
+ - custom_constraint: nova.flavor
+ key_name:
+ type: string
+ description: SSH key name
+ constraints:
+ - custom_constraint: nova.keypair
+
+ availability_zone_0:
+ type: comma_delimited_list
+ description: List of Availability Zone IDs or Names
+
+ sec_groups:
+ type: comma_delimited_list
+ description: Security groups
+ mgmt_net_id:
+ type: string
+ description: Neutron UUID for the Management network
+ constraints:
+ - custom_constraint: neutron.network
+ virtual_mgmt_ip_0:
+ type: string
+ description: Virtual management network ip address
+
+ mvs_mgmt_ip_0:
+ type: comma_delimited_list
+ description: List of Management network IP addresses for IPv4
+
+ indx:
+ type: number
+ description: Index of the current instance
+
+resources:
+ mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ name:
+ str_replace:
+ template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-mgmt-port
+ params:
+ $CLOUD_ZONE_ID: { get_param: cloud_zone_id }
+ $VF_NAME: { get_param: vf_name }
+ $VF_INSTANCE_NUM: { get_param: vf_instance_num }
+ $VF_COMPONENT: { get_param: vf_component }
+ $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] }
+ network_id: { get_param: mgmt_net_id }
+ security_groups: [{ get_param: sec_groups }]
+
+ fixed_ips:
+ - ip_address: { "Fn::Select" : [ { get_param: indx }, { get_param: [{ get_param: mvs_mgmt_ip_0 }] } ] }
+
+ allowed_address_pairs:
+ - ip_address: { get_param: virtual_mgmt_ip_0 }
+
+
+
+ vnfci:
+ type: OS::Nova::Server
+ properties:
+ name:
+ str_replace:
+ template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM
+ params:
+ $CLOUD_ZONE_ID: { get_param: cloud_zone_id }
+ $VF_NAME: { get_param: vf_name }
+ $VF_INSTANCE_NUM: { get_param: vf_instance_num }
+ $VF_COMPONENT: { get_param: vf_component }
+ $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] }
+ flavor: { get_param: flavor }
+ key_name: { get_param: key_name }
+ networks:
+ - port: { get_resource: mgmt_port }
+
+ availability_zone: { "Fn::Select" : [ { get_param: indx }, { get_param: [availability_zone_0] } ] }
+
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+
+outputs:
+ vnfci_id_1:
+ value: { get_resource: vnfci }
+ vnfci_id_2:
+ value: { get_resource: vnfci } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/inputs/mvs.vfmodule.heat.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/inputs/mvs.vfmodule.heat.yaml
new file mode 100644
index 0000000000..6b42078b21
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/inputs/mvs.vfmodule.heat.yaml
@@ -0,0 +1,228 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Metaswitch MVS (Metaview Server)
+
+parameters:
+ cloud_zone_id:
+ type: string
+ description: The cloud zone for this VF instance
+ vf_name:
+ type: string
+ description: The VF Name; defaults to VMVM for the virtual MVM VNF.
+ constraints:
+ - allowed_pattern: "[a-zA-Z0-9]+"
+ - length: { min: 4, max: 4 }
+ description: Each VF will have a 4-character alphanumeric identifier
+ vf_instance_num:
+ type: string
+ description: The number for this VF instance
+ constraints:
+ - allowed_pattern: "[0-9]+"
+ - length: { min: 2, max: 2 }
+ description: VF instance number must be a two-digit numeric value
+ vf_component:
+ type: string
+ description: The component that this VF instance is running
+ constraints:
+ - allowed_pattern: "[a-zA-Z0-9]+"
+ - length: { min: 3, max: 3 }
+ description: Each VF component will have a 3-character alphanumeric identifier
+ vm_instance_num:
+ type: comma_delimited_list
+ description: VM instance number list must be a list of three-digit numeric value
+ vnf_id:
+ type: string
+ description: Unique ID for this VF instance
+ vf_module_id:
+ type: string
+ description: Unique ID for this VF_MODULE instance
+ bootimage:
+ type: string
+ description: Master bootimage volume id
+ flavor:
+ type: string
+ description: Server flavor
+ constraints:
+ - custom_constraint: nova.flavor
+ key_name:
+ type: string
+ description: SSH key name
+ constraints:
+ - custom_constraint: nova.keypair
+ type_name:
+ type: string
+ availability_zone_0:
+ type: comma_delimited_list
+ description: List of Availability Zone IDs or Names
+
+ sec_groups:
+ type: comma_delimited_list
+ description: Security groups
+ mgmt_net_id:
+ type: string
+ description: Neutron UUID for the Management network
+ constraints:
+ - custom_constraint: neutron.network
+ virtual_mgmt_ip_0:
+ type: string
+ description: Virtual management network ip address
+
+ mvs_mgmt_ip_0:
+ type: comma_delimited_list
+ description: List of Management network IP addresses for IPv4
+
+ num_instances:
+ type: number
+ description: number of instance of the VF_module
+
+ compute_image_name:
+ type: string
+
+resources:
+ mvs_modules_defaultIndexVar:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: 3
+ resource_def:
+ type: mvs.nested.heat.yaml
+ properties:
+ cloud_zone_id: cloud_zone_id_%index%
+ vf_name: "%index%vf_name"
+ vf_instance_num: "vf_instance_num_%index%_bbbb"
+ vf_component: "%index%"
+ vm_instance_num: "%index%_vm_instance_num_%index%_hhh_%index%%index%%index%_pppp%index%"
+ vnf_id:
+ vf_module_id: [{ get_param: vf_module_id }, "%index%", fff%index% ]
+ bootimage: { get_param: bootimage }
+ flavor:
+ a: a
+ b:
+ aa: [sss,dddd%index%ppp, sd]
+ ppp: "%index%_pppp___%index%"
+ eeee: eeeeeee
+ e: "%index%"
+ w: "%index%_pp"
+ key_name: [a,b,"%index%",p%index%]
+ availability_zone_0: { get_param: availability_zone_0 }
+ sec_groups: { get_param: sec_groups }
+ mgmt_net_id: { get_param: mgmt_net_id }
+ virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 }
+ mvs_mgmt_ip_0: mvs_mgmt_ip_0
+ indx: "%index%"
+
+ mvs_modules_custIndexVar1:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: 2
+ index_var: myIndex
+ resource_def:
+ type: mvs.nested.heat.yaml
+ properties:
+ cloud_zone_id: cloud_zone_id_myIndex
+ vf_name: "myIndexvf_name"
+ vf_instance_num: "vf_instance_num_myIndex_bbbb"
+ vf_component: "myIndex"
+ vm_instance_num: "myIndex_vm_instance_num_myIndex_hhh_myIndexmyIndexmyIndex_ppppmyIndex"
+ vnf_id:
+ vf_module_id: [{ get_param: vf_module_id }, "myIndex", fffmyIndex ]
+ bootimage: { get_param: bootimage }
+ flavor:
+ a: a
+ b: b
+ e: myIndex
+ w: myIndex_pp
+ key_name: [a,b,myIndex,pmyIndex]
+ availability_zone_0: { get_param: availability_zone_0 }
+ sec_groups: { get_param: sec_groups }
+ mgmt_net_id: { get_param: mgmt_net_id }
+ virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 }
+ mvs_mgmt_ip_0: mvs_mgmt_ip_0
+ indx: "myIndex"
+
+ mvs_modules_custIndexVar2:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: 2
+ index_var: "%myIndex%"
+ resource_def:
+ type: mvs.nested.heat.yaml
+ properties:
+ cloud_zone_id: cloud_zone_id_%myIndex%
+ vf_name: "%myIndex%vf_name"
+ vf_instance_num: "vf_instance_num_%myIndex%_bbbb"
+ vf_component: "%myIndex%"
+ vm_instance_num: "%myIndex%_vm_instance_num_%myIndex%_hhh_%myIndex%%myIndex%%myIndex%_pppp%myIndex%"
+ vnf_id:
+ vf_module_id: [{ get_param: vf_module_id }, "%myIndex%", fff%myIndex% ]
+ bootimage: { get_param: bootimage }
+ flavor:
+ a: a
+ b: b
+ e: "%myIndex%"
+ w: "%myIndex%_pp"
+ key_name: [a,b,"%myIndex%",p%myIndex%]
+ availability_zone_0: { get_param: availability_zone_0 }
+ sec_groups: { get_param: sec_groups }
+ mgmt_net_id: { get_param: mgmt_net_id }
+ virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 }
+ mvs_mgmt_ip_0: mvs_mgmt_ip_0
+ indx: "%myIndex%"
+
+ not_supported_resourceGroup1:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: 3
+ resource_def:
+ type: OS::Heat::ResourceGroup
+ properties:
+ cloud_zone_id: { get_param: cloud_zone_id }
+ vf_name: { get_param: vf_name }
+ vf_instance_num: { get_param: vf_instance_num }
+ vf_component: { get_param: vf_component }
+ vm_instance_num: { get_param: vm_instance_num }
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ bootimage: { get_param: bootimage }
+ flavor: { get_param: flavor }
+ key_name: { get_param: key_name }
+ availability_zone_0: { get_param: availability_zone_0 }
+ sec_groups: { get_param: sec_groups }
+ mgmt_net_id: { get_param: mgmt_net_id }
+ virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 }
+ mvs_mgmt_ip_0: { get_param: mvs_mgmt_ip_0 }
+ indx: "%index%"
+
+ not_supported_resourceGroup2:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: 3
+ resource_def:
+ type: { get_param: type_name }
+ properties:
+ cloud_zone_id: { get_param: cloud_zone_id }
+ vf_name: { get_param: vf_name }
+ vf_instance_num: { get_param: vf_instance_num }
+ vf_component: { get_param: vf_component }
+ vm_instance_num: { get_param: vm_instance_num }
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ bootimage: { get_param: bootimage }
+ flavor: { get_param: flavor }
+ key_name: { get_param: key_name }
+ availability_zone_0: { get_param: availability_zone_0 }
+ sec_groups: { get_param: sec_groups }
+ mgmt_net_id: { get_param: mgmt_net_id }
+ virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 }
+ mvs_mgmt_ip_0: { get_param: mvs_mgmt_ip_0 }
+ indx: "%index%"
+
+ server_compute_get_attr_test:
+ type: OS::Nova::Server
+ properties:
+ config_drive: {get_attr: [mvs_modules_defaultIndexVar]}
+ name: compute_name
+ image: { get_param: compute_image_name }
+ flavor: compute_flavor_name
+ user_data_format: { get_attr: [mvs_modules_defaultIndexVar , resource.1.vnfci_id_1] }
+ user_data: { get_attr: [mvs_modules_defaultIndexVar, resource.vnfci_id_2]}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupInvalid/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupInvalid/inputs/MANIFEST.json
new file mode 100644
index 0000000000..c7729c8653
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupInvalid/inputs/MANIFEST.json
@@ -0,0 +1,19 @@
+{
+ "name": "mvs.vfmodule.heat.yaml",
+ "description": "Metaswitch MVS (Metaview Server)",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "mvs.vfmodule.heat.yaml",
+ "type": "HEAT",
+ "data": [
+ ]
+ },
+ {
+ "file": "mvs.nested.heat.yaml",
+ "type": "HEAT",
+ "data": [
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupInvalid/inputs/mvs.nested.heat.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupInvalid/inputs/mvs.nested.heat.yaml
new file mode 100644
index 0000000000..01adb51d71
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupInvalid/inputs/mvs.nested.heat.yaml
@@ -0,0 +1,129 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Metaswitch MVS (Metaview Server)
+
+parameters:
+ cloud_zone_id:
+ type: string
+ description: The cloud zone for this VF instance
+ vf_name:
+ type: string
+ description: The VF Name; defaults to VMVM for the virtual MVM VNF.
+ constraints:
+ - allowed_pattern: "[a-zA-Z0-9]+"
+ - length: { min: 4, max: 4 }
+ description: Each VF will have a 4-character alphanumeric identifier
+ vf_instance_num:
+ type: string
+ description: The number for this VF instance
+ constraints:
+ - allowed_pattern: "[0-9]+"
+ - length: { min: 2, max: 2 }
+ description: VF instance number must be a two-digit numeric value
+ vf_component:
+ type: string
+ description: The component that this VF instance is running
+ constraints:
+ - allowed_pattern: "[a-zA-Z0-9]+"
+ - length: { min: 3, max: 3 }
+ description: Each VF component will have a 3-character alphanumeric identifier
+ vm_instance_num:
+ type: comma_delimited_list
+ description: VM instance number list must be a list of three-digit numeric value
+ vnf_id:
+ type: string
+ description: Unique ID for this VF instance
+ vf_module_id:
+ type: string
+ description: Unique ID for this VF_MODULE instance
+ bootimage:
+ type: string
+ description: Master bootimage volume id
+ flavor:
+ type: string
+ description: Server flavor
+ constraints:
+ - custom_constraint: nova.flavor
+ key_name:
+ type: string
+ description: SSH key name
+ constraints:
+ - custom_constraint: nova.keypair
+
+ availability_zone_0:
+ type: comma_delimited_list
+ description: List of Availability Zone IDs or Names
+
+ sec_groups:
+ type: comma_delimited_list
+ description: Security groups
+ mgmt_net_id:
+ type: string
+ description: Neutron UUID for the Management network
+ constraints:
+ - custom_constraint: neutron.network
+ virtual_mgmt_ip_0:
+ type: string
+ description: Virtual management network ip address
+
+ mvs_mgmt_ip_0:
+ type: comma_delimited_list
+ description: List of Management network IP addresses for IPv4
+
+ indx:
+ type: number
+ description: Index of the current instance
+
+resources:
+ mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ name:
+ str_replace:
+ template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-mgmt-port
+ params:
+ $CLOUD_ZONE_ID: { get_param: cloud_zone_id }
+ $VF_NAME: { get_param: vf_name }
+ $VF_INSTANCE_NUM: { get_param: vf_instance_num }
+ $VF_COMPONENT: { get_param: vf_component }
+ $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] }
+ network_id: { get_param: mgmt_net_id }
+ security_groups: [{ get_param: sec_groups }]
+
+ fixed_ips:
+ - ip_address: { "Fn::Select" : [ { get_param: indx }, { get_param: [{ get_param: mvs_mgmt_ip_0 }] } ] }
+
+ allowed_address_pairs:
+ - ip_address: { get_param: virtual_mgmt_ip_0 }
+
+
+
+ vnfci:
+ type: OS::Nova::Server
+ properties:
+ name:
+ str_replace:
+ template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM
+ params:
+ $CLOUD_ZONE_ID: { get_param: cloud_zone_id }
+ $VF_NAME: { get_param: vf_name }
+ $VF_INSTANCE_NUM: { get_param: vf_instance_num }
+ $VF_COMPONENT: { get_param: vf_component }
+ $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] }
+ flavor: { get_param: flavor }
+ key_name: { get_param: key_name }
+ networks:
+ - port: { get_resource: mgmt_port }
+
+ availability_zone: { "Fn::Select" : [ { get_param: indx }, { get_param: [availability_zone_0] } ] }
+
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+
+outputs:
+ vnfci_id_1:
+ value: { get_resource: vnfci }
+ vnfci_id_2:
+ value: { get_resource: vnfci } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupInvalid/inputs/mvs.vfmodule.heat.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupInvalid/inputs/mvs.vfmodule.heat.yaml
new file mode 100644
index 0000000000..d71dd81fbf
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupInvalid/inputs/mvs.vfmodule.heat.yaml
@@ -0,0 +1,166 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Metaswitch MVS (Metaview Server)
+
+parameters:
+ cloud_zone_id:
+ type: string
+ description: The cloud zone for this VF instance
+ index_parameter:
+ type: string
+ vf_name:
+ type: string
+ description: The VF Name; defaults to VMVM for the virtual MVM VNF.
+ constraints:
+ - allowed_pattern: "[a-zA-Z0-9]+"
+ - length: { min: 4, max: 4 }
+ description: Each VF will have a 4-character alphanumeric identifier
+ vf_instance_num:
+ type: string
+ description: The number for this VF instance
+ constraints:
+ - allowed_pattern: "[0-9]+"
+ - length: { min: 2, max: 2 }
+ description: VF instance number must be a two-digit numeric value
+ vf_component:
+ type: string
+ description: The component that this VF instance is running
+ constraints:
+ - allowed_pattern: "[a-zA-Z0-9]+"
+ - length: { min: 3, max: 3 }
+ description: Each VF component will have a 3-character alphanumeric identifier
+ vm_instance_num:
+ type: comma_delimited_list
+ description: VM instance number list must be a list of three-digit numeric value
+ vnf_id:
+ type: string
+ description: Unique ID for this VF instance
+ vf_module_id:
+ type: string
+ description: Unique ID for this VF_MODULE instance
+ bootimage:
+ type: string
+ description: Master bootimage volume id
+ flavor:
+ type: string
+ description: Server flavor
+ constraints:
+ - custom_constraint: nova.flavor
+ key_name:
+ type: string
+ description: SSH key name
+ constraints:
+ - custom_constraint: nova.keypair
+ type_name:
+ type: string
+ availability_zone_0:
+ type: comma_delimited_list
+ description: List of Availability Zone IDs or Names
+
+ sec_groups:
+ type: comma_delimited_list
+ description: Security groups
+ mgmt_net_id:
+ type: string
+ description: Neutron UUID for the Management network
+ constraints:
+ - custom_constraint: neutron.network
+ virtual_mgmt_ip_0:
+ type: string
+ description: Virtual management network ip address
+
+ mvs_mgmt_ip_0:
+ type: comma_delimited_list
+ description: List of Management network IP addresses for IPv4
+
+ num_instances:
+ type: number
+ description: number of instance of the VF_module
+
+ compute_image_name:
+ type: string
+
+resources:
+ mvs_modules:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: 3
+ index_var: { get_param: index_parameter }
+ resource_def:
+ type: mvs.nested.heat.yaml
+ properties:
+ cloud_zone_id: { get_param: cloud_zone_id }
+ vf_name: { get_param: vf_name }
+ vf_instance_num: { get_param: vf_instance_num }
+ vf_component: { get_param: vf_component }
+ vm_instance_num: { get_param: vm_instance_num }
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ bootimage: { get_param: bootimage }
+ flavor: { get_param: flavor }
+ key_name: { get_param: key_name }
+ availability_zone_0: { get_param: availability_zone_0 }
+ sec_groups: { get_param: sec_groups }
+ mgmt_net_id: { get_param: mgmt_net_id }
+ virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 }
+ mvs_mgmt_ip_0: { get_param: mvs_mgmt_ip_0 }
+ indx: "%index%"
+
+ not_supported_resourceGroup1:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: 3
+ resource_def:
+ type: OS::Heat::ResourceGroup
+ properties:
+ cloud_zone_id: { get_param: cloud_zone_id }
+ vf_name: { get_param: vf_name }
+ vf_instance_num: { get_param: vf_instance_num }
+ vf_component: { get_param: vf_component }
+ vm_instance_num: { get_param: vm_instance_num }
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ bootimage: { get_param: bootimage }
+ flavor: { get_param: flavor }
+ key_name: { get_param: key_name }
+ availability_zone_0: { get_param: availability_zone_0 }
+ sec_groups: { get_param: sec_groups }
+ mgmt_net_id: { get_param: mgmt_net_id }
+ virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 }
+ mvs_mgmt_ip_0: { get_param: mvs_mgmt_ip_0 }
+ indx: "%index%"
+
+ not_supported_resourceGroup2:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: 3
+ resource_def:
+ type: { get_param: type_name }
+ properties:
+ cloud_zone_id: { get_param: cloud_zone_id }
+ vf_name: { get_param: vf_name }
+ vf_instance_num: { get_param: vf_instance_num }
+ vf_component: { get_param: vf_component }
+ vm_instance_num: { get_param: vm_instance_num }
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ bootimage: { get_param: bootimage }
+ flavor: { get_param: flavor }
+ key_name: { get_param: key_name }
+ availability_zone_0: { get_param: availability_zone_0 }
+ sec_groups: { get_param: sec_groups }
+ mgmt_net_id: { get_param: mgmt_net_id }
+ virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 }
+ mvs_mgmt_ip_0: { get_param: mvs_mgmt_ip_0 }
+ indx: "%index%"
+
+ server_compute_get_attr_test:
+ type: OS::Nova::Server
+ properties:
+ config_drive: {get_attr: [mvs_modules]}
+ name: compute_name
+ image: { get_param: compute_image_name }
+ flavor: compute_flavor_name
+ user_data_format: { get_attr: [mvs_modules , resource.1.vnfci_id_1] }
+ user_data: { get_attr: [mvs_modules, resource.vnfci_id_2]}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..ec3b692135
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,153 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.dns_nested_01:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ vf_module_id:
+ type: string
+ description: Unique ID for this VF module instance
+ name_with_index:
+ type: string
+ description: name parameter which will include the index value
+ dns_int_bearer_ips:
+ type: list
+ description: DNS Bearer IP list
+ entry_schema:
+ type: string
+ vnf_name:
+ type: string
+ description: Unique name for this VF instance
+ index:
+ type: float
+ description: index parameter
+ security_group:
+ type: string
+ description: security group
+ oam_protected_net_name:
+ type: string
+ description: OAM network where instaces will connect
+ dns_oam_protected_ips:
+ type: list
+ description: DNS OAM IP list
+ entry_schema:
+ type: string
+ dns_key:
+ type: string
+ description: server key
+ int_bearer_net_name:
+ type: string
+ description: Bearer network where instaces will connect
+ route_eth0:
+ type: string
+ description: OAM network routes
+ dns_names:
+ type: list
+ description: server name
+ entry_schema:
+ type: string
+ vnf_id:
+ type: string
+ description: Unique ID for this VF instance
+ availability_zone_0:
+ type: string
+ description: availability zone ID or Name
+ dns_image_name:
+ type: string
+ description: server image
+ dns_int_bearer_ipv6_ips:
+ type: list
+ description: fixed IPv6 assignment for VM's on the Bearer network
+ entry_schema:
+ type: string
+ dns_flavor_name:
+ type: string
+ description: server flavor
+ requirements:
+ - link_dns_oam_protected_0_port:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_dns_int_bearer_0_port:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_dns_servers:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ capabilities:
+ host_dns_servers:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_dns_int_bearer_0_port:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_dns_oam_protected_0_port:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_dns_servers:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_dns_servers:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_dns_servers:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_dns_servers:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..6eae1ff185
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,246 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ vf_module_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VF module instance
+ dns_int_bearer_ips:
+ hidden: false
+ immutable: false
+ type: list
+ description: DNS Bearer IP list
+ entry_schema:
+ type: string
+ vnf_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique name for this VF instance
+ oam_protected_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM network where instaces will connect
+ dns_oam_protected_ips:
+ hidden: false
+ immutable: false
+ type: list
+ description: DNS OAM IP list
+ entry_schema:
+ type: string
+ dns_key:
+ hidden: false
+ immutable: false
+ type: string
+ description: creator's ssh public key
+ int_bearer_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Bearer network where instaces will connect
+ route_eth0:
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM network routes
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VF instance
+ availability_zone_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: availability zone ID or Name
+ DNS_shared_sec_grp_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: security group UUID
+ node_count:
+ hidden: false
+ immutable: false
+ type: float
+ description: the number of DNS nested instances
+ default: 4
+ dns_image_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: operative system image
+ default: NIMBUS_DNS_3.0.2.qcow2
+ dns_int_bearer_ipv6_ips:
+ hidden: false
+ immutable: false
+ type: list
+ description: fixed IP assignment for VM's on the Bearer network
+ entry_schema:
+ type: string
+ dns_server_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: DNS VM server name list
+ entry_schema:
+ type: string
+ dns_flavor_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: resources to by appplied on instances
+ default: nv.c4r4d80
+ node_templates:
+ dns_server_group_az:
+ type: org.openecomp.resource.abstract.nodes.heat.dns_nested_01
+ directives:
+ - substitutable
+ properties:
+ vf_module_id:
+ get_input: vf_module_id
+ name_with_index:
+ concat:
+ - name_
+ - get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ dns_int_bearer_ips:
+ get_input: dns_int_bearer_ips
+ vnf_name:
+ get_input: vnf_name
+ index:
+ get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ security_group:
+ get_input: DNS_shared_sec_grp_id
+ oam_protected_net_name:
+ get_input: oam_protected_net_name
+ dns_oam_protected_ips:
+ get_input: dns_oam_protected_ips
+ dns_key:
+ get_input: dns_key
+ int_bearer_net_name:
+ get_input: int_bearer_net_name
+ route_eth0:
+ get_input: route_eth0
+ service_template_filter:
+ substitute_service_template: dns_nested_01ServiceTemplate.yaml
+ count:
+ get_input: node_count
+ mandatory: false
+ dns_names:
+ get_input: dns_server_names
+ vnf_id:
+ get_input: vnf_id
+ availability_zone_0:
+ get_input: availability_zone_0
+ dns_image_name:
+ get_input: dns_image_name
+ dns_int_bearer_ipv6_ips:
+ get_input: dns_int_bearer_ipv6_ips
+ dns_flavor_name:
+ get_input: dns_flavor_name
+ DNS_SECURITY_GROUP:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules
+ properties:
+ name:
+ str_replace:
+ template: VF_NAME_sec_grp_DNS
+ params:
+ VF_NAME:
+ get_input: vnf_name
+ description: vscp security group
+ rules:
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ requirements:
+ - port:
+ capability: attachment_dns_int_bearer_0_port
+ node: dns_server_group_az
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: attachment_dns_oam_protected_0_port
+ node: dns_server_group_az
+ relationship: org.openecomp.relationships.AttachesTo
+ groups:
+ base_dns:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/base_dns.yaml
+ description: |
+ Base HOT template to create The Security Group for the the DNS VNF
+ members:
+ - DNS_SECURITY_GROUP
+ dns_az_01:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/dns_az_01.yaml
+ description: DNS master template
+ members:
+ - dns_server_group_az \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/expectedoutputfiles/dns_nested_01ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/expectedoutputfiles/dns_nested_01ServiceTemplate.yaml
new file mode 100644
index 0000000000..db6b3a0179
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/expectedoutputfiles/dns_nested_01ServiceTemplate.yaml
@@ -0,0 +1,249 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: dns_nested_01
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.dns:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ vf_module_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VF module instance
+ name_with_index:
+ hidden: false
+ immutable: false
+ type: string
+ description: name parameter which will include the index value
+ dns_int_bearer_ips:
+ hidden: false
+ immutable: false
+ type: list
+ description: DNS Bearer IP list
+ entry_schema:
+ type: string
+ vnf_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique name for this VF instance
+ index:
+ hidden: false
+ immutable: false
+ type: float
+ description: index parameter
+ security_group:
+ hidden: false
+ immutable: false
+ type: string
+ description: security group
+ oam_protected_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM network where instaces will connect
+ dns_oam_protected_ips:
+ hidden: false
+ immutable: false
+ type: list
+ description: DNS OAM IP list
+ entry_schema:
+ type: string
+ dns_key:
+ hidden: false
+ immutable: false
+ type: string
+ description: server key
+ int_bearer_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Bearer network where instaces will connect
+ route_eth0:
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM network routes
+ dns_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: server name
+ entry_schema:
+ type: string
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VF instance
+ availability_zone_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: availability zone ID or Name
+ dns_image_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: server image
+ dns_int_bearer_ipv6_ips:
+ hidden: false
+ immutable: false
+ type: list
+ description: fixed IPv6 assignment for VM's on the Bearer network
+ entry_schema:
+ type: string
+ dns_flavor_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: server flavor
+ node_templates:
+ dns_oam_protected_0_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: security_group
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - dns_oam_protected_ips
+ - get_input: index
+ name:
+ str_replace:
+ template: VNF_NAME_dns_oam_port
+ params:
+ VNF_NAME:
+ get_input: vnf_name
+ network:
+ get_input: oam_protected_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: dns_servers
+ relationship: tosca.relationships.network.BindsTo
+ dns_int_bearer_0_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: security_group
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - dns_int_bearer_ips
+ - get_input: index
+ - ip_address:
+ get_input:
+ - dns_int_bearer_ipv6_ips
+ - get_input: index
+ name:
+ str_replace:
+ template: VNF_NAME_dns_bearer_port
+ params:
+ VNF_NAME:
+ get_input: vnf_name
+ network:
+ get_input: int_bearer_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: dns_servers
+ relationship: tosca.relationships.network.BindsTo
+ dns_servers:
+ type: org.openecomp.resource.vfc.nodes.heat.dns
+ properties:
+ flavor:
+ get_input: dns_flavor_name
+ key_name:
+ get_input: dns_key
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: dns_image_name
+ metadata:
+ vf_module_id:
+ get_input: vf_module_id
+ vnf_name {get_param: vnf_name }
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - dns_names
+ - get_input: index
+ groups:
+ dns_nested_01:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/dns_nested_01.yaml
+ description: |
+ nested DNS template for a single VM
+ all parameters are passed from calling heat template of resourcegroup
+ members:
+ - dns_oam_protected_0_port
+ - dns_int_bearer_0_port
+ - dns_servers
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.dns_nested_01
+ capabilities:
+ host_dns_servers:
+ - dns_servers
+ - host
+ attachment_dns_int_bearer_0_port:
+ - dns_int_bearer_0_port
+ - attachment
+ attachment_dns_oam_protected_0_port:
+ - dns_oam_protected_0_port
+ - attachment
+ os_dns_servers:
+ - dns_servers
+ - os
+ endpoint_dns_servers:
+ - dns_servers
+ - endpoint
+ binding_dns_servers:
+ - dns_servers
+ - binding
+ scalable_dns_servers:
+ - dns_servers
+ - scalable
+ requirements:
+ local_storage_dns_servers:
+ - dns_servers
+ - local_storage
+ link_dns_oam_protected_0_port:
+ - dns_oam_protected_0_port
+ - link
+ link_dns_int_bearer_0_port:
+ - dns_int_bearer_0_port
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/MANIFEST.json
new file mode 100644
index 0000000000..0fa0f714da
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/MANIFEST.json
@@ -0,0 +1,37 @@
+{
+ "name": "",
+ "description": "",
+ "data": [
+ {
+ "file": "dns_nested_01.yaml",
+ "type": "HEAT",
+ "isBase": "false"
+ },
+ {
+ "file": "base_dns.yaml",
+ "type": "HEAT",
+ "isBase": "true",
+ "data": [
+ {
+ "file": "base_dns.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "dns_az_01.yaml",
+ "type": "HEAT",
+ "isBase": "false",
+ "data": [
+ {
+ "file": "dns_az_01.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "nimbus-willows-2.pem",
+ "type": "OTHER"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/base_dns.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/base_dns.env
new file mode 100644
index 0000000000..3ab724f7ab
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/base_dns.env
@@ -0,0 +1,8 @@
+##NIMBUS - DNS Base Template ENV File
+#AUTHORS:
+
+#####################
+parameters:
+#####################
+
+# vnf_name: 'zrdm3mdns01'
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/base_dns.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/base_dns.yaml
new file mode 100644
index 0000000000..821f10212f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/base_dns.yaml
@@ -0,0 +1,43 @@
+heat_template_version: 2015-04-30
+#Nimbus DNS Base Template
+#AUTHORS:
+description: >
+ Base HOT template to create The Security Group for the the DNS VNF
+
+#####################
+parameters:
+#####################
+
+## GLOBAL//Basic Parameters
+ vnf_name:
+ type: string
+ description: Unique name for this VF instance
+# For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC
+
+#####################
+resources:
+#####################
+
+ DNS_SECURITY_GROUP:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: vscp security group
+ name:
+ str_replace:
+ template: VF_NAME_sec_grp_DNS
+ params:
+ VF_NAME: {get_param: vnf_name}
+ rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0}
+ ]
+
+
+outputs:
+ DNS_shared_sec_grp_id:
+ description: UUID of DNS Resource SecurityGroup
+ value: { get_resource: DNS_SECURITY_GROUP }
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/dns_az_01.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/dns_az_01.env
new file mode 100644
index 0000000000..8e0e80c67f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/dns_az_01.env
@@ -0,0 +1,21 @@
+parameters:
+ dns_image_name: NIMBUS_DNS_3.0.2.qcow2
+ dns_flavor_name: nv.c4r4d80
+# dns_key: nimbus-willows-1
+# oam_protected_net_name: MNS-25180-L-06Shared_OAM_PROTECTED_NET_1
+# int_bearer_net_name: Nimbus-25193-T-Willows1_int_fw_dns_trusted_net_1
+ node_count: 4
+# dns_oam_protected_ips: 107.239.81.114,107.239.81.115,107.239.81.116,107.239.81.117
+# dns_int_bearer_ips: 172.26.18.64,172.26.18.65,172.26.18.66,172.26.18.67
+# dns_int_bearer_ipv6_ips: fd00:2600:2600:101::40,fd00:2600:2600:101::41,fd00:2600:2600:101::42,fd00:2600:2600:101::43
+# dns_server_names: zrdm3mdns01cmd001,zrdm3mdns01cmd002,zrdm3mdns01cmd003,zrdm3mdns01cmd004
+# route_eth0: |
+# 10.147.38.211/32 via 107.239.81.1 dev eth0
+# 155.165.201.253/32 via 107.239.81.1 dev eth0
+# 141.204.0.0/16 via 107.239.81.1 dev eth0
+# DNS_shared_sec_grp_id: 5f809b4c-a1af-4064-86ef-0aebb761a749
+# availability_zone_0: rdm3-kvm-az01
+# vnf_name: 'zrdm3mdns01'
+# vnf_id: 'dummy'
+# vf_module_id: 'dummy'
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/dns_az_01.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/dns_az_01.yaml
new file mode 100644
index 0000000000..84aacaba35
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/dns_az_01.yaml
@@ -0,0 +1,94 @@
+heat_template_version: 2014-10-16
+
+description: DNS master template
+
+parameters:
+ dns_image_name:
+ type: string
+ description: operative system image
+ dns_flavor_name:
+ type: string
+ description: resources to by appplied on instances
+ dns_key:
+ type: string
+ description: creator's ssh public key
+ node_count:
+ type: number
+ description: the number of DNS nested instances
+ oam_protected_net_name:
+ type: string
+ description: OAM network where instaces will connect
+ int_bearer_net_name:
+ type: string
+ description: Bearer network where instaces will connect
+ dns_oam_protected_ips:
+ type: comma_delimited_list
+ description: DNS OAM IP list
+ dns_int_bearer_ips:
+ type: comma_delimited_list
+ description: DNS Bearer IP list
+ dns_int_bearer_ipv6_ips:
+ type: comma_delimited_list
+ description: fixed IP assignment for VM's on the Bearer network
+ dns_server_names:
+ type: comma_delimited_list
+ description: DNS VM server name list
+ route_eth0:
+ type: string
+ description: OAM network routes
+ DNS_shared_sec_grp_id:
+ type: string
+ description: security group UUID
+ availability_zone_0:
+ type: string
+ description: availability zone ID or Name
+ vnf_name:
+ type: string
+ description: Unique name for this VF instance
+# For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC
+ vnf_id:
+ type: string
+ description: Unique ID for this VF instance
+# For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC
+ vf_module_id:
+ type: string
+ description: Unique ID for this VF module instance
+# For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC
+
+
+resources:
+ dns_server_group_az:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: { get_param: node_count }
+ index_var: index
+ resource_def:
+ type: dns_nested_01.yaml
+ properties:
+ index: index
+ name_with_index: name_index
+ dns_image_name: { get_param: dns_image_name }
+ dns_flavor_name: { get_param: dns_flavor_name }
+ dns_key: { get_param: dns_key }
+ availability_zone_0: { get_param: availability_zone_0 }
+ security_group: { get_param: DNS_shared_sec_grp_id }
+ oam_protected_net_name: { get_param: oam_protected_net_name }
+ int_bearer_net_name: { get_param: int_bearer_net_name }
+ dns_oam_protected_ips: { get_param: dns_oam_protected_ips }
+ dns_int_bearer_ips: { get_param: dns_int_bearer_ips }
+ dns_int_bearer_ipv6_ips: { get_param: dns_int_bearer_ipv6_ips }
+ dns_names: { get_param: dns_server_names }
+ route_eth0: { get_param: route_eth0 }
+ vnf_name: { get_param: vnf_name }
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: {get_param: vf_module_id}
+
+#outputs:
+# vm_name:
+# description: VM name
+# value: { get_attr: [ dns_server_group_az, vm_name ] }
+# networks:
+# description: networks
+# value: { get_attr: [ dns_server_group_az, networks ] }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/dns_nested_01.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/dns_nested_01.yaml
new file mode 100644
index 0000000000..5be9d49bb0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/dns_nested_01.yaml
@@ -0,0 +1,127 @@
+heat_template_version: 2014-10-16
+
+description: |
+ nested DNS template for a single VM
+ all parameters are passed from calling heat template of resourcegroup
+
+parameters:
+ dns_image_name:
+ type: string
+ description: server image
+ dns_flavor_name:
+ type: string
+ description: server flavor
+ dns_key:
+ type: string
+ description: server key
+ oam_protected_net_name:
+ type: string
+ description: OAM network where instaces will connect
+ int_bearer_net_name:
+ type: string
+ description: Bearer network where instaces will connect
+ dns_oam_protected_ips:
+ type: comma_delimited_list
+ description: DNS OAM IP list
+ dns_int_bearer_ips:
+ type: comma_delimited_list
+ description: DNS Bearer IP list
+ dns_int_bearer_ipv6_ips:
+ type: comma_delimited_list
+ description: fixed IPv6 assignment for VM's on the Bearer network
+ dns_names:
+ type: comma_delimited_list
+ description: server name
+ route_eth0:
+ type: string
+ description: OAM network routes
+ index:
+ type: number
+ description: index parameter
+ name_with_index:
+ type: string
+ description: name parameter which will include the index value
+ security_group:
+ type: string
+ description: security group
+ availability_zone_0:
+ type: string
+ description: availability zone ID or Name
+# this parameter does not follow the D2 Guidelines. This value will be az0 or az1.
+ vnf_name:
+ type: string
+ description: Unique name for this VF instance
+# For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC
+ vnf_id:
+ type: string
+ description: Unique ID for this VF instance
+# For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC
+ vf_module_id:
+ type: string
+ description: Unique ID for this VF module instance
+# For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC
+
+
+resources:
+
+ dns_oam_protected_0_port:
+ type: OS::Neutron::Port
+ properties:
+ name:
+ str_replace:
+ template: VNF_NAME_dns_oam_port
+ params:
+ VNF_NAME: {get_param: vnf_name}
+ network: { get_param: oam_protected_net_name }
+ fixed_ips: [{ "ip_address": { get_param: [ dns_oam_protected_ips, get_param: index ]}}]
+ security_groups: [{ get_param: security_group }]
+
+ dns_int_bearer_0_port:
+ type: OS::Neutron::Port
+ properties:
+ name:
+ str_replace:
+ template: VNF_NAME_dns_bearer_port
+ params:
+ VNF_NAME: {get_param: vnf_name}
+ network: { get_param: int_bearer_net_name }
+ fixed_ips: [{ "ip_address": { get_param: [ dns_int_bearer_ips, get_param: index ]}}, { "ip_address": { get_param: [ dns_int_bearer_ipv6_ips, get_param: index ]}}]
+ security_groups: [{ get_param: security_group }]
+
+ dns_servers:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [ dns_names, get_param: index ] }
+ image: { get_param: dns_image_name }
+ flavor: { get_param: dns_flavor_name }
+ key_name: { get_param: dns_key }
+ availability_zone: { get_param: availability_zone_0 }
+ networks:
+ - port: { get_resource: dns_oam_protected_0_port }
+ - port: { get_resource: dns_int_bearer_0_port }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ vnf_name {get_param: vnf_name }
+ user_data_format: RAW
+ user_data: { get_resource: server_interface_config }
+
+ server_interface_config:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/route-eth0
+ permissions: "0644"
+# content: { get_file: route-eth0 }
+ content: { get_param: route_eth0 }
+
+#outputs:
+# vm_name:
+# description: VM name
+# value: { get_attr: [ dns_servers, name] }
+# networks:
+# description: networks
+# value: { get_attr: [ dns_servers, networks ] }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/nimbus-willows-2.pem b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/nimbus-willows-2.pem
new file mode 100644
index 0000000000..ca613f176c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/nimbus-willows-2.pem
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEA4JxAkJFmleoEjBIs+ZHH1yYn0uFtLnN2JX7alC9t/4LUgShK
+CWHg+NZgCp1rCCfEZ16OMIlJViaw3i50BwSbh71vHHLfgpbKuCaxVblSsokWJf1P
+vNjcpb1uE4/GgAGTOvVpBJ67aSFL2cqN0RRmoDkXD0Es0Oog7X2/DSXex6rSfWrh
+I6RplcvljEOp3svhZxrCM5B9byn9931eja0NpJmggDQqzlrh6s01iqQKSZ3C6Cp4
+g0YMff3FP6b6xWbt/2wK2aR5/so64LZmBbxJHgBkQOAUsUdt6aWgx9lUKAly1KFo
+4+E67IX9k6KR/ZA67hny2UHg5Rz9J/YTvJYT5QIDAQABAoIBAFnh7Wxs4zKGzX8I
+HvtYPTJ50GHxV/HIvrTOiMXYHRqszkFJUCdlBdROZWyaBiTjVRNQoXIG3lQdc5XV
+3RSZ4Wt2gSpPReZKVaFPypNVcCSF+1kEf45A8jtZDN3DIVpERxjG8Fmq87BkZKgp
+CItssIzZi8LNABQyPS8MrRGj3/ziPMNqyMaZao+nI4sQVoVIID5LMhCjFby5Afx9
+6DHOMgkySCqhUVox9rG9sNSyStElJaIUyrel0ZM51C6zMbKftrHcgRyzCbJSzSGy
+yMFyAQCc+OzJ5ulcHMMSGrwsQv1EN5ck4W5SjUUPS90a7LdAi5Qap6nkLrOaieKc
+Xt/p+xkCgYEA/yqPa9jQMAHEj8aPpbZ8M+25m0hfrojYm0AdpVceHKualI8mfNOC
+J+Y8ivMcmx5dey1Y+SlQZCv+nOKaJPz6yIppZLoDVm1JCcV4n16NtCWbGma/QGKL
+QDxfC2WdMLjCRFYOFXg6PQybYL0a4jjNMB7MmgHv0PGojzxVnk2Tw3cCgYEA4Vgh
+/dHncYAFWgG3g8zNbWqWOwJVT9Qxk4wX5KJbwSrumGXcvJFpYWhXZqZB9UF32n0f
+bIb+N0swa0MmU+aXM0iBsUxaso7nPeiKuszzZ43/Z4xckkoPJfkw0VXAD5W0z+7i
+bQW+lDjbH0i/xty0LWrCJzCUVfYPCK84qXpm4oMCgYEA37r6jA5L5Hv4VDQ+yYbq
++kErp/raYld8zQt3svxi27KfVDj7/yEZE1DtrsuhPmVug81sIPPXmC13DyolC9+B
+KIssA/SRbpteGiI6NEqcpuL+TzTd5l9BR65ni7+qBwlI1NA7gxmqvtKp/jVxN/+j
+8dhff33JP4RUTlsRmz7cG9sCgYBBxE4PXQ6WMo3dSfj8T255C42S5Uhuxvg9Hrru
+cHAk/VmrQrdclXfTBPfVLpq7cIMBUlk0fGV/T8Nu2qc5/2eLgRLQ4v7pdAmLKO4s
+PJqhU3ECEJYH3/Nx2rtjrQojwkaGFSsiNHX9nmZdSAcoi8tOIgVOGMCCIhEbMMBx
+vhZ+7wKBgQDizYvqTOyODzi3cebk7LzbSg+r1cNE9onvCVej+pnznt5oQtniAzS6
+GbGyKsDHDtmQ15tXdnU2KkTcsXEs9nFxIsOR2QZtQRcMSuRtye5o2qPXf0HdHW/M
+5mheJi2LfaNP5csauJ/WUJYbAS4cn7dz4xUos+7la58upB/or+Q/cg==
+-----END RSA PRIVATE KEY-----
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..15b5e3b3a8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,161 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ vf_module_id:
+ type: string
+ description: Unique ID for this VF_MODULE instance
+ vf_name:
+ type: string
+ description: The VF Name; defaults to VMVM for the virtual MVM VNF.
+ constraints:
+ - pattern: '[a-zA-Z0-9]+'
+ - max_length: 4
+ - min_length: 4
+ cloud_zone_id:
+ type: string
+ description: The cloud zone for this VF instance
+ vf_instance_num:
+ type: string
+ description: The number for this VF instance
+ constraints:
+ - pattern: '[0-9]+'
+ - max_length: 2
+ - min_length: 2
+ virtual_mgmt_ip_0:
+ type: string
+ description: Virtual management network ip address
+ indx:
+ type: float
+ description: Index of the current instance
+ mvs_mgmt_ip_0:
+ type: list
+ description: List of Management network IP addresses for IPv4
+ entry_schema:
+ type: string
+ flavor:
+ type: string
+ description: Server flavor
+ constraints: [
+ ]
+ key_name:
+ type: string
+ description: SSH key name
+ constraints: [
+ ]
+ vnf_id:
+ type: string
+ description: Unique ID for this VF instance
+ availability_zone_0:
+ type: list
+ description: List of Availability Zone IDs or Names
+ entry_schema:
+ type: string
+ mgmt_net_id:
+ type: string
+ description: Neutron UUID for the Management network
+ constraints: [
+ ]
+ vm_instance_num:
+ type: list
+ description: VM instance number list must be a list of three-digit numeric value
+ entry_schema:
+ type: string
+ bootimage:
+ type: string
+ description: Master bootimage volume id
+ sec_groups:
+ type: list
+ description: Security groups
+ entry_schema:
+ type: string
+ vf_component:
+ type: string
+ description: The component that this VF instance is running
+ constraints:
+ - pattern: '[a-zA-Z0-9]+'
+ - max_length: 3
+ - min_length: 3
+ attributes:
+ vnfci_id_2:
+ type: string
+ vnfci_id_1:
+ type: string
+ requirements:
+ - local_storage_vnfci:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_mgmt_port:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ os_vnfci:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_mgmt_port:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_vnfci:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_vnfci:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_vnfci:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_vnfci:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..632afc51b3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,223 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.compute:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ vf_module_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VF_MODULE instance
+ vf_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: The VF Name; defaults to VMVM for the virtual MVM VNF.
+ constraints:
+ - pattern: '[a-zA-Z0-9]+'
+ - max_length: 4
+ - min_length: 4
+ type_name:
+ hidden: false
+ immutable: false
+ type: string
+ cloud_zone_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: The cloud zone for this VF instance
+ vf_instance_num:
+ hidden: false
+ immutable: false
+ type: string
+ description: The number for this VF instance
+ constraints:
+ - pattern: '[0-9]+'
+ - max_length: 2
+ - min_length: 2
+ virtual_mgmt_ip_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: Virtual management network ip address
+ mvs_mgmt_ip_0:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of Management network IP addresses for IPv4
+ entry_schema:
+ type: string
+ compute_image_name:
+ hidden: false
+ immutable: false
+ type: string
+ flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Server flavor
+ constraints: [
+ ]
+ key_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: SSH key name
+ constraints: [
+ ]
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VF instance
+ availability_zone_0:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of Availability Zone IDs or Names
+ entry_schema:
+ type: string
+ mgmt_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Neutron UUID for the Management network
+ constraints: [
+ ]
+ vm_instance_num:
+ hidden: false
+ immutable: false
+ type: list
+ description: VM instance number list must be a list of three-digit numeric value
+ entry_schema:
+ type: string
+ bootimage:
+ hidden: false
+ immutable: false
+ type: string
+ description: Master bootimage volume id
+ sec_groups:
+ hidden: false
+ immutable: false
+ type: list
+ description: Security groups
+ entry_schema:
+ type: string
+ vf_component:
+ hidden: false
+ immutable: false
+ type: string
+ description: The component that this VF instance is running
+ constraints:
+ - pattern: '[a-zA-Z0-9]+'
+ - max_length: 3
+ - min_length: 3
+ num_instances:
+ hidden: false
+ immutable: false
+ type: float
+ description: number of instance of the VF_module
+ node_templates:
+ mvs_modules:
+ type: org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat
+ directives:
+ - substitutable
+ properties:
+ vf_module_id:
+ get_input: vf_module_id
+ vf_name:
+ get_input: vf_name
+ cloud_zone_id:
+ get_input: cloud_zone_id
+ vf_instance_num:
+ get_input: vf_instance_num
+ virtual_mgmt_ip_0:
+ get_input: virtual_mgmt_ip_0
+ indx:
+ get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ mvs_mgmt_ip_0:
+ get_input: mvs_mgmt_ip_0
+ flavor:
+ get_input: flavor
+ key_name:
+ get_input: key_name
+ service_template_filter:
+ substitute_service_template: mvs.nested.heatServiceTemplate.yaml
+ count: 3
+ mandatory: true
+ vnf_id:
+ get_input: vnf_id
+ availability_zone_0:
+ get_input: availability_zone_0
+ mgmt_net_id:
+ get_input: mgmt_net_id
+ vm_instance_num:
+ get_input: vm_instance_num
+ bootimage:
+ get_input: bootimage
+ sec_groups:
+ get_input: sec_groups
+ vf_component:
+ get_input: vf_component
+ server_compute_get_attr_test:
+ type: org.openecomp.resource.vfc.nodes.heat.compute
+ properties:
+ flavor: compute_flavor_name
+ image:
+ get_input: compute_image_name
+ config_drive:
+ get_attribute:
+ - mvs_modules
+ - vnfci_id_1
+ - vnfci_id_2
+ user_data_format:
+ get_attribute:
+ - mvs_modules
+ - vnfci_id_1
+ - 1
+ name: compute_name
+ groups:
+ mvs.vfmodule.heat:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/mvs.vfmodule.heat.yaml
+ description: |
+ Metaswitch MVS (Metaview Server)
+ members:
+ - mvs_modules
+ - server_compute_get_attr_test \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml
new file mode 100644
index 0000000000..11369f9b68
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml
@@ -0,0 +1,254 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: mvs.nested.heat
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.vnfci:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ vf_module_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VF_MODULE instance
+ vf_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: The VF Name; defaults to VMVM for the virtual MVM VNF.
+ constraints:
+ - pattern: '[a-zA-Z0-9]+'
+ - max_length: 4
+ - min_length: 4
+ cloud_zone_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: The cloud zone for this VF instance
+ vf_instance_num:
+ hidden: false
+ immutable: false
+ type: string
+ description: The number for this VF instance
+ constraints:
+ - pattern: '[0-9]+'
+ - max_length: 2
+ - min_length: 2
+ virtual_mgmt_ip_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: Virtual management network ip address
+ indx:
+ hidden: false
+ immutable: false
+ type: float
+ description: Index of the current instance
+ mvs_mgmt_ip_0:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of Management network IP addresses for IPv4
+ entry_schema:
+ type: string
+ flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Server flavor
+ constraints: [
+ ]
+ key_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: SSH key name
+ constraints: [
+ ]
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VF instance
+ availability_zone_0:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of Availability Zone IDs or Names
+ entry_schema:
+ type: string
+ mgmt_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Neutron UUID for the Management network
+ constraints: [
+ ]
+ vm_instance_num:
+ hidden: false
+ immutable: false
+ type: list
+ description: VM instance number list must be a list of three-digit numeric value
+ entry_schema:
+ type: string
+ bootimage:
+ hidden: false
+ immutable: false
+ type: string
+ description: Master bootimage volume id
+ sec_groups:
+ hidden: false
+ immutable: false
+ type: list
+ description: Security groups
+ entry_schema:
+ type: string
+ vf_component:
+ hidden: false
+ immutable: false
+ type: string
+ description: The component that this VF instance is running
+ constraints:
+ - pattern: '[a-zA-Z0-9]+'
+ - max_length: 3
+ - min_length: 3
+ node_templates:
+ vnfci:
+ type: org.openecomp.resource.vfc.nodes.heat.vnfci
+ properties:
+ flavor:
+ get_input: flavor
+ key_name:
+ get_input: key_name
+ availability_zone:
+ Fn::Select:
+ - get_input: indx
+ - get_input:
+ - availability_zone_0
+ name:
+ str_replace:
+ template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM
+ params:
+ $VF_NAME:
+ get_input: vf_name
+ $CLOUD_ZONE_ID:
+ get_input: cloud_zone_id
+ $VM_INSTANCE_NUM:
+ Fn::Select:
+ - get_input: indx
+ - get_input:
+ - vm_instance_num
+ $VF_COMPONENT:
+ get_input: vf_component
+ $VF_INSTANCE_NUM:
+ get_input: vf_instance_num
+ mgmt_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: sec_groups
+ fixed_ips:
+ - ip_address:
+ Fn::Select:
+ - get_input: indx
+ - get_input:
+ - get_input: mvs_mgmt_ip_0
+ allowed_address_pairs:
+ - ip_address:
+ get_input: virtual_mgmt_ip_0
+ name:
+ str_replace:
+ template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-mgmt-port
+ params:
+ $VF_NAME:
+ get_input: vf_name
+ $CLOUD_ZONE_ID:
+ get_input: cloud_zone_id
+ $VM_INSTANCE_NUM:
+ Fn::Select:
+ - get_input: indx
+ - get_input:
+ - vm_instance_num
+ $VF_COMPONENT:
+ get_input: vf_component
+ $VF_INSTANCE_NUM:
+ get_input: vf_instance_num
+ network:
+ get_input: mgmt_net_id
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: vnfci
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ mvs.nested.heat:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/mvs.nested.heat.yaml
+ description: |
+ Metaswitch MVS (Metaview Server)
+ members:
+ - vnfci
+ - mgmt_port
+ outputs:
+ vnfci_id_2:
+ value: vnfci
+ vnfci_id_1:
+ value: vnfci
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat
+ capabilities:
+ os_vnfci:
+ - vnfci
+ - os
+ attachment_mgmt_port:
+ - mgmt_port
+ - attachment
+ endpoint_vnfci:
+ - vnfci
+ - endpoint
+ host_vnfci:
+ - vnfci
+ - host
+ binding_vnfci:
+ - vnfci
+ - binding
+ scalable_vnfci:
+ - vnfci
+ - scalable
+ requirements:
+ local_storage_vnfci:
+ - vnfci
+ - local_storage
+ link_mgmt_port:
+ - mgmt_port
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/inputs/MANIFEST.json
new file mode 100644
index 0000000000..c7729c8653
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/inputs/MANIFEST.json
@@ -0,0 +1,19 @@
+{
+ "name": "mvs.vfmodule.heat.yaml",
+ "description": "Metaswitch MVS (Metaview Server)",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "mvs.vfmodule.heat.yaml",
+ "type": "HEAT",
+ "data": [
+ ]
+ },
+ {
+ "file": "mvs.nested.heat.yaml",
+ "type": "HEAT",
+ "data": [
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/inputs/mvs.nested.heat.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/inputs/mvs.nested.heat.yaml
new file mode 100644
index 0000000000..01adb51d71
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/inputs/mvs.nested.heat.yaml
@@ -0,0 +1,129 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Metaswitch MVS (Metaview Server)
+
+parameters:
+ cloud_zone_id:
+ type: string
+ description: The cloud zone for this VF instance
+ vf_name:
+ type: string
+ description: The VF Name; defaults to VMVM for the virtual MVM VNF.
+ constraints:
+ - allowed_pattern: "[a-zA-Z0-9]+"
+ - length: { min: 4, max: 4 }
+ description: Each VF will have a 4-character alphanumeric identifier
+ vf_instance_num:
+ type: string
+ description: The number for this VF instance
+ constraints:
+ - allowed_pattern: "[0-9]+"
+ - length: { min: 2, max: 2 }
+ description: VF instance number must be a two-digit numeric value
+ vf_component:
+ type: string
+ description: The component that this VF instance is running
+ constraints:
+ - allowed_pattern: "[a-zA-Z0-9]+"
+ - length: { min: 3, max: 3 }
+ description: Each VF component will have a 3-character alphanumeric identifier
+ vm_instance_num:
+ type: comma_delimited_list
+ description: VM instance number list must be a list of three-digit numeric value
+ vnf_id:
+ type: string
+ description: Unique ID for this VF instance
+ vf_module_id:
+ type: string
+ description: Unique ID for this VF_MODULE instance
+ bootimage:
+ type: string
+ description: Master bootimage volume id
+ flavor:
+ type: string
+ description: Server flavor
+ constraints:
+ - custom_constraint: nova.flavor
+ key_name:
+ type: string
+ description: SSH key name
+ constraints:
+ - custom_constraint: nova.keypair
+
+ availability_zone_0:
+ type: comma_delimited_list
+ description: List of Availability Zone IDs or Names
+
+ sec_groups:
+ type: comma_delimited_list
+ description: Security groups
+ mgmt_net_id:
+ type: string
+ description: Neutron UUID for the Management network
+ constraints:
+ - custom_constraint: neutron.network
+ virtual_mgmt_ip_0:
+ type: string
+ description: Virtual management network ip address
+
+ mvs_mgmt_ip_0:
+ type: comma_delimited_list
+ description: List of Management network IP addresses for IPv4
+
+ indx:
+ type: number
+ description: Index of the current instance
+
+resources:
+ mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ name:
+ str_replace:
+ template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-mgmt-port
+ params:
+ $CLOUD_ZONE_ID: { get_param: cloud_zone_id }
+ $VF_NAME: { get_param: vf_name }
+ $VF_INSTANCE_NUM: { get_param: vf_instance_num }
+ $VF_COMPONENT: { get_param: vf_component }
+ $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] }
+ network_id: { get_param: mgmt_net_id }
+ security_groups: [{ get_param: sec_groups }]
+
+ fixed_ips:
+ - ip_address: { "Fn::Select" : [ { get_param: indx }, { get_param: [{ get_param: mvs_mgmt_ip_0 }] } ] }
+
+ allowed_address_pairs:
+ - ip_address: { get_param: virtual_mgmt_ip_0 }
+
+
+
+ vnfci:
+ type: OS::Nova::Server
+ properties:
+ name:
+ str_replace:
+ template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM
+ params:
+ $CLOUD_ZONE_ID: { get_param: cloud_zone_id }
+ $VF_NAME: { get_param: vf_name }
+ $VF_INSTANCE_NUM: { get_param: vf_instance_num }
+ $VF_COMPONENT: { get_param: vf_component }
+ $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] }
+ flavor: { get_param: flavor }
+ key_name: { get_param: key_name }
+ networks:
+ - port: { get_resource: mgmt_port }
+
+ availability_zone: { "Fn::Select" : [ { get_param: indx }, { get_param: [availability_zone_0] } ] }
+
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+
+outputs:
+ vnfci_id_1:
+ value: { get_resource: vnfci }
+ vnfci_id_2:
+ value: { get_resource: vnfci } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/inputs/mvs.vfmodule.heat.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/inputs/mvs.vfmodule.heat.yaml
new file mode 100644
index 0000000000..380ceae2ff
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/inputs/mvs.vfmodule.heat.yaml
@@ -0,0 +1,163 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Metaswitch MVS (Metaview Server)
+
+parameters:
+ cloud_zone_id:
+ type: string
+ description: The cloud zone for this VF instance
+ vf_name:
+ type: string
+ description: The VF Name; defaults to VMVM for the virtual MVM VNF.
+ constraints:
+ - allowed_pattern: "[a-zA-Z0-9]+"
+ - length: { min: 4, max: 4 }
+ description: Each VF will have a 4-character alphanumeric identifier
+ vf_instance_num:
+ type: string
+ description: The number for this VF instance
+ constraints:
+ - allowed_pattern: "[0-9]+"
+ - length: { min: 2, max: 2 }
+ description: VF instance number must be a two-digit numeric value
+ vf_component:
+ type: string
+ description: The component that this VF instance is running
+ constraints:
+ - allowed_pattern: "[a-zA-Z0-9]+"
+ - length: { min: 3, max: 3 }
+ description: Each VF component will have a 3-character alphanumeric identifier
+ vm_instance_num:
+ type: comma_delimited_list
+ description: VM instance number list must be a list of three-digit numeric value
+ vnf_id:
+ type: string
+ description: Unique ID for this VF instance
+ vf_module_id:
+ type: string
+ description: Unique ID for this VF_MODULE instance
+ bootimage:
+ type: string
+ description: Master bootimage volume id
+ flavor:
+ type: string
+ description: Server flavor
+ constraints:
+ - custom_constraint: nova.flavor
+ key_name:
+ type: string
+ description: SSH key name
+ constraints:
+ - custom_constraint: nova.keypair
+ type_name:
+ type: string
+ availability_zone_0:
+ type: comma_delimited_list
+ description: List of Availability Zone IDs or Names
+
+ sec_groups:
+ type: comma_delimited_list
+ description: Security groups
+ mgmt_net_id:
+ type: string
+ description: Neutron UUID for the Management network
+ constraints:
+ - custom_constraint: neutron.network
+ virtual_mgmt_ip_0:
+ type: string
+ description: Virtual management network ip address
+
+ mvs_mgmt_ip_0:
+ type: comma_delimited_list
+ description: List of Management network IP addresses for IPv4
+
+ num_instances:
+ type: number
+ description: number of instance of the VF_module
+
+ compute_image_name:
+ type: string
+
+resources:
+ mvs_modules:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: 3
+ resource_def:
+ type: mvs.nested.heat.yaml
+ properties:
+ cloud_zone_id: { get_param: cloud_zone_id }
+ vf_name: { get_param: vf_name }
+ vf_instance_num: { get_param: vf_instance_num }
+ vf_component: { get_param: vf_component }
+ vm_instance_num: { get_param: vm_instance_num }
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ bootimage: { get_param: bootimage }
+ flavor: { get_param: flavor }
+ key_name: { get_param: key_name }
+ availability_zone_0: { get_param: availability_zone_0 }
+ sec_groups: { get_param: sec_groups }
+ mgmt_net_id: { get_param: mgmt_net_id }
+ virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 }
+ mvs_mgmt_ip_0: { get_param: mvs_mgmt_ip_0 }
+ indx: "%index%"
+
+ not_supported_resourceGroup1:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: 3
+ resource_def:
+ type: OS::Heat::ResourceGroup
+ properties:
+ cloud_zone_id: { get_param: cloud_zone_id }
+ vf_name: { get_param: vf_name }
+ vf_instance_num: { get_param: vf_instance_num }
+ vf_component: { get_param: vf_component }
+ vm_instance_num: { get_param: vm_instance_num }
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ bootimage: { get_param: bootimage }
+ flavor: { get_param: flavor }
+ key_name: { get_param: key_name }
+ availability_zone_0: { get_param: availability_zone_0 }
+ sec_groups: { get_param: sec_groups }
+ mgmt_net_id: { get_param: mgmt_net_id }
+ virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 }
+ mvs_mgmt_ip_0: { get_param: mvs_mgmt_ip_0 }
+ indx: "%index%"
+
+ not_supported_resourceGroup2:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: 3
+ resource_def:
+ type: { get_param: type_name }
+ properties:
+ cloud_zone_id: { get_param: cloud_zone_id }
+ vf_name: { get_param: vf_name }
+ vf_instance_num: { get_param: vf_instance_num }
+ vf_component: { get_param: vf_component }
+ vm_instance_num: { get_param: vm_instance_num }
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ bootimage: { get_param: bootimage }
+ flavor: { get_param: flavor }
+ key_name: { get_param: key_name }
+ availability_zone_0: { get_param: availability_zone_0 }
+ sec_groups: { get_param: sec_groups }
+ mgmt_net_id: { get_param: mgmt_net_id }
+ virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 }
+ mvs_mgmt_ip_0: { get_param: mvs_mgmt_ip_0 }
+ indx: "%index%"
+
+ server_compute_get_attr_test:
+ type: OS::Nova::Server
+ properties:
+ config_drive: {get_attr: [mvs_modules]}
+ name: compute_name
+ image: { get_param: compute_image_name }
+ flavor: compute_flavor_name
+ user_data_format: { get_attr: [mvs_modules , resource.1.vnfci_id_1] }
+ user_data: { get_attr: [mvs_modules, resource.vnfci_id_2]}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..1b1c4dd621
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,166 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ vf_module_id:
+ type: string
+ description: Unique ID for this VF_MODULE instance
+ vf_name:
+ type: string
+ description: The VF Name; defaults to VMVM for the virtual MVM VNF.
+ constraints:
+ - pattern: '[a-zA-Z0-9]+'
+ - max_length: 4
+ - min_length: 4
+ cloud_zone_id:
+ type: string
+ description: The cloud zone for this VF instance
+ vf_instance_num:
+ type: string
+ description: The number for this VF instance
+ constraints:
+ - pattern: '[0-9]+'
+ - max_length: 2
+ - min_length: 2
+ virtual_mgmt_ip_0:
+ type: string
+ description: Virtual management network ip address
+ indx:
+ type: float
+ description: Index of the current instance
+ mvs_mgmt_ip_0:
+ type: list
+ description: List of Management network IP addresses for IPv4
+ entry_schema:
+ type: string
+ flavor:
+ type: string
+ description: Server flavor
+ constraints: [
+ ]
+ key_name:
+ type: string
+ description: SSH key name
+ constraints: [
+ ]
+ vnf_id:
+ type: string
+ description: Unique ID for this VF instance
+ availability_zone_0:
+ type: list
+ description: List of Availability Zone IDs or Names
+ entry_schema:
+ type: string
+ mgmt_net_id:
+ type: string
+ description: Neutron UUID for the Management network
+ constraints: [
+ ]
+ vm_instance_num:
+ type: list
+ description: VM instance number list must be a list of three-digit numeric value
+ entry_schema:
+ type: string
+ bootimage:
+ type: string
+ description: Master bootimage volume id
+ sec_groups:
+ type: list
+ description: Security groups
+ entry_schema:
+ type: string
+ vf_component:
+ type: string
+ description: The component that this VF instance is running
+ constraints:
+ - pattern: '[a-zA-Z0-9]+'
+ - max_length: 3
+ - min_length: 3
+ requirements:
+ - local_storage_vnfci:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_mgmt_port:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ os_vnfci:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_mgmt_port:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_vnfci:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_vnfci:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_vnfci:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_boot_volume:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_vnfci:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_data_volume:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..b3b1349b36
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,195 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ vf_module_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VF_MODULE instance
+ vf_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: The VF Name; defaults to VMVM for the virtual MVM VNF.
+ constraints:
+ - pattern: '[a-zA-Z0-9]+'
+ - max_length: 4
+ - min_length: 4
+ cloud_zone_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: The cloud zone for this VF instance
+ vf_instance_num:
+ hidden: false
+ immutable: false
+ type: string
+ description: The number for this VF instance
+ constraints:
+ - pattern: '[0-9]+'
+ - max_length: 2
+ - min_length: 2
+ virtual_mgmt_ip_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: Virtual management network ip address
+ mvs_mgmt_ip_0:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of Management network IP addresses for IPv4
+ entry_schema:
+ type: string
+ flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Server flavor
+ constraints: [
+ ]
+ key_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: SSH key name
+ constraints: [
+ ]
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VF instance
+ availability_zone_0:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of Availability Zone IDs or Names
+ entry_schema:
+ type: string
+ mgmt_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Neutron UUID for the Management network
+ constraints: [
+ ]
+ vm_instance_num:
+ hidden: false
+ immutable: false
+ type: list
+ description: VM instance number list must be a list of three-digit numeric value
+ entry_schema:
+ type: string
+ bootimage:
+ hidden: false
+ immutable: false
+ type: string
+ description: Master bootimage volume id
+ sec_groups:
+ hidden: false
+ immutable: false
+ type: list
+ description: Security groups
+ entry_schema:
+ type: string
+ vf_component:
+ hidden: false
+ immutable: false
+ type: string
+ description: The component that this VF instance is running
+ constraints:
+ - pattern: '[a-zA-Z0-9]+'
+ - max_length: 3
+ - min_length: 3
+ num_instances:
+ hidden: false
+ immutable: false
+ type: float
+ description: number of instance of the VF_module
+ node_templates:
+ mvs_modules:
+ type: org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat
+ directives:
+ - substitutable
+ properties:
+ vf_module_id:
+ get_input: vf_module_id
+ vf_name:
+ get_input: vf_name
+ cloud_zone_id:
+ get_input: cloud_zone_id
+ vf_instance_num:
+ get_input: vf_instance_num
+ virtual_mgmt_ip_0:
+ get_input: virtual_mgmt_ip_0
+ indx:
+ get_property:
+ - SELF
+ - service_template_filter
+ - index_value
+ mvs_mgmt_ip_0:
+ get_input: mvs_mgmt_ip_0
+ flavor:
+ get_input: flavor
+ key_name:
+ get_input: key_name
+ service_template_filter:
+ substitute_service_template: mvs.nested.heatServiceTemplate.yaml
+ count:
+ get_input: num_instances
+ mandatory: false
+ vnf_id:
+ get_input: vnf_id
+ availability_zone_0:
+ get_input: availability_zone_0
+ mgmt_net_id:
+ get_input: mgmt_net_id
+ vm_instance_num:
+ get_input: vm_instance_num
+ bootimage:
+ get_input: bootimage
+ sec_groups:
+ get_input: sec_groups
+ vf_component:
+ get_input: vf_component
+ groups:
+ mvs.vfmodule.heat:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/mvs.vfmodule.heat.yaml
+ description: |
+ Metaswitch MVS (Metaview Server)
+ members:
+ - mvs_modules \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml
new file mode 100644
index 0000000000..315318d4f6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml
@@ -0,0 +1,320 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: mvs.nested.heat
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.vnfci:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ vf_module_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VF_MODULE instance
+ vf_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: The VF Name; defaults to VMVM for the virtual MVM VNF.
+ constraints:
+ - pattern: '[a-zA-Z0-9]+'
+ - max_length: 4
+ - min_length: 4
+ cloud_zone_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: The cloud zone for this VF instance
+ vf_instance_num:
+ hidden: false
+ immutable: false
+ type: string
+ description: The number for this VF instance
+ constraints:
+ - pattern: '[0-9]+'
+ - max_length: 2
+ - min_length: 2
+ virtual_mgmt_ip_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: Virtual management network ip address
+ indx:
+ hidden: false
+ immutable: false
+ type: float
+ description: Index of the current instance
+ mvs_mgmt_ip_0:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of Management network IP addresses for IPv4
+ entry_schema:
+ type: string
+ flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Server flavor
+ constraints: [
+ ]
+ key_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: SSH key name
+ constraints: [
+ ]
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VF instance
+ availability_zone_0:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of Availability Zone IDs or Names
+ entry_schema:
+ type: string
+ mgmt_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Neutron UUID for the Management network
+ constraints: [
+ ]
+ vm_instance_num:
+ hidden: false
+ immutable: false
+ type: list
+ description: VM instance number list must be a list of three-digit numeric value
+ entry_schema:
+ type: string
+ bootimage:
+ hidden: false
+ immutable: false
+ type: string
+ description: Master bootimage volume id
+ sec_groups:
+ hidden: false
+ immutable: false
+ type: list
+ description: Security groups
+ entry_schema:
+ type: string
+ vf_component:
+ hidden: false
+ immutable: false
+ type: string
+ description: The component that this VF instance is running
+ constraints:
+ - pattern: '[a-zA-Z0-9]+'
+ - max_length: 3
+ - min_length: 3
+ node_templates:
+ boot_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ availability_zone:
+ Fn::Select:
+ - get_input: indx
+ - get_input:
+ - availability_zone_0
+ image:
+ get_input: bootimage
+ size: 35*1024
+ name:
+ str_replace:
+ template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-boot-volume
+ params:
+ $VF_NAME:
+ get_input: vf_name
+ $CLOUD_ZONE_ID:
+ get_input: cloud_zone_id
+ $VM_INSTANCE_NUM:
+ Fn::Select:
+ - get_input: indx
+ - get_input:
+ - vm_instance_num
+ $VF_COMPONENT:
+ get_input: vf_component
+ $VF_INSTANCE_NUM:
+ get_input: vf_instance_num
+ vnfci:
+ type: org.openecomp.resource.vfc.nodes.heat.vnfci
+ properties:
+ flavor:
+ get_input: flavor
+ key_name:
+ get_input: key_name
+ availability_zone:
+ Fn::Select:
+ - get_input: indx
+ - get_input:
+ - availability_zone_0
+ name:
+ str_replace:
+ template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM
+ params:
+ $VF_NAME:
+ get_input: vf_name
+ $CLOUD_ZONE_ID:
+ get_input: cloud_zone_id
+ $VM_INSTANCE_NUM:
+ Fn::Select:
+ - get_input: indx
+ - get_input:
+ - vm_instance_num
+ $VF_COMPONENT:
+ get_input: vf_component
+ $VF_INSTANCE_NUM:
+ get_input: vf_instance_num
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: boot_volume
+ relationship: tosca.relationships.AttachesTo
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: data_volume
+ relationship: tosca.relationships.AttachesTo
+ data_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ availability_zone:
+ Fn::Select:
+ - get_input: indx
+ - get_input:
+ - availability_zone_0
+ size: 265*1024
+ name:
+ str_replace:
+ template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-data-volume
+ params:
+ $VF_NAME:
+ get_input: vf_name
+ $CLOUD_ZONE_ID:
+ get_input: cloud_zone_id
+ $VM_INSTANCE_NUM:
+ Fn::Select:
+ - get_input: indx
+ - get_input:
+ - vm_instance_num
+ $VF_COMPONENT:
+ get_input: vf_component
+ $VF_INSTANCE_NUM:
+ get_input: vf_instance_num
+ mgmt_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: sec_groups
+ fixed_ips:
+ - ip_address:
+ Fn::Select:
+ - get_input: indx
+ - get_input:
+ - get_input: mvs_mgmt_ip_0
+ allowed_address_pairs:
+ - ip_address:
+ get_input: virtual_mgmt_ip_0
+ name:
+ str_replace:
+ template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-mgmt-port
+ params:
+ $VF_NAME:
+ get_input: vf_name
+ $CLOUD_ZONE_ID:
+ get_input: cloud_zone_id
+ $VM_INSTANCE_NUM:
+ Fn::Select:
+ - get_input: indx
+ - get_input:
+ - vm_instance_num
+ $VF_COMPONENT:
+ get_input: vf_component
+ $VF_INSTANCE_NUM:
+ get_input: vf_instance_num
+ network:
+ get_input: mgmt_net_id
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: vnfci
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ mvs.nested.heat:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/mvs.nested.heat.yaml
+ description: |
+ Metaswitch MVS (Metaview Server)
+ members:
+ - boot_volume
+ - vnfci
+ - data_volume
+ - mgmt_port
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat
+ capabilities:
+ os_vnfci:
+ - vnfci
+ - os
+ attachment_mgmt_port:
+ - mgmt_port
+ - attachment
+ endpoint_vnfci:
+ - vnfci
+ - endpoint
+ host_vnfci:
+ - vnfci
+ - host
+ binding_vnfci:
+ - vnfci
+ - binding
+ attachment_boot_volume:
+ - boot_volume
+ - attachment
+ scalable_vnfci:
+ - vnfci
+ - scalable
+ attachment_data_volume:
+ - data_volume
+ - attachment
+ requirements:
+ local_storage_vnfci:
+ - vnfci
+ - local_storage
+ link_mgmt_port:
+ - mgmt_port
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/inputs/MANIFEST.json
new file mode 100644
index 0000000000..c7729c8653
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/inputs/MANIFEST.json
@@ -0,0 +1,19 @@
+{
+ "name": "mvs.vfmodule.heat.yaml",
+ "description": "Metaswitch MVS (Metaview Server)",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "mvs.vfmodule.heat.yaml",
+ "type": "HEAT",
+ "data": [
+ ]
+ },
+ {
+ "file": "mvs.nested.heat.yaml",
+ "type": "HEAT",
+ "data": [
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/inputs/mvs.nested.heat.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/inputs/mvs.nested.heat.yaml
new file mode 100644
index 0000000000..8ddc5c6488
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/inputs/mvs.nested.heat.yaml
@@ -0,0 +1,165 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Metaswitch MVS (Metaview Server)
+
+parameters:
+ cloud_zone_id:
+ type: string
+ description: The cloud zone for this VF instance
+ vf_name:
+ type: string
+ description: The VF Name; defaults to VMVM for the virtual MVM VNF.
+ constraints:
+ - allowed_pattern: "[a-zA-Z0-9]+"
+ - length: { min: 4, max: 4 }
+ description: Each VF will have a 4-character alphanumeric identifier
+ vf_instance_num:
+ type: string
+ description: The number for this VF instance
+ constraints:
+ - allowed_pattern: "[0-9]+"
+ - length: { min: 2, max: 2 }
+ description: VF instance number must be a two-digit numeric value
+ vf_component:
+ type: string
+ description: The component that this VF instance is running
+ constraints:
+ - allowed_pattern: "[a-zA-Z0-9]+"
+ - length: { min: 3, max: 3 }
+ description: Each VF component will have a 3-character alphanumeric identifier
+ vm_instance_num:
+ type: comma_delimited_list
+ description: VM instance number list must be a list of three-digit numeric value
+ vnf_id:
+ type: string
+ description: Unique ID for this VF instance
+ vf_module_id:
+ type: string
+ description: Unique ID for this VF_MODULE instance
+ bootimage:
+ type: string
+ description: Master bootimage volume id
+ flavor:
+ type: string
+ description: Server flavor
+ constraints:
+ - custom_constraint: nova.flavor
+ key_name:
+ type: string
+ description: SSH key name
+ constraints:
+ - custom_constraint: nova.keypair
+
+ availability_zone_0:
+ type: comma_delimited_list
+ description: List of Availability Zone IDs or Names
+
+ sec_groups:
+ type: comma_delimited_list
+ description: Security groups
+ mgmt_net_id:
+ type: string
+ description: Neutron UUID for the Management network
+ constraints:
+ - custom_constraint: neutron.network
+ virtual_mgmt_ip_0:
+ type: string
+ description: Virtual management network ip address
+
+ mvs_mgmt_ip_0:
+ type: comma_delimited_list
+ description: List of Management network IP addresses for IPv4
+
+ indx:
+ type: number
+ description: Index of the current instance
+
+resources:
+ mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ name:
+ str_replace:
+ template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-mgmt-port
+ params:
+ $CLOUD_ZONE_ID: { get_param: cloud_zone_id }
+ $VF_NAME: { get_param: vf_name }
+ $VF_INSTANCE_NUM: { get_param: vf_instance_num }
+ $VF_COMPONENT: { get_param: vf_component }
+ $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] }
+ network_id: { get_param: mgmt_net_id }
+ security_groups: [{ get_param: sec_groups }]
+
+ fixed_ips:
+ - ip_address: { "Fn::Select" : [ { get_param: indx }, { get_param: [{ get_param: mvs_mgmt_ip_0 }] } ] }
+
+ allowed_address_pairs:
+ - ip_address: { get_param: virtual_mgmt_ip_0 }
+
+ boot_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: 35
+ name:
+ str_replace:
+ template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-boot-volume
+ params:
+ $CLOUD_ZONE_ID: { get_param: cloud_zone_id }
+ $VF_NAME: { get_param: vf_name }
+ $VF_INSTANCE_NUM: { get_param: vf_instance_num }
+ $VF_COMPONENT: { get_param: vf_component }
+ $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] }
+
+ image: { get_param: bootimage }
+
+
+ availability_zone: { "Fn::Select" : [ { get_param: indx }, { get_param: [availability_zone_0] } ] }
+
+
+ data_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: 265
+ name:
+ str_replace:
+ template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-data-volume
+ params:
+ $CLOUD_ZONE_ID: { get_param: cloud_zone_id }
+ $VF_NAME: { get_param: vf_name }
+ $VF_INSTANCE_NUM: { get_param: vf_instance_num }
+ $VF_COMPONENT: { get_param: vf_component }
+ $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] }
+
+ availability_zone: { "Fn::Select" : [ { get_param: indx }, { get_param: [availability_zone_0] } ] }
+
+
+ vnfci:
+ type: OS::Nova::Server
+ properties:
+ name:
+ str_replace:
+ template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM
+ params:
+ $CLOUD_ZONE_ID: { get_param: cloud_zone_id }
+ $VF_NAME: { get_param: vf_name }
+ $VF_INSTANCE_NUM: { get_param: vf_instance_num }
+ $VF_COMPONENT: { get_param: vf_component }
+ $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] }
+ block_device_mapping:
+ - device_name: vda
+ volume_id: { get_resource: boot_volume }
+ delete_on_termination: false
+ - device_name: vdb
+ volume_id: { get_resource: data_volume }
+ delete_on_termination: false
+ flavor: { get_param: flavor }
+ key_name: { get_param: key_name }
+ networks:
+ - port: { get_resource: mgmt_port }
+
+ availability_zone: { "Fn::Select" : [ { get_param: indx }, { get_param: [availability_zone_0] } ] }
+
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/inputs/mvs.vfmodule.heat.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/inputs/mvs.vfmodule.heat.yaml
new file mode 100644
index 0000000000..95ca069bf8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/inputs/mvs.vfmodule.heat.yaml
@@ -0,0 +1,105 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Metaswitch MVS (Metaview Server)
+
+parameters:
+ cloud_zone_id:
+ type: string
+ description: The cloud zone for this VF instance
+ vf_name:
+ type: string
+ description: The VF Name; defaults to VMVM for the virtual MVM VNF.
+ constraints:
+ - allowed_pattern: "[a-zA-Z0-9]+"
+ - length: { min: 4, max: 4 }
+ description: Each VF will have a 4-character alphanumeric identifier
+ vf_instance_num:
+ type: string
+ description: The number for this VF instance
+ constraints:
+ - allowed_pattern: "[0-9]+"
+ - length: { min: 2, max: 2 }
+ description: VF instance number must be a two-digit numeric value
+ vf_component:
+ type: string
+ description: The component that this VF instance is running
+ constraints:
+ - allowed_pattern: "[a-zA-Z0-9]+"
+ - length: { min: 3, max: 3 }
+ description: Each VF component will have a 3-character alphanumeric identifier
+ vm_instance_num:
+ type: comma_delimited_list
+ description: VM instance number list must be a list of three-digit numeric value
+ vnf_id:
+ type: string
+ description: Unique ID for this VF instance
+ vf_module_id:
+ type: string
+ description: Unique ID for this VF_MODULE instance
+ bootimage:
+ type: string
+ description: Master bootimage volume id
+ flavor:
+ type: string
+ description: Server flavor
+ constraints:
+ - custom_constraint: nova.flavor
+ key_name:
+ type: string
+ description: SSH key name
+ constraints:
+ - custom_constraint: nova.keypair
+
+ availability_zone_0:
+ type: comma_delimited_list
+ description: List of Availability Zone IDs or Names
+
+ sec_groups:
+ type: comma_delimited_list
+ description: Security groups
+ mgmt_net_id:
+ type: string
+ description: Neutron UUID for the Management network
+ constraints:
+ - custom_constraint: neutron.network
+ virtual_mgmt_ip_0:
+ type: string
+ description: Virtual management network ip address
+
+ mvs_mgmt_ip_0:
+ type: comma_delimited_list
+ description: List of Management network IP addresses for IPv4
+
+ num_instances:
+ type: number
+ description: number of instance of the VF_module
+
+resources:
+ mvs_modules:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: { get_param: num_instances }
+ resource_def:
+ type: mvs.nested.heat.yaml
+ properties:
+ cloud_zone_id: { get_param: cloud_zone_id }
+ vf_name: { get_param: vf_name }
+ vf_instance_num: { get_param: vf_instance_num }
+ vf_component: { get_param: vf_component }
+ vm_instance_num: { get_param: vm_instance_num }
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ bootimage: { get_param: bootimage }
+ flavor: { get_param: flavor }
+ key_name: { get_param: key_name }
+
+ availability_zone_0: { get_param: availability_zone_0 }
+
+ sec_groups: { get_param: sec_groups }
+ mgmt_net_id: { get_param: mgmt_net_id }
+ virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 }
+
+ mvs_mgmt_ip_0: { get_param: mvs_mgmt_ip_0 }
+
+ indx: "%index%"
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..b99ba37305
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,137 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ availabilityzone_name:
+ type: string
+ description: availabilityzone name
+ oam_net_gw:
+ type: string
+ description: CPS network gateway
+ pcm_image_name:
+ type: string
+ description: PCRF CM image name
+ security_group_name:
+ type: string
+ description: the name of security group
+ cps_net_ip:
+ type: string
+ description: CPS network ip
+ pcm_flavor_name:
+ type: string
+ description: flavor name of PCRF CM instance
+ pcm_vol:
+ type: string
+ description: CPS Cluman Cinder Volume
+ pcm_server_name:
+ type: string
+ description: PCRF CM server name
+ cps_net_name:
+ type: string
+ description: CPS network name
+ cps_net_mask:
+ type: string
+ description: CPS network mask
+ oam_net_ip:
+ type: string
+ description: OAM network ip
+ oam_net_mask:
+ type: string
+ description: CPS network mask
+ oam_net_name:
+ type: string
+ description: OAM network name
+ attributes:
+ server_pcm_id:
+ type: string
+ description: the pcm nova service id
+ requirements:
+ - link_pcm_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_server_pcm:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_pcm_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ endpoint_server_pcm:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_pcm:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_pcm:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_pcm:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_pcm:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_pcm_port_0:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_pcm_port_1:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..ed5854c2fd
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,216 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ oam_net_ips:
+ label: OAM network ips
+ hidden: false
+ immutable: false
+ type: list
+ description: OAM network ips
+ entry_schema:
+ type: string
+ availabilityzone_name:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ oam_net_gw:
+ label: CPS network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network gateway
+ pcm_server_names:
+ label: PCRF CM server names
+ hidden: false
+ immutable: false
+ type: list
+ description: name of the PCRF CM instance
+ entry_schema:
+ type: string
+ pcm_image_name:
+ label: PCRF CM image name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF CM image name
+ cps_net_ips:
+ label: CPS network ips
+ hidden: false
+ immutable: false
+ type: list
+ description: CPS network ips
+ entry_schema:
+ type: string
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ pcm_volumes:
+ label: CPS Cluman Cinder Volume
+ hidden: false
+ immutable: false
+ type: list
+ description: CPS Cluman Cinder Volume
+ entry_schema:
+ type: string
+ pcm_flavor_name:
+ label: PCRF CM flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor name of PCRF CM instance
+ cps_net_name:
+ label: CPS network name
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network name
+ cps_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ oam_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ oam_net_name:
+ label: OAM network name
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM network name
+ node_templates:
+ server_pcm_002:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1
+ directives:
+ - substitutable
+ properties:
+ pcm_flavor_name:
+ get_input: pcm_flavor_name
+ service_template_filter:
+ substitute_service_template: nested-pcm_v0.1ServiceTemplate.yaml
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcm_image_name:
+ get_input: pcm_image_name
+ pcm_vol:
+ get_input:
+ - pcm_volumes
+ - 0
+ security_group_name:
+ get_input: security_group_name
+ pcm_server_name:
+ get_input:
+ - pcm_server_names
+ - 0
+ server_pcm_001:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nested-pcm_v0.1ServiceTemplate.yaml
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ oam_net_gw:
+ get_input: oam_net_gw
+ pcm_vol:
+ get_input:
+ - pcm_volumes
+ - 0
+ security_group_name:
+ get_input: security_group_name
+ cps_net_ip:
+ get_input:
+ - cps_net_ips
+ - 0
+ cps_net_name:
+ get_input: cps_net_name
+ cps_net_mask:
+ get_input: cps_net_mask
+ oam_net_ip:
+ get_input:
+ - oam_net_ips
+ - 0
+ oam_net_mask:
+ get_input: oam_net_mask
+ oam_net_name:
+ get_input: oam_net_name
+ server_pcm_003:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nested-pcm_v0.1ServiceTemplate.yaml
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcm_vol:
+ get_input:
+ - pcm_volumes
+ - 0
+ security_group_name:
+ get_input: security_group_name
+ cps_net_ip:
+ get_input:
+ - cps_net_ips
+ - 0
+ cps_net_name:
+ get_input: cps_net_name
+ cps_net_mask:
+ get_input: cps_net_mask
+ groups:
+ hot-nimbus-pcm_v0.4_2:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot-nimbus-pcm_v0.4_2.yaml
+ description: heat template that creates PCRF Cluman stack
+ members:
+ - server_pcm_003
+ hot-nimbus-pcm_v0.4:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot-nimbus-pcm_v0.4.yaml
+ description: heat template that creates PCRF Cluman stack
+ members:
+ - server_pcm_002
+ - server_pcm_001 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml
new file mode 100644
index 0000000000..1b03021742
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml
@@ -0,0 +1,207 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested-pcm_v0.1
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.pcm_server:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ availabilityzone_name:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ oam_net_gw:
+ label: CPS network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network gateway
+ pcm_image_name:
+ label: image name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF CM image name
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ cps_net_ip:
+ label: CPS network ip
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network ip
+ pcm_flavor_name:
+ label: PCRF CM flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor name of PCRF CM instance
+ pcm_vol:
+ label: CPS Cluman Cinder Volume
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS Cluman Cinder Volume
+ pcm_server_name:
+ label: PCRF CM server name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF CM server name
+ cps_net_name:
+ label: CPS network name
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network name
+ cps_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ oam_net_ip:
+ label: OAM network ip
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM network ip
+ oam_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ oam_net_name:
+ label: OAM network name
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM network name
+ node_templates:
+ pcm_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: oam_net_ip
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pcm
+ relationship: tosca.relationships.network.BindsTo
+ server_pcm:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm_server
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ pcm_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: cps_net_ip
+ network:
+ get_input: cps_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pcm
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested-pcm_v0.1:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested-pcm_v0.1.yaml
+ description: heat template that creates PCRF Cluman stack
+ members:
+ - pcm_port_1
+ - server_pcm
+ - pcm_port_0
+ outputs:
+ server_pcm_id:
+ description: the pcm nova service id
+ value: server_pcm
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1
+ capabilities:
+ endpoint_server_pcm:
+ - server_pcm
+ - endpoint
+ os_server_pcm:
+ - server_pcm
+ - os
+ host_server_pcm:
+ - server_pcm
+ - host
+ scalable_server_pcm:
+ - server_pcm
+ - scalable
+ binding_server_pcm:
+ - server_pcm
+ - binding
+ attachment_pcm_port_0:
+ - pcm_port_0
+ - attachment
+ attachment_pcm_port_1:
+ - pcm_port_1
+ - attachment
+ requirements:
+ link_pcm_port_0:
+ - pcm_port_0
+ - link
+ link_pcm_port_1:
+ - pcm_port_1
+ - link
+ local_storage_server_pcm:
+ - server_pcm
+ - local_storage \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/MANIFEST.json
new file mode 100644
index 0000000000..6f151c4f36
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/MANIFEST.json
@@ -0,0 +1,23 @@
+{
+ "name": "vEP_JSA_Net",
+ "description": "Version 2.0 02-09-2016 (Authors: John Doe, user PROD)",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pcm_v0.4.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pcm_v0.4.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },{
+ "file": "nested-pcm_v0.1.yaml",
+ "type": "HEAT"
+ },{
+ "file": "hot-nimbus-pcm_v0.4_2.yaml",
+ "type": "HEAT"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/hot-nimbus-pcm_v0.4.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/hot-nimbus-pcm_v0.4.env
new file mode 100644
index 0000000000..78cc03e2ea
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/hot-nimbus-pcm_v0.4.env
@@ -0,0 +1,14 @@
+parameters:
+ pcm_server_names: ZRDM1PCRF01PCM001
+ pcm_image_name: rhel2
+ pcm_flavor_name: cps
+ availabilityzone_name: nova
+ cps_net_name: int_pcrf_net_0
+ cps_net_ips: 172.26.16.113
+ cps_net_mask: 255.255.255.0
+ oam_net_name: oam_protected_net_0
+ oam_net_ips: 107.239.64.121
+ oam_net_gw: 107.239.64.1
+ oam_net_mask: 255.255.255.0
+ pcm_volumes: 249cb355-8fdf-4382-9c3c-a2ebe767d45b
+ security_group_name: nimbus_security_group
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/hot-nimbus-pcm_v0.4.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/hot-nimbus-pcm_v0.4.yaml
new file mode 100644
index 0000000000..f7d050790f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/hot-nimbus-pcm_v0.4.yaml
@@ -0,0 +1,82 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Cluman stack
+
+parameters:
+ pcm_server_names:
+ type: comma_delimited_list
+ label: PCRF CM server names
+ description: name of the PCRF CM instance
+ pcm_image_name:
+ type: string
+ label: PCRF CM image name
+ description: PCRF CM image name
+ pcm_flavor_name:
+ type: string
+ label: PCRF CM flavor name
+ description: flavor name of PCRF CM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ oam_net_name:
+ type: string
+ label: OAM network name
+ description: OAM network name
+ oam_net_ips:
+ type: comma_delimited_list
+ label: OAM network ips
+ description: OAM network ips
+ oam_net_gw:
+ type: string
+ label: CPS network gateway
+ description: CPS network gateway
+ oam_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcm_volumes:
+ type: comma_delimited_list
+ label: CPS Cluman Cinder Volume
+ description: CPS Cluman Cinder Volume
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+
+resources:
+ server_pcm_001:
+ type: nested-pcm_v0.1.yaml
+ properties:
+ availabilityzone_name: { get_param: availabilityzone_name }
+ security_group_name: { get_param: security_group_name }
+ pcm_vol: { get_param: [pcm_volumes, 0] }
+ cps_net_name: { get_param: cps_net_name }
+ cps_net_ip: { get_param: [cps_net_ips, 0] }
+ cps_net_mask: { get_param: cps_net_mask }
+ oam_net_name: { get_param: oam_net_name }
+ oam_net_ip: { get_param: [oam_net_ips, 0] }
+ oam_net_mask: { get_param: oam_net_mask }
+ oam_net_gw: { get_param: oam_net_gw }
+
+ server_pcm_002:
+ type: nested-pcm_v0.1.yaml
+ properties:
+ pcm_server_name: { get_param: [pcm_server_names, 0] }
+ pcm_image_name: { get_param: pcm_image_name }
+ pcm_flavor_name: { get_param: pcm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ security_group_name: { get_param: security_group_name }
+ pcm_vol: { get_param: [pcm_volumes, 0] }
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/hot-nimbus-pcm_v0.4_2.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/hot-nimbus-pcm_v0.4_2.yaml
new file mode 100644
index 0000000000..72d84b64a4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/hot-nimbus-pcm_v0.4_2.yaml
@@ -0,0 +1,71 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Cluman stack
+
+parameters:
+ pcm_server_names:
+ type: comma_delimited_list
+ label: PCRF CM server names
+ description: name of the PCRF CM instance
+ pcm_image_name:
+ type: string
+ label: PCRF CM image name
+ description: PCRF CM image name
+ pcm_flavor_name:
+ type: string
+ label: PCRF CM flavor name
+ description: flavor name of PCRF CM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ oam_net_name:
+ type: string
+ label: OAM network name
+ description: OAM network name
+ oam_net_ips:
+ type: comma_delimited_list
+ label: OAM network ips
+ description: OAM network ips
+ oam_net_gw:
+ type: string
+ label: CPS network gateway
+ description: CPS network gateway
+ oam_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcm_volumes:
+ type: comma_delimited_list
+ label: CPS Cluman Cinder Volume
+ description: CPS Cluman Cinder Volume
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+
+resources:
+ server_pcm_003:
+ type: nested-pcm_v0.1.yaml
+ properties:
+ availabilityzone_name: { get_param: availabilityzone_name }
+ security_group_name: { get_param: security_group_name }
+ pcm_vol: { get_param: [pcm_volumes, 0] }
+ cps_net_name: { get_param: cps_net_name }
+ cps_net_ip: { get_param: [cps_net_ips, 0] }
+ cps_net_mask: { get_param: cps_net_mask }
+
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/nested-pcm_v0.1.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/nested-pcm_v0.1.yaml
new file mode 100644
index 0000000000..4e12676aa8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/nested-pcm_v0.1.yaml
@@ -0,0 +1,114 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Cluman stack
+
+parameters:
+ pcm_server_name:
+ type: string
+ label: PCRF CM server name
+ description: PCRF CM server name
+ pcm_image_name:
+ type: string
+ label: image name
+ description: PCRF CM image name
+ pcm_flavor_name:
+ type: string
+ label: PCRF CM flavor name
+ description: flavor name of PCRF CM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ oam_net_name:
+ type: string
+ label: OAM network name
+ description: OAM network name
+ oam_net_ip:
+ type: string
+ label: OAM network ip
+ description: OAM network ip
+ oam_net_gw:
+ type: string
+ label: CPS network gateway
+ description: CPS network gateway
+ oam_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcm_vol:
+ type: string
+ label: CPS Cluman Cinder Volume
+ description: CPS Cluman Cinder Volume
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+
+resources:
+ network:
+ type: net
+ script_init:
+ type: OS:INIT
+ server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ server_pcm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcm_server_name }
+ image: { get_param: pcm_image_name }
+ flavor: { get_param: pcm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcm_port_0}
+ - port: { get_resource: pcm_port_1}
+ block_device_mapping:
+ - device_name: vdb
+ volume_id: { get_param: pcm_vol}
+ user_data_format: RAW
+ user_data:
+ get_resource: server_init
+
+ pcm_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: cps_net_ip }
+ security_groups: [{ get_param: security_group_name }]
+
+ pcm_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips:
+ - ip_address: { get_param: oam_net_ip }
+ security_groups: [{ get_param: security_group_name }]
+
+ #pcm_vol_attachment:
+ # type: OS::Cinder::VolumeAttachment
+ # properties:
+ # volume_id: { get_param: pcm_vol }
+ # mountpoint: /dev/vdb
+ # instance_uuid: { get_resource: server_pcm }
+outputs:
+ server_pcm_id:
+ description: the pcm nova service id
+ value: { get_resource: server_pcm } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..b99ba37305
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,137 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ availabilityzone_name:
+ type: string
+ description: availabilityzone name
+ oam_net_gw:
+ type: string
+ description: CPS network gateway
+ pcm_image_name:
+ type: string
+ description: PCRF CM image name
+ security_group_name:
+ type: string
+ description: the name of security group
+ cps_net_ip:
+ type: string
+ description: CPS network ip
+ pcm_flavor_name:
+ type: string
+ description: flavor name of PCRF CM instance
+ pcm_vol:
+ type: string
+ description: CPS Cluman Cinder Volume
+ pcm_server_name:
+ type: string
+ description: PCRF CM server name
+ cps_net_name:
+ type: string
+ description: CPS network name
+ cps_net_mask:
+ type: string
+ description: CPS network mask
+ oam_net_ip:
+ type: string
+ description: OAM network ip
+ oam_net_mask:
+ type: string
+ description: CPS network mask
+ oam_net_name:
+ type: string
+ description: OAM network name
+ attributes:
+ server_pcm_id:
+ type: string
+ description: the pcm nova service id
+ requirements:
+ - link_pcm_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_server_pcm:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_pcm_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ endpoint_server_pcm:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_pcm:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_pcm:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_pcm:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_pcm:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_pcm_port_0:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_pcm_port_1:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..dcc2a9abbb
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,236 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.compute:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ oam_net_ips:
+ label: OAM network ips
+ hidden: false
+ immutable: false
+ type: list
+ description: OAM network ips
+ default:
+ - 107.239.64.121
+ entry_schema:
+ type: string
+ availabilityzone_name:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ default: nova
+ oam_net_gw:
+ label: CPS network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network gateway
+ default: 107.239.64.1
+ pcm_server_names:
+ label: PCRF CM server names
+ hidden: false
+ immutable: false
+ type: list
+ description: name of the PCRF CM instance
+ default:
+ - ZRDM1PCRF01PCM001
+ entry_schema:
+ type: string
+ pcm_image_name:
+ label: PCRF CM image name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF CM image name
+ default: rhel2
+ cps_net_ips:
+ label: CPS network ips
+ hidden: false
+ immutable: false
+ type: list
+ description: CPS network ips
+ default:
+ - 172.26.16.113
+ entry_schema:
+ type: string
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ default: nimbus_security_group
+ pcm_volumes:
+ label: CPS Cluman Cinder Volume
+ hidden: false
+ immutable: false
+ type: list
+ description: CPS Cluman Cinder Volume
+ default:
+ - 249cb355-8fdf-4382-9c3c-a2ebe767d45b
+ entry_schema:
+ type: string
+ compute_image_name:
+ hidden: false
+ immutable: false
+ type: string
+ pcm_flavor_name:
+ label: PCRF CM flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor name of PCRF CM instance
+ default: cps
+ net_name:
+ hidden: false
+ immutable: false
+ type: string
+ cps_net_name:
+ label: CPS network name
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network name
+ default: int_pcrf_net_0
+ cps_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ default: 255.255.255.0
+ oam_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ default: 255.255.255.0
+ oam_net_name:
+ label: OAM network name
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM network name
+ default: oam_protected_net_0
+ node_templates:
+ server_pcm_001:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1
+ directives:
+ - substitutable
+ properties:
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ oam_net_gw:
+ get_input: oam_net_gw
+ pcm_image_name:
+ get_input: pcm_image_name
+ security_group_name:
+ get_input: security_group_name
+ cps_net_ip:
+ get_input:
+ - cps_net_ips
+ - 0
+ pcm_flavor_name:
+ get_input: pcm_flavor_name
+ service_template_filter:
+ substitute_service_template: nested-pcm_v0.1ServiceTemplate.yaml
+ pcm_vol:
+ get_input:
+ - pcm_volumes
+ - 0
+ pcm_server_name:
+ get_input:
+ - pcm_server_names
+ - 0
+ cps_net_name:
+ get_input: cps_net_name
+ cps_net_mask:
+ get_input: cps_net_mask
+ oam_net_ip:
+ get_input:
+ - oam_net_ips
+ - 0
+ oam_net_mask:
+ get_input: oam_net_mask
+ oam_net_name:
+ get_input: oam_net_name
+ compute_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ network:
+ get_input: net_name
+ server_compute_get_attr_test:
+ type: org.openecomp.resource.vfc.nodes.heat.compute
+ properties:
+ flavor:
+ compute_flavor_name: null
+ image:
+ get_input: compute_image_name
+ config_drive:
+ get_attribute:
+ - compute_port_0
+ - tenant_id
+ - port_security_enabled
+ - device_id
+ - qos_policy
+ - allowed_address_pairs
+ - show
+ - device_owner
+ - network
+ - security_groups
+ - fixed_ips
+ - mac_address
+ - admin_state_up
+ - name
+ - subnets
+ - status
+ user_data_format:
+ get_attribute:
+ - server_pcm_001
+ - oam_net_gw
+ name:
+ compute_name: null
+ groups:
+ hot-nimbus-pcm_v0.4:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot-nimbus-pcm_v0.4.yaml
+ description: heat template that creates PCRF Cluman stack
+ members:
+ - server_pcm_001
+ - compute_port_0
+ - server_compute_get_attr_test \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml
new file mode 100644
index 0000000000..1b03021742
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml
@@ -0,0 +1,207 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested-pcm_v0.1
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.pcm_server:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ availabilityzone_name:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ oam_net_gw:
+ label: CPS network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network gateway
+ pcm_image_name:
+ label: image name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF CM image name
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ cps_net_ip:
+ label: CPS network ip
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network ip
+ pcm_flavor_name:
+ label: PCRF CM flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor name of PCRF CM instance
+ pcm_vol:
+ label: CPS Cluman Cinder Volume
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS Cluman Cinder Volume
+ pcm_server_name:
+ label: PCRF CM server name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF CM server name
+ cps_net_name:
+ label: CPS network name
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network name
+ cps_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ oam_net_ip:
+ label: OAM network ip
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM network ip
+ oam_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ oam_net_name:
+ label: OAM network name
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM network name
+ node_templates:
+ pcm_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: oam_net_ip
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pcm
+ relationship: tosca.relationships.network.BindsTo
+ server_pcm:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm_server
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ pcm_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: cps_net_ip
+ network:
+ get_input: cps_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pcm
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested-pcm_v0.1:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested-pcm_v0.1.yaml
+ description: heat template that creates PCRF Cluman stack
+ members:
+ - pcm_port_1
+ - server_pcm
+ - pcm_port_0
+ outputs:
+ server_pcm_id:
+ description: the pcm nova service id
+ value: server_pcm
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1
+ capabilities:
+ endpoint_server_pcm:
+ - server_pcm
+ - endpoint
+ os_server_pcm:
+ - server_pcm
+ - os
+ host_server_pcm:
+ - server_pcm
+ - host
+ scalable_server_pcm:
+ - server_pcm
+ - scalable
+ binding_server_pcm:
+ - server_pcm
+ - binding
+ attachment_pcm_port_0:
+ - pcm_port_0
+ - attachment
+ attachment_pcm_port_1:
+ - pcm_port_1
+ - attachment
+ requirements:
+ link_pcm_port_0:
+ - pcm_port_0
+ - link
+ link_pcm_port_1:
+ - pcm_port_1
+ - link
+ local_storage_server_pcm:
+ - server_pcm
+ - local_storage \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/MANIFEST.json
new file mode 100644
index 0000000000..345ca77b2a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/MANIFEST.json
@@ -0,0 +1,20 @@
+{
+ "name": "vEP_JSA_Net",
+ "description": "Version 2.0 02-09-2016 (Authors: John Doe, user PROD)",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pcm_v0.4.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pcm_v0.4.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },{
+ "file": "nested-pcm_v0.1.yaml",
+ "type": "HEAT"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/hot-nimbus-pcm_v0.4.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/hot-nimbus-pcm_v0.4.env
new file mode 100644
index 0000000000..78cc03e2ea
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/hot-nimbus-pcm_v0.4.env
@@ -0,0 +1,14 @@
+parameters:
+ pcm_server_names: ZRDM1PCRF01PCM001
+ pcm_image_name: rhel2
+ pcm_flavor_name: cps
+ availabilityzone_name: nova
+ cps_net_name: int_pcrf_net_0
+ cps_net_ips: 172.26.16.113
+ cps_net_mask: 255.255.255.0
+ oam_net_name: oam_protected_net_0
+ oam_net_ips: 107.239.64.121
+ oam_net_gw: 107.239.64.1
+ oam_net_mask: 255.255.255.0
+ pcm_volumes: 249cb355-8fdf-4382-9c3c-a2ebe767d45b
+ security_group_name: nimbus_security_group
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/hot-nimbus-pcm_v0.4.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/hot-nimbus-pcm_v0.4.yaml
new file mode 100644
index 0000000000..e4a79f34ba
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/hot-nimbus-pcm_v0.4.yaml
@@ -0,0 +1,94 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Cluman stack
+
+parameters:
+ pcm_server_names:
+ type: comma_delimited_list
+ label: PCRF CM server names
+ description: name of the PCRF CM instance
+ pcm_image_name:
+ type: string
+ label: PCRF CM image name
+ description: PCRF CM image name
+ pcm_flavor_name:
+ type: string
+ label: PCRF CM flavor name
+ description: flavor name of PCRF CM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ oam_net_name:
+ type: string
+ label: OAM network name
+ description: OAM network name
+ oam_net_ips:
+ type: comma_delimited_list
+ label: OAM network ips
+ description: OAM network ips
+ oam_net_gw:
+ type: string
+ label: CPS network gateway
+ description: CPS network gateway
+ oam_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcm_volumes:
+ type: comma_delimited_list
+ label: CPS Cluman Cinder Volume
+ description: CPS Cluman Cinder Volume
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ compute_image_name:
+ type: string
+ net_name:
+ type: string
+
+resources:
+ server_pcm_001:
+ type: nested-pcm_v0.1.yaml
+ properties:
+ pcm_server_name: { get_param: [pcm_server_names, 0] }
+ pcm_image_name: { get_param: pcm_image_name }
+ pcm_flavor_name: { get_param: pcm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ security_group_name: { get_param: security_group_name }
+ pcm_vol: { get_param: [pcm_volumes, 0] }
+ cps_net_name: { get_param: cps_net_name }
+ cps_net_ip: { get_param: [cps_net_ips, 0] }
+ cps_net_mask: { get_param: cps_net_mask }
+ oam_net_name: { get_param: oam_net_name }
+ oam_net_ip: { get_param: [oam_net_ips, 0] }
+ oam_net_mask: { get_param: oam_net_mask }
+ oam_net_gw: { get_param: oam_net_gw }
+
+ server_compute_get_attr_test:
+ type: OS::Nova::Server
+ properties:
+ config_drive: {get_attr: [compute_port_0]}
+ name: { compute_name }
+ image: { get_param: compute_image_name }
+ flavor: { compute_flavor_name }
+ user_data_format: { get_attr: [server_pcm_001 , oam_net_gw] }
+ user_data: { get_attr: [server_pcm_001]}
+
+ compute_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: net_name } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/nested-pcm_v0.1.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/nested-pcm_v0.1.yaml
new file mode 100644
index 0000000000..4e12676aa8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/nested-pcm_v0.1.yaml
@@ -0,0 +1,114 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Cluman stack
+
+parameters:
+ pcm_server_name:
+ type: string
+ label: PCRF CM server name
+ description: PCRF CM server name
+ pcm_image_name:
+ type: string
+ label: image name
+ description: PCRF CM image name
+ pcm_flavor_name:
+ type: string
+ label: PCRF CM flavor name
+ description: flavor name of PCRF CM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ oam_net_name:
+ type: string
+ label: OAM network name
+ description: OAM network name
+ oam_net_ip:
+ type: string
+ label: OAM network ip
+ description: OAM network ip
+ oam_net_gw:
+ type: string
+ label: CPS network gateway
+ description: CPS network gateway
+ oam_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcm_vol:
+ type: string
+ label: CPS Cluman Cinder Volume
+ description: CPS Cluman Cinder Volume
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+
+resources:
+ network:
+ type: net
+ script_init:
+ type: OS:INIT
+ server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ server_pcm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcm_server_name }
+ image: { get_param: pcm_image_name }
+ flavor: { get_param: pcm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcm_port_0}
+ - port: { get_resource: pcm_port_1}
+ block_device_mapping:
+ - device_name: vdb
+ volume_id: { get_param: pcm_vol}
+ user_data_format: RAW
+ user_data:
+ get_resource: server_init
+
+ pcm_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: cps_net_ip }
+ security_groups: [{ get_param: security_group_name }]
+
+ pcm_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips:
+ - ip_address: { get_param: oam_net_ip }
+ security_groups: [{ get_param: security_group_name }]
+
+ #pcm_vol_attachment:
+ # type: OS::Cinder::VolumeAttachment
+ # properties:
+ # volume_id: { get_param: pcm_vol }
+ # mountpoint: /dev/vdb
+ # instance_uuid: { get_resource: server_pcm }
+outputs:
+ server_pcm_id:
+ description: the pcm nova service id
+ value: { get_resource: server_pcm } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/outputs/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/outputs/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..eac8fd673d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/outputs/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,86 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ node_templates:
+ jsa_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ jsa_net_test_full_attribute:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ dhcp_agent_ids:
+ - '1000'
+ - '1001'
+ - '1002'
+ tenant_id: 23456
+ port_security_enabled: true
+ shared: true
+ admin_state_up: false
+ qos_policy: full
+ network_name:
+ get_input: jsa_net_name
+ subnets:
+ jsa_net_test_full_attribute_subnet:
+ cidr:
+ get_input: jsa_cidr
+ value_specs:
+ key1: spec1
+ key2: spec2
+ groups:
+ outputs:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/outputs.yaml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - jsa_net
+ - jsa_net_test_full_attribute
+ outputs:
+ output_regular:
+ description: output_regula
+ value: regular
+ output_func_getParam:
+ description: output_func_getParam
+ value:
+ get_input: jsa_cidr
+ output_func_getAttr:
+ description: output_func_getAttr
+ value:
+ get_attribute:
+ - jsa_net_test_full_attribute
+ - network_name
+ output_func_getResource:
+ description: output_func_getResource
+ value: jsa_net_test_full_attribute \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/outputs/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/outputs/inputs/MANIFEST.json
new file mode 100644
index 0000000000..3997ee80ff
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/outputs/inputs/MANIFEST.json
@@ -0,0 +1,11 @@
+{
+ "name": "vEP_JSA_Net",
+ "description": "Version 2.0 02-09-2016 (Authors: John Doe, user PROD)",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "outputs.yaml",
+ "type": "HEAT"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/outputs/inputs/outputs.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/outputs/inputs/outputs.yaml
new file mode 100644
index 0000000000..8d48c82e65
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/outputs/inputs/outputs.yaml
@@ -0,0 +1,48 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+outputs:
+ output_regular:
+ description: output_regula
+ value: regular
+ output_func_getParam:
+ description: output_func_getParam
+ value: {get_param: jsa_cidr}
+ output_func_getAttr:
+ description: output_func_getAttr
+ value: {get_attr: [jsa_net_test_full_attribute, name]}
+ output_func_getResource:
+ description: output_func_getResource
+ value: {get_resource: jsa_net_test_full_attribute_subnet}
+
+resources:
+ jsa_net:
+ type: OS::Neutron::Net
+ properties:
+ name: {get_param: jsa_net_name}
+ shared: True
+
+ jsa_net_test_full_attribute:
+ type: OS::Neutron::Net
+ properties:
+ name: {get_param: jsa_net_name}
+ shared: True
+ dhcp_agent_ids: ['1000','1001','1002']
+ tenant_id: 23456
+ port_security_enabled: t
+ admin_state_up: 0
+ qos_policy: full
+ value_specs:
+ key1: "spec1"
+ key2: "spec2"
+
+ jsa_net_test_full_attribute_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: {get_resource: jsa_net_test_full_attribute}
+ cidr: {get_param: jsa_cidr}
+
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/parameters/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/parameters/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..5cd5d0e597
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/parameters/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,181 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ param_type_comma_delimited_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: param comma_delimited_list - List
+ entry_schema:
+ type: string
+ param_type_string_default_value_with_env:
+ hidden: false
+ immutable: false
+ type: string
+ description: param value should be - HEAT_ENV_default string
+ default: HEAT_ENV default string
+ volume_type:
+ label: FSB Volume
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB Volume type
+ FSB1_volume_name:
+ label: FSB Volume
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB Volume name
+ param_constraint_length_allowed_pattern_range_hidden:
+ label: User Name
+ hidden: true
+ immutable: false
+ type: string
+ description: User name to be configured for the application
+ constraints:
+ - max_length: 8
+ - min_length: 6
+ - pattern: '[A-Z]+[a-zA-Z0-9]*'
+ - in_range:
+ - 0
+ - 10
+ param_type_boolean_default_value_with_env:
+ hidden: false
+ immutable: false
+ type: boolean
+ description: param value should be false
+ default: false
+ param_type_string:
+ hidden: false
+ immutable: false
+ type: string
+ description: param String - string
+ param_type_string_default_value:
+ hidden: false
+ immutable: false
+ type: string
+ description: param value should be - HEAT_default string
+ default: HEAT_default string
+ param_type_number:
+ hidden: false
+ immutable: false
+ type: float
+ description: param number - float
+ param_type_boolean:
+ hidden: false
+ immutable: false
+ type: boolean
+ description: param boolean - boolean
+ param_type_comma_delimited_list_default_value_with_env:
+ hidden: false
+ immutable: false
+ type: list
+ description: param value should be [b1,b2,b3,b4]
+ default:
+ - b1
+ - b2
+ - b3
+ - b4
+ entry_schema:
+ type: string
+ param_type_boolean_default_value:
+ hidden: false
+ immutable: false
+ type: boolean
+ description: param value should be true
+ default: true
+ param_type_number_default_value:
+ hidden: false
+ immutable: false
+ type: float
+ description: param value should be 12345
+ default: 12345
+ FSB_1_image:
+ label: FSB Image
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB Image name
+ param_type_comma_delimited_list_default_value:
+ hidden: false
+ immutable: false
+ type: list
+ description: param value should be [a1,a2,a3,a4]
+ default:
+ - a1
+ - a2
+ - a3
+ - a4
+ entry_schema:
+ type: string
+ param_type_number_default_value_with_env:
+ hidden: false
+ immutable: false
+ type: float
+ description: param value should be 54321
+ default: 54321
+ param_type_json:
+ hidden: false
+ immutable: false
+ type: json
+ description: param json - map<String>
+ param_allowed_values:
+ label: Instance Type
+ hidden: false
+ immutable: false
+ type: string
+ description: Instance type for compute instances
+ constraints:
+ - valid_values:
+ - m1.small
+ - m1.medium
+ - m1.large
+ node_templates:
+ FSB1_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ image:
+ get_input: FSB_1_image
+ volume_type:
+ get_input: volume_type
+ size: 3*1024
+ name:
+ get_input: FSB1_volume_name
+ groups:
+ parameters:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/parameters.yaml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - FSB1_volume \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/parameters/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/parameters/inputs/MANIFEST.json
new file mode 100644
index 0000000000..bc0e397432
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/parameters/inputs/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "vEP_JSA_Net",
+ "description": "Version 2.0 02-09-2016 (Authors: John Doe, user PROD)",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "parameters.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "parameters.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/parameters/inputs/parameters.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/parameters/inputs/parameters.env
new file mode 100644
index 0000000000..21978f2482
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/parameters/inputs/parameters.env
@@ -0,0 +1,6 @@
+parameters:
+ param_type_string_default_value_with_env: HEAT_ENV default string
+ param_type_number_default_value_with_env: 54321
+ param_type_boolean_default_value_with_env: false
+ param_type_comma_delimited_list_default_value_with_env: b1,b2,b3,b4
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/parameters/inputs/parameters.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/parameters/inputs/parameters.yaml
new file mode 100644
index 0000000000..6f1b69ac59
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/parameters/inputs/parameters.yaml
@@ -0,0 +1,101 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ param_type_string:
+ type: string
+ description: param String - string
+ param_type_number:
+ type: number
+ description: param number - float
+ param_type_json:
+ type: json
+ description: param json - map<String>
+ param_type_boolean:
+ type: boolean
+ description: param boolean - boolean
+ param_type_comma_delimited_list:
+ type: comma_delimited_list
+ description: param comma_delimited_list - List
+
+ volume_type:
+ type: string
+ label: FSB Volume
+ description: FSB Volume type
+
+ FSB1_volume_name:
+ type: string
+ label: FSB Volume
+ description: FSB Volume name
+
+ FSB_1_image:
+ type: string
+ label: FSB Image
+ description: FSB Image name
+
+ param_constraint_length_allowed_pattern_range_hidden:
+ type: string
+ label: User Name
+ description: User name to be configured for the application
+ hidden: true
+ constraints:
+ - length: { min: 6, max: 8 }
+ description: User name must be between 6 and 8 characters
+ - allowed_pattern: "[A-Z]+[a-zA-Z0-9]*"
+ description: User name must start with an uppercase character
+ - range: { min: 0, max: 10 }
+ param_allowed_values:
+ type: string
+ label: Instance Type
+ description: Instance type for compute instances
+ constraints:
+ - allowed_values:
+ - m1.small
+ - m1.medium
+ - m1.large
+
+ param_type_string_default_value:
+ type: string
+ default: HEAT_default string
+ description: param value should be - HEAT_default string
+ param_type_string_default_value_with_env:
+ type: string
+ description: param value should be - HEAT_ENV_default string
+ default: HEAT_default string
+
+ param_type_number_default_value:
+ type: number
+ description: param value should be 12345
+ default: 12345
+ param_type_number_default_value_with_env:
+ type: number
+ description: param value should be 54321
+ default: 12345
+ param_type_boolean_default_value:
+ type: boolean
+ description: param value should be true
+ default: true
+ param_type_boolean_default_value_with_env:
+ type: boolean
+ description: param value should be false
+ default: true
+ param_type_comma_delimited_list_default_value:
+ type: comma_delimited_list
+ description: param value should be [a1,a2,a3,a4]
+ default: a1,a2,a3,a4
+ param_type_comma_delimited_list_default_value_with_env:
+ type: comma_delimited_list
+ description: param value should be [b1,b2,b3,b4]
+ default: a1,a2,a3,a4
+resources:
+ FSB1_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: 3
+ volume_type: {get_param: volume_type}
+ name: {get_param: FSB1_volume_name}
+ image: {get_param: FSB_1_image}
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_Network_Rule/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_Network_Rule/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..0d9ec35ce7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_Network_Rule/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,197 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ start_src_ports:
+ hidden: false
+ immutable: false
+ type: float
+ description: Start of src port
+ private_net_1_gateway:
+ hidden: false
+ immutable: false
+ type: string
+ description: Private network gateway address
+ private_net_2_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of private network to be created
+ private_net_2_gateway:
+ hidden: false
+ immutable: false
+ type: string
+ description: Private network gateway address
+ policy_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Virtual network id
+ private_net_1_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of private network to be created
+ private_net_2_pool_start:
+ hidden: false
+ immutable: false
+ type: string
+ description: Start of private network IP address allocation pool
+ private_net_2_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ description: Private network address (CIDR notation)
+ private_net_1_pool_end:
+ hidden: false
+ immutable: false
+ type: string
+ description: End of private network IP address allocation pool
+ end_src_ports:
+ hidden: false
+ immutable: false
+ type: float
+ description: End of src port
+ apply_service:
+ hidden: false
+ immutable: false
+ type: string
+ description: service to apply
+ start_dst_ports:
+ hidden: false
+ immutable: false
+ type: float
+ description: Start of dst port
+ end_dst_ports:
+ hidden: false
+ immutable: false
+ type: float
+ description: End of dst port
+ private_net_1_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ description: Private network address (CIDR notation)
+ private_net_1_pool_start:
+ hidden: false
+ immutable: false
+ type: string
+ description: Start of private network IP address allocation pool
+ private_net_2_pool_end:
+ hidden: false
+ immutable: false
+ type: string
+ description: End of private network IP address allocation pool
+ direction:
+ hidden: false
+ immutable: false
+ type: string
+ description: Direction of Policy
+ node_templates:
+ private_net_1:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ network_name:
+ get_input: private_net_1_name
+ subnets:
+ private_subnet_1:
+ cidr:
+ get_input: private_net_1_cidr
+ gateway_ip:
+ get_input: private_net_1_gateway
+ allocation_pools:
+ - start:
+ get_input: private_net_1_pool_start
+ end:
+ get_input: private_net_1_pool_end
+ private_policy:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.contrail.NetworkRules
+ properties:
+ entries:
+ policy_rule:
+ - src_ports:
+ - start_port:
+ get_input: start_src_ports
+ end_port:
+ get_input: end_src_ports
+ protocol: any
+ action_list:
+ apply_service:
+ - get_input: apply_service
+ dst_addresses:
+ - virtual_network: private_net_1
+ dst_ports:
+ - start_port:
+ get_input: start_dst_ports
+ end_port:
+ get_input: end_dst_ports
+ src_addresses:
+ - virtual_network: private_net_2
+ direction:
+ get_input: direction
+ name:
+ get_input: policy_name
+ requirements:
+ - network:
+ capability: tosca.capabilities.Attachment
+ node: private_net_1
+ relationship: org.openecomp.relationships.AttachesTo
+ - network:
+ capability: tosca.capabilities.Attachment
+ node: private_net_2
+ relationship: org.openecomp.relationships.AttachesTo
+ private_net_2:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ network_name:
+ get_input: private_net_2_name
+ subnets:
+ private_subnet_2:
+ cidr:
+ get_input: private_net_2_cidr
+ gateway_ip:
+ get_input: private_net_2_gateway
+ allocation_pools:
+ - start:
+ get_input: private_net_2_pool_start
+ end:
+ get_input: private_net_2_pool_end
+ groups:
+ network_policy_chain:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/network_policy_chain.yaml
+ description: |
+ HOT template to creates two virtual network with one subnet each. Creates a network policy for applying service between two VNs created before. Attach the network policy to two virtual networks
+ members:
+ - private_net_1
+ - private_policy
+ - private_net_2 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_Network_Rule/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_Network_Rule/inputs/MANIFEST.json
new file mode 100644
index 0000000000..81b11d1a77
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_Network_Rule/inputs/MANIFEST.json
@@ -0,0 +1,12 @@
+{
+ "name": "network_policy_chain",
+ "description": "network_policy_chain",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "network_policy_chain.yaml",
+ "type": "HEAT",
+ "data": []
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_Network_Rule/inputs/network_policy_chain.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_Network_Rule/inputs/network_policy_chain.yaml
new file mode 100644
index 0000000000..8963b1ff75
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_Network_Rule/inputs/network_policy_chain.yaml
@@ -0,0 +1,117 @@
+heat_template_version: 2013-05-23
+
+description: >
+ HOT template to creates two virtual network with one subnet each.
+ Creates a network policy for applying service between two VNs created before.
+ Attach the network policy to two virtual networks
+parameters:
+ policy_name:
+ type: string
+ description: Virtual network id
+ direction:
+ type: string
+ description: Direction of Policy
+ start_src_ports:
+ type: number
+ description: Start of src port
+ end_src_ports:
+ type: number
+ description: End of src port
+ start_dst_ports:
+ type: number
+ description: Start of dst port
+ end_dst_ports:
+ type: number
+ description: End of dst port
+ apply_service:
+ type: string
+ description: service to apply
+ private_net_1_name:
+ type: string
+ description: Name of private network to be created
+ private_net_1_cidr:
+ type: string
+ description: Private network address (CIDR notation)
+ private_net_1_gateway:
+ type: string
+ description: Private network gateway address
+ private_net_1_pool_start:
+ type: string
+ description: Start of private network IP address allocation pool
+ private_net_1_pool_end:
+ type: string
+ description: End of private network IP address allocation pool
+ private_net_2_name:
+ type: string
+ description: Name of private network to be created
+ private_net_2_cidr:
+ type: string
+ description: Private network address (CIDR notation)
+ private_net_2_gateway:
+ type: string
+ description: Private network gateway address
+ private_net_2_pool_start:
+ type: string
+ description: Start of private network IP address allocation pool
+ private_net_2_pool_end:
+ type: string
+ description: End of private network IP address allocation pool
+
+resources:
+ private_net_1:
+ type: OS::Neutron::Net
+ properties:
+ name: { get_param: private_net_1_name }
+
+ private_net_2:
+ type: OS::Neutron::Net
+ properties:
+ name: { get_param: private_net_2_name }
+
+ private_subnet_1:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: private_net_1 }
+ cidr: { get_param: private_net_1_cidr }
+ gateway_ip: { get_param: private_net_1_gateway }
+ allocation_pools:
+ - start: { get_param: private_net_1_pool_start }
+ end: { get_param: private_net_1_pool_end }
+
+ private_subnet_2:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: private_net_2 }
+ cidr: { get_param: private_net_2_cidr }
+ gateway_ip: { get_param: private_net_2_gateway }
+ allocation_pools:
+ - start: { get_param: private_net_2_pool_start }
+ end: { get_param: private_net_2_pool_end }
+
+ private_policy:
+ type: OS::Contrail::NetworkPolicy
+ properties:
+ name: { get_param: policy_name }
+ entries:
+ policy_rule: [
+ {
+ "direction": { get_param: direction },
+ "protocol": "any",
+ "src_ports": [{"start_port": {get_param: start_src_ports}, "end_port": {get_param: end_src_ports}}],
+ "dst_ports": [{"start_port": {get_param: start_dst_ports}, "end_port": {get_param: end_dst_ports}}],
+ "dst_addresses": [{ "virtual_network": {get_resource: private_net_1}}],
+ "action_list": {"apply_service": [{get_param: apply_service}]},
+ "src_addresses": [{ "virtual_network": {get_resource: private_net_2}}]
+ },
+ ]
+ private_policy_attach_net1:
+ type: OS::Contrail::AttachPolicy
+ properties:
+ network: { get_resource: private_net_1 }
+ policy: { get_attr: [private_policy, fq_name] }
+
+ private_policy_attach_net2:
+ type: OS::Contrail::AttachPolicy
+ properties:
+ network: { get_resource: private_net_2 }
+ policy: { get_attr: [private_policy, fq_name] } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_VirtualNetwork/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_VirtualNetwork/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..2b047dd8ae
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_VirtualNetwork/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,1308 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.NCB1:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.GPB2:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.NCB2:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.GPB1:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.FSB2:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.VLC1:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.FSB1:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.VLC2:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ Internal2_name:
+ hidden: false
+ immutable: false
+ type: string
+ default: Internal2-subnet
+ vlc2-Internal2-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to vlc2-Internal2
+ default: 00:81:37:0E:02:12
+ epc-sctp-a-net-rt:
+ hidden: false
+ immutable: false
+ type: string
+ description: epc-sctp-a route target
+ default: 13979:105717
+ epc-sctp-b-net-rt:
+ hidden: false
+ immutable: false
+ type: string
+ description: epc-sctp-b route target
+ default: 13979:105719
+ gpb-flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor to use for servers gpb
+ default: m4.xlarge4
+ Internal1_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ default: 169.253.0.0/17
+ epc-sctp-a-pool-start:
+ hidden: false
+ immutable: false
+ type: string
+ description: epc-sctp-a-net network ip pool start IP address
+ default: 107.243.37.3
+ Internal2_subnet_name:
+ hidden: false
+ immutable: false
+ type: string
+ default: vmme_int_int_sub_2
+ Internal1_subnet_name:
+ hidden: false
+ immutable: false
+ type: string
+ default: vmme_int_int_sub_1
+ gpb1-Internal1-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to gpb1-Internal1
+ default: 00:80:37:0E:01:22
+ gpb1-Internal1-ip:
+ hidden: false
+ immutable: false
+ type: string
+ default: 169.254.0.101
+ FSB_1_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: image name
+ fsb1-Internal2-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to fsb1-Internal2
+ default: 00:81:37:0E:0B:12
+ ncb_zone:
+ hidden: false
+ immutable: false
+ type: string
+ description: cluster for spawnning ncb instances
+ default: nova
+ Internal2_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ default: vmme_int_int_2
+ epc-sctp-a-pool-end:
+ hidden: false
+ immutable: false
+ type: string
+ description: epc-sctp-a-net network ip pool end IP address
+ default: 107.243.37.30
+ Internal1_name:
+ hidden: false
+ immutable: false
+ type: string
+ default: Internal1-subnet
+ gpb2-name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of gpb2
+ default: ZRDM1MMEX33GPB002
+ fsb2-Internal1-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to fsb2-Internal1
+ default: 00:80:37:0E:0D:12
+ fsb2-name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of fsb1
+ default: ZRDM1MMEX33FSB002
+ static_prefix_sctp_b_1:
+ hidden: false
+ immutable: false
+ type: string
+ description: Static Prefix
+ default: 107.239.40.64/30
+ fsb2-oam-ip:
+ hidden: false
+ immutable: false
+ type: string
+ default: 107.250.172.222
+ fsb2-flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor to use for servers fsb2
+ default: m4.xlarge4
+ fsb2-Internal2-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to fsb2-Internal2
+ default: 00:81:37:0E:0D:12
+ ncb2-Internal1-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to ncb2-Internal1
+ default: 00:80:37:0E:0F:12
+ ncb2-name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of ncb2
+ default: ZRDM1MMEX33NCB002
+ epc-sctp-b-pool-end:
+ hidden: false
+ immutable: false
+ type: string
+ description: epc-sctp-b-net network ip pool end IP address
+ default: 107.243.37.62
+ vlc1-gtp-ip:
+ hidden: false
+ immutable: false
+ type: string
+ default: 107.243.37.67
+ epc-sctp-b-pool-start:
+ hidden: false
+ immutable: false
+ type: string
+ description: epc-sctp-b-net network ip pool start IP address
+ default: 107.243.37.35
+ my_instance:
+ hidden: false
+ immutable: false
+ type: string
+ description: instance
+ Internal2_shared:
+ hidden: false
+ immutable: false
+ type: string
+ default: 'False'
+ Internal1_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ default: vmme_int_int_1
+ vlc2-name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of vlc2
+ default: ZRDM1MMEX33VLC002
+ Internal2_ipam_name:
+ hidden: false
+ immutable: false
+ type: string
+ default: vmme_ipam_int2
+ vlc1-sctp-b-ip:
+ hidden: false
+ immutable: false
+ type: string
+ default: 107.243.37.35
+ Internal1_net_pool_end:
+ hidden: false
+ immutable: false
+ type: string
+ default: 169.253.0.254
+ Internal1_default_gateway:
+ hidden: false
+ immutable: false
+ type: string
+ default: 169.253.0.3
+ ncb1-Internal1-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to ncb1-Internal1
+ default: 00:80:37:0E:09:12
+ epc-gtp-net-name:
+ hidden: false
+ immutable: false
+ type: string
+ description: gtp net name
+ default: EPC-GTP
+ vlc1-Internal1-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to vlc1-Internal1
+ default: 00:80:37:0E:01:12
+ gpb2-Internal1-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to gpb2-Internal1
+ default: 00:80:37:0E:02:22
+ epc-gtp-net-cidr:
+ hidden: false
+ immutable: false
+ type: string
+ description: gtp stubnet
+ default: 107.243.37.64/27
+ oam_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: uuid of oam network
+ default: 47bf4cca-0961-422f-bcd6-d5a4fbb1a351
+ vlc_zone:
+ hidden: false
+ immutable: false
+ type: string
+ description: cluster for spawnning vlc instances
+ default: nova
+ vlc2-Internal1-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to vlc2-Internal1
+ default: 00:80:37:0E:02:12
+ epc-sctp-a-net-cidr:
+ hidden: false
+ immutable: false
+ type: string
+ description: epc-sctp-a subnet
+ default: 107.243.37.0/27
+ Internal1_forwarding_mode:
+ hidden: false
+ immutable: false
+ type: string
+ default: l2
+ Internal2_dhcp:
+ hidden: false
+ immutable: false
+ type: boolean
+ default: false
+ fsb1-oam-ip:
+ hidden: false
+ immutable: false
+ type: string
+ default: 107.250.172.221
+ FSB_2_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: image name
+ vlc1-oam-ip:
+ hidden: false
+ immutable: false
+ type: string
+ default: 107.250.172.227
+ epc-sctp-a-net-name:
+ hidden: false
+ immutable: false
+ type: string
+ description: epc-sctp-a net name
+ default: EPC-SCTP-A
+ vlc2-oam-ip:
+ hidden: false
+ immutable: false
+ type: string
+ default: 107.250.172.228
+ Internal2_net_pool_start:
+ hidden: false
+ immutable: false
+ type: string
+ default: 169.255.0.100
+ FSB1_volume_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: volume name
+ vlc1-sctp-a-ip:
+ hidden: false
+ immutable: false
+ type: string
+ default: 107.243.37.3
+ Internal1_ipam_name:
+ hidden: false
+ immutable: false
+ type: string
+ default: vmme_ipam_int1
+ Internal1_dhcp:
+ hidden: false
+ immutable: false
+ type: boolean
+ default: false
+ Internal2_external:
+ hidden: false
+ immutable: false
+ type: string
+ default: 'False'
+ Internal2_forwarding_mode:
+ hidden: false
+ immutable: false
+ type: string
+ default: l2
+ vlc1-name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of vlc1
+ default: ZRDM1MMEX33VLC002
+ vlc-flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor to use for servers vlc
+ default: m4.xlarge4
+ epc-gtp-net-rt:
+ hidden: false
+ immutable: false
+ type: string
+ description: gtp route target
+ default: 13979:105715
+ gpb_zone:
+ hidden: false
+ immutable: false
+ type: string
+ description: cluster for spawnning gpb instances
+ default: nova
+ Internal1-net:
+ hidden: false
+ immutable: false
+ type: string
+ description: net
+ gpb1-Internal2-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to gpb1-Internal2
+ default: 00:81:37:0E:01:22
+ fsb1-Internal1-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to fsb1-Internal1
+ default: 00:80:37:0E:0B:12
+ FSB2_volume_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: volume name
+ VMME_FSB2_boot_volume:
+ hidden: false
+ immutable: false
+ type: string
+ default: 089a0d11-4b15-4370-8343-3f90907b1221
+ fsb_zone:
+ hidden: false
+ immutable: false
+ type: string
+ description: cluster for spawnning fsb instances
+ default: nova
+ VMME_FSB1_boot_volume:
+ hidden: false
+ immutable: false
+ type: string
+ default: 8248e794-6173-4b49-b9c3-8219b0b56f4e
+ Internal2_default_gateway:
+ hidden: false
+ immutable: false
+ type: string
+ default: 169.255.0.3
+ Internal1_external:
+ hidden: false
+ immutable: false
+ type: string
+ default: 'False'
+ vlc2-sctp-a-ip:
+ hidden: false
+ immutable: false
+ type: string
+ default: 107.243.37.4
+ ncb-flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor to use for servers ncb
+ default: m4.xlarge4
+ Internal1_shared:
+ hidden: false
+ immutable: false
+ type: string
+ default: 'False'
+ fsb1-name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of fsb1
+ default: ZRDM1MMEX33FSB001
+ static_prefix_gtp_1:
+ hidden: false
+ immutable: false
+ type: string
+ description: Static Prefix
+ default: 107.239.40.96/30
+ epc-sctp-b-net-gateway:
+ hidden: false
+ immutable: false
+ type: string
+ description: epc-sctp-b-net network gateway
+ default: 107.243.37.33
+ epc-sctp-b-net-cidr:
+ hidden: false
+ immutable: false
+ type: string
+ description: epc-sctp-b subnet
+ default: 107.243.37.32/24
+ epc-gtp-pool-end:
+ hidden: false
+ immutable: false
+ type: string
+ description: gtp network ip pool end IP address
+ default: 107.243.37.94
+ epc-sctp-a-net-gateway:
+ hidden: false
+ immutable: false
+ type: string
+ description: epc-sctp-a-net network gateway
+ default: 107.243.37.1
+ vlc2-gtp-ip:
+ hidden: false
+ immutable: false
+ type: string
+ default: 107.243.37.68
+ vlc2-sctp-b-ip:
+ hidden: false
+ immutable: false
+ type: string
+ default: 107.243.37.36
+ Internal1_net_pool_start:
+ hidden: false
+ immutable: false
+ type: string
+ default: 169.253.0.100
+ volume_size:
+ hidden: false
+ immutable: false
+ type: string
+ description: volume
+ fsb2-image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of image to use for server fsb2
+ default: MME_FSB2_15B-CP04-r5a01
+ ncb2-Internal2-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to ncb2-Internal2
+ default: 00:81:37:0E:0F:12
+ ncb1-name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of ncb1
+ default: ZRDM1MMEX33NCB001
+ fsb1-image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of image to use for server fsb1
+ default: MME_FSB1_15B-CP04-r5a01
+ fsb1-flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor to use for servers fsb1
+ default: m4.xlarge4
+ volume_type:
+ hidden: false
+ immutable: false
+ type: string
+ description: volume
+ Internal2_net_pool_end:
+ hidden: false
+ immutable: false
+ type: string
+ default: 169.255.0.254
+ epc-sctp-b-net-name:
+ hidden: false
+ immutable: false
+ type: string
+ description: epc-sctp-b net name
+ default: EPC-SCTP-B
+ Internal2_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ default: 169.255.0.0/17
+ epc-gtp-net-gateway:
+ hidden: false
+ immutable: false
+ type: string
+ description: gtp network gateway
+ default: 107.243.37.65
+ gpb2-Internal2-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to gpb2-Internal2
+ default: 00:81:37:0E:02:22
+ ncb1-Internal2-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to ncb1-Internal2
+ default: 00:81:37:0E:09:12
+ epc-gtp-pool-start:
+ hidden: false
+ immutable: false
+ type: string
+ description: gtp network ip pool start IP address
+ default: 107.243.37.67
+ static_prefix_sctp_a_1:
+ hidden: false
+ immutable: false
+ type: string
+ description: Static Prefix
+ default: 107.239.40.32/30
+ gpb1-name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of gpb1
+ default: ZRDM1MMEX33GPB001
+ pxe-image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of image to use for server ncb
+ default: MME_PXE-BOOT_cxp9025898_2r5a01.qcow2
+ vlc1-Internal2-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to vlc1-Internal2
+ default: 00:81:37:0E:01:12
+ node_templates:
+ NCB1:
+ type: org.openecomp.resource.vfc.nodes.heat.NCB1
+ properties:
+ flavor:
+ get_input: ncb-flavor
+ availability_zone:
+ get_input: ncb_zone
+ image:
+ get_input: pxe-image
+ name:
+ get_input: ncb1-name
+ NCB2:
+ type: org.openecomp.resource.vfc.nodes.heat.NCB2
+ properties:
+ flavor:
+ get_input: ncb-flavor
+ availability_zone:
+ get_input: ncb_zone
+ image:
+ get_input: pxe-image
+ name:
+ get_input: ncb2-name
+ VLC2_OAM:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ fixed_ips:
+ - ip_address:
+ get_input: vlc2-oam-ip
+ network:
+ get_input: oam_net_id
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: VLC2
+ relationship: tosca.relationships.network.BindsTo
+ epc-gtp-net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ route_targets:
+ - get_input: epc-gtp-net-rt
+ network_name:
+ get_input: epc-gtp-net-name
+ subnets:
+ epc-gtp-subnet:
+ cidr:
+ get_input: epc-gtp-net-cidr
+ gateway_ip:
+ get_input: epc-gtp-net-gateway
+ allocation_pools:
+ - start:
+ get_input: epc-gtp-pool-start
+ end:
+ get_input: epc-gtp-pool-end
+ NCB1_Internal1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: ncb1-Internal1-mac
+ network: Internal1-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal1-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: NCB1
+ relationship: tosca.relationships.network.BindsTo
+ VLC2_Internal2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: vlc2-Internal2-mac
+ network: Internal2-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal2-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: VLC2
+ relationship: tosca.relationships.network.BindsTo
+ NCB1_Internal2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: ncb1-Internal2-mac
+ network: Internal2-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal2-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: NCB1
+ relationship: tosca.relationships.network.BindsTo
+ VLC2_Internal1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: vlc2-Internal1-mac
+ network: Internal1-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal1-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: VLC2
+ relationship: tosca.relationships.network.BindsTo
+ VLC2_GTP:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ fixed_ips:
+ - ip_address:
+ get_input: vlc2-gtp-ip
+ network: epc-gtp-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: epc-gtp-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: VLC2
+ relationship: tosca.relationships.network.BindsTo
+ FSB1_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ image:
+ get_input: FSB_1_image
+ volume_type:
+ get_input: volume_type
+ size: 3*1024
+ name:
+ get_input: FSB1_volume_name
+ testConvertGetParamFunctions:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ shared:
+ get_input: Internal1_shared
+ forwarding_mode:
+ get_input: Internal1_forwarding_mode
+ external:
+ get_input:
+ - my_instance
+ - networks
+ - private
+ - 0
+ network_name:
+ get_input: Internal1_net_name
+ FSB2_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ image:
+ get_input: FSB_2_image
+ volume_type:
+ get_input: volume_type
+ size: '(get_input : volume_size) * 1024'
+ name:
+ get_input: FSB2_volume_name
+ FSB1_OAM:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ fixed_ips:
+ - ip_address:
+ get_input: fsb1-oam-ip
+ network:
+ get_input: oam_net_id
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: FSB1
+ relationship: tosca.relationships.network.BindsTo
+ Internal1-net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ dhcp_enabled:
+ get_input: Internal1_dhcp
+ shared:
+ get_input: Internal1_shared
+ forwarding_mode:
+ get_input: Internal1_forwarding_mode
+ external: true
+ route_targets:
+ get_artifact:
+ - SELF
+ - nimbus-ethernet
+ network_name:
+ get_input: Internal1_net_name
+ subnets:
+ Internal3-subnet:
+ enable_dhcp:
+ get_input: Internal2_dhcp
+ cidr:
+ get_input: Internal2_cidr
+ gateway_ip:
+ get_input: Internal2_default_gateway
+ Internal1-subnet:
+ enable_dhcp:
+ get_input: Internal1_dhcp
+ cidr:
+ get_input: Internal1_cidr
+ gateway_ip:
+ get_input: Internal1_default_gateway
+ Internal4-subnet:
+ enable_dhcp: false
+ cidr:
+ get_input: Internal1_cidr
+ gateway_ip:
+ get_input: Internal1_default_gateway
+ artifacts:
+ nimbus-ethernet:
+ type: tosca.artifacts.Deployment
+ file: ../Artifacts/nimbus-ethernet.sh
+ GPB2_Internal1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: gpb2-Internal1-mac
+ network: Internal1-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal1-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: GPB2
+ relationship: tosca.relationships.network.BindsTo
+ GPB2_Internal2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: gpb2-Internal2-mac
+ network: Internal2-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal2-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: GPB2
+ relationship: tosca.relationships.network.BindsTo
+ testConvertGetAttributeFunctions:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ shared:
+ get_input: Internal1_shared
+ forwarding_mode:
+ get_input: Internal1_forwarding_mode
+ external:
+ get_input: Internal1_external
+ network_name:
+ get_input: Internal1_net_name
+ NCB2_Internal2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: ncb2-Internal2-mac
+ network: Internal2-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal2-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: NCB2
+ relationship: tosca.relationships.network.BindsTo
+ NCB2_Internal1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: ncb2-Internal1-mac
+ network: Internal1-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal1-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: NCB2
+ relationship: tosca.relationships.network.BindsTo
+ FSB2:
+ type: org.openecomp.resource.vfc.nodes.heat.FSB2
+ properties:
+ flavor:
+ get_input: fsb2-flavor
+ availability_zone:
+ get_input: fsb_zone
+ name:
+ get_input: fsb2-name
+ FSB1:
+ type: org.openecomp.resource.vfc.nodes.heat.FSB1
+ properties:
+ flavor:
+ get_input: fsb1-flavor
+ availability_zone:
+ get_input: fsb_zone
+ name:
+ get_input: fsb1-name
+ Internal2-net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ dhcp_enabled:
+ get_input: Internal2_dhcp
+ shared:
+ get_input: Internal2_shared
+ forwarding_mode:
+ get_input: Internal2_forwarding_mode
+ external:
+ get_input: Internal2_external
+ network_name:
+ get_input: Internal2_name
+ subnets:
+ Internal2-subnet:
+ enable_dhcp:
+ get_input: Internal2_dhcp
+ cidr:
+ get_input: Internal2_cidr
+ gateway_ip:
+ get_input: Internal2_default_gateway
+ VLC1_Internal1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: vlc1-Internal1-mac
+ network: Internal1-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal1-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: VLC1
+ relationship: tosca.relationships.network.BindsTo
+ epc-sctp-a-net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ route_targets:
+ - get_input: epc-sctp-a-net-rt
+ network_name:
+ get_input: epc-sctp-a-net-name
+ subnets:
+ epc-sctp-a-subnet:
+ cidr:
+ get_input: epc-sctp-a-net-cidr
+ gateway_ip:
+ get_input: epc-sctp-a-net-gateway
+ allocation_pools:
+ - start:
+ get_input: epc-sctp-a-pool-start
+ end:
+ get_input: epc-sctp-a-pool-end
+ VLC1_Internal2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: vlc1-Internal2-mac
+ network: Internal2-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal2-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: VLC1
+ relationship: tosca.relationships.network.BindsTo
+ VLC1_SCTP_B:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ fixed_ips:
+ - ip_address:
+ get_input: vlc1-sctp-b-ip
+ network: epc-sctp-b-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: epc-sctp-b-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: VLC1
+ relationship: tosca.relationships.network.BindsTo
+ VLC2_SCTP_B:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ fixed_ips:
+ - ip_address:
+ get_input: vlc2-sctp-b-ip
+ network: epc-sctp-b-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: epc-sctp-b-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: VLC2
+ relationship: tosca.relationships.network.BindsTo
+ VLC1_SCTP_A:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ fixed_ips:
+ - ip_address:
+ get_input: vlc1-sctp-a-ip
+ network: epc-sctp-a-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: epc-sctp-a-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: VLC1
+ relationship: tosca.relationships.network.BindsTo
+ VLC2_SCTP_A:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ fixed_ips:
+ - ip_address:
+ get_input: vlc2-sctp-a-ip
+ network: epc-sctp-a-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: epc-sctp-a-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: VLC2
+ relationship: tosca.relationships.network.BindsTo
+ VLC1:
+ type: org.openecomp.resource.vfc.nodes.heat.VLC1
+ properties:
+ flavor:
+ get_input: vlc-flavor
+ availability_zone:
+ get_input: vlc_zone
+ image:
+ get_input: pxe-image
+ name:
+ get_input: vlc1-name
+ FSB1_Internal2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: fsb1-Internal2-mac
+ network: Internal2-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal2-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: FSB1
+ relationship: tosca.relationships.network.BindsTo
+ VLC2:
+ type: org.openecomp.resource.vfc.nodes.heat.VLC2
+ properties:
+ flavor:
+ get_input: vlc-flavor
+ availability_zone:
+ get_input: vlc_zone
+ image:
+ get_input: pxe-image
+ name:
+ get_input: vlc2-name
+ FSB1_Internal1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: fsb1-Internal1-mac
+ network: Internal1-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal1-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: FSB1
+ relationship: tosca.relationships.network.BindsTo
+ FSB2_Internal2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: fsb2-Internal2-mac
+ network: Internal2-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal2-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: FSB2
+ relationship: tosca.relationships.network.BindsTo
+ FSB2_Internal1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: fsb2-Internal1-mac
+ network: Internal1-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal1-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: FSB2
+ relationship: tosca.relationships.network.BindsTo
+ VLC1_OAM:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ fixed_ips:
+ - ip_address:
+ get_input: vlc1-oam-ip
+ network:
+ get_input: oam_net_id
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: VLC1
+ relationship: tosca.relationships.network.BindsTo
+ epc-sctp-b-net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ route_targets:
+ - get_input: epc-sctp-b-net-rt
+ network_name:
+ get_input: epc-sctp-b-net-name
+ subnets:
+ epc-sctp-b-subnet:
+ cidr:
+ get_input: epc-sctp-b-net-cidr
+ gateway_ip:
+ get_input: epc-sctp-b-net-gateway
+ allocation_pools:
+ - start:
+ get_input: epc-sctp-b-pool-start
+ end:
+ get_input: epc-sctp-b-pool-end
+ GPB2:
+ type: org.openecomp.resource.vfc.nodes.heat.GPB2
+ properties:
+ flavor:
+ get_input: gpb-flavor
+ availability_zone:
+ get_input: gpb_zone
+ image:
+ get_input: pxe-image
+ name:
+ get_input: gpb2-name
+ GPB1:
+ type: org.openecomp.resource.vfc.nodes.heat.GPB1
+ properties:
+ flavor:
+ get_input: gpb-flavor
+ availability_zone:
+ get_input: gpb_zone
+ image:
+ get_input: pxe-image
+ name:
+ get_input: gpb1-name
+ VLC1_GTP:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ fixed_ips:
+ - ip_address:
+ get_input: vlc1-gtp-ip
+ network: epc-gtp-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: epc-gtp-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: VLC1
+ relationship: tosca.relationships.network.BindsTo
+ FSB2_OAM:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ fixed_ips:
+ - ip_address:
+ get_input: fsb2-oam-ip
+ network:
+ get_input: oam_net_id
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: FSB2
+ relationship: tosca.relationships.network.BindsTo
+ GPB1_Internal2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: gpb1-Internal2-mac
+ network: Internal2-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal2-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: GPB1
+ relationship: tosca.relationships.network.BindsTo
+ GPB1_Internal1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: gpb1-Internal1-mac
+ network: Internal1-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal1-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: GPB1
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ vmme_small:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/vmme_small.yml
+ description: |
+ HOT template to create vmme 2 fsb 2 ncb 2 gbp 2 vlc
+ members:
+ - NCB1
+ - NCB2
+ - VLC2_OAM
+ - epc-gtp-net
+ - NCB1_Internal1
+ - VLC2_Internal2
+ - NCB1_Internal2
+ - VLC2_Internal1
+ - VLC2_GTP
+ - FSB1_volume
+ - testConvertGetParamFunctions
+ - FSB2_volume
+ - FSB1_OAM
+ - Internal1-net
+ - GPB2_Internal1
+ - GPB2_Internal2
+ - testConvertGetAttributeFunctions
+ - NCB2_Internal2
+ - NCB2_Internal1
+ - FSB2
+ - FSB1
+ - Internal2-net
+ - VLC1_Internal1
+ - epc-sctp-a-net
+ - VLC1_Internal2
+ - VLC1_SCTP_B
+ - VLC2_SCTP_B
+ - VLC1_SCTP_A
+ - VLC2_SCTP_A
+ - VLC1
+ - FSB1_Internal2
+ - VLC2
+ - FSB1_Internal1
+ - FSB2_Internal2
+ - FSB2_Internal1
+ - VLC1_OAM
+ - epc-sctp-b-net
+ - GPB2
+ - GPB1
+ - VLC1_GTP
+ - FSB2_OAM
+ - GPB1_Internal2
+ - GPB1_Internal1 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_VirtualNetwork/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_VirtualNetwork/inputs/MANIFEST.json
new file mode 100644
index 0000000000..9b0de07788
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_VirtualNetwork/inputs/MANIFEST.json
@@ -0,0 +1,21 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create vmme 2 fsb 2 ncb 2 gbp 2 vlc",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "vmme_small.yml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "vmme_small.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "nimbus-ethernet.sh",
+ "type": "OTHER"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_VirtualNetwork/inputs/nimbus-ethernet.sh b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_VirtualNetwork/inputs/nimbus-ethernet.sh
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_VirtualNetwork/inputs/nimbus-ethernet.sh
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_VirtualNetwork/inputs/vmme_small.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_VirtualNetwork/inputs/vmme_small.env
new file mode 100644
index 0000000000..e46cfd2a2d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_VirtualNetwork/inputs/vmme_small.env
@@ -0,0 +1,97 @@
+parameters:
+ oam_net_id: 47bf4cca-0961-422f-bcd6-d5a4fbb1a351
+ fsb1-name: ZRDM1MMEX33FSB001
+ fsb2-name: ZRDM1MMEX33FSB002
+ ncb1-name: ZRDM1MMEX33NCB001
+ ncb2-name: ZRDM1MMEX33NCB002
+ vlc1-name: ZRDM1MMEX33VLC002
+ vlc2-name: ZRDM1MMEX33VLC002
+ gpb1-name: ZRDM1MMEX33GPB001
+ gpb2-name: ZRDM1MMEX33GPB002
+ epc-sctp-a-net-name: EPC-SCTP-A
+ epc-sctp-a-net-rt: 13979:105717
+ epc-sctp-a-net-cidr: 107.243.37.0/27
+ epc-sctp-a-net-gateway: 107.243.37.1
+ epc-sctp-a-pool-start: 107.243.37.3
+ epc-sctp-a-pool-end: 107.243.37.30
+ epc-sctp-b-net-name: EPC-SCTP-B
+ epc-sctp-b-net-rt: 13979:105719
+ epc-sctp-b-net-cidr: 107.243.37.32/24
+ epc-sctp-b-net-gateway: 107.243.37.33
+ epc-sctp-b-pool-start: 107.243.37.35
+ epc-sctp-b-pool-end: 107.243.37.62
+ epc-gtp-net-name: EPC-GTP
+ epc-gtp-net-rt: 13979:105715
+ epc-gtp-net-cidr: 107.243.37.64/27
+ epc-gtp-net-gateway: 107.243.37.65
+ epc-gtp-pool-start: 107.243.37.67
+ epc-gtp-pool-end: 107.243.37.94
+ fsb1-image: MME_FSB1_15B-CP04-r5a01
+ fsb2-image: MME_FSB2_15B-CP04-r5a01
+ fsb1-flavor: m4.xlarge4
+ fsb2-flavor: m4.xlarge4
+ fsb_zone: nova
+ fsb1-Internal1-mac: 00:80:37:0E:0B:12
+ fsb1-Internal2-mac: 00:81:37:0E:0B:12
+ fsb1-oam-ip: 107.250.172.221
+ fsb2-Internal1-mac: 00:80:37:0E:0D:12
+ fsb2-Internal2-mac: 00:81:37:0E:0D:12
+ fsb2-oam-ip: 107.250.172.222
+ pxe-image: MME_PXE-BOOT_cxp9025898_2r5a01.qcow2
+ ncb-flavor: m4.xlarge4
+ ncb_zone: nova
+ ncb1-Internal1-mac: 00:80:37:0E:09:12
+ ncb1-Internal2-mac: 00:81:37:0E:09:12
+ ncb2-Internal1-mac: 00:80:37:0E:0F:12
+ ncb2-Internal2-mac: 00:81:37:0E:0F:12
+ gpb-flavor: m4.xlarge4
+ gpb_zone: nova
+ gpb1-Internal1-mac: 00:80:37:0E:01:22
+ gpb1-Internal1-ip: 169.254.0.101
+ gpb1-Internal2-mac: 00:81:37:0E:01:22
+ gpb2-Internal1-mac: 00:80:37:0E:02:22
+ gpb2-Internal2-mac: 00:81:37:0E:02:22
+ vlc-flavor: m4.xlarge4
+ vlc_zone: nova
+ vlc1-sctp-a-ip: 107.243.37.3
+ vlc1-sctp-b-ip: 107.243.37.35
+ vlc1-gtp-ip: 107.243.37.67
+ vlc1-oam-ip: 107.250.172.227
+ vlc2-sctp-a-ip: 107.243.37.4
+ vlc2-sctp-b-ip: 107.243.37.36
+ vlc2-gtp-ip: 107.243.37.68
+ vlc2-oam-ip: 107.250.172.228
+ vlc1-Internal1-mac: 00:80:37:0E:01:12
+ vlc1-Internal2-mac: 00:81:37:0E:01:12
+ vlc2-Internal1-mac: 00:80:37:0E:02:12
+ vlc2-Internal2-mac: 00:81:37:0E:02:12
+ Internal1_net_name: vmme_int_int_1
+ Internal1_subnet_name: vmme_int_int_sub_1
+ Internal1_ipam_name: vmme_ipam_int1
+ Internal1_cidr: 169.253.0.0/17
+ Internal1_forwarding_mode: "l2"
+ Internal1_dhcp: "False"
+ Internal1_shared: "False"
+ Internal1_external: "False"
+ Internal1_name: "Internal1-subnet"
+ Internal1_default_gateway: 169.253.0.3
+ Internal1_net_pool_start: 169.253.0.100
+ Internal1_net_pool_end: 169.253.0.254
+ Internal2_net_name: vmme_int_int_2
+ Internal2_subnet_name: vmme_int_int_sub_2
+ Internal2_ipam_name: vmme_ipam_int2
+ Internal2_cidr: 169.255.0.0/17
+ Internal2_shared: "False"
+ Internal2_external: "False"
+ Internal2_forwarding_mode: "l2"
+ Internal2_dhcp: "False"
+ Internal2_name: "Internal2-subnet"
+ Internal2_default_gateway: 169.255.0.3
+ Internal2_net_pool_start: 169.255.0.100
+ Internal2_net_pool_end: 169.255.0.254
+ static_prefix_sctp_a_1: 107.239.40.32/30
+ static_prefix_gtp_1: 107.239.40.96/30
+ static_prefix_sctp_b_1: 107.239.40.64/30
+ VMME_FSB1_boot_volume: 8248e794-6173-4b49-b9c3-8219b0b56f4e
+ VMME_FSB2_boot_volume: 089a0d11-4b15-4370-8343-3f90907b1221
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_VirtualNetwork/inputs/vmme_small.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_VirtualNetwork/inputs/vmme_small.yml
new file mode 100644
index 0000000000..21df075c4a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Contrail_VirtualNetwork/inputs/vmme_small.yml
@@ -0,0 +1,722 @@
+heat_template_version: 2013-05-23
+
+description: >
+ HOT template to create vmme 2 fsb 2 ncb 2 gbp 2 vlc
+
+parameters:
+ fsb1-oam-ip:
+ type: string
+ fsb2-oam-ip:
+ type: string
+ vlc1-oam-ip:
+ type: string
+ vlc2-oam-ip:
+ type: string
+ Internal1_net_pool_start:
+ type: string
+ Internal1_net_pool_end:
+ type: string
+ Internal2_net_pool_start:
+ type: string
+ Internal2_net_pool_end:
+ type: string
+ Internal1_default_gateway:
+ type: string
+ Internal2_default_gateway:
+ type: string
+ Internal1_shared:
+ type: string
+ Internal1_external:
+ type: string
+ Internal1_net_name:
+ type: string
+ Internal1_subnet_name:
+ type: string
+ Internal1_ipam_name:
+ type: string
+ Internal1_cidr:
+ type: string
+ Internal1_forwarding_mode:
+ type: string
+ Internal1_dhcp:
+ type: string
+ Internal1_name:
+ type: string
+ Internal2_net_name:
+ type: string
+ Internal2_subnet_name:
+ type: string
+ Internal2_ipam_name:
+ type: string
+ Internal2_cidr:
+ type: string
+ Internal2_forwarding_mode:
+ type: string
+ Internal2_dhcp:
+ type: string
+ Internal2_name:
+ type: string
+ Internal2_shared:
+ type: string
+ Internal2_external:
+ type: string
+ vlc1-sctp-a-ip:
+ type: string
+ vlc1-sctp-b-ip:
+ type: string
+ vlc1-gtp-ip:
+ type: string
+ vlc2-sctp-a-ip:
+ type: string
+ vlc2-sctp-b-ip:
+ type: string
+ vlc2-gtp-ip:
+ type: string
+ fsb1-name:
+ type: string
+ description: Name of fsb1
+ fsb2-name:
+ type: string
+ description: Name of fsb1
+ ncb1-name:
+ type: string
+ description: Name of ncb1
+ ncb2-name:
+ type: string
+ description: Name of ncb2
+ vlc1-name:
+ type: string
+ description: Name of vlc1
+ vlc2-name:
+ type: string
+ description: Name of vlc2
+ gpb1-name:
+ type: string
+ description: Name of gpb1
+ gpb2-name:
+ type: string
+ description: Name of gpb2
+ fsb_zone:
+ type: string
+ description: cluster for spawnning fsb instances
+ fsb1-image:
+ type: string
+ description: Name of image to use for server fsb1
+ fsb1-flavor:
+ type: string
+ description: Flavor to use for servers fsb1
+ oam_net_id:
+ type: string
+ description: uuid of oam network
+ fsb1-Internal1-mac:
+ type: string
+ description: static mac address assigned to fsb1-Internal1
+ fsb1-Internal2-mac:
+ type: string
+ description: static mac address assigned to fsb1-Internal2
+ fsb2-image:
+ type: string
+ description: Name of image to use for server fsb2
+ fsb2-flavor:
+ type: string
+ description: Flavor to use for servers fsb2
+ fsb2-Internal1-mac:
+ type: string
+ description: static mac address assigned to fsb2-Internal1
+ fsb2-Internal2-mac:
+ type: string
+ description: static mac address assigned to fsb2-Internal2
+ pxe-image:
+ type: string
+ description: Name of image to use for server ncb
+ ncb-flavor:
+ type: string
+ description: Flavor to use for servers ncb
+ ncb_zone:
+ type: string
+ description: cluster for spawnning ncb instances
+ ncb1-Internal1-mac:
+ type: string
+ description: static mac address assigned to ncb1-Internal1
+ ncb1-Internal2-mac:
+ type: string
+ description: static mac address assigned to ncb1-Internal2
+ ncb2-Internal1-mac:
+ type: string
+ description: static mac address assigned to ncb2-Internal1
+ ncb2-Internal2-mac:
+ type: string
+ description: static mac address assigned to ncb2-Internal2
+ gpb-flavor:
+ type: string
+ description: Flavor to use for servers gpb
+ gpb_zone:
+ type: string
+ description: cluster for spawnning gpb instances
+ gpb1-Internal1-ip:
+ type: string
+ gpb1-Internal1-mac:
+ type: string
+ description: static mac address assigned to gpb1-Internal1
+ gpb1-Internal2-mac:
+ type: string
+ description: static mac address assigned to gpb1-Internal2
+ gpb2-Internal1-mac:
+ type: string
+ description: static mac address assigned to gpb2-Internal1
+ gpb2-Internal2-mac:
+ type: string
+ description: static mac address assigned to gpb2-Internal2
+ vlc-flavor:
+ type: string
+ description: Flavor to use for servers vlc
+ vlc_zone:
+ type: string
+ description: cluster for spawnning vlc instances
+ vlc1-Internal1-mac:
+ type: string
+ description: static mac address assigned to vlc1-Internal1
+ vlc1-Internal2-mac:
+ type: string
+ description: static mac address assigned to vlc1-Internal2
+ vlc2-Internal1-mac:
+ type: string
+ description: static mac address assigned to vlc2-Internal1
+ vlc2-Internal2-mac:
+ type: string
+ description: static mac address assigned to vlc2-Internal2
+ epc-sctp-a-net-name:
+ type: string
+ description: epc-sctp-a net name
+ epc-sctp-a-net-rt:
+ type: string
+ description: epc-sctp-a route target
+ epc-sctp-a-net-cidr:
+ type: string
+ description: epc-sctp-a subnet
+ epc-sctp-a-net-gateway:
+ type: string
+ description: epc-sctp-a-net network gateway
+ epc-sctp-a-pool-start:
+ type: string
+ description: epc-sctp-a-net network ip pool start IP address
+ epc-sctp-a-pool-end:
+ type: string
+ description: epc-sctp-a-net network ip pool end IP address
+ epc-sctp-b-net-name:
+ type: string
+ description: epc-sctp-b net name
+ epc-sctp-b-net-rt:
+ type: string
+ description: epc-sctp-b route target
+ epc-sctp-b-net-cidr:
+ type: string
+ description: epc-sctp-b subnet
+ epc-sctp-b-net-gateway:
+ type: string
+ description: epc-sctp-b-net network gateway
+ epc-sctp-b-pool-start:
+ type: string
+ description: epc-sctp-b-net network ip pool start IP address
+ epc-sctp-b-pool-end:
+ type: string
+ description: epc-sctp-b-net network ip pool end IP address
+ epc-gtp-net-name:
+ type: string
+ description: gtp net name
+ epc-gtp-net-rt:
+ type: string
+ description: gtp route target
+ epc-gtp-net-cidr:
+ type: string
+ description: gtp stubnet
+ epc-gtp-net-gateway:
+ type: string
+ description: gtp network gateway
+ epc-gtp-pool-start:
+ type: string
+ description: gtp network ip pool start IP address
+ epc-gtp-pool-end:
+ type: string
+ description: gtp network ip pool end IP address
+ static_prefix_sctp_a_1:
+ type: string
+ description: Static Prefix
+ static_prefix_sctp_b_1:
+ type: string
+ description: Static Prefix
+ static_prefix_gtp_1:
+ type: string
+ description: Static Prefix
+ VMME_FSB1_boot_volume:
+ type: string
+ VMME_FSB2_boot_volume:
+ type: string
+ volume_type:
+ type: string
+ description: volume
+ volume_size:
+ type: string
+ description: volume
+ FSB1_volume_name:
+ type: string
+ description: volume name
+ FSB_1_image:
+ type: string
+ description: image name
+ FSB2_volume_name:
+ type: string
+ description: volume name
+ FSB_2_image:
+ type: string
+ description: image name
+ my_instance:
+ type: string
+ description: instance
+ Internal1-net:
+ type: string
+ description: net
+
+resources:
+ FSB1_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: 3
+ volume_type: {get_param: volume_type}
+ name: {get_param: FSB1_volume_name}
+ image: {get_param: FSB_1_image}
+
+ FSB2_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: volume_size}
+ volume_type: {get_param: volume_type}
+ name: {get_param: FSB2_volume_name}
+ image: {get_param: FSB_2_image}
+
+ Internal1_ipam:
+ type: OS::Contrail::NetworkIpam
+ properties:
+ name: { get_param: Internal1_ipam_name }
+
+ Internal2_ipam:
+ type: OS::Contrail::NetworkIpam
+ properties:
+ name: { get_param: Internal2_ipam_name }
+
+ Internal1-net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: Internal1_net_name }
+ forwarding_mode: { get_param: Internal1_forwarding_mode }
+ shared: { get_param: Internal1_shared }
+ external: true
+ route_targets: { get_file: 'file:///nimbus-ethernet.sh' }
+ testConvertGetParamFunctions:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: Internal1_net_name }
+ forwarding_mode: { get_param: Internal1_forwarding_mode }
+ shared: { get_param: Internal1_shared }
+ external: { get_param: [my_instance, networks, private, 0] }
+# route_targets: { "Fn::Split" : [ ",", Ref: route_targets ] }
+ testConvertGetAttributeFunctions:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: Internal1_net_name }
+ forwarding_mode: { get_param: Internal1_forwarding_mode }
+ shared: { get_param: Internal1_shared }
+ external: { get_param: Internal1_external }
+# route_targets: { "Fn::Split" : [ ",", Ref: route_targets ] }
+
+ Internal1-subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: Internal1-net }
+ cidr: { get_param: Internal1_cidr }
+ gateway_ip: { get_param: Internal1_default_gateway }
+ enable_dhcp: { get_param: Internal1_dhcp }
+
+ Internal3-subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: Internal1-net }
+ cidr: { get_param: Internal2_cidr }
+ gateway_ip: { get_param: Internal2_default_gateway }
+ enable_dhcp: { get_param: Internal2_dhcp }
+
+ Internal4-subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: Internal1-net }
+ cidr: { get_param: Internal1_cidr }
+ gateway_ip: { get_param: Internal1_default_gateway }
+ enable_dhcp: off
+
+# Internal1-subnet:
+# type: OS::Contrail::VnSubnet
+# properties:
+# name: { get_param: Internal1_subnet_name }
+# network: { get_resource: Internal1-net }
+# ip_prefix: { get_param: Internal1_cidr }
+ # ipam: { get_resource: Internal1_ipam }
+ # enable_dhcp: { get_param: Internal1_dhcp }
+ # default_gateway: { get_param: Internal1_default_gateway }
+ # allocation_pools:
+ # - start: { get_param: Internal1_net_pool_start }
+ # end: { get_param: Internal1_net_pool_end }
+
+
+
+ Internal2-net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: Internal2_name }
+ forwarding_mode: { get_param: Internal2_forwarding_mode }
+ shared: { get_param: Internal2_shared }
+ external: { get_param: Internal2_external }
+# route_targets: { "Fn::Split" : [ ",", Ref: route_targets ] }
+
+# Internal2-subnet:
+# type: OS::Contrail::VnSubnet
+# properties:
+# name: { get_param: Internal2_subnet_name }
+# network: { get_resource: Internal2-net }
+# ip_prefix: { get_param: Internal2_cidr }
+# ipam: { get_resource: Internal2_ipam }
+# enable_dhcp: { get_param: Internal2_dhcp }
+# default_gateway: { get_param: Internal2_default_gateway }
+# allocation_pools:
+# - start: { get_param: Internal2_net_pool_start }
+# end: { get_param: Internal2_net_pool_end }
+
+ Internal2-subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: Internal2-net }
+ cidr: { get_param: Internal2_cidr }
+ gateway_ip: { get_param: Internal2_default_gateway }
+ enable_dhcp: { get_param: Internal2_dhcp }
+
+ epc-sctp-a-net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: epc-sctp-a-net-name }
+ route_targets: [ get_param: epc-sctp-a-net-rt ]
+
+
+ epc-sctp-a-subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: epc-sctp-a-net }
+ cidr: { get_param: epc-sctp-a-net-cidr }
+ gateway_ip: { get_param: epc-sctp-a-net-gateway }
+ allocation_pools:
+ - start: { get_param: epc-sctp-a-pool-start }
+ end: { get_param: epc-sctp-a-pool-end }
+
+ epc-sctp-b-net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: epc-sctp-b-net-name }
+ route_targets: [ get_param: epc-sctp-b-net-rt ]
+
+ epc-sctp-b-subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: epc-sctp-b-net }
+ cidr: { get_param: epc-sctp-b-net-cidr }
+ gateway_ip: { get_param: epc-sctp-b-net-gateway }
+ allocation_pools:
+ - start: { get_param: epc-sctp-b-pool-start }
+ end: { get_param: epc-sctp-b-pool-end }
+
+ epc-gtp-net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: epc-gtp-net-name }
+ route_targets: [ get_param: epc-gtp-net-rt ]
+
+ epc-gtp-subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: epc-gtp-net }
+ cidr: { get_param: epc-gtp-net-cidr }
+ gateway_ip: { get_param: epc-gtp-net-gateway }
+ allocation_pools:
+ - start: { get_param: epc-gtp-pool-start }
+ end: { get_param: epc-gtp-pool-end }
+
+ FSB1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: fsb1-name }
+ block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB1_boot_volume }, delete_on_termination: "false" }]
+ flavor: { get_param: fsb1-flavor }
+ availability_zone: { get_param: fsb_zone }
+ networks:
+ - port: { get_resource: FSB1_Internal1 }
+ - port: { get_resource: FSB1_Internal2 }
+ - port: { get_resource: FSB1_OAM }
+
+ FSB1_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal1-net }
+ mac_address: { get_param: fsb1-Internal1-mac }
+
+ FSB1_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal2-net }
+ mac_address: { get_param: fsb1-Internal2-mac }
+
+ FSB1_OAM:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_id }
+ fixed_ips:
+ - ip_address: { get_param: fsb1-oam-ip }
+
+ FSB2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: fsb2-name }
+ block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+ flavor: { get_param: fsb2-flavor }
+ availability_zone: { get_param: fsb_zone }
+ networks:
+ - port: { get_resource: FSB2_Internal1 }
+ - port: { get_resource: FSB2_Internal2 }
+ - port: { get_resource: FSB2_OAM }
+
+ FSB2_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal1-net }
+ mac_address: { get_param: fsb2-Internal1-mac }
+
+
+ FSB2_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal2-net }
+ mac_address: { get_param: fsb2-Internal2-mac }
+
+ FSB2_OAM:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_id }
+ fixed_ips:
+ - ip_address: { get_param: fsb2-oam-ip }
+
+ NCB1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: ncb1-name }
+ image: { get_param: pxe-image }
+ flavor: { get_param: ncb-flavor }
+ availability_zone: { get_param: ncb_zone }
+ networks:
+ - port: { get_resource: NCB1_Internal1 }
+ - port: { get_resource: NCB1_Internal2 }
+
+ NCB1_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal1-net }
+ mac_address: { get_param: ncb1-Internal1-mac }
+
+ NCB1_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal2-net }
+ mac_address: { get_param: ncb1-Internal2-mac }
+
+ NCB2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: ncb2-name }
+ image: { get_param: pxe-image }
+ flavor: { get_param: ncb-flavor }
+ availability_zone: { get_param: ncb_zone }
+ networks:
+ - port: { get_resource: NCB2_Internal1 }
+ - port: { get_resource: NCB2_Internal2 }
+
+ NCB2_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal1-net }
+ mac_address: { get_param: ncb2-Internal1-mac }
+
+ NCB2_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal2-net }
+ mac_address: { get_param: ncb2-Internal2-mac }
+
+ GPB1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: gpb1-name }
+ image: { get_param: pxe-image }
+ flavor: { get_param: gpb-flavor }
+ availability_zone: { get_param: gpb_zone }
+ networks:
+ - port: { get_resource: GPB1_Internal1 }
+ - port: { get_resource: GPB1_Internal2 }
+
+ GPB1_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal1-net }
+ mac_address: { get_param: gpb1-Internal1-mac }
+
+ GPB1_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal2-net }
+ mac_address: { get_param: gpb1-Internal2-mac }
+
+ GPB2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: gpb2-name }
+ image: { get_param: pxe-image }
+ flavor: { get_param: gpb-flavor }
+ availability_zone: { get_param: gpb_zone }
+ networks:
+ - port: { get_resource: GPB2_Internal1 }
+ - port: { get_resource: GPB2_Internal2 }
+
+ GPB2_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal1-net }
+ mac_address: { get_param: gpb2-Internal1-mac }
+
+ GPB2_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal2-net }
+ mac_address: { get_param: gpb2-Internal2-mac }
+
+ VLC1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: vlc1-name }
+ image: { get_param: pxe-image }
+ flavor: { get_param: vlc-flavor }
+ availability_zone: { get_param: vlc_zone }
+ networks:
+ - port: { get_resource: VLC1_Internal1 }
+ - port: { get_resource: VLC1_Internal2 }
+ - port: { get_resource: VLC1_OAM }
+ - port: { get_resource: VLC1_SCTP_A }
+ - port: { get_resource: VLC1_SCTP_B }
+ - port: { get_resource: VLC1_GTP }
+
+ VLC1_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal1-net }
+ mac_address: { get_param: vlc1-Internal1-mac }
+
+ VLC1_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal2-net }
+ mac_address: { get_param: vlc1-Internal2-mac }
+
+ VLC1_OAM:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_id }
+ fixed_ips:
+ - ip_address: { get_param: vlc1-oam-ip }
+
+ VLC1_SCTP_A:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: epc-sctp-a-net }
+ fixed_ips:
+ - ip_address: { get_param: vlc1-sctp-a-ip }
+
+ VLC1_SCTP_B:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: epc-sctp-b-net }
+ fixed_ips:
+ - ip_address: { get_param: vlc1-sctp-b-ip }
+
+ VLC1_GTP:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: epc-gtp-net }
+ fixed_ips:
+ - ip_address: { get_param: vlc1-gtp-ip }
+
+ VLC2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: vlc2-name }
+ image: { get_param: pxe-image }
+ flavor: { get_param: vlc-flavor }
+ availability_zone: { get_param: vlc_zone }
+ networks:
+ - port: { get_resource: VLC2_Internal1 }
+ - port: { get_resource: VLC2_Internal2 }
+ - port: { get_resource: VLC2_OAM }
+ - port: { get_resource: VLC2_SCTP_A }
+ - port: { get_resource: VLC2_SCTP_B }
+ - port: { get_resource: VLC2_GTP }
+
+
+ VLC2_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal1-net }
+ mac_address: { get_param: vlc2-Internal1-mac }
+
+ VLC2_OAM:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_id }
+ fixed_ips:
+ - ip_address: { get_param: vlc2-oam-ip }
+
+ VLC2_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal2-net }
+ mac_address: { get_param: vlc2-Internal2-mac }
+
+ VLC2_SCTP_A:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: epc-sctp-a-net }
+ fixed_ips:
+ - ip_address: { get_param: vlc2-sctp-a-ip }
+
+ VLC2_SCTP_B:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: epc-sctp-b-net }
+ fixed_ips:
+ - ip_address: { get_param: vlc2-sctp-b-ip }
+
+ VLC2_GTP:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: epc-gtp-net }
+ fixed_ips:
+ - ip_address: { get_param: vlc2-gtp-ip }
+
+ Test-empty-network-in-subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_param: Internal1-net }
+ cidr: { get_param: Internal1_cidr }
+ gateway_ip: { get_param: Internal1_default_gateway }
+ enable_dhcp: { get_param: Internal1_dhcp } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Neutron_Net/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Neutron_Net/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..c93363e850
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Neutron_Net/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,219 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ param_number:
+ hidden: false
+ immutable: false
+ type: float
+ description: param number - float
+ jsa_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ description: CIDR of jsa log network
+ default: 107.243.7.128/26
+ param_string:
+ hidden: false
+ immutable: false
+ type: string
+ description: param String - string
+ param_json:
+ hidden: false
+ immutable: false
+ type: json
+ description: param json - map<String>
+ param_comma_delimited_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: param comma_delimited_list - List
+ entry_schema:
+ type: string
+ user_name:
+ label: User Name
+ hidden: true
+ immutable: false
+ type: string
+ description: User name to be configured for the application
+ constraints:
+ - max_length: 8
+ - min_length: 6
+ - pattern: '[A-Z]+[a-zA-Z0-9]*'
+ - in_range:
+ - 0
+ - 10
+ param_boolean:
+ hidden: false
+ immutable: false
+ type: boolean
+ description: param boolean - boolean
+ instance_type:
+ label: Instance Type
+ hidden: false
+ immutable: false
+ type: string
+ description: Instance type for compute instances
+ constraints:
+ - valid_values:
+ - m1.small
+ - m1.medium
+ - m1.large
+ jsa_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ default: jsa_log_net_0
+ node_templates:
+ jsa_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ subnets:
+ jsa_subnet:
+ cidr:
+ get_input: jsa_cidr
+ jsa_net_test_get_attribute_2_params:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ dhcp_agent_ids:
+ - '1000'
+ - '1001'
+ - '1002'
+ tenant_id: 23456
+ port_security_enabled: true
+ shared: true
+ admin_state_up: false
+ qos_policy: full
+ network_name:
+ get_attribute:
+ - jsa_net
+ - network_name
+ value_specs:
+ key1: spec1
+ jsa_net_test_get_attribute_3_params:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ dhcp_agent_ids:
+ - '1000'
+ - '1001'
+ - '1002'
+ tenant_id: 23456
+ port_security_enabled: true
+ shared: true
+ admin_state_up: false
+ qos_policy: full
+ network_name:
+ get_attribute:
+ - jsa_net
+ - network_name
+ - 0
+ value_specs:
+ key1: spec1
+ jsa_net_test_get_attribute_4_params:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ dhcp_agent_ids:
+ - '1000'
+ - '1001'
+ - '1002'
+ tenant_id: 23456
+ port_security_enabled: true
+ shared: true
+ admin_state_up: false
+ qos_policy: full
+ network_name:
+ get_attribute:
+ - jsa_net
+ - network_name
+ - 0
+ - a1
+ value_specs:
+ key1: spec1
+ jsa_net_test_get_attribute_5_params:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ dhcp_agent_ids:
+ - '1000'
+ - '1001'
+ - '1002'
+ tenant_id: 23456
+ port_security_enabled: true
+ shared: true
+ admin_state_up: false
+ qos_policy: full
+ network_name:
+ get_attribute:
+ - jsa_net
+ - network_name
+ - 0
+ - a1
+ - a2
+ value_specs:
+ key1: spec1
+ jsa_net_test_full_attribute:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ dhcp_agent_ids:
+ - '1000'
+ - '1001'
+ - '1002'
+ tenant_id: 23456
+ port_security_enabled: true
+ shared: true
+ admin_state_up: false
+ qos_policy: full
+ network_name:
+ get_input: jsa_net_name
+ subnets:
+ jsa_net_test_full_attribute_subnet:
+ cidr:
+ get_input: jsa_cidr
+ value_specs:
+ key1: spec1
+ key2: spec2
+ groups:
+ ep-jsa_net:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/ep-jsa_net.yaml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - jsa_net
+ - jsa_net_test_get_attribute_2_params
+ - jsa_net_test_get_attribute_3_params
+ - jsa_net_test_get_attribute_4_params
+ - jsa_net_test_get_attribute_5_params
+ - jsa_net_test_full_attribute \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Neutron_Net/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Neutron_Net/inputs/MANIFEST.json
new file mode 100644
index 0000000000..0d0f2bd7cf
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Neutron_Net/inputs/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "vEP_JSA_Net",
+ "description": "Version 2.0 02-09-2016 (Authors: John Doe, user PROD)",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "ep-jsa_net.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "ep-jsa_net.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Neutron_Net/inputs/ep-jsa_net.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Neutron_Net/inputs/ep-jsa_net.env
new file mode 100644
index 0000000000..9dd1cd441f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Neutron_Net/inputs/ep-jsa_net.env
@@ -0,0 +1,4 @@
+parameters:
+ jsa_net_name: jsa_log_net_0
+ jsa_cidr: 107.243.7.128/26
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Neutron_Net/inputs/ep-jsa_net.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Neutron_Net/inputs/ep-jsa_net.yaml
new file mode 100644
index 0000000000..3c5b00dc48
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Neutron_Net/inputs/ep-jsa_net.yaml
@@ -0,0 +1,135 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ param_string:
+ type: string
+ description: param String - string
+ param_number:
+ type: number
+ description: param number - float
+ param_json:
+ type: json
+ description: param json - map<String>
+ param_boolean:
+ type: boolean
+ description: param boolean - boolean
+ param_comma_delimited_list:
+ type: comma_delimited_list
+ description: param comma_delimited_list - List
+
+ jsa_net_name:
+ type: string
+ description: network name of jsa log network
+ jsa_cidr:
+ type: string
+ description: CIDR of jsa log network
+ user_name:
+ type: string
+ label: User Name
+ description: User name to be configured for the application
+ hidden: true
+ constraints:
+ - length: { min: 6, max: 8 }
+ description: User name must be between 6 and 8 characters
+ - allowed_pattern: "[A-Z]+[a-zA-Z0-9]*"
+ description: User name must start with an uppercase character
+ - range: { min: 0, max: 10 }
+ instance_type:
+ type: string
+ label: Instance Type
+ description: Instance type for compute instances
+ constraints:
+ - allowed_values:
+ - m1.small
+ - m1.medium
+ - m1.large
+
+resources:
+ jsa_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: {get_resource: jsa_net}
+ cidr: {get_param: jsa_cidr}
+
+ jsa_net:
+ type: OS::Neutron::Net
+ properties:
+ name: {get_param: jsa_net_name}
+ shared: True
+
+ jsa_net_test_full_attribute:
+ type: OS::Neutron::Net
+ properties:
+ name: {get_param: jsa_net_name}
+ shared: True
+ dhcp_agent_ids: ['1000','1001','1002']
+ tenant_id: 23456
+ port_security_enabled: t
+ admin_state_up: 0
+ qos_policy: full
+ value_specs:
+ key1: "spec1"
+ key2: "spec2"
+
+ jsa_net_test_full_attribute_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: {get_resource: jsa_net_test_full_attribute}
+ cidr: {get_param: jsa_cidr}
+
+ jsa_net_test_get_attribute_2_params:
+ type: OS::Neutron::Net
+ properties:
+ name: {get_attr: [jsa_net, name]}
+ shared: True
+ dhcp_agent_ids: ['1000','1001','1002']
+ tenant_id: 23456
+ port_security_enabled: t
+ admin_state_up: 0
+ qos_policy: full
+ value_specs:
+ key1: "spec1"
+
+ jsa_net_test_get_attribute_3_params:
+ type: OS::Neutron::Net
+ properties:
+ name: {get_attr: [jsa_net, name, 0]}
+ shared: True
+ dhcp_agent_ids: ['1000','1001','1002']
+ tenant_id: 23456
+ port_security_enabled: t
+ admin_state_up: 0
+ qos_policy: full
+ value_specs:
+ key1: "spec1"
+
+ jsa_net_test_get_attribute_4_params:
+ type: OS::Neutron::Net
+ properties:
+ name: {get_attr: [jsa_net, name, 0,a1]}
+ shared: True
+ dhcp_agent_ids: ['1000','1001','1002']
+ tenant_id: 23456
+ port_security_enabled: t
+ admin_state_up: 0
+ qos_policy: full
+ value_specs:
+ key1: "spec1"
+
+ jsa_net_test_get_attribute_5_params:
+ type: OS::Neutron::Net
+ properties:
+ name: {get_attr: [jsa_net, name, 0, a1, a2]}
+ shared: True
+ dhcp_agent_ids: ['1000','1001','1002']
+ tenant_id: 23456
+ port_security_enabled: t
+ admin_state_up: 0
+ qos_policy: full
+ value_specs:
+ key1: "spec1"
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Nova_Server/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Nova_Server/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..4eacd2f60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Nova_Server/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,602 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.FSB2:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.FSB1:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.pcm_server:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.pcrf_psm_server:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ Internal2_name:
+ label: Internal2_name
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_name
+ Internal1_shared:
+ label: Internal1_shared
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_shared
+ FSB1_volume_name:
+ label: FSB1_volume
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_volume_1
+ jsa_cidr:
+ label: jsa_cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: jsa_cidr
+ default: 107.243.7.128/26
+ availabilityzone_name:
+ label: availabilityzone_name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone_name
+ fsb1-name:
+ label: FSB1_name
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_name
+ pcm_image_name:
+ label: pcm_image_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_image_name
+ Internal2_external:
+ label: Internal2_external
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_external
+ Internal2_forwarding_mode:
+ label: Internal2_forwarding_mode
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_forwarding_mode
+ pcrf_psm_flavor_name:
+ label: pcrf_psm_flavor_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_flavor_name
+ pcrf_psm_image_name:
+ label: pcrf_psm_image_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_image_name
+ pcrf_vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: prop
+ FSB_1_image:
+ label: MME_FSB1
+ hidden: false
+ immutable: false
+ type: string
+ description: MME_FSB1_15B-CP04-r5a01
+ snapshot01:
+ hidden: false
+ immutable: false
+ type: string
+ description: prop
+ volume_size:
+ label: volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: my volume size 320GB
+ snapshot02:
+ hidden: false
+ immutable: false
+ type: string
+ description: prop
+ fsb1-Internal1-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ Internal2_shared:
+ label: Internal2_shared
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal2_shared
+ pcm_server_name:
+ label: pcm_server_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_server_name
+ cps_net_mask:
+ hidden: false
+ immutable: false
+ type: string
+ description: prop
+ Internal1_net_name:
+ label: Internal1_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_net_name
+ oam_net_name:
+ label: oam_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: oam_net_name
+ fsb1-flavor:
+ label: FSB1_flavor
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_flavor
+ fsb1-Internal2-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ pcm_vol_01:
+ hidden: false
+ immutable: false
+ type: string
+ description: prop
+ volume_type:
+ label: volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: volume type Gold
+ fsb1-zone:
+ label: FSB1_zone
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_zone
+ fsb_zone:
+ label: FSB1_zone
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_zone
+ oam_net_gw:
+ hidden: false
+ immutable: false
+ type: string
+ description: prop
+ VMME_FSB1_boot_volume:
+ hidden: false
+ immutable: false
+ type: string
+ network_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: prop
+ security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ cps_net_ip:
+ hidden: false
+ immutable: false
+ type: string
+ description: prop
+ jsa_net_name:
+ label: jsa_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: jsa_net_name
+ default: jsa_log_net_0
+ pcrf_psm_server_name:
+ label: pcrf_psm_server_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_psm_server_name
+ pcm_flavor_name:
+ label: pcm_flavor_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcm_flavor_name
+ oam_net_id:
+ label: oam_net_id
+ hidden: false
+ immutable: false
+ type: string
+ description: oam_net_id
+ pcrf_cps_net_ip:
+ hidden: false
+ immutable: false
+ type: string
+ description: prop
+ fsb2-Internal1-mac:
+ label: FSB1_internal_mac
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_internal_mac
+ Internal1_forwarding_mode:
+ label: Internal1_forwarding_mode
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_forwarding_mode
+ pcrf_cps_net_name:
+ label: pcrf_cps_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: pcrf_cps_net_name
+ pcm_vol:
+ hidden: false
+ immutable: false
+ type: string
+ description: prop
+ cps_net_name:
+ label: cps_net_name
+ hidden: false
+ immutable: false
+ type: string
+ description: cps_net_name
+ oam_net_ip:
+ hidden: false
+ immutable: false
+ type: string
+ description: prop
+ oam_net_mask:
+ hidden: false
+ immutable: false
+ type: string
+ description: prop
+ fsb1-oam-ip:
+ hidden: false
+ immutable: false
+ type: string
+ description: prop
+ pcrf_security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ Internal1_external:
+ label: Internal1_external
+ hidden: false
+ immutable: false
+ type: string
+ description: Internal1_external
+ node_templates:
+ pcm_vol_02:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ image:
+ get_input: FSB_1_image
+ volume_type:
+ get_input: volume_type
+ size: '(get_input : volume_size) * 1024'
+ read_only: true
+ name:
+ get_input: FSB1_volume_name
+ Internal2-net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ shared:
+ get_input: Internal2_shared
+ forwarding_mode:
+ get_input: Internal2_forwarding_mode
+ external:
+ get_input: Internal2_external
+ network_name:
+ get_input: Internal2_name
+ pcm_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: oam_net_ip
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pcm
+ relationship: tosca.relationships.network.BindsTo
+ server_VolumeTest_snapshot02:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ snapshot_id:
+ get_input: snapshot02
+ FSB1_Internal2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: fsb1-Internal2-mac
+ network: Internal2-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal2-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: FSB1
+ relationship: tosca.relationships.network.BindsTo
+ server_VolumeTest_snapshot01:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ snapshot_id:
+ get_input: snapshot01
+ FSB1_Internal1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: fsb1-Internal1-mac
+ network: Internal1-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal1-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: FSB1
+ relationship: tosca.relationships.network.BindsTo
+ FSB1_OAM:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ fixed_ips:
+ - ip_address:
+ get_input: fsb1-oam-ip
+ network:
+ get_input: oam_net_id
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: FSB1
+ relationship: tosca.relationships.network.BindsTo
+ psm01_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: pcrf_security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: pcrf_cps_net_ip
+ network:
+ get_input: pcrf_cps_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: pcrf_server_psm
+ relationship: tosca.relationships.network.BindsTo
+ pcm_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: cps_net_ip
+ network:
+ get_input: cps_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pcm
+ relationship: tosca.relationships.network.BindsTo
+ network:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ network_name:
+ get_input: Internal1_net_name
+ server_pcm:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm_server
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ Internal1-net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ shared:
+ get_input: Internal1_shared
+ forwarding_mode:
+ get_input: Internal1_forwarding_mode
+ external:
+ get_input: Internal1_external
+ network_name:
+ get_input: Internal1_net_name
+ pcrf_server_psm:
+ type: org.openecomp.resource.vfc.nodes.heat.pcrf_psm_server
+ properties:
+ flavor:
+ get_input: pcrf_psm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcrf_psm_image_name
+ config_drive: 'True'
+ metadata:
+ vnf_id:
+ get_input: pcrf_vnf_id
+ user_data_format: RAW
+ name:
+ get_input: pcrf_psm_server_name
+ server_VolumeTest:
+ type: org.openecomp.resource.vfc.nodes.heat.pcm_server
+ properties:
+ flavor:
+ get_input: pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcm_image_name
+ config_drive: 'True'
+ user_data_format: RAW
+ name:
+ get_input: pcm_server_name
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: pcm_vol_02
+ relationship: tosca.relationships.AttachesTo
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: server_VolumeTest_snapshot01
+ relationship: server_VolumeTest_4
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: server_VolumeTest_snapshot02
+ relationship: server_VolumeTest_5
+ FSB2:
+ type: org.openecomp.resource.vfc.nodes.heat.FSB2
+ properties:
+ flavor:
+ get_input: fsb1-flavor
+ availability_zone:
+ get_input: fsb_zone
+ name:
+ get_input: fsb1-name
+ FSB1:
+ type: org.openecomp.resource.vfc.nodes.heat.FSB1
+ properties:
+ flavor:
+ get_input: fsb1-flavor
+ availability_zone:
+ get_input: fsb_zone
+ metadata:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: '0644'
+ content:
+ str_replace:
+ template:
+ get_artifact:
+ - SELF
+ - nimbus-ethernet
+ params:
+ $dev: eth0
+ $netmask:
+ get_input: cps_net_mask
+ $ip:
+ get_input: cps_net_ip
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth1
+ permissions: '0644'
+ content:
+ str_replace:
+ template:
+ get_artifact:
+ - SELF
+ - nimbus-ethernet-gw
+ params:
+ $dev: eth1
+ $netmask:
+ get_input: oam_net_mask
+ $gateway:
+ get_input: oam_net_gw
+ $ip:
+ get_input: oam_net_ip
+ name:
+ get_input: fsb1-name
+ artifacts:
+ nimbus-ethernet-gw:
+ type: tosca.artifacts.Deployment
+ file: ../Artifacts/nimbus-ethernet-gw
+ nimbus-ethernet:
+ type: tosca.artifacts.Deployment
+ file: ../Artifacts/nimbus-ethernet
+ relationship_templates:
+ server_VolumeTest_4:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: server_VolumeTest_snapshot01
+ instance_uuid: server_VolumeTest
+ device: vdb
+ server_VolumeTest_5:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: server_VolumeTest_snapshot02
+ instance_uuid: server_VolumeTest
+ groups:
+ ep-jsa_net:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/ep-jsa_net.yaml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - pcm_vol_02
+ - Internal2-net
+ - pcm_port_1
+ - FSB1_Internal2
+ - FSB1_Internal1
+ - FSB1_OAM
+ - psm01_port_0
+ - pcm_port_0
+ - network
+ - server_pcm
+ - Internal1-net
+ - pcrf_server_psm
+ - server_VolumeTest
+ - FSB2
+ - FSB1 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Nova_Server/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Nova_Server/inputs/MANIFEST.json
new file mode 100644
index 0000000000..cd0c5e8803
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Nova_Server/inputs/MANIFEST.json
@@ -0,0 +1,25 @@
+{
+ "name": "vEP_JSA_Net",
+ "description": "Version 2.0 02-09-2016 (Authors: John Doe, user PROD)",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "ep-jsa_net.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "ep-jsa_net.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "nimbus-ethernet",
+ "type": "OTHER"
+ },
+ {
+ "file": "nimbus-ethernet-gw",
+ "type": "OTHER"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Nova_Server/inputs/ep-jsa_net.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Nova_Server/inputs/ep-jsa_net.env
new file mode 100644
index 0000000000..9dd1cd441f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Nova_Server/inputs/ep-jsa_net.env
@@ -0,0 +1,4 @@
+parameters:
+ jsa_net_name: jsa_log_net_0
+ jsa_cidr: 107.243.7.128/26
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Nova_Server/inputs/ep-jsa_net.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Nova_Server/inputs/ep-jsa_net.yaml
new file mode 100644
index 0000000000..3e6d1ec2e4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Nova_Server/inputs/ep-jsa_net.yaml
@@ -0,0 +1,411 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ security_group_name:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ pcrf_security_group_name:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ volume_type:
+ type: string
+ label: volume type
+ description: volume type Gold
+
+ volume_size:
+ type: number
+ label: volume size
+ description: my volume size 320GB
+
+ FSB_1_image:
+ type: string
+ label: MME_FSB1
+ description: MME_FSB1_15B-CP04-r5a01
+
+ FSB1_volume_name:
+ type: string
+ label: FSB1_volume
+ description: FSB1_volume_1
+
+ fsb1-name:
+ type: string
+ label: FSB1_name
+ description: FSB1_name
+
+ fsb1-flavor:
+ type: string
+ label: FSB1_flavor
+ description: FSB1_flavor
+
+ fsb1-zone:
+ type: string
+ label: FSB1_zone
+ description: FSB1_zone
+
+ fsb_zone:
+ type: string
+ label: FSB1_zone
+ description: FSB1_zone
+
+ fsb1-Internal1-mac:
+ type: string
+ label: FSB1_internal_mac
+ description: FSB1_internal_mac
+
+ fsb1-Internal2-mac:
+ type: string
+ label: FSB1_internal_mac
+ description: FSB1_internal_mac
+
+ fsb2-Internal1-mac:
+ type: string
+ label: FSB1_internal_mac
+ description: FSB1_internal_mac
+
+ oam_net_id:
+ type: string
+ label: oam_net_id
+ description: oam_net_id
+
+ jsa_net_name:
+ type: string
+ label: jsa_net_name
+ description: jsa_net_name
+
+ jsa_cidr:
+ type: string
+ label: jsa_cidr
+ description: jsa_cidr
+
+ pcrf_cps_net_name:
+ type: string
+ label: pcrf_cps_net_name
+ description: pcrf_cps_net_name
+
+ pcrf_psm_server_name:
+ type: string
+ label: pcrf_psm_server_name
+ description: pcrf_psm_server_name
+
+ pcrf_psm_image_name:
+ type: string
+ label: pcrf_psm_image_name
+ description: pcrf_psm_image_name
+
+ pcrf_psm_flavor_name:
+ type: string
+ label: pcrf_psm_flavor_name
+ description: pcrf_psm_flavor_name
+
+ availabilityzone_name:
+ type: string
+ label: availabilityzone_name
+ description: availabilityzone_name
+
+ pcm_server_name:
+ type: string
+ label: pcm_server_name
+ description: pcm_server_name
+
+ pcm_image_name:
+ type: string
+ label: pcm_image_name
+ description: pcm_image_name
+
+ pcm_flavor_name:
+ type: string
+ label: pcm_flavor_name
+ description: pcm_flavor_name
+
+ Internal1_net_name:
+ type: string
+ label: Internal1_net_name
+ description: Internal1_net_name
+
+ Internal1_forwarding_mode:
+ type: string
+ label: Internal1_forwarding_mode
+ description: Internal1_forwarding_mode
+
+ Internal1_shared:
+ type: string
+ label: Internal1_shared
+ description: Internal1_shared
+
+ Internal1_external:
+ type: string
+ label: Internal1_external
+ description: Internal1_external
+
+ Internal2_name:
+ type: string
+ label: Internal2_name
+ description: Internal2_name
+
+ Internal2_shared:
+ type: string
+ label: Internal2_shared
+ description: Internal2_shared
+
+ Internal2_external:
+ type: string
+ label: Internal2_external
+ description: Internal2_external
+
+ Internal2_forwarding_mode:
+ type: string
+ label: Internal2_forwarding_mode
+ description: Internal2_forwarding_mode
+
+ cps_net_name:
+ type: string
+ label: cps_net_name
+ description: cps_net_name
+
+ oam_net_name:
+ type: string
+ label: oam_net_name
+ description: oam_net_name
+ oam_net_gw:
+ type: string
+ description: prop
+ cps_net_ip:
+ type: string
+ description: prop
+ cps_net_mask:
+ type: string
+ description: prop
+ oam_net_ip:
+ type: string
+ description: prop
+ oam_net_mask:
+ type: string
+ description: prop
+ fsb1-oam-ip:
+ type: string
+ description: prop
+ pcrf_cps_net_ip:
+ type: string
+ description: prop
+ pcrf_vnf_id:
+ type: string
+ description: prop
+ pcm_vol:
+ type: string
+ description: prop
+ pcm_vol_01:
+ type: string
+ description: prop
+ snapshot01:
+ type: string
+ description: prop
+ snapshot02:
+ type: string
+ description: prop
+ VMME_FSB1_boot_volume:
+ type: string
+ network_name:
+ type: string
+ description: prop
+
+
+resources:
+ FSB1:
+ type: OS::Nova::Server
+ depends_on: script_init
+ properties:
+ name: { get_param: fsb1-name }
+ block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB1_boot_volume }, delete_on_termination: "false" }]
+ flavor: { get_param: fsb1-flavor }
+ availability_zone: { get_param: fsb_zone }
+ networks:
+ - port: { get_resource: FSB1_Internal1 }
+ fixed_ip: 10.0.0.0
+ floating_ip: 10.0.0.1
+ network: 100_1000_0011
+ port_extra_properties: {admin_state_up: true , allowed_address_pairs: 10}
+ subnet: 10.0.0.2
+ - port: { get_resource: FSB1_Internal2 }
+ - port: { get_resource: FSB1_OAM }
+ metadata:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: "file:///nimbus-ethernet" }
+ params:
+ $dev: eth0
+ $ip: { get_param: cps_net_ip }
+ $netmask: { get_param: cps_net_mask }
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth1
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: "file:///nimbus-ethernet-gw" }
+ params:
+ $dev: eth1
+ $ip: { get_param: oam_net_ip }
+ $netmask: { get_param: oam_net_mask }
+ $gateway: { get_param: oam_net_gw }
+
+
+ FSB1_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: Internal1-net }
+ mac_address: { get_param: fsb1-Internal1-mac }
+
+ FSB1_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: Internal2-net }
+ mac_address: { get_param: fsb1-Internal2-mac }
+
+ FSB1_OAM:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: oam_net_id }
+ fixed_ips:
+ - ip_address: { get_param: fsb1-oam-ip }
+
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ psm01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
+
+ pcrf_server_psm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_psm_server_name }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: psm01_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+ server_pcm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcm_server_name }
+ image: { get_param: pcm_image_name }
+ flavor: { get_param: pcm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcm_port_0}
+ - port: { get_resource: pcm_port_1}
+ block_device_mapping:
+ - device_name: vdb
+ volume_id: { get_param: pcm_vol}
+ user_data_format: RAW
+ user_data:
+ get_resource: server_init
+ server_VolumeTest:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcm_server_name }
+ image: { get_param: pcm_image_name }
+ flavor: { get_param: pcm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ block_device_mapping:
+ - device_name: vdb
+ - device_name: vdb
+ volume_id: { get_param: pcm_vol}
+ - device_name: vdb
+ volume_id: { get_param: pcm_vol_01}
+ - device_name: vdb
+ volume_id: { get_resource: pcm_vol_02}
+ - device_name: vdb
+ snapshot_id: { get_param: snapshot01}
+ - snapshot_id: { get_param: snapshot02}
+ user_data_format: RAW
+ user_data:
+ get_resource: server_init
+ server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+ script_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+
+ network:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: Internal1_net_name }
+
+ pcm_vol_02:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: volume_size}
+ volume_type: {get_param: volume_type}
+ name: {get_param: FSB1_volume_name}
+ image: {get_param: FSB_1_image}
+ read_only: 1
+
+ pcm_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: cps_net_ip }
+ security_groups: [{ get_param: security_group_name }]
+
+ pcm_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips:
+ - ip_address: { get_param: oam_net_ip }
+ security_groups: [{ get_param: security_group_name }]
+
+ Internal1-net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: Internal1_net_name }
+ forwarding_mode: { get_param: Internal1_forwarding_mode }
+ shared: { get_param: Internal1_shared }
+ external: { get_param: Internal1_external }
+# route_targets: { "Fn::Split" : [ ",", Ref: route_targets ] }
+
+ Internal2-net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: Internal2_name }
+ forwarding_mode: { get_param: Internal2_forwarding_mode }
+ shared: { get_param: Internal2_shared }
+ external: { get_param: Internal2_external }
+# route_targets: { "Fn::Split" : [ ",", Ref: route_targets ] }
+
+ FSB2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: fsb1-name }
+ flavor: { get_param: fsb1-flavor }
+ availability_zone: { get_param: fsb_zone }
+ networks:
+ - network: {get_param: network_name} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Nova_Server/inputs/nimbus-ethernet b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Nova_Server/inputs/nimbus-ethernet
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Nova_Server/inputs/nimbus-ethernet
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Nova_Server/inputs/nimbus-ethernet-gw b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Nova_Server/inputs/nimbus-ethernet-gw
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/resources/OS_Nova_Server/inputs/nimbus-ethernet-gw
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/sharedresources/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/sharedresources/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..6d35846244
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/sharedresources/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,95 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.server_pcm_002:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.server_pcm_001:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ fsb1-flavor:
+ label: FSB1_flavor
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_flavor
+ fsb_zone:
+ label: FSB1_zone
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_zone
+ fsb1-name:
+ label: FSB1_name
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_name
+ FSB_1_image:
+ label: MME_FSB1
+ hidden: false
+ immutable: false
+ type: string
+ description: MME_FSB1_15B-CP04-r5a01
+ node_templates:
+ server_pcm_002:
+ type: org.openecomp.resource.vfc.nodes.heat.server_pcm_002
+ properties:
+ flavor:
+ get_input: fsb1-flavor
+ availability_zone:
+ get_input: fsb_zone
+ name:
+ get_input: fsb1-name
+ server_pcm_001:
+ type: org.openecomp.resource.vfc.nodes.heat.server_pcm_001
+ properties:
+ flavor:
+ get_input: fsb1-flavor
+ availability_zone:
+ get_input: fsb_zone
+ name:
+ get_input: fsb1-name
+ groups:
+ sharedDefinitionOutParam:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/sharedDefinitionOutParam.yaml
+ description: heat template that creates PCRF Cluman stack
+ members:
+ - server_pcm_002
+ - server_pcm_001
+ outputs:
+ out_id2:
+ value: static value
+ out_id1:
+ value:
+ get_input: oam_net_gw \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/sharedresources/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/sharedresources/inputs/MANIFEST.json
new file mode 100644
index 0000000000..786c357838
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/sharedresources/inputs/MANIFEST.json
@@ -0,0 +1,12 @@
+{
+ "name": "vEP_JSA_Net",
+ "description": "Version 2.0 02-09-2016 (Authors: John Doe, user PROD)",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "sharedDefinitionOutParam.yaml",
+ "type": "HEAT",
+ "isBase": "true"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/sharedresources/inputs/sharedDefinitionOutParam.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/sharedresources/inputs/sharedDefinitionOutParam.yaml
new file mode 100644
index 0000000000..778375425b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/sharedresources/inputs/sharedDefinitionOutParam.yaml
@@ -0,0 +1,45 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Cluman stack
+
+parameters:
+ FSB_1_image:
+ type: string
+ label: MME_FSB1
+ description: MME_FSB1_15B-CP04-r5a01
+ fsb1-flavor:
+ type: string
+ label: FSB1_flavor
+ description: FSB1_flavor
+ fsb_zone:
+ type: string
+ label: FSB1_zone
+ description: FSB1_zone
+ fsb1-name:
+ type: string
+ label: FSB1_name
+ description: FSB1_name
+resources:
+ server_pcm_001:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: fsb1-name }
+ flavor: { get_param: fsb1-flavor }
+ availability_zone: { get_param: fsb_zone }
+
+ server_pcm_002:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: fsb1-name }
+ flavor: { get_param: fsb1-flavor }
+ availability_zone: { get_param: fsb_zone }
+
+outputs:
+ server_pcm_001_id:
+ value: {get_resource: server_pcm_001}
+ server_pcm_002_id:
+ value: {get_resource: server_pcm_002}
+ out_id1:
+ value: {get_param: oam_net_gw}
+ out_id2:
+ value: "static value"
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/expectedOutput/validationOutput.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/expectedOutput/validationOutput.json
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/expectedOutput/validationOutput.json
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/MANIFEST.json
new file mode 100644
index 0000000000..e5bfbd157d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/MANIFEST.json
@@ -0,0 +1,83 @@
+{
+ "name": "multiple_not_nested",
+ "description": "multiple heat files in zip, no nesting",
+ "version": "2013-05-23",
+ "data": [{
+ "file": "cmaui.yml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [{
+ "file": "cmaui.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "cmaui_net.yaml",
+ "type": "HEAT_NET"
+ }]
+ },
+ {
+ "file": "eca_oam.yaml",
+ "type": "HEAT",
+ "data": [{
+ "file": "eca_oam.env",
+ "type": "HEAT_ENV"
+ }]
+ },
+ {
+ "file": "eca_oam_nested.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested1.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested2.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "MMSC_Capacity_Line.yml",
+ "type": "HEAT",
+ "data": [{
+ "file": "MMSC_Capacity_Line_1.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "VOLUME.yaml",
+ "type": "HEAT_VOL",
+ "data": [{
+ "file": "volume.env",
+ "type": "HEAT_ENV"
+ }]
+ }]
+ },
+ {
+ "file": "SG_ECA_MGMT.yaml",
+ "type": "HEAT",
+ "data": [{
+ "file": "sg_eca_mgmt.env",
+ "type": "HEAT_ENV"
+ }]
+ },
+ {
+ "file": "VOLUME_OUT.yaml",
+ "type": "HEAT_VOL",
+ "data": [{
+ "file": "volume_out.env",
+ "type": "HEAT_ENV"
+ }]
+ },
+ {
+ "file": "NETWORK_OUT.yaml",
+ "type": "HEAT_NET",
+ "data": [{
+ "file": "network_out.env",
+ "type": "HEAT_ENV"
+ }]
+ },
+ {
+ "file": "art.sh",
+ "type": "SHELL"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/MMSC_Capacity_Line.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/MMSC_Capacity_Line.yml
new file mode 100644
index 0000000000..746b96dfe8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/MMSC_Capacity_Line.yml
@@ -0,0 +1,3234 @@
+heat_template_version: 2013-05-23
+
+description: >
+ HOT template that creates internal networks, load balancers and servers for vMMSC capacity Line 1.
+ #11/23: updated the network definition to meet the juniper best practices way of defining the gateway, DHCP enable for internal networks (L457-L547)
+
+parameters:
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_the_MMSC_id
+ oam_net_name:
+ type: string
+ label: UID of OAM network
+ description: UID of OAM network
+ oam_network_netmask:
+ type: string
+ label: oam network netmask
+ description: oam network gateway
+ oam_network_gateway:
+ type: string
+ label: oam network gateway
+ description: oam network gateway
+ oam_network_route_1:
+ type: string
+ label: oam network route 1
+ description: oam network route 1
+ oam_network_route_2:
+ type: string
+ label: oam network route 2
+ description: oam network route 2
+ external_dns:
+ type: string
+ label: dns server
+ description: dns server for MMSC
+ external_ntp:
+ type: string
+ label: ntp server
+ description: ntp server for MMSC
+ lb_oam_ips:
+ type: comma_delimited_list
+ label: management network ips for mmsc lb
+ description: the ips of the management network for mmsc lb
+ dmz_protected_net_name:
+ type: string
+ label: UID of dmz_protected network
+ description: UID of dmz_protected network
+ lb_dmz_protected_ips:
+ type: comma_delimited_list
+ label: dmz protected network local ips for lb VM
+ description: local ips of the dmz protected network for lb VM
+ cor_direct_net_name:
+ type: string
+ label: cor direct net UID
+ description: cor direct net
+ lb_cor_direct_ips:
+ type: comma_delimited_list
+ label: cor direct network local ips for lb VM
+ description: local ips of cor direct network for lb VM
+ mms_traffic_net_name:
+ type: string
+ label: Name of MMS traffic network
+ description: Name of MMS traffic network
+ mms_traffic_netmask:
+ type: string
+ label: MMS traffic network subnet mask
+ description: MMS traffic network subnet mask
+ mms_traffic_net_gateway:
+ type: string
+ label: MMS traffic network gateway address
+ description: MMS traffic network gateway address
+ mms_traffic_start:
+ type: string
+ label: mmsc traffic start IP
+ description: mmsc traffic start IP
+ mms_traffic_end:
+ type: string
+ label: mmsc traffic end IP
+ description: mmsc traffic end IP
+ mms_traffic_net_cidr:
+ type: string
+ label: mmsc traffic cidr
+ description: mmsc traffic cidr
+ mms_traffic_net_local_ip1:
+ type: string
+ label: mmsc traffic network local ip1
+ description: the local ip1 of the mmsc traffic network
+ mms_traffic_net_local_ip2:
+ type: string
+ label: mmsc traffic network local ip2
+ description: the local ip2 of the mmsc traffic network
+ mms_traffic_net_floating_ip:
+ type: string
+ label: mmsc traffic floating ip
+ description: mmsc traffic floating ip
+ nems_internal_name:
+ type: string
+ label: nems internal network name
+ description: nems internal network name
+ nems_internal_start:
+ type: string
+ label: nems internal start
+ description: nems internal start
+ nems_internal_end:
+ type: string
+ label: nems internal end
+ description: nems internal end
+ nems_internal_cidr:
+ type: string
+ label: nems ineternal cidr
+ description: nems internal cidr
+ nems_internal_netmask:
+ type: string
+ label: NEMS internal network subnet mask
+ description: NEMS internal network subnet mask
+ nems_internal_gateway:
+ type: string
+ label: nems internal gw
+ description: nems internal gw
+ nems_traffic_name:
+ type: string
+ label: nems traffic name
+ description: nems traffic name
+ nems_traffic_start:
+ type: string
+ label: nems traffic start
+ description: nems traffic start
+ nems_traffic_end:
+ type: string
+ label: nems traffic end
+ description: nems traffic end
+ nems_traffic_cidr:
+ type: string
+ label: nems traffic cidr
+ description: nems traffic cidr
+ nems_traffic_netmask:
+ type: string
+ label: NEMS traffic network subnet mask
+ description: NEMS traffic network subnet mask
+ nems_traffic_gateway:
+ type: string
+ label: NEMS traffic network gateway
+ description: NEMS traffic network gateway
+ nems_traffic_net_local_ip1:
+ type: string
+ label: nems traffic network local ip1
+ description: the local ip1 of the nems traffic network
+ nems_traffic_net_local_ip2:
+ type: string
+ label: nems traffic network local ip2
+ description: the local ip2 of the nems traffic network
+ nems_traffic_net_floating_ip:
+ type: string
+ label: nems traffic floating ip
+ description: nems traffic floating ip
+ nems_user_web_name:
+ type: string
+ label: nems user web name
+ description: nems user web name
+ nems_user_web_start:
+ type: string
+ label: nems user web start
+ description: nems user web end
+ nems_user_web_end:
+ type: string
+ label: nems user web end
+ description: nems user web end
+ nems_user_web_cidr:
+ type: string
+ label: nems user web cidr
+ description: nems user web cidr
+ nems_user_web_netmask:
+ type: string
+ label: NEMS user web network subnet mask
+ description: NEMS user web network subnet mask
+ nems_user_web_gateway:
+ type: string
+ label: NEMS user web network gateway
+ description: NEMS user web network gateway
+ nems_user_web_net_local_ip1:
+ type: string
+ label: nems user web network local ip1
+ description: the local ip1 of the nems user web network
+ nems_user_web_net_local_ip2:
+ type: string
+ label: nems user web network local ip2
+ description: the local ip2 of the nems user web network
+ nems_user_web_net_floating_ip:
+ type: string
+ label: nems user web floating ip
+ description: nems user web floating ip
+ nems_imap_name:
+ type: string
+ label: nems imap name
+ description: nems imap name
+ nems_imap_netmask:
+ type: string
+ label: nems imap subnet mask
+ description: nems imap subnet mask
+ nems_imap_start:
+ type: string
+ label: nems imap start
+ description: nems imap start
+ nems_imap_end:
+ type: string
+ label: nems imap end
+ description: nems imap end
+ nems_imap_cidr:
+ type: string
+ label: nems imap cidr
+ description: nems imap cidr
+ nems_imap_gateway:
+ type: string
+ label: nems imap gateway
+ description: nems imap gateway
+ eca_traffic_name:
+ type: string
+ label: eca traffic name
+ description: eca traffic name
+ eca_traffic_start:
+ type: string
+ label: eca traffic start
+ description: eca traffic start
+ eca_traffic_end:
+ type: string
+ label: eca traffic end
+ description: eca traffic end
+ eca_traffic_cidr:
+ type: string
+ label: eca traffic cidr
+ description: eca traffic cidr
+ eca_traffic_netmask:
+ type: string
+ label: ECA traffic network subnet mask
+ description: ECA traffic network subnet mask
+ eca_traffic_net_gateway:
+ type: string
+ label: eca_traffic network gateway
+ description: eca_traffic network gateway
+ eca_traffic_net_local_ip1:
+ type: string
+ label: eca traffic network local ip1
+ description: the local ip1 of the eca traffic network
+ eca_traffic_net_local_ip2:
+ type: string
+ label: eca traffic network local ip2
+ description: the local ip2 of the eca traffic network
+ eca_traffic_net_floating_ip:
+ type: string
+ label: eca traffic floating ip
+ description: eca traffic floating ip
+ ha_net_name:
+ type: string
+ label: ha_failover network name
+ description: ha_failover network name
+ ha_net_start:
+ type: string
+ label: ha net start
+ description: ha net start
+ ha_net_end:
+ type: string
+ label: ha net end
+ description: ha net end
+ ha_net_cidr:
+ type: string
+ label: ha net cidr
+ description: ha net cidr
+ ha_net_local_ip1:
+ type: string
+ label: ha net network local ip1
+ description: the local ip1 of the ha network
+ ha_net_local_ip2:
+ type: string
+ label: ha net network local ip2
+ description: the local ip2 of the ha network
+ lb_names:
+ type: comma_delimited_list
+ label: MMSC load balancer instance names
+ description: MMSC load balancer instance names
+ lb_image_name:
+ type: string
+ label: MMSC load balancer image name
+ description: MMSC load balancer image name
+ lb_flavor_name:
+ type: string
+ label: Load balancer flavor name
+ description: the flavor name of MMSC load balancer instance
+ availability_zone_0:
+ type: string
+ label: MMSC availabilityzone name
+ description: MMSC availabilityzone name
+ security_group_name:
+ type: string
+ label: MMSC security group name
+ description: MMSC security group name
+ mmsc_image:
+ type: string
+ label: Image for MMSC server
+ description: Image for MMSC server
+ mmsc_flavor:
+ type: string
+ label: Flavor for MMSC server
+ description: Flavor for MMSC server
+ mmsc_cinder_volume_size:
+ type: number
+ label: MMSC Cinder volume size
+ description: the size of the MMSC Cinder volume
+ nems_fe_image:
+ type: string
+ label: Image for NEMS FE server
+ description: Image for NEMS FE server
+ nems_fe_flavor:
+ type: string
+ label: Flavor for NEMS FE server
+ description: Flavor for NEMS FE server
+ nems_be_image:
+ type: string
+ label: Image for NEMS BE server
+ description: Image for NEMS BE server
+ nems_be_flavor:
+ type: string
+ label: Flavor for NEMS BE server
+ description: Flavor for NEMS BE server
+ eca_trx_image:
+ type: string
+ label: Image for ECA TRX server
+ description: Image for ECA TRX server
+ eca_trx_flavor:
+ type: string
+ label: Flavor for ECA TRX server
+ description: Flavor for ECA TRX server
+ mmsc_oam_ips:
+ type: comma_delimited_list
+ label: MMSC oam_net IP addresses
+ description: MMSC oam_net IP addresses
+ mmsc_mms_traffic_net_ips:
+ type: comma_delimited_list
+ label: MMSC mms_traffic_net IP addresses
+ description: MMSC mms_traffic_net IP addresses
+ nems_fe_names:
+ type: comma_delimited_list
+ label: NEMS_FE server names
+ description: NEMS_FE server names
+ nems_fe_node_roles:
+ type: comma_delimited_list
+ label: nems fe node roles
+ description: nems fe node roles
+ nems_fe_oam_ips:
+ type: comma_delimited_list
+ label: OAM_net IP for NEMS_FE
+ description: OAM_net IP for NEMS_FE
+ nems_fe_nems_traffic_net_ips:
+ type: comma_delimited_list
+ label: nems_traffic_net IPs for NEMS_FE
+ description: nems_traffic_net IPs for NEMS_FE
+ nems_fe_nems_user_web_net_ips:
+ type: comma_delimited_list
+ label: nems_web_user_net IPs for NEMS_FE
+ description: nems_web_user_net IPs for NEMS_FE
+ nems_fe_nems_internal_net_ips:
+ type: comma_delimited_list
+ label: nems_internal_net IPs for NEMS_FE
+ description: nems_internal_net IPs for NEMS_FE
+ nems_fe_nems_imap_net_ips:
+ type: comma_delimited_list
+ label: nems_imap_net IPs for NEMS_FE
+ description: nems_imap_net IPs for NEMS_FE
+ nems_be_names:
+ type: string
+ label: NEMS_BE server names
+ description: NEMS_BE server names
+ nems_be_node_roles:
+ type: string
+ label: nems node roles
+ description: nems node roles
+ nems_be_oam_ips:
+ type: string
+ label: OAM net IPs for NEMS_BE
+ description: OAM net IPs for NEMS_BE
+ nems_be_nems_internal_net_ips:
+ type: string
+ label: nems internal net IPs for NEMS_BE
+ description: nems internal net IPs for NEMS_BE
+ nems_be_nems_imap_net_ips:
+ type: string
+ label: nems imap_net IPs for NEMS_BE
+ description: nems imap net IPs for NEMS_BE
+ eca_trx_oam_ips:
+ type: comma_delimited_list
+ label: OAM net IP for ECA_TRX
+ description: OAM net IP for ECA_TRX
+ eca_trx_mgmt_ips:
+ type: comma_delimited_list
+ label: eca mgmt net IP for ECA_TRX
+ description: eca mgmt net IP for ECA_TRX
+ timezone:
+ type: string
+ label: timezone
+ description: timezone
+ eca_trx_names:
+ type: comma_delimited_list
+ label: ECA_TRX server names
+ description: ECA_TRX server names
+ eca_trx_eca_traffic_net_ips:
+ type: comma_delimited_list
+ label: eca traffic net IPs for ECA_TRX
+ description: eca traffic net IPs for ECA_TRX
+ mmsc_names:
+ type: comma_delimited_list
+ label: MMSC server names
+ description: MMSC server names
+ nems_volume_size:
+ type: number
+ label: nems fe volume size
+ description: nems fe volume size
+ nems_be_volume_size:
+ type: number
+ label: nems be volume size
+ description: nems be volume size
+ MMSC_volume_type:
+ type: string
+ label: MMSC vm volume type
+ description: the name of the target volume backend
+ NEMS_FE_volume_type:
+ type: string
+ label: nems fe vm volume type
+ description: the name of the target volume backend
+ NEMS_BE_volume_type:
+ type: string
+ label: nems be vm volume type
+ description: the name of the target volume backend
+ mmsc_core_virtual_server_ips:
+ type: comma_delimited_list
+ label: mmsc core virtual server ips
+ description: mmsc core virtual server ips
+ mmsc_core_snat_ips:
+ type: comma_delimited_list
+ label: mmsc core snat ips
+ description: mmsc core snat ips
+ mmsc_dmz_protected_virtual_server_ips:
+ type: comma_delimited_list
+ label: mmsc dmz_protected virtual server ips
+ description: mmsc dmz_protected virtual server ips
+ mmsc_dmz_protected_snat_ips:
+ type: comma_delimited_list
+ label: mmsc dmz_protected snat ips
+ description: mmsc dmz_protected snat ips
+ eca_mgmt_net_name:
+ type: string
+ label: eca management network ID
+ description: Network ID for eca management
+
+resources:
+ mms_traffic_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: mms_traffic_net_name }
+
+ mms_traffic_artifact:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ property_get_file_name: { get_file: art.sh }
+
+ mms_traffic_net_nested_1:
+ type: nested1.yaml
+ properties:
+ cmaui_names: { get_param: mms_traffic_net_name }
+
+ mms_traffic_net_nested_2:
+ type: nested2.yaml
+ properties:
+ cmaui_names: { get_param: mms_traffic_net_name }
+
+ mms_traffic_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: mms_traffic_net_name}
+ network_id: { get_resource: mms_traffic_net }
+ cidr: { get_param: mms_traffic_net_cidr }
+ allocation_pools: [{"start": {get_param: mms_traffic_start}, "end": {get_param: mms_traffic_end}}]
+
+ nems_internal_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: {get_param: nems_internal_name}
+
+ nems_internal_network_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: nems_internal_name}
+ allocation_pools: [{"start": {get_param: nems_internal_start}, "end": {get_param: nems_internal_end}}]
+ cidr: {get_param: nems_internal_cidr}
+ network_id: {get_resource: nems_internal_net}
+
+ nems_traffic_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: {get_param: nems_traffic_name}
+
+ nems_traffic_network_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: nems_traffic_name}
+ allocation_pools: [{"start": {get_param: nems_traffic_start}, "end": {get_param: nems_traffic_end}}]
+ cidr: {get_param: nems_traffic_cidr}
+ network_id: {get_resource: nems_traffic_net}
+
+ nems_user_web_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: {get_param: nems_user_web_name}
+
+ nems_user_web_network_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: nems_user_web_name}
+ allocation_pools: [{"start": {get_param: nems_user_web_start}, "end": {get_param: nems_user_web_end}}]
+ cidr: {get_param: nems_user_web_cidr}
+ network_id: {get_resource: nems_user_web_net}
+
+ nems_imap_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: {get_param: nems_imap_name}
+
+ nems_imap_network_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: nems_imap_name}
+ allocation_pools: [{"start": {get_param: nems_imap_start}, "end": {get_param: nems_imap_end}}]
+ cidr: {get_param: nems_imap_cidr}
+ network_id: {get_resource: nems_imap_net}
+
+ eca_traffic_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: {get_param: eca_traffic_name}
+
+ eca_traffic_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: eca_traffic_name}
+ allocation_pools: [{"start": {get_param: eca_traffic_start}, "end": {get_param: eca_traffic_end}}]
+ cidr: {get_param: eca_traffic_cidr}
+ network_id: {get_resource: eca_traffic_net}
+
+ ha_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: {get_param: ha_net_name}
+
+ ha_net_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: ha_net_name}
+ allocation_pools: [{"start": {get_param: ha_net_start}, "end": {get_param: ha_net_end}}]
+ cidr: {get_param: ha_net_cidr}
+ network_id: {get_resource: ha_net}
+
+ lb1_instance:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: [lb_names, 0]}
+ image: {get_param: lb_image_name}
+ flavor: {get_param: lb_flavor_name}
+ availability_zone: {get_param: availability_zone_0}
+ networks:
+ - port: {get_resource: lb1_mgmt_port}
+ - port: {get_resource: lb1_dmz_protected_port}
+ - port: {get_resource: lb1_cor_direct_port}
+ - port: {get_resource: lb1_mms_traffic_port}
+ - port: {get_resource: lb1_nems_traffic_port}
+ - port: {get_resource: lb1_nems_user_web_port}
+ - port: {get_resource: lb1_eca_traffic_port}
+ - port: {get_resource: lb1_ha_net_port}
+ metadata:
+ vnf_id: { get_param: vnf_id }
+
+ lb1_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [lb_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb1_mms_traffic_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: mms_traffic_net}
+ fixed_ips: [{"ip_address": {get_param: mms_traffic_net_local_ip1}}]
+ allowed_address_pairs: [{"ip_address": {get_param: mms_traffic_net_floating_ip} }]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb1_dmz_protected_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: dmz_protected_net_name}
+ fixed_ips: [{"ip_address": {get_param: [lb_dmz_protected_ips, 0]}}]
+ allowed_address_pairs: [{"ip_address": {get_param: [mmsc_dmz_protected_virtual_server_ips, 0]}}, {"ip_address": {get_param: [mmsc_dmz_protected_virtual_server_ips, 1]}}, {"ip_address": {get_param: [mmsc_dmz_protected_virtual_server_ips, 2]}}, {"ip_address": {get_param: [mmsc_dmz_protected_snat_ips, 0]}}, {"ip_address": {get_param: [mmsc_dmz_protected_snat_ips, 1]}}, {"ip_address": {get_param: [mmsc_dmz_protected_snat_ips, 2]}}, {"ip_address": {get_param: [mmsc_dmz_protected_snat_ips, 3]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb1_cor_direct_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: cor_direct_net_name}
+ fixed_ips: [{"ip_address": {get_param: [lb_cor_direct_ips, 0]}}]
+ allowed_address_pairs: [{"ip_address": {get_param: [mmsc_core_virtual_server_ips, 0]}}, {"ip_address": {get_param: [mmsc_core_virtual_server_ips, 1]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 0]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 1]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 2]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 3]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 4]}} ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb1_nems_traffic_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: nems_traffic_net}
+ fixed_ips: [{"ip_address": {get_param: nems_traffic_net_local_ip1}}]
+ allowed_address_pairs: [{"ip_address": {get_param: nems_traffic_net_floating_ip} }]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb1_nems_user_web_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: nems_user_web_net}
+ fixed_ips: [{"ip_address": {get_param: nems_user_web_net_local_ip1}}]
+ allowed_address_pairs: [{"ip_address": {get_param: nems_user_web_net_floating_ip} }]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb1_ha_net_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: ha_net}
+ fixed_ips: [{"ip_address": {get_param: ha_net_local_ip1}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb1_eca_traffic_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: eca_traffic_net}
+ fixed_ips: [{"ip_address": {get_param: eca_traffic_net_local_ip1}}]
+ allowed_address_pairs: [{"ip_address": {get_param: eca_traffic_net_floating_ip} }]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb2_instance:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: [lb_names, 1]}
+ image: {get_param: lb_image_name}
+ flavor: {get_param: lb_flavor_name}
+ availability_zone: {get_param: availability_zone_0}
+ networks:
+ - port: {get_resource: lb2_mgmt_port}
+ - port: {get_resource: lb2_dmz_protected_port}
+ - port: {get_resource: lb2_cor_direct_port}
+ - port: {get_resource: lb2_mms_traffic_port}
+ - port: {get_resource: lb2_nems_traffic_port}
+ - port: {get_resource: lb2_nems_user_web_port}
+ - port: {get_resource: lb2_eca_traffic_port}
+ - port: {get_resource: lb2_ha_net_port}
+ metadata:
+ vnf_id: { get_param: vnf_id }
+
+ lb2_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [lb_oam_ips, 1]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb2_mms_traffic_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: mms_traffic_net}
+ fixed_ips: [{"ip_address": {get_param: mms_traffic_net_local_ip2}}]
+ allowed_address_pairs: [{"ip_address": {get_param: mms_traffic_net_floating_ip}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb2_dmz_protected_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: dmz_protected_net_name}
+ fixed_ips: [{"ip_address": {get_param: [lb_dmz_protected_ips, 1]}}]
+ allowed_address_pairs: [{"ip_address": {get_param: [mmsc_dmz_protected_virtual_server_ips, 0]}}, {"ip_address": {get_param: [mmsc_dmz_protected_virtual_server_ips, 1]}}, {"ip_address": {get_param: [mmsc_dmz_protected_virtual_server_ips, 2]}}, {"ip_address": {get_param: [mmsc_dmz_protected_snat_ips, 0]}}, {"ip_address": {get_param: [mmsc_dmz_protected_snat_ips, 1]}}, {"ip_address": {get_param: [mmsc_dmz_protected_snat_ips, 2]}}, {"ip_address": {get_param: [mmsc_dmz_protected_snat_ips, 3]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb2_cor_direct_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: cor_direct_net_name}
+ fixed_ips: [{"ip_address": {get_param: [lb_cor_direct_ips, 1]}}]
+ allowed_address_pairs: [{"ip_address": {get_param: [mmsc_core_virtual_server_ips, 0]}}, {"ip_address": {get_param: [mmsc_core_virtual_server_ips, 1]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 0]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 1]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 2]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 3]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 4]}} ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb2_nems_traffic_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: nems_traffic_net}
+ fixed_ips: [{"ip_address": {get_param: nems_traffic_net_local_ip2}}]
+ allowed_address_pairs: [{"ip_address": {get_param: nems_traffic_net_floating_ip}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb2_nems_user_web_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: nems_user_web_net}
+ fixed_ips: [{"ip_address": {get_param: nems_user_web_net_local_ip2}}]
+ allowed_address_pairs: [{"ip_address": {get_param: nems_user_web_net_floating_ip}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb2_ha_net_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: ha_net}
+ fixed_ips: [{"ip_address": {get_param: ha_net_local_ip2}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb2_eca_traffic_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: eca_traffic_net}
+ fixed_ips: [{"ip_address": {get_param: eca_traffic_net_local_ip2}}]
+ allowed_address_pairs: [{"ip_address": {get_param: eca_traffic_net_floating_ip} }]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_mmsc1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [mmsc_names, 0]}
+ image: { get_param: mmsc_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: mmsc_flavor }
+ networks:
+ - port: { get_resource: mmsc1_port_0 }
+ - port: { get_resource: mmsc1_port_1 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ mmsc.mgmt.ip=${mmsc.mgmt.ip}
+ mmsc.mgmt.netmask=${mmsc.mgmt.netmask}
+ mmsc.mgmt.gateway=${mmsc.mgmt.gateway}
+ mmsc.traffic.ip=${mmsc.traffic.ip}
+ mmsc.traffic.netmask=${mmsc.traffic.netmask}
+ mmsc.traffic.gateway=${mmsc.traffic.gateway}
+ mmsc.mgmt.route.1=${mmsc.mgmt.route.1}
+ mmsc.mgmt.route.2=${mmsc.mgmt.route.2}
+ mmsc.external.dns=${mmsc.external.dns}
+ mmsc.external.ntp=${mmsc.external.ntp}
+ mmsc.hostname=${mmsc.hostname}
+ mmsc.timezone=${mmsc.timezone}
+ params:
+ ${mmsc.mgmt.ip}: {get_param: [mmsc_oam_ips, 0]}
+ ${mmsc.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${mmsc.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${mmsc.traffic.ip}: {get_param: [mmsc_mms_traffic_net_ips, 0]}
+ ${mmsc.traffic.netmask}: {get_param: mms_traffic_netmask}
+ ${mmsc.traffic.gateway}: {get_param: mms_traffic_net_gateway}
+ ${mmsc.mgmt.route.1}: {get_param: oam_network_route_1}
+ ${mmsc.mgmt.route.2}: {get_param: oam_network_route_2}
+ ${mmsc.external.dns}: {get_param: external_dns}
+ ${mmsc.external.ntp}: {get_param: external_ntp}
+ ${mmsc.hostname}: {get_param: [mmsc_names, 0]}
+ ${mmsc.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ mmsc1_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: mmsc_cinder_volume_size}
+ volume_type: {get_param: MMSC_volume_type}
+
+ mmsc1_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: mmsc1_volume}
+ instance_uuid: {get_resource: server_mmsc1}
+
+ mmsc1_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_oam_ips, 0]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ mmsc1_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: mms_traffic_net}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_mms_traffic_net_ips, 0]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_mmsc2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [mmsc_names, 1]}
+ image: { get_param: mmsc_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: mmsc_flavor }
+ networks:
+ - port: { get_resource: mmsc2_port_0 }
+ - port: { get_resource: mmsc2_port_1 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ mmsc.mgmt.ip=${mmsc.mgmt.ip}
+ mmsc.mgmt.netmask=${mmsc.mgmt.netmask}
+ mmsc.mgmt.gateway=${mmsc.mgmt.gateway}
+ mmsc.traffic.ip=${mmsc.traffic.ip}
+ mmsc.traffic.netmask=${mmsc.traffic.netmask}
+ mmsc.traffic.gateway=${mmsc.traffic.gateway}
+ mmsc.mgmt.route.1=${mmsc.mgmt.route.1}
+ mmsc.mgmt.route.2=${mmsc.mgmt.route.2}
+ mmsc.external.dns=${mmsc.external.dns}
+ mmsc.external.ntp=${mmsc.external.ntp}
+ mmsc.hostname=${mmsc.hostname}
+ mmsc.timezone=${mmsc.timezone}
+ params:
+ ${mmsc.mgmt.ip}: {get_param: [mmsc_oam_ips, 1]}
+ ${mmsc.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${mmsc.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${mmsc.traffic.ip}: {get_param: [mmsc_mms_traffic_net_ips, 1]}
+ ${mmsc.traffic.netmask}: {get_param: mms_traffic_netmask}
+ ${mmsc.traffic.gateway}: {get_param: mms_traffic_net_gateway}
+ ${mmsc.mgmt.route.1}: {get_param: oam_network_route_1}
+ ${mmsc.mgmt.route.2}: {get_param: oam_network_route_2}
+ ${mmsc.external.dns}: {get_param: external_dns}
+ ${mmsc.external.ntp}: {get_param: external_ntp}
+ ${mmsc.hostname}: {get_param: [mmsc_names, 1]}
+ ${mmsc.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ mmsc2_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: mmsc_cinder_volume_size}
+ volume_type: {get_param: MMSC_volume_type}
+
+ mmsc2_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: mmsc2_volume}
+ instance_uuid: {get_resource: server_mmsc2}
+
+ mmsc2_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_oam_ips, 1]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ mmsc2_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: mms_traffic_net}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_mms_traffic_net_ips, 1]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_mmsc3:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [mmsc_names, 2]}
+ image: { get_param: mmsc_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: mmsc_flavor }
+ networks:
+ - port: { get_resource: mmsc3_port_0 }
+ - port: { get_resource: mmsc3_port_1 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ mmsc.mgmt.ip=${mmsc.mgmt.ip}
+ mmsc.mgmt.netmask=${mmsc.mgmt.netmask}
+ mmsc.mgmt.gateway=${mmsc.mgmt.gateway}
+ mmsc.traffic.ip=${mmsc.traffic.ip}
+ mmsc.traffic.netmask=${mmsc.traffic.netmask}
+ mmsc.traffic.gateway=${mmsc.traffic.gateway}
+ mmsc.mgmt.route.1=${mmsc.mgmt.route.1}
+ mmsc.mgmt.route.2=${mmsc.mgmt.route.2}
+ mmsc.external.dns=${mmsc.external.dns}
+ mmsc.external.ntp=${mmsc.external.ntp}
+ mmsc.hostname=${mmsc.hostname}
+ mmsc.timezone=${mmsc.timezone}
+ params:
+ ${mmsc.mgmt.ip}: {get_param: [mmsc_oam_ips, 2]}
+ ${mmsc.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${mmsc.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${mmsc.traffic.ip}: {get_param: [mmsc_mms_traffic_net_ips, 2]}
+ ${mmsc.traffic.netmask}: {get_param: mms_traffic_netmask}
+ ${mmsc.traffic.gateway}: {get_param: mms_traffic_net_gateway}
+ ${mmsc.mgmt.route.1}: {get_param: oam_network_route_1}
+ ${mmsc.mgmt.route.2}: {get_param: oam_network_route_2}
+ ${mmsc.external.dns}: {get_param: external_dns}
+ ${mmsc.external.ntp}: {get_param: external_ntp}
+ ${mmsc.hostname}: {get_param: [mmsc_names, 2]}
+ ${mmsc.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ mmsc3_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: mmsc_cinder_volume_size}
+ volume_type: {get_param: MMSC_volume_type}
+
+ mmsc3_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: mmsc3_volume}
+ instance_uuid: {get_resource: server_mmsc3}
+
+ mmsc3_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_oam_ips, 2]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ mmsc3_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: mms_traffic_net}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_mms_traffic_net_ips, 2]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_mmsc4:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [mmsc_names, 3]}
+ image: { get_param: mmsc_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: mmsc_flavor }
+ networks:
+ - port: { get_resource: mmsc4_port_0 }
+ - port: { get_resource: mmsc4_port_1 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ mmsc.mgmt.ip=${mmsc.mgmt.ip}
+ mmsc.mgmt.netmask=${mmsc.mgmt.netmask}
+ mmsc.mgmt.gateway=${mmsc.mgmt.gateway}
+ mmsc.traffic.ip=${mmsc.traffic.ip}
+ mmsc.traffic.netmask=${mmsc.traffic.netmask}
+ mmsc.traffic.gateway=${mmsc.traffic.gateway}
+ mmsc.mgmt.route.1=${mmsc.mgmt.route.1}
+ mmsc.mgmt.route.2=${mmsc.mgmt.route.2}
+ mmsc.external.dns=${mmsc.external.dns}
+ mmsc.external.ntp=${mmsc.external.ntp}
+ mmsc.hostname=${mmsc.hostname}
+ mmsc.timezone=${mmsc.timezone}
+ params:
+ ${mmsc.mgmt.ip}: {get_param: [mmsc_oam_ips, 3]}
+ ${mmsc.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${mmsc.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${mmsc.traffic.ip}: {get_param: [mmsc_mms_traffic_net_ips, 3]}
+ ${mmsc.traffic.netmask}: {get_param: mms_traffic_netmask}
+ ${mmsc.traffic.gateway}: {get_param: mms_traffic_net_gateway}
+ ${mmsc.mgmt.route.1}: {get_param: oam_network_route_1}
+ ${mmsc.mgmt.route.2}: {get_param: oam_network_route_2}
+ ${mmsc.external.dns}: {get_param: external_dns}
+ ${mmsc.external.ntp}: {get_param: external_ntp}
+ ${mmsc.hostname}: {get_param: [mmsc_names, 3]}
+ ${mmsc.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ mmsc4_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: mmsc_cinder_volume_size}
+ volume_type: {get_param: MMSC_volume_type}
+
+ mmsc4_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: mmsc4_volume}
+ instance_uuid: {get_resource: server_mmsc4}
+
+ mmsc4_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_oam_ips, 3]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ mmsc4_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: mms_traffic_net}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_mms_traffic_net_ips, 3]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_mmsc5:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [mmsc_names, 4]}
+ image: { get_param: mmsc_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: mmsc_flavor }
+ networks:
+ - port: { get_resource: mmsc5_port_0 }
+ - port: { get_resource: mmsc5_port_1 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ mmsc.mgmt.ip=${mmsc.mgmt.ip}
+ mmsc.mgmt.netmask=${mmsc.mgmt.netmask}
+ mmsc.mgmt.gateway=${mmsc.mgmt.gateway}
+ mmsc.traffic.ip=${mmsc.traffic.ip}
+ mmsc.traffic.netmask=${mmsc.traffic.netmask}
+ mmsc.traffic.gateway=${mmsc.traffic.gateway}
+ mmsc.mgmt.route.1=${mmsc.mgmt.route.1}
+ mmsc.mgmt.route.2=${mmsc.mgmt.route.2}
+ mmsc.external.dns=${mmsc.external.dns}
+ mmsc.external.ntp=${mmsc.external.ntp}
+ mmsc.hostname=${mmsc.hostname}
+ mmsc.timezone=${mmsc.timezone}
+ params:
+ ${mmsc.mgmt.ip}: {get_param: [mmsc_oam_ips, 4]}
+ ${mmsc.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${mmsc.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${mmsc.traffic.ip}: {get_param: [mmsc_mms_traffic_net_ips, 4]}
+ ${mmsc.traffic.netmask}: {get_param: mms_traffic_netmask}
+ ${mmsc.traffic.gateway}: {get_param: mms_traffic_net_gateway}
+ ${mmsc.mgmt.route.1}: {get_param: oam_network_route_1}
+ ${mmsc.mgmt.route.2}: {get_param: oam_network_route_2}
+ ${mmsc.external.dns}: {get_param: external_dns}
+ ${mmsc.external.ntp}: {get_param: external_ntp}
+ ${mmsc.hostname}: {get_param: [mmsc_names, 4]}
+ ${mmsc.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ mmsc5_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: mmsc_cinder_volume_size}
+ volume_type: {get_param: MMSC_volume_type}
+
+ mmsc5_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: mmsc5_volume}
+ instance_uuid: {get_resource: server_mmsc5}
+
+ mmsc5_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_oam_ips, 4]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ mmsc5_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: mms_traffic_net}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_mms_traffic_net_ips, 4]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_nems_fe1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [nems_fe_names, 0] }
+ image: { get_param: nems_fe_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: nems_fe_flavor }
+ networks:
+ - port: { get_resource: nems_fe1_port_0 }
+ - port: { get_resource: nems_fe1_port_1 }
+ - port: { get_resource: nems_fe1_port_2 }
+ - port: { get_resource: nems_fe1_port_3 }
+ - port: { get_resource: nems_fe1_port_4 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ nems.mgmt.ip=${nems.mgmt.ip}
+ nems.mgmt.netmask=${nems.mgmt.netmask}
+ nems.mgmt.gateway=${nems.mgmt.gateway}
+ nems.traffic.ip=${nems.traffic.ip}
+ nems.traffic.netmask=${nems.traffic.netmask}
+ nems.traffic.gateway=${nems.traffic.gateway}
+ nems.fe0.internal.ip=${nems.fe0.internal.ip}
+ nems.fe1.internal.ip=${nems.fe1.internal.ip}
+ nems.internal.netmask=${nems.internal.netmask}
+ nems.userweb.ip=${nems.userweb.ip}
+ nems.userweb.netmask=${nems.userweb.netmask}
+ nems.userweb.gateway=${nems.userweb.gateway}
+ nems.imap.ip=${nems.imap.ip}
+ nems.imap.netmask=${nems.imap.netmask}
+ nems.be.internal.ip=${nems.be.internal.ip}
+ nems.be.imap.ip=${nems.be.imap.ip}
+ nems.mgmt.route.1=${nems.mgmt.route.1}
+ nems.mgmt.route.2=${nems.mgmt.route.2}
+ nems.external.dns=${nems.external.dns}
+ nems.external.ntp=${nems.external.ntp}
+ nems.node=${nems.node}
+ nems.be0.host.name=${nems.be0.host.name}
+ nems.fe0.host.name=${nems.fe0.host.name}
+ nems.fe1.host.name=${nems.fe1.host.name}
+ nems.timezone=${nems.timezone}
+ params:
+ ${nems.mgmt.ip}: {get_param: [nems_fe_oam_ips, 0]}
+ ${nems.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${nems.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${nems.traffic.ip}: {get_param: [nems_fe_nems_traffic_net_ips, 0]}
+ ${nems.traffic.netmask}: {get_param: nems_traffic_netmask}
+ ${nems.traffic.gateway}: {get_param: nems_traffic_gateway}
+ ${nems.fe0.internal.ip}: {get_param: [nems_fe_nems_internal_net_ips, 0]}
+ ${nems.fe1.internal.ip}: {get_param: [nems_fe_nems_internal_net_ips, 1]}
+ ${nems.internal.netmask}: {get_param: nems_internal_netmask}
+ ${nems.userweb.ip}: {get_param: [nems_fe_nems_user_web_net_ips, 0]}
+ ${nems.userweb.netmask}: {get_param: nems_user_web_netmask}
+ ${nems.userweb.gateway}: {get_param: nems_user_web_gateway}
+ ${nems.imap.ip}: {get_param: [nems_fe_nems_imap_net_ips, 0]}
+ ${nems.imap.netmask}: {get_param: nems_imap_netmask}
+ ${nems.be.internal.ip}: {get_param: nems_be_nems_internal_net_ips}
+ ${nems.be.imap.ip}: {get_param: nems_be_nems_imap_net_ips}
+ ${nems.mgmt.route.1}: {get_param: oam_network_route_1}
+ ${nems.mgmt.route.2}: {get_param: oam_network_route_2}
+ ${nems.external.dns}: {get_param: external_dns}
+ ${nems.external.ntp}: {get_param: external_ntp}
+ ${nems.node}: {get_param: [nems_fe_node_roles, 0]}
+ ${nems.fe0.host.name}: {get_param: [nems_fe_names, 0]}
+ ${nems.fe1.host.name}: {get_param: [nems_fe_names, 1]}
+ ${nems.be0.host.name}: {get_param: nems_be_names}
+ ${nems.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ nems1_fe_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: nems_volume_size}
+ volume_type: {get_param: NEMS_FE_volume_type}
+
+ nems1_fe_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: nems1_fe_volume}
+ instance_uuid: {get_resource: server_nems_fe1}
+
+ nems_fe1_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [
+ "ip_address": { get_param: [nems_fe_oam_ips, 0] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ nems_fe1_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [nems_fe_nems_traffic_net_ips, 0] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ nems_fe1_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_user_web_net }
+ fixed_ips: [
+ "ip_address": { get_param: [nems_fe_nems_user_web_net_ips, 0] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ nems_fe1_port_3:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_internal_net }
+ fixed_ips: [
+ "ip_address": { get_param: [nems_fe_nems_internal_net_ips, 0] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ nems_fe1_port_4:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_imap_net }
+ fixed_ips: [
+ "ip_address": { get_param: [nems_fe_nems_imap_net_ips, 0] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_nems_fe2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [nems_fe_names, 1] }
+ image: { get_param: nems_fe_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: nems_fe_flavor }
+ networks:
+ - port: { get_resource: nems_fe2_port_0 }
+ - port: { get_resource: nems_fe2_port_1 }
+ - port: { get_resource: nems_fe2_port_2 }
+ - port: { get_resource: nems_fe2_port_3 }
+ - port: { get_resource: nems_fe2_port_4 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ nems.mgmt.ip=${nems.mgmt.ip}
+ nems.mgmt.netmask=${nems.mgmt.netmask}
+ nems.mgmt.gateway=${nems.mgmt.gateway}
+ nems.traffic.ip=${nems.traffic.ip}
+ nems.traffic.netmask=${nems.traffic.netmask}
+ nems.traffic.gateway=${nems.traffic.gateway}
+ nems.fe0.internal.ip=${nems.fe0.internal.ip}
+ nems.fe1.internal.ip=${nems.fe1.internal.ip}
+ nems.internal.netmask=${nems.internal.netmask}
+ nems.userweb.ip=${nems.userweb.ip}
+ nems.userweb.netmask=${nems.userweb.netmask}
+ nems.userweb.gateway=${nems.userweb.gateway}
+ nems.imap.ip=${nems.imap.ip}
+ nems.imap.netmask=${nems.imap.netmask}
+ nems.be.internal.ip=${nems.be.internal.ip}
+ nems.be.imap.ip=${nems.be.imap.ip}
+ nems.mgmt.route.1=${nems.mgmt.route.1}
+ nems.mgmt.route.2=${nems.mgmt.route.2}
+ nems.external.dns=${nems.external.dns}
+ nems.external.ntp=${nems.external.ntp}
+ nems.node=${nems.node}
+ nems.be0.host.name=${nems.be0.host.name}
+ nems.fe0.host.name=${nems.fe0.host.name}
+ nems.fe1.host.name=${nems.fe1.host.name}
+ nems.timezone=${nems.timezone}
+ params:
+ ${nems.mgmt.ip}: {get_param: [nems_fe_oam_ips, 1]}
+ ${nems.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${nems.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${nems.traffic.ip}: {get_param: [nems_fe_nems_traffic_net_ips, 1]}
+ ${nems.traffic.netmask}: {get_param: nems_traffic_netmask}
+ ${nems.traffic.gateway}: {get_param: nems_traffic_gateway}
+ ${nems.fe0.internal.ip}: {get_param: [nems_fe_nems_internal_net_ips, 0]}
+ ${nems.fe1.internal.ip}: {get_param: [nems_fe_nems_internal_net_ips, 1]}
+ ${nems.internal.netmask}: {get_param: nems_internal_netmask}
+ ${nems.userweb.ip}: {get_param: [nems_fe_nems_user_web_net_ips, 1]}
+ ${nems.userweb.netmask}: {get_param: nems_user_web_netmask}
+ ${nems.userweb.gateway}: {get_param: nems_user_web_gateway}
+ ${nems.imap.ip}: {get_param: [nems_fe_nems_imap_net_ips, 1]}
+ ${nems.imap.netmask}: {get_param: nems_imap_netmask}
+ ${nems.be.internal.ip}: {get_param: nems_be_nems_internal_net_ips}
+ ${nems.be.imap.ip}: {get_param: nems_be_nems_imap_net_ips}
+ ${nems.mgmt.route.1}: {get_param: oam_network_route_1}
+ ${nems.mgmt.route.2}: {get_param: oam_network_route_2}
+ ${nems.external.dns}: {get_param: external_dns}
+ ${nems.external.ntp}: {get_param: external_ntp}
+ ${nems.node}: {get_param: [nems_fe_node_roles, 1]}
+ ${nems.fe0.host.name}: {get_param: [nems_fe_names, 0]}
+ ${nems.fe1.host.name}: {get_param: [nems_fe_names, 1]}
+ ${nems.be0.host.name}: {get_param: nems_be_names}
+ ${nems.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ nems2_fe_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: nems_volume_size}
+ volume_type: {get_param: NEMS_FE_volume_type}
+
+ nems2_fe_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: nems2_fe_volume}
+ instance_uuid: {get_resource: server_nems_fe2}
+
+ nems_fe2_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [
+ "ip_address": {get_param: [nems_fe_oam_ips, 1]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ nems_fe2_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [nems_fe_nems_traffic_net_ips, 1] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ nems_fe2_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_user_web_net }
+ fixed_ips: [
+ "ip_address": { get_param: [nems_fe_nems_user_web_net_ips, 1] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ nems_fe2_port_3:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_internal_net }
+ fixed_ips: [
+ "ip_address": { get_param: [nems_fe_nems_internal_net_ips, 1] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+
+ nems_fe2_port_4:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_imap_net }
+ fixed_ips: [
+ "ip_address": { get_param: [nems_fe_nems_imap_net_ips, 1] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_nems_be1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: nems_be_names }
+ image: { get_param: nems_be_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: nems_be_flavor }
+ networks:
+ - port: { get_resource: nems_be1_port_0 }
+ - port: { get_resource: nems_be1_port_1 }
+ - port: { get_resource: nems_be1_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ nems.be.mgmt.ip=${nems.be.mgmt.ip}
+ nems.mgmt.netmask=${nems.mgmt.netmask}
+ nems.mgmt.gateway=${nems.mgmt.gateway}
+ nems.be.internal.ip=${nems.be.internal.ip}
+ nems.internal.netmask=${nems.internal.netmask}
+ nems.imap.netmask=${nems.imap.netmask}
+ nems.fe0.internal.ip=${nems.fe0.internal.ip}
+ nems.fe1.internal.ip=${nems.fe1.internal.ip}
+ nems.be.imap.ip=${nems.be.imap.ip}
+ nems.mgmt.route.1=${nems.mgmt.route.1}
+ nems.mgmt.route.2=${nems.mgmt.route.2}
+ nems.external.dns=${nems.external.dns}
+ nems.external.ntp=${nems.external.ntp}
+ nems.node=${nems.node}
+ nems.be0.host.name=${nems.be0.host.name}
+ nems.fe0.host.name=${nems.fe0.host.name}
+ nems.fe1.host.name=${nems.fe1.host.name}
+ nems.timezone=${nems.timezone}
+ params:
+ ${nems.be.mgmt.ip}: {get_param: nems_be_oam_ips}
+ ${nems.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${nems.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${nems.fe0.internal.ip}: {get_param: [nems_fe_nems_internal_net_ips, 0]}
+ ${nems.fe1.internal.ip}: {get_param: [nems_fe_nems_internal_net_ips, 1]}
+ ${nems.be.internal.ip}: {get_param: nems_be_nems_internal_net_ips}
+ ${nems.internal.netmask}: {get_param: nems_internal_netmask}
+ ${nems.imap.netmask}: {get_param: nems_imap_netmask}
+ ${nems.be.imap.ip}: {get_param: nems_be_nems_imap_net_ips}
+ ${nems.mgmt.route.1}: {get_param: oam_network_route_1}
+ ${nems.mgmt.route.2}: {get_param: oam_network_route_2}
+ ${nems.external.dns}: {get_param: external_dns}
+ ${nems.external.ntp}: {get_param: external_ntp}
+ ${nems.node}: {get_param: nems_be_node_roles}
+ ${nems.be0.host.name}: {get_param: nems_be_names}
+ ${nems.fe0.host.name}: {get_param: [nems_fe_names, 0]}
+ ${nems.fe1.host.name}: {get_param: [nems_fe_names, 1]}
+ ${nems.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ nems_be_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: nems_be_volume_size}
+ volume_type: {get_param: NEMS_BE_volume_type}
+
+ nems_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: nems_be_volume}
+ instance_uuid: {get_resource: server_nems_be1}
+
+
+ nems_be1_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [
+ "ip_address": { get_param: nems_be_oam_ips}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ nems_be1_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_internal_net }
+ fixed_ips: [
+ "ip_address": { get_param: nems_be_nems_internal_net_ips}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ nems_be1_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_imap_net }
+ fixed_ips: [
+ "ip_address": { get_param: nems_be_nems_imap_net_ips}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 0]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx1_port_0 }
+ - port: { get_resource: eca_trx1_port_1 }
+ - port: { get_resource: eca_trx1_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 0]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 0]}
+
+ eca_trx1_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 0] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx1_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 0] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx1_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 0] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+
+ server_eca_trx2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 1]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx2_port_0 }
+ - port: { get_resource: eca_trx2_port_1 }
+ - port: { get_resource: eca_trx2_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 1]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 1]}
+
+ eca_trx2_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 1] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx2_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 1] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx2_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 1] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx3:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 2]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx3_port_0 }
+ - port: { get_resource: eca_trx3_port_1 }
+ - port: { get_resource: eca_trx3_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 2]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 2]}
+
+ eca_trx3_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 2] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx3_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 2] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx3_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 2] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx4:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 3]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx4_port_0 }
+ - port: { get_resource: eca_trx4_port_1 }
+ - port: { get_resource: eca_trx4_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 3]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 3]}
+
+ eca_trx4_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 3] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx4_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 3] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx4_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 3] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx5:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 4]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx5_port_0 }
+ - port: { get_resource: eca_trx5_port_1 }
+ - port: { get_resource: eca_trx5_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 4]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 4]}
+
+ eca_trx5_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 4] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx5_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 4] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx5_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 4] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx6:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 5]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx6_port_0 }
+ - port: { get_resource: eca_trx6_port_1 }
+ - port: { get_resource: eca_trx6_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 5]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 5]}
+
+ eca_trx6_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 5] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx6_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 5] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx6_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 5] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx7:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 6]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx7_port_0 }
+ - port: { get_resource: eca_trx7_port_1 }
+ - port: { get_resource: eca_trx7_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 6]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 6]}
+
+ eca_trx7_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 6] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx7_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 6] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx7_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 6] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx8:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 7]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx8_port_0 }
+ - port: { get_resource: eca_trx8_port_1 }
+ - port: { get_resource: eca_trx8_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 7]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 7]}
+
+ eca_trx8_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 7] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx8_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 7] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx8_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 7] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx9:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 8]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx9_port_0 }
+ - port: { get_resource: eca_trx9_port_1 }
+ - port: { get_resource: eca_trx9_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 8]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 8]}
+
+ eca_trx9_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 8] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx9_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 8] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx9_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 8] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx10:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 9]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx10_port_0 }
+ - port: { get_resource: eca_trx10_port_1 }
+ - port: { get_resource: eca_trx10_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 9]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 9]}
+
+ eca_trx10_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 9] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx10_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 9] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx10_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 9] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx11:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 10]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx11_port_0 }
+ - port: { get_resource: eca_trx11_port_1 }
+ - port: { get_resource: eca_trx11_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 10]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 10]}
+
+ eca_trx11_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 10] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx11_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 10] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx11_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 10] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+
+ server_eca_trx12:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 11]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx12_port_0 }
+ - port: { get_resource: eca_trx12_port_1 }
+ - port: { get_resource: eca_trx12_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 11]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 11]}
+
+ eca_trx12_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 11] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx12_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 11] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx12_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 11] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx13:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 12]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx13_port_0 }
+ - port: { get_resource: eca_trx13_port_1 }
+ - port: { get_resource: eca_trx13_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 12]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 12]}
+
+ eca_trx13_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 12] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx13_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 12] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx13_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 12] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx14:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 13]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx14_port_0 }
+ - port: { get_resource: eca_trx14_port_1 }
+ - port: { get_resource: eca_trx14_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 13]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 13]}
+
+ eca_trx14_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 13] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx14_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 13] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx14_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 13] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx15:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 14]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx15_port_0 }
+ - port: { get_resource: eca_trx15_port_1 }
+ - port: { get_resource: eca_trx15_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 14]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 14]}
+
+ eca_trx15_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 14] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx15_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 14] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx15_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 14] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx16:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 15]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx16_port_0 }
+ - port: { get_resource: eca_trx16_port_1 }
+ - port: { get_resource: eca_trx16_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 15]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 15]}
+
+ eca_trx16_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 15] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx16_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 15] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx16_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 15] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+
+ server_eca_trx17:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 16]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx17_port_0 }
+ - port: { get_resource: eca_trx17_port_1 }
+ - port: { get_resource: eca_trx17_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 16]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 16]}
+
+ eca_trx17_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 16] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx17_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 16] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx17_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 16] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx18:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 17]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx18_port_0 }
+ - port: { get_resource: eca_trx18_port_1 }
+ - port: { get_resource: eca_trx18_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 17]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 17]}
+
+ eca_trx18_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 17] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx18_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 17] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx18_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 17] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx19:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 18]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx19_port_0 }
+ - port: { get_resource: eca_trx19_port_1 }
+ - port: { get_resource: eca_trx19_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 8]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 18]}
+
+ eca_trx19_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 18] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx19_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 18] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx19_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 18] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx20:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 19]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx20_port_0 }
+ - port: { get_resource: eca_trx20_port_1 }
+ - port: { get_resource: eca_trx20_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 19]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 19]}
+
+ eca_trx20_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 19] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx20_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 19] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx20_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 19] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/MMSC_Capacity_Line_1.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/MMSC_Capacity_Line_1.env
new file mode 100644
index 0000000000..b346d67d97
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/MMSC_Capacity_Line_1.env
@@ -0,0 +1,111 @@
+parameters:
+ oam_net_name: oam_protected_net_0
+ oam_network_netmask: 255.255.254.0
+ oam_network_gateway: 107.250.172.1
+ oam_network_route_1: 155.165.201.250/32,107.250.172.1
+ oam_network_route_2: 155.165.194.100/32,107.250.172.1
+ external_dns: 155.165.194.100
+ external_ntp: 155.165.201.250
+ lb_oam_ips: 107.250.172.50,107.250.172.51
+ dmz_protected_net_name: dmz_protected_net_0
+ lb_dmz_protected_ips: 107.239.14.19,107.239.14.20
+ cor_direct_net_name: cor_direct_net_0
+ lb_cor_direct_ips: 172.31.10.19,172.31.10.20
+ mms_traffic_net_name: int_mms_mms_traffic_net_2
+ mms_traffic_net_cidr: 172.26.2.0/24
+ mms_traffic_netmask: 255.255.255.0
+ mms_traffic_net_gateway: 172.26.2.1
+ mms_traffic_start: 172.26.2.3
+ mms_traffic_end: 172.26.2.254
+ mms_traffic_net_local_ip1: 172.26.2.3
+ mms_traffic_net_local_ip2: 172.26.2.4
+ mms_traffic_net_floating_ip: 172.26.2.5
+ nems_internal_name: int_mms_nems_internal_net_2
+ nems_internal_start: 172.26.6.3
+ nems_internal_end: 172.26.6.254
+ nems_internal_cidr: 172.26.6.0/24
+ nems_internal_netmask: 255.255.255.0
+ nems_internal_gateway: 172.26.6.1
+ nems_traffic_name: int_mms_nems_traffic_net_2
+ nems_traffic_start: 172.26.3.3
+ nems_traffic_end: 172.26.3.254
+ nems_traffic_cidr: 172.26.3.0/24
+ nems_traffic_netmask: 255.255.255.0
+ nems_traffic_gateway: 172.26.3.1
+ nems_traffic_net_local_ip1: 172.26.3.3
+ nems_traffic_net_local_ip2: 172.26.3.4
+ nems_traffic_net_floating_ip: 172.26.3.5
+ nems_user_web_name: int_mms_nems_web_net_2
+ nems_user_web_start: 172.26.4.3
+ nems_user_web_end: 172.26.4.254
+ nems_user_web_cidr: 172.26.4.0/24
+ nems_user_web_netmask: 255.255.255.0
+ nems_user_web_gateway: 172.26.4.1
+ nems_user_web_net_local_ip1: 172.26.4.3
+ nems_user_web_net_local_ip2: 172.26.4.4
+ nems_user_web_net_floating_ip: 172.26.4.5
+ nems_imap_name: int_mms_nems_imap_net_2
+ nems_imap_start: 172.26.7.3
+ nems_imap_end: 172.26.7.254
+ nems_imap_cidr: 172.26.7.0/24
+ nems_imap_netmask: 255.255.255.0
+ nems_imap_gateway: 172.26.7.1
+ eca_traffic_name: int_mms_eca_traffic_net_2
+ eca_traffic_cidr: 172.26.5.0/24
+ eca_traffic_netmask: 255.255.255.0
+ eca_traffic_net_gateway: 172.26.5.1
+ eca_traffic_start: 172.26.5.3
+ eca_traffic_end: 172.26.5.254
+ eca_traffic_net_local_ip1: 172.26.5.3
+ eca_traffic_net_local_ip2: 172.26.5.4
+ eca_traffic_net_floating_ip: 172.26.5.5
+ ha_net_name: int_mms_ha_net_2
+ ha_net_cidr: 172.26.1.0/24
+ ha_net_start: 172.26.1.3
+ ha_net_end: 172.26.1.254
+ ha_net_local_ip1: 172.26.1.3
+ ha_net_local_ip2: 172.26.1.4
+ lb_names: ZRDM1MMSC03ALB001,ZRDM1MMSC03ALB002
+ lb_image_name: BIGIP-11.5.3.0.0.163
+ lb_flavor_name: m1.xlarge
+ security_group_name: mmsc_security_group_1
+ availability_zone_0: nova
+ mmsc_mms_traffic_net_ips: 172.26.2.11,172.26.2.12,172.26.2.13,172.26.2.14,172.26.2.15
+ mmsc_oam_ips: 107.250.172.54,107.250.172.55,107.250.172.56,107.250.172.57,107.250.172.58
+ mmsc_flavor: lc.4xlarge4
+ mmsc_image: mmsc-6.0.2_v5
+ mmsc_cinder_volume_size: 480
+ nems_fe_flavor: m1.large2
+ nems_fe_image: nems-2.1.2_v29
+ nems_fe_names: ZRDM1MMSC03NFE001,ZRDM1MMSC03NFE002
+ nems_fe_node_roles: FE0,FE1
+ nems_fe_oam_ips: 107.250.172.64,107.250.172.65
+ nems_fe_nems_traffic_net_ips: 172.26.3.11,172.26.3.12
+ nems_fe_nems_user_web_net_ips: 172.26.4.11,172.26.4.12
+ nems_fe_nems_internal_net_ips: 172.26.6.11,172.26.6.12
+ nems_fe_nems_imap_net_ips: 172.26.7.11,172.26.7.12
+ nems_be_names: ZRDM1MMSC03NBE001
+ nems_be_node_roles: BE0
+ nems_be_oam_ips: 107.250.172.66
+ nems_be_nems_internal_net_ips: 172.26.6.13
+ nems_be_nems_imap_net_ips: 172.26.7.13
+ nems_be_flavor: m1.large2
+ nems_be_image: nems-2.1.2_v29
+ eca_trx_oam_ips: 107.250.172.70,107.250.172.71,107.250.172.72,107.250.172.73,107.250.172.74,107.250.172.75,107.250.172.76,107.250.172.77,107.250.172.78,107.250.172.79,107.250.172.80,107.250.172.81,107.250.172.82,107.250.172.83,107.250.172.84,107.250.172.85,107.250.172.86,107.250.172.87,107.250.172.88,107.250.172.89
+ eca_trx_mgmt_ips: 172.25.137.202,172.25.137.203,172.25.137.204,172.25.137.205,172.25.137.206,172.25.137.207,172.25.137.208,172.25.137.209,172.25.137.210,172.25.137.211,172.25.137.212,172.25.137.213,172.25.137.214,172.25.137.215,172.25.137.216,172.25.137.217,172.25.137.218,172.25.137.219,172.25.137.220,172.25.137.221
+ eca_trx_flavor: m1.xlarge
+ eca_trx_image: ECABASE
+ timezone: UTC
+ eca_trx_names: ZRDM1MMSC03TRX001,ZRDM1MMSC03TRX002,ZRDM1MMSC03TRX003,ZRDM1MMSC03TRX004,ZRDM1MMSC03TRX005,ZRDM1MMSC03TRX006,ZRDM1MMSC03TRX007,ZRDM1MMSC03TRX008,ZRDM1MMSC03TRX009,ZRDM1MMSC03TRX010,ZRDM1MMSC03TRX011,ZRDM1MMSC03TRX012,ZRDM1MMSC03TRX013,ZRDM1MMSC03TRX014,ZRDM1MMSC03TRX015,ZRDM1MMSC03TRX016,ZRDM1MMSC03TRX017,ZRDM1MMSC03TRX018,ZRDM1MMSC03TRX019,ZRDM1MMSC03TRX020
+ eca_trx_eca_traffic_net_ips: 172.26.5.11,172.26.5.12,172.26.5.13,172.26.5.14,172.26.5.15,172.26.5.16,172.26.5.17,172.26.5.18,172.26.5.19,172.26.5.20,172.26.5.21,172.26.5.22,172.26.5.23,172.26.5.24,172.26.5.25,172.26.5.26,172.26.5.27,172.26.5.28,172.26.5.29,172.26.5.30
+ mmsc_names: ZRDM1MMSC03MMS001,ZRDM1MMSC03MMS002,ZRDM1MMSC03MMS003,ZRDM1MMSC03MMS004,ZRDM1MMSC03MMS005
+ nems_volume_size: 50
+ nems_be_volume_size: 610
+ MMSC_volume_type: Platinum
+ NEMS_FE_volume_type: Platinum
+ NEMS_BE_volume_type: Platinum
+ mmsc_core_virtual_server_ips: 172.31.10.21,172.31.10.22
+ mmsc_core_snat_ips: 172.31.10.23,172.31.10.24,172.31.10.25,172.31.10.26,172.31.10.27
+ mmsc_dmz_protected_virtual_server_ips: 107.239.14.21,107.239.14.22,107.239.14.23
+ mmsc_dmz_protected_snat_ips: 107.239.14.24,107.239.14.25,107.239.14.26,107.239.14.27
+ eca_mgmt_net_name: int_eca_mgmt_net_1 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/NETWORK_OUT.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/NETWORK_OUT.yaml
new file mode 100644
index 0000000000..53efc5e36e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/NETWORK_OUT.yaml
@@ -0,0 +1,76 @@
+heat_template_version: 2013-05-23
+
+#################################
+#
+# Changes from MSO - 11/5/2015
+# - Parameter changes as below
+# - CDLs for vmNames, IPs
+# - aZone->availability_zone_0
+# - nwName->{nwRole}_net_name
+# - nwID->{nwRole}_net_id
+# - vmName->{vmType}_names
+# - ips ->{vmType}_{nwRole}_ips
+# - fips->{vmType}_{nwRole}_floating_ip
+# - added replacement_policy: AUTO to all ports
+# - added vnf_id for metadata to all servers
+# - externalized security group resource
+# - externalized eca_mgmt network
+#
+#################################
+
+description: >
+ HOT template that creates Security Group and ECA network
+
+parameters:
+ eca_mgmt_name:
+ type: string
+ label: eca management name
+ description: eca management name
+ eca_mgmt_start:
+ type: string
+ label: eca management start
+ description: eca management start
+ eca_mgmt_end:
+ type: string
+ label: eca management end
+ description: eca management end
+ eca_mgmt_cidr:
+ type: string
+ label: eca management cidr
+ description: eca management cidr
+ eca_mgmt_netmask:
+ type: string
+ label: ECA mgmt network subnet mask
+ description: ECA mgmt network subnet mask
+ security_group_name:
+ type: string
+ label: MMSC security group name
+ description: MMSC security group name
+
+resources:
+ mms_security_group:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: mmsc security group
+ name: {get_param: security_group_name}
+ rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0}
+ ]
+ eca_mgmt_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: {get_param: eca_mgmt_name}
+
+ eca_mgmt_network_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: eca_mgmt_name}
+ allocation_pools: [{"start": {get_param: eca_mgmt_start}, "end": {get_param: eca_mgmt_end}}]
+ cidr: {get_param: eca_mgmt_cidr}
+ #enable_dhcp: false
+ #gateway_ip: null
+ network_id: {get_resource: eca_mgmt_net}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/SG_ECA_MGMT.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/SG_ECA_MGMT.yaml
new file mode 100644
index 0000000000..6e68fd8783
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/SG_ECA_MGMT.yaml
@@ -0,0 +1,81 @@
+heat_template_version: 2013-05-23
+
+#################################
+#
+# Changes from MSO - 11/5/2015
+# - Parameter changes as below
+# - CDLs for vmNames, IPs
+# - aZone->availability_zone_0
+# - nwName->{nwRole}_net_name
+# - nwID->{nwRole}_net_id
+# - vmName->{vmType}_names
+# - ips ->{vmType}_{nwRole}_ips
+# - fips->{vmType}_{nwRole}_floating_ip
+# - added replacement_policy: AUTO to all ports
+# - added vnf_id for metadata to all servers
+# - externalized security group resource
+# - externalized eca_mgmt network
+#
+#################################
+
+description: >
+ HOT template that creates Security Group and ECA network
+
+parameters:
+ eca_mgmt_name:
+ type: string
+ label: eca management name
+ description: eca management name
+ eca_mgmt_start:
+ type: string
+ label: eca management start
+ description: eca management start
+ eca_mgmt_end:
+ type: string
+ label: eca management end
+ description: eca management end
+ eca_mgmt_cidr:
+ type: string
+ label: eca management cidr
+ description: eca management cidr
+ eca_mgmt_netmask:
+ type: string
+ label: ECA mgmt network subnet mask
+ description: ECA mgmt network subnet mask
+ security_group_name:
+ type: string
+ label: MMSC security group name
+ description: MMSC security group name
+
+resources:
+ mms_traffic_artifact:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ property_get_file_name: { get_file: "file:///art.sh" }
+
+ mms_security_group:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: mmsc security group
+ name: {get_param: security_group_name}
+ rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0}
+ ]
+ eca_mgmt_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: {get_param: eca_mgmt_name}
+
+ eca_mgmt_network_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: eca_mgmt_name}
+ allocation_pools: [{"start": {get_param: eca_mgmt_start}, "end": {get_param: eca_mgmt_end}}]
+ cidr: {get_param: eca_mgmt_cidr}
+ #enable_dhcp: false
+ #gateway_ip: null
+ network_id: {get_resource: eca_mgmt_net}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/VOLUME.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/VOLUME.yaml
new file mode 100644
index 0000000000..53efc5e36e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/VOLUME.yaml
@@ -0,0 +1,76 @@
+heat_template_version: 2013-05-23
+
+#################################
+#
+# Changes from MSO - 11/5/2015
+# - Parameter changes as below
+# - CDLs for vmNames, IPs
+# - aZone->availability_zone_0
+# - nwName->{nwRole}_net_name
+# - nwID->{nwRole}_net_id
+# - vmName->{vmType}_names
+# - ips ->{vmType}_{nwRole}_ips
+# - fips->{vmType}_{nwRole}_floating_ip
+# - added replacement_policy: AUTO to all ports
+# - added vnf_id for metadata to all servers
+# - externalized security group resource
+# - externalized eca_mgmt network
+#
+#################################
+
+description: >
+ HOT template that creates Security Group and ECA network
+
+parameters:
+ eca_mgmt_name:
+ type: string
+ label: eca management name
+ description: eca management name
+ eca_mgmt_start:
+ type: string
+ label: eca management start
+ description: eca management start
+ eca_mgmt_end:
+ type: string
+ label: eca management end
+ description: eca management end
+ eca_mgmt_cidr:
+ type: string
+ label: eca management cidr
+ description: eca management cidr
+ eca_mgmt_netmask:
+ type: string
+ label: ECA mgmt network subnet mask
+ description: ECA mgmt network subnet mask
+ security_group_name:
+ type: string
+ label: MMSC security group name
+ description: MMSC security group name
+
+resources:
+ mms_security_group:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: mmsc security group
+ name: {get_param: security_group_name}
+ rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0}
+ ]
+ eca_mgmt_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: {get_param: eca_mgmt_name}
+
+ eca_mgmt_network_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: eca_mgmt_name}
+ allocation_pools: [{"start": {get_param: eca_mgmt_start}, "end": {get_param: eca_mgmt_end}}]
+ cidr: {get_param: eca_mgmt_cidr}
+ #enable_dhcp: false
+ #gateway_ip: null
+ network_id: {get_resource: eca_mgmt_net}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/VOLUME_OUT.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/VOLUME_OUT.yaml
new file mode 100644
index 0000000000..53efc5e36e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/VOLUME_OUT.yaml
@@ -0,0 +1,76 @@
+heat_template_version: 2013-05-23
+
+#################################
+#
+# Changes from MSO - 11/5/2015
+# - Parameter changes as below
+# - CDLs for vmNames, IPs
+# - aZone->availability_zone_0
+# - nwName->{nwRole}_net_name
+# - nwID->{nwRole}_net_id
+# - vmName->{vmType}_names
+# - ips ->{vmType}_{nwRole}_ips
+# - fips->{vmType}_{nwRole}_floating_ip
+# - added replacement_policy: AUTO to all ports
+# - added vnf_id for metadata to all servers
+# - externalized security group resource
+# - externalized eca_mgmt network
+#
+#################################
+
+description: >
+ HOT template that creates Security Group and ECA network
+
+parameters:
+ eca_mgmt_name:
+ type: string
+ label: eca management name
+ description: eca management name
+ eca_mgmt_start:
+ type: string
+ label: eca management start
+ description: eca management start
+ eca_mgmt_end:
+ type: string
+ label: eca management end
+ description: eca management end
+ eca_mgmt_cidr:
+ type: string
+ label: eca management cidr
+ description: eca management cidr
+ eca_mgmt_netmask:
+ type: string
+ label: ECA mgmt network subnet mask
+ description: ECA mgmt network subnet mask
+ security_group_name:
+ type: string
+ label: MMSC security group name
+ description: MMSC security group name
+
+resources:
+ mms_security_group:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: mmsc security group
+ name: {get_param: security_group_name}
+ rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0}
+ ]
+ eca_mgmt_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: {get_param: eca_mgmt_name}
+
+ eca_mgmt_network_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: eca_mgmt_name}
+ allocation_pools: [{"start": {get_param: eca_mgmt_start}, "end": {get_param: eca_mgmt_end}}]
+ cidr: {get_param: eca_mgmt_cidr}
+ #enable_dhcp: false
+ #gateway_ip: null
+ network_id: {get_resource: eca_mgmt_net}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/art.sh b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/art.sh
new file mode 100644
index 0000000000..186d1c34fb
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/art.sh
@@ -0,0 +1 @@
+heat stack-create vMME -e vmme_small.env -f vmme_small.yml
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/cmaui.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/cmaui.env
new file mode 100644
index 0000000000..2e6012d1c5
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/cmaui.env
@@ -0,0 +1,15 @@
+parameters:
+ cmaui_names: ZRDM1MMSC02CMI001,ZRDM1MMSC02CMI002
+ cmaui_flavor: m1.large
+ cmaui_image: cmaui-5.0.2.5_v25
+ cmaui_cinder_volume_size: 55
+ oam_net_name: oam_protected_net_0
+ oam_network_netmask: 255.255.254.0
+ oam_network_gateway: 107.250.172.1
+ external_dns: 155.165.201.250
+ external_ntp: 155.165.194.100
+ security_group_name: mmsc_security_group_1
+ availability_zone_0: nova
+ timezone: UTC
+ cmaui_oam_ips: 107.250.172.42,107.250.172.43
+ CMAUI_volume_type: Platinum \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/cmaui.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/cmaui.yml
new file mode 100644
index 0000000000..3d757b1631
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/cmaui.yml
@@ -0,0 +1,179 @@
+heat_template_version: 2013-05-23
+
+#################################
+#
+# Changes from MSO 01/26/2016
+# Updated per ECOMP feedback
+#
+#################################
+
+description: cmaui server template for vMMSC
+
+parameters:
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_cinder_volume_size:
+ type: number
+ label: CMAUI Cinder volume size
+ description: the size of the CMAUI Cinder volume
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ oam_net_name:
+ type: string
+ description: UID of OAM network
+ oam_network_netmask:
+ type: string
+ label: oam network netmask
+ description: oam network gateway
+ oam_network_gateway:
+ type: string
+ label: oam network gateway
+ description: oam network gateway
+ external_dns:
+ type: string
+ label: dns server
+ description: dns server
+ external_ntp:
+ type: string
+ label: ntp server
+ description: ntp server
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ timezone:
+ type: string
+ label: timezone
+ description: timezone
+ cmaui_oam_ips:
+ type: comma_delimited_list
+ label: CMAUI oam_net IP addresses
+ description: CMAUI oam_net IP addresses
+ CMAUI_volume_type:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+
+resources:
+ server_cmaui:
+ type: eca_oam.yaml
+ properties:
+ cmaui_name: { get_param: [cmaui_names, 0]}
+ cmaui_image: { get_param: cmaui_image }
+ availability_zone_0: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_0 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ cmaui.mgmt.ip=${cmaui.mgmt.ip}
+ cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
+ cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
+ cmaui.external.dns=${cmaui.external.dns}
+ cmaui.external.ntp=${cmaui.external.ntp}
+ cmaui.node=${cmaui.node}
+ cmaui.timezone=${cmaui.timezone}
+ params:
+ ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 0]}
+ ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${cmaui.external.dns}: {get_param: external_dns}
+ ${cmaui.external.ntp}: {get_param: external_ntp}
+ ${cmaui.node}: {get_param: [cmaui_names, 0]}
+ ${cmaui.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ cmaui_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: cmaui_cinder_volume_size}
+ volume_type: {get_param: CMAUI_volume_type}
+
+ cmaui_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: cmaui_volume}
+ instance_uuid: {get_resource: server_cmaui}
+
+ cmaui_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_cmaui1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 1]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui1_port_0 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ cmaui.mgmt.ip=${cmaui.mgmt.ip}
+ cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
+ cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
+ cmaui.external.dns=${cmaui.external.dns}
+ cmaui.external.ntp=${cmaui.external.ntp}
+ cmaui.node=${cmaui.node}
+ cmaui.timezone=${cmaui.timezone}
+ params:
+ ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 1]}
+ ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${cmaui.external.dns}: {get_param: external_dns}
+ ${cmaui.external.ntp}: {get_param: external_ntp}
+ ${cmaui.node}: {get_param: [cmaui_names, 1]}
+ ${cmaui.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ cmaui1_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: cmaui_cinder_volume_size}
+ volume_type: {get_param: CMAUI_volume_type}
+
+ cmaui1_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: cmaui1_volume}
+ instance_uuid: {get_resource: server_cmaui1}
+
+ cmaui1_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 1]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+outputs:
+ expose_1:
+ description: the pcrf_server
+ value: { get_resource: cmaui_volume }
+ expose_2:
+ description: the pcrf_server
+ value: { get_resource: cmaui1_volume }
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/cmaui_net.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/cmaui_net.yaml
new file mode 100644
index 0000000000..53efc5e36e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/cmaui_net.yaml
@@ -0,0 +1,76 @@
+heat_template_version: 2013-05-23
+
+#################################
+#
+# Changes from MSO - 11/5/2015
+# - Parameter changes as below
+# - CDLs for vmNames, IPs
+# - aZone->availability_zone_0
+# - nwName->{nwRole}_net_name
+# - nwID->{nwRole}_net_id
+# - vmName->{vmType}_names
+# - ips ->{vmType}_{nwRole}_ips
+# - fips->{vmType}_{nwRole}_floating_ip
+# - added replacement_policy: AUTO to all ports
+# - added vnf_id for metadata to all servers
+# - externalized security group resource
+# - externalized eca_mgmt network
+#
+#################################
+
+description: >
+ HOT template that creates Security Group and ECA network
+
+parameters:
+ eca_mgmt_name:
+ type: string
+ label: eca management name
+ description: eca management name
+ eca_mgmt_start:
+ type: string
+ label: eca management start
+ description: eca management start
+ eca_mgmt_end:
+ type: string
+ label: eca management end
+ description: eca management end
+ eca_mgmt_cidr:
+ type: string
+ label: eca management cidr
+ description: eca management cidr
+ eca_mgmt_netmask:
+ type: string
+ label: ECA mgmt network subnet mask
+ description: ECA mgmt network subnet mask
+ security_group_name:
+ type: string
+ label: MMSC security group name
+ description: MMSC security group name
+
+resources:
+ mms_security_group:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: mmsc security group
+ name: {get_param: security_group_name}
+ rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0}
+ ]
+ eca_mgmt_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: {get_param: eca_mgmt_name}
+
+ eca_mgmt_network_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: eca_mgmt_name}
+ allocation_pools: [{"start": {get_param: eca_mgmt_start}, "end": {get_param: eca_mgmt_end}}]
+ cidr: {get_param: eca_mgmt_cidr}
+ #enable_dhcp: false
+ #gateway_ip: null
+ network_id: {get_resource: eca_mgmt_net}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/eca_oam.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/eca_oam.env
new file mode 100644
index 0000000000..f9991722b3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/eca_oam.env
@@ -0,0 +1,20 @@
+parameters:
+ eca_names: ZRDM1MMSC02OAM001,ZRDM1MMSC02OAM002
+ arb_names: ZRDM1MMSC02ARB001
+ oam_image_name: ECABASE
+ oam_flavor: lc.xlarge4
+ arbiter_flavor: m1.large2
+ availability_zone_0: nova
+ oam_net_name: oam_protected_net_0
+ eca_mgmt_net_name: int_mms_eca_mgmt_net_1
+ eca_oam_ips: 107.250.172.44,107.250.172.45
+ eca_eca_mgmt_ips: 172.25.137.242,172.25.137.243
+ eca_oam_gateway: 107.250.172.1
+ arb_oam_ips: 107.250.172.46
+ arb_eca_mgmt_ips: 172.25.137.244
+ security_group_name: mmsc_security_group_1
+ oam_volume_size: 1800
+ arb_volume_size: 40
+ swift_eca_url: http://object-store.rdm2.cci.com:8080/v1/AUTH_1bbab536a19b4756926e7d0ec1eb543c/eca
+ ECA_OAM_volume_type: Platinum
+ ARB_volume_type: Platinum
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/eca_oam.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/eca_oam.yaml
new file mode 100644
index 0000000000..243bccf3d0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/eca_oam.yaml
@@ -0,0 +1,453 @@
+heat_template_version: 2013-05-23
+
+##########################################################
+#
+# Changes from MSO
+# - Updated per ECOMP Feedback
+#
+#
+##########################################################
+
+description: This stack creates two ECA OAM VM and one ARB VM
+
+parameters:
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-ECA_id
+ eca_names:
+ type: comma_delimited_list
+ label: oam servers names
+ description: the names of the OAM1,OAM2 VM instances
+ cmaui_name:
+ type: comma_delimited_list
+ label: oam servers names
+ cmaui_image:
+ type: comma_delimited_list
+ label: oam servers names
+ description: the names of the OAM1,OAM2 VM instances
+ networks:
+ type: string
+ label: internal network name
+ description: the name of the internal network
+ flavor:
+ type: string
+ label: internal network name
+ description: the name of the internal network
+ metadata:
+ type: string
+ label: internal network name
+ description: the name of the internal network
+ user_data:
+ type: string
+ label: internal network name
+ description: the name of the internal network
+ user_data_format:
+ type: string
+ label: internal network name
+ description: the name of the internal network
+ cmaui_names:
+ type: comma_delimited_list
+ label: oam servers names
+ description: the names of the OAM1,OAM2 VM instances
+ cmaui_flavor:
+ type: comma_delimited_list
+ label: oam servers names
+ description: the names of the OAM1,OAM2 VM instances
+ arb_names:
+ type: comma_delimited_list
+ label: arbiter server names
+ description: the names of the arbiter VM instances
+ oam_image_name:
+ type: string
+ label: image name
+ description: the OAM image name
+ oam_flavor:
+ type: string
+ label: flavor name
+ description: OAM flavor name
+ arbiter_flavor:
+ type: string
+ label: flavor name
+ description: arbiter flavor name
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ oam_net_name:
+ type: string
+ label: oam network name
+ description: the name of the oam network
+ eca_mgmt_net_name:
+ type: string
+ label: internal network name
+ description: the name of the internal network
+ eca_oam_ips:
+ type: comma_delimited_list
+ label: oam network ips
+ description: the ips of oam networks for eca VM
+ eca_eca_mgmt_ips:
+ type: comma_delimited_list
+ label: eca_mgmt network ips for eca VM
+ description: internal eca_mgmt network ips for eca VM
+ arb_oam_ips:
+ type: comma_delimited_list
+ label: oam network ips for arb VM
+ description: oam network ips for eca VM
+ arb_eca_mgmt_ips:
+ type: comma_delimited_list
+ label: eca_mgmt network ips
+ description: internal eca_mgmt network ips for arb VM
+ eca_oam_gateway:
+ type: string
+ label: oam network gateway
+ description: oam network gateway
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ oam_volume_size:
+ type: number
+ label: volume size
+ description: the size of the OAM volume
+ arb_volume_size:
+ type: number
+ label: volume size
+ description: the size of the ARB volume
+ swift_eca_url:
+ type: string
+ label: Swift URL
+ description: Base URL for eca swift object store
+ ECA_OAM_volume_type:
+ type: string
+ label: eca oam vm volume type
+ description: the name of the target volume backend
+ ARB_volume_type:
+ type: string
+ label: arb vm volume type
+ description: the name of the target volume backend
+
+resources:
+ server_cmaui_nested:
+ type: eca_oam_nested.yaml
+ properties:
+ cmaui_name: { get_param: [cmaui_names, 0]}
+ cmaui_image: { get_param: cmaui_image }
+ availability_zone_0: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_0 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ cmaui.mgmt.ip=${cmaui.mgmt.ip}
+ cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
+ cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
+ cmaui.external.dns=${cmaui.external.dns}
+ cmaui.external.ntp=${cmaui.external.ntp}
+ cmaui.node=${cmaui.node}
+ cmaui.timezone=${cmaui.timezone}
+ params:
+ ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 0]}
+ ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${cmaui.external.dns}: {get_param: external_dns}
+ ${cmaui.external.ntp}: {get_param: external_ntp}
+ ${cmaui.node}: {get_param: [cmaui_names, 0]}
+ ${cmaui.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ oam1_instance:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: [eca_names, 0]}
+ image: {get_param: oam_image_name}
+ flavor: {get_param: oam_flavor}
+ availability_zone: {get_param: availability_zone_0}
+ networks:
+ - port: {get_resource: oam1_int_port}
+ - port: {get_resource: oam1_mgmt_port}
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ sed -i s/HOSTNAME.*/"HOSTNAME=oam1_hostname"/g /etc/sysconfig/network
+ eth1_ip_address='oam1_mgt_ip'
+ eth1_gateway='oam_gateway'
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ mkdir /etc/puppet/files/roles/transcoder
+ mkdir /etc/puppet/files/roles/oam_primary
+ curl swift_url/etc/puppet/manifests/roles/oam_primary.pp > /etc/puppet/manifests/roles/oam_primary.pp
+ curl swift_url/etc/puppet/manifests/roles/transcoder.pp > /etc/puppet/manifests/roles/transcoder.pp
+ curl swift_url/etc/puppet/files/roles/oam_primary/config.yaml > /etc/puppet/files/roles/oam_primary/config.yaml
+ curl swift_url/etc/puppet/files/roles/transcoder/config.yaml > /etc/puppet/files/roles/transcoder/config.yaml
+ curl swift_url/etc/puppet/files/roles/transcoder/hpm.conf > /etc/puppet/files/roles/transcoder/hpm.conf
+ curl swift_url/etc/puppet/files/roles/transcoder/trx.conf > /etc/puppet/files/roles/transcoder/trx.conf
+ curl swift_url/etc/puppet/files/roles/transcoder/plugins-mo.conf > /etc/puppet/files/roles/transcoder/plugins-mo.conf
+ curl swift_url/etc/puppet/files/global/11-customer.conf > /etc/puppet/files/global/11-customer.conf
+ curl swift_url/etc/puppet/manifests/site.pp > /etc/puppet/manifests/site.pp
+ curl swift_url/scripts/van-init-replicaset > /usr/sbin/van-init-replicaset
+ van-role oam_primary > /root/startup-van-role.out
+ curl swift_url/scripts/fdisk-keystrokes > /root/fdisk-keystrokes
+ fdisk /dev/vdb < /root/fdisk-keystrokes
+ curl swift_url/scripts/os-conf-cinder-vol > /root/os-conf-cinder-vol
+ chmod 755 /root/os-conf-cinder-vol
+ /root/os-conf-cinder-vol 2>> /tmp/cinder_volume.log
+ params:
+ oam1_mgt_ip: {get_param: [eca_oam_ips, 0] }
+ oam_gateway: {get_param: eca_oam_gateway }
+ oam1_hostname: {get_param: [eca_names, 0]}
+ swift_url: {get_param: swift_eca_url}
+
+ oam1_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [eca_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ cmaui_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [eca_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ oam1_int_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: eca_mgmt_net_name}
+ fixed_ips: [{"ip_address": {get_param: [eca_eca_mgmt_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ oam1_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: oam_volume_size}
+ volume_type: {get_param: ECA_OAM_volume_type}
+
+ oam1_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: oam1_volume}
+ instance_uuid: {get_resource: oam1_instance}
+
+ oam2_instance:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: [eca_names, 1]}
+ image: {get_param: oam_image_name}
+ flavor: {get_param: oam_flavor}
+ availability_zone: {get_param: availability_zone_0}
+ networks:
+ - port: {get_resource: oam2_int_port}
+ - port: {get_resource: oam2_mgmt_port}
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ sed -i s/HOSTNAME.*/"HOSTNAME=oam2_hostname"/g /etc/sysconfig/network
+ eth1_ip_address='oam2_mgt_ip'
+ eth1_gateway='oam_gateway'
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ curl swift_url/etc/puppet/manifests/roles/oam_secondary.pp > /etc/puppet/manifests/roles/oam_secondary.pp
+ curl swift_url/etc/puppet/files/global/config.yaml > /etc/puppet/files/global/config.yaml
+ curl swift_url/etc/puppet/files/global/11-customer.conf > /etc/puppet/files/global/11-customer.conf
+ van-role oam_secondary > /root/startup-van-role.out
+ curl swift_url/scripts/fdisk-keystrokes > /root/fdisk-keystrokes
+ fdisk /dev/vdb < /root/fdisk-keystrokes
+ curl swift_url/scripts/os-conf-cinder-vol > /root/os-conf-cinder-vol
+ chmod 755 /root/os-conf-cinder-vol
+ /root/os-conf-cinder-vol 2>> /tmp/cinder_volume.log
+
+ params:
+ oam2_mgt_ip: {get_param: [eca_oam_ips, 1] }
+ oam2_hostname: {get_param: [eca_names, 1]}
+ swift_url: {get_param: swift_eca_url}
+ oam_gateway: {get_param: eca_oam_gateway }
+
+ oam2_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [eca_oam_ips, 1]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ oam2_int_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: eca_mgmt_net_name}
+ fixed_ips: [{"ip_address": {get_param: [eca_eca_mgmt_ips, 1]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ oam2_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: oam_volume_size}
+ volume_type: {get_param: ECA_OAM_volume_type}
+
+ oam2_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: oam2_volume}
+ instance_uuid: {get_resource: oam2_instance}
+
+ arb_instance:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: [arb_names, 0]}
+ image: {get_param: oam_image_name}
+ flavor: {get_param: arbiter_flavor}
+ availability_zone: {get_param: availability_zone_0}
+ networks:
+ - port: {get_resource: arb_int_port}
+ - port: {get_resource: arb_mgmt_port}
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ sed -i s/HOSTNAME.*/"HOSTNAME=arb_hostname"/g /etc/sysconfig/network
+ eth1_ip_address='arb_mgt_ip'
+ eth1_gateway='oam_gateway'
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ curl swift_url/etc/puppet/manifests/roles/oam_arbiter.pp > /etc/puppet/manifests/roles/oam_arbiter.pp
+ curl swift_url/etc/puppet/files/global/config.yaml > /etc/puppet/files/global/config.yaml
+ curl swift_url/etc/puppet/files/global/11-customer.conf > /etc/puppet/files/global/11-customer.conf
+ van-role oam_arbiter > /root/startup-van-role.out
+ curl swift_url/scripts/fdisk-keystrokes > /root/fdisk-keystrokes
+ fdisk /dev/vdb < /root/fdisk-keystrokes
+ curl swift_url/scripts/os-conf-cinder-vol > /root/os-conf-cinder-vol
+ chmod 755 /root/os-conf-cinder-vol
+ /root/os-conf-cinder-vol 2>> /tmp/cinder_volume.log
+ params:
+ arb_mgt_ip: {get_param: [arb_oam_ips, 0] }
+ arb_hostname: {get_param: [arb_names, 0]}
+ swift_url: {get_param: swift_eca_url}
+ oam_gateway: {get_param: eca_oam_gateway }
+
+ arb_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [arb_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ arb_int_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: eca_mgmt_net_name}
+ fixed_ips: [{"ip_address": {get_param: [arb_eca_mgmt_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ arb_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: arb_volume_size}
+ volume_type: {get_param: ARB_volume_type}
+ arb_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: arb_volume}
+ instance_uuid: {get_resource: arb_instance}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/eca_oam_nested.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/eca_oam_nested.yaml
new file mode 100644
index 0000000000..c8b9527555
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/eca_oam_nested.yaml
@@ -0,0 +1,406 @@
+heat_template_version: 2013-05-23
+
+##########################################################
+#
+# Changes from MSO
+# - Updated per ECOMP Feedback
+#
+#
+##########################################################
+
+description: This stack creates two ECA OAM VM and one ARB VM
+
+parameters:
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-ECA_id
+ cmaui_name:
+ type: comma_delimited_list
+ label: oam servers names
+ cmaui_image:
+ type: comma_delimited_list
+ label: oam servers names
+ description: the names of the OAM1,OAM2 VM instances
+ networks:
+ type: string
+ label: internal network name
+ description: the name of the internal network
+ flavor:
+ type: string
+ label: internal network name
+ description: the name of the internal network
+ metadata:
+ type: string
+ label: internal network name
+ description: the name of the internal network
+ user_data:
+ type: string
+ label: internal network name
+ description: the name of the internal network
+ user_data_format:
+ type: string
+ label: internal network name
+ description: the name of the internal network
+ eca_names:
+ type: comma_delimited_list
+ label: oam servers names
+ description: the names of the OAM1,OAM2 VM instances
+ arb_names:
+ type: comma_delimited_list
+ label: arbiter server names
+ description: the names of the arbiter VM instances
+ oam_image_name:
+ type: string
+ label: image name
+ description: the OAM image name
+ oam_flavor:
+ type: string
+ label: flavor name
+ description: OAM flavor name
+ arbiter_flavor:
+ type: string
+ label: flavor name
+ description: arbiter flavor name
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ oam_net_name:
+ type: string
+ label: oam network name
+ description: the name of the oam network
+ eca_mgmt_net_name:
+ type: string
+ label: internal network name
+ description: the name of the internal network
+ eca_oam_ips:
+ type: comma_delimited_list
+ label: oam network ips
+ description: the ips of oam networks for eca VM
+ eca_eca_mgmt_ips:
+ type: comma_delimited_list
+ label: eca_mgmt network ips for eca VM
+ description: internal eca_mgmt network ips for eca VM
+ arb_oam_ips:
+ type: comma_delimited_list
+ label: oam network ips for arb VM
+ description: oam network ips for eca VM
+ arb_eca_mgmt_ips:
+ type: comma_delimited_list
+ label: eca_mgmt network ips
+ description: internal eca_mgmt network ips for arb VM
+ eca_oam_gateway:
+ type: string
+ label: oam network gateway
+ description: oam network gateway
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ oam_volume_size:
+ type: number
+ label: volume size
+ description: the size of the OAM volume
+ arb_volume_size:
+ type: number
+ label: volume size
+ description: the size of the ARB volume
+ swift_eca_url:
+ type: string
+ label: Swift URL
+ description: Base URL for eca swift object store
+ ECA_OAM_volume_type:
+ type: string
+ label: eca oam vm volume type
+ description: the name of the target volume backend
+ ARB_volume_type:
+ type: string
+ label: arb vm volume type
+ description: the name of the target volume backend
+
+resources:
+ oam1_instance:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: [eca_names, 0]}
+ image: {get_param: oam_image_name}
+ flavor: {get_param: oam_flavor}
+ availability_zone: {get_param: availability_zone_0}
+ networks:
+ - port: {get_resource: oam1_int_port}
+ - port: {get_resource: oam1_mgmt_port}
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ sed -i s/HOSTNAME.*/"HOSTNAME=oam1_hostname"/g /etc/sysconfig/network
+ eth1_ip_address='oam1_mgt_ip'
+ eth1_gateway='oam_gateway'
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ mkdir /etc/puppet/files/roles/transcoder
+ mkdir /etc/puppet/files/roles/oam_primary
+ curl swift_url/etc/puppet/manifests/roles/oam_primary.pp > /etc/puppet/manifests/roles/oam_primary.pp
+ curl swift_url/etc/puppet/manifests/roles/transcoder.pp > /etc/puppet/manifests/roles/transcoder.pp
+ curl swift_url/etc/puppet/files/roles/oam_primary/config.yaml > /etc/puppet/files/roles/oam_primary/config.yaml
+ curl swift_url/etc/puppet/files/roles/transcoder/config.yaml > /etc/puppet/files/roles/transcoder/config.yaml
+ curl swift_url/etc/puppet/files/roles/transcoder/hpm.conf > /etc/puppet/files/roles/transcoder/hpm.conf
+ curl swift_url/etc/puppet/files/roles/transcoder/trx.conf > /etc/puppet/files/roles/transcoder/trx.conf
+ curl swift_url/etc/puppet/files/roles/transcoder/plugins-mo.conf > /etc/puppet/files/roles/transcoder/plugins-mo.conf
+ curl swift_url/etc/puppet/files/global/11-customer.conf > /etc/puppet/files/global/11-customer.conf
+ curl swift_url/etc/puppet/manifests/site.pp > /etc/puppet/manifests/site.pp
+ curl swift_url/scripts/van-init-replicaset > /usr/sbin/van-init-replicaset
+ van-role oam_primary > /root/startup-van-role.out
+ curl swift_url/scripts/fdisk-keystrokes > /root/fdisk-keystrokes
+ fdisk /dev/vdb < /root/fdisk-keystrokes
+ curl swift_url/scripts/os-conf-cinder-vol > /root/os-conf-cinder-vol
+ chmod 755 /root/os-conf-cinder-vol
+ /root/os-conf-cinder-vol 2>> /tmp/cinder_volume.log
+ params:
+ oam1_mgt_ip: {get_param: [eca_oam_ips, 0] }
+ oam_gateway: {get_param: eca_oam_gateway }
+ oam1_hostname: {get_param: [eca_names, 0]}
+ swift_url: {get_param: swift_eca_url}
+
+ oam1_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [eca_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ oam1_int_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: eca_mgmt_net_name}
+ fixed_ips: [{"ip_address": {get_param: [eca_eca_mgmt_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ oam1_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: oam_volume_size}
+ volume_type: {get_param: ECA_OAM_volume_type}
+
+ oam1_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: oam1_volume}
+ instance_uuid: {get_resource: oam1_instance}
+
+ oam2_instance:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: [eca_names, 1]}
+ image: {get_param: oam_image_name}
+ flavor: {get_param: oam_flavor}
+ availability_zone: {get_param: availability_zone_0}
+ networks:
+ - port: {get_resource: oam2_int_port}
+ - port: {get_resource: oam2_mgmt_port}
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ sed -i s/HOSTNAME.*/"HOSTNAME=oam2_hostname"/g /etc/sysconfig/network
+ eth1_ip_address='oam2_mgt_ip'
+ eth1_gateway='oam_gateway'
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ curl swift_url/etc/puppet/manifests/roles/oam_secondary.pp > /etc/puppet/manifests/roles/oam_secondary.pp
+ curl swift_url/etc/puppet/files/global/config.yaml > /etc/puppet/files/global/config.yaml
+ curl swift_url/etc/puppet/files/global/11-customer.conf > /etc/puppet/files/global/11-customer.conf
+ van-role oam_secondary > /root/startup-van-role.out
+ curl swift_url/scripts/fdisk-keystrokes > /root/fdisk-keystrokes
+ fdisk /dev/vdb < /root/fdisk-keystrokes
+ curl swift_url/scripts/os-conf-cinder-vol > /root/os-conf-cinder-vol
+ chmod 755 /root/os-conf-cinder-vol
+ /root/os-conf-cinder-vol 2>> /tmp/cinder_volume.log
+
+ params:
+ oam2_mgt_ip: {get_param: [eca_oam_ips, 1] }
+ oam2_hostname: {get_param: [eca_names, 1]}
+ swift_url: {get_param: swift_eca_url}
+ oam_gateway: {get_param: eca_oam_gateway }
+
+ oam2_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [eca_oam_ips, 1]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ oam2_int_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: eca_mgmt_net_name}
+ fixed_ips: [{"ip_address": {get_param: [eca_eca_mgmt_ips, 1]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ oam2_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: oam_volume_size}
+ volume_type: {get_param: ECA_OAM_volume_type}
+
+ oam2_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: oam2_volume}
+ instance_uuid: {get_resource: oam2_instance}
+
+ arb_instance:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: [arb_names, 0]}
+ image: {get_param: oam_image_name}
+ flavor: {get_param: arbiter_flavor}
+ availability_zone: {get_param: availability_zone_0}
+ networks:
+ - port: {get_resource: arb_int_port}
+ - port: {get_resource: arb_mgmt_port}
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ sed -i s/HOSTNAME.*/"HOSTNAME=arb_hostname"/g /etc/sysconfig/network
+ eth1_ip_address='arb_mgt_ip'
+ eth1_gateway='oam_gateway'
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ curl swift_url/etc/puppet/manifests/roles/oam_arbiter.pp > /etc/puppet/manifests/roles/oam_arbiter.pp
+ curl swift_url/etc/puppet/files/global/config.yaml > /etc/puppet/files/global/config.yaml
+ curl swift_url/etc/puppet/files/global/11-customer.conf > /etc/puppet/files/global/11-customer.conf
+ van-role oam_arbiter > /root/startup-van-role.out
+ curl swift_url/scripts/fdisk-keystrokes > /root/fdisk-keystrokes
+ fdisk /dev/vdb < /root/fdisk-keystrokes
+ curl swift_url/scripts/os-conf-cinder-vol > /root/os-conf-cinder-vol
+ chmod 755 /root/os-conf-cinder-vol
+ /root/os-conf-cinder-vol 2>> /tmp/cinder_volume.log
+ params:
+ arb_mgt_ip: {get_param: [arb_oam_ips, 0] }
+ arb_hostname: {get_param: [arb_names, 0]}
+ swift_url: {get_param: swift_eca_url}
+ oam_gateway: {get_param: eca_oam_gateway }
+
+ arb_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [arb_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ arb_int_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: eca_mgmt_net_name}
+ fixed_ips: [{"ip_address": {get_param: [arb_eca_mgmt_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ arb_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: arb_volume_size}
+ volume_type: {get_param: ARB_volume_type}
+ arb_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: arb_volume}
+ instance_uuid: {get_resource: arb_instance}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/nested1.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/nested1.yaml
new file mode 100644
index 0000000000..a0c56d9da7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/nested1.yaml
@@ -0,0 +1,430 @@
+heat_template_version: 2013-05-23
+
+##########################################################
+#
+# Changes from MSO
+# - Updated per ECOMP Feedback
+#
+#
+##########################################################
+
+description: This stack creates two ECA OAM VM and one ARB VM
+
+parameters:
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-ECA_id
+ cmaui_names:
+ type: comma_delimited_list
+ label: oam servers names
+ description: the names of the OAM1,OAM2 VM instances
+ cmaui_image:
+ type: comma_delimited_list
+ label: oam servers names
+ description: the names of the OAM1,OAM2 VM instances
+ cmaui_flavor:
+ type: comma_delimited_list
+ label: oam servers names
+ description: the names of the OAM1,OAM2 VM instances
+ eca_names:
+ type: comma_delimited_list
+ label: oam servers names
+ description: the names of the OAM1,OAM2 VM instances
+ arb_names:
+ type: comma_delimited_list
+ label: arbiter server names
+ description: the names of the arbiter VM instances
+ oam_image_name:
+ type: string
+ label: image name
+ description: the OAM image name
+ oam_flavor:
+ type: string
+ label: flavor name
+ description: OAM flavor name
+ arbiter_flavor:
+ type: string
+ label: flavor name
+ description: arbiter flavor name
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ oam_net_name:
+ type: string
+ label: oam network name
+ description: the name of the oam network
+ eca_mgmt_net_name:
+ type: string
+ label: internal network name
+ description: the name of the internal network
+ eca_oam_ips:
+ type: comma_delimited_list
+ label: oam network ips
+ description: the ips of oam networks for eca VM
+ eca_eca_mgmt_ips:
+ type: comma_delimited_list
+ label: eca_mgmt network ips for eca VM
+ description: internal eca_mgmt network ips for eca VM
+ arb_oam_ips:
+ type: comma_delimited_list
+ label: oam network ips for arb VM
+ description: oam network ips for eca VM
+ arb_eca_mgmt_ips:
+ type: comma_delimited_list
+ label: eca_mgmt network ips
+ description: internal eca_mgmt network ips for arb VM
+ eca_oam_gateway:
+ type: string
+ label: oam network gateway
+ description: oam network gateway
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ oam_volume_size:
+ type: number
+ label: volume size
+ description: the size of the OAM volume
+ arb_volume_size:
+ type: number
+ label: volume size
+ description: the size of the ARB volume
+ swift_eca_url:
+ type: string
+ label: Swift URL
+ description: Base URL for eca swift object store
+ ECA_OAM_volume_type:
+ type: string
+ label: eca oam vm volume type
+ description: the name of the target volume backend
+ ARB_volume_type:
+ type: string
+ label: arb vm volume type
+ description: the name of the target volume backend
+
+resources:
+ server_cmaui_nested:
+ type: eca_oam_nested.yaml
+ properties:
+ cmaui_name: { get_param: [cmaui_names, 0]}
+ cmaui_image: { get_param: cmaui_image }
+ availability_zone_0: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_0 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ cmaui.mgmt.ip=${cmaui.mgmt.ip}
+ cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
+ cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
+ cmaui.external.dns=${cmaui.external.dns}
+ cmaui.external.ntp=${cmaui.external.ntp}
+ cmaui.node=${cmaui.node}
+ cmaui.timezone=${cmaui.timezone}
+ params:
+ ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 0]}
+ ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${cmaui.external.dns}: {get_param: external_dns}
+ ${cmaui.external.ntp}: {get_param: external_ntp}
+ ${cmaui.node}: {get_param: [cmaui_names, 0]}
+ ${cmaui.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ oam1_instance:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: [eca_names, 0]}
+ image: {get_param: oam_image_name}
+ flavor: {get_param: oam_flavor}
+ availability_zone: {get_param: availability_zone_0}
+ networks:
+ - port: {get_resource: oam1_int_port}
+ - port: {get_resource: oam1_mgmt_port}
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ sed -i s/HOSTNAME.*/"HOSTNAME=oam1_hostname"/g /etc/sysconfig/network
+ eth1_ip_address='oam1_mgt_ip'
+ eth1_gateway='oam_gateway'
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ mkdir /etc/puppet/files/roles/transcoder
+ mkdir /etc/puppet/files/roles/oam_primary
+ curl swift_url/etc/puppet/manifests/roles/oam_primary.pp > /etc/puppet/manifests/roles/oam_primary.pp
+ curl swift_url/etc/puppet/manifests/roles/transcoder.pp > /etc/puppet/manifests/roles/transcoder.pp
+ curl swift_url/etc/puppet/files/roles/oam_primary/config.yaml > /etc/puppet/files/roles/oam_primary/config.yaml
+ curl swift_url/etc/puppet/files/roles/transcoder/config.yaml > /etc/puppet/files/roles/transcoder/config.yaml
+ curl swift_url/etc/puppet/files/roles/transcoder/hpm.conf > /etc/puppet/files/roles/transcoder/hpm.conf
+ curl swift_url/etc/puppet/files/roles/transcoder/trx.conf > /etc/puppet/files/roles/transcoder/trx.conf
+ curl swift_url/etc/puppet/files/roles/transcoder/plugins-mo.conf > /etc/puppet/files/roles/transcoder/plugins-mo.conf
+ curl swift_url/etc/puppet/files/global/11-customer.conf > /etc/puppet/files/global/11-customer.conf
+ curl swift_url/etc/puppet/manifests/site.pp > /etc/puppet/manifests/site.pp
+ curl swift_url/scripts/van-init-replicaset > /usr/sbin/van-init-replicaset
+ van-role oam_primary > /root/startup-van-role.out
+ curl swift_url/scripts/fdisk-keystrokes > /root/fdisk-keystrokes
+ fdisk /dev/vdb < /root/fdisk-keystrokes
+ curl swift_url/scripts/os-conf-cinder-vol > /root/os-conf-cinder-vol
+ chmod 755 /root/os-conf-cinder-vol
+ /root/os-conf-cinder-vol 2>> /tmp/cinder_volume.log
+ params:
+ oam1_mgt_ip: {get_param: [eca_oam_ips, 0] }
+ oam_gateway: {get_param: eca_oam_gateway }
+ oam1_hostname: {get_param: [eca_names, 0]}
+ swift_url: {get_param: swift_eca_url}
+
+ oam1_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [eca_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ cmaui_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [eca_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ oam1_int_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: eca_mgmt_net_name}
+ fixed_ips: [{"ip_address": {get_param: [eca_eca_mgmt_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ oam1_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: oam_volume_size}
+ volume_type: {get_param: ECA_OAM_volume_type}
+
+ oam1_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: oam1_volume}
+ instance_uuid: {get_resource: oam1_instance}
+
+ oam2_instance:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: [eca_names, 1]}
+ image: {get_param: oam_image_name}
+ flavor: {get_param: oam_flavor}
+ availability_zone: {get_param: availability_zone_0}
+ networks:
+ - port: {get_resource: oam2_int_port}
+ - port: {get_resource: oam2_mgmt_port}
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ sed -i s/HOSTNAME.*/"HOSTNAME=oam2_hostname"/g /etc/sysconfig/network
+ eth1_ip_address='oam2_mgt_ip'
+ eth1_gateway='oam_gateway'
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ curl swift_url/etc/puppet/manifests/roles/oam_secondary.pp > /etc/puppet/manifests/roles/oam_secondary.pp
+ curl swift_url/etc/puppet/files/global/config.yaml > /etc/puppet/files/global/config.yaml
+ curl swift_url/etc/puppet/files/global/11-customer.conf > /etc/puppet/files/global/11-customer.conf
+ van-role oam_secondary > /root/startup-van-role.out
+ curl swift_url/scripts/fdisk-keystrokes > /root/fdisk-keystrokes
+ fdisk /dev/vdb < /root/fdisk-keystrokes
+ curl swift_url/scripts/os-conf-cinder-vol > /root/os-conf-cinder-vol
+ chmod 755 /root/os-conf-cinder-vol
+ /root/os-conf-cinder-vol 2>> /tmp/cinder_volume.log
+
+ params:
+ oam2_mgt_ip: {get_param: [eca_oam_ips, 1] }
+ oam2_hostname: {get_param: [eca_names, 1]}
+ swift_url: {get_param: swift_eca_url}
+ oam_gateway: {get_param: eca_oam_gateway }
+
+ oam2_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [eca_oam_ips, 1]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ oam2_int_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: eca_mgmt_net_name}
+ fixed_ips: [{"ip_address": {get_param: [eca_eca_mgmt_ips, 1]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ oam2_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: oam_volume_size}
+ volume_type: {get_param: ECA_OAM_volume_type}
+
+ oam2_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: oam2_volume}
+ instance_uuid: {get_resource: oam2_instance}
+
+ arb_instance:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: [arb_names, 0]}
+ image: {get_param: oam_image_name}
+ flavor: {get_param: arbiter_flavor}
+ availability_zone: {get_param: availability_zone_0}
+ networks:
+ - port: {get_resource: arb_int_port}
+ - port: {get_resource: arb_mgmt_port}
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ sed -i s/HOSTNAME.*/"HOSTNAME=arb_hostname"/g /etc/sysconfig/network
+ eth1_ip_address='arb_mgt_ip'
+ eth1_gateway='oam_gateway'
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ curl swift_url/etc/puppet/manifests/roles/oam_arbiter.pp > /etc/puppet/manifests/roles/oam_arbiter.pp
+ curl swift_url/etc/puppet/files/global/config.yaml > /etc/puppet/files/global/config.yaml
+ curl swift_url/etc/puppet/files/global/11-customer.conf > /etc/puppet/files/global/11-customer.conf
+ van-role oam_arbiter > /root/startup-van-role.out
+ curl swift_url/scripts/fdisk-keystrokes > /root/fdisk-keystrokes
+ fdisk /dev/vdb < /root/fdisk-keystrokes
+ curl swift_url/scripts/os-conf-cinder-vol > /root/os-conf-cinder-vol
+ chmod 755 /root/os-conf-cinder-vol
+ /root/os-conf-cinder-vol 2>> /tmp/cinder_volume.log
+ params:
+ arb_mgt_ip: {get_param: [arb_oam_ips, 0] }
+ arb_hostname: {get_param: [arb_names, 0]}
+ swift_url: {get_param: swift_eca_url}
+ oam_gateway: {get_param: eca_oam_gateway }
+
+ arb_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [arb_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ arb_int_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: eca_mgmt_net_name}
+ fixed_ips: [{"ip_address": {get_param: [arb_eca_mgmt_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ arb_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: arb_volume_size}
+ volume_type: {get_param: ARB_volume_type}
+ arb_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: arb_volume}
+ instance_uuid: {get_resource: arb_instance}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/nested2.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/nested2.yaml
new file mode 100644
index 0000000000..8775ffc72e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/nested2.yaml
@@ -0,0 +1,431 @@
+heat_template_version: 2013-05-23
+
+##########################################################
+#
+# Changes from MSO
+# - Updated per ECOMP Feedback
+#
+#
+##########################################################
+
+description: This stack creates two ECA OAM VM and one ARB VM
+
+parameters:
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-ECA_id
+ cmaui_names:
+ type: comma_delimited_list
+ label: oam servers names
+ description: the names of the OAM1,OAM2 VM instances
+ cmaui_image:
+ type: comma_delimited_list
+ label: oam servers names
+ description: the names of the OAM1,OAM2 VM instances
+ cmaui_flavor:
+ type: comma_delimited_list
+ label: oam servers names
+ description: the names of the OAM1,OAM2 VM instances
+ eca_names:
+ type: comma_delimited_list
+ label: oam servers names
+ description: the names of the OAM1,OAM2 VM instances
+ arb_names:
+ type: comma_delimited_list
+ label: arbiter server names
+ description: the names of the arbiter VM instances
+ oam_image_name:
+ type: string
+ label: image name
+ description: the OAM image name
+ oam_flavor:
+ type: string
+ label: flavor name
+ description: OAM flavor name
+ arbiter_flavor:
+ type: string
+ label: flavor name
+ description: arbiter flavor name
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ oam_net_name:
+ type: string
+ label: oam network name
+ description: the name of the oam network
+ eca_mgmt_net_name:
+ type: string
+ label: internal network name
+ description: the name of the internal network
+ eca_oam_ips:
+ type: comma_delimited_list
+ label: oam network ips
+ description: the ips of oam networks for eca VM
+ eca_eca_mgmt_ips:
+ type: comma_delimited_list
+ label: eca_mgmt network ips for eca VM
+ description: internal eca_mgmt network ips for eca VM
+ arb_oam_ips:
+ type: comma_delimited_list
+ label: oam network ips for arb VM
+ description: oam network ips for eca VM
+ arb_eca_mgmt_ips:
+ type: comma_delimited_list
+ label: eca_mgmt network ips
+ description: internal eca_mgmt network ips for arb VM
+ eca_oam_gateway:
+ type: string
+ label: oam network gateway
+ description: oam network gateway
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ oam_volume_size:
+ type: number
+ label: volume size
+ description: the size of the OAM volume
+ arb_volume_size:
+ type: number
+ label: volume size
+ description: the size of the ARB volume
+ swift_eca_url:
+ type: string
+ label: Swift URL
+ description: Base URL for eca swift object store
+ ECA_OAM_volume_type:
+ type: string
+ label: eca oam vm volume type
+ description: the name of the target volume backend
+ ARB_volume_type:
+ type: string
+ label: arb vm volume type
+ description: the name of the target volume backend
+
+resources:
+ server_cmaui_nested:
+ type: eca_oam_nested.yaml
+ properties:
+ cmaui_name: { get_param: [cmaui_names, 0]}
+ cmaui_image: { get_param: cmaui_image }
+ availability_zone_0: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_0 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ cmaui.mgmt.ip=${cmaui.mgmt.ip}
+ cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
+ cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
+ cmaui.external.dns=${cmaui.external.dns}
+ cmaui.external.ntp=${cmaui.external.ntp}
+ cmaui.node=${cmaui.node}
+ cmaui.timezone=${cmaui.timezone}
+ params:
+ ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 0]}
+ ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${cmaui.external.dns}: {get_param: external_dns}
+ ${cmaui.external.ntp}: {get_param: external_ntp}
+ ${cmaui.node}: {get_param: [cmaui_names, 0]}
+ ${cmaui.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ oam1_instance:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: [eca_names, 0]}
+ image: {get_param: oam_image_name}
+ flavor: {get_param: oam_flavor}
+ availability_zone: {get_param: availability_zone_0}
+ networks:
+ - port: {get_resource: oam1_int_port}
+ - port: {get_resource: oam1_mgmt_port}
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ sed -i s/HOSTNAME.*/"HOSTNAME=oam1_hostname"/g /etc/sysconfig/network
+ eth1_ip_address='oam1_mgt_ip'
+ eth1_gateway='oam_gateway'
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ mkdir /etc/puppet/files/roles/transcoder
+ mkdir /etc/puppet/files/roles/oam_primary
+ curl swift_url/etc/puppet/manifests/roles/oam_primary.pp > /etc/puppet/manifests/roles/oam_primary.pp
+ curl swift_url/etc/puppet/manifests/roles/transcoder.pp > /etc/puppet/manifests/roles/transcoder.pp
+ curl swift_url/etc/puppet/files/roles/oam_primary/config.yaml > /etc/puppet/files/roles/oam_primary/config.yaml
+ curl swift_url/etc/puppet/files/roles/transcoder/config.yaml > /etc/puppet/files/roles/transcoder/config.yaml
+ curl swift_url/etc/puppet/files/roles/transcoder/hpm.conf > /etc/puppet/files/roles/transcoder/hpm.conf
+ curl swift_url/etc/puppet/files/roles/transcoder/trx.conf > /etc/puppet/files/roles/transcoder/trx.conf
+ curl swift_url/etc/puppet/files/roles/transcoder/plugins-mo.conf > /etc/puppet/files/roles/transcoder/plugins-mo.conf
+ curl swift_url/etc/puppet/files/global/11-customer.conf > /etc/puppet/files/global/11-customer.conf
+ curl swift_url/etc/puppet/manifests/site.pp > /etc/puppet/manifests/site.pp
+ curl swift_url/scripts/van-init-replicaset > /usr/sbin/van-init-replicaset
+ van-role oam_primary > /root/startup-van-role.out
+ curl swift_url/scripts/fdisk-keystrokes > /root/fdisk-keystrokes
+ fdisk /dev/vdb < /root/fdisk-keystrokes
+ curl swift_url/scripts/os-conf-cinder-vol > /root/os-conf-cinder-vol
+ chmod 755 /root/os-conf-cinder-vol
+ /root/os-conf-cinder-vol 2>> /tmp/cinder_volume.log
+ params:
+ oam1_mgt_ip: {get_param: [eca_oam_ips, 0] }
+ oam_gateway: {get_param: eca_oam_gateway }
+ oam1_hostname: {get_param: [eca_names, 0]}
+ swift_url: {get_param: swift_eca_url}
+
+ oam1_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [eca_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+
+ cmaui_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [eca_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ oam1_int_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: eca_mgmt_net_name}
+ fixed_ips: [{"ip_address": {get_param: [eca_eca_mgmt_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ oam1_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: oam_volume_size}
+ volume_type: {get_param: ECA_OAM_volume_type}
+
+ oam1_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: oam1_volume}
+ instance_uuid: {get_resource: oam1_instance}
+
+ oam2_instance:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: [eca_names, 1]}
+ image: {get_param: oam_image_name}
+ flavor: {get_param: oam_flavor}
+ availability_zone: {get_param: availability_zone_0}
+ networks:
+ - port: {get_resource: oam2_int_port}
+ - port: {get_resource: oam2_mgmt_port}
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ sed -i s/HOSTNAME.*/"HOSTNAME=oam2_hostname"/g /etc/sysconfig/network
+ eth1_ip_address='oam2_mgt_ip'
+ eth1_gateway='oam_gateway'
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ curl swift_url/etc/puppet/manifests/roles/oam_secondary.pp > /etc/puppet/manifests/roles/oam_secondary.pp
+ curl swift_url/etc/puppet/files/global/config.yaml > /etc/puppet/files/global/config.yaml
+ curl swift_url/etc/puppet/files/global/11-customer.conf > /etc/puppet/files/global/11-customer.conf
+ van-role oam_secondary > /root/startup-van-role.out
+ curl swift_url/scripts/fdisk-keystrokes > /root/fdisk-keystrokes
+ fdisk /dev/vdb < /root/fdisk-keystrokes
+ curl swift_url/scripts/os-conf-cinder-vol > /root/os-conf-cinder-vol
+ chmod 755 /root/os-conf-cinder-vol
+ /root/os-conf-cinder-vol 2>> /tmp/cinder_volume.log
+
+ params:
+ oam2_mgt_ip: {get_param: [eca_oam_ips, 1] }
+ oam2_hostname: {get_param: [eca_names, 1]}
+ swift_url: {get_param: swift_eca_url}
+ oam_gateway: {get_param: eca_oam_gateway }
+
+ oam2_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [eca_oam_ips, 1]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ oam2_int_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: eca_mgmt_net_name}
+ fixed_ips: [{"ip_address": {get_param: [eca_eca_mgmt_ips, 1]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ oam2_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: oam_volume_size}
+ volume_type: {get_param: ECA_OAM_volume_type}
+
+ oam2_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: oam2_volume}
+ instance_uuid: {get_resource: oam2_instance}
+
+ arb_instance:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: [arb_names, 0]}
+ image: {get_param: oam_image_name}
+ flavor: {get_param: arbiter_flavor}
+ availability_zone: {get_param: availability_zone_0}
+ networks:
+ - port: {get_resource: arb_int_port}
+ - port: {get_resource: arb_mgmt_port}
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ sed -i s/HOSTNAME.*/"HOSTNAME=arb_hostname"/g /etc/sysconfig/network
+ eth1_ip_address='arb_mgt_ip'
+ eth1_gateway='oam_gateway'
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ curl swift_url/etc/puppet/manifests/roles/oam_arbiter.pp > /etc/puppet/manifests/roles/oam_arbiter.pp
+ curl swift_url/etc/puppet/files/global/config.yaml > /etc/puppet/files/global/config.yaml
+ curl swift_url/etc/puppet/files/global/11-customer.conf > /etc/puppet/files/global/11-customer.conf
+ van-role oam_arbiter > /root/startup-van-role.out
+ curl swift_url/scripts/fdisk-keystrokes > /root/fdisk-keystrokes
+ fdisk /dev/vdb < /root/fdisk-keystrokes
+ curl swift_url/scripts/os-conf-cinder-vol > /root/os-conf-cinder-vol
+ chmod 755 /root/os-conf-cinder-vol
+ /root/os-conf-cinder-vol 2>> /tmp/cinder_volume.log
+ params:
+ arb_mgt_ip: {get_param: [arb_oam_ips, 0] }
+ arb_hostname: {get_param: [arb_names, 0]}
+ swift_url: {get_param: swift_eca_url}
+ oam_gateway: {get_param: eca_oam_gateway }
+
+ arb_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [arb_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ arb_int_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: eca_mgmt_net_name}
+ fixed_ips: [{"ip_address": {get_param: [arb_eca_mgmt_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ arb_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: arb_volume_size}
+ volume_type: {get_param: ARB_volume_type}
+ arb_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: arb_volume}
+ instance_uuid: {get_resource: arb_instance}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/network_out.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/network_out.env
new file mode 100644
index 0000000000..8012063ac0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/network_out.env
@@ -0,0 +1,7 @@
+parameters:
+ eca_mgmt_name: int_eca_mgmt_net_1
+ eca_mgmt_cidr: 172.25.137.192/26
+ eca_mgmt_netmask: 255.255.255.192
+ eca_mgmt_start: 172.25.137.195
+ eca_mgmt_end: 172.25.137.254
+ security_group_name: mmsc_security_group_1
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/sg_eca_mgmt.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/sg_eca_mgmt.env
new file mode 100644
index 0000000000..8012063ac0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/sg_eca_mgmt.env
@@ -0,0 +1,7 @@
+parameters:
+ eca_mgmt_name: int_eca_mgmt_net_1
+ eca_mgmt_cidr: 172.25.137.192/26
+ eca_mgmt_netmask: 255.255.255.192
+ eca_mgmt_start: 172.25.137.195
+ eca_mgmt_end: 172.25.137.254
+ security_group_name: mmsc_security_group_1
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/volume.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/volume.env
new file mode 100644
index 0000000000..8012063ac0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/volume.env
@@ -0,0 +1,7 @@
+parameters:
+ eca_mgmt_name: int_eca_mgmt_net_1
+ eca_mgmt_cidr: 172.25.137.192/26
+ eca_mgmt_netmask: 255.255.255.192
+ eca_mgmt_start: 172.25.137.195
+ eca_mgmt_end: 172.25.137.254
+ security_group_name: mmsc_security_group_1
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/volume_out.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/volume_out.env
new file mode 100644
index 0000000000..8012063ac0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heattotoscatranslator/overallexample/inputs/volume_out.env
@@ -0,0 +1,7 @@
+parameters:
+ eca_mgmt_name: int_eca_mgmt_net_1
+ eca_mgmt_cidr: 172.25.137.192/26
+ eca_mgmt_netmask: 255.255.255.192
+ eca_mgmt_start: 172.25.137.195
+ eca_mgmt_end: 172.25.137.254
+ security_group_name: mmsc_security_group_1
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/expectedOutput/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/expectedOutput/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..5aa6e2e213
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/expectedOutput/MainServiceTemplate.yaml
@@ -0,0 +1,4518 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.nems_be:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.lb:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.eca:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.arb:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.eca_trx:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.nems_fe:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.mmsc:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ lb_flavor_name:
+ label: Load balancer flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: the flavor name of MMSC load balancer instance
+ default: m1.xlarge
+ ha_net_local_ip2:
+ label: ha net network local ip2
+ hidden: false
+ immutable: false
+ type: string
+ description: the local ip2 of the ha network
+ default: 172.26.1.4
+ mmsc_dmz_protected_snat_ips:
+ label: mmsc dmz_protected snat ips
+ hidden: false
+ immutable: false
+ type: list
+ description: mmsc dmz_protected snat ips
+ default:
+ - 107.239.14.24
+ - 107.239.14.25
+ - 107.239.14.26
+ - 107.239.14.27
+ entry_schema:
+ type: string
+ ha_net_local_ip1:
+ label: ha net network local ip1
+ hidden: false
+ immutable: false
+ type: string
+ description: the local ip1 of the ha network
+ default: 172.26.1.3
+ mms_traffic_end:
+ label: mmsc traffic end IP
+ hidden: false
+ immutable: false
+ type: string
+ description: mmsc traffic end IP
+ default: 172.26.2.254
+ nems_traffic_end:
+ label: nems traffic end
+ hidden: false
+ immutable: false
+ type: string
+ description: nems traffic end
+ default: 172.26.3.254
+ mmsc_cinder_volume_size:
+ label: MMSC Cinder volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the MMSC Cinder volume
+ default: 480
+ nems_internal_cidr:
+ label: nems ineternal cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: nems internal cidr
+ default: 172.26.6.0/24
+ eca_mgmt_cidr:
+ label: eca management cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: eca management cidr
+ default: 172.25.137.192/26
+ nems_traffic_start:
+ label: nems traffic start
+ hidden: false
+ immutable: false
+ type: string
+ description: nems traffic start
+ default: 172.26.3.3
+ oam_volume_size:
+ label: volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the OAM volume
+ default: 1800
+ eca_trx_names:
+ label: ECA_TRX server names
+ hidden: false
+ immutable: false
+ type: list
+ description: ECA_TRX server names
+ default:
+ - ZRDM1MMSC03TRX001
+ - ZRDM1MMSC03TRX002
+ - ZRDM1MMSC03TRX003
+ - ZRDM1MMSC03TRX004
+ - ZRDM1MMSC03TRX005
+ - ZRDM1MMSC03TRX006
+ - ZRDM1MMSC03TRX007
+ - ZRDM1MMSC03TRX008
+ - ZRDM1MMSC03TRX009
+ - ZRDM1MMSC03TRX010
+ - ZRDM1MMSC03TRX011
+ - ZRDM1MMSC03TRX012
+ - ZRDM1MMSC03TRX013
+ - ZRDM1MMSC03TRX014
+ - ZRDM1MMSC03TRX015
+ - ZRDM1MMSC03TRX016
+ - ZRDM1MMSC03TRX017
+ - ZRDM1MMSC03TRX018
+ - ZRDM1MMSC03TRX019
+ - ZRDM1MMSC03TRX020
+ entry_schema:
+ type: string
+ nems_internal_name:
+ label: nems internal network name
+ hidden: false
+ immutable: false
+ type: string
+ description: nems internal network name
+ default: int_mms_nems_internal_net_2
+ nems_traffic_net_local_ip1:
+ label: nems traffic network local ip1
+ hidden: false
+ immutable: false
+ type: string
+ description: the local ip1 of the nems traffic network
+ default: 172.26.3.3
+ nems_traffic_net_local_ip2:
+ label: nems traffic network local ip2
+ hidden: false
+ immutable: false
+ type: string
+ description: the local ip2 of the nems traffic network
+ default: 172.26.3.4
+ nems_fe_names:
+ label: NEMS_FE server names
+ hidden: false
+ immutable: false
+ type: list
+ description: NEMS_FE server names
+ default:
+ - ZRDM1MMSC03NFE001
+ - ZRDM1MMSC03NFE002
+ entry_schema:
+ type: string
+ eca_names:
+ label: oam servers names
+ hidden: false
+ immutable: false
+ type: list
+ description: the names of the OAM1,OAM2 VM instances
+ default:
+ - ZRDM1MMSC02OAM001
+ - ZRDM1MMSC02OAM002
+ entry_schema:
+ type: string
+ nems_be_nems_imap_net_ips:
+ label: nems imap_net IPs for NEMS_BE
+ hidden: false
+ immutable: false
+ type: string
+ description: nems imap net IPs for NEMS_BE
+ default: 172.26.7.13
+ nems_be_names:
+ label: NEMS_BE server names
+ hidden: false
+ immutable: false
+ type: string
+ description: NEMS_BE server names
+ default: ZRDM1MMSC03NBE001
+ nems_traffic_netmask:
+ label: NEMS traffic network subnet mask
+ hidden: false
+ immutable: false
+ type: string
+ description: NEMS traffic network subnet mask
+ default: 255.255.255.0
+ nems_fe_nems_imap_net_ips:
+ label: nems_imap_net IPs for NEMS_FE
+ hidden: false
+ immutable: false
+ type: list
+ description: nems_imap_net IPs for NEMS_FE
+ default:
+ - 172.26.7.11
+ - 172.26.7.12
+ entry_schema:
+ type: string
+ nems_fe_nems_user_web_net_ips:
+ label: nems_web_user_net IPs for NEMS_FE
+ hidden: false
+ immutable: false
+ type: list
+ description: nems_web_user_net IPs for NEMS_FE
+ default:
+ - 172.26.4.11
+ - 172.26.4.12
+ entry_schema:
+ type: string
+ nems_user_web_gateway:
+ label: NEMS user web network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: NEMS user web network gateway
+ default: 172.26.4.1
+ nems_imap_end:
+ label: nems imap end
+ hidden: false
+ immutable: false
+ type: string
+ description: nems imap end
+ default: 172.26.7.254
+ eca_traffic_net_local_ip1:
+ label: eca traffic network local ip1
+ hidden: false
+ immutable: false
+ type: string
+ description: the local ip1 of the eca traffic network
+ default: 172.26.5.3
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ default: cmaui-5.0.2.5_v25
+ eca_traffic_net_local_ip2:
+ label: eca traffic network local ip2
+ hidden: false
+ immutable: false
+ type: string
+ description: the local ip2 of the eca traffic network
+ default: 172.26.5.4
+ nems_volume_size:
+ label: nems fe volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: nems fe volume size
+ default: 50
+ mms_traffic_start:
+ label: mmsc traffic start IP
+ hidden: false
+ immutable: false
+ type: string
+ description: mmsc traffic start IP
+ default: 172.26.2.3
+ ha_net_start:
+ label: ha net start
+ hidden: false
+ immutable: false
+ type: string
+ description: ha net start
+ default: 172.26.1.3
+ nems_imap_gateway:
+ label: nems imap gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: nems imap gateway
+ default: 172.26.7.1
+ mmsc_core_virtual_server_ips:
+ label: mmsc core virtual server ips
+ hidden: false
+ immutable: false
+ type: list
+ description: mmsc core virtual server ips
+ default:
+ - 172.31.10.21
+ - 172.31.10.22
+ entry_schema:
+ type: string
+ cmaui_oam_ips:
+ label: CMAUI oam_net IP addresses
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI oam_net IP addresses
+ default:
+ - 107.250.172.42
+ - 107.250.172.43
+ entry_schema:
+ type: string
+ CMAUI_volume_type:
+ label: CMAUI vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ default: Platinum
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ default:
+ - ZRDM1MMSC02CMI001
+ - ZRDM1MMSC02CMI002
+ entry_schema:
+ type: string
+ eca_trx_eca_traffic_net_ips:
+ label: eca traffic net IPs for ECA_TRX
+ hidden: false
+ immutable: false
+ type: list
+ description: eca traffic net IPs for ECA_TRX
+ default:
+ - 172.26.5.11
+ - 172.26.5.12
+ - 172.26.5.13
+ - 172.26.5.14
+ - 172.26.5.15
+ - 172.26.5.16
+ - 172.26.5.17
+ - 172.26.5.18
+ - 172.26.5.19
+ - 172.26.5.20
+ - 172.26.5.21
+ - 172.26.5.22
+ - 172.26.5.23
+ - 172.26.5.24
+ - 172.26.5.25
+ - 172.26.5.26
+ - 172.26.5.27
+ - 172.26.5.28
+ - 172.26.5.29
+ - 172.26.5.30
+ entry_schema:
+ type: string
+ eca_trx_image:
+ label: Image for ECA TRX server
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for ECA TRX server
+ default: ECABASE
+ lb_names:
+ label: MMSC load balancer instance names
+ hidden: false
+ immutable: false
+ type: list
+ description: MMSC load balancer instance names
+ default:
+ - ZRDM1MMSC03ALB001
+ - ZRDM1MMSC03ALB002
+ entry_schema:
+ type: string
+ eca_mgmt_end:
+ label: eca management end
+ hidden: false
+ immutable: false
+ type: string
+ description: eca management end
+ default: 172.25.137.254
+ nems_user_web_end:
+ label: nems user web end
+ hidden: false
+ immutable: false
+ type: string
+ description: nems user web end
+ default: 172.26.4.254
+ ECA_OAM_volume_type:
+ label: eca oam vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ default: Platinum
+ arb_eca_mgmt_ips:
+ label: eca_mgmt network ips
+ hidden: false
+ immutable: false
+ type: list
+ description: internal eca_mgmt network ips for arb VM
+ default:
+ - 172.25.137.244
+ entry_schema:
+ type: string
+ eca_traffic_cidr:
+ label: eca traffic cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: eca traffic cidr
+ default: 172.26.5.0/24
+ ha_net_cidr:
+ label: ha net cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: ha net cidr
+ default: 172.26.1.0/24
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ default: nova
+ ARB_volume_type:
+ label: arb vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ default: Platinum
+ nems_fe_nems_internal_net_ips:
+ label: nems_internal_net IPs for NEMS_FE
+ hidden: false
+ immutable: false
+ type: list
+ description: nems_internal_net IPs for NEMS_FE
+ default:
+ - 172.26.6.11
+ - 172.26.6.12
+ entry_schema:
+ type: string
+ NEMS_FE_volume_type:
+ label: nems fe vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ default: Platinum
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ default: mmsc_security_group_1
+ nems_fe_nems_traffic_net_ips:
+ label: nems_traffic_net IPs for NEMS_FE
+ hidden: false
+ immutable: false
+ type: list
+ description: nems_traffic_net IPs for NEMS_FE
+ default:
+ - 172.26.3.11
+ - 172.26.3.12
+ entry_schema:
+ type: string
+ nems_imap_start:
+ label: nems imap start
+ hidden: false
+ immutable: false
+ type: string
+ description: nems imap start
+ default: 172.26.7.3
+ ha_net_name:
+ label: ha_failover network name
+ hidden: false
+ immutable: false
+ type: string
+ description: ha_failover network name
+ default: int_mms_ha_net_2
+ arb_names:
+ label: arbiter server names
+ hidden: false
+ immutable: false
+ type: list
+ description: the names of the arbiter VM instances
+ default:
+ - ZRDM1MMSC02ARB001
+ entry_schema:
+ type: string
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ default: m1.large
+ eca_oam_gateway:
+ label: oam1 oam gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: the ip of oam gateway
+ default: 107.250.172.1
+ eca_traffic_start:
+ label: eca traffic start
+ hidden: false
+ immutable: false
+ type: string
+ description: eca traffic start
+ default: 172.26.5.3
+ NEMS_BE_volume_type:
+ label: nems be vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ default: Platinum
+ lb_image_name:
+ label: MMSC load balancer image name
+ hidden: false
+ immutable: false
+ type: string
+ description: MMSC load balancer image name
+ default: BIGIP-11.5.3.0.0.163
+ nems_internal_start:
+ label: nems internal start
+ hidden: false
+ immutable: false
+ type: string
+ description: nems internal start
+ default: 172.26.6.3
+ nems_internal_gateway:
+ label: nems internal gw
+ hidden: false
+ immutable: false
+ type: string
+ description: nems internal gw
+ default: 172.26.6.1
+ arb_oam_ips:
+ label: oam network ips for arb VM
+ hidden: false
+ immutable: false
+ type: list
+ description: oam network ips for eca VM
+ default:
+ - 107.250.172.46
+ entry_schema:
+ type: string
+ dmz_protected_net_name:
+ label: UID of dmz_protected network
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of dmz_protected network
+ default: dmz_protected_net_0
+ nems_be_volume_size:
+ label: nems be volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: nems be volume size
+ default: 610
+ mms_traffic_netmask:
+ label: MMS traffic network subnet mask
+ hidden: false
+ immutable: false
+ type: string
+ description: MMS traffic network subnet mask
+ default: 255.255.255.0
+ nems_be_image:
+ label: Image for NEMS BE server
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for NEMS BE server
+ default: nems-2.1.2_v29
+ nems_user_web_net_local_ip1:
+ label: nems user web network local ip1
+ hidden: false
+ immutable: false
+ type: string
+ description: the local ip1 of the nems user web network
+ default: 172.26.4.3
+ eca_trx_mgmt_ips:
+ label: eca mgmt net IP for ECA_TRX
+ hidden: false
+ immutable: false
+ type: list
+ description: eca mgmt net IP for ECA_TRX
+ default:
+ - 172.25.137.202
+ - 172.25.137.203
+ - 172.25.137.204
+ - 172.25.137.205
+ - 172.25.137.206
+ - 172.25.137.207
+ - 172.25.137.208
+ - 172.25.137.209
+ - 172.25.137.210
+ - 172.25.137.211
+ - 172.25.137.212
+ - 172.25.137.213
+ - 172.25.137.214
+ - 172.25.137.215
+ - 172.25.137.216
+ - 172.25.137.217
+ - 172.25.137.218
+ - 172.25.137.219
+ - 172.25.137.220
+ - 172.25.137.221
+ entry_schema:
+ type: string
+ nems_user_web_cidr:
+ label: nems user web cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: nems user web cidr
+ default: 172.26.4.0/24
+ nems_user_web_net_local_ip2:
+ label: nems user web network local ip2
+ hidden: false
+ immutable: false
+ type: string
+ description: the local ip2 of the nems user web network
+ default: 172.26.4.4
+ nems_traffic_gateway:
+ label: NEMS traffic network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: NEMS traffic network gateway
+ default: 172.26.3.1
+ nems_imap_name:
+ label: nems imap name
+ hidden: false
+ immutable: false
+ type: string
+ description: nems imap name
+ default: int_mms_nems_imap_net_2
+ mms_traffic_net_floating_ip:
+ label: mmsc traffic floating ip
+ hidden: false
+ immutable: false
+ type: string
+ description: mmsc traffic floating ip
+ default: 172.26.2.5
+ nems_internal_netmask:
+ label: NEMS internal network subnet mask
+ hidden: false
+ immutable: false
+ type: string
+ description: NEMS internal network subnet mask
+ default: 255.255.255.0
+ nems_user_web_netmask:
+ label: NEMS user web network subnet mask
+ hidden: false
+ immutable: false
+ type: string
+ description: NEMS user web network subnet mask
+ default: 255.255.255.0
+ mms_traffic_net_local_ip1:
+ label: mmsc traffic network local ip1
+ hidden: false
+ immutable: false
+ type: string
+ description: the local ip1 of the mmsc traffic network
+ default: 172.26.2.3
+ mms_traffic_net_local_ip2:
+ label: mmsc traffic network local ip2
+ hidden: false
+ immutable: false
+ type: string
+ description: the local ip2 of the mmsc traffic network
+ default: 172.26.2.4
+ oam_image_name:
+ label: image name
+ hidden: false
+ immutable: false
+ type: string
+ description: the OAM image name
+ default: ECABASE
+ oam_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ default: oam_protected_net_0
+ external_ntp:
+ label: ntp server
+ hidden: false
+ immutable: false
+ type: string
+ description: ntp server
+ default: 155.165.194.100
+ mms_traffic_net_cidr:
+ label: MMS traffic network address (CIDR notation)
+ hidden: false
+ immutable: false
+ type: string
+ description: MMS traffic network address (CIDR notation)
+ default: 172.26.2.0/24
+ lb_dmz_protected_ips:
+ label: dmz protected network local ips for lb VM
+ hidden: false
+ immutable: false
+ type: list
+ description: local ips of the dmz protected network for lb VM
+ default:
+ - 107.239.14.19
+ - 107.239.14.20
+ entry_schema:
+ type: string
+ eca_mgmt_start:
+ label: eca management start
+ hidden: false
+ immutable: false
+ type: string
+ description: eca management start
+ default: 172.25.137.195
+ eca_oam_ips:
+ label: oam network ips
+ hidden: false
+ immutable: false
+ type: list
+ description: the ips of oam networks for eca VM
+ default:
+ - 107.250.172.44
+ - 107.250.172.45
+ entry_schema:
+ type: string
+ MMSC_volume_type:
+ label: MMSC vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ default: Platinum
+ nems_fe_flavor:
+ label: Flavor for NEMS FE server
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for NEMS FE server
+ default: m1.large2
+ eca_mgmt_netmask:
+ label: ECA mgmt network subnet mask
+ hidden: false
+ immutable: false
+ type: string
+ description: ECA mgmt network subnet mask
+ default: 255.255.255.192
+ oam_network_netmask:
+ label: oam network netmask
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ default: 255.255.255.192
+ oam_network_route_1:
+ label: oam network route 1
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network route 1
+ default: 155.165.201.250/32,107.250.172.1
+ oam_network_route_2:
+ label: oam network route 2
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network route 2
+ default: 155.165.194.100/32,107.250.172.1
+ mms_traffic_net_name:
+ label: Name of MMS traffic network
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of MMS traffic network
+ default: int_mms_mms_traffic_net_2
+ nems_user_web_name:
+ label: nems user web name
+ hidden: false
+ immutable: false
+ type: string
+ description: nems user web name
+ default: int_mms_nems_web_net_2
+ eca_traffic_net_floating_ip:
+ label: eca traffic floating ip
+ hidden: false
+ immutable: false
+ type: string
+ description: eca traffic floating ip
+ default: 172.26.5.5
+ eca_traffic_end:
+ label: eca traffic end
+ hidden: false
+ immutable: false
+ type: string
+ description: eca traffic end
+ default: 172.26.5.254
+ eca_trx_flavor:
+ label: Flavor for ECA TRX server
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for ECA TRX server
+ default: m1.xlarge
+ lb_oam_ips:
+ label: management network ips for mmsc lb
+ hidden: false
+ immutable: false
+ type: list
+ description: the ips of the management network for mmsc lb
+ default:
+ - 107.250.172.50
+ - 107.250.172.51
+ entry_schema:
+ type: string
+ nems_fe_oam_ips:
+ label: OAM_net IP for NEMS_FE
+ hidden: false
+ immutable: false
+ type: list
+ description: OAM_net IP for NEMS_FE
+ default:
+ - 107.250.172.64
+ - 107.250.172.65
+ entry_schema:
+ type: string
+ nems_be_flavor:
+ label: Flavor for NEMS BE server
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for NEMS BE server
+ default: m1.large2
+ lb_cor_direct_ips:
+ label: cor direct network local ips for lb VM
+ hidden: false
+ immutable: false
+ type: list
+ description: local ips of cor direct network for lb VM
+ default:
+ - 172.31.10.19
+ - 172.31.10.20
+ entry_schema:
+ type: string
+ nems_traffic_name:
+ label: nems traffic name
+ hidden: false
+ immutable: false
+ type: string
+ description: nems traffic name
+ default: int_mms_nems_traffic_net_2
+ timezone:
+ label: timezone
+ hidden: false
+ immutable: false
+ type: string
+ description: timezone
+ default: UTC
+ oam_flavor:
+ label: flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM flavor name
+ default: lc.xlarge4
+ cmaui_cinder_volume_size:
+ label: CMAUI Cinder volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the CMAUI Cinder volume
+ default: 55
+ nems_user_web_start:
+ label: nems user web start
+ hidden: false
+ immutable: false
+ type: string
+ description: nems user web end
+ default: 172.26.4.3
+ eca_eca_mgmt_ips:
+ label: eca_mgmt network ips for eca VM
+ hidden: false
+ immutable: false
+ type: list
+ description: internal eca_mgmt network ips for eca VM
+ default:
+ - 172.25.137.242
+ - 172.25.137.243
+ entry_schema:
+ type: string
+ mmsc_names:
+ label: MMSC server names
+ hidden: false
+ immutable: false
+ type: list
+ description: MMSC server names
+ default:
+ - ZRDM1MMSC03MMS001
+ - ZRDM1MMSC03MMS002
+ - ZRDM1MMSC03MMS003
+ - ZRDM1MMSC03MMS004
+ - ZRDM1MMSC03MMS005
+ entry_schema:
+ type: string
+ eca_mgmt_net_name:
+ label: internal network name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the internal network
+ default: int_mms_eca_mgmt_net_1
+ eca_traffic_name:
+ label: eca traffic name
+ hidden: false
+ immutable: false
+ type: string
+ description: eca traffic name
+ default: int_mms_eca_traffic_net_2
+ nems_internal_end:
+ label: nems internal end
+ hidden: false
+ immutable: false
+ type: string
+ description: nems internal end
+ default: 172.26.6.254
+ nems_be_nems_internal_net_ips:
+ label: nems internal net IPs for NEMS_BE
+ hidden: false
+ immutable: false
+ type: string
+ description: nems internal net IPs for NEMS_BE
+ default: 172.26.6.13
+ arb_volume_size:
+ label: volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the ARB volume
+ default: 40
+ mmsc_dmz_protected_virtual_server_ips:
+ label: mmsc dmz_protected virtual server ips
+ hidden: false
+ immutable: false
+ type: list
+ description: mmsc dmz_protected virtual server ips
+ default:
+ - 107.239.14.21
+ - 107.239.14.22
+ - 107.239.14.23
+ entry_schema:
+ type: string
+ cor_direct_net_name:
+ label: cor direct net UID
+ hidden: false
+ immutable: false
+ type: string
+ description: cor direct net
+ default: cor_direct_net_0
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ oam_network_gateway:
+ label: oam network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ default: 10.20.30.1
+ mmsc_flavor:
+ label: Flavor for MMSC server
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for MMSC server
+ default: lc.4xlarge4
+ ha_net_end:
+ label: ha net end
+ hidden: false
+ immutable: false
+ type: string
+ description: ha net end
+ default: 172.26.1.254
+ nems_imap_netmask:
+ label: nems imap subnet mask
+ hidden: false
+ immutable: false
+ type: string
+ description: nems imap subnet mask
+ default: 255.255.255.0
+ external_dns:
+ label: dns server
+ hidden: false
+ immutable: false
+ type: string
+ description: dns server
+ default: 155.165.201.250
+ swift_eca_url:
+ label: Swift URL
+ hidden: false
+ immutable: false
+ type: string
+ description: Base URL for eca swift object store
+ default: http://object-store.rdm2.cci.com:8080/v1/AUTH_1bbab536a19b4756926e7d0ec1eb543c/eca
+ eca_traffic_net_gateway:
+ label: eca_traffic network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: eca_traffic network gateway
+ default: 172.26.5.1
+ nems_be_oam_ips:
+ label: OAM net IPs for NEMS_BE
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM net IPs for NEMS_BE
+ default: 107.250.172.66
+ eca_trx_oam_ips:
+ label: OAM net IP for ECA_TRX
+ hidden: false
+ immutable: false
+ type: list
+ description: OAM net IP for ECA_TRX
+ default:
+ - 107.250.172.70
+ - 107.250.172.71
+ - 107.250.172.72
+ - 107.250.172.73
+ - 107.250.172.74
+ - 107.250.172.75
+ - 107.250.172.76
+ - 107.250.172.77
+ - 107.250.172.78
+ - 107.250.172.79
+ - 107.250.172.80
+ - 107.250.172.81
+ - 107.250.172.82
+ - 107.250.172.83
+ - 107.250.172.84
+ - 107.250.172.85
+ - 107.250.172.86
+ - 107.250.172.87
+ - 107.250.172.88
+ - 107.250.172.89
+ entry_schema:
+ type: string
+ mmsc_image:
+ label: Image for MMSC server
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for MMSC server
+ default: mmsc-6.0.2_v5
+ arbiter_flavor:
+ label: flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: arbiter flavor name
+ default: m1.large2
+ nems_imap_cidr:
+ label: nems imap cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: nems imap cidr
+ default: 172.26.7.0/24
+ eca_traffic_netmask:
+ label: ECA traffic network subnet mask
+ hidden: false
+ immutable: false
+ type: string
+ description: ECA traffic network subnet mask
+ default: 255.255.255.0
+ nems_fe_node_roles:
+ label: nems fe node roles
+ hidden: false
+ immutable: false
+ type: list
+ description: nems fe node roles
+ default:
+ - FE0
+ - FE1
+ entry_schema:
+ type: string
+ mmsc_mms_traffic_net_ips:
+ label: MMSC mms_traffic_net IP addresses
+ hidden: false
+ immutable: false
+ type: list
+ description: MMSC mms_traffic_net IP addresses
+ default:
+ - 172.26.2.11
+ - 172.26.2.12
+ - 172.26.2.13
+ - 172.26.2.14
+ - 172.26.2.15
+ entry_schema:
+ type: string
+ nems_traffic_net_floating_ip:
+ label: nems traffic floating ip
+ hidden: false
+ immutable: false
+ type: string
+ description: nems traffic floating ip
+ default: 172.26.3.5
+ mms_traffic_net_gateway:
+ label: MMS traffic network gateway address
+ hidden: false
+ immutable: false
+ type: string
+ description: MMS traffic network gateway address
+ default: 172.26.2.1
+ nems_fe_image:
+ label: Image for NEMS FE server
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for NEMS FE server
+ default: nems-2.1.2_v29
+ mmsc_oam_ips:
+ label: MMSC oam_net IP addresses
+ hidden: false
+ immutable: false
+ type: list
+ description: MMSC oam_net IP addresses
+ default:
+ - 107.250.172.54
+ - 107.250.172.55
+ - 107.250.172.56
+ - 107.250.172.57
+ - 107.250.172.58
+ entry_schema:
+ type: string
+ eca_mgmt_name:
+ label: eca management name
+ hidden: false
+ immutable: false
+ type: string
+ description: eca management name
+ default: int_eca_mgmt_net_1
+ nems_traffic_cidr:
+ label: nems traffic cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: nems traffic cidr
+ default: 172.26.3.0/24
+ nems_be_node_roles:
+ label: nems node roles
+ hidden: false
+ immutable: false
+ type: string
+ description: nems node roles
+ default: BE0
+ mmsc_core_snat_ips:
+ label: mmsc core snat ips
+ hidden: false
+ immutable: false
+ type: list
+ description: mmsc core snat ips
+ default:
+ - 172.31.10.23
+ - 172.31.10.24
+ - 172.31.10.25
+ - 172.31.10.26
+ - 172.31.10.27
+ entry_schema:
+ type: string
+ nems_user_web_net_floating_ip:
+ label: nems user web floating ip
+ hidden: false
+ immutable: false
+ type: string
+ description: nems user web floating ip
+ default: 172.26.4.5
+ node_templates:
+ server_eca_trx9:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 8
+ server_eca_trx8:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 7
+ server_eca_trx7:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 6
+ server_eca_trx6:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 5
+ arb_instance:
+ type: org.openecomp.resource.vfc.nodes.heat.arb
+ properties:
+ flavor:
+ get_input: arbiter_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: oam_image_name
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - arb_names
+ - 0
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: arb_volume
+ relationship: arb_volume_attachment
+ server_eca_trx5:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 4
+ nems_internal_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ network_name:
+ get_input: nems_internal_name
+ subnets:
+ nems_internal_network_ip_subnet:
+ name:
+ get_input: nems_internal_name
+ cidr:
+ get_input: nems_internal_cidr
+ allocation_pools:
+ - start:
+ get_input: nems_internal_start
+ end:
+ get_input: nems_internal_end
+ server_eca_trx4:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 3
+ server_eca_trx3:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 2
+ server_eca_trx2:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 1
+ lb1_mgmt_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - lb_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb1_instance
+ relationship: tosca.relationships.network.BindsTo
+ lb2_mms_traffic_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: mms_traffic_net_local_ip2
+ allowed_address_pairs:
+ - ip_address:
+ get_input: mms_traffic_net_floating_ip
+ network: mms_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: mms_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb2_instance
+ relationship: tosca.relationships.network.BindsTo
+ nems_fe1_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - nems_fe_nems_traffic_net_ips
+ - 0
+ network: nems_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_nems_fe1
+ relationship: tosca.relationships.network.BindsTo
+ nems_fe2_port_3:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - nems_fe_nems_internal_net_ips
+ - 1
+ network: nems_internal_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_internal_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_nems_fe2
+ relationship: tosca.relationships.network.BindsTo
+ server_eca_trx1:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 0
+ nems_fe1_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - nems_fe_nems_user_web_net_ips
+ - 0
+ network: nems_user_web_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_user_web_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_nems_fe1
+ relationship: tosca.relationships.network.BindsTo
+ nems_fe2_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - nems_fe_nems_user_web_net_ips
+ - 1
+ network: nems_user_web_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_user_web_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_nems_fe2
+ relationship: tosca.relationships.network.BindsTo
+ nems_fe2_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - nems_fe_nems_traffic_net_ips
+ - 1
+ network: nems_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_nems_fe2
+ relationship: tosca.relationships.network.BindsTo
+ nems_fe1_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - nems_fe_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_nems_fe1
+ relationship: tosca.relationships.network.BindsTo
+ nems_fe2_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - nems_fe_oam_ips
+ - 1
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_nems_fe2
+ relationship: tosca.relationships.network.BindsTo
+ nems_fe1_port_3:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - nems_fe_nems_internal_net_ips
+ - 0
+ network: nems_internal_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_internal_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_nems_fe1
+ relationship: tosca.relationships.network.BindsTo
+ nems_fe1_port_4:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - nems_fe_nems_imap_net_ips
+ - 0
+ network: nems_imap_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_imap_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_nems_fe1
+ relationship: tosca.relationships.network.BindsTo
+ nems_fe2_port_4:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - nems_fe_nems_imap_net_ips
+ - 1
+ network: nems_imap_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_imap_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_nems_fe2
+ relationship: tosca.relationships.network.BindsTo
+ mms_security_group:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules
+ properties:
+ name:
+ get_input: security_group_name
+ description: mmsc security group
+ rules:
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ mmsc4_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ volume_type:
+ get_input: MMSC_volume_type
+ size: '(get_input : mmsc_cinder_volume_size) * 1024'
+ lb2_eca_traffic_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: eca_traffic_net_local_ip2
+ allowed_address_pairs:
+ - ip_address:
+ get_input: eca_traffic_net_floating_ip
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb2_instance
+ relationship: tosca.relationships.network.BindsTo
+ lb2_ha_net_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: ha_net_local_ip2
+ network: ha_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: ha_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb2_instance
+ relationship: tosca.relationships.network.BindsTo
+ oam2_mgmt_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_oam_ips
+ - 1
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: oam2_instance
+ relationship: tosca.relationships.network.BindsTo
+ nems_user_web_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ network_name:
+ get_input: nems_user_web_name
+ subnets:
+ nems_user_web_network_ip_subnet:
+ name:
+ get_input: nems_user_web_name
+ cidr:
+ get_input: nems_user_web_cidr
+ allocation_pools:
+ - start:
+ get_input: nems_user_web_start
+ end:
+ get_input: nems_user_web_end
+ lb1_ha_net_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: ha_net_local_ip1
+ network: ha_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: ha_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb1_instance
+ relationship: tosca.relationships.network.BindsTo
+ mmsc2_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ volume_type:
+ get_input: MMSC_volume_type
+ size: '(get_input : mmsc_cinder_volume_size) * 1024'
+ 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'
+ nems_traffic_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ network_name:
+ get_input: nems_traffic_name
+ subnets:
+ nems_traffic_network_ip_subnet:
+ name:
+ get_input: nems_traffic_name
+ cidr:
+ get_input: nems_traffic_cidr
+ allocation_pools:
+ - start:
+ get_input: nems_traffic_start
+ end:
+ get_input: nems_traffic_end
+ eca_trx16_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 15
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx16
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx19_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 18
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx19
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx16_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 15
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx16
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx19_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 18
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx19
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx15_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 14
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx15
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx19_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 18
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx19
+ relationship: tosca.relationships.network.BindsTo
+ lb1_nems_traffic_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: nems_traffic_net_local_ip1
+ allowed_address_pairs:
+ - ip_address:
+ get_input: nems_traffic_net_floating_ip
+ network: nems_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb1_instance
+ relationship: tosca.relationships.network.BindsTo
+ oam2_instance:
+ type: org.openecomp.resource.vfc.nodes.heat.eca
+ properties:
+ flavor:
+ get_input: oam_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: oam_image_name
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_names
+ - 1
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: oam2_volume
+ relationship: oam2_volume_attachment
+ eca_trx11_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 10
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx11
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx11_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 10
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx11
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx12_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 11
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx12
+ relationship: tosca.relationships.network.BindsTo
+ arb_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ volume_type:
+ get_input: ARB_volume_type
+ size: '(get_input : arb_volume_size) * 1024'
+ eca_trx12_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 11
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx12
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx11_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 10
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx11
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx12_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 11
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx12
+ relationship: tosca.relationships.network.BindsTo
+ mmsc4_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - mmsc_oam_ips
+ - 3
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_mmsc4
+ relationship: tosca.relationships.network.BindsTo
+ cmaui1_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 1
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui1
+ relationship: tosca.relationships.network.BindsTo
+ mmsc3_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - mmsc_oam_ips
+ - 2
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_mmsc3
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx15_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 14
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx15
+ relationship: tosca.relationships.network.BindsTo
+ mmsc3_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - mmsc_mms_traffic_net_ips
+ - 2
+ network: mms_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: mms_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_mmsc3
+ relationship: tosca.relationships.network.BindsTo
+ mmsc4_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - mmsc_mms_traffic_net_ips
+ - 3
+ network: mms_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: mms_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_mmsc4
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx15_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 14
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx15
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx16_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 15
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx16
+ relationship: tosca.relationships.network.BindsTo
+ arb_mgmt_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - arb_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: arb_instance
+ relationship: tosca.relationships.network.BindsTo
+ lb2_mgmt_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - lb_oam_ips
+ - 1
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb2_instance
+ relationship: tosca.relationships.network.BindsTo
+ mmsc5_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ volume_type:
+ get_input: MMSC_volume_type
+ size: '(get_input : mmsc_cinder_volume_size) * 1024'
+ eca_trx7_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 6
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx7
+ relationship: tosca.relationships.network.BindsTo
+ oam1_mgmt_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: oam1_instance
+ relationship: tosca.relationships.network.BindsTo
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: cmaui_volume
+ relationship: cmaui_volume_attachment
+ eca_trx7_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 6
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx7
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx7_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 6
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx7
+ relationship: tosca.relationships.network.BindsTo
+ cmaui_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'
+ eca_trx3_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 2
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx3
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx3_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 2
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx3
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx3_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 2
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx3
+ relationship: tosca.relationships.network.BindsTo
+ mmsc1_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ volume_type:
+ get_input: MMSC_volume_type
+ size: '(get_input : mmsc_cinder_volume_size) * 1024'
+ nems_imap_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ network_name:
+ get_input: nems_imap_name
+ subnets:
+ nems_imap_network_ip_subnet:
+ name:
+ get_input: nems_imap_name
+ cidr:
+ get_input: nems_imap_cidr
+ allocation_pools:
+ - start:
+ get_input: nems_imap_start
+ end:
+ get_input: nems_imap_end
+ server_cmaui1:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - cmaui_names
+ - 1
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: cmaui1_volume
+ relationship: cmaui1_volume_attachment
+ lb2_dmz_protected_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - lb_dmz_protected_ips
+ - 1
+ allowed_address_pairs:
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_virtual_server_ips
+ - 0
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_virtual_server_ips
+ - 1
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_virtual_server_ips
+ - 2
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_snat_ips
+ - 0
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_snat_ips
+ - 1
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_snat_ips
+ - 2
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_snat_ips
+ - 3
+ network:
+ get_input: dmz_protected_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb2_instance
+ relationship: tosca.relationships.network.BindsTo
+ lb1_eca_traffic_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: eca_traffic_net_local_ip1
+ allowed_address_pairs:
+ - ip_address:
+ get_input: eca_traffic_net_floating_ip
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb1_instance
+ relationship: tosca.relationships.network.BindsTo
+ lb1_dmz_protected_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - lb_dmz_protected_ips
+ - 0
+ allowed_address_pairs:
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_virtual_server_ips
+ - 0
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_virtual_server_ips
+ - 1
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_virtual_server_ips
+ - 2
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_snat_ips
+ - 0
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_snat_ips
+ - 1
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_snat_ips
+ - 2
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_snat_ips
+ - 3
+ network:
+ get_input: dmz_protected_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb1_instance
+ relationship: tosca.relationships.network.BindsTo
+ lb1_mms_traffic_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: mms_traffic_net_local_ip1
+ allowed_address_pairs:
+ - ip_address:
+ get_input: mms_traffic_net_floating_ip
+ network: mms_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: mms_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb1_instance
+ relationship: tosca.relationships.network.BindsTo
+ eca_mgmt_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ network_name:
+ get_input: eca_mgmt_name
+ subnets:
+ eca_mgmt_network_ip_subnet:
+ name:
+ get_input: eca_mgmt_name
+ cidr:
+ get_input: eca_mgmt_cidr
+ allocation_pools:
+ - start:
+ get_input: eca_mgmt_start
+ end:
+ get_input: eca_mgmt_end
+ eca_trx1_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 0
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx1
+ relationship: tosca.relationships.network.BindsTo
+ nems2_fe_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ volume_type:
+ get_input: NEMS_FE_volume_type
+ size: '(get_input : nems_volume_size) * 1024'
+ server_nems_be1:
+ type: org.openecomp.resource.vfc.nodes.heat.nems_be
+ properties:
+ flavor:
+ get_input: nems_be_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: nems_be_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input: nems_be_names
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: nems_be_volume
+ relationship: nems_volume_attachment
+ server_nems_fe1:
+ type: org.openecomp.resource.vfc.nodes.heat.nems_fe
+ properties:
+ flavor:
+ get_input: nems_fe_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: nems_fe_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - nems_fe_names
+ - 0
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: nems1_fe_volume
+ relationship: nems1_fe_volume_attachment
+ oam2_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'
+ server_nems_fe2:
+ type: org.openecomp.resource.vfc.nodes.heat.nems_fe
+ properties:
+ flavor:
+ get_input: nems_fe_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: nems_fe_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - nems_fe_names
+ - 1
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: nems2_fe_volume
+ relationship: nems2_fe_volume_attachment
+ 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'
+ lb2_cor_direct_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - lb_cor_direct_ips
+ - 1
+ allowed_address_pairs:
+ - ip_address:
+ get_input:
+ - mmsc_core_virtual_server_ips
+ - 0
+ - ip_address:
+ get_input:
+ - mmsc_core_virtual_server_ips
+ - 1
+ - ip_address:
+ get_input:
+ - mmsc_core_snat_ips
+ - 0
+ - ip_address:
+ get_input:
+ - mmsc_core_snat_ips
+ - 1
+ - ip_address:
+ get_input:
+ - mmsc_core_snat_ips
+ - 2
+ - ip_address:
+ get_input:
+ - mmsc_core_snat_ips
+ - 3
+ - ip_address:
+ get_input:
+ - mmsc_core_snat_ips
+ - 4
+ network:
+ get_input: cor_direct_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb2_instance
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx20_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 19
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx20
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx20_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 19
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx20
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx20_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 19
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx20
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx8_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 7
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx8
+ relationship: tosca.relationships.network.BindsTo
+ oam1_int_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_eca_mgmt_ips
+ - 0
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: oam1_instance
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx6_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 5
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx6
+ relationship: tosca.relationships.network.BindsTo
+ lb2_nems_user_web_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: nems_user_web_net_local_ip2
+ allowed_address_pairs:
+ - ip_address:
+ get_input: nems_user_web_net_floating_ip
+ network: nems_user_web_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_user_web_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb2_instance
+ relationship: tosca.relationships.network.BindsTo
+ lb2_instance:
+ type: org.openecomp.resource.vfc.nodes.heat.lb
+ properties:
+ flavor:
+ get_input: lb_flavor_name
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: lb_image_name
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - lb_names
+ - 1
+ eca_trx6_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 5
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx6
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx8_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 7
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx8
+ relationship: tosca.relationships.network.BindsTo
+ lb1_nems_user_web_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: nems_user_web_net_local_ip1
+ allowed_address_pairs:
+ - ip_address:
+ get_input: nems_user_web_net_floating_ip
+ network: nems_user_web_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_user_web_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb1_instance
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx6_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 5
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx6
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx8_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 7
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx8
+ relationship: tosca.relationships.network.BindsTo
+ arb_int_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - arb_eca_mgmt_ips
+ - 0
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: arb_instance
+ relationship: tosca.relationships.network.BindsTo
+ ha_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ network_name:
+ get_input: ha_net_name
+ subnets:
+ ha_net_ip_subnet:
+ name:
+ get_input: ha_net_name
+ cidr:
+ get_input: ha_net_cidr
+ allocation_pools:
+ - start:
+ get_input: ha_net_start
+ end:
+ get_input: ha_net_end
+ server_mmsc1:
+ type: org.openecomp.resource.vfc.nodes.heat.mmsc
+ properties:
+ flavor:
+ get_input: mmsc_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: mmsc_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - mmsc_names
+ - 0
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: mmsc1_volume
+ relationship: mmsc1_volume_attachment
+ nems_be1_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: nems_be_oam_ips
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_nems_be1
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx2_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 1
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx2
+ relationship: tosca.relationships.network.BindsTo
+ server_mmsc2:
+ type: org.openecomp.resource.vfc.nodes.heat.mmsc
+ properties:
+ flavor:
+ get_input: mmsc_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: mmsc_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - mmsc_names
+ - 1
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: mmsc2_volume
+ relationship: mmsc2_volume_attachment
+ nems_be1_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: nems_be_nems_internal_net_ips
+ network: nems_internal_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_internal_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_nems_be1
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx2_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 1
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx2
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx4_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 3
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx4
+ relationship: tosca.relationships.network.BindsTo
+ server_mmsc3:
+ type: org.openecomp.resource.vfc.nodes.heat.mmsc
+ properties:
+ flavor:
+ get_input: mmsc_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: mmsc_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - mmsc_names
+ - 2
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: mmsc3_volume
+ relationship: mmsc3_volume_attachment
+ nems_be1_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: nems_be_nems_imap_net_ips
+ network: nems_imap_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_imap_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_nems_be1
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx2_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 1
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx2
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx4_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 3
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx4
+ relationship: tosca.relationships.network.BindsTo
+ server_eca_trx20:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 19
+ eca_trx4_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 3
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx4
+ relationship: tosca.relationships.network.BindsTo
+ nems_be_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ volume_type:
+ get_input: NEMS_BE_volume_type
+ size: '(get_input : nems_be_volume_size) * 1024'
+ server_mmsc4:
+ type: org.openecomp.resource.vfc.nodes.heat.mmsc
+ properties:
+ flavor:
+ get_input: mmsc_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: mmsc_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - mmsc_names
+ - 3
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: mmsc4_volume
+ relationship: mmsc4_volume_attachment
+ server_mmsc5:
+ type: org.openecomp.resource.vfc.nodes.heat.mmsc
+ properties:
+ flavor:
+ get_input: mmsc_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: mmsc_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - mmsc_names
+ - 4
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: mmsc5_volume
+ relationship: mmsc5_volume_attachment
+ oam2_int_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_eca_mgmt_ips
+ - 1
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: oam2_instance
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx17_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 16
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx17
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx18_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 17
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx18
+ relationship: tosca.relationships.network.BindsTo
+ lb1_cor_direct_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - lb_cor_direct_ips
+ - 0
+ allowed_address_pairs:
+ - ip_address:
+ get_input:
+ - mmsc_core_virtual_server_ips
+ - 0
+ - ip_address:
+ get_input:
+ - mmsc_core_virtual_server_ips
+ - 1
+ - ip_address:
+ get_input:
+ - mmsc_core_snat_ips
+ - 0
+ - ip_address:
+ get_input:
+ - mmsc_core_snat_ips
+ - 1
+ - ip_address:
+ get_input:
+ - mmsc_core_snat_ips
+ - 2
+ - ip_address:
+ get_input:
+ - mmsc_core_snat_ips
+ - 3
+ - ip_address:
+ get_input:
+ - mmsc_core_snat_ips
+ - 4
+ network:
+ get_input: cor_direct_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb1_instance
+ relationship: tosca.relationships.network.BindsTo
+ mmsc1_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - mmsc_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_mmsc1
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx17_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 16
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx17
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx18_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 17
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx18
+ relationship: tosca.relationships.network.BindsTo
+ mmsc1_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - mmsc_mms_traffic_net_ips
+ - 0
+ network: mms_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: mms_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_mmsc1
+ relationship: tosca.relationships.network.BindsTo
+ mmsc2_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - mmsc_mms_traffic_net_ips
+ - 1
+ network: mms_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: mms_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_mmsc2
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx17_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 16
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx17
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx18_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 17
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx18
+ relationship: tosca.relationships.network.BindsTo
+ mms_traffic_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ network_name:
+ get_input: mms_traffic_net_name
+ subnets:
+ mms_traffic_ip_subnet:
+ name:
+ get_input: mms_traffic_net_name
+ cidr:
+ get_input: mms_traffic_net_cidr
+ allocation_pools:
+ - start:
+ get_input: mms_traffic_start
+ end:
+ get_input: mms_traffic_end
+ cmaui_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx10_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 9
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx10
+ relationship: tosca.relationships.network.BindsTo
+ server_eca_trx13:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 12
+ lb1_instance:
+ type: org.openecomp.resource.vfc.nodes.heat.lb
+ properties:
+ flavor:
+ get_input: lb_flavor_name
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: lb_image_name
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - lb_names
+ - 0
+ eca_trx10_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 9
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx10
+ relationship: tosca.relationships.network.BindsTo
+ server_eca_trx14:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 13
+ server_eca_trx15:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 14
+ nems1_fe_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ volume_type:
+ get_input: NEMS_FE_volume_type
+ size: '(get_input : nems_volume_size) * 1024'
+ eca_trx10_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 9
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx10
+ relationship: tosca.relationships.network.BindsTo
+ server_eca_trx16:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 15
+ server_eca_trx10:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 9
+ server_eca_trx11:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 10
+ server_eca_trx12:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 11
+ eca_trx14_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 13
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx14
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx13_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 12
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx13
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx14_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 13
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx14
+ relationship: tosca.relationships.network.BindsTo
+ mmsc5_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - mmsc_mms_traffic_net_ips
+ - 4
+ network: mms_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: mms_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_mmsc5
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx13_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 12
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx13
+ relationship: tosca.relationships.network.BindsTo
+ mmsc5_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - mmsc_oam_ips
+ - 4
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_mmsc5
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx13_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 12
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx13
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx14_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 13
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx14
+ relationship: tosca.relationships.network.BindsTo
+ mmsc2_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - mmsc_oam_ips
+ - 1
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_mmsc2
+ relationship: tosca.relationships.network.BindsTo
+ server_eca_trx17:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 16
+ server_eca_trx18:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 17
+ server_eca_trx19:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 18
+ eca_trx9_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 8
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx9
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx9_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 8
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx9
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx9_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 8
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx9
+ relationship: tosca.relationships.network.BindsTo
+ lb2_nems_traffic_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: nems_traffic_net_local_ip2
+ allowed_address_pairs:
+ - ip_address:
+ get_input: nems_traffic_net_floating_ip
+ network: nems_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb2_instance
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx5_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 4
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx5
+ relationship: tosca.relationships.network.BindsTo
+ eca_traffic_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ network_name:
+ get_input: eca_traffic_name
+ subnets:
+ eca_traffic_ip_subnet:
+ name:
+ get_input: eca_traffic_name
+ cidr:
+ get_input: eca_traffic_cidr
+ allocation_pools:
+ - start:
+ get_input: eca_traffic_start
+ end:
+ get_input: eca_traffic_end
+ eca_trx1_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 0
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx1
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx5_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 4
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx5
+ relationship: tosca.relationships.network.BindsTo
+ oam1_instance:
+ type: org.openecomp.resource.vfc.nodes.heat.eca
+ properties:
+ flavor:
+ get_input: oam_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: oam_image_name
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_names
+ - 0
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: oam1_volume
+ relationship: oam1_volume_attachment
+ eca_trx1_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx1
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx5_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 4
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx5
+ relationship: tosca.relationships.network.BindsTo
+ mmsc3_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ volume_type:
+ get_input: MMSC_volume_type
+ size: '(get_input : mmsc_cinder_volume_size) * 1024'
+ relationship_templates:
+ mmsc1_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: mmsc1_volume
+ instance_uuid: server_mmsc1
+ mmsc4_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: mmsc4_volume
+ instance_uuid: server_mmsc4
+ arb_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: arb_volume
+ instance_uuid: arb_instance
+ cmaui_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: cmaui_volume
+ instance_uuid: server_cmaui
+ nems1_fe_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: nems1_fe_volume
+ instance_uuid: server_nems_fe1
+ mmsc3_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: mmsc3_volume
+ instance_uuid: server_mmsc3
+ oam2_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: oam2_volume
+ instance_uuid: oam2_instance
+ cmaui1_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: cmaui1_volume
+ instance_uuid: server_cmaui1
+ nems_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: nems_be_volume
+ instance_uuid: server_nems_be1
+ oam1_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: oam1_volume
+ instance_uuid: oam1_instance
+ nems2_fe_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: nems2_fe_volume
+ instance_uuid: server_nems_fe2
+ mmsc5_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: mmsc5_volume
+ instance_uuid: server_mmsc5
+ mmsc2_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: mmsc2_volume
+ instance_uuid: server_mmsc2
+ groups:
+ MMSC_Capacity_Line:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/MMSC_Capacity_Line.yml
+ description: |
+ HOT template that creates internal networks, load balancers and servers for vMMSC capacity Line 1. #11/23: updated the network definition to meet the juniper best practices way of defining the gateway, DHCP enable for internal networks (L457-L547)
+ members:
+ - server_eca_trx9
+ - server_eca_trx8
+ - server_eca_trx7
+ - server_eca_trx6
+ - server_eca_trx5
+ - nems_internal_net
+ - server_eca_trx4
+ - server_eca_trx3
+ - server_eca_trx2
+ - lb1_mgmt_port
+ - lb2_mms_traffic_port
+ - nems_fe1_port_1
+ - nems_fe2_port_3
+ - server_eca_trx1
+ - nems_fe1_port_2
+ - nems_fe2_port_2
+ - nems_fe2_port_1
+ - nems_fe1_port_0
+ - nems_fe2_port_0
+ - nems_fe1_port_3
+ - nems_fe1_port_4
+ - nems_fe2_port_4
+ - mmsc4_volume
+ - lb2_eca_traffic_port
+ - lb2_ha_net_port
+ - nems_user_web_net
+ - lb1_ha_net_port
+ - mmsc2_volume
+ - nems_traffic_net
+ - eca_trx16_port_0
+ - eca_trx19_port_2
+ - eca_trx16_port_1
+ - eca_trx19_port_1
+ - eca_trx15_port_0
+ - eca_trx19_port_0
+ - lb1_nems_traffic_port
+ - eca_trx11_port_1
+ - eca_trx11_port_2
+ - eca_trx12_port_2
+ - eca_trx12_port_1
+ - eca_trx11_port_0
+ - eca_trx12_port_0
+ - mmsc4_port_0
+ - mmsc3_port_0
+ - eca_trx15_port_2
+ - mmsc3_port_1
+ - mmsc4_port_1
+ - eca_trx15_port_1
+ - eca_trx16_port_2
+ - lb2_mgmt_port
+ - mmsc5_volume
+ - eca_trx7_port_2
+ - eca_trx7_port_0
+ - eca_trx7_port_1
+ - eca_trx3_port_1
+ - eca_trx3_port_0
+ - eca_trx3_port_2
+ - mmsc1_volume
+ - nems_imap_net
+ - lb2_dmz_protected_port
+ - lb1_eca_traffic_port
+ - lb1_dmz_protected_port
+ - lb1_mms_traffic_port
+ - eca_trx1_port_2
+ - nems2_fe_volume
+ - server_nems_be1
+ - server_nems_fe1
+ - server_nems_fe2
+ - lb2_cor_direct_port
+ - eca_trx20_port_0
+ - eca_trx20_port_2
+ - eca_trx20_port_1
+ - eca_trx8_port_0
+ - eca_trx6_port_0
+ - lb2_nems_user_web_port
+ - lb2_instance
+ - eca_trx6_port_2
+ - eca_trx8_port_2
+ - lb1_nems_user_web_port
+ - eca_trx6_port_1
+ - eca_trx8_port_1
+ - ha_net
+ - server_mmsc1
+ - nems_be1_port_0
+ - eca_trx2_port_0
+ - server_mmsc2
+ - nems_be1_port_1
+ - eca_trx2_port_1
+ - eca_trx4_port_1
+ - server_mmsc3
+ - nems_be1_port_2
+ - eca_trx2_port_2
+ - eca_trx4_port_2
+ - server_eca_trx20
+ - eca_trx4_port_0
+ - nems_be_volume
+ - server_mmsc4
+ - server_mmsc5
+ - eca_trx17_port_0
+ - eca_trx18_port_2
+ - lb1_cor_direct_port
+ - mmsc1_port_0
+ - eca_trx17_port_2
+ - eca_trx18_port_0
+ - mmsc1_port_1
+ - mmsc2_port_1
+ - eca_trx17_port_1
+ - eca_trx18_port_1
+ - mms_traffic_net
+ - eca_trx10_port_1
+ - server_eca_trx13
+ - lb1_instance
+ - eca_trx10_port_0
+ - server_eca_trx14
+ - server_eca_trx15
+ - nems1_fe_volume
+ - eca_trx10_port_2
+ - server_eca_trx16
+ - server_eca_trx10
+ - server_eca_trx11
+ - server_eca_trx12
+ - eca_trx14_port_1
+ - eca_trx13_port_0
+ - eca_trx14_port_0
+ - mmsc5_port_1
+ - eca_trx13_port_1
+ - mmsc5_port_0
+ - eca_trx13_port_2
+ - eca_trx14_port_2
+ - mmsc2_port_0
+ - server_eca_trx17
+ - server_eca_trx18
+ - server_eca_trx19
+ - eca_trx9_port_0
+ - eca_trx9_port_1
+ - eca_trx9_port_2
+ - lb2_nems_traffic_port
+ - eca_trx5_port_2
+ - eca_traffic_net
+ - eca_trx1_port_1
+ - eca_trx5_port_1
+ - eca_trx1_port_0
+ - eca_trx5_port_0
+ - mmsc3_volume
+ eca_oam:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/eca_oam.yaml
+ description: This stack creates two ECA OAM VM and one ARB VM
+ members:
+ - arb_mgmt_port
+ - oam2_mgmt_port
+ - arb_instance
+ - arb_volume
+ - oam1_instance
+ - oam2_volume
+ - oam1_volume
+ - oam1_int_port
+ - oam1_mgmt_port
+ - arb_int_port
+ - oam2_int_port
+ - oam2_instance
+ SG_ECA_MGMT:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/SG_ECA_MGMT.yaml
+ description: |
+ HOT template that creates Security Group and ECA network
+ members:
+ - mms_security_group
+ - eca_mgmt_net
+ cmaui:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/cmaui.yml
+ description: cmaui server template for vMMSC
+ members:
+ - server_cmaui1
+ - server_cmaui
+ - cmaui1_port_0
+ - cmaui_volume
+ - cmaui1_volume
+ - cmaui_port_0 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/MANIFEST.json
new file mode 100644
index 0000000000..167ae4e9d8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/MANIFEST.json
@@ -0,0 +1,37 @@
+{
+ "name": "multiple_not_nested",
+ "description": "multiple heat files in zip, no nesting",
+ "version": "2013-05-23",
+ "data": [{
+ "file": "cmaui.yml",
+ "type": "HEAT",
+ "data": [{
+ "file": "cmaui.env",
+ "type": "HEAT_ENV"
+ }]
+ },
+ {
+ "file": "eca_oam.yaml",
+ "type": "HEAT",
+ "data": [{
+ "file": "eca_oam.env",
+ "type": "HEAT_ENV"
+ }]
+ },
+ {
+ "file": "MMSC_Capacity_Line.yml",
+ "type": "HEAT",
+ "data": [{
+ "file": "MMSC_Capacity_Line_1.env",
+ "type": "HEAT_ENV"
+ }]
+ },
+ {
+ "file": "SG_ECA_MGMT.yaml",
+ "type": "HEAT",
+ "data": [{
+ "file": "sg_eca_mgmt.env",
+ "type": "HEAT_ENV"
+ }]
+ }]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/MMSC_Capacity_Line.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/MMSC_Capacity_Line.yml
new file mode 100644
index 0000000000..9e36eb9cd4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/MMSC_Capacity_Line.yml
@@ -0,0 +1,3219 @@
+heat_template_version: 2013-05-23
+
+description: >
+ HOT template that creates internal networks, load balancers and servers for vMMSC capacity Line 1.
+ #11/23: updated the network definition to meet the juniper best practices way of defining the gateway, DHCP enable for internal networks (L457-L547)
+
+parameters:
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_the_MMSC_id
+ oam_net_name:
+ type: string
+ label: UID of OAM network
+ description: UID of OAM network
+ oam_network_netmask:
+ type: string
+ label: oam network netmask
+ description: oam network gateway
+ oam_network_gateway:
+ type: string
+ label: oam network gateway
+ description: oam network gateway
+ oam_network_route_1:
+ type: string
+ label: oam network route 1
+ description: oam network route 1
+ oam_network_route_2:
+ type: string
+ label: oam network route 2
+ description: oam network route 2
+ external_dns:
+ type: string
+ label: dns server
+ description: dns server for MMSC
+ external_ntp:
+ type: string
+ label: ntp server
+ description: ntp server for MMSC
+ lb_oam_ips:
+ type: comma_delimited_list
+ label: management network ips for mmsc lb
+ description: the ips of the management network for mmsc lb
+ dmz_protected_net_name:
+ type: string
+ label: UID of dmz_protected network
+ description: UID of dmz_protected network
+ lb_dmz_protected_ips:
+ type: comma_delimited_list
+ label: dmz protected network local ips for lb VM
+ description: local ips of the dmz protected network for lb VM
+ cor_direct_net_name:
+ type: string
+ label: cor direct net UID
+ description: cor direct net
+ lb_cor_direct_ips:
+ type: comma_delimited_list
+ label: cor direct network local ips for lb VM
+ description: local ips of cor direct network for lb VM
+ mms_traffic_net_name:
+ type: string
+ label: Name of MMS traffic network
+ description: Name of MMS traffic network
+ mms_traffic_net_cidr:
+ type: string
+ label: MMS traffic network address (CIDR notation)
+ description: MMS traffic network address (CIDR notation)
+ mms_traffic_netmask:
+ type: string
+ label: MMS traffic network subnet mask
+ description: MMS traffic network subnet mask
+ mms_traffic_net_gateway:
+ type: string
+ label: MMS traffic network gateway address
+ description: MMS traffic network gateway address
+ mms_traffic_start:
+ type: string
+ label: mmsc traffic start IP
+ description: mmsc traffic start IP
+ mms_traffic_end:
+ type: string
+ label: mmsc traffic end IP
+ description: mmsc traffic end IP
+ mms_traffic_net_local_ip1:
+ type: string
+ label: mmsc traffic network local ip1
+ description: the local ip1 of the mmsc traffic network
+ mms_traffic_net_local_ip2:
+ type: string
+ label: mmsc traffic network local ip2
+ description: the local ip2 of the mmsc traffic network
+ mms_traffic_net_floating_ip:
+ type: string
+ label: mmsc traffic floating ip
+ description: mmsc traffic floating ip
+ nems_internal_name:
+ type: string
+ label: nems internal network name
+ description: nems internal network name
+ nems_internal_start:
+ type: string
+ label: nems internal start
+ description: nems internal start
+ nems_internal_end:
+ type: string
+ label: nems internal end
+ description: nems internal end
+ nems_internal_cidr:
+ type: string
+ label: nems ineternal cidr
+ description: nems internal cidr
+ nems_internal_netmask:
+ type: string
+ label: NEMS internal network subnet mask
+ description: NEMS internal network subnet mask
+ nems_internal_gateway:
+ type: string
+ label: nems internal gw
+ description: nems internal gw
+ nems_traffic_name:
+ type: string
+ label: nems traffic name
+ description: nems traffic name
+ nems_traffic_start:
+ type: string
+ label: nems traffic start
+ description: nems traffic start
+ nems_traffic_end:
+ type: string
+ label: nems traffic end
+ description: nems traffic end
+ nems_traffic_cidr:
+ type: string
+ label: nems traffic cidr
+ description: nems traffic cidr
+ nems_traffic_netmask:
+ type: string
+ label: NEMS traffic network subnet mask
+ description: NEMS traffic network subnet mask
+ nems_traffic_gateway:
+ type: string
+ label: NEMS traffic network gateway
+ description: NEMS traffic network gateway
+ nems_traffic_net_local_ip1:
+ type: string
+ label: nems traffic network local ip1
+ description: the local ip1 of the nems traffic network
+ nems_traffic_net_local_ip2:
+ type: string
+ label: nems traffic network local ip2
+ description: the local ip2 of the nems traffic network
+ nems_traffic_net_floating_ip:
+ type: string
+ label: nems traffic floating ip
+ description: nems traffic floating ip
+ nems_user_web_name:
+ type: string
+ label: nems user web name
+ description: nems user web name
+ nems_user_web_start:
+ type: string
+ label: nems user web start
+ description: nems user web end
+ nems_user_web_end:
+ type: string
+ label: nems user web end
+ description: nems user web end
+ nems_user_web_cidr:
+ type: string
+ label: nems user web cidr
+ description: nems user web cidr
+ nems_user_web_netmask:
+ type: string
+ label: NEMS user web network subnet mask
+ description: NEMS user web network subnet mask
+ nems_user_web_gateway:
+ type: string
+ label: NEMS user web network gateway
+ description: NEMS user web network gateway
+ nems_user_web_net_local_ip1:
+ type: string
+ label: nems user web network local ip1
+ description: the local ip1 of the nems user web network
+ nems_user_web_net_local_ip2:
+ type: string
+ label: nems user web network local ip2
+ description: the local ip2 of the nems user web network
+ nems_user_web_net_floating_ip:
+ type: string
+ label: nems user web floating ip
+ description: nems user web floating ip
+ nems_imap_name:
+ type: string
+ label: nems imap name
+ description: nems imap name
+ nems_imap_netmask:
+ type: string
+ label: nems imap subnet mask
+ description: nems imap subnet mask
+ nems_imap_start:
+ type: string
+ label: nems imap start
+ description: nems imap start
+ nems_imap_end:
+ type: string
+ label: nems imap end
+ description: nems imap end
+ nems_imap_cidr:
+ type: string
+ label: nems imap cidr
+ description: nems imap cidr
+ nems_imap_gateway:
+ type: string
+ label: nems imap gateway
+ description: nems imap gateway
+ eca_traffic_name:
+ type: string
+ label: eca traffic name
+ description: eca traffic name
+ eca_traffic_start:
+ type: string
+ label: eca traffic start
+ description: eca traffic start
+ eca_traffic_end:
+ type: string
+ label: eca traffic end
+ description: eca traffic end
+ eca_traffic_cidr:
+ type: string
+ label: eca traffic cidr
+ description: eca traffic cidr
+ eca_traffic_netmask:
+ type: string
+ label: ECA traffic network subnet mask
+ description: ECA traffic network subnet mask
+ eca_traffic_net_gateway:
+ type: string
+ label: eca_traffic network gateway
+ description: eca_traffic network gateway
+ eca_traffic_net_local_ip1:
+ type: string
+ label: eca traffic network local ip1
+ description: the local ip1 of the eca traffic network
+ eca_traffic_net_local_ip2:
+ type: string
+ label: eca traffic network local ip2
+ description: the local ip2 of the eca traffic network
+ eca_traffic_net_floating_ip:
+ type: string
+ label: eca traffic floating ip
+ description: eca traffic floating ip
+ ha_net_name:
+ type: string
+ label: ha_failover network name
+ description: ha_failover network name
+ ha_net_start:
+ type: string
+ label: ha net start
+ description: ha net start
+ ha_net_end:
+ type: string
+ label: ha net end
+ description: ha net end
+ ha_net_cidr:
+ type: string
+ label: ha net cidr
+ description: ha net cidr
+ ha_net_local_ip1:
+ type: string
+ label: ha net network local ip1
+ description: the local ip1 of the ha network
+ ha_net_local_ip2:
+ type: string
+ label: ha net network local ip2
+ description: the local ip2 of the ha network
+ lb_names:
+ type: comma_delimited_list
+ label: MMSC load balancer instance names
+ description: MMSC load balancer instance names
+ lb_image_name:
+ type: string
+ label: MMSC load balancer image name
+ description: MMSC load balancer image name
+ lb_flavor_name:
+ type: string
+ label: Load balancer flavor name
+ description: the flavor name of MMSC load balancer instance
+ availability_zone_0:
+ type: string
+ label: MMSC availabilityzone name
+ description: MMSC availabilityzone name
+ security_group_name:
+ type: string
+ label: MMSC security group name
+ description: MMSC security group name
+ mmsc_image:
+ type: string
+ label: Image for MMSC server
+ description: Image for MMSC server
+ mmsc_flavor:
+ type: string
+ label: Flavor for MMSC server
+ description: Flavor for MMSC server
+ mmsc_cinder_volume_size:
+ type: number
+ label: MMSC Cinder volume size
+ description: the size of the MMSC Cinder volume
+ nems_fe_image:
+ type: string
+ label: Image for NEMS FE server
+ description: Image for NEMS FE server
+ nems_fe_flavor:
+ type: string
+ label: Flavor for NEMS FE server
+ description: Flavor for NEMS FE server
+ nems_be_image:
+ type: string
+ label: Image for NEMS BE server
+ description: Image for NEMS BE server
+ nems_be_flavor:
+ type: string
+ label: Flavor for NEMS BE server
+ description: Flavor for NEMS BE server
+ eca_trx_image:
+ type: string
+ label: Image for ECA TRX server
+ description: Image for ECA TRX server
+ eca_trx_flavor:
+ type: string
+ label: Flavor for ECA TRX server
+ description: Flavor for ECA TRX server
+ mmsc_oam_ips:
+ type: comma_delimited_list
+ label: MMSC oam_net IP addresses
+ description: MMSC oam_net IP addresses
+ mmsc_mms_traffic_net_ips:
+ type: comma_delimited_list
+ label: MMSC mms_traffic_net IP addresses
+ description: MMSC mms_traffic_net IP addresses
+ nems_fe_names:
+ type: comma_delimited_list
+ label: NEMS_FE server names
+ description: NEMS_FE server names
+ nems_fe_node_roles:
+ type: comma_delimited_list
+ label: nems fe node roles
+ description: nems fe node roles
+ nems_fe_oam_ips:
+ type: comma_delimited_list
+ label: OAM_net IP for NEMS_FE
+ description: OAM_net IP for NEMS_FE
+ nems_fe_nems_traffic_net_ips:
+ type: comma_delimited_list
+ label: nems_traffic_net IPs for NEMS_FE
+ description: nems_traffic_net IPs for NEMS_FE
+ nems_fe_nems_user_web_net_ips:
+ type: comma_delimited_list
+ label: nems_web_user_net IPs for NEMS_FE
+ description: nems_web_user_net IPs for NEMS_FE
+ nems_fe_nems_internal_net_ips:
+ type: comma_delimited_list
+ label: nems_internal_net IPs for NEMS_FE
+ description: nems_internal_net IPs for NEMS_FE
+ nems_fe_nems_imap_net_ips:
+ type: comma_delimited_list
+ label: nems_imap_net IPs for NEMS_FE
+ description: nems_imap_net IPs for NEMS_FE
+ nems_be_names:
+ type: string
+ label: NEMS_BE server names
+ description: NEMS_BE server names
+ nems_be_node_roles:
+ type: string
+ label: nems node roles
+ description: nems node roles
+ nems_be_oam_ips:
+ type: string
+ label: OAM net IPs for NEMS_BE
+ description: OAM net IPs for NEMS_BE
+ nems_be_nems_internal_net_ips:
+ type: string
+ label: nems internal net IPs for NEMS_BE
+ description: nems internal net IPs for NEMS_BE
+ nems_be_nems_imap_net_ips:
+ type: string
+ label: nems imap_net IPs for NEMS_BE
+ description: nems imap net IPs for NEMS_BE
+ eca_trx_oam_ips:
+ type: comma_delimited_list
+ label: OAM net IP for ECA_TRX
+ description: OAM net IP for ECA_TRX
+ eca_trx_mgmt_ips:
+ type: comma_delimited_list
+ label: eca mgmt net IP for ECA_TRX
+ description: eca mgmt net IP for ECA_TRX
+ timezone:
+ type: string
+ label: timezone
+ description: timezone
+ eca_trx_names:
+ type: comma_delimited_list
+ label: ECA_TRX server names
+ description: ECA_TRX server names
+ eca_trx_eca_traffic_net_ips:
+ type: comma_delimited_list
+ label: eca traffic net IPs for ECA_TRX
+ description: eca traffic net IPs for ECA_TRX
+ mmsc_names:
+ type: comma_delimited_list
+ label: MMSC server names
+ description: MMSC server names
+ nems_volume_size:
+ type: number
+ label: nems fe volume size
+ description: nems fe volume size
+ nems_be_volume_size:
+ type: number
+ label: nems be volume size
+ description: nems be volume size
+ MMSC_volume_type:
+ type: string
+ label: MMSC vm volume type
+ description: the name of the target volume backend
+ NEMS_FE_volume_type:
+ type: string
+ label: nems fe vm volume type
+ description: the name of the target volume backend
+ NEMS_BE_volume_type:
+ type: string
+ label: nems be vm volume type
+ description: the name of the target volume backend
+ mmsc_core_virtual_server_ips:
+ type: comma_delimited_list
+ label: mmsc core virtual server ips
+ description: mmsc core virtual server ips
+ mmsc_core_snat_ips:
+ type: comma_delimited_list
+ label: mmsc core snat ips
+ description: mmsc core snat ips
+ mmsc_dmz_protected_virtual_server_ips:
+ type: comma_delimited_list
+ label: mmsc dmz_protected virtual server ips
+ description: mmsc dmz_protected virtual server ips
+ mmsc_dmz_protected_snat_ips:
+ type: comma_delimited_list
+ label: mmsc dmz_protected snat ips
+ description: mmsc dmz_protected snat ips
+ eca_mgmt_net_name:
+ type: string
+ label: eca management network ID
+ description: Network ID for eca management
+
+resources:
+ mms_traffic_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: mms_traffic_net_name }
+
+ mms_traffic_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: mms_traffic_net_name}
+ network_id: { get_resource: mms_traffic_net }
+ cidr: { get_param: mms_traffic_net_cidr }
+ allocation_pools: [{"start": {get_param: mms_traffic_start}, "end": {get_param: mms_traffic_end}}]
+
+ nems_internal_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: {get_param: nems_internal_name}
+
+ nems_internal_network_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: nems_internal_name}
+ allocation_pools: [{"start": {get_param: nems_internal_start}, "end": {get_param: nems_internal_end}}]
+ cidr: {get_param: nems_internal_cidr}
+ network_id: {get_resource: nems_internal_net}
+
+ nems_traffic_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: {get_param: nems_traffic_name}
+
+ nems_traffic_network_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: nems_traffic_name}
+ allocation_pools: [{"start": {get_param: nems_traffic_start}, "end": {get_param: nems_traffic_end}}]
+ cidr: {get_param: nems_traffic_cidr}
+ network_id: {get_resource: nems_traffic_net}
+
+ nems_user_web_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: {get_param: nems_user_web_name}
+
+ nems_user_web_network_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: nems_user_web_name}
+ allocation_pools: [{"start": {get_param: nems_user_web_start}, "end": {get_param: nems_user_web_end}}]
+ cidr: {get_param: nems_user_web_cidr}
+ network_id: {get_resource: nems_user_web_net}
+
+ nems_imap_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: {get_param: nems_imap_name}
+
+ nems_imap_network_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: nems_imap_name}
+ allocation_pools: [{"start": {get_param: nems_imap_start}, "end": {get_param: nems_imap_end}}]
+ cidr: {get_param: nems_imap_cidr}
+ network_id: {get_resource: nems_imap_net}
+
+ eca_traffic_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: {get_param: eca_traffic_name}
+
+ eca_traffic_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: eca_traffic_name}
+ allocation_pools: [{"start": {get_param: eca_traffic_start}, "end": {get_param: eca_traffic_end}}]
+ cidr: {get_param: eca_traffic_cidr}
+ network_id: {get_resource: eca_traffic_net}
+
+ ha_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: {get_param: ha_net_name}
+
+ ha_net_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: ha_net_name}
+ allocation_pools: [{"start": {get_param: ha_net_start}, "end": {get_param: ha_net_end}}]
+ cidr: {get_param: ha_net_cidr}
+ network_id: {get_resource: ha_net}
+
+ lb1_instance:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: [lb_names, 0]}
+ image: {get_param: lb_image_name}
+ flavor: {get_param: lb_flavor_name}
+ availability_zone: {get_param: availability_zone_0}
+ networks:
+ - port: {get_resource: lb1_mgmt_port}
+ - port: {get_resource: lb1_dmz_protected_port}
+ - port: {get_resource: lb1_cor_direct_port}
+ - port: {get_resource: lb1_mms_traffic_port}
+ - port: {get_resource: lb1_nems_traffic_port}
+ - port: {get_resource: lb1_nems_user_web_port}
+ - port: {get_resource: lb1_eca_traffic_port}
+ - port: {get_resource: lb1_ha_net_port}
+ metadata:
+ vnf_id: { get_param: vnf_id }
+
+ lb1_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [lb_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb1_mms_traffic_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: mms_traffic_net}
+ fixed_ips: [{"ip_address": {get_param: mms_traffic_net_local_ip1}}]
+ allowed_address_pairs: [{"ip_address": {get_param: mms_traffic_net_floating_ip} }]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb1_dmz_protected_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: dmz_protected_net_name}
+ fixed_ips: [{"ip_address": {get_param: [lb_dmz_protected_ips, 0]}}]
+ allowed_address_pairs: [{"ip_address": {get_param: [mmsc_dmz_protected_virtual_server_ips, 0]}}, {"ip_address": {get_param: [mmsc_dmz_protected_virtual_server_ips, 1]}}, {"ip_address": {get_param: [mmsc_dmz_protected_virtual_server_ips, 2]}}, {"ip_address": {get_param: [mmsc_dmz_protected_snat_ips, 0]}}, {"ip_address": {get_param: [mmsc_dmz_protected_snat_ips, 1]}}, {"ip_address": {get_param: [mmsc_dmz_protected_snat_ips, 2]}}, {"ip_address": {get_param: [mmsc_dmz_protected_snat_ips, 3]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb1_cor_direct_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: cor_direct_net_name}
+ fixed_ips: [{"ip_address": {get_param: [lb_cor_direct_ips, 0]}}]
+ allowed_address_pairs: [{"ip_address": {get_param: [mmsc_core_virtual_server_ips, 0]}}, {"ip_address": {get_param: [mmsc_core_virtual_server_ips, 1]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 0]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 1]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 2]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 3]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 4]}} ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb1_nems_traffic_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: nems_traffic_net}
+ fixed_ips: [{"ip_address": {get_param: nems_traffic_net_local_ip1}}]
+ allowed_address_pairs: [{"ip_address": {get_param: nems_traffic_net_floating_ip} }]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb1_nems_user_web_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: nems_user_web_net}
+ fixed_ips: [{"ip_address": {get_param: nems_user_web_net_local_ip1}}]
+ allowed_address_pairs: [{"ip_address": {get_param: nems_user_web_net_floating_ip} }]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb1_ha_net_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: ha_net}
+ fixed_ips: [{"ip_address": {get_param: ha_net_local_ip1}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb1_eca_traffic_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: eca_traffic_net}
+ fixed_ips: [{"ip_address": {get_param: eca_traffic_net_local_ip1}}]
+ allowed_address_pairs: [{"ip_address": {get_param: eca_traffic_net_floating_ip} }]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb2_instance:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: [lb_names, 1]}
+ image: {get_param: lb_image_name}
+ flavor: {get_param: lb_flavor_name}
+ availability_zone: {get_param: availability_zone_0}
+ networks:
+ - port: {get_resource: lb2_mgmt_port}
+ - port: {get_resource: lb2_dmz_protected_port}
+ - port: {get_resource: lb2_cor_direct_port}
+ - port: {get_resource: lb2_mms_traffic_port}
+ - port: {get_resource: lb2_nems_traffic_port}
+ - port: {get_resource: lb2_nems_user_web_port}
+ - port: {get_resource: lb2_eca_traffic_port}
+ - port: {get_resource: lb2_ha_net_port}
+ metadata:
+ vnf_id: { get_param: vnf_id }
+
+ lb2_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [lb_oam_ips, 1]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb2_mms_traffic_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: mms_traffic_net}
+ fixed_ips: [{"ip_address": {get_param: mms_traffic_net_local_ip2}}]
+ allowed_address_pairs: [{"ip_address": {get_param: mms_traffic_net_floating_ip}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb2_dmz_protected_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: dmz_protected_net_name}
+ fixed_ips: [{"ip_address": {get_param: [lb_dmz_protected_ips, 1]}}]
+ allowed_address_pairs: [{"ip_address": {get_param: [mmsc_dmz_protected_virtual_server_ips, 0]}}, {"ip_address": {get_param: [mmsc_dmz_protected_virtual_server_ips, 1]}}, {"ip_address": {get_param: [mmsc_dmz_protected_virtual_server_ips, 2]}}, {"ip_address": {get_param: [mmsc_dmz_protected_snat_ips, 0]}}, {"ip_address": {get_param: [mmsc_dmz_protected_snat_ips, 1]}}, {"ip_address": {get_param: [mmsc_dmz_protected_snat_ips, 2]}}, {"ip_address": {get_param: [mmsc_dmz_protected_snat_ips, 3]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb2_cor_direct_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: cor_direct_net_name}
+ fixed_ips: [{"ip_address": {get_param: [lb_cor_direct_ips, 1]}}]
+ allowed_address_pairs: [{"ip_address": {get_param: [mmsc_core_virtual_server_ips, 0]}}, {"ip_address": {get_param: [mmsc_core_virtual_server_ips, 1]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 0]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 1]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 2]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 3]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 4]}} ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb2_nems_traffic_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: nems_traffic_net}
+ fixed_ips: [{"ip_address": {get_param: nems_traffic_net_local_ip2}}]
+ allowed_address_pairs: [{"ip_address": {get_param: nems_traffic_net_floating_ip}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb2_nems_user_web_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: nems_user_web_net}
+ fixed_ips: [{"ip_address": {get_param: nems_user_web_net_local_ip2}}]
+ allowed_address_pairs: [{"ip_address": {get_param: nems_user_web_net_floating_ip}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb2_ha_net_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: ha_net}
+ fixed_ips: [{"ip_address": {get_param: ha_net_local_ip2}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb2_eca_traffic_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: eca_traffic_net}
+ fixed_ips: [{"ip_address": {get_param: eca_traffic_net_local_ip2}}]
+ allowed_address_pairs: [{"ip_address": {get_param: eca_traffic_net_floating_ip} }]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_mmsc1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [mmsc_names, 0]}
+ image: { get_param: mmsc_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: mmsc_flavor }
+ networks:
+ - port: { get_resource: mmsc1_port_0 }
+ - port: { get_resource: mmsc1_port_1 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ mmsc.mgmt.ip=${mmsc.mgmt.ip}
+ mmsc.mgmt.netmask=${mmsc.mgmt.netmask}
+ mmsc.mgmt.gateway=${mmsc.mgmt.gateway}
+ mmsc.traffic.ip=${mmsc.traffic.ip}
+ mmsc.traffic.netmask=${mmsc.traffic.netmask}
+ mmsc.traffic.gateway=${mmsc.traffic.gateway}
+ mmsc.mgmt.route.1=${mmsc.mgmt.route.1}
+ mmsc.mgmt.route.2=${mmsc.mgmt.route.2}
+ mmsc.external.dns=${mmsc.external.dns}
+ mmsc.external.ntp=${mmsc.external.ntp}
+ mmsc.hostname=${mmsc.hostname}
+ mmsc.timezone=${mmsc.timezone}
+ params:
+ ${mmsc.mgmt.ip}: {get_param: [mmsc_oam_ips, 0]}
+ ${mmsc.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${mmsc.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${mmsc.traffic.ip}: {get_param: [mmsc_mms_traffic_net_ips, 0]}
+ ${mmsc.traffic.netmask}: {get_param: mms_traffic_netmask}
+ ${mmsc.traffic.gateway}: {get_param: mms_traffic_net_gateway}
+ ${mmsc.mgmt.route.1}: {get_param: oam_network_route_1}
+ ${mmsc.mgmt.route.2}: {get_param: oam_network_route_2}
+ ${mmsc.external.dns}: {get_param: external_dns}
+ ${mmsc.external.ntp}: {get_param: external_ntp}
+ ${mmsc.hostname}: {get_param: [mmsc_names, 0]}
+ ${mmsc.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ mmsc1_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: mmsc_cinder_volume_size}
+ volume_type: {get_param: MMSC_volume_type}
+
+ mmsc1_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: mmsc1_volume}
+ instance_uuid: {get_resource: server_mmsc1}
+
+ mmsc1_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_oam_ips, 0]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ mmsc1_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: mms_traffic_net}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_mms_traffic_net_ips, 0]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_mmsc2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [mmsc_names, 1]}
+ image: { get_param: mmsc_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: mmsc_flavor }
+ networks:
+ - port: { get_resource: mmsc2_port_0 }
+ - port: { get_resource: mmsc2_port_1 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ mmsc.mgmt.ip=${mmsc.mgmt.ip}
+ mmsc.mgmt.netmask=${mmsc.mgmt.netmask}
+ mmsc.mgmt.gateway=${mmsc.mgmt.gateway}
+ mmsc.traffic.ip=${mmsc.traffic.ip}
+ mmsc.traffic.netmask=${mmsc.traffic.netmask}
+ mmsc.traffic.gateway=${mmsc.traffic.gateway}
+ mmsc.mgmt.route.1=${mmsc.mgmt.route.1}
+ mmsc.mgmt.route.2=${mmsc.mgmt.route.2}
+ mmsc.external.dns=${mmsc.external.dns}
+ mmsc.external.ntp=${mmsc.external.ntp}
+ mmsc.hostname=${mmsc.hostname}
+ mmsc.timezone=${mmsc.timezone}
+ params:
+ ${mmsc.mgmt.ip}: {get_param: [mmsc_oam_ips, 1]}
+ ${mmsc.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${mmsc.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${mmsc.traffic.ip}: {get_param: [mmsc_mms_traffic_net_ips, 1]}
+ ${mmsc.traffic.netmask}: {get_param: mms_traffic_netmask}
+ ${mmsc.traffic.gateway}: {get_param: mms_traffic_net_gateway}
+ ${mmsc.mgmt.route.1}: {get_param: oam_network_route_1}
+ ${mmsc.mgmt.route.2}: {get_param: oam_network_route_2}
+ ${mmsc.external.dns}: {get_param: external_dns}
+ ${mmsc.external.ntp}: {get_param: external_ntp}
+ ${mmsc.hostname}: {get_param: [mmsc_names, 1]}
+ ${mmsc.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ mmsc2_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: mmsc_cinder_volume_size}
+ volume_type: {get_param: MMSC_volume_type}
+
+ mmsc2_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: mmsc2_volume}
+ instance_uuid: {get_resource: server_mmsc2}
+
+ mmsc2_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_oam_ips, 1]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ mmsc2_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: mms_traffic_net}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_mms_traffic_net_ips, 1]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_mmsc3:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [mmsc_names, 2]}
+ image: { get_param: mmsc_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: mmsc_flavor }
+ networks:
+ - port: { get_resource: mmsc3_port_0 }
+ - port: { get_resource: mmsc3_port_1 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ mmsc.mgmt.ip=${mmsc.mgmt.ip}
+ mmsc.mgmt.netmask=${mmsc.mgmt.netmask}
+ mmsc.mgmt.gateway=${mmsc.mgmt.gateway}
+ mmsc.traffic.ip=${mmsc.traffic.ip}
+ mmsc.traffic.netmask=${mmsc.traffic.netmask}
+ mmsc.traffic.gateway=${mmsc.traffic.gateway}
+ mmsc.mgmt.route.1=${mmsc.mgmt.route.1}
+ mmsc.mgmt.route.2=${mmsc.mgmt.route.2}
+ mmsc.external.dns=${mmsc.external.dns}
+ mmsc.external.ntp=${mmsc.external.ntp}
+ mmsc.hostname=${mmsc.hostname}
+ mmsc.timezone=${mmsc.timezone}
+ params:
+ ${mmsc.mgmt.ip}: {get_param: [mmsc_oam_ips, 2]}
+ ${mmsc.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${mmsc.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${mmsc.traffic.ip}: {get_param: [mmsc_mms_traffic_net_ips, 2]}
+ ${mmsc.traffic.netmask}: {get_param: mms_traffic_netmask}
+ ${mmsc.traffic.gateway}: {get_param: mms_traffic_net_gateway}
+ ${mmsc.mgmt.route.1}: {get_param: oam_network_route_1}
+ ${mmsc.mgmt.route.2}: {get_param: oam_network_route_2}
+ ${mmsc.external.dns}: {get_param: external_dns}
+ ${mmsc.external.ntp}: {get_param: external_ntp}
+ ${mmsc.hostname}: {get_param: [mmsc_names, 2]}
+ ${mmsc.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ mmsc3_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: mmsc_cinder_volume_size}
+ volume_type: {get_param: MMSC_volume_type}
+
+ mmsc3_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: mmsc3_volume}
+ instance_uuid: {get_resource: server_mmsc3}
+
+ mmsc3_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_oam_ips, 2]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ mmsc3_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: mms_traffic_net}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_mms_traffic_net_ips, 2]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_mmsc4:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [mmsc_names, 3]}
+ image: { get_param: mmsc_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: mmsc_flavor }
+ networks:
+ - port: { get_resource: mmsc4_port_0 }
+ - port: { get_resource: mmsc4_port_1 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ mmsc.mgmt.ip=${mmsc.mgmt.ip}
+ mmsc.mgmt.netmask=${mmsc.mgmt.netmask}
+ mmsc.mgmt.gateway=${mmsc.mgmt.gateway}
+ mmsc.traffic.ip=${mmsc.traffic.ip}
+ mmsc.traffic.netmask=${mmsc.traffic.netmask}
+ mmsc.traffic.gateway=${mmsc.traffic.gateway}
+ mmsc.mgmt.route.1=${mmsc.mgmt.route.1}
+ mmsc.mgmt.route.2=${mmsc.mgmt.route.2}
+ mmsc.external.dns=${mmsc.external.dns}
+ mmsc.external.ntp=${mmsc.external.ntp}
+ mmsc.hostname=${mmsc.hostname}
+ mmsc.timezone=${mmsc.timezone}
+ params:
+ ${mmsc.mgmt.ip}: {get_param: [mmsc_oam_ips, 3]}
+ ${mmsc.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${mmsc.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${mmsc.traffic.ip}: {get_param: [mmsc_mms_traffic_net_ips, 3]}
+ ${mmsc.traffic.netmask}: {get_param: mms_traffic_netmask}
+ ${mmsc.traffic.gateway}: {get_param: mms_traffic_net_gateway}
+ ${mmsc.mgmt.route.1}: {get_param: oam_network_route_1}
+ ${mmsc.mgmt.route.2}: {get_param: oam_network_route_2}
+ ${mmsc.external.dns}: {get_param: external_dns}
+ ${mmsc.external.ntp}: {get_param: external_ntp}
+ ${mmsc.hostname}: {get_param: [mmsc_names, 3]}
+ ${mmsc.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ mmsc4_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: mmsc_cinder_volume_size}
+ volume_type: {get_param: MMSC_volume_type}
+
+ mmsc4_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: mmsc4_volume}
+ instance_uuid: {get_resource: server_mmsc4}
+
+ mmsc4_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_oam_ips, 3]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ mmsc4_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: mms_traffic_net}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_mms_traffic_net_ips, 3]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_mmsc5:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [mmsc_names, 4]}
+ image: { get_param: mmsc_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: mmsc_flavor }
+ networks:
+ - port: { get_resource: mmsc5_port_0 }
+ - port: { get_resource: mmsc5_port_1 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ mmsc.mgmt.ip=${mmsc.mgmt.ip}
+ mmsc.mgmt.netmask=${mmsc.mgmt.netmask}
+ mmsc.mgmt.gateway=${mmsc.mgmt.gateway}
+ mmsc.traffic.ip=${mmsc.traffic.ip}
+ mmsc.traffic.netmask=${mmsc.traffic.netmask}
+ mmsc.traffic.gateway=${mmsc.traffic.gateway}
+ mmsc.mgmt.route.1=${mmsc.mgmt.route.1}
+ mmsc.mgmt.route.2=${mmsc.mgmt.route.2}
+ mmsc.external.dns=${mmsc.external.dns}
+ mmsc.external.ntp=${mmsc.external.ntp}
+ mmsc.hostname=${mmsc.hostname}
+ mmsc.timezone=${mmsc.timezone}
+ params:
+ ${mmsc.mgmt.ip}: {get_param: [mmsc_oam_ips, 4]}
+ ${mmsc.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${mmsc.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${mmsc.traffic.ip}: {get_param: [mmsc_mms_traffic_net_ips, 4]}
+ ${mmsc.traffic.netmask}: {get_param: mms_traffic_netmask}
+ ${mmsc.traffic.gateway}: {get_param: mms_traffic_net_gateway}
+ ${mmsc.mgmt.route.1}: {get_param: oam_network_route_1}
+ ${mmsc.mgmt.route.2}: {get_param: oam_network_route_2}
+ ${mmsc.external.dns}: {get_param: external_dns}
+ ${mmsc.external.ntp}: {get_param: external_ntp}
+ ${mmsc.hostname}: {get_param: [mmsc_names, 4]}
+ ${mmsc.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ mmsc5_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: mmsc_cinder_volume_size}
+ volume_type: {get_param: MMSC_volume_type}
+
+ mmsc5_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: mmsc5_volume}
+ instance_uuid: {get_resource: server_mmsc5}
+
+ mmsc5_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_oam_ips, 4]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ mmsc5_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: mms_traffic_net}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_mms_traffic_net_ips, 4]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_nems_fe1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [nems_fe_names, 0] }
+ image: { get_param: nems_fe_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: nems_fe_flavor }
+ networks:
+ - port: { get_resource: nems_fe1_port_0 }
+ - port: { get_resource: nems_fe1_port_1 }
+ - port: { get_resource: nems_fe1_port_2 }
+ - port: { get_resource: nems_fe1_port_3 }
+ - port: { get_resource: nems_fe1_port_4 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ nems.mgmt.ip=${nems.mgmt.ip}
+ nems.mgmt.netmask=${nems.mgmt.netmask}
+ nems.mgmt.gateway=${nems.mgmt.gateway}
+ nems.traffic.ip=${nems.traffic.ip}
+ nems.traffic.netmask=${nems.traffic.netmask}
+ nems.traffic.gateway=${nems.traffic.gateway}
+ nems.fe0.internal.ip=${nems.fe0.internal.ip}
+ nems.fe1.internal.ip=${nems.fe1.internal.ip}
+ nems.internal.netmask=${nems.internal.netmask}
+ nems.userweb.ip=${nems.userweb.ip}
+ nems.userweb.netmask=${nems.userweb.netmask}
+ nems.userweb.gateway=${nems.userweb.gateway}
+ nems.imap.ip=${nems.imap.ip}
+ nems.imap.netmask=${nems.imap.netmask}
+ nems.be.internal.ip=${nems.be.internal.ip}
+ nems.be.imap.ip=${nems.be.imap.ip}
+ nems.mgmt.route.1=${nems.mgmt.route.1}
+ nems.mgmt.route.2=${nems.mgmt.route.2}
+ nems.external.dns=${nems.external.dns}
+ nems.external.ntp=${nems.external.ntp}
+ nems.node=${nems.node}
+ nems.be0.host.name=${nems.be0.host.name}
+ nems.fe0.host.name=${nems.fe0.host.name}
+ nems.fe1.host.name=${nems.fe1.host.name}
+ nems.timezone=${nems.timezone}
+ params:
+ ${nems.mgmt.ip}: {get_param: [nems_fe_oam_ips, 0]}
+ ${nems.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${nems.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${nems.traffic.ip}: {get_param: [nems_fe_nems_traffic_net_ips, 0]}
+ ${nems.traffic.netmask}: {get_param: nems_traffic_netmask}
+ ${nems.traffic.gateway}: {get_param: nems_traffic_gateway}
+ ${nems.fe0.internal.ip}: {get_param: [nems_fe_nems_internal_net_ips, 0]}
+ ${nems.fe1.internal.ip}: {get_param: [nems_fe_nems_internal_net_ips, 1]}
+ ${nems.internal.netmask}: {get_param: nems_internal_netmask}
+ ${nems.userweb.ip}: {get_param: [nems_fe_nems_user_web_net_ips, 0]}
+ ${nems.userweb.netmask}: {get_param: nems_user_web_netmask}
+ ${nems.userweb.gateway}: {get_param: nems_user_web_gateway}
+ ${nems.imap.ip}: {get_param: [nems_fe_nems_imap_net_ips, 0]}
+ ${nems.imap.netmask}: {get_param: nems_imap_netmask}
+ ${nems.be.internal.ip}: {get_param: nems_be_nems_internal_net_ips}
+ ${nems.be.imap.ip}: {get_param: nems_be_nems_imap_net_ips}
+ ${nems.mgmt.route.1}: {get_param: oam_network_route_1}
+ ${nems.mgmt.route.2}: {get_param: oam_network_route_2}
+ ${nems.external.dns}: {get_param: external_dns}
+ ${nems.external.ntp}: {get_param: external_ntp}
+ ${nems.node}: {get_param: [nems_fe_node_roles, 0]}
+ ${nems.fe0.host.name}: {get_param: [nems_fe_names, 0]}
+ ${nems.fe1.host.name}: {get_param: [nems_fe_names, 1]}
+ ${nems.be0.host.name}: {get_param: nems_be_names}
+ ${nems.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ nems1_fe_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: nems_volume_size}
+ volume_type: {get_param: NEMS_FE_volume_type}
+
+ nems1_fe_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: nems1_fe_volume}
+ instance_uuid: {get_resource: server_nems_fe1}
+
+ nems_fe1_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [
+ "ip_address": { get_param: [nems_fe_oam_ips, 0] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ nems_fe1_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [nems_fe_nems_traffic_net_ips, 0] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ nems_fe1_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_user_web_net }
+ fixed_ips: [
+ "ip_address": { get_param: [nems_fe_nems_user_web_net_ips, 0] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ nems_fe1_port_3:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_internal_net }
+ fixed_ips: [
+ "ip_address": { get_param: [nems_fe_nems_internal_net_ips, 0] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ nems_fe1_port_4:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_imap_net }
+ fixed_ips: [
+ "ip_address": { get_param: [nems_fe_nems_imap_net_ips, 0] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_nems_fe2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [nems_fe_names, 1] }
+ image: { get_param: nems_fe_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: nems_fe_flavor }
+ networks:
+ - port: { get_resource: nems_fe2_port_0 }
+ - port: { get_resource: nems_fe2_port_1 }
+ - port: { get_resource: nems_fe2_port_2 }
+ - port: { get_resource: nems_fe2_port_3 }
+ - port: { get_resource: nems_fe2_port_4 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ nems.mgmt.ip=${nems.mgmt.ip}
+ nems.mgmt.netmask=${nems.mgmt.netmask}
+ nems.mgmt.gateway=${nems.mgmt.gateway}
+ nems.traffic.ip=${nems.traffic.ip}
+ nems.traffic.netmask=${nems.traffic.netmask}
+ nems.traffic.gateway=${nems.traffic.gateway}
+ nems.fe0.internal.ip=${nems.fe0.internal.ip}
+ nems.fe1.internal.ip=${nems.fe1.internal.ip}
+ nems.internal.netmask=${nems.internal.netmask}
+ nems.userweb.ip=${nems.userweb.ip}
+ nems.userweb.netmask=${nems.userweb.netmask}
+ nems.userweb.gateway=${nems.userweb.gateway}
+ nems.imap.ip=${nems.imap.ip}
+ nems.imap.netmask=${nems.imap.netmask}
+ nems.be.internal.ip=${nems.be.internal.ip}
+ nems.be.imap.ip=${nems.be.imap.ip}
+ nems.mgmt.route.1=${nems.mgmt.route.1}
+ nems.mgmt.route.2=${nems.mgmt.route.2}
+ nems.external.dns=${nems.external.dns}
+ nems.external.ntp=${nems.external.ntp}
+ nems.node=${nems.node}
+ nems.be0.host.name=${nems.be0.host.name}
+ nems.fe0.host.name=${nems.fe0.host.name}
+ nems.fe1.host.name=${nems.fe1.host.name}
+ nems.timezone=${nems.timezone}
+ params:
+ ${nems.mgmt.ip}: {get_param: [nems_fe_oam_ips, 1]}
+ ${nems.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${nems.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${nems.traffic.ip}: {get_param: [nems_fe_nems_traffic_net_ips, 1]}
+ ${nems.traffic.netmask}: {get_param: nems_traffic_netmask}
+ ${nems.traffic.gateway}: {get_param: nems_traffic_gateway}
+ ${nems.fe0.internal.ip}: {get_param: [nems_fe_nems_internal_net_ips, 0]}
+ ${nems.fe1.internal.ip}: {get_param: [nems_fe_nems_internal_net_ips, 1]}
+ ${nems.internal.netmask}: {get_param: nems_internal_netmask}
+ ${nems.userweb.ip}: {get_param: [nems_fe_nems_user_web_net_ips, 1]}
+ ${nems.userweb.netmask}: {get_param: nems_user_web_netmask}
+ ${nems.userweb.gateway}: {get_param: nems_user_web_gateway}
+ ${nems.imap.ip}: {get_param: [nems_fe_nems_imap_net_ips, 1]}
+ ${nems.imap.netmask}: {get_param: nems_imap_netmask}
+ ${nems.be.internal.ip}: {get_param: nems_be_nems_internal_net_ips}
+ ${nems.be.imap.ip}: {get_param: nems_be_nems_imap_net_ips}
+ ${nems.mgmt.route.1}: {get_param: oam_network_route_1}
+ ${nems.mgmt.route.2}: {get_param: oam_network_route_2}
+ ${nems.external.dns}: {get_param: external_dns}
+ ${nems.external.ntp}: {get_param: external_ntp}
+ ${nems.node}: {get_param: [nems_fe_node_roles, 1]}
+ ${nems.fe0.host.name}: {get_param: [nems_fe_names, 0]}
+ ${nems.fe1.host.name}: {get_param: [nems_fe_names, 1]}
+ ${nems.be0.host.name}: {get_param: nems_be_names}
+ ${nems.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ nems2_fe_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: nems_volume_size}
+ volume_type: {get_param: NEMS_FE_volume_type}
+
+ nems2_fe_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: nems2_fe_volume}
+ instance_uuid: {get_resource: server_nems_fe2}
+
+ nems_fe2_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [
+ "ip_address": {get_param: [nems_fe_oam_ips, 1]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ nems_fe2_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [nems_fe_nems_traffic_net_ips, 1] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ nems_fe2_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_user_web_net }
+ fixed_ips: [
+ "ip_address": { get_param: [nems_fe_nems_user_web_net_ips, 1] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ nems_fe2_port_3:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_internal_net }
+ fixed_ips: [
+ "ip_address": { get_param: [nems_fe_nems_internal_net_ips, 1] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+
+ nems_fe2_port_4:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_imap_net }
+ fixed_ips: [
+ "ip_address": { get_param: [nems_fe_nems_imap_net_ips, 1] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_nems_be1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: nems_be_names }
+ image: { get_param: nems_be_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: nems_be_flavor }
+ networks:
+ - port: { get_resource: nems_be1_port_0 }
+ - port: { get_resource: nems_be1_port_1 }
+ - port: { get_resource: nems_be1_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ nems.be.mgmt.ip=${nems.be.mgmt.ip}
+ nems.mgmt.netmask=${nems.mgmt.netmask}
+ nems.mgmt.gateway=${nems.mgmt.gateway}
+ nems.be.internal.ip=${nems.be.internal.ip}
+ nems.internal.netmask=${nems.internal.netmask}
+ nems.imap.netmask=${nems.imap.netmask}
+ nems.fe0.internal.ip=${nems.fe0.internal.ip}
+ nems.fe1.internal.ip=${nems.fe1.internal.ip}
+ nems.be.imap.ip=${nems.be.imap.ip}
+ nems.mgmt.route.1=${nems.mgmt.route.1}
+ nems.mgmt.route.2=${nems.mgmt.route.2}
+ nems.external.dns=${nems.external.dns}
+ nems.external.ntp=${nems.external.ntp}
+ nems.node=${nems.node}
+ nems.be0.host.name=${nems.be0.host.name}
+ nems.fe0.host.name=${nems.fe0.host.name}
+ nems.fe1.host.name=${nems.fe1.host.name}
+ nems.timezone=${nems.timezone}
+ params:
+ ${nems.be.mgmt.ip}: {get_param: nems_be_oam_ips}
+ ${nems.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${nems.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${nems.fe0.internal.ip}: {get_param: [nems_fe_nems_internal_net_ips, 0]}
+ ${nems.fe1.internal.ip}: {get_param: [nems_fe_nems_internal_net_ips, 1]}
+ ${nems.be.internal.ip}: {get_param: nems_be_nems_internal_net_ips}
+ ${nems.internal.netmask}: {get_param: nems_internal_netmask}
+ ${nems.imap.netmask}: {get_param: nems_imap_netmask}
+ ${nems.be.imap.ip}: {get_param: nems_be_nems_imap_net_ips}
+ ${nems.mgmt.route.1}: {get_param: oam_network_route_1}
+ ${nems.mgmt.route.2}: {get_param: oam_network_route_2}
+ ${nems.external.dns}: {get_param: external_dns}
+ ${nems.external.ntp}: {get_param: external_ntp}
+ ${nems.node}: {get_param: nems_be_node_roles}
+ ${nems.be0.host.name}: {get_param: nems_be_names}
+ ${nems.fe0.host.name}: {get_param: [nems_fe_names, 0]}
+ ${nems.fe1.host.name}: {get_param: [nems_fe_names, 1]}
+ ${nems.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ nems_be_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: nems_be_volume_size}
+ volume_type: {get_param: NEMS_BE_volume_type}
+
+ nems_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: nems_be_volume}
+ instance_uuid: {get_resource: server_nems_be1}
+
+
+ nems_be1_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [
+ "ip_address": { get_param: nems_be_oam_ips}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ nems_be1_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_internal_net }
+ fixed_ips: [
+ "ip_address": { get_param: nems_be_nems_internal_net_ips}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ nems_be1_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_imap_net }
+ fixed_ips: [
+ "ip_address": { get_param: nems_be_nems_imap_net_ips}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 0]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx1_port_0 }
+ - port: { get_resource: eca_trx1_port_1 }
+ - port: { get_resource: eca_trx1_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 0]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 0]}
+
+ eca_trx1_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 0] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx1_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 0] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx1_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 0] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+
+ server_eca_trx2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 1]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx2_port_0 }
+ - port: { get_resource: eca_trx2_port_1 }
+ - port: { get_resource: eca_trx2_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 1]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 1]}
+
+ eca_trx2_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 1] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx2_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 1] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx2_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 1] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx3:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 2]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx3_port_0 }
+ - port: { get_resource: eca_trx3_port_1 }
+ - port: { get_resource: eca_trx3_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 2]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 2]}
+
+ eca_trx3_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 2] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx3_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 2] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx3_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 2] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx4:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 3]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx4_port_0 }
+ - port: { get_resource: eca_trx4_port_1 }
+ - port: { get_resource: eca_trx4_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 3]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 3]}
+
+ eca_trx4_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 3] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx4_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 3] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx4_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 3] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx5:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 4]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx5_port_0 }
+ - port: { get_resource: eca_trx5_port_1 }
+ - port: { get_resource: eca_trx5_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 4]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 4]}
+
+ eca_trx5_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 4] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx5_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 4] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx5_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 4] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx6:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 5]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx6_port_0 }
+ - port: { get_resource: eca_trx6_port_1 }
+ - port: { get_resource: eca_trx6_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 5]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 5]}
+
+ eca_trx6_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 5] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx6_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 5] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx6_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 5] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx7:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 6]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx7_port_0 }
+ - port: { get_resource: eca_trx7_port_1 }
+ - port: { get_resource: eca_trx7_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 6]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 6]}
+
+ eca_trx7_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 6] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx7_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 6] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx7_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 6] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx8:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 7]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx8_port_0 }
+ - port: { get_resource: eca_trx8_port_1 }
+ - port: { get_resource: eca_trx8_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 7]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 7]}
+
+ eca_trx8_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 7] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx8_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 7] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx8_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 7] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx9:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 8]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx9_port_0 }
+ - port: { get_resource: eca_trx9_port_1 }
+ - port: { get_resource: eca_trx9_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 8]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 8]}
+
+ eca_trx9_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 8] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx9_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 8] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx9_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 8] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx10:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 9]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx10_port_0 }
+ - port: { get_resource: eca_trx10_port_1 }
+ - port: { get_resource: eca_trx10_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 9]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 9]}
+
+ eca_trx10_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 9] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx10_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 9] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx10_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 9] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx11:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 10]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx11_port_0 }
+ - port: { get_resource: eca_trx11_port_1 }
+ - port: { get_resource: eca_trx11_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 10]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 10]}
+
+ eca_trx11_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 10] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx11_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 10] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx11_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 10] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+
+ server_eca_trx12:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 11]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx12_port_0 }
+ - port: { get_resource: eca_trx12_port_1 }
+ - port: { get_resource: eca_trx12_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 11]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 11]}
+
+ eca_trx12_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 11] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx12_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 11] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx12_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 11] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx13:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 12]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx13_port_0 }
+ - port: { get_resource: eca_trx13_port_1 }
+ - port: { get_resource: eca_trx13_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 12]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 12]}
+
+ eca_trx13_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 12] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx13_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 12] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx13_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 12] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx14:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 13]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx14_port_0 }
+ - port: { get_resource: eca_trx14_port_1 }
+ - port: { get_resource: eca_trx14_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 13]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 13]}
+
+ eca_trx14_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 13] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx14_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 13] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx14_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 13] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx15:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 14]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx15_port_0 }
+ - port: { get_resource: eca_trx15_port_1 }
+ - port: { get_resource: eca_trx15_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 14]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 14]}
+
+ eca_trx15_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 14] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx15_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 14] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx15_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 14] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx16:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 15]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx16_port_0 }
+ - port: { get_resource: eca_trx16_port_1 }
+ - port: { get_resource: eca_trx16_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 15]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 15]}
+
+ eca_trx16_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 15] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx16_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 15] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx16_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 15] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+
+ server_eca_trx17:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 16]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx17_port_0 }
+ - port: { get_resource: eca_trx17_port_1 }
+ - port: { get_resource: eca_trx17_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 16]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 16]}
+
+ eca_trx17_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 16] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx17_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 16] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx17_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 16] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx18:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 17]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx18_port_0 }
+ - port: { get_resource: eca_trx18_port_1 }
+ - port: { get_resource: eca_trx18_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 17]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 17]}
+
+ eca_trx18_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 17] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx18_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 17] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx18_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 17] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx19:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 18]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx19_port_0 }
+ - port: { get_resource: eca_trx19_port_1 }
+ - port: { get_resource: eca_trx19_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 8]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 18]}
+
+ eca_trx19_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 18] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx19_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 18] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx19_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 18] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx20:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 19]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx20_port_0 }
+ - port: { get_resource: eca_trx20_port_1 }
+ - port: { get_resource: eca_trx20_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 19]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 19]}
+
+ eca_trx20_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 19] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx20_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 19] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx20_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 19] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/MMSC_Capacity_Line_1.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/MMSC_Capacity_Line_1.env
new file mode 100644
index 0000000000..b346d67d97
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/MMSC_Capacity_Line_1.env
@@ -0,0 +1,111 @@
+parameters:
+ oam_net_name: oam_protected_net_0
+ oam_network_netmask: 255.255.254.0
+ oam_network_gateway: 107.250.172.1
+ oam_network_route_1: 155.165.201.250/32,107.250.172.1
+ oam_network_route_2: 155.165.194.100/32,107.250.172.1
+ external_dns: 155.165.194.100
+ external_ntp: 155.165.201.250
+ lb_oam_ips: 107.250.172.50,107.250.172.51
+ dmz_protected_net_name: dmz_protected_net_0
+ lb_dmz_protected_ips: 107.239.14.19,107.239.14.20
+ cor_direct_net_name: cor_direct_net_0
+ lb_cor_direct_ips: 172.31.10.19,172.31.10.20
+ mms_traffic_net_name: int_mms_mms_traffic_net_2
+ mms_traffic_net_cidr: 172.26.2.0/24
+ mms_traffic_netmask: 255.255.255.0
+ mms_traffic_net_gateway: 172.26.2.1
+ mms_traffic_start: 172.26.2.3
+ mms_traffic_end: 172.26.2.254
+ mms_traffic_net_local_ip1: 172.26.2.3
+ mms_traffic_net_local_ip2: 172.26.2.4
+ mms_traffic_net_floating_ip: 172.26.2.5
+ nems_internal_name: int_mms_nems_internal_net_2
+ nems_internal_start: 172.26.6.3
+ nems_internal_end: 172.26.6.254
+ nems_internal_cidr: 172.26.6.0/24
+ nems_internal_netmask: 255.255.255.0
+ nems_internal_gateway: 172.26.6.1
+ nems_traffic_name: int_mms_nems_traffic_net_2
+ nems_traffic_start: 172.26.3.3
+ nems_traffic_end: 172.26.3.254
+ nems_traffic_cidr: 172.26.3.0/24
+ nems_traffic_netmask: 255.255.255.0
+ nems_traffic_gateway: 172.26.3.1
+ nems_traffic_net_local_ip1: 172.26.3.3
+ nems_traffic_net_local_ip2: 172.26.3.4
+ nems_traffic_net_floating_ip: 172.26.3.5
+ nems_user_web_name: int_mms_nems_web_net_2
+ nems_user_web_start: 172.26.4.3
+ nems_user_web_end: 172.26.4.254
+ nems_user_web_cidr: 172.26.4.0/24
+ nems_user_web_netmask: 255.255.255.0
+ nems_user_web_gateway: 172.26.4.1
+ nems_user_web_net_local_ip1: 172.26.4.3
+ nems_user_web_net_local_ip2: 172.26.4.4
+ nems_user_web_net_floating_ip: 172.26.4.5
+ nems_imap_name: int_mms_nems_imap_net_2
+ nems_imap_start: 172.26.7.3
+ nems_imap_end: 172.26.7.254
+ nems_imap_cidr: 172.26.7.0/24
+ nems_imap_netmask: 255.255.255.0
+ nems_imap_gateway: 172.26.7.1
+ eca_traffic_name: int_mms_eca_traffic_net_2
+ eca_traffic_cidr: 172.26.5.0/24
+ eca_traffic_netmask: 255.255.255.0
+ eca_traffic_net_gateway: 172.26.5.1
+ eca_traffic_start: 172.26.5.3
+ eca_traffic_end: 172.26.5.254
+ eca_traffic_net_local_ip1: 172.26.5.3
+ eca_traffic_net_local_ip2: 172.26.5.4
+ eca_traffic_net_floating_ip: 172.26.5.5
+ ha_net_name: int_mms_ha_net_2
+ ha_net_cidr: 172.26.1.0/24
+ ha_net_start: 172.26.1.3
+ ha_net_end: 172.26.1.254
+ ha_net_local_ip1: 172.26.1.3
+ ha_net_local_ip2: 172.26.1.4
+ lb_names: ZRDM1MMSC03ALB001,ZRDM1MMSC03ALB002
+ lb_image_name: BIGIP-11.5.3.0.0.163
+ lb_flavor_name: m1.xlarge
+ security_group_name: mmsc_security_group_1
+ availability_zone_0: nova
+ mmsc_mms_traffic_net_ips: 172.26.2.11,172.26.2.12,172.26.2.13,172.26.2.14,172.26.2.15
+ mmsc_oam_ips: 107.250.172.54,107.250.172.55,107.250.172.56,107.250.172.57,107.250.172.58
+ mmsc_flavor: lc.4xlarge4
+ mmsc_image: mmsc-6.0.2_v5
+ mmsc_cinder_volume_size: 480
+ nems_fe_flavor: m1.large2
+ nems_fe_image: nems-2.1.2_v29
+ nems_fe_names: ZRDM1MMSC03NFE001,ZRDM1MMSC03NFE002
+ nems_fe_node_roles: FE0,FE1
+ nems_fe_oam_ips: 107.250.172.64,107.250.172.65
+ nems_fe_nems_traffic_net_ips: 172.26.3.11,172.26.3.12
+ nems_fe_nems_user_web_net_ips: 172.26.4.11,172.26.4.12
+ nems_fe_nems_internal_net_ips: 172.26.6.11,172.26.6.12
+ nems_fe_nems_imap_net_ips: 172.26.7.11,172.26.7.12
+ nems_be_names: ZRDM1MMSC03NBE001
+ nems_be_node_roles: BE0
+ nems_be_oam_ips: 107.250.172.66
+ nems_be_nems_internal_net_ips: 172.26.6.13
+ nems_be_nems_imap_net_ips: 172.26.7.13
+ nems_be_flavor: m1.large2
+ nems_be_image: nems-2.1.2_v29
+ eca_trx_oam_ips: 107.250.172.70,107.250.172.71,107.250.172.72,107.250.172.73,107.250.172.74,107.250.172.75,107.250.172.76,107.250.172.77,107.250.172.78,107.250.172.79,107.250.172.80,107.250.172.81,107.250.172.82,107.250.172.83,107.250.172.84,107.250.172.85,107.250.172.86,107.250.172.87,107.250.172.88,107.250.172.89
+ eca_trx_mgmt_ips: 172.25.137.202,172.25.137.203,172.25.137.204,172.25.137.205,172.25.137.206,172.25.137.207,172.25.137.208,172.25.137.209,172.25.137.210,172.25.137.211,172.25.137.212,172.25.137.213,172.25.137.214,172.25.137.215,172.25.137.216,172.25.137.217,172.25.137.218,172.25.137.219,172.25.137.220,172.25.137.221
+ eca_trx_flavor: m1.xlarge
+ eca_trx_image: ECABASE
+ timezone: UTC
+ eca_trx_names: ZRDM1MMSC03TRX001,ZRDM1MMSC03TRX002,ZRDM1MMSC03TRX003,ZRDM1MMSC03TRX004,ZRDM1MMSC03TRX005,ZRDM1MMSC03TRX006,ZRDM1MMSC03TRX007,ZRDM1MMSC03TRX008,ZRDM1MMSC03TRX009,ZRDM1MMSC03TRX010,ZRDM1MMSC03TRX011,ZRDM1MMSC03TRX012,ZRDM1MMSC03TRX013,ZRDM1MMSC03TRX014,ZRDM1MMSC03TRX015,ZRDM1MMSC03TRX016,ZRDM1MMSC03TRX017,ZRDM1MMSC03TRX018,ZRDM1MMSC03TRX019,ZRDM1MMSC03TRX020
+ eca_trx_eca_traffic_net_ips: 172.26.5.11,172.26.5.12,172.26.5.13,172.26.5.14,172.26.5.15,172.26.5.16,172.26.5.17,172.26.5.18,172.26.5.19,172.26.5.20,172.26.5.21,172.26.5.22,172.26.5.23,172.26.5.24,172.26.5.25,172.26.5.26,172.26.5.27,172.26.5.28,172.26.5.29,172.26.5.30
+ mmsc_names: ZRDM1MMSC03MMS001,ZRDM1MMSC03MMS002,ZRDM1MMSC03MMS003,ZRDM1MMSC03MMS004,ZRDM1MMSC03MMS005
+ nems_volume_size: 50
+ nems_be_volume_size: 610
+ MMSC_volume_type: Platinum
+ NEMS_FE_volume_type: Platinum
+ NEMS_BE_volume_type: Platinum
+ mmsc_core_virtual_server_ips: 172.31.10.21,172.31.10.22
+ mmsc_core_snat_ips: 172.31.10.23,172.31.10.24,172.31.10.25,172.31.10.26,172.31.10.27
+ mmsc_dmz_protected_virtual_server_ips: 107.239.14.21,107.239.14.22,107.239.14.23
+ mmsc_dmz_protected_snat_ips: 107.239.14.24,107.239.14.25,107.239.14.26,107.239.14.27
+ eca_mgmt_net_name: int_eca_mgmt_net_1 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/SG_ECA_MGMT.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/SG_ECA_MGMT.yaml
new file mode 100644
index 0000000000..53efc5e36e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/SG_ECA_MGMT.yaml
@@ -0,0 +1,76 @@
+heat_template_version: 2013-05-23
+
+#################################
+#
+# Changes from MSO - 11/5/2015
+# - Parameter changes as below
+# - CDLs for vmNames, IPs
+# - aZone->availability_zone_0
+# - nwName->{nwRole}_net_name
+# - nwID->{nwRole}_net_id
+# - vmName->{vmType}_names
+# - ips ->{vmType}_{nwRole}_ips
+# - fips->{vmType}_{nwRole}_floating_ip
+# - added replacement_policy: AUTO to all ports
+# - added vnf_id for metadata to all servers
+# - externalized security group resource
+# - externalized eca_mgmt network
+#
+#################################
+
+description: >
+ HOT template that creates Security Group and ECA network
+
+parameters:
+ eca_mgmt_name:
+ type: string
+ label: eca management name
+ description: eca management name
+ eca_mgmt_start:
+ type: string
+ label: eca management start
+ description: eca management start
+ eca_mgmt_end:
+ type: string
+ label: eca management end
+ description: eca management end
+ eca_mgmt_cidr:
+ type: string
+ label: eca management cidr
+ description: eca management cidr
+ eca_mgmt_netmask:
+ type: string
+ label: ECA mgmt network subnet mask
+ description: ECA mgmt network subnet mask
+ security_group_name:
+ type: string
+ label: MMSC security group name
+ description: MMSC security group name
+
+resources:
+ mms_security_group:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: mmsc security group
+ name: {get_param: security_group_name}
+ rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0}
+ ]
+ eca_mgmt_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: {get_param: eca_mgmt_name}
+
+ eca_mgmt_network_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: eca_mgmt_name}
+ allocation_pools: [{"start": {get_param: eca_mgmt_start}, "end": {get_param: eca_mgmt_end}}]
+ cidr: {get_param: eca_mgmt_cidr}
+ #enable_dhcp: false
+ #gateway_ip: null
+ network_id: {get_resource: eca_mgmt_net}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/cmaui.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/cmaui.env
new file mode 100644
index 0000000000..2e0f4c0796
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/cmaui.env
@@ -0,0 +1,15 @@
+parameters:
+ cmaui_names: ZRDM1MMSC02CMI001,ZRDM1MMSC02CMI002
+ cmaui_flavor: m1.large
+ cmaui_image: cmaui-5.0.2.5_v25
+ cmaui_cinder_volume_size: 55
+ oam_net_name: oam_protected_net_0
+ oam_network_netmask: 255.255.255.192
+ oam_network_gateway: 10.20.30.1
+ external_dns: 155.165.201.250
+ external_ntp: 155.165.194.100
+ security_group_name: mmsc_security_group_1
+ availability_zone_0: nova
+ timezone: UTC
+ cmaui_oam_ips: 107.250.172.42,107.250.172.43
+ CMAUI_volume_type: Platinum \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/cmaui.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/cmaui.yml
new file mode 100644
index 0000000000..1b575858fb
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/cmaui.yml
@@ -0,0 +1,171 @@
+heat_template_version: 2013-05-23
+
+#################################
+#
+# Changes from MSO 01/26/2016
+# Updated per ECOMP feedback
+#
+#################################
+
+description: cmaui server template for vMMSC
+
+parameters:
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_cinder_volume_size:
+ type: number
+ label: CMAUI Cinder volume size
+ description: the size of the CMAUI Cinder volume
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ oam_net_name:
+ type: string
+ description: UID of OAM network
+ oam_network_netmask:
+ type: string
+ label: oam network netmask
+ description: oam network gateway
+ oam_network_gateway:
+ type: string
+ label: oam network gateway
+ description: oam network gateway
+ external_dns:
+ type: string
+ label: dns server
+ description: dns server
+ external_ntp:
+ type: string
+ label: ntp server
+ description: ntp server
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ timezone:
+ type: string
+ label: timezone
+ description: timezone
+ cmaui_oam_ips:
+ type: comma_delimited_list
+ label: CMAUI oam_net IP addresses
+ description: CMAUI oam_net IP addresses
+ CMAUI_volume_type:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+
+resources:
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_0 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ cmaui.mgmt.ip=${cmaui.mgmt.ip}
+ cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
+ cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
+ cmaui.external.dns=${cmaui.external.dns}
+ cmaui.external.ntp=${cmaui.external.ntp}
+ cmaui.node=${cmaui.node}
+ cmaui.timezone=${cmaui.timezone}
+ params:
+ ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 0]}
+ ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${cmaui.external.dns}: {get_param: external_dns}
+ ${cmaui.external.ntp}: {get_param: external_ntp}
+ ${cmaui.node}: {get_param: [cmaui_names, 0]}
+ ${cmaui.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ cmaui_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: cmaui_cinder_volume_size}
+ volume_type: {get_param: CMAUI_volume_type}
+
+ cmaui_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: cmaui_volume}
+ instance_uuid: {get_resource: server_cmaui}
+
+ cmaui_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_cmaui1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 1]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui1_port_0 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ cmaui.mgmt.ip=${cmaui.mgmt.ip}
+ cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
+ cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
+ cmaui.external.dns=${cmaui.external.dns}
+ cmaui.external.ntp=${cmaui.external.ntp}
+ cmaui.node=${cmaui.node}
+ cmaui.timezone=${cmaui.timezone}
+ params:
+ ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 1]}
+ ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${cmaui.external.dns}: {get_param: external_dns}
+ ${cmaui.external.ntp}: {get_param: external_ntp}
+ ${cmaui.node}: {get_param: [cmaui_names, 1]}
+ ${cmaui.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ cmaui1_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: cmaui_cinder_volume_size}
+ volume_type: {get_param: CMAUI_volume_type}
+
+ cmaui1_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: cmaui1_volume}
+ instance_uuid: {get_resource: server_cmaui1}
+
+ cmaui1_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 1]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/eca_oam.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/eca_oam.env
new file mode 100644
index 0000000000..f9991722b3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/eca_oam.env
@@ -0,0 +1,20 @@
+parameters:
+ eca_names: ZRDM1MMSC02OAM001,ZRDM1MMSC02OAM002
+ arb_names: ZRDM1MMSC02ARB001
+ oam_image_name: ECABASE
+ oam_flavor: lc.xlarge4
+ arbiter_flavor: m1.large2
+ availability_zone_0: nova
+ oam_net_name: oam_protected_net_0
+ eca_mgmt_net_name: int_mms_eca_mgmt_net_1
+ eca_oam_ips: 107.250.172.44,107.250.172.45
+ eca_eca_mgmt_ips: 172.25.137.242,172.25.137.243
+ eca_oam_gateway: 107.250.172.1
+ arb_oam_ips: 107.250.172.46
+ arb_eca_mgmt_ips: 172.25.137.244
+ security_group_name: mmsc_security_group_1
+ oam_volume_size: 1800
+ arb_volume_size: 40
+ swift_eca_url: http://object-store.rdm2.cci.com:8080/v1/AUTH_1bbab536a19b4756926e7d0ec1eb543c/eca
+ ECA_OAM_volume_type: Platinum
+ ARB_volume_type: Platinum
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/eca_oam.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/eca_oam.yaml
new file mode 100644
index 0000000000..84e8f7c6c9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/eca_oam.yaml
@@ -0,0 +1,379 @@
+heat_template_version: 2013-05-23
+
+##########################################################
+#
+# Changes from MSO
+# - Updated per ECOMP Feedback
+#
+#
+##########################################################
+
+description: This stack creates two ECA OAM VM and one ARB VM
+
+parameters:
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-ECA_id
+ eca_names:
+ type: comma_delimited_list
+ label: oam servers names
+ description: the names of the OAM1,OAM2 VM instances
+ arb_names:
+ type: comma_delimited_list
+ label: arbiter server names
+ description: the names of the arbiter VM instances
+ oam_image_name:
+ type: string
+ label: image name
+ description: the OAM image name
+ oam_flavor:
+ type: string
+ label: flavor name
+ description: OAM flavor name
+ arbiter_flavor:
+ type: string
+ label: flavor name
+ description: arbiter flavor name
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ oam_net_name:
+ type: string
+ label: oam network name
+ description: the name of the oam network
+ eca_mgmt_net_name:
+ type: string
+ label: internal network name
+ description: the name of the internal network
+ eca_oam_ips:
+ type: comma_delimited_list
+ label: oam network ips
+ description: the ips of oam networks for eca VM
+ eca_oam_gateway:
+ type: string
+ label: oam1 oam gateway
+ description: the ip of oam gateway
+ eca_eca_mgmt_ips:
+ type: comma_delimited_list
+ label: eca_mgmt network ips for eca VM
+ description: internal eca_mgmt network ips for eca VM
+ arb_oam_ips:
+ type: comma_delimited_list
+ label: oam network ips for arb VM
+ description: oam network ips for eca VM
+ arb_eca_mgmt_ips:
+ type: comma_delimited_list
+ label: eca_mgmt network ips
+ description: internal eca_mgmt network ips for arb VM
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ oam_volume_size:
+ type: number
+ label: volume size
+ description: the size of the OAM volume
+ arb_volume_size:
+ type: number
+ label: volume size
+ description: the size of the ARB volume
+ swift_eca_url:
+ type: string
+ label: Swift URL
+ description: Base URL for eca swift object store
+ ECA_OAM_volume_type:
+ type: string
+ label: eca oam vm volume type
+ description: the name of the target volume backend
+ ARB_volume_type:
+ type: string
+ label: arb vm volume type
+ description: the name of the target volume backend
+
+resources:
+ oam1_instance:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: [eca_names, 0]}
+ image: {get_param: oam_image_name}
+ flavor: {get_param: oam_flavor}
+ availability_zone: {get_param: availability_zone_0}
+ networks:
+ - port: {get_resource: oam1_int_port}
+ - port: {get_resource: oam1_mgmt_port}
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ sed -i s/HOSTNAME.*/"HOSTNAME=oam1_hostname"/g /etc/sysconfig/network
+ eth1_ip_address='oam1_mgt_ip'
+ eth1_gateway='oam_gateway'
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ mkdir /etc/puppet/files/roles/transcoder
+ mkdir /etc/puppet/files/roles/oam_primary
+ curl swift_url/etc/puppet/manifests/roles/oam_primary.pp > /etc/puppet/manifests/roles/oam_primary.pp
+ curl swift_url/etc/puppet/manifests/roles/transcoder.pp > /etc/puppet/manifests/roles/transcoder.pp
+ curl swift_url/etc/puppet/files/roles/oam_primary/config.yaml > /etc/puppet/files/roles/oam_primary/config.yaml
+ curl swift_url/etc/puppet/files/roles/transcoder/config.yaml > /etc/puppet/files/roles/transcoder/config.yaml
+ curl swift_url/etc/puppet/files/roles/transcoder/hpm.conf > /etc/puppet/files/roles/transcoder/hpm.conf
+ curl swift_url/etc/puppet/files/roles/transcoder/trx.conf > /etc/puppet/files/roles/transcoder/trx.conf
+ curl swift_url/etc/puppet/files/roles/transcoder/plugins-mo.conf > /etc/puppet/files/roles/transcoder/plugins-mo.conf
+ curl swift_url/etc/puppet/files/global/11-customer.conf > /etc/puppet/files/global/11-customer.conf
+ curl swift_url/etc/puppet/manifests/site.pp > /etc/puppet/manifests/site.pp
+ curl swift_url/scripts/van-init-replicaset > /usr/sbin/van-init-replicaset
+ van-role oam_primary > /root/startup-van-role.out
+ curl swift_url/scripts/fdisk-keystrokes > /root/fdisk-keystrokes
+ fdisk /dev/vdb < /root/fdisk-keystrokes
+ curl swift_url/scripts/os-conf-cinder-vol > /root/os-conf-cinder-vol
+ chmod 755 /root/os-conf-cinder-vol
+ /root/os-conf-cinder-vol 2>> /tmp/cinder_volume.log
+ params:
+ oam1_mgt_ip: {get_param: [eca_oam_ips, 0] }
+ oam_gateway: {get_param: eca_oam_gateway }
+ oam1_hostname: {get_param: [eca_names, 0]}
+ swift_url: {get_param: swift_eca_url}
+
+ oam1_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [eca_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ oam1_int_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: eca_mgmt_net_name}
+ fixed_ips: [{"ip_address": {get_param: [eca_eca_mgmt_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ oam1_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: oam_volume_size}
+ volume_type: {get_param: ECA_OAM_volume_type}
+
+ oam1_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: oam1_volume}
+ instance_uuid: {get_resource: oam1_instance}
+
+ oam2_instance:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: [eca_names, 1]}
+ image: {get_param: oam_image_name}
+ flavor: {get_param: oam_flavor}
+ availability_zone: {get_param: availability_zone_0}
+ networks:
+ - port: {get_resource: oam2_int_port}
+ - port: {get_resource: oam2_mgmt_port}
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ sed -i s/HOSTNAME.*/"HOSTNAME=oam2_hostname"/g /etc/sysconfig/network
+ eth1_ip_address='oam2_mgt_ip'
+ eth1_gateway='oam_gateway'
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ curl swift_url/etc/puppet/manifests/roles/oam_secondary.pp > /etc/puppet/manifests/roles/oam_secondary.pp
+ curl swift_url/etc/puppet/files/global/config.yaml > /etc/puppet/files/global/config.yaml
+ curl swift_url/etc/puppet/files/global/11-customer.conf > /etc/puppet/files/global/11-customer.conf
+ van-role oam_secondary > /root/startup-van-role.out
+ curl swift_url/scripts/fdisk-keystrokes > /root/fdisk-keystrokes
+ fdisk /dev/vdb < /root/fdisk-keystrokes
+ curl swift_url/scripts/os-conf-cinder-vol > /root/os-conf-cinder-vol
+ chmod 755 /root/os-conf-cinder-vol
+ /root/os-conf-cinder-vol 2>> /tmp/cinder_volume.log
+
+ params:
+ oam2_mgt_ip: {get_param: [eca_oam_ips, 1] }
+ oam2_hostname: {get_param: [eca_names, 1]}
+ swift_url: {get_param: swift_eca_url}
+ oam_gateway: {get_param: eca_oam_gateway }
+
+ oam2_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [eca_oam_ips, 1]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ oam2_int_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: eca_mgmt_net_name}
+ fixed_ips: [{"ip_address": {get_param: [eca_eca_mgmt_ips, 1]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ oam2_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: oam_volume_size}
+ volume_type: {get_param: ECA_OAM_volume_type}
+
+ oam2_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: oam2_volume}
+ instance_uuid: {get_resource: oam2_instance}
+
+ arb_instance:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: [arb_names, 0]}
+ image: {get_param: oam_image_name}
+ flavor: {get_param: arbiter_flavor}
+ availability_zone: {get_param: availability_zone_0}
+ networks:
+ - port: {get_resource: arb_int_port}
+ - port: {get_resource: arb_mgmt_port}
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ sed -i s/HOSTNAME.*/"HOSTNAME=arb_hostname"/g /etc/sysconfig/network
+ eth1_ip_address='arb_mgt_ip'
+ eth1_gateway='oam_gateway'
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ curl swift_url/etc/puppet/manifests/roles/oam_arbiter.pp > /etc/puppet/manifests/roles/oam_arbiter.pp
+ curl swift_url/etc/puppet/files/global/config.yaml > /etc/puppet/files/global/config.yaml
+ curl swift_url/etc/puppet/files/global/11-customer.conf > /etc/puppet/files/global/11-customer.conf
+ van-role oam_arbiter > /root/startup-van-role.out
+ curl swift_url/scripts/fdisk-keystrokes > /root/fdisk-keystrokes
+ fdisk /dev/vdb < /root/fdisk-keystrokes
+ curl swift_url/scripts/os-conf-cinder-vol > /root/os-conf-cinder-vol
+ chmod 755 /root/os-conf-cinder-vol
+ /root/os-conf-cinder-vol 2>> /tmp/cinder_volume.log
+ params:
+ arb_mgt_ip: {get_param: [arb_oam_ips, 0] }
+ arb_hostname: {get_param: [arb_names, 0]}
+ swift_url: {get_param: swift_eca_url}
+ oam_gateway: {get_param: eca_oam_gateway }
+
+ arb_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [arb_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ arb_int_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: eca_mgmt_net_name}
+ fixed_ips: [{"ip_address": {get_param: [arb_eca_mgmt_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ arb_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: arb_volume_size}
+ volume_type: {get_param: ARB_volume_type}
+ arb_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: arb_volume}
+ instance_uuid: {get_resource: arb_instance}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/sg_eca_mgmt.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/sg_eca_mgmt.env
new file mode 100644
index 0000000000..8012063ac0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/allHeatsAreBase/inputs/sg_eca_mgmt.env
@@ -0,0 +1,7 @@
+parameters:
+ eca_mgmt_name: int_eca_mgmt_net_1
+ eca_mgmt_cidr: 172.25.137.192/26
+ eca_mgmt_netmask: 255.255.255.192
+ eca_mgmt_start: 172.25.137.195
+ eca_mgmt_end: 172.25.137.254
+ security_group_name: mmsc_security_group_1
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/expectedOutput/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/expectedOutput/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..4814d1c086
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/expectedOutput/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,347 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.eca_oam:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ metadata:
+ type: string
+ description: cmaui metadata
+ oam_flavor:
+ type: string
+ description: OAM flavor name
+ default: lc.xlarge4
+ eca_eca_mgmt_ips:
+ type: list
+ description: internal eca_mgmt network ips for eca VM
+ default:
+ - 172.25.137.242
+ - 172.25.137.243
+ entry_schema:
+ type: string
+ eca_mgmt_net_name:
+ type: string
+ description: the name of the internal network
+ default: int_mms_eca_mgmt_net_1
+ ECA_OAM_volume_type:
+ type: string
+ description: the name of the target volume backend
+ default: Platinum
+ arb_eca_mgmt_ips:
+ type: list
+ description: internal eca_mgmt network ips for arb VM
+ default:
+ - 172.25.137.244
+ entry_schema:
+ type: string
+ networks:
+ type: string
+ description: cmaui network name
+ cmaui_name:
+ type: string
+ description: cmaui name
+ arb_volume_size:
+ type: float
+ description: the size of the ARB volume
+ default: 40
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-ECA_id
+ availability_zone_0:
+ type: string
+ description: availabilityzone name
+ default: nova
+ oam_image_name:
+ type: string
+ description: the OAM image name
+ default: ECABASE
+ oam_volume_size:
+ type: float
+ description: the size of the OAM volume
+ default: 1800
+ swift_eca_url:
+ type: string
+ description: Base URL for eca swift object store
+ default: http://object-store.rdm2.cci.com:8080/v1/AUTH_1bbab536a19b4756926e7d0ec1eb543c/eca
+ oam_net_name:
+ type: string
+ description: the name of the oam network
+ default: oam_protected_net_0
+ ARB_volume_type:
+ type: string
+ description: the name of the target volume backend
+ default: Platinum
+ eca_names:
+ type: list
+ description: the names of the OAM1,OAM2 VM instances
+ default:
+ - ZRDM1MMSC02OAM001
+ - ZRDM1MMSC02OAM002
+ entry_schema:
+ type: string
+ arbiter_flavor:
+ type: string
+ description: arbiter flavor name
+ default: m1.large2
+ eca_oam_ips:
+ type: list
+ description: the ips of oam networks for eca VM
+ default:
+ - 107.250.172.44
+ - 107.250.172.45
+ entry_schema:
+ type: string
+ security_group_name:
+ type: string
+ description: the name of security group
+ default: mmsc_security_group_1
+ user_data:
+ type: string
+ description: cmaui user data
+ cmaui_image:
+ type: string
+ description: cmaui image
+ arb_names:
+ type: list
+ description: the names of the arbiter VM instances
+ default:
+ - ZRDM1MMSC02ARB001
+ entry_schema:
+ type: string
+ cmaui_flavor:
+ type: string
+ description: cmaui flavor name
+ user_data_format:
+ type: string
+ description: cmaui user data
+ eca_oam_gateway:
+ type: string
+ description: the ip of oam gateway
+ default: 107.250.172.1
+ arb_oam_ips:
+ type: list
+ description: oam network ips for eca VM
+ default:
+ - 107.250.172.46
+ entry_schema:
+ type: string
+ requirements:
+ - link_arb_mgmt_port:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_oam2_mgmt_port:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_arb_instance:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - local_storage_oam1_instance:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_oam1_int_port:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_oam1_mgmt_port:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_arb_int_port:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_oam2_int_port:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_oam2_instance:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ capabilities:
+ attachment_oam2_volume:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_oam2_instance:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_oam2_int_port:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_oam1_volume:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_oam1_instance:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_oam2_instance:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_arb_instance:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_oam1_instance:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_arb_instance:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_arb_instance:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_arb_instance:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_oam1_int_port:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_arb_volume:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_oam1_instance:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_oam2_instance:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_oam2_instance:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_oam1_instance:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_oam2_instance:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_arb_instance:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_oam1_mgmt_port:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_arb_int_port:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_arb_mgmt_port:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_oam2_mgmt_port:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_oam1_instance:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/expectedOutput/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/expectedOutput/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..d9f89dfc0e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/expectedOutput/MainServiceTemplate.yaml
@@ -0,0 +1,4193 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.nems_be:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.lb:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.eca_trx:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.nems_fe:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.mmsc:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ lb_flavor_name:
+ label: Load balancer flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: the flavor name of MMSC load balancer instance
+ default: m1.xlarge
+ ha_net_local_ip2:
+ label: ha net network local ip2
+ hidden: false
+ immutable: false
+ type: string
+ description: the local ip2 of the ha network
+ default: 172.26.1.4
+ mmsc_dmz_protected_snat_ips:
+ label: mmsc dmz_protected snat ips
+ hidden: false
+ immutable: false
+ type: list
+ description: mmsc dmz_protected snat ips
+ default:
+ - 107.239.14.24
+ - 107.239.14.25
+ - 107.239.14.26
+ - 107.239.14.27
+ entry_schema:
+ type: string
+ ha_net_local_ip1:
+ label: ha net network local ip1
+ hidden: false
+ immutable: false
+ type: string
+ description: the local ip1 of the ha network
+ default: 172.26.1.3
+ mms_traffic_end:
+ label: mmsc traffic end IP
+ hidden: false
+ immutable: false
+ type: string
+ description: mmsc traffic end IP
+ default: 172.26.2.254
+ nems_traffic_end:
+ label: nems traffic end
+ hidden: false
+ immutable: false
+ type: string
+ description: nems traffic end
+ default: 172.26.3.254
+ mmsc_cinder_volume_size:
+ label: MMSC Cinder volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the MMSC Cinder volume
+ default: 480
+ nems_internal_cidr:
+ label: nems ineternal cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: nems internal cidr
+ default: 172.26.6.0/24
+ eca_mgmt_cidr:
+ label: eca management cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: eca management cidr
+ default: 172.25.137.192/26
+ nems_traffic_start:
+ label: nems traffic start
+ hidden: false
+ immutable: false
+ type: string
+ description: nems traffic start
+ default: 172.26.3.3
+ eca_trx_names:
+ label: ECA_TRX server names
+ hidden: false
+ immutable: false
+ type: list
+ description: ECA_TRX server names
+ default:
+ - ZRDM1MMSC03TRX001
+ - ZRDM1MMSC03TRX002
+ - ZRDM1MMSC03TRX003
+ - ZRDM1MMSC03TRX004
+ - ZRDM1MMSC03TRX005
+ - ZRDM1MMSC03TRX006
+ - ZRDM1MMSC03TRX007
+ - ZRDM1MMSC03TRX008
+ - ZRDM1MMSC03TRX009
+ - ZRDM1MMSC03TRX010
+ - ZRDM1MMSC03TRX011
+ - ZRDM1MMSC03TRX012
+ - ZRDM1MMSC03TRX013
+ - ZRDM1MMSC03TRX014
+ - ZRDM1MMSC03TRX015
+ - ZRDM1MMSC03TRX016
+ - ZRDM1MMSC03TRX017
+ - ZRDM1MMSC03TRX018
+ - ZRDM1MMSC03TRX019
+ - ZRDM1MMSC03TRX020
+ entry_schema:
+ type: string
+ nems_internal_name:
+ label: nems internal network name
+ hidden: false
+ immutable: false
+ type: string
+ description: nems internal network name
+ default: int_mms_nems_internal_net_2
+ nems_traffic_net_local_ip1:
+ label: nems traffic network local ip1
+ hidden: false
+ immutable: false
+ type: string
+ description: the local ip1 of the nems traffic network
+ default: 172.26.3.3
+ nems_traffic_net_local_ip2:
+ label: nems traffic network local ip2
+ hidden: false
+ immutable: false
+ type: string
+ description: the local ip2 of the nems traffic network
+ default: 172.26.3.4
+ nems_fe_names:
+ label: NEMS_FE server names
+ hidden: false
+ immutable: false
+ type: list
+ description: NEMS_FE server names
+ default:
+ - ZRDM1MMSC03NFE001
+ - ZRDM1MMSC03NFE002
+ entry_schema:
+ type: string
+ nems_be_nems_imap_net_ips:
+ label: nems imap_net IPs for NEMS_BE
+ hidden: false
+ immutable: false
+ type: string
+ description: nems imap net IPs for NEMS_BE
+ default: 172.26.7.13
+ nems_be_names:
+ label: NEMS_BE server names
+ hidden: false
+ immutable: false
+ type: string
+ description: NEMS_BE server names
+ default: ZRDM1MMSC03NBE001
+ nems_traffic_netmask:
+ label: NEMS traffic network subnet mask
+ hidden: false
+ immutable: false
+ type: string
+ description: NEMS traffic network subnet mask
+ default: 255.255.255.0
+ nems_fe_nems_imap_net_ips:
+ label: nems_imap_net IPs for NEMS_FE
+ hidden: false
+ immutable: false
+ type: list
+ description: nems_imap_net IPs for NEMS_FE
+ default:
+ - 172.26.7.11
+ - 172.26.7.12
+ entry_schema:
+ type: string
+ nems_fe_nems_user_web_net_ips:
+ label: nems_web_user_net IPs for NEMS_FE
+ hidden: false
+ immutable: false
+ type: list
+ description: nems_web_user_net IPs for NEMS_FE
+ default:
+ - 172.26.4.11
+ - 172.26.4.12
+ entry_schema:
+ type: string
+ nems_user_web_gateway:
+ label: NEMS user web network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: NEMS user web network gateway
+ default: 172.26.4.1
+ nems_imap_end:
+ label: nems imap end
+ hidden: false
+ immutable: false
+ type: string
+ description: nems imap end
+ default: 172.26.7.254
+ eca_traffic_net_local_ip1:
+ label: eca traffic network local ip1
+ hidden: false
+ immutable: false
+ type: string
+ description: the local ip1 of the eca traffic network
+ default: 172.26.5.3
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ default: cmaui-5.0.2.5_v25
+ eca_traffic_net_local_ip2:
+ label: eca traffic network local ip2
+ hidden: false
+ immutable: false
+ type: string
+ description: the local ip2 of the eca traffic network
+ default: 172.26.5.4
+ nems_volume_size:
+ label: nems fe volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: nems fe volume size
+ default: 50
+ mms_traffic_start:
+ label: mmsc traffic start IP
+ hidden: false
+ immutable: false
+ type: string
+ description: mmsc traffic start IP
+ default: 172.26.2.3
+ ha_net_start:
+ label: ha net start
+ hidden: false
+ immutable: false
+ type: string
+ description: ha net start
+ default: 172.26.1.3
+ nems_imap_gateway:
+ label: nems imap gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: nems imap gateway
+ default: 172.26.7.1
+ mmsc_core_virtual_server_ips:
+ label: mmsc core virtual server ips
+ hidden: false
+ immutable: false
+ type: list
+ description: mmsc core virtual server ips
+ default:
+ - 172.31.10.21
+ - 172.31.10.22
+ entry_schema:
+ type: string
+ cmaui_oam_ips:
+ label: CMAUI oam_net IP addresses
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI oam_net IP addresses
+ default:
+ - 107.250.172.42
+ - 107.250.172.43
+ entry_schema:
+ type: string
+ CMAUI_volume_type:
+ label: CMAUI vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ default: Platinum
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ default:
+ - ZRDM1MMSC02CMI001
+ - ZRDM1MMSC02CMI002
+ entry_schema:
+ type: string
+ eca_trx_eca_traffic_net_ips:
+ label: eca traffic net IPs for ECA_TRX
+ hidden: false
+ immutable: false
+ type: list
+ description: eca traffic net IPs for ECA_TRX
+ default:
+ - 172.26.5.11
+ - 172.26.5.12
+ - 172.26.5.13
+ - 172.26.5.14
+ - 172.26.5.15
+ - 172.26.5.16
+ - 172.26.5.17
+ - 172.26.5.18
+ - 172.26.5.19
+ - 172.26.5.20
+ - 172.26.5.21
+ - 172.26.5.22
+ - 172.26.5.23
+ - 172.26.5.24
+ - 172.26.5.25
+ - 172.26.5.26
+ - 172.26.5.27
+ - 172.26.5.28
+ - 172.26.5.29
+ - 172.26.5.30
+ entry_schema:
+ type: string
+ eca_trx_image:
+ label: Image for ECA TRX server
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for ECA TRX server
+ default: ECABASE
+ lb_names:
+ label: MMSC load balancer instance names
+ hidden: false
+ immutable: false
+ type: list
+ description: MMSC load balancer instance names
+ default:
+ - ZRDM1MMSC03ALB001
+ - ZRDM1MMSC03ALB002
+ entry_schema:
+ type: string
+ eca_mgmt_end:
+ label: eca management end
+ hidden: false
+ immutable: false
+ type: string
+ description: eca management end
+ default: 172.25.137.254
+ nems_user_web_end:
+ label: nems user web end
+ hidden: false
+ immutable: false
+ type: string
+ description: nems user web end
+ default: 172.26.4.254
+ eca_traffic_cidr:
+ label: eca traffic cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: eca traffic cidr
+ default: 172.26.5.0/24
+ ha_net_cidr:
+ label: ha net cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: ha net cidr
+ default: 172.26.1.0/24
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ default: nova
+ nems_fe_nems_internal_net_ips:
+ label: nems_internal_net IPs for NEMS_FE
+ hidden: false
+ immutable: false
+ type: list
+ description: nems_internal_net IPs for NEMS_FE
+ default:
+ - 172.26.6.11
+ - 172.26.6.12
+ entry_schema:
+ type: string
+ NEMS_FE_volume_type:
+ label: nems fe vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ default: Platinum
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ default: mmsc_security_group_1
+ nems_fe_nems_traffic_net_ips:
+ label: nems_traffic_net IPs for NEMS_FE
+ hidden: false
+ immutable: false
+ type: list
+ description: nems_traffic_net IPs for NEMS_FE
+ default:
+ - 172.26.3.11
+ - 172.26.3.12
+ entry_schema:
+ type: string
+ nems_imap_start:
+ label: nems imap start
+ hidden: false
+ immutable: false
+ type: string
+ description: nems imap start
+ default: 172.26.7.3
+ ha_net_name:
+ label: ha_failover network name
+ hidden: false
+ immutable: false
+ type: string
+ description: ha_failover network name
+ default: int_mms_ha_net_2
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ default: m1.large
+ eca_traffic_start:
+ label: eca traffic start
+ hidden: false
+ immutable: false
+ type: string
+ description: eca traffic start
+ default: 172.26.5.3
+ NEMS_BE_volume_type:
+ label: nems be vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ default: Platinum
+ lb_image_name:
+ label: MMSC load balancer image name
+ hidden: false
+ immutable: false
+ type: string
+ description: MMSC load balancer image name
+ default: BIGIP-11.5.3.0.0.163
+ nems_internal_start:
+ label: nems internal start
+ hidden: false
+ immutable: false
+ type: string
+ description: nems internal start
+ default: 172.26.6.3
+ nems_internal_gateway:
+ label: nems internal gw
+ hidden: false
+ immutable: false
+ type: string
+ description: nems internal gw
+ default: 172.26.6.1
+ dmz_protected_net_name:
+ label: UID of dmz_protected network
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of dmz_protected network
+ default: dmz_protected_net_0
+ nems_be_volume_size:
+ label: nems be volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: nems be volume size
+ default: 610
+ mms_traffic_netmask:
+ label: MMS traffic network subnet mask
+ hidden: false
+ immutable: false
+ type: string
+ description: MMS traffic network subnet mask
+ default: 255.255.255.0
+ nems_be_image:
+ label: Image for NEMS BE server
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for NEMS BE server
+ default: nems-2.1.2_v29
+ nems_user_web_net_local_ip1:
+ label: nems user web network local ip1
+ hidden: false
+ immutable: false
+ type: string
+ description: the local ip1 of the nems user web network
+ default: 172.26.4.3
+ eca_trx_mgmt_ips:
+ label: eca mgmt net IP for ECA_TRX
+ hidden: false
+ immutable: false
+ type: list
+ description: eca mgmt net IP for ECA_TRX
+ default:
+ - 172.25.137.202
+ - 172.25.137.203
+ - 172.25.137.204
+ - 172.25.137.205
+ - 172.25.137.206
+ - 172.25.137.207
+ - 172.25.137.208
+ - 172.25.137.209
+ - 172.25.137.210
+ - 172.25.137.211
+ - 172.25.137.212
+ - 172.25.137.213
+ - 172.25.137.214
+ - 172.25.137.215
+ - 172.25.137.216
+ - 172.25.137.217
+ - 172.25.137.218
+ - 172.25.137.219
+ - 172.25.137.220
+ - 172.25.137.221
+ entry_schema:
+ type: string
+ nems_user_web_cidr:
+ label: nems user web cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: nems user web cidr
+ default: 172.26.4.0/24
+ nems_user_web_net_local_ip2:
+ label: nems user web network local ip2
+ hidden: false
+ immutable: false
+ type: string
+ description: the local ip2 of the nems user web network
+ default: 172.26.4.4
+ nems_traffic_gateway:
+ label: NEMS traffic network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: NEMS traffic network gateway
+ default: 172.26.3.1
+ nems_imap_name:
+ label: nems imap name
+ hidden: false
+ immutable: false
+ type: string
+ description: nems imap name
+ default: int_mms_nems_imap_net_2
+ mms_traffic_net_floating_ip:
+ label: mmsc traffic floating ip
+ hidden: false
+ immutable: false
+ type: string
+ description: mmsc traffic floating ip
+ default: 172.26.2.5
+ nems_internal_netmask:
+ label: NEMS internal network subnet mask
+ hidden: false
+ immutable: false
+ type: string
+ description: NEMS internal network subnet mask
+ default: 255.255.255.0
+ nems_user_web_netmask:
+ label: NEMS user web network subnet mask
+ hidden: false
+ immutable: false
+ type: string
+ description: NEMS user web network subnet mask
+ default: 255.255.255.0
+ mms_traffic_net_local_ip1:
+ label: mmsc traffic network local ip1
+ hidden: false
+ immutable: false
+ type: string
+ description: the local ip1 of the mmsc traffic network
+ default: 172.26.2.3
+ mms_traffic_net_local_ip2:
+ label: mmsc traffic network local ip2
+ hidden: false
+ immutable: false
+ type: string
+ description: the local ip2 of the mmsc traffic network
+ default: 172.26.2.4
+ oam_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ default: oam_protected_net_0
+ external_ntp:
+ label: ntp server
+ hidden: false
+ immutable: false
+ type: string
+ description: ntp server
+ default: 155.165.194.100
+ mms_traffic_net_cidr:
+ label: MMS traffic network address (CIDR notation)
+ hidden: false
+ immutable: false
+ type: string
+ description: MMS traffic network address (CIDR notation)
+ default: 172.26.2.0/24
+ lb_dmz_protected_ips:
+ label: dmz protected network local ips for lb VM
+ hidden: false
+ immutable: false
+ type: list
+ description: local ips of the dmz protected network for lb VM
+ default:
+ - 107.239.14.19
+ - 107.239.14.20
+ entry_schema:
+ type: string
+ eca_mgmt_start:
+ label: eca management start
+ hidden: false
+ immutable: false
+ type: string
+ description: eca management start
+ default: 172.25.137.195
+ MMSC_volume_type:
+ label: MMSC vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ default: Platinum
+ nems_fe_flavor:
+ label: Flavor for NEMS FE server
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for NEMS FE server
+ default: m1.large2
+ eca_mgmt_netmask:
+ label: ECA mgmt network subnet mask
+ hidden: false
+ immutable: false
+ type: string
+ description: ECA mgmt network subnet mask
+ default: 255.255.255.192
+ oam_network_netmask:
+ label: oam network netmask
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ default: 255.255.255.192
+ oam_network_route_1:
+ label: oam network route 1
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network route 1
+ default: 155.165.201.250/32,107.250.172.1
+ oam_network_route_2:
+ label: oam network route 2
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network route 2
+ default: 155.165.194.100/32,107.250.172.1
+ mms_traffic_net_name:
+ label: Name of MMS traffic network
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of MMS traffic network
+ default: int_mms_mms_traffic_net_2
+ nems_user_web_name:
+ label: nems user web name
+ hidden: false
+ immutable: false
+ type: string
+ description: nems user web name
+ default: int_mms_nems_web_net_2
+ eca_traffic_net_floating_ip:
+ label: eca traffic floating ip
+ hidden: false
+ immutable: false
+ type: string
+ description: eca traffic floating ip
+ default: 172.26.5.5
+ eca_traffic_end:
+ label: eca traffic end
+ hidden: false
+ immutable: false
+ type: string
+ description: eca traffic end
+ default: 172.26.5.254
+ eca_trx_flavor:
+ label: Flavor for ECA TRX server
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for ECA TRX server
+ default: m1.xlarge
+ lb_oam_ips:
+ label: management network ips for mmsc lb
+ hidden: false
+ immutable: false
+ type: list
+ description: the ips of the management network for mmsc lb
+ default:
+ - 107.250.172.50
+ - 107.250.172.51
+ entry_schema:
+ type: string
+ nems_fe_oam_ips:
+ label: OAM_net IP for NEMS_FE
+ hidden: false
+ immutable: false
+ type: list
+ description: OAM_net IP for NEMS_FE
+ default:
+ - 107.250.172.64
+ - 107.250.172.65
+ entry_schema:
+ type: string
+ nems_be_flavor:
+ label: Flavor for NEMS BE server
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for NEMS BE server
+ default: m1.large2
+ lb_cor_direct_ips:
+ label: cor direct network local ips for lb VM
+ hidden: false
+ immutable: false
+ type: list
+ description: local ips of cor direct network for lb VM
+ default:
+ - 172.31.10.19
+ - 172.31.10.20
+ entry_schema:
+ type: string
+ nems_traffic_name:
+ label: nems traffic name
+ hidden: false
+ immutable: false
+ type: string
+ description: nems traffic name
+ default: int_mms_nems_traffic_net_2
+ timezone:
+ label: timezone
+ hidden: false
+ immutable: false
+ type: string
+ description: timezone
+ default: UTC
+ cmaui_cinder_volume_size:
+ label: CMAUI Cinder volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the CMAUI Cinder volume
+ default: 55
+ nems_user_web_start:
+ label: nems user web start
+ hidden: false
+ immutable: false
+ type: string
+ description: nems user web end
+ default: 172.26.4.3
+ mmsc_names:
+ label: MMSC server names
+ hidden: false
+ immutable: false
+ type: list
+ description: MMSC server names
+ default:
+ - ZRDM1MMSC03MMS001
+ - ZRDM1MMSC03MMS002
+ - ZRDM1MMSC03MMS003
+ - ZRDM1MMSC03MMS004
+ - ZRDM1MMSC03MMS005
+ entry_schema:
+ type: string
+ eca_mgmt_net_name:
+ label: eca management network ID
+ hidden: false
+ immutable: false
+ type: string
+ description: Network ID for eca management
+ default: int_eca_mgmt_net_1
+ eca_traffic_name:
+ label: eca traffic name
+ hidden: false
+ immutable: false
+ type: string
+ description: eca traffic name
+ default: int_mms_eca_traffic_net_2
+ nems_internal_end:
+ label: nems internal end
+ hidden: false
+ immutable: false
+ type: string
+ description: nems internal end
+ default: 172.26.6.254
+ nems_be_nems_internal_net_ips:
+ label: nems internal net IPs for NEMS_BE
+ hidden: false
+ immutable: false
+ type: string
+ description: nems internal net IPs for NEMS_BE
+ default: 172.26.6.13
+ mmsc_dmz_protected_virtual_server_ips:
+ label: mmsc dmz_protected virtual server ips
+ hidden: false
+ immutable: false
+ type: list
+ description: mmsc dmz_protected virtual server ips
+ default:
+ - 107.239.14.21
+ - 107.239.14.22
+ - 107.239.14.23
+ entry_schema:
+ type: string
+ cor_direct_net_name:
+ label: cor direct net UID
+ hidden: false
+ immutable: false
+ type: string
+ description: cor direct net
+ default: cor_direct_net_0
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ oam_network_gateway:
+ label: oam network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ default: 10.20.30.1
+ mmsc_flavor:
+ label: Flavor for MMSC server
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for MMSC server
+ default: lc.4xlarge4
+ ha_net_end:
+ label: ha net end
+ hidden: false
+ immutable: false
+ type: string
+ description: ha net end
+ default: 172.26.1.254
+ nems_imap_netmask:
+ label: nems imap subnet mask
+ hidden: false
+ immutable: false
+ type: string
+ description: nems imap subnet mask
+ default: 255.255.255.0
+ external_dns:
+ label: dns server
+ hidden: false
+ immutable: false
+ type: string
+ description: dns server
+ default: 155.165.201.250
+ eca_traffic_net_gateway:
+ label: eca_traffic network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: eca_traffic network gateway
+ default: 172.26.5.1
+ nems_be_oam_ips:
+ label: OAM net IPs for NEMS_BE
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM net IPs for NEMS_BE
+ default: 107.250.172.66
+ eca_trx_oam_ips:
+ label: OAM net IP for ECA_TRX
+ hidden: false
+ immutable: false
+ type: list
+ description: OAM net IP for ECA_TRX
+ default:
+ - 107.250.172.70
+ - 107.250.172.71
+ - 107.250.172.72
+ - 107.250.172.73
+ - 107.250.172.74
+ - 107.250.172.75
+ - 107.250.172.76
+ - 107.250.172.77
+ - 107.250.172.78
+ - 107.250.172.79
+ - 107.250.172.80
+ - 107.250.172.81
+ - 107.250.172.82
+ - 107.250.172.83
+ - 107.250.172.84
+ - 107.250.172.85
+ - 107.250.172.86
+ - 107.250.172.87
+ - 107.250.172.88
+ - 107.250.172.89
+ entry_schema:
+ type: string
+ mmsc_image:
+ label: Image for MMSC server
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for MMSC server
+ default: mmsc-6.0.2_v5
+ nems_imap_cidr:
+ label: nems imap cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: nems imap cidr
+ default: 172.26.7.0/24
+ eca_traffic_netmask:
+ label: ECA traffic network subnet mask
+ hidden: false
+ immutable: false
+ type: string
+ description: ECA traffic network subnet mask
+ default: 255.255.255.0
+ nems_fe_node_roles:
+ label: nems fe node roles
+ hidden: false
+ immutable: false
+ type: list
+ description: nems fe node roles
+ default:
+ - FE0
+ - FE1
+ entry_schema:
+ type: string
+ mmsc_mms_traffic_net_ips:
+ label: MMSC mms_traffic_net IP addresses
+ hidden: false
+ immutable: false
+ type: list
+ description: MMSC mms_traffic_net IP addresses
+ default:
+ - 172.26.2.11
+ - 172.26.2.12
+ - 172.26.2.13
+ - 172.26.2.14
+ - 172.26.2.15
+ entry_schema:
+ type: string
+ nems_traffic_net_floating_ip:
+ label: nems traffic floating ip
+ hidden: false
+ immutable: false
+ type: string
+ description: nems traffic floating ip
+ default: 172.26.3.5
+ mms_traffic_net_gateway:
+ label: MMS traffic network gateway address
+ hidden: false
+ immutable: false
+ type: string
+ description: MMS traffic network gateway address
+ default: 172.26.2.1
+ nems_fe_image:
+ label: Image for NEMS FE server
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for NEMS FE server
+ default: nems-2.1.2_v29
+ mmsc_oam_ips:
+ label: MMSC oam_net IP addresses
+ hidden: false
+ immutable: false
+ type: list
+ description: MMSC oam_net IP addresses
+ default:
+ - 107.250.172.54
+ - 107.250.172.55
+ - 107.250.172.56
+ - 107.250.172.57
+ - 107.250.172.58
+ entry_schema:
+ type: string
+ eca_mgmt_name:
+ label: eca management name
+ hidden: false
+ immutable: false
+ type: string
+ description: eca management name
+ default: int_eca_mgmt_net_1
+ nems_traffic_cidr:
+ label: nems traffic cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: nems traffic cidr
+ default: 172.26.3.0/24
+ nems_be_node_roles:
+ label: nems node roles
+ hidden: false
+ immutable: false
+ type: string
+ description: nems node roles
+ default: BE0
+ mmsc_core_snat_ips:
+ label: mmsc core snat ips
+ hidden: false
+ immutable: false
+ type: list
+ description: mmsc core snat ips
+ default:
+ - 172.31.10.23
+ - 172.31.10.24
+ - 172.31.10.25
+ - 172.31.10.26
+ - 172.31.10.27
+ entry_schema:
+ type: string
+ nems_user_web_net_floating_ip:
+ label: nems user web floating ip
+ hidden: false
+ immutable: false
+ type: string
+ description: nems user web floating ip
+ default: 172.26.4.5
+ node_templates:
+ server_eca_trx9:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 8
+ server_eca_trx8:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 7
+ server_eca_trx7:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 6
+ server_eca_trx6:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 5
+ server_eca_trx5:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 4
+ nems_internal_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ network_name:
+ get_input: nems_internal_name
+ subnets:
+ nems_internal_network_ip_subnet:
+ name:
+ get_input: nems_internal_name
+ cidr:
+ get_input: nems_internal_cidr
+ allocation_pools:
+ - start:
+ get_input: nems_internal_start
+ end:
+ get_input: nems_internal_end
+ server_eca_trx4:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 3
+ server_eca_trx3:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 2
+ server_eca_trx2:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 1
+ lb1_mgmt_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - lb_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb1_instance
+ relationship: tosca.relationships.network.BindsTo
+ lb2_mms_traffic_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: mms_traffic_net_local_ip2
+ allowed_address_pairs:
+ - ip_address:
+ get_input: mms_traffic_net_floating_ip
+ network: mms_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: mms_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb2_instance
+ relationship: tosca.relationships.network.BindsTo
+ nems_fe1_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - nems_fe_nems_traffic_net_ips
+ - 0
+ network: nems_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_nems_fe1
+ relationship: tosca.relationships.network.BindsTo
+ nems_fe2_port_3:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - nems_fe_nems_internal_net_ips
+ - 1
+ network: nems_internal_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_internal_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_nems_fe2
+ relationship: tosca.relationships.network.BindsTo
+ server_eca_trx1:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 0
+ nems_fe1_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - nems_fe_nems_user_web_net_ips
+ - 0
+ network: nems_user_web_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_user_web_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_nems_fe1
+ relationship: tosca.relationships.network.BindsTo
+ nems_fe2_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - nems_fe_nems_user_web_net_ips
+ - 1
+ network: nems_user_web_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_user_web_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_nems_fe2
+ relationship: tosca.relationships.network.BindsTo
+ nems_fe2_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - nems_fe_nems_traffic_net_ips
+ - 1
+ network: nems_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_nems_fe2
+ relationship: tosca.relationships.network.BindsTo
+ nems_fe1_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - nems_fe_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_nems_fe1
+ relationship: tosca.relationships.network.BindsTo
+ nems_fe2_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - nems_fe_oam_ips
+ - 1
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_nems_fe2
+ relationship: tosca.relationships.network.BindsTo
+ nems_fe1_port_3:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - nems_fe_nems_internal_net_ips
+ - 0
+ network: nems_internal_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_internal_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_nems_fe1
+ relationship: tosca.relationships.network.BindsTo
+ nems_fe1_port_4:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - nems_fe_nems_imap_net_ips
+ - 0
+ network: nems_imap_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_imap_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_nems_fe1
+ relationship: tosca.relationships.network.BindsTo
+ nems_fe2_port_4:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - nems_fe_nems_imap_net_ips
+ - 1
+ network: nems_imap_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_imap_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_nems_fe2
+ relationship: tosca.relationships.network.BindsTo
+ mms_security_group:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules
+ properties:
+ name:
+ get_input: security_group_name
+ description: mmsc security group
+ rules:
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ mmsc4_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ volume_type:
+ get_input: MMSC_volume_type
+ size: '(get_input : mmsc_cinder_volume_size) * 1024'
+ lb2_eca_traffic_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: eca_traffic_net_local_ip2
+ allowed_address_pairs:
+ - ip_address:
+ get_input: eca_traffic_net_floating_ip
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb2_instance
+ relationship: tosca.relationships.network.BindsTo
+ lb2_ha_net_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: ha_net_local_ip2
+ network: ha_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: ha_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb2_instance
+ relationship: tosca.relationships.network.BindsTo
+ nems_user_web_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ network_name:
+ get_input: nems_user_web_name
+ subnets:
+ nems_user_web_network_ip_subnet:
+ name:
+ get_input: nems_user_web_name
+ cidr:
+ get_input: nems_user_web_cidr
+ allocation_pools:
+ - start:
+ get_input: nems_user_web_start
+ end:
+ get_input: nems_user_web_end
+ lb1_ha_net_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: ha_net_local_ip1
+ network: ha_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: ha_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb1_instance
+ relationship: tosca.relationships.network.BindsTo
+ mmsc2_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ volume_type:
+ get_input: MMSC_volume_type
+ size: '(get_input : mmsc_cinder_volume_size) * 1024'
+ 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'
+ nems_traffic_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ network_name:
+ get_input: nems_traffic_name
+ subnets:
+ nems_traffic_network_ip_subnet:
+ name:
+ get_input: nems_traffic_name
+ cidr:
+ get_input: nems_traffic_cidr
+ allocation_pools:
+ - start:
+ get_input: nems_traffic_start
+ end:
+ get_input: nems_traffic_end
+ eca_trx16_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 15
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx16
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx19_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 18
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx19
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx16_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 15
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx16
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx19_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 18
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx19
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx15_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 14
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx15
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx19_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 18
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx19
+ relationship: tosca.relationships.network.BindsTo
+ lb1_nems_traffic_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: nems_traffic_net_local_ip1
+ allowed_address_pairs:
+ - ip_address:
+ get_input: nems_traffic_net_floating_ip
+ network: nems_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb1_instance
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx11_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 10
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx11
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx11_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 10
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx11
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx12_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 11
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx12
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx12_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 11
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx12
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx11_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 10
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx11
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx12_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 11
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx12
+ relationship: tosca.relationships.network.BindsTo
+ mmsc4_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - mmsc_oam_ips
+ - 3
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_mmsc4
+ relationship: tosca.relationships.network.BindsTo
+ cmaui1_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 1
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui1
+ relationship: tosca.relationships.network.BindsTo
+ mmsc3_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - mmsc_oam_ips
+ - 2
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_mmsc3
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx15_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 14
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx15
+ relationship: tosca.relationships.network.BindsTo
+ mmsc3_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - mmsc_mms_traffic_net_ips
+ - 2
+ network: mms_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: mms_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_mmsc3
+ relationship: tosca.relationships.network.BindsTo
+ mmsc4_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - mmsc_mms_traffic_net_ips
+ - 3
+ network: mms_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: mms_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_mmsc4
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx15_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 14
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx15
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx16_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 15
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx16
+ relationship: tosca.relationships.network.BindsTo
+ lb2_mgmt_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - lb_oam_ips
+ - 1
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb2_instance
+ relationship: tosca.relationships.network.BindsTo
+ mmsc5_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ volume_type:
+ get_input: MMSC_volume_type
+ size: '(get_input : mmsc_cinder_volume_size) * 1024'
+ eca_trx7_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 6
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx7
+ relationship: tosca.relationships.network.BindsTo
+ server_cmaui:
+ type: org.openecomp.resource.abstract.nodes.heat.eca_oam
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: eca_oamServiceTemplate.yaml
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ cmaui_image:
+ get_input: cmaui_image
+ cmaui_flavor:
+ get_input: cmaui_flavor
+ user_data_format: RAW
+ availability_zone_0:
+ get_input: availability_zone_0
+ user_data:
+ str_replace:
+ template: |
+ cmaui.mgmt.ip=${cmaui.mgmt.ip}
+ cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
+ cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
+ cmaui.external.dns=${cmaui.external.dns}
+ cmaui.external.ntp=${cmaui.external.ntp}
+ cmaui.node=${cmaui.node}
+ cmaui.timezone=${cmaui.timezone}
+ params:
+ ${cmaui.mgmt.netmask}:
+ get_input: oam_network_netmask
+ ${cmaui.node}:
+ get_input:
+ - cmaui_names
+ - 0
+ ${cmaui.mgmt.gateway}:
+ get_input: oam_network_gateway
+ ${cmaui.mgmt.ip}:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ ${cmaui.external.ntp}:
+ get_input: external_ntp
+ ${cmaui.timezone}:
+ get_input: timezone
+ ${cmaui.external.dns}:
+ get_input: external_dns
+ networks:
+ - port: cmaui_port_0
+ cmaui_name:
+ get_input:
+ - cmaui_names
+ - 0
+ eca_trx7_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 6
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx7
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx7_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 6
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx7
+ relationship: tosca.relationships.network.BindsTo
+ cmaui_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'
+ eca_trx3_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 2
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx3
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx3_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 2
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx3
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx3_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 2
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx3
+ relationship: tosca.relationships.network.BindsTo
+ mmsc1_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ volume_type:
+ get_input: MMSC_volume_type
+ size: '(get_input : mmsc_cinder_volume_size) * 1024'
+ nems_imap_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ network_name:
+ get_input: nems_imap_name
+ subnets:
+ nems_imap_network_ip_subnet:
+ name:
+ get_input: nems_imap_name
+ cidr:
+ get_input: nems_imap_cidr
+ allocation_pools:
+ - start:
+ get_input: nems_imap_start
+ end:
+ get_input: nems_imap_end
+ server_cmaui1:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - cmaui_names
+ - 1
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: cmaui1_volume
+ relationship: cmaui1_volume_attachment
+ lb2_dmz_protected_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - lb_dmz_protected_ips
+ - 1
+ allowed_address_pairs:
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_virtual_server_ips
+ - 0
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_virtual_server_ips
+ - 1
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_virtual_server_ips
+ - 2
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_snat_ips
+ - 0
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_snat_ips
+ - 1
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_snat_ips
+ - 2
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_snat_ips
+ - 3
+ network:
+ get_input: dmz_protected_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb2_instance
+ relationship: tosca.relationships.network.BindsTo
+ lb1_eca_traffic_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: eca_traffic_net_local_ip1
+ allowed_address_pairs:
+ - ip_address:
+ get_input: eca_traffic_net_floating_ip
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb1_instance
+ relationship: tosca.relationships.network.BindsTo
+ lb1_dmz_protected_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - lb_dmz_protected_ips
+ - 0
+ allowed_address_pairs:
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_virtual_server_ips
+ - 0
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_virtual_server_ips
+ - 1
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_virtual_server_ips
+ - 2
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_snat_ips
+ - 0
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_snat_ips
+ - 1
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_snat_ips
+ - 2
+ - ip_address:
+ get_input:
+ - mmsc_dmz_protected_snat_ips
+ - 3
+ network:
+ get_input: dmz_protected_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb1_instance
+ relationship: tosca.relationships.network.BindsTo
+ lb1_mms_traffic_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: mms_traffic_net_local_ip1
+ allowed_address_pairs:
+ - ip_address:
+ get_input: mms_traffic_net_floating_ip
+ network: mms_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: mms_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb1_instance
+ relationship: tosca.relationships.network.BindsTo
+ eca_mgmt_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ network_name:
+ get_input: eca_mgmt_name
+ subnets:
+ eca_mgmt_network_ip_subnet:
+ name:
+ get_input: eca_mgmt_name
+ cidr:
+ get_input: eca_mgmt_cidr
+ allocation_pools:
+ - start:
+ get_input: eca_mgmt_start
+ end:
+ get_input: eca_mgmt_end
+ eca_trx1_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 0
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx1
+ relationship: tosca.relationships.network.BindsTo
+ nems2_fe_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ volume_type:
+ get_input: NEMS_FE_volume_type
+ size: '(get_input : nems_volume_size) * 1024'
+ server_nems_be1:
+ type: org.openecomp.resource.vfc.nodes.heat.nems_be
+ properties:
+ flavor:
+ get_input: nems_be_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: nems_be_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input: nems_be_names
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: nems_be_volume
+ relationship: nems_volume_attachment
+ server_nems_fe1:
+ type: org.openecomp.resource.vfc.nodes.heat.nems_fe
+ properties:
+ flavor:
+ get_input: nems_fe_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: nems_fe_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - nems_fe_names
+ - 0
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: nems1_fe_volume
+ relationship: nems1_fe_volume_attachment
+ server_nems_fe2:
+ type: org.openecomp.resource.vfc.nodes.heat.nems_fe
+ properties:
+ flavor:
+ get_input: nems_fe_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: nems_fe_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - nems_fe_names
+ - 1
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: nems2_fe_volume
+ relationship: nems2_fe_volume_attachment
+ lb2_cor_direct_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - lb_cor_direct_ips
+ - 1
+ allowed_address_pairs:
+ - ip_address:
+ get_input:
+ - mmsc_core_virtual_server_ips
+ - 0
+ - ip_address:
+ get_input:
+ - mmsc_core_virtual_server_ips
+ - 1
+ - ip_address:
+ get_input:
+ - mmsc_core_snat_ips
+ - 0
+ - ip_address:
+ get_input:
+ - mmsc_core_snat_ips
+ - 1
+ - ip_address:
+ get_input:
+ - mmsc_core_snat_ips
+ - 2
+ - ip_address:
+ get_input:
+ - mmsc_core_snat_ips
+ - 3
+ - ip_address:
+ get_input:
+ - mmsc_core_snat_ips
+ - 4
+ network:
+ get_input: cor_direct_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb2_instance
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx20_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 19
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx20
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx20_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 19
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx20
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx20_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 19
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx20
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx8_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 7
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx8
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx6_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 5
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx6
+ relationship: tosca.relationships.network.BindsTo
+ lb2_nems_user_web_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: nems_user_web_net_local_ip2
+ allowed_address_pairs:
+ - ip_address:
+ get_input: nems_user_web_net_floating_ip
+ network: nems_user_web_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_user_web_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb2_instance
+ relationship: tosca.relationships.network.BindsTo
+ lb2_instance:
+ type: org.openecomp.resource.vfc.nodes.heat.lb
+ properties:
+ flavor:
+ get_input: lb_flavor_name
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: lb_image_name
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - lb_names
+ - 1
+ eca_trx6_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 5
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx6
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx8_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 7
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx8
+ relationship: tosca.relationships.network.BindsTo
+ lb1_nems_user_web_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: nems_user_web_net_local_ip1
+ allowed_address_pairs:
+ - ip_address:
+ get_input: nems_user_web_net_floating_ip
+ network: nems_user_web_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_user_web_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb1_instance
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx6_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 5
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx6
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx8_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 7
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx8
+ relationship: tosca.relationships.network.BindsTo
+ ha_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ network_name:
+ get_input: ha_net_name
+ subnets:
+ ha_net_ip_subnet:
+ name:
+ get_input: ha_net_name
+ cidr:
+ get_input: ha_net_cidr
+ allocation_pools:
+ - start:
+ get_input: ha_net_start
+ end:
+ get_input: ha_net_end
+ server_mmsc1:
+ type: org.openecomp.resource.vfc.nodes.heat.mmsc
+ properties:
+ flavor:
+ get_input: mmsc_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: mmsc_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - mmsc_names
+ - 0
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: mmsc1_volume
+ relationship: mmsc1_volume_attachment
+ nems_be1_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: nems_be_oam_ips
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_nems_be1
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx2_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 1
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx2
+ relationship: tosca.relationships.network.BindsTo
+ server_mmsc2:
+ type: org.openecomp.resource.vfc.nodes.heat.mmsc
+ properties:
+ flavor:
+ get_input: mmsc_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: mmsc_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - mmsc_names
+ - 1
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: mmsc2_volume
+ relationship: mmsc2_volume_attachment
+ nems_be1_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: nems_be_nems_internal_net_ips
+ network: nems_internal_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_internal_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_nems_be1
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx2_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 1
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx2
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx4_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 3
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx4
+ relationship: tosca.relationships.network.BindsTo
+ server_mmsc3:
+ type: org.openecomp.resource.vfc.nodes.heat.mmsc
+ properties:
+ flavor:
+ get_input: mmsc_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: mmsc_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - mmsc_names
+ - 2
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: mmsc3_volume
+ relationship: mmsc3_volume_attachment
+ nems_be1_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: nems_be_nems_imap_net_ips
+ network: nems_imap_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_imap_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_nems_be1
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx2_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 1
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx2
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx4_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 3
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx4
+ relationship: tosca.relationships.network.BindsTo
+ server_eca_trx20:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 19
+ eca_trx4_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 3
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx4
+ relationship: tosca.relationships.network.BindsTo
+ nems_be_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ volume_type:
+ get_input: NEMS_BE_volume_type
+ size: '(get_input : nems_be_volume_size) * 1024'
+ server_mmsc4:
+ type: org.openecomp.resource.vfc.nodes.heat.mmsc
+ properties:
+ flavor:
+ get_input: mmsc_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: mmsc_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - mmsc_names
+ - 3
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: mmsc4_volume
+ relationship: mmsc4_volume_attachment
+ server_mmsc5:
+ type: org.openecomp.resource.vfc.nodes.heat.mmsc
+ properties:
+ flavor:
+ get_input: mmsc_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: mmsc_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - mmsc_names
+ - 4
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: mmsc5_volume
+ relationship: mmsc5_volume_attachment
+ eca_trx17_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 16
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx17
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx18_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 17
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx18
+ relationship: tosca.relationships.network.BindsTo
+ lb1_cor_direct_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - lb_cor_direct_ips
+ - 0
+ allowed_address_pairs:
+ - ip_address:
+ get_input:
+ - mmsc_core_virtual_server_ips
+ - 0
+ - ip_address:
+ get_input:
+ - mmsc_core_virtual_server_ips
+ - 1
+ - ip_address:
+ get_input:
+ - mmsc_core_snat_ips
+ - 0
+ - ip_address:
+ get_input:
+ - mmsc_core_snat_ips
+ - 1
+ - ip_address:
+ get_input:
+ - mmsc_core_snat_ips
+ - 2
+ - ip_address:
+ get_input:
+ - mmsc_core_snat_ips
+ - 3
+ - ip_address:
+ get_input:
+ - mmsc_core_snat_ips
+ - 4
+ network:
+ get_input: cor_direct_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb1_instance
+ relationship: tosca.relationships.network.BindsTo
+ mmsc1_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - mmsc_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_mmsc1
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx17_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 16
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx17
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx18_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 17
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx18
+ relationship: tosca.relationships.network.BindsTo
+ mmsc1_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - mmsc_mms_traffic_net_ips
+ - 0
+ network: mms_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: mms_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_mmsc1
+ relationship: tosca.relationships.network.BindsTo
+ mmsc2_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - mmsc_mms_traffic_net_ips
+ - 1
+ network: mms_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: mms_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_mmsc2
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx17_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 16
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx17
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx18_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 17
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx18
+ relationship: tosca.relationships.network.BindsTo
+ mms_traffic_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ network_name:
+ get_input: mms_traffic_net_name
+ subnets:
+ mms_traffic_ip_subnet:
+ name:
+ get_input: mms_traffic_net_name
+ cidr:
+ get_input: mms_traffic_net_cidr
+ allocation_pools:
+ - start:
+ get_input: mms_traffic_start
+ end:
+ get_input: mms_traffic_end
+ cmaui_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ eca_trx10_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 9
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx10
+ relationship: tosca.relationships.network.BindsTo
+ server_eca_trx13:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 12
+ lb1_instance:
+ type: org.openecomp.resource.vfc.nodes.heat.lb
+ properties:
+ flavor:
+ get_input: lb_flavor_name
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: lb_image_name
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - lb_names
+ - 0
+ eca_trx10_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 9
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx10
+ relationship: tosca.relationships.network.BindsTo
+ server_eca_trx14:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 13
+ server_eca_trx15:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 14
+ nems1_fe_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ volume_type:
+ get_input: NEMS_FE_volume_type
+ size: '(get_input : nems_volume_size) * 1024'
+ eca_trx10_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 9
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx10
+ relationship: tosca.relationships.network.BindsTo
+ server_eca_trx16:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 15
+ server_eca_trx10:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 9
+ server_eca_trx11:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 10
+ server_eca_trx12:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 11
+ eca_trx14_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 13
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx14
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx13_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 12
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx13
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx14_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 13
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx14
+ relationship: tosca.relationships.network.BindsTo
+ mmsc5_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - mmsc_mms_traffic_net_ips
+ - 4
+ network: mms_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: mms_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_mmsc5
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx13_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 12
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx13
+ relationship: tosca.relationships.network.BindsTo
+ mmsc5_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - mmsc_oam_ips
+ - 4
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_mmsc5
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx13_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 12
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx13
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx14_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 13
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx14
+ relationship: tosca.relationships.network.BindsTo
+ mmsc2_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - mmsc_oam_ips
+ - 1
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_mmsc2
+ relationship: tosca.relationships.network.BindsTo
+ server_eca_trx17:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 16
+ server_eca_trx18:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 17
+ server_eca_trx19:
+ type: org.openecomp.resource.vfc.nodes.heat.eca_trx
+ properties:
+ flavor:
+ get_input: eca_trx_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: eca_trx_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_trx_names
+ - 18
+ eca_trx9_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 8
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx9
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx9_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 8
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx9
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx9_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 8
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx9
+ relationship: tosca.relationships.network.BindsTo
+ lb2_nems_traffic_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: nems_traffic_net_local_ip2
+ allowed_address_pairs:
+ - ip_address:
+ get_input: nems_traffic_net_floating_ip
+ network: nems_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: nems_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: lb2_instance
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx5_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_eca_traffic_net_ips
+ - 4
+ network: eca_traffic_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: eca_traffic_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx5
+ relationship: tosca.relationships.network.BindsTo
+ eca_traffic_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ network_name:
+ get_input: eca_traffic_name
+ subnets:
+ eca_traffic_ip_subnet:
+ name:
+ get_input: eca_traffic_name
+ cidr:
+ get_input: eca_traffic_cidr
+ allocation_pools:
+ - start:
+ get_input: eca_traffic_start
+ end:
+ get_input: eca_traffic_end
+ eca_trx1_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 0
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx1
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx5_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_mgmt_ips
+ - 4
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx5
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx1_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx1
+ relationship: tosca.relationships.network.BindsTo
+ eca_trx5_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_trx_oam_ips
+ - 4
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_eca_trx5
+ relationship: tosca.relationships.network.BindsTo
+ mmsc3_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ volume_type:
+ get_input: MMSC_volume_type
+ size: '(get_input : mmsc_cinder_volume_size) * 1024'
+ relationship_templates:
+ nems1_fe_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: nems1_fe_volume
+ instance_uuid: server_nems_fe1
+ mmsc3_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: mmsc3_volume
+ instance_uuid: server_mmsc3
+ mmsc1_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: mmsc1_volume
+ instance_uuid: server_mmsc1
+ cmaui1_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: cmaui1_volume
+ instance_uuid: server_cmaui1
+ mmsc4_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: mmsc4_volume
+ instance_uuid: server_mmsc4
+ nems_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: nems_be_volume
+ instance_uuid: server_nems_be1
+ cmaui_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: cmaui_volume
+ instance_uuid: server_cmaui
+ nems2_fe_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: nems2_fe_volume
+ instance_uuid: server_nems_fe2
+ mmsc5_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: mmsc5_volume
+ instance_uuid: server_mmsc5
+ mmsc2_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: mmsc2_volume
+ instance_uuid: server_mmsc2
+ groups:
+ MMSC_Capacity_Line:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/MMSC_Capacity_Line.yml
+ description: |
+ HOT template that creates internal networks, load balancers and servers for vMMSC capacity Line 1. #11/23: updated the network definition to meet the juniper best practices way of defining the gateway, DHCP enable for internal networks (L457-L547)
+ members:
+ - server_eca_trx9
+ - server_eca_trx8
+ - server_eca_trx7
+ - server_eca_trx6
+ - server_eca_trx5
+ - nems_internal_net
+ - server_eca_trx4
+ - server_eca_trx3
+ - server_eca_trx2
+ - lb1_mgmt_port
+ - lb2_mms_traffic_port
+ - nems_fe1_port_1
+ - nems_fe2_port_3
+ - server_eca_trx1
+ - nems_fe1_port_2
+ - nems_fe2_port_2
+ - nems_fe2_port_1
+ - nems_fe1_port_0
+ - nems_fe2_port_0
+ - nems_fe1_port_3
+ - nems_fe1_port_4
+ - nems_fe2_port_4
+ - mmsc4_volume
+ - lb2_eca_traffic_port
+ - lb2_ha_net_port
+ - nems_user_web_net
+ - lb1_ha_net_port
+ - mmsc2_volume
+ - nems_traffic_net
+ - eca_trx16_port_0
+ - eca_trx19_port_2
+ - eca_trx16_port_1
+ - eca_trx19_port_1
+ - eca_trx15_port_0
+ - eca_trx19_port_0
+ - lb1_nems_traffic_port
+ - eca_trx11_port_1
+ - eca_trx11_port_2
+ - eca_trx12_port_2
+ - eca_trx12_port_1
+ - eca_trx11_port_0
+ - eca_trx12_port_0
+ - mmsc4_port_0
+ - mmsc3_port_0
+ - eca_trx15_port_2
+ - mmsc3_port_1
+ - mmsc4_port_1
+ - eca_trx15_port_1
+ - eca_trx16_port_2
+ - lb2_mgmt_port
+ - mmsc5_volume
+ - eca_trx7_port_2
+ - eca_trx7_port_0
+ - eca_trx7_port_1
+ - eca_trx3_port_1
+ - eca_trx3_port_0
+ - eca_trx3_port_2
+ - mmsc1_volume
+ - nems_imap_net
+ - lb2_dmz_protected_port
+ - lb1_eca_traffic_port
+ - lb1_dmz_protected_port
+ - lb1_mms_traffic_port
+ - eca_trx1_port_2
+ - nems2_fe_volume
+ - server_nems_be1
+ - server_nems_fe1
+ - server_nems_fe2
+ - lb2_cor_direct_port
+ - eca_trx20_port_0
+ - eca_trx20_port_2
+ - eca_trx20_port_1
+ - eca_trx8_port_0
+ - eca_trx6_port_0
+ - lb2_nems_user_web_port
+ - lb2_instance
+ - eca_trx6_port_2
+ - eca_trx8_port_2
+ - lb1_nems_user_web_port
+ - eca_trx6_port_1
+ - eca_trx8_port_1
+ - ha_net
+ - server_mmsc1
+ - nems_be1_port_0
+ - eca_trx2_port_0
+ - server_mmsc2
+ - nems_be1_port_1
+ - eca_trx2_port_1
+ - eca_trx4_port_1
+ - server_mmsc3
+ - nems_be1_port_2
+ - eca_trx2_port_2
+ - eca_trx4_port_2
+ - server_eca_trx20
+ - eca_trx4_port_0
+ - nems_be_volume
+ - server_mmsc4
+ - server_mmsc5
+ - eca_trx17_port_0
+ - eca_trx18_port_2
+ - lb1_cor_direct_port
+ - mmsc1_port_0
+ - eca_trx17_port_2
+ - eca_trx18_port_0
+ - mmsc1_port_1
+ - mmsc2_port_1
+ - eca_trx17_port_1
+ - eca_trx18_port_1
+ - mms_traffic_net
+ - eca_trx10_port_1
+ - server_eca_trx13
+ - lb1_instance
+ - eca_trx10_port_0
+ - server_eca_trx14
+ - server_eca_trx15
+ - nems1_fe_volume
+ - eca_trx10_port_2
+ - server_eca_trx16
+ - server_eca_trx10
+ - server_eca_trx11
+ - server_eca_trx12
+ - eca_trx14_port_1
+ - eca_trx13_port_0
+ - eca_trx14_port_0
+ - mmsc5_port_1
+ - eca_trx13_port_1
+ - mmsc5_port_0
+ - eca_trx13_port_2
+ - eca_trx14_port_2
+ - mmsc2_port_0
+ - server_eca_trx17
+ - server_eca_trx18
+ - server_eca_trx19
+ - eca_trx9_port_0
+ - eca_trx9_port_1
+ - eca_trx9_port_2
+ - lb2_nems_traffic_port
+ - eca_trx5_port_2
+ - eca_traffic_net
+ - eca_trx1_port_1
+ - eca_trx5_port_1
+ - eca_trx1_port_0
+ - eca_trx5_port_0
+ - mmsc3_volume
+ SG_ECA_MGMT:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/SG_ECA_MGMT.yaml
+ description: |
+ HOT template that creates Security Group and ECA network
+ members:
+ - mms_security_group
+ - eca_mgmt_net
+ cmaui:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/cmaui.yml
+ description: cmaui server template for vMMSC
+ members:
+ - server_cmaui1
+ - server_cmaui
+ - cmaui1_port_0
+ - cmaui_volume
+ - cmaui1_volume
+ - cmaui_port_0 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/expectedOutput/eca_oamServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/expectedOutput/eca_oamServiceTemplate.yaml
new file mode 100644
index 0000000000..90d4df7dab
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/expectedOutput/eca_oamServiceTemplate.yaml
@@ -0,0 +1,569 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: eca_oam
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.eca:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.arb:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ metadata:
+ label: metadata
+ hidden: false
+ immutable: false
+ type: string
+ description: cmaui metadata
+ oam_flavor:
+ label: flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM flavor name
+ default: lc.xlarge4
+ eca_eca_mgmt_ips:
+ label: eca_mgmt network ips for eca VM
+ hidden: false
+ immutable: false
+ type: list
+ description: internal eca_mgmt network ips for eca VM
+ default:
+ - 172.25.137.242
+ - 172.25.137.243
+ entry_schema:
+ type: string
+ eca_mgmt_net_name:
+ label: internal network name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the internal network
+ default: int_mms_eca_mgmt_net_1
+ ECA_OAM_volume_type:
+ label: eca oam vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ default: Platinum
+ arb_eca_mgmt_ips:
+ label: eca_mgmt network ips
+ hidden: false
+ immutable: false
+ type: list
+ description: internal eca_mgmt network ips for arb VM
+ default:
+ - 172.25.137.244
+ entry_schema:
+ type: string
+ networks:
+ label: network name
+ hidden: false
+ immutable: false
+ type: string
+ description: cmaui network name
+ cmaui_name:
+ label: cmaui name
+ hidden: false
+ immutable: false
+ type: string
+ description: cmaui name
+ arb_volume_size:
+ label: volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the ARB volume
+ default: 40
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-ECA_id
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ default: nova
+ oam_image_name:
+ label: image name
+ hidden: false
+ immutable: false
+ type: string
+ description: the OAM image name
+ default: ECABASE
+ oam_volume_size:
+ label: volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the OAM volume
+ default: 1800
+ swift_eca_url:
+ label: Swift URL
+ hidden: false
+ immutable: false
+ type: string
+ description: Base URL for eca swift object store
+ default: http://object-store.rdm2.cci.com:8080/v1/AUTH_1bbab536a19b4756926e7d0ec1eb543c/eca
+ oam_net_name:
+ label: oam network name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the oam network
+ default: oam_protected_net_0
+ ARB_volume_type:
+ label: arb vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ default: Platinum
+ eca_names:
+ label: oam servers names
+ hidden: false
+ immutable: false
+ type: list
+ description: the names of the OAM1,OAM2 VM instances
+ default:
+ - ZRDM1MMSC02OAM001
+ - ZRDM1MMSC02OAM002
+ entry_schema:
+ type: string
+ arbiter_flavor:
+ label: flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: arbiter flavor name
+ default: m1.large2
+ eca_oam_ips:
+ label: oam network ips
+ hidden: false
+ immutable: false
+ type: list
+ description: the ips of oam networks for eca VM
+ default:
+ - 107.250.172.44
+ - 107.250.172.45
+ entry_schema:
+ type: string
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ default: mmsc_security_group_1
+ user_data:
+ label: user data
+ hidden: false
+ immutable: false
+ type: string
+ description: cmaui user data
+ cmaui_image:
+ label: cmaui image
+ hidden: false
+ immutable: false
+ type: string
+ description: cmaui image
+ arb_names:
+ label: arbiter server names
+ hidden: false
+ immutable: false
+ type: list
+ description: the names of the arbiter VM instances
+ default:
+ - ZRDM1MMSC02ARB001
+ entry_schema:
+ type: string
+ cmaui_flavor:
+ label: flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: cmaui flavor name
+ user_data_format:
+ label: user data
+ hidden: false
+ immutable: false
+ type: string
+ description: cmaui user data
+ eca_oam_gateway:
+ label: oam1 oam gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: the ip of oam gateway
+ default: 107.250.172.1
+ arb_oam_ips:
+ label: oam network ips for arb VM
+ hidden: false
+ immutable: false
+ type: list
+ description: oam network ips for eca VM
+ default:
+ - 107.250.172.46
+ entry_schema:
+ type: string
+ node_templates:
+ arb_mgmt_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - arb_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: arb_instance
+ relationship: tosca.relationships.network.BindsTo
+ oam2_mgmt_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_oam_ips
+ - 1
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: oam2_instance
+ relationship: tosca.relationships.network.BindsTo
+ arb_instance:
+ type: org.openecomp.resource.vfc.nodes.heat.arb
+ properties:
+ flavor:
+ get_input: arbiter_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: oam_image_name
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - arb_names
+ - 0
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: arb_volume
+ relationship: arb_volume_attachment
+ arb_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ volume_type:
+ get_input: ARB_volume_type
+ size: '(get_input : arb_volume_size) * 1024'
+ oam1_instance:
+ type: org.openecomp.resource.vfc.nodes.heat.eca
+ properties:
+ flavor:
+ get_input: oam_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: oam_image_name
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_names
+ - 0
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: oam1_volume
+ relationship: oam1_volume_attachment
+ oam2_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'
+ 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'
+ oam1_int_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_eca_mgmt_ips
+ - 0
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: oam1_instance
+ relationship: tosca.relationships.network.BindsTo
+ oam1_mgmt_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: oam1_instance
+ relationship: tosca.relationships.network.BindsTo
+ arb_int_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - arb_eca_mgmt_ips
+ - 0
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: arb_instance
+ relationship: tosca.relationships.network.BindsTo
+ oam2_int_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - eca_eca_mgmt_ips
+ - 1
+ network:
+ get_input: eca_mgmt_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: oam2_instance
+ relationship: tosca.relationships.network.BindsTo
+ oam2_instance:
+ type: org.openecomp.resource.vfc.nodes.heat.eca
+ properties:
+ flavor:
+ get_input: oam_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: oam_image_name
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ name:
+ get_input:
+ - eca_names
+ - 1
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: oam2_volume
+ relationship: oam2_volume_attachment
+ relationship_templates:
+ oam2_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: oam2_volume
+ instance_uuid: oam2_instance
+ oam1_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: oam1_volume
+ instance_uuid: oam1_instance
+ arb_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: arb_volume
+ instance_uuid: arb_instance
+ groups:
+ eca_oam:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/eca_oam.yaml
+ description: This stack creates two ECA OAM VM and one ARB VM
+ members:
+ - arb_mgmt_port
+ - oam2_mgmt_port
+ - arb_instance
+ - arb_volume
+ - oam1_instance
+ - oam2_volume
+ - oam1_volume
+ - oam1_int_port
+ - oam1_mgmt_port
+ - arb_int_port
+ - oam2_int_port
+ - oam2_instance
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.eca_oam
+ capabilities:
+ attachment_oam2_volume:
+ - oam2_volume
+ - attachment
+ binding_oam2_instance:
+ - oam2_instance
+ - binding
+ attachment_oam2_int_port:
+ - oam2_int_port
+ - attachment
+ attachment_oam1_volume:
+ - oam1_volume
+ - attachment
+ os_oam1_instance:
+ - oam1_instance
+ - os
+ scalable_oam2_instance:
+ - oam2_instance
+ - scalable
+ scalable_arb_instance:
+ - arb_instance
+ - scalable
+ endpoint_oam1_instance:
+ - oam1_instance
+ - endpoint
+ binding_arb_instance:
+ - arb_instance
+ - binding
+ host_arb_instance:
+ - arb_instance
+ - host
+ endpoint_arb_instance:
+ - arb_instance
+ - endpoint
+ attachment_oam1_int_port:
+ - oam1_int_port
+ - attachment
+ attachment_arb_volume:
+ - arb_volume
+ - attachment
+ host_oam1_instance:
+ - oam1_instance
+ - host
+ os_oam2_instance:
+ - oam2_instance
+ - os
+ endpoint_oam2_instance:
+ - oam2_instance
+ - endpoint
+ scalable_oam1_instance:
+ - oam1_instance
+ - scalable
+ host_oam2_instance:
+ - oam2_instance
+ - host
+ os_arb_instance:
+ - arb_instance
+ - os
+ attachment_oam1_mgmt_port:
+ - oam1_mgmt_port
+ - attachment
+ attachment_arb_int_port:
+ - arb_int_port
+ - attachment
+ attachment_arb_mgmt_port:
+ - arb_mgmt_port
+ - attachment
+ attachment_oam2_mgmt_port:
+ - oam2_mgmt_port
+ - attachment
+ binding_oam1_instance:
+ - oam1_instance
+ - binding
+ requirements:
+ link_oam2_mgmt_port:
+ - oam2_mgmt_port
+ - link
+ link_oam1_int_port:
+ - oam1_int_port
+ - link
+ link_oam1_mgmt_port:
+ - oam1_mgmt_port
+ - link
+ local_storage_arb_instance:
+ - arb_instance
+ - local_storage
+ link_arb_mgmt_port:
+ - arb_mgmt_port
+ - link
+ local_storage_oam2_instance:
+ - oam2_instance
+ - local_storage
+ link_arb_int_port:
+ - arb_int_port
+ - link
+ link_oam2_int_port:
+ - oam2_int_port
+ - link
+ local_storage_oam1_instance:
+ - oam1_instance
+ - local_storage \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/MANIFEST.json
new file mode 100644
index 0000000000..167ae4e9d8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/MANIFEST.json
@@ -0,0 +1,37 @@
+{
+ "name": "multiple_not_nested",
+ "description": "multiple heat files in zip, no nesting",
+ "version": "2013-05-23",
+ "data": [{
+ "file": "cmaui.yml",
+ "type": "HEAT",
+ "data": [{
+ "file": "cmaui.env",
+ "type": "HEAT_ENV"
+ }]
+ },
+ {
+ "file": "eca_oam.yaml",
+ "type": "HEAT",
+ "data": [{
+ "file": "eca_oam.env",
+ "type": "HEAT_ENV"
+ }]
+ },
+ {
+ "file": "MMSC_Capacity_Line.yml",
+ "type": "HEAT",
+ "data": [{
+ "file": "MMSC_Capacity_Line_1.env",
+ "type": "HEAT_ENV"
+ }]
+ },
+ {
+ "file": "SG_ECA_MGMT.yaml",
+ "type": "HEAT",
+ "data": [{
+ "file": "sg_eca_mgmt.env",
+ "type": "HEAT_ENV"
+ }]
+ }]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/MMSC_Capacity_Line.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/MMSC_Capacity_Line.yml
new file mode 100644
index 0000000000..9e36eb9cd4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/MMSC_Capacity_Line.yml
@@ -0,0 +1,3219 @@
+heat_template_version: 2013-05-23
+
+description: >
+ HOT template that creates internal networks, load balancers and servers for vMMSC capacity Line 1.
+ #11/23: updated the network definition to meet the juniper best practices way of defining the gateway, DHCP enable for internal networks (L457-L547)
+
+parameters:
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_the_MMSC_id
+ oam_net_name:
+ type: string
+ label: UID of OAM network
+ description: UID of OAM network
+ oam_network_netmask:
+ type: string
+ label: oam network netmask
+ description: oam network gateway
+ oam_network_gateway:
+ type: string
+ label: oam network gateway
+ description: oam network gateway
+ oam_network_route_1:
+ type: string
+ label: oam network route 1
+ description: oam network route 1
+ oam_network_route_2:
+ type: string
+ label: oam network route 2
+ description: oam network route 2
+ external_dns:
+ type: string
+ label: dns server
+ description: dns server for MMSC
+ external_ntp:
+ type: string
+ label: ntp server
+ description: ntp server for MMSC
+ lb_oam_ips:
+ type: comma_delimited_list
+ label: management network ips for mmsc lb
+ description: the ips of the management network for mmsc lb
+ dmz_protected_net_name:
+ type: string
+ label: UID of dmz_protected network
+ description: UID of dmz_protected network
+ lb_dmz_protected_ips:
+ type: comma_delimited_list
+ label: dmz protected network local ips for lb VM
+ description: local ips of the dmz protected network for lb VM
+ cor_direct_net_name:
+ type: string
+ label: cor direct net UID
+ description: cor direct net
+ lb_cor_direct_ips:
+ type: comma_delimited_list
+ label: cor direct network local ips for lb VM
+ description: local ips of cor direct network for lb VM
+ mms_traffic_net_name:
+ type: string
+ label: Name of MMS traffic network
+ description: Name of MMS traffic network
+ mms_traffic_net_cidr:
+ type: string
+ label: MMS traffic network address (CIDR notation)
+ description: MMS traffic network address (CIDR notation)
+ mms_traffic_netmask:
+ type: string
+ label: MMS traffic network subnet mask
+ description: MMS traffic network subnet mask
+ mms_traffic_net_gateway:
+ type: string
+ label: MMS traffic network gateway address
+ description: MMS traffic network gateway address
+ mms_traffic_start:
+ type: string
+ label: mmsc traffic start IP
+ description: mmsc traffic start IP
+ mms_traffic_end:
+ type: string
+ label: mmsc traffic end IP
+ description: mmsc traffic end IP
+ mms_traffic_net_local_ip1:
+ type: string
+ label: mmsc traffic network local ip1
+ description: the local ip1 of the mmsc traffic network
+ mms_traffic_net_local_ip2:
+ type: string
+ label: mmsc traffic network local ip2
+ description: the local ip2 of the mmsc traffic network
+ mms_traffic_net_floating_ip:
+ type: string
+ label: mmsc traffic floating ip
+ description: mmsc traffic floating ip
+ nems_internal_name:
+ type: string
+ label: nems internal network name
+ description: nems internal network name
+ nems_internal_start:
+ type: string
+ label: nems internal start
+ description: nems internal start
+ nems_internal_end:
+ type: string
+ label: nems internal end
+ description: nems internal end
+ nems_internal_cidr:
+ type: string
+ label: nems ineternal cidr
+ description: nems internal cidr
+ nems_internal_netmask:
+ type: string
+ label: NEMS internal network subnet mask
+ description: NEMS internal network subnet mask
+ nems_internal_gateway:
+ type: string
+ label: nems internal gw
+ description: nems internal gw
+ nems_traffic_name:
+ type: string
+ label: nems traffic name
+ description: nems traffic name
+ nems_traffic_start:
+ type: string
+ label: nems traffic start
+ description: nems traffic start
+ nems_traffic_end:
+ type: string
+ label: nems traffic end
+ description: nems traffic end
+ nems_traffic_cidr:
+ type: string
+ label: nems traffic cidr
+ description: nems traffic cidr
+ nems_traffic_netmask:
+ type: string
+ label: NEMS traffic network subnet mask
+ description: NEMS traffic network subnet mask
+ nems_traffic_gateway:
+ type: string
+ label: NEMS traffic network gateway
+ description: NEMS traffic network gateway
+ nems_traffic_net_local_ip1:
+ type: string
+ label: nems traffic network local ip1
+ description: the local ip1 of the nems traffic network
+ nems_traffic_net_local_ip2:
+ type: string
+ label: nems traffic network local ip2
+ description: the local ip2 of the nems traffic network
+ nems_traffic_net_floating_ip:
+ type: string
+ label: nems traffic floating ip
+ description: nems traffic floating ip
+ nems_user_web_name:
+ type: string
+ label: nems user web name
+ description: nems user web name
+ nems_user_web_start:
+ type: string
+ label: nems user web start
+ description: nems user web end
+ nems_user_web_end:
+ type: string
+ label: nems user web end
+ description: nems user web end
+ nems_user_web_cidr:
+ type: string
+ label: nems user web cidr
+ description: nems user web cidr
+ nems_user_web_netmask:
+ type: string
+ label: NEMS user web network subnet mask
+ description: NEMS user web network subnet mask
+ nems_user_web_gateway:
+ type: string
+ label: NEMS user web network gateway
+ description: NEMS user web network gateway
+ nems_user_web_net_local_ip1:
+ type: string
+ label: nems user web network local ip1
+ description: the local ip1 of the nems user web network
+ nems_user_web_net_local_ip2:
+ type: string
+ label: nems user web network local ip2
+ description: the local ip2 of the nems user web network
+ nems_user_web_net_floating_ip:
+ type: string
+ label: nems user web floating ip
+ description: nems user web floating ip
+ nems_imap_name:
+ type: string
+ label: nems imap name
+ description: nems imap name
+ nems_imap_netmask:
+ type: string
+ label: nems imap subnet mask
+ description: nems imap subnet mask
+ nems_imap_start:
+ type: string
+ label: nems imap start
+ description: nems imap start
+ nems_imap_end:
+ type: string
+ label: nems imap end
+ description: nems imap end
+ nems_imap_cidr:
+ type: string
+ label: nems imap cidr
+ description: nems imap cidr
+ nems_imap_gateway:
+ type: string
+ label: nems imap gateway
+ description: nems imap gateway
+ eca_traffic_name:
+ type: string
+ label: eca traffic name
+ description: eca traffic name
+ eca_traffic_start:
+ type: string
+ label: eca traffic start
+ description: eca traffic start
+ eca_traffic_end:
+ type: string
+ label: eca traffic end
+ description: eca traffic end
+ eca_traffic_cidr:
+ type: string
+ label: eca traffic cidr
+ description: eca traffic cidr
+ eca_traffic_netmask:
+ type: string
+ label: ECA traffic network subnet mask
+ description: ECA traffic network subnet mask
+ eca_traffic_net_gateway:
+ type: string
+ label: eca_traffic network gateway
+ description: eca_traffic network gateway
+ eca_traffic_net_local_ip1:
+ type: string
+ label: eca traffic network local ip1
+ description: the local ip1 of the eca traffic network
+ eca_traffic_net_local_ip2:
+ type: string
+ label: eca traffic network local ip2
+ description: the local ip2 of the eca traffic network
+ eca_traffic_net_floating_ip:
+ type: string
+ label: eca traffic floating ip
+ description: eca traffic floating ip
+ ha_net_name:
+ type: string
+ label: ha_failover network name
+ description: ha_failover network name
+ ha_net_start:
+ type: string
+ label: ha net start
+ description: ha net start
+ ha_net_end:
+ type: string
+ label: ha net end
+ description: ha net end
+ ha_net_cidr:
+ type: string
+ label: ha net cidr
+ description: ha net cidr
+ ha_net_local_ip1:
+ type: string
+ label: ha net network local ip1
+ description: the local ip1 of the ha network
+ ha_net_local_ip2:
+ type: string
+ label: ha net network local ip2
+ description: the local ip2 of the ha network
+ lb_names:
+ type: comma_delimited_list
+ label: MMSC load balancer instance names
+ description: MMSC load balancer instance names
+ lb_image_name:
+ type: string
+ label: MMSC load balancer image name
+ description: MMSC load balancer image name
+ lb_flavor_name:
+ type: string
+ label: Load balancer flavor name
+ description: the flavor name of MMSC load balancer instance
+ availability_zone_0:
+ type: string
+ label: MMSC availabilityzone name
+ description: MMSC availabilityzone name
+ security_group_name:
+ type: string
+ label: MMSC security group name
+ description: MMSC security group name
+ mmsc_image:
+ type: string
+ label: Image for MMSC server
+ description: Image for MMSC server
+ mmsc_flavor:
+ type: string
+ label: Flavor for MMSC server
+ description: Flavor for MMSC server
+ mmsc_cinder_volume_size:
+ type: number
+ label: MMSC Cinder volume size
+ description: the size of the MMSC Cinder volume
+ nems_fe_image:
+ type: string
+ label: Image for NEMS FE server
+ description: Image for NEMS FE server
+ nems_fe_flavor:
+ type: string
+ label: Flavor for NEMS FE server
+ description: Flavor for NEMS FE server
+ nems_be_image:
+ type: string
+ label: Image for NEMS BE server
+ description: Image for NEMS BE server
+ nems_be_flavor:
+ type: string
+ label: Flavor for NEMS BE server
+ description: Flavor for NEMS BE server
+ eca_trx_image:
+ type: string
+ label: Image for ECA TRX server
+ description: Image for ECA TRX server
+ eca_trx_flavor:
+ type: string
+ label: Flavor for ECA TRX server
+ description: Flavor for ECA TRX server
+ mmsc_oam_ips:
+ type: comma_delimited_list
+ label: MMSC oam_net IP addresses
+ description: MMSC oam_net IP addresses
+ mmsc_mms_traffic_net_ips:
+ type: comma_delimited_list
+ label: MMSC mms_traffic_net IP addresses
+ description: MMSC mms_traffic_net IP addresses
+ nems_fe_names:
+ type: comma_delimited_list
+ label: NEMS_FE server names
+ description: NEMS_FE server names
+ nems_fe_node_roles:
+ type: comma_delimited_list
+ label: nems fe node roles
+ description: nems fe node roles
+ nems_fe_oam_ips:
+ type: comma_delimited_list
+ label: OAM_net IP for NEMS_FE
+ description: OAM_net IP for NEMS_FE
+ nems_fe_nems_traffic_net_ips:
+ type: comma_delimited_list
+ label: nems_traffic_net IPs for NEMS_FE
+ description: nems_traffic_net IPs for NEMS_FE
+ nems_fe_nems_user_web_net_ips:
+ type: comma_delimited_list
+ label: nems_web_user_net IPs for NEMS_FE
+ description: nems_web_user_net IPs for NEMS_FE
+ nems_fe_nems_internal_net_ips:
+ type: comma_delimited_list
+ label: nems_internal_net IPs for NEMS_FE
+ description: nems_internal_net IPs for NEMS_FE
+ nems_fe_nems_imap_net_ips:
+ type: comma_delimited_list
+ label: nems_imap_net IPs for NEMS_FE
+ description: nems_imap_net IPs for NEMS_FE
+ nems_be_names:
+ type: string
+ label: NEMS_BE server names
+ description: NEMS_BE server names
+ nems_be_node_roles:
+ type: string
+ label: nems node roles
+ description: nems node roles
+ nems_be_oam_ips:
+ type: string
+ label: OAM net IPs for NEMS_BE
+ description: OAM net IPs for NEMS_BE
+ nems_be_nems_internal_net_ips:
+ type: string
+ label: nems internal net IPs for NEMS_BE
+ description: nems internal net IPs for NEMS_BE
+ nems_be_nems_imap_net_ips:
+ type: string
+ label: nems imap_net IPs for NEMS_BE
+ description: nems imap net IPs for NEMS_BE
+ eca_trx_oam_ips:
+ type: comma_delimited_list
+ label: OAM net IP for ECA_TRX
+ description: OAM net IP for ECA_TRX
+ eca_trx_mgmt_ips:
+ type: comma_delimited_list
+ label: eca mgmt net IP for ECA_TRX
+ description: eca mgmt net IP for ECA_TRX
+ timezone:
+ type: string
+ label: timezone
+ description: timezone
+ eca_trx_names:
+ type: comma_delimited_list
+ label: ECA_TRX server names
+ description: ECA_TRX server names
+ eca_trx_eca_traffic_net_ips:
+ type: comma_delimited_list
+ label: eca traffic net IPs for ECA_TRX
+ description: eca traffic net IPs for ECA_TRX
+ mmsc_names:
+ type: comma_delimited_list
+ label: MMSC server names
+ description: MMSC server names
+ nems_volume_size:
+ type: number
+ label: nems fe volume size
+ description: nems fe volume size
+ nems_be_volume_size:
+ type: number
+ label: nems be volume size
+ description: nems be volume size
+ MMSC_volume_type:
+ type: string
+ label: MMSC vm volume type
+ description: the name of the target volume backend
+ NEMS_FE_volume_type:
+ type: string
+ label: nems fe vm volume type
+ description: the name of the target volume backend
+ NEMS_BE_volume_type:
+ type: string
+ label: nems be vm volume type
+ description: the name of the target volume backend
+ mmsc_core_virtual_server_ips:
+ type: comma_delimited_list
+ label: mmsc core virtual server ips
+ description: mmsc core virtual server ips
+ mmsc_core_snat_ips:
+ type: comma_delimited_list
+ label: mmsc core snat ips
+ description: mmsc core snat ips
+ mmsc_dmz_protected_virtual_server_ips:
+ type: comma_delimited_list
+ label: mmsc dmz_protected virtual server ips
+ description: mmsc dmz_protected virtual server ips
+ mmsc_dmz_protected_snat_ips:
+ type: comma_delimited_list
+ label: mmsc dmz_protected snat ips
+ description: mmsc dmz_protected snat ips
+ eca_mgmt_net_name:
+ type: string
+ label: eca management network ID
+ description: Network ID for eca management
+
+resources:
+ mms_traffic_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: mms_traffic_net_name }
+
+ mms_traffic_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: mms_traffic_net_name}
+ network_id: { get_resource: mms_traffic_net }
+ cidr: { get_param: mms_traffic_net_cidr }
+ allocation_pools: [{"start": {get_param: mms_traffic_start}, "end": {get_param: mms_traffic_end}}]
+
+ nems_internal_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: {get_param: nems_internal_name}
+
+ nems_internal_network_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: nems_internal_name}
+ allocation_pools: [{"start": {get_param: nems_internal_start}, "end": {get_param: nems_internal_end}}]
+ cidr: {get_param: nems_internal_cidr}
+ network_id: {get_resource: nems_internal_net}
+
+ nems_traffic_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: {get_param: nems_traffic_name}
+
+ nems_traffic_network_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: nems_traffic_name}
+ allocation_pools: [{"start": {get_param: nems_traffic_start}, "end": {get_param: nems_traffic_end}}]
+ cidr: {get_param: nems_traffic_cidr}
+ network_id: {get_resource: nems_traffic_net}
+
+ nems_user_web_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: {get_param: nems_user_web_name}
+
+ nems_user_web_network_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: nems_user_web_name}
+ allocation_pools: [{"start": {get_param: nems_user_web_start}, "end": {get_param: nems_user_web_end}}]
+ cidr: {get_param: nems_user_web_cidr}
+ network_id: {get_resource: nems_user_web_net}
+
+ nems_imap_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: {get_param: nems_imap_name}
+
+ nems_imap_network_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: nems_imap_name}
+ allocation_pools: [{"start": {get_param: nems_imap_start}, "end": {get_param: nems_imap_end}}]
+ cidr: {get_param: nems_imap_cidr}
+ network_id: {get_resource: nems_imap_net}
+
+ eca_traffic_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: {get_param: eca_traffic_name}
+
+ eca_traffic_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: eca_traffic_name}
+ allocation_pools: [{"start": {get_param: eca_traffic_start}, "end": {get_param: eca_traffic_end}}]
+ cidr: {get_param: eca_traffic_cidr}
+ network_id: {get_resource: eca_traffic_net}
+
+ ha_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: {get_param: ha_net_name}
+
+ ha_net_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: ha_net_name}
+ allocation_pools: [{"start": {get_param: ha_net_start}, "end": {get_param: ha_net_end}}]
+ cidr: {get_param: ha_net_cidr}
+ network_id: {get_resource: ha_net}
+
+ lb1_instance:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: [lb_names, 0]}
+ image: {get_param: lb_image_name}
+ flavor: {get_param: lb_flavor_name}
+ availability_zone: {get_param: availability_zone_0}
+ networks:
+ - port: {get_resource: lb1_mgmt_port}
+ - port: {get_resource: lb1_dmz_protected_port}
+ - port: {get_resource: lb1_cor_direct_port}
+ - port: {get_resource: lb1_mms_traffic_port}
+ - port: {get_resource: lb1_nems_traffic_port}
+ - port: {get_resource: lb1_nems_user_web_port}
+ - port: {get_resource: lb1_eca_traffic_port}
+ - port: {get_resource: lb1_ha_net_port}
+ metadata:
+ vnf_id: { get_param: vnf_id }
+
+ lb1_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [lb_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb1_mms_traffic_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: mms_traffic_net}
+ fixed_ips: [{"ip_address": {get_param: mms_traffic_net_local_ip1}}]
+ allowed_address_pairs: [{"ip_address": {get_param: mms_traffic_net_floating_ip} }]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb1_dmz_protected_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: dmz_protected_net_name}
+ fixed_ips: [{"ip_address": {get_param: [lb_dmz_protected_ips, 0]}}]
+ allowed_address_pairs: [{"ip_address": {get_param: [mmsc_dmz_protected_virtual_server_ips, 0]}}, {"ip_address": {get_param: [mmsc_dmz_protected_virtual_server_ips, 1]}}, {"ip_address": {get_param: [mmsc_dmz_protected_virtual_server_ips, 2]}}, {"ip_address": {get_param: [mmsc_dmz_protected_snat_ips, 0]}}, {"ip_address": {get_param: [mmsc_dmz_protected_snat_ips, 1]}}, {"ip_address": {get_param: [mmsc_dmz_protected_snat_ips, 2]}}, {"ip_address": {get_param: [mmsc_dmz_protected_snat_ips, 3]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb1_cor_direct_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: cor_direct_net_name}
+ fixed_ips: [{"ip_address": {get_param: [lb_cor_direct_ips, 0]}}]
+ allowed_address_pairs: [{"ip_address": {get_param: [mmsc_core_virtual_server_ips, 0]}}, {"ip_address": {get_param: [mmsc_core_virtual_server_ips, 1]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 0]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 1]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 2]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 3]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 4]}} ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb1_nems_traffic_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: nems_traffic_net}
+ fixed_ips: [{"ip_address": {get_param: nems_traffic_net_local_ip1}}]
+ allowed_address_pairs: [{"ip_address": {get_param: nems_traffic_net_floating_ip} }]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb1_nems_user_web_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: nems_user_web_net}
+ fixed_ips: [{"ip_address": {get_param: nems_user_web_net_local_ip1}}]
+ allowed_address_pairs: [{"ip_address": {get_param: nems_user_web_net_floating_ip} }]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb1_ha_net_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: ha_net}
+ fixed_ips: [{"ip_address": {get_param: ha_net_local_ip1}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb1_eca_traffic_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: eca_traffic_net}
+ fixed_ips: [{"ip_address": {get_param: eca_traffic_net_local_ip1}}]
+ allowed_address_pairs: [{"ip_address": {get_param: eca_traffic_net_floating_ip} }]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb2_instance:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: [lb_names, 1]}
+ image: {get_param: lb_image_name}
+ flavor: {get_param: lb_flavor_name}
+ availability_zone: {get_param: availability_zone_0}
+ networks:
+ - port: {get_resource: lb2_mgmt_port}
+ - port: {get_resource: lb2_dmz_protected_port}
+ - port: {get_resource: lb2_cor_direct_port}
+ - port: {get_resource: lb2_mms_traffic_port}
+ - port: {get_resource: lb2_nems_traffic_port}
+ - port: {get_resource: lb2_nems_user_web_port}
+ - port: {get_resource: lb2_eca_traffic_port}
+ - port: {get_resource: lb2_ha_net_port}
+ metadata:
+ vnf_id: { get_param: vnf_id }
+
+ lb2_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [lb_oam_ips, 1]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb2_mms_traffic_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: mms_traffic_net}
+ fixed_ips: [{"ip_address": {get_param: mms_traffic_net_local_ip2}}]
+ allowed_address_pairs: [{"ip_address": {get_param: mms_traffic_net_floating_ip}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb2_dmz_protected_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: dmz_protected_net_name}
+ fixed_ips: [{"ip_address": {get_param: [lb_dmz_protected_ips, 1]}}]
+ allowed_address_pairs: [{"ip_address": {get_param: [mmsc_dmz_protected_virtual_server_ips, 0]}}, {"ip_address": {get_param: [mmsc_dmz_protected_virtual_server_ips, 1]}}, {"ip_address": {get_param: [mmsc_dmz_protected_virtual_server_ips, 2]}}, {"ip_address": {get_param: [mmsc_dmz_protected_snat_ips, 0]}}, {"ip_address": {get_param: [mmsc_dmz_protected_snat_ips, 1]}}, {"ip_address": {get_param: [mmsc_dmz_protected_snat_ips, 2]}}, {"ip_address": {get_param: [mmsc_dmz_protected_snat_ips, 3]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb2_cor_direct_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: cor_direct_net_name}
+ fixed_ips: [{"ip_address": {get_param: [lb_cor_direct_ips, 1]}}]
+ allowed_address_pairs: [{"ip_address": {get_param: [mmsc_core_virtual_server_ips, 0]}}, {"ip_address": {get_param: [mmsc_core_virtual_server_ips, 1]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 0]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 1]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 2]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 3]}}, {"ip_address": {get_param: [mmsc_core_snat_ips, 4]}} ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb2_nems_traffic_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: nems_traffic_net}
+ fixed_ips: [{"ip_address": {get_param: nems_traffic_net_local_ip2}}]
+ allowed_address_pairs: [{"ip_address": {get_param: nems_traffic_net_floating_ip}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb2_nems_user_web_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: nems_user_web_net}
+ fixed_ips: [{"ip_address": {get_param: nems_user_web_net_local_ip2}}]
+ allowed_address_pairs: [{"ip_address": {get_param: nems_user_web_net_floating_ip}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb2_ha_net_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: ha_net}
+ fixed_ips: [{"ip_address": {get_param: ha_net_local_ip2}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ lb2_eca_traffic_port:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: eca_traffic_net}
+ fixed_ips: [{"ip_address": {get_param: eca_traffic_net_local_ip2}}]
+ allowed_address_pairs: [{"ip_address": {get_param: eca_traffic_net_floating_ip} }]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_mmsc1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [mmsc_names, 0]}
+ image: { get_param: mmsc_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: mmsc_flavor }
+ networks:
+ - port: { get_resource: mmsc1_port_0 }
+ - port: { get_resource: mmsc1_port_1 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ mmsc.mgmt.ip=${mmsc.mgmt.ip}
+ mmsc.mgmt.netmask=${mmsc.mgmt.netmask}
+ mmsc.mgmt.gateway=${mmsc.mgmt.gateway}
+ mmsc.traffic.ip=${mmsc.traffic.ip}
+ mmsc.traffic.netmask=${mmsc.traffic.netmask}
+ mmsc.traffic.gateway=${mmsc.traffic.gateway}
+ mmsc.mgmt.route.1=${mmsc.mgmt.route.1}
+ mmsc.mgmt.route.2=${mmsc.mgmt.route.2}
+ mmsc.external.dns=${mmsc.external.dns}
+ mmsc.external.ntp=${mmsc.external.ntp}
+ mmsc.hostname=${mmsc.hostname}
+ mmsc.timezone=${mmsc.timezone}
+ params:
+ ${mmsc.mgmt.ip}: {get_param: [mmsc_oam_ips, 0]}
+ ${mmsc.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${mmsc.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${mmsc.traffic.ip}: {get_param: [mmsc_mms_traffic_net_ips, 0]}
+ ${mmsc.traffic.netmask}: {get_param: mms_traffic_netmask}
+ ${mmsc.traffic.gateway}: {get_param: mms_traffic_net_gateway}
+ ${mmsc.mgmt.route.1}: {get_param: oam_network_route_1}
+ ${mmsc.mgmt.route.2}: {get_param: oam_network_route_2}
+ ${mmsc.external.dns}: {get_param: external_dns}
+ ${mmsc.external.ntp}: {get_param: external_ntp}
+ ${mmsc.hostname}: {get_param: [mmsc_names, 0]}
+ ${mmsc.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ mmsc1_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: mmsc_cinder_volume_size}
+ volume_type: {get_param: MMSC_volume_type}
+
+ mmsc1_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: mmsc1_volume}
+ instance_uuid: {get_resource: server_mmsc1}
+
+ mmsc1_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_oam_ips, 0]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ mmsc1_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: mms_traffic_net}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_mms_traffic_net_ips, 0]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_mmsc2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [mmsc_names, 1]}
+ image: { get_param: mmsc_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: mmsc_flavor }
+ networks:
+ - port: { get_resource: mmsc2_port_0 }
+ - port: { get_resource: mmsc2_port_1 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ mmsc.mgmt.ip=${mmsc.mgmt.ip}
+ mmsc.mgmt.netmask=${mmsc.mgmt.netmask}
+ mmsc.mgmt.gateway=${mmsc.mgmt.gateway}
+ mmsc.traffic.ip=${mmsc.traffic.ip}
+ mmsc.traffic.netmask=${mmsc.traffic.netmask}
+ mmsc.traffic.gateway=${mmsc.traffic.gateway}
+ mmsc.mgmt.route.1=${mmsc.mgmt.route.1}
+ mmsc.mgmt.route.2=${mmsc.mgmt.route.2}
+ mmsc.external.dns=${mmsc.external.dns}
+ mmsc.external.ntp=${mmsc.external.ntp}
+ mmsc.hostname=${mmsc.hostname}
+ mmsc.timezone=${mmsc.timezone}
+ params:
+ ${mmsc.mgmt.ip}: {get_param: [mmsc_oam_ips, 1]}
+ ${mmsc.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${mmsc.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${mmsc.traffic.ip}: {get_param: [mmsc_mms_traffic_net_ips, 1]}
+ ${mmsc.traffic.netmask}: {get_param: mms_traffic_netmask}
+ ${mmsc.traffic.gateway}: {get_param: mms_traffic_net_gateway}
+ ${mmsc.mgmt.route.1}: {get_param: oam_network_route_1}
+ ${mmsc.mgmt.route.2}: {get_param: oam_network_route_2}
+ ${mmsc.external.dns}: {get_param: external_dns}
+ ${mmsc.external.ntp}: {get_param: external_ntp}
+ ${mmsc.hostname}: {get_param: [mmsc_names, 1]}
+ ${mmsc.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ mmsc2_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: mmsc_cinder_volume_size}
+ volume_type: {get_param: MMSC_volume_type}
+
+ mmsc2_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: mmsc2_volume}
+ instance_uuid: {get_resource: server_mmsc2}
+
+ mmsc2_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_oam_ips, 1]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ mmsc2_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: mms_traffic_net}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_mms_traffic_net_ips, 1]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_mmsc3:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [mmsc_names, 2]}
+ image: { get_param: mmsc_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: mmsc_flavor }
+ networks:
+ - port: { get_resource: mmsc3_port_0 }
+ - port: { get_resource: mmsc3_port_1 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ mmsc.mgmt.ip=${mmsc.mgmt.ip}
+ mmsc.mgmt.netmask=${mmsc.mgmt.netmask}
+ mmsc.mgmt.gateway=${mmsc.mgmt.gateway}
+ mmsc.traffic.ip=${mmsc.traffic.ip}
+ mmsc.traffic.netmask=${mmsc.traffic.netmask}
+ mmsc.traffic.gateway=${mmsc.traffic.gateway}
+ mmsc.mgmt.route.1=${mmsc.mgmt.route.1}
+ mmsc.mgmt.route.2=${mmsc.mgmt.route.2}
+ mmsc.external.dns=${mmsc.external.dns}
+ mmsc.external.ntp=${mmsc.external.ntp}
+ mmsc.hostname=${mmsc.hostname}
+ mmsc.timezone=${mmsc.timezone}
+ params:
+ ${mmsc.mgmt.ip}: {get_param: [mmsc_oam_ips, 2]}
+ ${mmsc.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${mmsc.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${mmsc.traffic.ip}: {get_param: [mmsc_mms_traffic_net_ips, 2]}
+ ${mmsc.traffic.netmask}: {get_param: mms_traffic_netmask}
+ ${mmsc.traffic.gateway}: {get_param: mms_traffic_net_gateway}
+ ${mmsc.mgmt.route.1}: {get_param: oam_network_route_1}
+ ${mmsc.mgmt.route.2}: {get_param: oam_network_route_2}
+ ${mmsc.external.dns}: {get_param: external_dns}
+ ${mmsc.external.ntp}: {get_param: external_ntp}
+ ${mmsc.hostname}: {get_param: [mmsc_names, 2]}
+ ${mmsc.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ mmsc3_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: mmsc_cinder_volume_size}
+ volume_type: {get_param: MMSC_volume_type}
+
+ mmsc3_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: mmsc3_volume}
+ instance_uuid: {get_resource: server_mmsc3}
+
+ mmsc3_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_oam_ips, 2]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ mmsc3_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: mms_traffic_net}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_mms_traffic_net_ips, 2]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_mmsc4:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [mmsc_names, 3]}
+ image: { get_param: mmsc_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: mmsc_flavor }
+ networks:
+ - port: { get_resource: mmsc4_port_0 }
+ - port: { get_resource: mmsc4_port_1 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ mmsc.mgmt.ip=${mmsc.mgmt.ip}
+ mmsc.mgmt.netmask=${mmsc.mgmt.netmask}
+ mmsc.mgmt.gateway=${mmsc.mgmt.gateway}
+ mmsc.traffic.ip=${mmsc.traffic.ip}
+ mmsc.traffic.netmask=${mmsc.traffic.netmask}
+ mmsc.traffic.gateway=${mmsc.traffic.gateway}
+ mmsc.mgmt.route.1=${mmsc.mgmt.route.1}
+ mmsc.mgmt.route.2=${mmsc.mgmt.route.2}
+ mmsc.external.dns=${mmsc.external.dns}
+ mmsc.external.ntp=${mmsc.external.ntp}
+ mmsc.hostname=${mmsc.hostname}
+ mmsc.timezone=${mmsc.timezone}
+ params:
+ ${mmsc.mgmt.ip}: {get_param: [mmsc_oam_ips, 3]}
+ ${mmsc.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${mmsc.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${mmsc.traffic.ip}: {get_param: [mmsc_mms_traffic_net_ips, 3]}
+ ${mmsc.traffic.netmask}: {get_param: mms_traffic_netmask}
+ ${mmsc.traffic.gateway}: {get_param: mms_traffic_net_gateway}
+ ${mmsc.mgmt.route.1}: {get_param: oam_network_route_1}
+ ${mmsc.mgmt.route.2}: {get_param: oam_network_route_2}
+ ${mmsc.external.dns}: {get_param: external_dns}
+ ${mmsc.external.ntp}: {get_param: external_ntp}
+ ${mmsc.hostname}: {get_param: [mmsc_names, 3]}
+ ${mmsc.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ mmsc4_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: mmsc_cinder_volume_size}
+ volume_type: {get_param: MMSC_volume_type}
+
+ mmsc4_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: mmsc4_volume}
+ instance_uuid: {get_resource: server_mmsc4}
+
+ mmsc4_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_oam_ips, 3]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ mmsc4_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: mms_traffic_net}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_mms_traffic_net_ips, 3]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_mmsc5:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [mmsc_names, 4]}
+ image: { get_param: mmsc_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: mmsc_flavor }
+ networks:
+ - port: { get_resource: mmsc5_port_0 }
+ - port: { get_resource: mmsc5_port_1 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ mmsc.mgmt.ip=${mmsc.mgmt.ip}
+ mmsc.mgmt.netmask=${mmsc.mgmt.netmask}
+ mmsc.mgmt.gateway=${mmsc.mgmt.gateway}
+ mmsc.traffic.ip=${mmsc.traffic.ip}
+ mmsc.traffic.netmask=${mmsc.traffic.netmask}
+ mmsc.traffic.gateway=${mmsc.traffic.gateway}
+ mmsc.mgmt.route.1=${mmsc.mgmt.route.1}
+ mmsc.mgmt.route.2=${mmsc.mgmt.route.2}
+ mmsc.external.dns=${mmsc.external.dns}
+ mmsc.external.ntp=${mmsc.external.ntp}
+ mmsc.hostname=${mmsc.hostname}
+ mmsc.timezone=${mmsc.timezone}
+ params:
+ ${mmsc.mgmt.ip}: {get_param: [mmsc_oam_ips, 4]}
+ ${mmsc.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${mmsc.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${mmsc.traffic.ip}: {get_param: [mmsc_mms_traffic_net_ips, 4]}
+ ${mmsc.traffic.netmask}: {get_param: mms_traffic_netmask}
+ ${mmsc.traffic.gateway}: {get_param: mms_traffic_net_gateway}
+ ${mmsc.mgmt.route.1}: {get_param: oam_network_route_1}
+ ${mmsc.mgmt.route.2}: {get_param: oam_network_route_2}
+ ${mmsc.external.dns}: {get_param: external_dns}
+ ${mmsc.external.ntp}: {get_param: external_ntp}
+ ${mmsc.hostname}: {get_param: [mmsc_names, 4]}
+ ${mmsc.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ mmsc5_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: mmsc_cinder_volume_size}
+ volume_type: {get_param: MMSC_volume_type}
+
+ mmsc5_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: mmsc5_volume}
+ instance_uuid: {get_resource: server_mmsc5}
+
+ mmsc5_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_oam_ips, 4]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ mmsc5_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: {get_resource: mms_traffic_net}
+ fixed_ips: [
+ "ip_address": {get_param: [mmsc_mms_traffic_net_ips, 4]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_nems_fe1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [nems_fe_names, 0] }
+ image: { get_param: nems_fe_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: nems_fe_flavor }
+ networks:
+ - port: { get_resource: nems_fe1_port_0 }
+ - port: { get_resource: nems_fe1_port_1 }
+ - port: { get_resource: nems_fe1_port_2 }
+ - port: { get_resource: nems_fe1_port_3 }
+ - port: { get_resource: nems_fe1_port_4 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ nems.mgmt.ip=${nems.mgmt.ip}
+ nems.mgmt.netmask=${nems.mgmt.netmask}
+ nems.mgmt.gateway=${nems.mgmt.gateway}
+ nems.traffic.ip=${nems.traffic.ip}
+ nems.traffic.netmask=${nems.traffic.netmask}
+ nems.traffic.gateway=${nems.traffic.gateway}
+ nems.fe0.internal.ip=${nems.fe0.internal.ip}
+ nems.fe1.internal.ip=${nems.fe1.internal.ip}
+ nems.internal.netmask=${nems.internal.netmask}
+ nems.userweb.ip=${nems.userweb.ip}
+ nems.userweb.netmask=${nems.userweb.netmask}
+ nems.userweb.gateway=${nems.userweb.gateway}
+ nems.imap.ip=${nems.imap.ip}
+ nems.imap.netmask=${nems.imap.netmask}
+ nems.be.internal.ip=${nems.be.internal.ip}
+ nems.be.imap.ip=${nems.be.imap.ip}
+ nems.mgmt.route.1=${nems.mgmt.route.1}
+ nems.mgmt.route.2=${nems.mgmt.route.2}
+ nems.external.dns=${nems.external.dns}
+ nems.external.ntp=${nems.external.ntp}
+ nems.node=${nems.node}
+ nems.be0.host.name=${nems.be0.host.name}
+ nems.fe0.host.name=${nems.fe0.host.name}
+ nems.fe1.host.name=${nems.fe1.host.name}
+ nems.timezone=${nems.timezone}
+ params:
+ ${nems.mgmt.ip}: {get_param: [nems_fe_oam_ips, 0]}
+ ${nems.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${nems.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${nems.traffic.ip}: {get_param: [nems_fe_nems_traffic_net_ips, 0]}
+ ${nems.traffic.netmask}: {get_param: nems_traffic_netmask}
+ ${nems.traffic.gateway}: {get_param: nems_traffic_gateway}
+ ${nems.fe0.internal.ip}: {get_param: [nems_fe_nems_internal_net_ips, 0]}
+ ${nems.fe1.internal.ip}: {get_param: [nems_fe_nems_internal_net_ips, 1]}
+ ${nems.internal.netmask}: {get_param: nems_internal_netmask}
+ ${nems.userweb.ip}: {get_param: [nems_fe_nems_user_web_net_ips, 0]}
+ ${nems.userweb.netmask}: {get_param: nems_user_web_netmask}
+ ${nems.userweb.gateway}: {get_param: nems_user_web_gateway}
+ ${nems.imap.ip}: {get_param: [nems_fe_nems_imap_net_ips, 0]}
+ ${nems.imap.netmask}: {get_param: nems_imap_netmask}
+ ${nems.be.internal.ip}: {get_param: nems_be_nems_internal_net_ips}
+ ${nems.be.imap.ip}: {get_param: nems_be_nems_imap_net_ips}
+ ${nems.mgmt.route.1}: {get_param: oam_network_route_1}
+ ${nems.mgmt.route.2}: {get_param: oam_network_route_2}
+ ${nems.external.dns}: {get_param: external_dns}
+ ${nems.external.ntp}: {get_param: external_ntp}
+ ${nems.node}: {get_param: [nems_fe_node_roles, 0]}
+ ${nems.fe0.host.name}: {get_param: [nems_fe_names, 0]}
+ ${nems.fe1.host.name}: {get_param: [nems_fe_names, 1]}
+ ${nems.be0.host.name}: {get_param: nems_be_names}
+ ${nems.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ nems1_fe_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: nems_volume_size}
+ volume_type: {get_param: NEMS_FE_volume_type}
+
+ nems1_fe_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: nems1_fe_volume}
+ instance_uuid: {get_resource: server_nems_fe1}
+
+ nems_fe1_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [
+ "ip_address": { get_param: [nems_fe_oam_ips, 0] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ nems_fe1_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [nems_fe_nems_traffic_net_ips, 0] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ nems_fe1_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_user_web_net }
+ fixed_ips: [
+ "ip_address": { get_param: [nems_fe_nems_user_web_net_ips, 0] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ nems_fe1_port_3:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_internal_net }
+ fixed_ips: [
+ "ip_address": { get_param: [nems_fe_nems_internal_net_ips, 0] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ nems_fe1_port_4:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_imap_net }
+ fixed_ips: [
+ "ip_address": { get_param: [nems_fe_nems_imap_net_ips, 0] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_nems_fe2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [nems_fe_names, 1] }
+ image: { get_param: nems_fe_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: nems_fe_flavor }
+ networks:
+ - port: { get_resource: nems_fe2_port_0 }
+ - port: { get_resource: nems_fe2_port_1 }
+ - port: { get_resource: nems_fe2_port_2 }
+ - port: { get_resource: nems_fe2_port_3 }
+ - port: { get_resource: nems_fe2_port_4 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ nems.mgmt.ip=${nems.mgmt.ip}
+ nems.mgmt.netmask=${nems.mgmt.netmask}
+ nems.mgmt.gateway=${nems.mgmt.gateway}
+ nems.traffic.ip=${nems.traffic.ip}
+ nems.traffic.netmask=${nems.traffic.netmask}
+ nems.traffic.gateway=${nems.traffic.gateway}
+ nems.fe0.internal.ip=${nems.fe0.internal.ip}
+ nems.fe1.internal.ip=${nems.fe1.internal.ip}
+ nems.internal.netmask=${nems.internal.netmask}
+ nems.userweb.ip=${nems.userweb.ip}
+ nems.userweb.netmask=${nems.userweb.netmask}
+ nems.userweb.gateway=${nems.userweb.gateway}
+ nems.imap.ip=${nems.imap.ip}
+ nems.imap.netmask=${nems.imap.netmask}
+ nems.be.internal.ip=${nems.be.internal.ip}
+ nems.be.imap.ip=${nems.be.imap.ip}
+ nems.mgmt.route.1=${nems.mgmt.route.1}
+ nems.mgmt.route.2=${nems.mgmt.route.2}
+ nems.external.dns=${nems.external.dns}
+ nems.external.ntp=${nems.external.ntp}
+ nems.node=${nems.node}
+ nems.be0.host.name=${nems.be0.host.name}
+ nems.fe0.host.name=${nems.fe0.host.name}
+ nems.fe1.host.name=${nems.fe1.host.name}
+ nems.timezone=${nems.timezone}
+ params:
+ ${nems.mgmt.ip}: {get_param: [nems_fe_oam_ips, 1]}
+ ${nems.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${nems.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${nems.traffic.ip}: {get_param: [nems_fe_nems_traffic_net_ips, 1]}
+ ${nems.traffic.netmask}: {get_param: nems_traffic_netmask}
+ ${nems.traffic.gateway}: {get_param: nems_traffic_gateway}
+ ${nems.fe0.internal.ip}: {get_param: [nems_fe_nems_internal_net_ips, 0]}
+ ${nems.fe1.internal.ip}: {get_param: [nems_fe_nems_internal_net_ips, 1]}
+ ${nems.internal.netmask}: {get_param: nems_internal_netmask}
+ ${nems.userweb.ip}: {get_param: [nems_fe_nems_user_web_net_ips, 1]}
+ ${nems.userweb.netmask}: {get_param: nems_user_web_netmask}
+ ${nems.userweb.gateway}: {get_param: nems_user_web_gateway}
+ ${nems.imap.ip}: {get_param: [nems_fe_nems_imap_net_ips, 1]}
+ ${nems.imap.netmask}: {get_param: nems_imap_netmask}
+ ${nems.be.internal.ip}: {get_param: nems_be_nems_internal_net_ips}
+ ${nems.be.imap.ip}: {get_param: nems_be_nems_imap_net_ips}
+ ${nems.mgmt.route.1}: {get_param: oam_network_route_1}
+ ${nems.mgmt.route.2}: {get_param: oam_network_route_2}
+ ${nems.external.dns}: {get_param: external_dns}
+ ${nems.external.ntp}: {get_param: external_ntp}
+ ${nems.node}: {get_param: [nems_fe_node_roles, 1]}
+ ${nems.fe0.host.name}: {get_param: [nems_fe_names, 0]}
+ ${nems.fe1.host.name}: {get_param: [nems_fe_names, 1]}
+ ${nems.be0.host.name}: {get_param: nems_be_names}
+ ${nems.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ nems2_fe_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: nems_volume_size}
+ volume_type: {get_param: NEMS_FE_volume_type}
+
+ nems2_fe_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: nems2_fe_volume}
+ instance_uuid: {get_resource: server_nems_fe2}
+
+ nems_fe2_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [
+ "ip_address": {get_param: [nems_fe_oam_ips, 1]}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ nems_fe2_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [nems_fe_nems_traffic_net_ips, 1] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ nems_fe2_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_user_web_net }
+ fixed_ips: [
+ "ip_address": { get_param: [nems_fe_nems_user_web_net_ips, 1] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ nems_fe2_port_3:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_internal_net }
+ fixed_ips: [
+ "ip_address": { get_param: [nems_fe_nems_internal_net_ips, 1] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+
+ nems_fe2_port_4:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_imap_net }
+ fixed_ips: [
+ "ip_address": { get_param: [nems_fe_nems_imap_net_ips, 1] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_nems_be1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: nems_be_names }
+ image: { get_param: nems_be_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: nems_be_flavor }
+ networks:
+ - port: { get_resource: nems_be1_port_0 }
+ - port: { get_resource: nems_be1_port_1 }
+ - port: { get_resource: nems_be1_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ nems.be.mgmt.ip=${nems.be.mgmt.ip}
+ nems.mgmt.netmask=${nems.mgmt.netmask}
+ nems.mgmt.gateway=${nems.mgmt.gateway}
+ nems.be.internal.ip=${nems.be.internal.ip}
+ nems.internal.netmask=${nems.internal.netmask}
+ nems.imap.netmask=${nems.imap.netmask}
+ nems.fe0.internal.ip=${nems.fe0.internal.ip}
+ nems.fe1.internal.ip=${nems.fe1.internal.ip}
+ nems.be.imap.ip=${nems.be.imap.ip}
+ nems.mgmt.route.1=${nems.mgmt.route.1}
+ nems.mgmt.route.2=${nems.mgmt.route.2}
+ nems.external.dns=${nems.external.dns}
+ nems.external.ntp=${nems.external.ntp}
+ nems.node=${nems.node}
+ nems.be0.host.name=${nems.be0.host.name}
+ nems.fe0.host.name=${nems.fe0.host.name}
+ nems.fe1.host.name=${nems.fe1.host.name}
+ nems.timezone=${nems.timezone}
+ params:
+ ${nems.be.mgmt.ip}: {get_param: nems_be_oam_ips}
+ ${nems.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${nems.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${nems.fe0.internal.ip}: {get_param: [nems_fe_nems_internal_net_ips, 0]}
+ ${nems.fe1.internal.ip}: {get_param: [nems_fe_nems_internal_net_ips, 1]}
+ ${nems.be.internal.ip}: {get_param: nems_be_nems_internal_net_ips}
+ ${nems.internal.netmask}: {get_param: nems_internal_netmask}
+ ${nems.imap.netmask}: {get_param: nems_imap_netmask}
+ ${nems.be.imap.ip}: {get_param: nems_be_nems_imap_net_ips}
+ ${nems.mgmt.route.1}: {get_param: oam_network_route_1}
+ ${nems.mgmt.route.2}: {get_param: oam_network_route_2}
+ ${nems.external.dns}: {get_param: external_dns}
+ ${nems.external.ntp}: {get_param: external_ntp}
+ ${nems.node}: {get_param: nems_be_node_roles}
+ ${nems.be0.host.name}: {get_param: nems_be_names}
+ ${nems.fe0.host.name}: {get_param: [nems_fe_names, 0]}
+ ${nems.fe1.host.name}: {get_param: [nems_fe_names, 1]}
+ ${nems.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ nems_be_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: nems_be_volume_size}
+ volume_type: {get_param: NEMS_BE_volume_type}
+
+ nems_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: nems_be_volume}
+ instance_uuid: {get_resource: server_nems_be1}
+
+
+ nems_be1_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [
+ "ip_address": { get_param: nems_be_oam_ips}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ nems_be1_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_internal_net }
+ fixed_ips: [
+ "ip_address": { get_param: nems_be_nems_internal_net_ips}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ nems_be1_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: nems_imap_net }
+ fixed_ips: [
+ "ip_address": { get_param: nems_be_nems_imap_net_ips}
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 0]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx1_port_0 }
+ - port: { get_resource: eca_trx1_port_1 }
+ - port: { get_resource: eca_trx1_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 0]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 0]}
+
+ eca_trx1_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 0] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx1_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 0] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx1_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 0] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+
+ server_eca_trx2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 1]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx2_port_0 }
+ - port: { get_resource: eca_trx2_port_1 }
+ - port: { get_resource: eca_trx2_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 1]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 1]}
+
+ eca_trx2_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 1] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx2_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 1] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx2_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 1] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx3:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 2]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx3_port_0 }
+ - port: { get_resource: eca_trx3_port_1 }
+ - port: { get_resource: eca_trx3_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 2]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 2]}
+
+ eca_trx3_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 2] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx3_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 2] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx3_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 2] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx4:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 3]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx4_port_0 }
+ - port: { get_resource: eca_trx4_port_1 }
+ - port: { get_resource: eca_trx4_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 3]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 3]}
+
+ eca_trx4_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 3] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx4_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 3] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx4_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 3] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx5:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 4]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx5_port_0 }
+ - port: { get_resource: eca_trx5_port_1 }
+ - port: { get_resource: eca_trx5_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 4]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 4]}
+
+ eca_trx5_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 4] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx5_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 4] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx5_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 4] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx6:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 5]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx6_port_0 }
+ - port: { get_resource: eca_trx6_port_1 }
+ - port: { get_resource: eca_trx6_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 5]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 5]}
+
+ eca_trx6_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 5] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx6_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 5] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx6_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 5] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx7:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 6]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx7_port_0 }
+ - port: { get_resource: eca_trx7_port_1 }
+ - port: { get_resource: eca_trx7_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 6]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 6]}
+
+ eca_trx7_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 6] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx7_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 6] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx7_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 6] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx8:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 7]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx8_port_0 }
+ - port: { get_resource: eca_trx8_port_1 }
+ - port: { get_resource: eca_trx8_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 7]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 7]}
+
+ eca_trx8_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 7] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx8_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 7] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx8_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 7] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx9:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 8]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx9_port_0 }
+ - port: { get_resource: eca_trx9_port_1 }
+ - port: { get_resource: eca_trx9_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 8]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 8]}
+
+ eca_trx9_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 8] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx9_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 8] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx9_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 8] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx10:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 9]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx10_port_0 }
+ - port: { get_resource: eca_trx10_port_1 }
+ - port: { get_resource: eca_trx10_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 9]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 9]}
+
+ eca_trx10_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 9] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx10_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 9] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx10_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 9] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx11:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 10]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx11_port_0 }
+ - port: { get_resource: eca_trx11_port_1 }
+ - port: { get_resource: eca_trx11_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 10]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 10]}
+
+ eca_trx11_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 10] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx11_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 10] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx11_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 10] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+
+ server_eca_trx12:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 11]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx12_port_0 }
+ - port: { get_resource: eca_trx12_port_1 }
+ - port: { get_resource: eca_trx12_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 11]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 11]}
+
+ eca_trx12_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 11] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx12_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 11] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx12_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 11] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx13:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 12]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx13_port_0 }
+ - port: { get_resource: eca_trx13_port_1 }
+ - port: { get_resource: eca_trx13_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 12]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 12]}
+
+ eca_trx13_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 12] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx13_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 12] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx13_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 12] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx14:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 13]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx14_port_0 }
+ - port: { get_resource: eca_trx14_port_1 }
+ - port: { get_resource: eca_trx14_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 13]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 13]}
+
+ eca_trx14_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 13] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx14_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 13] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx14_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 13] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx15:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 14]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx15_port_0 }
+ - port: { get_resource: eca_trx15_port_1 }
+ - port: { get_resource: eca_trx15_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 14]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 14]}
+
+ eca_trx15_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 14] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx15_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 14] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx15_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 14] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx16:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 15]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx16_port_0 }
+ - port: { get_resource: eca_trx16_port_1 }
+ - port: { get_resource: eca_trx16_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 15]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 15]}
+
+ eca_trx16_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 15] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx16_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 15] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx16_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 15] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+
+ server_eca_trx17:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 16]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx17_port_0 }
+ - port: { get_resource: eca_trx17_port_1 }
+ - port: { get_resource: eca_trx17_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 16]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 16]}
+
+ eca_trx17_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 16] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx17_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 16] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx17_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 16] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx18:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 17]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx18_port_0 }
+ - port: { get_resource: eca_trx18_port_1 }
+ - port: { get_resource: eca_trx18_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 17]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 17]}
+
+ eca_trx18_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 17] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx18_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 17] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx18_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 17] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx19:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 18]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx19_port_0 }
+ - port: { get_resource: eca_trx19_port_1 }
+ - port: { get_resource: eca_trx19_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 8]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 18]}
+
+ eca_trx19_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 18] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx19_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 18] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx19_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 18] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_eca_trx20:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [eca_trx_names, 19]}
+ image: { get_param: eca_trx_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: eca_trx_flavor }
+ networks:
+ - port: { get_resource: eca_trx20_port_0 }
+ - port: { get_resource: eca_trx20_port_1 }
+ - port: { get_resource: eca_trx20_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ touch /tmp/user_data.log
+ sed -i s/HOSTNAME.*/"HOSTNAME=trx_hostname"/g /etc/sysconfig/network
+ echo "172.26.8.6 puppet" > /etc/hosts
+ eth0_ip_address='trx_traf_ip_address'
+ eth0_gateway='172.26.5.3'
+ echo "$eth0_ip_address" >>/tmp/user_data.log
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ puppet agent -t > /root/puppet-agent-t.out
+ params:
+ trx_hostname: {get_param: [eca_trx_names, 19]}
+ trx_traf_ip_address: {get_param: [eca_trx_eca_traffic_net_ips, 19]}
+
+ eca_trx20_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_oam_ips, 19] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx20_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: eca_mgmt_net_name }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_mgmt_ips, 19] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ eca_trx20_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: eca_traffic_net }
+ fixed_ips: [
+ "ip_address": { get_param: [eca_trx_eca_traffic_net_ips, 19] }
+ ]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/MMSC_Capacity_Line_1.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/MMSC_Capacity_Line_1.env
new file mode 100644
index 0000000000..b346d67d97
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/MMSC_Capacity_Line_1.env
@@ -0,0 +1,111 @@
+parameters:
+ oam_net_name: oam_protected_net_0
+ oam_network_netmask: 255.255.254.0
+ oam_network_gateway: 107.250.172.1
+ oam_network_route_1: 155.165.201.250/32,107.250.172.1
+ oam_network_route_2: 155.165.194.100/32,107.250.172.1
+ external_dns: 155.165.194.100
+ external_ntp: 155.165.201.250
+ lb_oam_ips: 107.250.172.50,107.250.172.51
+ dmz_protected_net_name: dmz_protected_net_0
+ lb_dmz_protected_ips: 107.239.14.19,107.239.14.20
+ cor_direct_net_name: cor_direct_net_0
+ lb_cor_direct_ips: 172.31.10.19,172.31.10.20
+ mms_traffic_net_name: int_mms_mms_traffic_net_2
+ mms_traffic_net_cidr: 172.26.2.0/24
+ mms_traffic_netmask: 255.255.255.0
+ mms_traffic_net_gateway: 172.26.2.1
+ mms_traffic_start: 172.26.2.3
+ mms_traffic_end: 172.26.2.254
+ mms_traffic_net_local_ip1: 172.26.2.3
+ mms_traffic_net_local_ip2: 172.26.2.4
+ mms_traffic_net_floating_ip: 172.26.2.5
+ nems_internal_name: int_mms_nems_internal_net_2
+ nems_internal_start: 172.26.6.3
+ nems_internal_end: 172.26.6.254
+ nems_internal_cidr: 172.26.6.0/24
+ nems_internal_netmask: 255.255.255.0
+ nems_internal_gateway: 172.26.6.1
+ nems_traffic_name: int_mms_nems_traffic_net_2
+ nems_traffic_start: 172.26.3.3
+ nems_traffic_end: 172.26.3.254
+ nems_traffic_cidr: 172.26.3.0/24
+ nems_traffic_netmask: 255.255.255.0
+ nems_traffic_gateway: 172.26.3.1
+ nems_traffic_net_local_ip1: 172.26.3.3
+ nems_traffic_net_local_ip2: 172.26.3.4
+ nems_traffic_net_floating_ip: 172.26.3.5
+ nems_user_web_name: int_mms_nems_web_net_2
+ nems_user_web_start: 172.26.4.3
+ nems_user_web_end: 172.26.4.254
+ nems_user_web_cidr: 172.26.4.0/24
+ nems_user_web_netmask: 255.255.255.0
+ nems_user_web_gateway: 172.26.4.1
+ nems_user_web_net_local_ip1: 172.26.4.3
+ nems_user_web_net_local_ip2: 172.26.4.4
+ nems_user_web_net_floating_ip: 172.26.4.5
+ nems_imap_name: int_mms_nems_imap_net_2
+ nems_imap_start: 172.26.7.3
+ nems_imap_end: 172.26.7.254
+ nems_imap_cidr: 172.26.7.0/24
+ nems_imap_netmask: 255.255.255.0
+ nems_imap_gateway: 172.26.7.1
+ eca_traffic_name: int_mms_eca_traffic_net_2
+ eca_traffic_cidr: 172.26.5.0/24
+ eca_traffic_netmask: 255.255.255.0
+ eca_traffic_net_gateway: 172.26.5.1
+ eca_traffic_start: 172.26.5.3
+ eca_traffic_end: 172.26.5.254
+ eca_traffic_net_local_ip1: 172.26.5.3
+ eca_traffic_net_local_ip2: 172.26.5.4
+ eca_traffic_net_floating_ip: 172.26.5.5
+ ha_net_name: int_mms_ha_net_2
+ ha_net_cidr: 172.26.1.0/24
+ ha_net_start: 172.26.1.3
+ ha_net_end: 172.26.1.254
+ ha_net_local_ip1: 172.26.1.3
+ ha_net_local_ip2: 172.26.1.4
+ lb_names: ZRDM1MMSC03ALB001,ZRDM1MMSC03ALB002
+ lb_image_name: BIGIP-11.5.3.0.0.163
+ lb_flavor_name: m1.xlarge
+ security_group_name: mmsc_security_group_1
+ availability_zone_0: nova
+ mmsc_mms_traffic_net_ips: 172.26.2.11,172.26.2.12,172.26.2.13,172.26.2.14,172.26.2.15
+ mmsc_oam_ips: 107.250.172.54,107.250.172.55,107.250.172.56,107.250.172.57,107.250.172.58
+ mmsc_flavor: lc.4xlarge4
+ mmsc_image: mmsc-6.0.2_v5
+ mmsc_cinder_volume_size: 480
+ nems_fe_flavor: m1.large2
+ nems_fe_image: nems-2.1.2_v29
+ nems_fe_names: ZRDM1MMSC03NFE001,ZRDM1MMSC03NFE002
+ nems_fe_node_roles: FE0,FE1
+ nems_fe_oam_ips: 107.250.172.64,107.250.172.65
+ nems_fe_nems_traffic_net_ips: 172.26.3.11,172.26.3.12
+ nems_fe_nems_user_web_net_ips: 172.26.4.11,172.26.4.12
+ nems_fe_nems_internal_net_ips: 172.26.6.11,172.26.6.12
+ nems_fe_nems_imap_net_ips: 172.26.7.11,172.26.7.12
+ nems_be_names: ZRDM1MMSC03NBE001
+ nems_be_node_roles: BE0
+ nems_be_oam_ips: 107.250.172.66
+ nems_be_nems_internal_net_ips: 172.26.6.13
+ nems_be_nems_imap_net_ips: 172.26.7.13
+ nems_be_flavor: m1.large2
+ nems_be_image: nems-2.1.2_v29
+ eca_trx_oam_ips: 107.250.172.70,107.250.172.71,107.250.172.72,107.250.172.73,107.250.172.74,107.250.172.75,107.250.172.76,107.250.172.77,107.250.172.78,107.250.172.79,107.250.172.80,107.250.172.81,107.250.172.82,107.250.172.83,107.250.172.84,107.250.172.85,107.250.172.86,107.250.172.87,107.250.172.88,107.250.172.89
+ eca_trx_mgmt_ips: 172.25.137.202,172.25.137.203,172.25.137.204,172.25.137.205,172.25.137.206,172.25.137.207,172.25.137.208,172.25.137.209,172.25.137.210,172.25.137.211,172.25.137.212,172.25.137.213,172.25.137.214,172.25.137.215,172.25.137.216,172.25.137.217,172.25.137.218,172.25.137.219,172.25.137.220,172.25.137.221
+ eca_trx_flavor: m1.xlarge
+ eca_trx_image: ECABASE
+ timezone: UTC
+ eca_trx_names: ZRDM1MMSC03TRX001,ZRDM1MMSC03TRX002,ZRDM1MMSC03TRX003,ZRDM1MMSC03TRX004,ZRDM1MMSC03TRX005,ZRDM1MMSC03TRX006,ZRDM1MMSC03TRX007,ZRDM1MMSC03TRX008,ZRDM1MMSC03TRX009,ZRDM1MMSC03TRX010,ZRDM1MMSC03TRX011,ZRDM1MMSC03TRX012,ZRDM1MMSC03TRX013,ZRDM1MMSC03TRX014,ZRDM1MMSC03TRX015,ZRDM1MMSC03TRX016,ZRDM1MMSC03TRX017,ZRDM1MMSC03TRX018,ZRDM1MMSC03TRX019,ZRDM1MMSC03TRX020
+ eca_trx_eca_traffic_net_ips: 172.26.5.11,172.26.5.12,172.26.5.13,172.26.5.14,172.26.5.15,172.26.5.16,172.26.5.17,172.26.5.18,172.26.5.19,172.26.5.20,172.26.5.21,172.26.5.22,172.26.5.23,172.26.5.24,172.26.5.25,172.26.5.26,172.26.5.27,172.26.5.28,172.26.5.29,172.26.5.30
+ mmsc_names: ZRDM1MMSC03MMS001,ZRDM1MMSC03MMS002,ZRDM1MMSC03MMS003,ZRDM1MMSC03MMS004,ZRDM1MMSC03MMS005
+ nems_volume_size: 50
+ nems_be_volume_size: 610
+ MMSC_volume_type: Platinum
+ NEMS_FE_volume_type: Platinum
+ NEMS_BE_volume_type: Platinum
+ mmsc_core_virtual_server_ips: 172.31.10.21,172.31.10.22
+ mmsc_core_snat_ips: 172.31.10.23,172.31.10.24,172.31.10.25,172.31.10.26,172.31.10.27
+ mmsc_dmz_protected_virtual_server_ips: 107.239.14.21,107.239.14.22,107.239.14.23
+ mmsc_dmz_protected_snat_ips: 107.239.14.24,107.239.14.25,107.239.14.26,107.239.14.27
+ eca_mgmt_net_name: int_eca_mgmt_net_1 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/SG_ECA_MGMT.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/SG_ECA_MGMT.yaml
new file mode 100644
index 0000000000..53efc5e36e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/SG_ECA_MGMT.yaml
@@ -0,0 +1,76 @@
+heat_template_version: 2013-05-23
+
+#################################
+#
+# Changes from MSO - 11/5/2015
+# - Parameter changes as below
+# - CDLs for vmNames, IPs
+# - aZone->availability_zone_0
+# - nwName->{nwRole}_net_name
+# - nwID->{nwRole}_net_id
+# - vmName->{vmType}_names
+# - ips ->{vmType}_{nwRole}_ips
+# - fips->{vmType}_{nwRole}_floating_ip
+# - added replacement_policy: AUTO to all ports
+# - added vnf_id for metadata to all servers
+# - externalized security group resource
+# - externalized eca_mgmt network
+#
+#################################
+
+description: >
+ HOT template that creates Security Group and ECA network
+
+parameters:
+ eca_mgmt_name:
+ type: string
+ label: eca management name
+ description: eca management name
+ eca_mgmt_start:
+ type: string
+ label: eca management start
+ description: eca management start
+ eca_mgmt_end:
+ type: string
+ label: eca management end
+ description: eca management end
+ eca_mgmt_cidr:
+ type: string
+ label: eca management cidr
+ description: eca management cidr
+ eca_mgmt_netmask:
+ type: string
+ label: ECA mgmt network subnet mask
+ description: ECA mgmt network subnet mask
+ security_group_name:
+ type: string
+ label: MMSC security group name
+ description: MMSC security group name
+
+resources:
+ mms_security_group:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: mmsc security group
+ name: {get_param: security_group_name}
+ rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0}
+ ]
+ eca_mgmt_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: {get_param: eca_mgmt_name}
+
+ eca_mgmt_network_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: eca_mgmt_name}
+ allocation_pools: [{"start": {get_param: eca_mgmt_start}, "end": {get_param: eca_mgmt_end}}]
+ cidr: {get_param: eca_mgmt_cidr}
+ #enable_dhcp: false
+ #gateway_ip: null
+ network_id: {get_resource: eca_mgmt_net}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/cmaui.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/cmaui.env
new file mode 100644
index 0000000000..2e0f4c0796
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/cmaui.env
@@ -0,0 +1,15 @@
+parameters:
+ cmaui_names: ZRDM1MMSC02CMI001,ZRDM1MMSC02CMI002
+ cmaui_flavor: m1.large
+ cmaui_image: cmaui-5.0.2.5_v25
+ cmaui_cinder_volume_size: 55
+ oam_net_name: oam_protected_net_0
+ oam_network_netmask: 255.255.255.192
+ oam_network_gateway: 10.20.30.1
+ external_dns: 155.165.201.250
+ external_ntp: 155.165.194.100
+ security_group_name: mmsc_security_group_1
+ availability_zone_0: nova
+ timezone: UTC
+ cmaui_oam_ips: 107.250.172.42,107.250.172.43
+ CMAUI_volume_type: Platinum \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/cmaui.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/cmaui.yml
new file mode 100644
index 0000000000..6d094be26f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/cmaui.yml
@@ -0,0 +1,171 @@
+heat_template_version: 2013-05-23
+
+#################################
+#
+# Changes from MSO 01/26/2016
+# Updated per ECOMP feedback
+#
+#################################
+
+description: cmaui server template for vMMSC
+
+parameters:
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_cinder_volume_size:
+ type: number
+ label: CMAUI Cinder volume size
+ description: the size of the CMAUI Cinder volume
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ oam_net_name:
+ type: string
+ description: UID of OAM network
+ oam_network_netmask:
+ type: string
+ label: oam network netmask
+ description: oam network gateway
+ oam_network_gateway:
+ type: string
+ label: oam network gateway
+ description: oam network gateway
+ external_dns:
+ type: string
+ label: dns server
+ description: dns server
+ external_ntp:
+ type: string
+ label: ntp server
+ description: ntp server
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ timezone:
+ type: string
+ label: timezone
+ description: timezone
+ cmaui_oam_ips:
+ type: comma_delimited_list
+ label: CMAUI oam_net IP addresses
+ description: CMAUI oam_net IP addresses
+ CMAUI_volume_type:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+
+resources:
+ server_cmaui:
+ type: eca_oam.yaml
+ properties:
+ cmaui_name: { get_param: [cmaui_names, 0]}
+ cmaui_image: { get_param: cmaui_image }
+ availability_zone_0: { get_param: availability_zone_0 }
+ cmaui_flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_0 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ cmaui.mgmt.ip=${cmaui.mgmt.ip}
+ cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
+ cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
+ cmaui.external.dns=${cmaui.external.dns}
+ cmaui.external.ntp=${cmaui.external.ntp}
+ cmaui.node=${cmaui.node}
+ cmaui.timezone=${cmaui.timezone}
+ params:
+ ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 0]}
+ ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${cmaui.external.dns}: {get_param: external_dns}
+ ${cmaui.external.ntp}: {get_param: external_ntp}
+ ${cmaui.node}: {get_param: [cmaui_names, 0]}
+ ${cmaui.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ cmaui_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: cmaui_cinder_volume_size}
+ volume_type: {get_param: CMAUI_volume_type}
+
+ cmaui_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: cmaui_volume}
+ instance_uuid: {get_resource: server_cmaui}
+
+ cmaui_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_cmaui1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 1]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui1_port_0 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ cmaui.mgmt.ip=${cmaui.mgmt.ip}
+ cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
+ cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
+ cmaui.external.dns=${cmaui.external.dns}
+ cmaui.external.ntp=${cmaui.external.ntp}
+ cmaui.node=${cmaui.node}
+ cmaui.timezone=${cmaui.timezone}
+ params:
+ ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 1]}
+ ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${cmaui.external.dns}: {get_param: external_dns}
+ ${cmaui.external.ntp}: {get_param: external_ntp}
+ ${cmaui.node}: {get_param: [cmaui_names, 1]}
+ ${cmaui.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ cmaui1_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: cmaui_cinder_volume_size}
+ volume_type: {get_param: CMAUI_volume_type}
+
+ cmaui1_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: cmaui1_volume}
+ instance_uuid: {get_resource: server_cmaui1}
+
+ cmaui1_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 1]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/eca_oam.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/eca_oam.env
new file mode 100644
index 0000000000..f9991722b3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/eca_oam.env
@@ -0,0 +1,20 @@
+parameters:
+ eca_names: ZRDM1MMSC02OAM001,ZRDM1MMSC02OAM002
+ arb_names: ZRDM1MMSC02ARB001
+ oam_image_name: ECABASE
+ oam_flavor: lc.xlarge4
+ arbiter_flavor: m1.large2
+ availability_zone_0: nova
+ oam_net_name: oam_protected_net_0
+ eca_mgmt_net_name: int_mms_eca_mgmt_net_1
+ eca_oam_ips: 107.250.172.44,107.250.172.45
+ eca_eca_mgmt_ips: 172.25.137.242,172.25.137.243
+ eca_oam_gateway: 107.250.172.1
+ arb_oam_ips: 107.250.172.46
+ arb_eca_mgmt_ips: 172.25.137.244
+ security_group_name: mmsc_security_group_1
+ oam_volume_size: 1800
+ arb_volume_size: 40
+ swift_eca_url: http://object-store.rdm2.cci.com:8080/v1/AUTH_1bbab536a19b4756926e7d0ec1eb543c/eca
+ ECA_OAM_volume_type: Platinum
+ ARB_volume_type: Platinum
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/eca_oam.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/eca_oam.yaml
new file mode 100644
index 0000000000..db5ab5c26b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/eca_oam.yaml
@@ -0,0 +1,407 @@
+heat_template_version: 2013-05-23
+
+##########################################################
+#
+# Changes from MSO
+# - Updated per ECOMP Feedback
+#
+#
+##########################################################
+
+description: This stack creates two ECA OAM VM and one ARB VM
+
+parameters:
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-ECA_id
+ cmaui_name:
+ type: string
+ label: cmaui name
+ description: cmaui name
+ cmaui_image:
+ type: string
+ label: cmaui image
+ description: cmaui image
+ cmaui_flavor:
+ type: string
+ label: flavor name
+ description: cmaui flavor name
+ networks:
+ type: string
+ label: network name
+ description: cmaui network name
+ metadata:
+ type: string
+ label: metadata
+ description: cmaui metadata
+ user_data:
+ type: string
+ label: user data
+ description: cmaui user data
+ user_data_format:
+ type: string
+ label: user data
+ description: cmaui user data
+ eca_names:
+ type: comma_delimited_list
+ label: oam servers names
+ description: the names of the OAM1,OAM2 VM instances
+ arb_names:
+ type: comma_delimited_list
+ label: arbiter server names
+ description: the names of the arbiter VM instances
+ oam_image_name:
+ type: string
+ label: image name
+ description: the OAM image name
+ oam_flavor:
+ type: string
+ label: flavor name
+ description: OAM flavor name
+ arbiter_flavor:
+ type: string
+ label: flavor name
+ description: arbiter flavor name
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ oam_net_name:
+ type: string
+ label: oam network name
+ description: the name of the oam network
+ eca_mgmt_net_name:
+ type: string
+ label: internal network name
+ description: the name of the internal network
+ eca_oam_ips:
+ type: comma_delimited_list
+ label: oam network ips
+ description: the ips of oam networks for eca VM
+ eca_oam_gateway:
+ type: string
+ label: oam1 oam gateway
+ description: the ip of oam gateway
+ eca_eca_mgmt_ips:
+ type: comma_delimited_list
+ label: eca_mgmt network ips for eca VM
+ description: internal eca_mgmt network ips for eca VM
+ arb_oam_ips:
+ type: comma_delimited_list
+ label: oam network ips for arb VM
+ description: oam network ips for eca VM
+ arb_eca_mgmt_ips:
+ type: comma_delimited_list
+ label: eca_mgmt network ips
+ description: internal eca_mgmt network ips for arb VM
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ oam_volume_size:
+ type: number
+ label: volume size
+ description: the size of the OAM volume
+ arb_volume_size:
+ type: number
+ label: volume size
+ description: the size of the ARB volume
+ swift_eca_url:
+ type: string
+ label: Swift URL
+ description: Base URL for eca swift object store
+ ECA_OAM_volume_type:
+ type: string
+ label: eca oam vm volume type
+ description: the name of the target volume backend
+ ARB_volume_type:
+ type: string
+ label: arb vm volume type
+ description: the name of the target volume backend
+
+resources:
+ oam1_instance:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: [eca_names, 0]}
+ image: {get_param: oam_image_name}
+ flavor: {get_param: oam_flavor}
+ availability_zone: {get_param: availability_zone_0}
+ networks:
+ - port: {get_resource: oam1_int_port}
+ - port: {get_resource: oam1_mgmt_port}
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ sed -i s/HOSTNAME.*/"HOSTNAME=oam1_hostname"/g /etc/sysconfig/network
+ eth1_ip_address='oam1_mgt_ip'
+ eth1_gateway='oam_gateway'
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ mkdir /etc/puppet/files/roles/transcoder
+ mkdir /etc/puppet/files/roles/oam_primary
+ curl swift_url/etc/puppet/manifests/roles/oam_primary.pp > /etc/puppet/manifests/roles/oam_primary.pp
+ curl swift_url/etc/puppet/manifests/roles/transcoder.pp > /etc/puppet/manifests/roles/transcoder.pp
+ curl swift_url/etc/puppet/files/roles/oam_primary/config.yaml > /etc/puppet/files/roles/oam_primary/config.yaml
+ curl swift_url/etc/puppet/files/roles/transcoder/config.yaml > /etc/puppet/files/roles/transcoder/config.yaml
+ curl swift_url/etc/puppet/files/roles/transcoder/hpm.conf > /etc/puppet/files/roles/transcoder/hpm.conf
+ curl swift_url/etc/puppet/files/roles/transcoder/trx.conf > /etc/puppet/files/roles/transcoder/trx.conf
+ curl swift_url/etc/puppet/files/roles/transcoder/plugins-mo.conf > /etc/puppet/files/roles/transcoder/plugins-mo.conf
+ curl swift_url/etc/puppet/files/global/11-customer.conf > /etc/puppet/files/global/11-customer.conf
+ curl swift_url/etc/puppet/manifests/site.pp > /etc/puppet/manifests/site.pp
+ curl swift_url/scripts/van-init-replicaset > /usr/sbin/van-init-replicaset
+ van-role oam_primary > /root/startup-van-role.out
+ curl swift_url/scripts/fdisk-keystrokes > /root/fdisk-keystrokes
+ fdisk /dev/vdb < /root/fdisk-keystrokes
+ curl swift_url/scripts/os-conf-cinder-vol > /root/os-conf-cinder-vol
+ chmod 755 /root/os-conf-cinder-vol
+ /root/os-conf-cinder-vol 2>> /tmp/cinder_volume.log
+ params:
+ oam1_mgt_ip: {get_param: [eca_oam_ips, 0] }
+ oam_gateway: {get_param: eca_oam_gateway }
+ oam1_hostname: {get_param: [eca_names, 0]}
+ swift_url: {get_param: swift_eca_url}
+
+ oam1_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [eca_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ oam1_int_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: eca_mgmt_net_name}
+ fixed_ips: [{"ip_address": {get_param: [eca_eca_mgmt_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ oam1_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: oam_volume_size}
+ volume_type: {get_param: ECA_OAM_volume_type}
+
+ oam1_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: oam1_volume}
+ instance_uuid: {get_resource: oam1_instance}
+
+ oam2_instance:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: [eca_names, 1]}
+ image: {get_param: oam_image_name}
+ flavor: {get_param: oam_flavor}
+ availability_zone: {get_param: availability_zone_0}
+ networks:
+ - port: {get_resource: oam2_int_port}
+ - port: {get_resource: oam2_mgmt_port}
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ sed -i s/HOSTNAME.*/"HOSTNAME=oam2_hostname"/g /etc/sysconfig/network
+ eth1_ip_address='oam2_mgt_ip'
+ eth1_gateway='oam_gateway'
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ curl swift_url/etc/puppet/manifests/roles/oam_secondary.pp > /etc/puppet/manifests/roles/oam_secondary.pp
+ curl swift_url/etc/puppet/files/global/config.yaml > /etc/puppet/files/global/config.yaml
+ curl swift_url/etc/puppet/files/global/11-customer.conf > /etc/puppet/files/global/11-customer.conf
+ van-role oam_secondary > /root/startup-van-role.out
+ curl swift_url/scripts/fdisk-keystrokes > /root/fdisk-keystrokes
+ fdisk /dev/vdb < /root/fdisk-keystrokes
+ curl swift_url/scripts/os-conf-cinder-vol > /root/os-conf-cinder-vol
+ chmod 755 /root/os-conf-cinder-vol
+ /root/os-conf-cinder-vol 2>> /tmp/cinder_volume.log
+
+ params:
+ oam2_mgt_ip: {get_param: [eca_oam_ips, 1] }
+ oam2_hostname: {get_param: [eca_names, 1]}
+ swift_url: {get_param: swift_eca_url}
+ oam_gateway: {get_param: eca_oam_gateway }
+
+ oam2_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [eca_oam_ips, 1]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ oam2_int_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: eca_mgmt_net_name}
+ fixed_ips: [{"ip_address": {get_param: [eca_eca_mgmt_ips, 1]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ oam2_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: oam_volume_size}
+ volume_type: {get_param: ECA_OAM_volume_type}
+
+ oam2_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: oam2_volume}
+ instance_uuid: {get_resource: oam2_instance}
+
+ arb_instance:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: [arb_names, 0]}
+ image: {get_param: oam_image_name}
+ flavor: {get_param: arbiter_flavor}
+ availability_zone: {get_param: availability_zone_0}
+ networks:
+ - port: {get_resource: arb_int_port}
+ - port: {get_resource: arb_mgmt_port}
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ #!/bin/bash
+ sed -i s/HOSTNAME.*/"HOSTNAME=arb_hostname"/g /etc/sysconfig/network
+ eth1_ip_address='arb_mgt_ip'
+ eth1_gateway='oam_gateway'
+ for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
+ if [ "$interface" != "lo" ]; then
+ DEVICE_NAME=$interface
+ interface_ip_var="${DEVICE_NAME}_ip_address"
+ gateway_var="${DEVICE_NAME}_gateway"
+ var_name="$interface_ip_var"
+ var_gateway="$gateway_var"
+ if [ ! -z ${!var_name} ]; then
+ IPADDR=${!var_name}
+ BOOTPROTO="static"
+ GATEWAY=${!var_gateway}
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ else
+ if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
+ echo "Configuring $DEVICE_NAME to use DHCP"
+ IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
+ IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
+ printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
+ fi
+ fi
+ ifdown $DEVICE_NAME
+ ifup $DEVICE_NAME
+ printf "$DEVICE_NAME\n" >> /tmp/network_config
+ fi
+ done
+ curl swift_url/etc/puppet/manifests/roles/oam_arbiter.pp > /etc/puppet/manifests/roles/oam_arbiter.pp
+ curl swift_url/etc/puppet/files/global/config.yaml > /etc/puppet/files/global/config.yaml
+ curl swift_url/etc/puppet/files/global/11-customer.conf > /etc/puppet/files/global/11-customer.conf
+ van-role oam_arbiter > /root/startup-van-role.out
+ curl swift_url/scripts/fdisk-keystrokes > /root/fdisk-keystrokes
+ fdisk /dev/vdb < /root/fdisk-keystrokes
+ curl swift_url/scripts/os-conf-cinder-vol > /root/os-conf-cinder-vol
+ chmod 755 /root/os-conf-cinder-vol
+ /root/os-conf-cinder-vol 2>> /tmp/cinder_volume.log
+ params:
+ arb_mgt_ip: {get_param: [arb_oam_ips, 0] }
+ arb_hostname: {get_param: [arb_names, 0]}
+ swift_url: {get_param: swift_eca_url}
+ oam_gateway: {get_param: eca_oam_gateway }
+
+ arb_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [arb_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ arb_int_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: eca_mgmt_net_name}
+ fixed_ips: [{"ip_address": {get_param: [arb_eca_mgmt_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ arb_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: arb_volume_size}
+ volume_type: {get_param: ARB_volume_type}
+ arb_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: arb_volume}
+ instance_uuid: {get_resource: arb_instance}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/sg_eca_mgmt.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/sg_eca_mgmt.env
new file mode 100644
index 0000000000..8012063ac0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/sg_eca_mgmt.env
@@ -0,0 +1,7 @@
+parameters:
+ eca_mgmt_name: int_eca_mgmt_net_1
+ eca_mgmt_cidr: 172.25.137.192/26
+ eca_mgmt_netmask: 255.255.255.192
+ eca_mgmt_start: 172.25.137.195
+ eca_mgmt_end: 172.25.137.254
+ security_group_name: mmsc_security_group_1
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/ContrailV2_MultiPolicy_single_net_translation/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/ContrailV2_MultiPolicy_single_net_translation/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..0744579c92
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/ContrailV2_MultiPolicy_single_net_translation/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,305 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ left_vn_fqdn:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ Internal1_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ src_port_start:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ Internal1_default_gateway:
+ hidden: false
+ immutable: false
+ type: string
+ Internal1_dhcp:
+ hidden: false
+ immutable: false
+ type: string
+ src_port_end:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ policy_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ dst_port_end:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ simple_action:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ service_instance_fq_name:
+ hidden: false
+ immutable: false
+ type: string
+ Internal2_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ protocol:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ Internal2_dhcp:
+ hidden: false
+ immutable: false
+ type: string
+ dst_port_start:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ network_ipam_refs_data_ipam_subnets_addr_from_start_true:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ Internal2_default_gateway:
+ hidden: false
+ immutable: false
+ type: string
+ right_vn_fqdn:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ left_vn:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ direction:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ node_templates:
+ template_VirtualNetwork_2:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork
+ properties:
+ dhcp_enabled:
+ get_input: Internal1_dhcp
+ network_ipam_refs_data:
+ - network_ipam_refs_data_ipam_subnets:
+ - network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_policy_refs_data:
+ - network_policy_refs_data_sequence:
+ network_policy_refs_data_sequence_major: 0
+ network_policy_refs_data_sequence_minor: 0
+ network_name:
+ get_input: left_vn
+ network_ipam_refs:
+ - UNSUPPORTED_RESOURCE_template_NetworkIpam_2
+ network_policy_refs:
+ - list_join:
+ - ':'
+ - get_attribute:
+ - template_NetworkPolicy_1
+ - fq_name
+ - get_attribute:
+ - template_NetworkPolicy_2
+ - fq_name
+ - template_NetworkPolicy_3
+ subnets:
+ Internal-subnet-1:
+ enable_dhcp:
+ get_input: Internal1_dhcp
+ cidr:
+ get_input: Internal1_cidr
+ gateway_ip:
+ get_input: Internal1_default_gateway
+ Internal-subnet-2:
+ enable_dhcp:
+ get_input: Internal2_dhcp
+ cidr:
+ get_input: Internal2_cidr
+ gateway_ip:
+ get_input: Internal2_default_gateway
+ requirements:
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: template_NetworkPolicy_1
+ relationship: tosca.relationships.DependsOn
+ template_NetworkPolicy_1:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.contrailV2.NetworkRules
+ properties:
+ name:
+ get_input: policy_name
+ network_policy_entries:
+ network_policy_entries_policy_rule:
+ - network_policy_entries_policy_rule_dst_addresses:
+ - network_policy_entries_policy_rule_dst_addresses_virtual_network:
+ get_input: right_vn_fqdn
+ network_policy_entries_policy_rule_dst_ports:
+ - network_policy_entries_policy_rule_dst_ports_start_port:
+ get_input: dst_port_start
+ network_policy_entries_policy_rule_dst_ports_end_port:
+ get_input: dst_port_end
+ network_policy_entries_policy_rule_protocol:
+ get_input: protocol
+ network_policy_entries_policy_rule_src_addresses:
+ - network_policy_entries_policy_rule_src_addresses_virtual_network:
+ get_input: left_vn_fqdn
+ network_policy_entries_policy_rule_direction:
+ get_input: direction
+ network_policy_entries_policy_rule_src_ports:
+ - network_policy_entries_policy_rule_src_ports_start_port:
+ get_input: src_port_start
+ network_policy_entries_policy_rule_src_ports_end_port:
+ get_input: src_port_end
+ network_policy_entries_policy_rule_action_list:
+ network_policy_entries_policy_rule_action_list_simple_action:
+ get_input: simple_action
+ network_policy_entries_policy_rule_action_list_apply_service:
+ - get_input: service_instance_fq_name
+ requirements:
+ - network:
+ capability: tosca.capabilities.Attachment
+ node: template_VirtualNetwork_2
+ relationship: org.openecomp.relationships.AttachesTo
+ template_NetworkPolicy_3:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.contrailV2.NetworkRules
+ properties:
+ name:
+ get_input: policy_name
+ network_policy_entries:
+ network_policy_entries_policy_rule:
+ - network_policy_entries_policy_rule_dst_addresses:
+ - network_policy_entries_policy_rule_dst_addresses_virtual_network:
+ get_input: right_vn_fqdn
+ network_policy_entries_policy_rule_dst_ports:
+ - network_policy_entries_policy_rule_dst_ports_start_port:
+ get_input: dst_port_start
+ network_policy_entries_policy_rule_dst_ports_end_port:
+ get_input: dst_port_end
+ network_policy_entries_policy_rule_protocol:
+ get_input: protocol
+ network_policy_entries_policy_rule_src_addresses:
+ - network_policy_entries_policy_rule_src_addresses_virtual_network:
+ get_input: left_vn_fqdn
+ network_policy_entries_policy_rule_direction:
+ get_input: direction
+ network_policy_entries_policy_rule_src_ports:
+ - network_policy_entries_policy_rule_src_ports_start_port:
+ get_input: src_port_start
+ network_policy_entries_policy_rule_src_ports_end_port:
+ get_input: src_port_end
+ network_policy_entries_policy_rule_action_list:
+ network_policy_entries_policy_rule_action_list_simple_action:
+ get_input: simple_action
+ network_policy_entries_policy_rule_action_list_apply_service:
+ - get_input: service_instance_fq_name
+ requirements:
+ - network:
+ capability: tosca.capabilities.Attachment
+ node: template_VirtualNetwork_2
+ relationship: org.openecomp.relationships.AttachesTo
+ template_NetworkPolicy_2:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.contrailV2.NetworkRules
+ properties:
+ name:
+ get_input: policy_name
+ network_policy_entries:
+ network_policy_entries_policy_rule:
+ - network_policy_entries_policy_rule_dst_addresses:
+ - network_policy_entries_policy_rule_dst_addresses_virtual_network:
+ get_input: right_vn_fqdn
+ network_policy_entries_policy_rule_dst_ports:
+ - network_policy_entries_policy_rule_dst_ports_start_port:
+ get_input: dst_port_start
+ network_policy_entries_policy_rule_dst_ports_end_port:
+ get_input: dst_port_end
+ network_policy_entries_policy_rule_protocol:
+ get_input: protocol
+ network_policy_entries_policy_rule_src_addresses:
+ - network_policy_entries_policy_rule_src_addresses_virtual_network:
+ get_input: left_vn_fqdn
+ network_policy_entries_policy_rule_direction:
+ get_input: direction
+ network_policy_entries_policy_rule_src_ports:
+ - network_policy_entries_policy_rule_src_ports_start_port:
+ get_input: src_port_start
+ network_policy_entries_policy_rule_src_ports_end_port:
+ get_input: src_port_end
+ network_policy_entries_policy_rule_action_list:
+ network_policy_entries_policy_rule_action_list_simple_action:
+ get_input: simple_action
+ network_policy_entries_policy_rule_action_list_apply_service:
+ - get_input: service_instance_fq_name
+ requirements:
+ - network:
+ capability: tosca.capabilities.Attachment
+ node: template_VirtualNetwork_2
+ relationship: org.openecomp.relationships.AttachesTo
+ groups:
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: cmaui server template for vMMSC
+ members:
+ - template_VirtualNetwork_2
+ - template_NetworkPolicy_1
+ - template_NetworkPolicy_3
+ - template_NetworkPolicy_2 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/ContrailV2_MultiPolicy_single_net_translation/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/ContrailV2_MultiPolicy_single_net_translation/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..539e26b7ab
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/ContrailV2_MultiPolicy_single_net_translation/inputfiles/MANIFEST.json
@@ -0,0 +1,12 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/ContrailV2_MultiPolicy_single_net_translation/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/ContrailV2_MultiPolicy_single_net_translation/inputfiles/main.yml
new file mode 100644
index 0000000000..3681b1962b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/ContrailV2_MultiPolicy_single_net_translation/inputfiles/main.yml
@@ -0,0 +1,223 @@
+description: "cmaui server template for vMMSC"
+heat_template_version: 2013-05-23
+parameters:
+ Internal1_cidr:
+ type: string
+ Internal2_cidr:
+ type: string
+ Internal1_default_gateway:
+ type: string
+ Internal2_default_gateway:
+ type: string
+ Internal1_dhcp:
+ type: string
+ Internal2_dhcp:
+ type: string
+ direction:
+ description: dummy
+ type: string
+ dst_port_end:
+ description: dummy
+ type: string
+ dst_port_start:
+ description: dummy
+ type: string
+ left_vn:
+ description: dummy
+ type: string
+ left_vn_fqdn:
+ description: dummy
+ type: string
+ network_ipam_refs_data_ipam_subnets_addr_from_start_true:
+ description: dummy
+ type: string
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2:
+ description: dummy
+ type: string
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2:
+ description: dummy
+ type: string
+ policy_name:
+ description: dummy
+ type: string
+ protocol:
+ description: dummy
+ type: string
+ right_vn_fqdn:
+ description: dummy
+ type: string
+ simple_action:
+ description: dummy
+ type: string
+ src_port_end:
+ description: dummy
+ type: string
+ src_port_start:
+ description: dummy
+ type: string
+ service_instance_fq_name:
+ type: string
+resources:
+ template_NetworkIpam_2:
+ properties:
+ name:
+ get_param: left_vn
+ type: "OS::ContrailV2::NetworkIpam"
+ template_NetworkPolicy_1:
+ properties:
+ name:
+ get_param: policy_name
+ network_policy_entries:
+ network_policy_entries_policy_rule:
+ -
+ network_policy_entries_policy_rule_action_list:
+ network_policy_entries_policy_rule_action_list_apply_service:
+ -
+ get_param: service_instance_fq_name
+ network_policy_entries_policy_rule_action_list_simple_action:
+ get_param: simple_action
+ network_policy_entries_policy_rule_direction:
+ get_param: direction
+ network_policy_entries_policy_rule_dst_addresses:
+ -
+ network_policy_entries_policy_rule_dst_addresses_virtual_network:
+ get_param: right_vn_fqdn
+ network_policy_entries_policy_rule_dst_ports:
+ -
+ network_policy_entries_policy_rule_dst_ports_end_port:
+ get_param: dst_port_end
+ network_policy_entries_policy_rule_dst_ports_start_port:
+ get_param: dst_port_start
+ network_policy_entries_policy_rule_protocol:
+ get_param: protocol
+ network_policy_entries_policy_rule_src_addresses:
+ -
+ network_policy_entries_policy_rule_src_addresses_virtual_network:
+ get_param: left_vn_fqdn
+ network_policy_entries_policy_rule_src_ports:
+ -
+ network_policy_entries_policy_rule_src_ports_end_port:
+ get_param: src_port_end
+ network_policy_entries_policy_rule_src_ports_start_port:
+ get_param: src_port_start
+ type: "OS::ContrailV2::NetworkPolicy"
+ template_NetworkPolicy_2:
+ properties:
+ name:
+ get_param: policy_name
+ network_policy_entries:
+ network_policy_entries_policy_rule:
+ -
+ network_policy_entries_policy_rule_action_list:
+ network_policy_entries_policy_rule_action_list_apply_service:
+ -
+ get_param: service_instance_fq_name
+ network_policy_entries_policy_rule_action_list_simple_action:
+ get_param: simple_action
+ network_policy_entries_policy_rule_direction:
+ get_param: direction
+ network_policy_entries_policy_rule_dst_addresses:
+ -
+ network_policy_entries_policy_rule_dst_addresses_virtual_network:
+ get_param: right_vn_fqdn
+ network_policy_entries_policy_rule_dst_ports:
+ -
+ network_policy_entries_policy_rule_dst_ports_end_port:
+ get_param: dst_port_end
+ network_policy_entries_policy_rule_dst_ports_start_port:
+ get_param: dst_port_start
+ network_policy_entries_policy_rule_protocol:
+ get_param: protocol
+ network_policy_entries_policy_rule_src_addresses:
+ -
+ network_policy_entries_policy_rule_src_addresses_virtual_network:
+ get_param: left_vn_fqdn
+ network_policy_entries_policy_rule_src_ports:
+ -
+ network_policy_entries_policy_rule_src_ports_end_port:
+ get_param: src_port_end
+ network_policy_entries_policy_rule_src_ports_start_port:
+ get_param: src_port_start
+ type: "OS::ContrailV2::NetworkPolicy"
+ template_NetworkPolicy_3:
+ properties:
+ name:
+ get_param: policy_name
+ network_policy_entries:
+ network_policy_entries_policy_rule:
+ -
+ network_policy_entries_policy_rule_action_list:
+ network_policy_entries_policy_rule_action_list_apply_service:
+ -
+ get_param: service_instance_fq_name
+ network_policy_entries_policy_rule_action_list_simple_action:
+ get_param: simple_action
+ network_policy_entries_policy_rule_direction:
+ get_param: direction
+ network_policy_entries_policy_rule_dst_addresses:
+ -
+ network_policy_entries_policy_rule_dst_addresses_virtual_network:
+ get_param: right_vn_fqdn
+ network_policy_entries_policy_rule_dst_ports:
+ -
+ network_policy_entries_policy_rule_dst_ports_end_port:
+ get_param: dst_port_end
+ network_policy_entries_policy_rule_dst_ports_start_port:
+ get_param: dst_port_start
+ network_policy_entries_policy_rule_protocol:
+ get_param: protocol
+ network_policy_entries_policy_rule_src_addresses:
+ -
+ network_policy_entries_policy_rule_src_addresses_virtual_network:
+ get_param: left_vn_fqdn
+ network_policy_entries_policy_rule_src_ports:
+ -
+ network_policy_entries_policy_rule_src_ports_end_port:
+ get_param: src_port_end
+ network_policy_entries_policy_rule_src_ports_start_port:
+ get_param: src_port_start
+ type: "OS::ContrailV2::NetworkPolicy"
+
+ template_VirtualNetwork_2:
+ depends_on:
+ - template_NetworkIpam_2
+ - template_NetworkPolicy_1
+ properties:
+ name:
+ get_param: left_vn
+ network_ipam_refs:
+ -
+ get_resource: template_NetworkIpam_2
+ network_ipam_refs_data:
+ -
+ network_ipam_refs_data_ipam_subnets:
+ -
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_param: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ network_policy_refs: [ { list_join: [':', { get_attr: [ template_NetworkPolicy_1, fq_name ] } ] }, { get_attr: [ template_NetworkPolicy_2, fq_name ] },{ get_resource: template_NetworkPolicy_3}]
+ network_policy_refs_data:
+ -
+ network_policy_refs_data_sequence:
+ network_policy_refs_data_sequence_major: 0
+ network_policy_refs_data_sequence_minor: 0
+ type: "OS::ContrailV2::VirtualNetwork"
+ Internal-subnet-1:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: template_VirtualNetwork_2 }
+ cidr: { get_param: Internal1_cidr }
+ gateway_ip: { get_param: Internal1_default_gateway }
+ enable_dhcp: { get_param: Internal1_dhcp }
+
+ Internal-subnet-2:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: template_VirtualNetwork_2 }
+ cidr: { get_param: Internal2_cidr }
+ gateway_ip: { get_param: Internal2_default_gateway }
+ enable_dhcp: { get_param: Internal2_dhcp } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/ContrailV2_Multi_net_single_policy_translation/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/ContrailV2_Multi_net_single_policy_translation/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..f00614b2ad
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/ContrailV2_Multi_net_single_policy_translation/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,291 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ left_vn_fqdn:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ Internal1_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ src_port_start:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ Internal1_default_gateway:
+ hidden: false
+ immutable: false
+ type: string
+ Internal1_dhcp:
+ hidden: false
+ immutable: false
+ type: string
+ src_port_end:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ policy_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ dst_port_end:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ simple_action:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ service_instance_fq_name:
+ hidden: false
+ immutable: false
+ type: string
+ Internal2_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ protocol:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ Internal2_dhcp:
+ hidden: false
+ immutable: false
+ type: string
+ dst_port_start:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ network_ipam_refs_data_ipam_subnets_addr_from_start_true:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ Internal2_default_gateway:
+ hidden: false
+ immutable: false
+ type: string
+ right_vn_fqdn:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ left_vn:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ direction:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ node_templates:
+ template_NetworkPolicy:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.contrailV2.NetworkRules
+ properties:
+ name:
+ get_input: policy_name
+ network_policy_entries:
+ network_policy_entries_policy_rule:
+ - network_policy_entries_policy_rule_dst_addresses:
+ - network_policy_entries_policy_rule_dst_addresses_virtual_network:
+ get_input: right_vn_fqdn
+ network_policy_entries_policy_rule_dst_ports:
+ - network_policy_entries_policy_rule_dst_ports_start_port:
+ get_input: dst_port_start
+ network_policy_entries_policy_rule_dst_ports_end_port:
+ get_input: dst_port_end
+ network_policy_entries_policy_rule_protocol:
+ get_input: protocol
+ network_policy_entries_policy_rule_src_addresses:
+ - network_policy_entries_policy_rule_src_addresses_virtual_network:
+ get_input: left_vn_fqdn
+ network_policy_entries_policy_rule_direction:
+ get_input: direction
+ network_policy_entries_policy_rule_src_ports:
+ - network_policy_entries_policy_rule_src_ports_start_port:
+ get_input: src_port_start
+ network_policy_entries_policy_rule_src_ports_end_port:
+ get_input: src_port_end
+ network_policy_entries_policy_rule_action_list:
+ network_policy_entries_policy_rule_action_list_simple_action:
+ get_input: simple_action
+ network_policy_entries_policy_rule_action_list_apply_service:
+ - get_input: service_instance_fq_name
+ requirements:
+ - network:
+ capability: tosca.capabilities.Attachment
+ node: template_VirtualNetwork_1
+ relationship: org.openecomp.relationships.AttachesTo
+ - network:
+ capability: tosca.capabilities.Attachment
+ node: template_VirtualNetwork_2
+ relationship: org.openecomp.relationships.AttachesTo
+ - network:
+ capability: tosca.capabilities.Attachment
+ node: template_VirtualNetwork_3
+ relationship: org.openecomp.relationships.AttachesTo
+ template_VirtualNetwork_2:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork
+ properties:
+ dhcp_enabled:
+ get_input: Internal1_dhcp
+ network_ipam_refs_data:
+ - network_ipam_refs_data_ipam_subnets:
+ - network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_policy_refs_data:
+ - network_policy_refs_data_sequence:
+ network_policy_refs_data_sequence_major: 0
+ network_policy_refs_data_sequence_minor: 0
+ network_name:
+ get_input: left_vn
+ network_ipam_refs:
+ - UNSUPPORTED_RESOURCE_template_NetworkIpam_2
+ network_policy_refs:
+ - get_attribute:
+ - template_NetworkPolicy
+ - fq_name
+ subnets:
+ Internal-subnet-1:
+ enable_dhcp:
+ get_input: Internal1_dhcp
+ cidr:
+ get_input: Internal1_cidr
+ gateway_ip:
+ get_input: Internal1_default_gateway
+ Internal-subnet-2:
+ enable_dhcp:
+ get_input: Internal2_dhcp
+ cidr:
+ get_input: Internal2_cidr
+ gateway_ip:
+ get_input: Internal2_default_gateway
+ requirements:
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: template_NetworkPolicy
+ relationship: tosca.relationships.DependsOn
+ template_VirtualNetwork_1:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork
+ properties:
+ network_ipam_refs_data:
+ - network_ipam_refs_data_ipam_subnets:
+ - network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_policy_refs_data:
+ - network_policy_refs_data_sequence:
+ network_policy_refs_data_sequence_major: 0
+ network_policy_refs_data_sequence_minor: 0
+ network_name:
+ get_input: left_vn
+ network_ipam_refs:
+ - UNSUPPORTED_RESOURCE_template_NetworkIpam_2
+ network_policy_refs:
+ - list_join:
+ - ':'
+ - get_attribute:
+ - template_NetworkPolicy
+ - fq_name
+ requirements:
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: template_NetworkPolicy
+ relationship: tosca.relationships.DependsOn
+ template_VirtualNetwork_3:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork
+ properties:
+ network_ipam_refs_data:
+ - network_ipam_refs_data_ipam_subnets:
+ - network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_policy_refs_data:
+ - network_policy_refs_data_sequence:
+ network_policy_refs_data_sequence_major: 0
+ network_policy_refs_data_sequence_minor: 0
+ network_name:
+ get_input: left_vn
+ network_ipam_refs:
+ - UNSUPPORTED_RESOURCE_template_NetworkIpam_2
+ network_policy_refs:
+ - template_NetworkPolicy
+ requirements:
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: template_NetworkPolicy
+ relationship: tosca.relationships.DependsOn
+ groups:
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: cmaui server template for vMMSC
+ members:
+ - template_NetworkPolicy
+ - template_VirtualNetwork_2
+ - template_VirtualNetwork_1
+ - template_VirtualNetwork_3 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/ContrailV2_Multi_net_single_policy_translation/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/ContrailV2_Multi_net_single_policy_translation/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..539e26b7ab
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/ContrailV2_Multi_net_single_policy_translation/inputfiles/MANIFEST.json
@@ -0,0 +1,12 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/ContrailV2_Multi_net_single_policy_translation/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/ContrailV2_Multi_net_single_policy_translation/inputfiles/main.yml
new file mode 100644
index 0000000000..ceb55edea2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/ContrailV2_Multi_net_single_policy_translation/inputfiles/main.yml
@@ -0,0 +1,203 @@
+description: "cmaui server template for vMMSC"
+heat_template_version: 2013-05-23
+parameters:
+ Internal1_cidr:
+ type: string
+ Internal2_cidr:
+ type: string
+ Internal1_default_gateway:
+ type: string
+ Internal2_default_gateway:
+ type: string
+ Internal1_dhcp:
+ type: string
+ Internal2_dhcp:
+ type: string
+ direction:
+ description: dummy
+ type: string
+ dst_port_end:
+ description: dummy
+ type: string
+ dst_port_start:
+ description: dummy
+ type: string
+ left_vn:
+ description: dummy
+ type: string
+ left_vn_fqdn:
+ description: dummy
+ type: string
+ network_ipam_refs_data_ipam_subnets_addr_from_start_true:
+ description: dummy
+ type: string
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2:
+ description: dummy
+ type: string
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2:
+ description: dummy
+ type: string
+ policy_name:
+ description: dummy
+ type: string
+ protocol:
+ description: dummy
+ type: string
+ right_vn_fqdn:
+ description: dummy
+ type: string
+ simple_action:
+ description: dummy
+ type: string
+ src_port_end:
+ description: dummy
+ type: string
+ src_port_start:
+ description: dummy
+ type: string
+ service_instance_fq_name:
+ type: string
+resources:
+ template_NetworkIpam_2:
+ properties:
+ name:
+ get_param: left_vn
+ type: "OS::ContrailV2::NetworkIpam"
+ template_NetworkPolicy:
+ properties:
+ name:
+ get_param: policy_name
+ network_policy_entries:
+ network_policy_entries_policy_rule:
+ -
+ network_policy_entries_policy_rule_action_list:
+ network_policy_entries_policy_rule_action_list_apply_service:
+ -
+ get_param: service_instance_fq_name
+ network_policy_entries_policy_rule_action_list_simple_action:
+ get_param: simple_action
+ network_policy_entries_policy_rule_direction:
+ get_param: direction
+ network_policy_entries_policy_rule_dst_addresses:
+ -
+ network_policy_entries_policy_rule_dst_addresses_virtual_network:
+ get_param: right_vn_fqdn
+ network_policy_entries_policy_rule_dst_ports:
+ -
+ network_policy_entries_policy_rule_dst_ports_end_port:
+ get_param: dst_port_end
+ network_policy_entries_policy_rule_dst_ports_start_port:
+ get_param: dst_port_start
+ network_policy_entries_policy_rule_protocol:
+ get_param: protocol
+ network_policy_entries_policy_rule_src_addresses:
+ -
+ network_policy_entries_policy_rule_src_addresses_virtual_network:
+ get_param: left_vn_fqdn
+ network_policy_entries_policy_rule_src_ports:
+ -
+ network_policy_entries_policy_rule_src_ports_end_port:
+ get_param: src_port_end
+ network_policy_entries_policy_rule_src_ports_start_port:
+ get_param: src_port_start
+ type: "OS::ContrailV2::NetworkPolicy"
+ template_VirtualNetwork_1:
+ depends_on:
+ - template_NetworkIpam_2
+ - template_NetworkPolicy
+ properties:
+ name:
+ get_param: left_vn
+ network_ipam_refs:
+ -
+ get_resource: template_NetworkIpam_2
+ network_ipam_refs_data:
+ -
+ network_ipam_refs_data_ipam_subnets:
+ -
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_param: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ network_policy_refs: [ { list_join: [':', { get_attr: [ template_NetworkPolicy, fq_name ] } ] } ]
+ network_policy_refs_data:
+ -
+ network_policy_refs_data_sequence:
+ network_policy_refs_data_sequence_major: 0
+ network_policy_refs_data_sequence_minor: 0
+ type: "OS::ContrailV2::VirtualNetwork"
+ template_VirtualNetwork_2:
+ depends_on:
+ - template_NetworkIpam_2
+ - template_NetworkPolicy
+ properties:
+ name:
+ get_param: left_vn
+ network_ipam_refs:
+ -
+ get_resource: template_NetworkIpam_2
+ network_ipam_refs_data:
+ -
+ network_ipam_refs_data_ipam_subnets:
+ -
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_param: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ network_policy_refs: [ { get_attr: [ template_NetworkPolicy, fq_name ] } ]
+ network_policy_refs_data:
+ -
+ network_policy_refs_data_sequence:
+ network_policy_refs_data_sequence_major: 0
+ network_policy_refs_data_sequence_minor: 0
+ type: "OS::ContrailV2::VirtualNetwork"
+ template_VirtualNetwork_3:
+ depends_on:
+ - template_NetworkIpam_2
+ - template_NetworkPolicy
+ properties:
+ name:
+ get_param: left_vn
+ network_ipam_refs:
+ -
+ get_resource: template_NetworkIpam_2
+ network_ipam_refs_data:
+ -
+ network_ipam_refs_data_ipam_subnets:
+ -
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_param: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ network_policy_refs: [ { get_resource: template_NetworkPolicy } ]
+ network_policy_refs_data:
+ -
+ network_policy_refs_data_sequence:
+ network_policy_refs_data_sequence_major: 0
+ network_policy_refs_data_sequence_minor: 0
+ type: "OS::ContrailV2::VirtualNetwork"
+
+ Internal-subnet-1:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: template_VirtualNetwork_2 }
+ cidr: { get_param: Internal1_cidr }
+ gateway_ip: { get_param: Internal1_default_gateway }
+ enable_dhcp: { get_param: Internal1_dhcp }
+
+ Internal-subnet-2:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: template_VirtualNetwork_2 }
+ cidr: { get_param: Internal2_cidr }
+ gateway_ip: { get_param: Internal2_default_gateway }
+ enable_dhcp: { get_param: Internal2_dhcp } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/invalid_policy_resource_type/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/invalid_policy_resource_type/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..31bb9db74a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/invalid_policy_resource_type/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,193 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ left_vn_fqdn:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ Internal1_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ src_port_start:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ Internal1_default_gateway:
+ hidden: false
+ immutable: false
+ type: string
+ Internal1_dhcp:
+ hidden: false
+ immutable: false
+ type: string
+ src_port_end:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ policy_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ dst_port_end:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ simple_action:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ service_instance_fq_name:
+ hidden: false
+ immutable: false
+ type: string
+ Internal2_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ protocol:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ Internal2_dhcp:
+ hidden: false
+ immutable: false
+ type: string
+ dst_port_start:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ network_ipam_refs_data_ipam_subnets_addr_from_start_true:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ Internal2_default_gateway:
+ hidden: false
+ immutable: false
+ type: string
+ right_vn_fqdn:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ left_vn:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ direction:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ node_templates:
+ template_NetworkPolicy:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.contrail.NetworkRules
+ properties:
+ name:
+ get_input: policy_name
+ template_VirtualNetwork_2:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork
+ properties:
+ dhcp_enabled:
+ get_input: Internal1_dhcp
+ network_ipam_refs_data:
+ - network_ipam_refs_data_ipam_subnets:
+ - network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_policy_refs_data:
+ - network_policy_refs_data_sequence:
+ network_policy_refs_data_sequence_major: 0
+ network_policy_refs_data_sequence_minor: 0
+ network_name:
+ get_input: left_vn
+ network_ipam_refs:
+ - UNSUPPORTED_RESOURCE_template_NetworkIpam_2
+ network_policy_refs:
+ - list_join:
+ - ':'
+ - get_attribute:
+ - template_NetworkPolicy
+ - fq_name
+ subnets:
+ Internal-subnet-1:
+ enable_dhcp:
+ get_input: Internal1_dhcp
+ cidr:
+ get_input: Internal1_cidr
+ gateway_ip:
+ get_input: Internal1_default_gateway
+ Internal-subnet-2:
+ enable_dhcp:
+ get_input: Internal2_dhcp
+ cidr:
+ get_input: Internal2_cidr
+ gateway_ip:
+ get_input: Internal2_default_gateway
+ requirements:
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: template_NetworkPolicy
+ relationship: tosca.relationships.DependsOn
+ groups:
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: cmaui server template for vMMSC
+ members:
+ - template_NetworkPolicy
+ - template_VirtualNetwork_2 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/invalid_policy_resource_type/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/invalid_policy_resource_type/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..539e26b7ab
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/invalid_policy_resource_type/inputfiles/MANIFEST.json
@@ -0,0 +1,12 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/invalid_policy_resource_type/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/invalid_policy_resource_type/inputfiles/main.yml
new file mode 100644
index 0000000000..013b62d42c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/invalid_policy_resource_type/inputfiles/main.yml
@@ -0,0 +1,153 @@
+description: "cmaui server template for vMMSC"
+heat_template_version: 2013-05-23
+parameters:
+ Internal1_cidr:
+ type: string
+ Internal2_cidr:
+ type: string
+ Internal1_default_gateway:
+ type: string
+ Internal2_default_gateway:
+ type: string
+ Internal1_dhcp:
+ type: string
+ Internal2_dhcp:
+ type: string
+ direction:
+ description: dummy
+ type: string
+ dst_port_end:
+ description: dummy
+ type: string
+ dst_port_start:
+ description: dummy
+ type: string
+ left_vn:
+ description: dummy
+ type: string
+ left_vn_fqdn:
+ description: dummy
+ type: string
+ network_ipam_refs_data_ipam_subnets_addr_from_start_true:
+ description: dummy
+ type: string
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2:
+ description: dummy
+ type: string
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2:
+ description: dummy
+ type: string
+ policy_name:
+ description: dummy
+ type: string
+ protocol:
+ description: dummy
+ type: string
+ right_vn_fqdn:
+ description: dummy
+ type: string
+ simple_action:
+ description: dummy
+ type: string
+ src_port_end:
+ description: dummy
+ type: string
+ src_port_start:
+ description: dummy
+ type: string
+ service_instance_fq_name:
+ type: string
+resources:
+ template_NetworkIpam_2:
+ properties:
+ name:
+ get_param: left_vn
+ type: "OS::ContrailV2::NetworkIpam"
+ template_NetworkPolicy:
+ properties:
+ name:
+ get_param: policy_name
+ network_policy_entries:
+ network_policy_entries_policy_rule:
+ -
+ network_policy_entries_policy_rule_action_list:
+ network_policy_entries_policy_rule_action_list_apply_service:
+ -
+ get_param: service_instance_fq_name
+ network_policy_entries_policy_rule_action_list_simple_action:
+ get_param: simple_action
+ network_policy_entries_policy_rule_direction:
+ get_param: direction
+ network_policy_entries_policy_rule_dst_addresses:
+ -
+ network_policy_entries_policy_rule_dst_addresses_virtual_network:
+ get_param: right_vn_fqdn
+ network_policy_entries_policy_rule_dst_ports:
+ -
+ network_policy_entries_policy_rule_dst_ports_end_port:
+ get_param: dst_port_end
+ network_policy_entries_policy_rule_dst_ports_start_port:
+ get_param: dst_port_start
+ network_policy_entries_policy_rule_protocol:
+ get_param: protocol
+ network_policy_entries_policy_rule_src_addresses:
+ -
+ network_policy_entries_policy_rule_src_addresses_virtual_network:
+ get_param: left_vn_fqdn
+ network_policy_entries_policy_rule_src_ports:
+ -
+ network_policy_entries_policy_rule_src_ports_end_port:
+ get_param: src_port_end
+ network_policy_entries_policy_rule_src_ports_start_port:
+ get_param: src_port_start
+ type: "OS::Contrail::NetworkPolicy"
+ template_VirtualNetwork_2:
+ depends_on:
+ - template_NetworkIpam_2
+ - template_NetworkPolicy
+ properties:
+ name:
+ get_param: left_vn
+ network_ipam_refs:
+ -
+ get_resource: template_NetworkIpam_2
+ network_ipam_refs_data:
+ -
+ network_ipam_refs_data_ipam_subnets:
+ -
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_param: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ network_policy_refs:
+ -
+ list_join:
+ - ":"
+ -
+ get_attr:
+ - template_NetworkPolicy
+ - fq_name
+ network_policy_refs_data:
+ -
+ network_policy_refs_data_sequence:
+ network_policy_refs_data_sequence_major: 0
+ network_policy_refs_data_sequence_minor: 0
+ type: "OS::ContrailV2::VirtualNetwork"
+ Internal-subnet-1:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: template_VirtualNetwork_2 }
+ cidr: { get_param: Internal1_cidr }
+ gateway_ip: { get_param: Internal1_default_gateway }
+ enable_dhcp: { get_param: Internal1_dhcp }
+
+ Internal-subnet-2:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: template_VirtualNetwork_2 }
+ cidr: { get_param: Internal2_cidr }
+ gateway_ip: { get_param: Internal2_default_gateway }
+ enable_dhcp: { get_param: Internal2_dhcp } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/simple/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/simple/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..3abd06c651
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/simple/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,225 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ left_vn_fqdn:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ Internal1_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ src_port_start:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ Internal1_default_gateway:
+ hidden: false
+ immutable: false
+ type: string
+ Internal1_dhcp:
+ hidden: false
+ immutable: false
+ type: string
+ src_port_end:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ policy_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ dst_port_end:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ simple_action:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ service_instance_fq_name:
+ hidden: false
+ immutable: false
+ type: string
+ Internal2_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ protocol:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ Internal2_dhcp:
+ hidden: false
+ immutable: false
+ type: string
+ dst_port_start:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ network_ipam_refs_data_ipam_subnets_addr_from_start_true:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ Internal2_default_gateway:
+ hidden: false
+ immutable: false
+ type: string
+ right_vn_fqdn:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ left_vn:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ direction:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ node_templates:
+ template_NetworkPolicy:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.contrailV2.NetworkRules
+ properties:
+ name:
+ get_input: policy_name
+ network_policy_entries:
+ network_policy_entries_policy_rule:
+ - network_policy_entries_policy_rule_dst_addresses:
+ - network_policy_entries_policy_rule_dst_addresses_virtual_network:
+ get_input: right_vn_fqdn
+ network_policy_entries_policy_rule_dst_ports:
+ - network_policy_entries_policy_rule_dst_ports_start_port:
+ get_input: dst_port_start
+ network_policy_entries_policy_rule_dst_ports_end_port:
+ get_input: dst_port_end
+ network_policy_entries_policy_rule_protocol:
+ get_input: protocol
+ network_policy_entries_policy_rule_src_addresses:
+ - network_policy_entries_policy_rule_src_addresses_virtual_network:
+ get_input: left_vn_fqdn
+ network_policy_entries_policy_rule_direction:
+ get_input: direction
+ network_policy_entries_policy_rule_src_ports:
+ - network_policy_entries_policy_rule_src_ports_start_port:
+ get_input: src_port_start
+ network_policy_entries_policy_rule_src_ports_end_port:
+ get_input: src_port_end
+ network_policy_entries_policy_rule_action_list:
+ network_policy_entries_policy_rule_action_list_simple_action:
+ get_input: simple_action
+ network_policy_entries_policy_rule_action_list_apply_service:
+ - get_input: service_instance_fq_name
+ requirements:
+ - network:
+ capability: tosca.capabilities.Attachment
+ node: template_VirtualNetwork_2
+ relationship: org.openecomp.relationships.AttachesTo
+ template_VirtualNetwork_2:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork
+ properties:
+ dhcp_enabled:
+ get_input: Internal1_dhcp
+ network_ipam_refs_data:
+ - network_ipam_refs_data_ipam_subnets:
+ - network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_policy_refs_data:
+ - network_policy_refs_data_sequence:
+ network_policy_refs_data_sequence_major: 0
+ network_policy_refs_data_sequence_minor: 0
+ network_name:
+ get_input: left_vn
+ network_ipam_refs:
+ - UNSUPPORTED_RESOURCE_template_NetworkIpam_2
+ network_policy_refs:
+ - list_join:
+ - ':'
+ - get_attribute:
+ - template_NetworkPolicy
+ - fq_name
+ subnets:
+ Internal-subnet-1:
+ enable_dhcp:
+ get_input: Internal1_dhcp
+ cidr:
+ get_input: Internal1_cidr
+ gateway_ip:
+ get_input: Internal1_default_gateway
+ Internal-subnet-2:
+ enable_dhcp:
+ get_input: Internal2_dhcp
+ cidr:
+ get_input: Internal2_cidr
+ gateway_ip:
+ get_input: Internal2_default_gateway
+ requirements:
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: template_NetworkPolicy
+ relationship: tosca.relationships.DependsOn
+ groups:
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: cmaui server template for vMMSC
+ members:
+ - template_NetworkPolicy
+ - template_VirtualNetwork_2 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/simple/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/simple/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..539e26b7ab
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/simple/inputfiles/MANIFEST.json
@@ -0,0 +1,12 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/simple/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/simple/inputfiles/main.yml
new file mode 100644
index 0000000000..b14811e8e0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/ContrailV2_translation/simple/inputfiles/main.yml
@@ -0,0 +1,153 @@
+description: "cmaui server template for vMMSC"
+heat_template_version: 2013-05-23
+parameters:
+ Internal1_cidr:
+ type: string
+ Internal2_cidr:
+ type: string
+ Internal1_default_gateway:
+ type: string
+ Internal2_default_gateway:
+ type: string
+ Internal1_dhcp:
+ type: string
+ Internal2_dhcp:
+ type: string
+ direction:
+ description: dummy
+ type: string
+ dst_port_end:
+ description: dummy
+ type: string
+ dst_port_start:
+ description: dummy
+ type: string
+ left_vn:
+ description: dummy
+ type: string
+ left_vn_fqdn:
+ description: dummy
+ type: string
+ network_ipam_refs_data_ipam_subnets_addr_from_start_true:
+ description: dummy
+ type: string
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2:
+ description: dummy
+ type: string
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2:
+ description: dummy
+ type: string
+ policy_name:
+ description: dummy
+ type: string
+ protocol:
+ description: dummy
+ type: string
+ right_vn_fqdn:
+ description: dummy
+ type: string
+ simple_action:
+ description: dummy
+ type: string
+ src_port_end:
+ description: dummy
+ type: string
+ src_port_start:
+ description: dummy
+ type: string
+ service_instance_fq_name:
+ type: string
+resources:
+ template_NetworkIpam_2:
+ properties:
+ name:
+ get_param: left_vn
+ type: "OS::ContrailV2::NetworkIpam"
+ template_NetworkPolicy:
+ properties:
+ name:
+ get_param: policy_name
+ network_policy_entries:
+ network_policy_entries_policy_rule:
+ -
+ network_policy_entries_policy_rule_action_list:
+ network_policy_entries_policy_rule_action_list_apply_service:
+ -
+ get_param: service_instance_fq_name
+ network_policy_entries_policy_rule_action_list_simple_action:
+ get_param: simple_action
+ network_policy_entries_policy_rule_direction:
+ get_param: direction
+ network_policy_entries_policy_rule_dst_addresses:
+ -
+ network_policy_entries_policy_rule_dst_addresses_virtual_network:
+ get_param: right_vn_fqdn
+ network_policy_entries_policy_rule_dst_ports:
+ -
+ network_policy_entries_policy_rule_dst_ports_end_port:
+ get_param: dst_port_end
+ network_policy_entries_policy_rule_dst_ports_start_port:
+ get_param: dst_port_start
+ network_policy_entries_policy_rule_protocol:
+ get_param: protocol
+ network_policy_entries_policy_rule_src_addresses:
+ -
+ network_policy_entries_policy_rule_src_addresses_virtual_network:
+ get_param: left_vn_fqdn
+ network_policy_entries_policy_rule_src_ports:
+ -
+ network_policy_entries_policy_rule_src_ports_end_port:
+ get_param: src_port_end
+ network_policy_entries_policy_rule_src_ports_start_port:
+ get_param: src_port_start
+ type: "OS::ContrailV2::NetworkPolicy"
+ template_VirtualNetwork_2:
+ depends_on:
+ - template_NetworkIpam_2
+ - template_NetworkPolicy
+ properties:
+ name:
+ get_param: left_vn
+ network_ipam_refs:
+ -
+ get_resource: template_NetworkIpam_2
+ network_ipam_refs_data:
+ -
+ network_ipam_refs_data_ipam_subnets:
+ -
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_param: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ network_policy_refs:
+ -
+ list_join:
+ - ":"
+ -
+ get_attr:
+ - template_NetworkPolicy
+ - fq_name
+ network_policy_refs_data:
+ -
+ network_policy_refs_data_sequence:
+ network_policy_refs_data_sequence_major: 0
+ network_policy_refs_data_sequence_minor: 0
+ type: "OS::ContrailV2::VirtualNetwork"
+ Internal-subnet-1:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: template_VirtualNetwork_2 }
+ cidr: { get_param: Internal1_cidr }
+ gateway_ip: { get_param: Internal1_default_gateway }
+ enable_dhcp: { get_param: Internal1_dhcp }
+
+ Internal-subnet-2:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: template_VirtualNetwork_2 }
+ cidr: { get_param: Internal2_cidr }
+ gateway_ip: { get_param: Internal2_default_gateway }
+ enable_dhcp: { get_param: Internal2_dhcp } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/multi/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/multi/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..9b25041540
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/multi/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,190 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ template_PortTuple_LB1:
+ hidden: false
+ immutable: false
+ type: string
+ oam_sec_group_name:
+ hidden: false
+ immutable: false
+ type: string
+ lb_st_interface_type_oam:
+ hidden: false
+ immutable: false
+ type: string
+ security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ shared_network_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ jsa_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ shared_network_id1:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ node_templates:
+ template_VMInt_OAM_lb_1:
+ type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface
+ properties:
+ security_group_refs:
+ - get_input: oam_sec_group_name
+ virtual_network_refs:
+ - get_input: shared_network_id
+ virtual_machine_interface_properties:
+ virtual_machine_interface_properties_service_interface_type:
+ get_input: lb_st_interface_type_oam
+ port_tuple_refs:
+ - get_input: template_PortTuple_LB1
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ template_VMInt_OAM_lb_2:
+ type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface
+ properties:
+ security_group_refs:
+ - get_input: oam_sec_group_name
+ virtual_network_refs:
+ - get_input: shared_network_id
+ - get_input: shared_network_id1
+ virtual_machine_interface_properties:
+ virtual_machine_interface_properties_service_interface_type:
+ get_input: lb_st_interface_type_oam
+ port_tuple_refs:
+ - get_input: template_PortTuple_LB1
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ test_net1:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ contrail_service_instance_ind: true
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ test_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ groups:
+ addOn:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/addOn.yml
+ description: cmaui server template for vMMSC
+ members:
+ - template_VMInt_OAM_lb_1
+ - template_VMInt_OAM_lb_2
+ - server_cmaui
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - test_net1
+ - test_net \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/multi/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/multi/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..1f762d0ccc
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/multi/inputfiles/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ },
+ {
+ "file": "addOn.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/multi/inputfiles/addOn.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/multi/inputfiles/addOn.yml
new file mode 100644
index 0000000000..4894cfa44c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/multi/inputfiles/addOn.yml
@@ -0,0 +1,72 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ p1:
+ type: string
+ description: UID of OAM network
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ security_group_name:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ shared_network_id:
+ type: string
+ description: Flavor for CMAUI server
+ shared_network_id1:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+ oam_sec_group_name:
+ type: string
+ lb_st_interface_type_oam:
+ type: string
+ template_PortTuple_LB1:
+ type: string
+
+resources:
+ template_VMInt_OAM_lb_1:
+ type: OS::ContrailV2::VirtualMachineInterface
+ properties:
+ virtual_machine_interface_properties:
+ {
+ virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam },
+ }
+ virtual_network_refs: [{ get_param: shared_network_id }]
+ port_tuple_refs: [{ get_param: template_PortTuple_LB1 }]
+ security_group_refs: [{ get_param: oam_sec_group_name}]
+
+ template_VMInt_OAM_lb_2:
+ type: OS::ContrailV2::VirtualMachineInterface
+ properties:
+ virtual_machine_interface_properties:
+ {
+ virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam },
+ }
+ virtual_network_refs: [{ get_param: shared_network_id }, { get_param: shared_network_id1 }]
+ port_tuple_refs: [{ get_param: template_PortTuple_LB1 }]
+ security_group_refs: [{ get_param: oam_sec_group_name}]
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: template_VMInt_OAM_lb_1 }
+ - port: { get_resource: template_VMInt_OAM_lb_2 } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/multi/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/multi/inputfiles/main.yml
new file mode 100644
index 0000000000..3bd60fc93e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/multi/inputfiles/main.yml
@@ -0,0 +1,28 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ jsa_net_name:
+ type: string
+ description: network name of jsa log network
+
+resources:
+ test_net:
+ type: OS::Neutron::Net
+ properties:
+ name: {get_param: jsa_net_name}
+ shared: True
+
+ test_net1:
+ type: OS::Neutron::Net
+ properties:
+ name: {get_param: jsa_net_name}
+ shared: True
+
+outputs:
+ shared_network_id:
+ value: {get_resource: test_net}
+ shared_network_id1:
+ value: {get_resource: test_net1} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..7b58dd24e0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,117 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.nested:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ cmaui_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ type: string
+ description: UID of OAM network
+ p2:
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ template_PortTuple_LB1:
+ type: string
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ oam_sec_group_name:
+ type: string
+ lb_st_interface_type_oam:
+ type: string
+ security_group_name:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ availability_zone_0:
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ type: string
+ requirements:
+ - link_template_VMInt_OAM_lb_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_template_VMInt_OAM_lb_2:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_server_cmaui:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ capabilities:
+ host_server_cmaui:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..623325a944
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,81 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ jsa_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ node_templates:
+ test_net1:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ test_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ test_nested:
+ type: org.openecomp.resource.abstract.nodes.heat.nested
+ directives:
+ - substitutable
+ properties:
+ p1: test_net
+ service_template_filter:
+ substitute_service_template: nestedServiceTemplate.yaml
+ p2: test_net1
+ requirements:
+ - link_template_VMInt_OAM_lb_1:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net
+ relationship: tosca.relationships.network.LinksTo
+ - link_template_VMInt_OAM_lb_2:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net
+ relationship: tosca.relationships.network.LinksTo
+ groups:
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - test_net1
+ - test_net
+ - test_nested \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/expectedoutputfiles/nestedServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/expectedoutputfiles/nestedServiceTemplate.yaml
new file mode 100644
index 0000000000..4484578db6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/expectedoutputfiles/nestedServiceTemplate.yaml
@@ -0,0 +1,181 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ p2:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ template_PortTuple_LB1:
+ hidden: false
+ immutable: false
+ type: string
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ oam_sec_group_name:
+ hidden: false
+ immutable: false
+ type: string
+ lb_st_interface_type_oam:
+ hidden: false
+ immutable: false
+ type: string
+ security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ node_templates:
+ template_VMInt_OAM_lb_1:
+ type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface
+ properties:
+ security_group_refs:
+ - get_input: oam_sec_group_name
+ virtual_network_refs:
+ - get_input: p1
+ virtual_machine_interface_properties:
+ virtual_machine_interface_properties_service_interface_type:
+ get_input: lb_st_interface_type_oam
+ port_tuple_refs:
+ - get_input: template_PortTuple_LB1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ template_VMInt_OAM_lb_2:
+ type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface
+ properties:
+ security_group_refs:
+ - get_input: oam_sec_group_name
+ virtual_network_refs:
+ - get_input: p1
+ - get_input: p2
+ virtual_machine_interface_properties:
+ virtual_machine_interface_properties_service_interface_type:
+ get_input: lb_st_interface_type_oam
+ port_tuple_refs:
+ - get_input: template_PortTuple_LB1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ contrail_service_instance_ind: true
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ groups:
+ nested:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested.yml
+ description: cmaui server template for vMMSC
+ members:
+ - template_VMInt_OAM_lb_1
+ - template_VMInt_OAM_lb_2
+ - server_cmaui
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested
+ capabilities:
+ host_server_cmaui:
+ - server_cmaui
+ - host
+ os_server_cmaui:
+ - server_cmaui
+ - os
+ endpoint_server_cmaui:
+ - server_cmaui
+ - endpoint
+ binding_server_cmaui:
+ - server_cmaui
+ - binding
+ scalable_server_cmaui:
+ - server_cmaui
+ - scalable
+ requirements:
+ link_template_VMInt_OAM_lb_1:
+ - template_VMInt_OAM_lb_1
+ - link
+ local_storage_server_cmaui:
+ - server_cmaui
+ - local_storage
+ link_template_VMInt_OAM_lb_2:
+ - template_VMInt_OAM_lb_2
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..aca75b5055
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/inputfiles/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ },
+ {
+ "file": "nested.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/inputfiles/main.yml
new file mode 100644
index 0000000000..e68f16ec29
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/inputfiles/main.yml
@@ -0,0 +1,27 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ jsa_net_name:
+ type: string
+ description: network name of jsa log network
+
+resources:
+ test_net:
+ type: OS::Neutron::Net
+ properties:
+ name: {get_param: jsa_net_name}
+ shared: True
+ test_net1:
+ type: OS::Neutron::Net
+ properties:
+ name: {get_param: jsa_net_name}
+ shared: True
+
+ test_nested:
+ type: nested.yml
+ properties:
+ p1: { get_resource: test_net}
+ p2: { get_resource: test_net1}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/inputfiles/nested.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/inputfiles/nested.yml
new file mode 100644
index 0000000000..c8d8857d08
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/inputfiles/nested.yml
@@ -0,0 +1,68 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ p1:
+ type: string
+ description: UID of OAM network
+ p2:
+ type: string
+ description: UID of OAM network
+ security_group_name:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+ oam_sec_group_name:
+ type: string
+ lb_st_interface_type_oam:
+ type: string
+ template_PortTuple_LB1:
+ type: string
+resources:
+ template_VMInt_OAM_lb_1:
+ type: OS::ContrailV2::VirtualMachineInterface
+ properties:
+ virtual_machine_interface_properties:
+ {
+ virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam },
+ }
+ virtual_network_refs: [{ get_param: p1 }]
+ port_tuple_refs: [{ get_param: template_PortTuple_LB1 }]
+ security_group_refs: [{ get_param: oam_sec_group_name}]
+
+ template_VMInt_OAM_lb_2:
+ type: OS::ContrailV2::VirtualMachineInterface
+ properties:
+ virtual_machine_interface_properties:
+ {
+ virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam },
+ }
+ virtual_network_refs: [{ get_param: p1 },{ get_param: p2 }]
+ port_tuple_refs: [{ get_param: template_PortTuple_LB1 }]
+ security_group_refs: [{ get_param: oam_sec_group_name}]
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: template_VMInt_OAM_lb_1 }
+ - port: { get_resource: template_VMInt_OAM_lb_2 } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..f0124b6d68
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,254 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.nested1:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ cmaui_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p2:
+ type: string
+ description: UID of OAM network
+ abc_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ template_PortTuple_LB1:
+ type: string
+ oam_sec_group_name:
+ type: string
+ lb_st_interface_type_oam:
+ type: string
+ abc_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ security_group_name:
+ description: not impotrtant
+ shared_network_id1:
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ availability_zone_0:
+ type: string
+ description: availabilityzone name
+ abc_oam_ips:
+ type: string
+ cmaui_oam_ips:
+ type: string
+ abc_image:
+ type: string
+ description: Image for CMAUI server
+ requirements:
+ - link_template_VMInt_OAM_lb_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_template_VMInt_OAM_lb_2:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_template_VMInt_OAM_lb_3:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_server_cmaui:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - local_storage_server_abc:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_abc_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ scalable_server_abc:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_cmaui:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_abc:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_abc_port_1:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_abc:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_abc:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_abc:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ org.openecomp.resource.abstract.nodes.heat.nested2:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ cmaui_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ security_group_name:
+ description: not impotrtant
+ availability_zone_0:
+ type: string
+ description: availabilityzone name
+ abc_oam_ips:
+ type: string
+ cmaui_oam_ips:
+ type: string
+ requirements:
+ - local_storage_server_cmaui:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_cmaui_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ host_server_cmaui:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_1:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..c5d68ff070
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,152 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ shared_network_id1:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ shared_network_id2:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ jsa_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ node_templates:
+ test_net2:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ test_nested2:
+ type: org.openecomp.resource.abstract.nodes.heat.nested2
+ directives:
+ - substitutable
+ properties:
+ p1:
+ get_input: shared_network_id1
+ service_template_filter:
+ substitute_service_template: nested2ServiceTemplate.yaml
+ requirements:
+ - link_cmaui_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net1
+ relationship: tosca.relationships.network.LinksTo
+ test_nested3:
+ type: org.openecomp.resource.abstract.nodes.heat.nested1
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nested1ServiceTemplate.yaml
+ shared_network_id1:
+ get_input: shared_network_id1
+ p2:
+ get_input: shared_network_id2
+ requirements:
+ - link_abc_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net2
+ relationship: tosca.relationships.network.LinksTo
+ - link_template_VMInt_OAM_lb_1:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net1
+ relationship: tosca.relationships.network.LinksTo
+ - link_template_VMInt_OAM_lb_2:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net2
+ relationship: tosca.relationships.network.LinksTo
+ - link_template_VMInt_OAM_lb_3:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net2
+ relationship: tosca.relationships.network.LinksTo
+ test_net1:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ test_nested1:
+ type: org.openecomp.resource.abstract.nodes.heat.nested1
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nested1ServiceTemplate.yaml
+ shared_network_id1:
+ get_input: shared_network_id1
+ p2:
+ get_input: shared_network_id2
+ requirements:
+ - link_abc_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net2
+ relationship: tosca.relationships.network.LinksTo
+ - link_template_VMInt_OAM_lb_1:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net1
+ relationship: tosca.relationships.network.LinksTo
+ - link_template_VMInt_OAM_lb_2:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net2
+ relationship: tosca.relationships.network.LinksTo
+ - link_template_VMInt_OAM_lb_3:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net2
+ relationship: tosca.relationships.network.LinksTo
+ groups:
+ addOn:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/addOn.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - test_nested2
+ - test_nested3
+ - test_nested1
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - test_net2
+ - test_net1 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/expectedoutputfiles/nested1ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/expectedoutputfiles/nested1ServiceTemplate.yaml
new file mode 100644
index 0000000000..a10ccc2e1a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/expectedoutputfiles/nested1ServiceTemplate.yaml
@@ -0,0 +1,279 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested1
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.abc:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p2:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ abc_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ template_PortTuple_LB1:
+ hidden: false
+ immutable: false
+ type: string
+ oam_sec_group_name:
+ hidden: false
+ immutable: false
+ type: string
+ lb_st_interface_type_oam:
+ hidden: false
+ immutable: false
+ type: string
+ abc_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ security_group_name:
+ hidden: false
+ immutable: false
+ description: not impotrtant
+ shared_network_id1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ abc_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ abc_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ node_templates:
+ template_VMInt_OAM_lb_1:
+ type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface
+ properties:
+ security_group_refs:
+ - get_input: oam_sec_group_name
+ virtual_network_refs:
+ - get_input: shared_network_id1
+ virtual_machine_interface_properties:
+ virtual_machine_interface_properties_service_interface_type:
+ get_input: lb_st_interface_type_oam
+ port_tuple_refs:
+ - get_input: template_PortTuple_LB1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ template_VMInt_OAM_lb_2:
+ type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface
+ properties:
+ security_group_refs:
+ - get_input: oam_sec_group_name
+ virtual_network_refs:
+ - get_input: p2
+ virtual_machine_interface_properties:
+ virtual_machine_interface_properties_service_interface_type:
+ get_input: lb_st_interface_type_oam
+ port_tuple_refs:
+ - get_input: template_PortTuple_LB1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ template_VMInt_OAM_lb_3:
+ type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface
+ properties:
+ security_group_refs:
+ - get_input: oam_sec_group_name
+ virtual_network_refs:
+ - get_input: p2
+ - get_input: shared_network_id1
+ virtual_machine_interface_properties:
+ virtual_machine_interface_properties_service_interface_type:
+ get_input: lb_st_interface_type_oam
+ port_tuple_refs:
+ - get_input: template_PortTuple_LB1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ contrail_service_instance_ind: true
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ server_abc:
+ type: org.openecomp.resource.vfc.nodes.heat.abc
+ properties:
+ flavor:
+ get_input: abc_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: abc_image
+ name:
+ get_input:
+ - abc_names
+ - 0
+ abc_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - abc_oam_ips
+ - 0
+ network:
+ get_input: p2
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_abc
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested1:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested1.yml
+ description: cmaui server template for vMMSC
+ members:
+ - template_VMInt_OAM_lb_1
+ - template_VMInt_OAM_lb_2
+ - template_VMInt_OAM_lb_3
+ - server_cmaui
+ - server_abc
+ - abc_port_1
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested1
+ capabilities:
+ scalable_server_abc:
+ - server_abc
+ - scalable
+ host_server_cmaui:
+ - server_cmaui
+ - host
+ os_server_cmaui:
+ - server_cmaui
+ - os
+ binding_server_abc:
+ - server_abc
+ - binding
+ endpoint_server_cmaui:
+ - server_cmaui
+ - endpoint
+ attachment_abc_port_1:
+ - abc_port_1
+ - attachment
+ binding_server_cmaui:
+ - server_cmaui
+ - binding
+ endpoint_server_abc:
+ - server_abc
+ - endpoint
+ scalable_server_cmaui:
+ - server_cmaui
+ - scalable
+ host_server_abc:
+ - server_abc
+ - host
+ os_server_abc:
+ - server_abc
+ - os
+ requirements:
+ link_template_VMInt_OAM_lb_1:
+ - template_VMInt_OAM_lb_1
+ - link
+ local_storage_server_cmaui:
+ - server_cmaui
+ - local_storage
+ link_template_VMInt_OAM_lb_3:
+ - template_VMInt_OAM_lb_3
+ - link
+ link_template_VMInt_OAM_lb_2:
+ - template_VMInt_OAM_lb_2
+ - link
+ link_abc_port_1:
+ - abc_port_1
+ - link
+ local_storage_server_abc:
+ - server_abc
+ - local_storage \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/expectedoutputfiles/nested2ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/expectedoutputfiles/nested2ServiceTemplate.yaml
new file mode 100644
index 0000000000..992e1c017c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/expectedoutputfiles/nested2ServiceTemplate.yaml
@@ -0,0 +1,146 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested2
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ security_group_name:
+ hidden: false
+ immutable: false
+ description: not impotrtant
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ abc_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ node_templates:
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ cmaui_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: p1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested2:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested2.yml
+ description: cmaui server template for vMMSC
+ members:
+ - server_cmaui
+ - cmaui_port_1
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested2
+ capabilities:
+ host_server_cmaui:
+ - server_cmaui
+ - host
+ os_server_cmaui:
+ - server_cmaui
+ - os
+ endpoint_server_cmaui:
+ - server_cmaui
+ - endpoint
+ binding_server_cmaui:
+ - server_cmaui
+ - binding
+ scalable_server_cmaui:
+ - server_cmaui
+ - scalable
+ attachment_cmaui_port_1:
+ - cmaui_port_1
+ - attachment
+ requirements:
+ local_storage_server_cmaui:
+ - server_cmaui
+ - local_storage
+ link_cmaui_port_1:
+ - cmaui_port_1
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..e593097c44
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/inputfiles/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ },
+ {
+ "file": "nested1.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ },
+ {
+ "file": "nested2.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ },
+ {
+ "file": "addOn.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/inputfiles/addOn.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/inputfiles/addOn.yml
new file mode 100644
index 0000000000..507bfcaa08
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/inputfiles/addOn.yml
@@ -0,0 +1,32 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ shared_network_id1:
+ type: string
+ description: network name of jsa log network
+
+ shared_network_id2:
+ type: string
+ description: network name of jsa log network
+
+resources:
+
+ test_nested1:
+ type: nested1.yml
+ properties:
+ shared_network_id1: { get_param: shared_network_id1}
+ p2: { get_param: shared_network_id2}
+
+ test_nested2:
+ type: nested2.yml
+ properties:
+ p1: { get_param: shared_network_id1}
+
+ test_nested3:
+ type: nested1.yml
+ properties:
+ shared_network_id1: { get_param: shared_network_id1}
+ p2: { get_param: shared_network_id2} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/inputfiles/main.yml
new file mode 100644
index 0000000000..9601c0f86d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/inputfiles/main.yml
@@ -0,0 +1,29 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ jsa_net_name:
+ type: string
+ description: network name of jsa log network
+
+resources:
+ test_net1:
+ type: OS::Neutron::Net
+ properties:
+ name: {get_param: jsa_net_name}
+ shared: True
+
+ test_net2:
+ type: OS::Neutron::Net
+ properties:
+ name: {get_param: jsa_net_name}
+ shared: True
+
+outputs:
+ shared_network_id1:
+ value: {get_resource: test_net1}
+
+ shared_network_id2:
+ value: {get_resource: test_net2} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/inputfiles/nested1.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/inputfiles/nested1.yml
new file mode 100644
index 0000000000..ab65fc9718
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/inputfiles/nested1.yml
@@ -0,0 +1,110 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ shared_network_id1:
+ type: string
+ description: UID of OAM network
+ p2:
+ type: string
+ description: UID of OAM network
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ abc_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ security_group_name:
+ type: not_important
+ description: not impotrtant
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ abc_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ abc_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+ abc_oam_ips:
+ type: string
+ oam_sec_group_name:
+ type: string
+ lb_st_interface_type_oam:
+ type: string
+ template_PortTuple_LB1:
+ type: string
+resources:
+
+ template_VMInt_OAM_lb_1:
+ type: OS::ContrailV2::VirtualMachineInterface
+ properties:
+ virtual_machine_interface_properties:
+ {
+ virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam },
+ }
+ virtual_network_refs: [{ get_param: shared_network_id1 }]
+ port_tuple_refs: [{ get_param: template_PortTuple_LB1 }]
+ security_group_refs: [{ get_param: oam_sec_group_name}]
+
+ template_VMInt_OAM_lb_2:
+ type: OS::ContrailV2::VirtualMachineInterface
+ properties:
+ virtual_machine_interface_properties:
+ {
+ virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam },
+ }
+ virtual_network_refs: [{ get_param: p2 }]
+ port_tuple_refs: [{ get_param: template_PortTuple_LB1 }]
+ security_group_refs: [{ get_param: oam_sec_group_name}]
+
+ template_VMInt_OAM_lb_3:
+ type: OS::ContrailV2::VirtualMachineInterface
+ properties:
+ virtual_machine_interface_properties:
+ {
+ virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam },
+ }
+ virtual_network_refs: [{ get_param: p2 },{ get_param: shared_network_id1 }]
+ port_tuple_refs: [{ get_param: template_PortTuple_LB1 }]
+ security_group_refs: [{ get_param: oam_sec_group_name}]
+
+ abc_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: p2 }
+ fixed_ips: [{"ip_address": {get_param: [abc_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: template_VMInt_OAM_lb_1 }
+ - port: { get_resource: template_VMInt_OAM_lb_2 }
+ - port: { get_resource: template_VMInt_OAM_lb_3 }
+
+ server_abc:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [abc_names, 0]}
+ image: { get_param: abc_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: abc_flavor }
+ networks:
+ - port: { get_resource: abc_port_1 } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/inputfiles/nested2.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/inputfiles/nested2.yml
new file mode 100644
index 0000000000..b09d3aff8e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/inputfiles/nested2.yml
@@ -0,0 +1,48 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ p1:
+ type: string
+ description: UID of OAM network
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ security_group_name:
+ type: not_important
+ description: not impotrtant
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+ abc_oam_ips:
+ type: string
+
+resources:
+
+ cmaui_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: p1 }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_1 } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/baseResourceTranslation/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/baseResourceTranslation/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..983a71f3b7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/baseResourceTranslation/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,215 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ cmaui_cinder_volume_size:
+ label: CMAUI Cinder volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the CMAUI Cinder volume
+ timezone:
+ label: timezone
+ hidden: false
+ immutable: false
+ type: string
+ description: timezone
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ oam_network_netmask:
+ label: oam network netmask
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ oam_network_gateway:
+ label: oam network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ label: CMAUI oam_net IP addresses
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI oam_net IP addresses
+ entry_schema:
+ type: string
+ external_dns:
+ label: dns server
+ hidden: false
+ immutable: false
+ type: string
+ description: dns server
+ oam_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ external_ntp:
+ label: ntp server
+ hidden: false
+ immutable: false
+ type: string
+ description: ntp server
+ CMAUI_volume_type:
+ label: CMAUI vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ node_templates:
+ server_dependOnString:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ requirements:
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: cmaui_volume
+ relationship: tosca.relationships.DependsOn
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ requirements:
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: cmaui_volume
+ relationship: tosca.relationships.DependsOn
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: cmaui_port_0
+ relationship: tosca.relationships.DependsOn
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: cmaui_volume
+ relationship: cmaui_volume_attachment
+ cmaui_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'
+ cmaui_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ relationship_templates:
+ cmaui_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: cmaui_volume
+ instance_uuid: server_cmaui
+ groups:
+ hot_template:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot_template.yml
+ description: cmaui server template for vMMSC
+ members:
+ - server_dependOnString
+ - server_cmaui
+ - cmaui_volume
+ - cmaui_port_0 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/baseResourceTranslation/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/baseResourceTranslation/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..b2916ccf9c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/baseResourceTranslation/inputfiles/MANIFEST.json
@@ -0,0 +1,11 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot_template.yml",
+ "type": "HEAT"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/baseResourceTranslation/inputfiles/hot_template.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/baseResourceTranslation/inputfiles/hot_template.yml
new file mode 100644
index 0000000000..a3e343b033
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/baseResourceTranslation/inputfiles/hot_template.yml
@@ -0,0 +1,131 @@
+heat_template_version: 2013-05-23
+
+#################################
+#
+# Changes from MSO 01/26/2016
+# Updated per ECOMP feedback
+#
+#################################
+
+description: cmaui server template for vMMSC
+
+parameters:
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_cinder_volume_size:
+ type: number
+ label: CMAUI Cinder volume size
+ description: the size of the CMAUI Cinder volume
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ oam_net_name:
+ type: string
+ description: UID of OAM network
+ oam_network_netmask:
+ type: string
+ label: oam network netmask
+ description: oam network gateway
+ oam_network_gateway:
+ type: string
+ label: oam network gateway
+ description: oam network gateway
+ external_dns:
+ type: string
+ label: dns server
+ description: dns server
+ external_ntp:
+ type: string
+ label: ntp server
+ description: ntp server
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ timezone:
+ type: string
+ label: timezone
+ description: timezone
+ cmaui_oam_ips:
+ type: comma_delimited_list
+ label: CMAUI oam_net IP addresses
+ description: CMAUI oam_net IP addresses
+ CMAUI_volume_type:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+
+resources:
+
+ cmaui_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ cmaui_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: cmaui_cinder_volume_size}
+ volume_type: {get_param: CMAUI_volume_type}
+
+ cmaui_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: cmaui_volume}
+ instance_uuid: {get_resource: server_cmaui}
+
+ server_cmaui:
+ type: OS::Nova::Server
+ depends_on: [ cmaui_volume,cmaui_port_0]
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_0 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ cmaui.mgmt.ip=${cmaui.mgmt.ip}
+ cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
+ cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
+ cmaui.external.dns=${cmaui.external.dns}
+ cmaui.external.ntp=${cmaui.external.ntp}
+ cmaui.node=${cmaui.node}
+ cmaui.timezone=${cmaui.timezone}
+ params:
+ ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 0]}
+ ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${cmaui.external.dns}: {get_param: external_dns}
+ ${cmaui.external.ntp}: {get_param: external_ntp}
+ ${cmaui.node}: {get_param: [cmaui_names, 0]}
+ ${cmaui.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ server_dependOnString:
+ type: OS::Nova::Server
+ depends_on: cmaui_volume
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/cinder_volume_translation/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/cinder_volume_translation/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..fcd6db6103
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/cinder_volume_translation/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,131 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ volume_type:
+ label: volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: volume type Gold
+ FSB1_volume_name:
+ label: FSB1_volume
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_volume_1
+ FSB_1_image:
+ label: MME_FSB1
+ hidden: false
+ immutable: false
+ type: string
+ description: MME_FSB1_15B-CP04-r5a01
+ volume_size:
+ label: volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: my volume size 320GB
+ stam:
+ label: stam
+ hidden: false
+ immutable: false
+ type: float
+ description: stam
+ FSB_2_image:
+ label: MME_FSB2
+ hidden: false
+ immutable: false
+ type: string
+ description: MME_FSB2_15B-CP04-r5a01
+ FSB2_volume_name:
+ label: FSB2_volume
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB2_volume_1
+ node_templates:
+ FSB1_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ image:
+ get_input: FSB_1_image
+ volume_type:
+ get_input: volume_type
+ size: 3*1024
+ read_only:
+ get_input: stam
+ name:
+ get_input: FSB1_volume_name
+ FSB2_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ image:
+ get_input: FSB_2_image
+ volume_type:
+ get_input: volume_type
+ size: '(get_input : volume_size) * 1024'
+ read_only: true
+ name:
+ get_input: FSB2_volume_name
+ FSB3_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ image:
+ get_input: FSB_1_image
+ volume_type:
+ get_input: volume_type
+ size: 3*1024
+ read_only: true
+ name:
+ get_input: FSB1_volume_name
+ FSB4_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ image:
+ get_input: FSB_2_image
+ volume_type:
+ get_input: volume_type
+ size: '(get_input : volume_size) * 1024'
+ read_only: true
+ name:
+ get_input: FSB2_volume_name
+ groups:
+ hot_template:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot_template.yml
+ description: server template for vMME
+ members:
+ - FSB1_volume
+ - FSB2_volume
+ - FSB3_volume
+ - FSB4_volume \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/cinder_volume_translation/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/cinder_volume_translation/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..70cdc7d237
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/cinder_volume_translation/inputfiles/MANIFEST.json
@@ -0,0 +1,11 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volumes",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot_template.yml",
+ "type": "HEAT"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/cinder_volume_translation/inputfiles/hot_template.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/cinder_volume_translation/inputfiles/hot_template.yml
new file mode 100644
index 0000000000..c1c6ebdc30
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/cinder_volume_translation/inputfiles/hot_template.yml
@@ -0,0 +1,79 @@
+heat_template_version: 2013-05-23
+
+description: server template for vMME
+
+parameters:
+
+ volume_type:
+ type: string
+ label: volume type
+ description: volume type Gold
+
+ volume_size:
+ type: number
+ label: volume size
+ description: my volume size 320GB
+
+ FSB_1_image:
+ type: string
+ label: MME_FSB1
+ description: MME_FSB1_15B-CP04-r5a01
+
+ FSB_2_image:
+ type: string
+ label: MME_FSB2
+ description: MME_FSB2_15B-CP04-r5a01
+
+ FSB1_volume_name:
+ type: string
+ label: FSB1_volume
+ description: FSB1_volume_1
+
+ FSB2_volume_name:
+ type: string
+ label: FSB2_volume
+ description: FSB2_volume_1
+
+ stam:
+ type: number
+ label: stam
+ description: stam
+
+resources:
+
+ FSB1_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: 3
+ volume_type: {get_param: volume_type}
+ name: {get_param: FSB1_volume_name}
+ image: {get_param: FSB_1_image}
+ read_only: {get_param: stam}
+
+ FSB2_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: volume_size}
+ volume_type: {get_param: volume_type}
+ name: {get_param: FSB2_volume_name}
+ image: {get_param: FSB_2_image}
+ read_only: 1
+
+ FSB3_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: 3
+ volume_type: {get_param: volume_type}
+ name: {get_param: FSB1_volume_name}
+ image: {get_param: FSB_1_image}
+ read_only: t
+
+ FSB4_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: volume_size}
+ volume_type: {get_param: volume_type}
+ name: {get_param: FSB2_volume_name}
+ image: {get_param: FSB_2_image}
+ read_only: true
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/diffServiceTemplate/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/diffServiceTemplate/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..d5a177bddb
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/diffServiceTemplate/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,83 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.compute_service_template_1:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.contrail.Compute
+ org.openecomp.resource.abstract.nodes.heat.service_template_2:
+ derived_from: org.openecomp.resource.abstract.nodes.contrail.AbstractSubstitute
+ requirements:
+ - link_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ org.openecomp.resource.abstract.nodes.heat.service_template_1:
+ derived_from: org.openecomp.resource.abstract.nodes.contrail.AbstractSubstitute
+ requirements:
+ - link_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_port_2:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_port_3:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ org.openecomp.resource.vfc.nodes.heat.st:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.contrail.Compute \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/diffServiceTemplate/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/diffServiceTemplate/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..a96c947d9d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/diffServiceTemplate/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,401 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ service_policy_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Policy Name
+ st_static_routes_list:
+ hidden: false
+ immutable: false
+ type: string
+ description: List of static routes enabled-disabled
+ st_type:
+ hidden: false
+ immutable: false
+ type: string
+ description: service type
+ st_service_interface_type_list:
+ hidden: false
+ immutable: false
+ type: string
+ description: List of interface types
+ st_mode:
+ hidden: false
+ immutable: false
+ type: string
+ description: service mode
+ Cricket_OCS_protected_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of Cricket OCS network
+ oam_mgmt_net_0_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of OAM network
+ start_dst_ports:
+ hidden: false
+ immutable: false
+ type: float
+ description: Start of dst port
+ st_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor
+ availability_zone_1:
+ hidden: false
+ immutable: false
+ type: string
+ description: availability zone
+ service_instance_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service instance name
+ st_scaling:
+ hidden: false
+ immutable: false
+ type: string
+ description: Indicates whether service scaling is enabled
+ max_num_fw_instances:
+ hidden: false
+ immutable: false
+ type: float
+ description: maximum number of firewall instances for scaling
+ start_src_ports:
+ hidden: false
+ immutable: false
+ type: float
+ description: Start of src port
+ service_policy_direction:
+ hidden: false
+ immutable: false
+ type: string
+ description: Direction of Policy
+ st_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of service template
+ count:
+ hidden: false
+ immutable: false
+ HSL_direct_net_gateway:
+ hidden: false
+ immutable: false
+ type: string
+ description: HSL (Logging) network gateway address
+ st_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of the image
+ st_shared_ip_list:
+ hidden: false
+ immutable: false
+ type: string
+ description: List of shared ip enabled-disabled
+ prefix_0:
+ hidden: false
+ immutable: false
+ type: string
+ Cricket_OCS_direct_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of Cricket OCS network
+ oam_mgmt_net_1_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of OAM network
+ prefix_1:
+ hidden: false
+ immutable: false
+ type: string
+ end_src_ports:
+ hidden: false
+ immutable: false
+ type: float
+ description: End of src port
+ prefix_2:
+ hidden: false
+ immutable: false
+ type: string
+ end_dst_ports:
+ hidden: false
+ immutable: false
+ type: float
+ description: End of dst port
+ st_image_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of the image
+ HSL_direct_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of HSL (Logging) network
+ HSL_direct_net_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ description: HSL (Logging) network address (CIDR notation)
+ node_templates:
+ service_instance_1:
+ type: org.openecomp.resource.abstract.nodes.heat.service_template_1
+ directives:
+ - substitutable
+ properties:
+ flavor:
+ get_input: st_flavor
+ availability_zone:
+ get_input: availability_zone_1
+ image_name:
+ get_input: st_image
+ service_template_filter:
+ substitute_service_template: service_instance_1ServiceTemplate.yaml
+ count:
+ get_input: max_num_fw_instances
+ scaling_enabled: false
+ mandatory: false
+ service_type:
+ get_input: st_type
+ static_routes_list:
+ - token:
+ - get_input: st_static_routes_list
+ - ','
+ - 0
+ - token:
+ - get_input: st_static_routes_list
+ - ','
+ - 1
+ - token:
+ - get_input: st_static_routes_list
+ - ','
+ - 2
+ - token:
+ - get_input: st_static_routes_list
+ - ','
+ - 3
+ service_template_name:
+ get_input: st_name
+ service_interface_type_list:
+ - token:
+ - management,left,right,other
+ - ','
+ - 0
+ - token:
+ - management,left,right,other
+ - ','
+ - 1
+ - token:
+ - management,left,right,other
+ - ','
+ - 2
+ - token:
+ - management,left,right,other
+ - ','
+ - 3
+ interface_list:
+ - virtual_network:
+ get_input: oam_mgmt_net_0_id
+ - virtual_network:
+ get_input: Cricket_OCS_direct_net_id
+ - virtual_network: hsl_direct_net
+ - static_routes:
+ - prefix:
+ get_input: prefix_0
+ - prefix:
+ get_input: prefix_1
+ - prefix:
+ get_input: prefix_2
+ virtual_network:
+ get_input: oam_mgmt_net_1_id
+ service_instance_name:
+ get_input: service_instance_name
+ service_mode:
+ get_input: st_mode
+ shared_ip_list:
+ - token:
+ - get_input: st_shared_ip_list
+ - ','
+ - 0
+ - token:
+ - get_input: st_shared_ip_list
+ - ','
+ - 1
+ - token:
+ - get_input: st_shared_ip_list
+ - ','
+ - 2
+ - token:
+ - get_input: st_shared_ip_list
+ - ','
+ - 3
+ requirements:
+ - link_port_2:
+ capability: tosca.capabilities.network.Linkable
+ node: hsl_direct_net
+ relationship: tosca.relationships.network.LinksTo
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: hsl_direct_net
+ relationship: tosca.relationships.DependsOn
+ service_instance_2:
+ type: org.openecomp.resource.abstract.nodes.heat.service_template_2
+ directives:
+ - substitutable
+ properties:
+ flavor:
+ get_input: st_flavor
+ availability_zone:
+ get_input: availability_zone_1
+ image_name:
+ get_input: st_image_name
+ service_template_filter:
+ substitute_service_template: service_instance_2ServiceTemplate.yaml
+ count: 9
+ mandatory: true
+ service_type:
+ get_input: st_type
+ static_routes_list:
+ - token:
+ - get_input: st_static_routes_list
+ - ','
+ - 0
+ - token:
+ - get_input: st_static_routes_list
+ - ','
+ - 1
+ service_template_name:
+ get_input: st_name
+ service_interface_type_list:
+ - token:
+ - get_input: st_service_interface_type_list
+ - ','
+ - 0
+ - token:
+ - get_input: st_service_interface_type_list
+ - ','
+ - 1
+ interface_list:
+ - virtual_network:
+ get_input: oam_mgmt_net_0_id
+ - virtual_network:
+ get_input: Cricket_OCS_direct_net_id
+ service_instance_name:
+ get_input: service_instance_name
+ service_mode:
+ get_input: st_mode
+ shared_ip_list:
+ - token:
+ - get_input: st_shared_ip_list
+ - ','
+ - 0
+ - token:
+ - get_input: st_shared_ip_list
+ - ','
+ - 1
+ requirements:
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: hsl_direct_net
+ relationship: tosca.relationships.DependsOn
+ hsl_direct_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ network_name:
+ get_input: HSL_direct_net_id
+ subnets:
+ hsl_ip_subnet:
+ cidr:
+ get_input: HSL_direct_net_cidr
+ gateway_ip:
+ get_input: HSL_direct_net_gateway
+ service_policy:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.contrail.NetworkRules
+ properties:
+ entries:
+ policy_rule:
+ - src_ports:
+ - start_port:
+ get_input: start_src_ports
+ end_port:
+ get_input: end_src_ports
+ protocol: any
+ metadata:
+ get_attribute:
+ - service_instance_2
+ - service_instance_name
+ action_list:
+ apply_service:
+ - service_instance_1
+ dst_addresses:
+ - virtual_network:
+ get_input: Cricket_OCS_direct_net_id
+ dst_ports:
+ - start_port:
+ get_input: start_dst_ports
+ end_port:
+ get_input: end_dst_ports
+ src_addresses:
+ - virtual_network:
+ get_input: Cricket_OCS_protected_net_id
+ direction:
+ get_input: service_policy_direction
+ name:
+ get_input: service_policy_name
+ requirements:
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: service_instance_1
+ relationship: tosca.relationships.DependsOn
+ groups:
+ OCS-fw:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/OCS-fw.yml
+ description: |
+ Based on the following reference for the HOT-DMZ-FW template: Version 3.5 8-10-2015 (Authors: Art Mishurov,am254u & Johhny Chen, jc3066) - HOT-DMZ-FW template that creates two DMZ networks (direct and protected) with a scaled out firewall service between the two.
+ members:
+ - service_instance_1
+ - service_instance_2
+ - hsl_direct_net
+ - service_policy \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/diffServiceTemplate/expectedoutputfiles/service_instance_1ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/diffServiceTemplate/expectedoutputfiles/service_instance_1ServiceTemplate.yaml
new file mode 100644
index 0000000000..d84d6c6889
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/diffServiceTemplate/expectedoutputfiles/service_instance_1ServiceTemplate.yaml
@@ -0,0 +1,407 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: service_instance_1
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ availability_zone:
+ hidden: false
+ immutable: false
+ type: string
+ description: Availability zone to create servers in
+ required: false
+ status: SUPPORTED
+ static_routes_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: Static routes enabled
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: boolean
+ availability_zone_enable:
+ hidden: false
+ immutable: false
+ type: boolean
+ description: Indicates availability zone is enabled
+ required: false
+ default: false
+ status: SUPPORTED
+ service_template_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service template name
+ required: false
+ status: SUPPORTED
+ ordered_interfaces:
+ hidden: false
+ immutable: false
+ type: boolean
+ description: Indicates if service interface are ordered
+ required: false
+ default: false
+ status: SUPPORTED
+ flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor
+ required: false
+ status: SUPPORTED
+ image_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image name
+ required: true
+ status: SUPPORTED
+ service_type:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service type
+ required: true
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - firewall
+ - analyzer
+ - source-nat
+ - loadbalancer
+ service_interface_type_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of interface types
+ required: true
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ constraints:
+ - valid_values:
+ - management
+ - left
+ - right
+ - other
+ service_instance_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service instance name
+ required: true
+ status: SUPPORTED
+ interface_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of interfaces
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.contrail.InterfaceData
+ service_mode:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service mode
+ required: true
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - transparent
+ - in-network
+ - in-network-nat
+ shared_ip_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: Shared ips enabled
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: boolean
+ node_templates:
+ service_instance_1:
+ type: org.openecomp.resource.vfc.nodes.heat.compute_service_template_1
+ properties:
+ flavor:
+ get_input: flavor
+ image_name:
+ get_input: image_name
+ availability_zone:
+ get_input: availability_zone
+ service_type:
+ get_input: service_type
+ availability_zone_enable:
+ get_input: availability_zone_enable
+ service_template_name:
+ get_input: service_template_name
+ service_instance_name:
+ get_input: service_instance_name
+ service_mode:
+ get_input: service_mode
+ port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
+ properties:
+ static_routes:
+ get_input:
+ - interface_list
+ - 0
+ - static_routes
+ virtual_network:
+ get_input:
+ - interface_list
+ - 0
+ - virtual_network
+ static_route:
+ get_input:
+ - static_routes_list
+ - 0
+ allowed_address_pairs:
+ get_input:
+ - interface_list
+ - 0
+ - allowed_address_pairs
+ shared_ip:
+ get_input:
+ - shared_ip_list
+ - 0
+ ip_address:
+ get_input:
+ - interface_list
+ - 0
+ - ip_address
+ interface_type:
+ get_input:
+ - service_interface_type_list
+ - 0
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: service_instance_1
+ relationship: tosca.relationships.network.BindsTo
+ port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
+ properties:
+ static_routes:
+ get_input:
+ - interface_list
+ - 1
+ - static_routes
+ virtual_network:
+ get_input:
+ - interface_list
+ - 1
+ - virtual_network
+ static_route:
+ get_input:
+ - static_routes_list
+ - 1
+ allowed_address_pairs:
+ get_input:
+ - interface_list
+ - 1
+ - allowed_address_pairs
+ shared_ip:
+ get_input:
+ - shared_ip_list
+ - 1
+ ip_address:
+ get_input:
+ - interface_list
+ - 1
+ - ip_address
+ interface_type:
+ get_input:
+ - service_interface_type_list
+ - 1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: service_instance_1
+ relationship: tosca.relationships.network.BindsTo
+ port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
+ properties:
+ static_routes:
+ get_input:
+ - interface_list
+ - 2
+ - static_routes
+ virtual_network:
+ get_input:
+ - interface_list
+ - 2
+ - virtual_network
+ static_route:
+ get_input:
+ - static_routes_list
+ - 2
+ allowed_address_pairs:
+ get_input:
+ - interface_list
+ - 2
+ - allowed_address_pairs
+ shared_ip:
+ get_input:
+ - shared_ip_list
+ - 2
+ ip_address:
+ get_input:
+ - interface_list
+ - 2
+ - ip_address
+ interface_type:
+ get_input:
+ - service_interface_type_list
+ - 2
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: service_instance_1
+ relationship: tosca.relationships.network.BindsTo
+ port_3:
+ type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
+ properties:
+ static_routes:
+ get_input:
+ - interface_list
+ - 3
+ - static_routes
+ virtual_network:
+ get_input:
+ - interface_list
+ - 3
+ - virtual_network
+ static_route:
+ get_input:
+ - static_routes_list
+ - 3
+ allowed_address_pairs:
+ get_input:
+ - interface_list
+ - 3
+ - allowed_address_pairs
+ shared_ip:
+ get_input:
+ - shared_ip_list
+ - 3
+ ip_address:
+ get_input:
+ - interface_list
+ - 3
+ - ip_address
+ interface_type:
+ get_input:
+ - service_interface_type_list
+ - 3
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: service_instance_1
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ service_instance_1:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/OCS-fw.yml
+ members:
+ - service_instance_1
+ - port_0
+ - port_1
+ - port_2
+ - port_3
+ outputs:
+ tenant_id:
+ description: Tenant id of the Service Instance
+ value:
+ get_attribute:
+ - service_instance_1
+ - tenant_id
+ fq_name:
+ description: The FQ name of the service instance
+ value:
+ get_attribute:
+ - service_instance_1
+ - fq_name
+ service_template_name:
+ description: Service Template of the Service Instance
+ value:
+ get_attribute:
+ - service_instance_1
+ - service_template_name
+ show:
+ description: All attributes
+ value:
+ get_attribute:
+ - service_instance_1
+ - show
+ active_vms:
+ description: Number of service VMs active for this Service Instance
+ value:
+ get_attribute:
+ - service_instance_1
+ - active_vms
+ service_instance_name:
+ description: The name of the service instance
+ value:
+ get_attribute:
+ - service_instance_1
+ - service_instance_name
+ virtual_machines:
+ description: Service VMs for the Service Instance
+ value:
+ get_attribute:
+ - service_instance_1
+ - virtual_machines
+ status:
+ description: Status of the service instance
+ value:
+ get_attribute:
+ - service_instance_1
+ - status
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.service_template_1
+ requirements:
+ link_port_0:
+ - port_0
+ - link
+ link_port_1:
+ - port_1
+ - link
+ link_port_2:
+ - port_2
+ - link
+ link_port_3:
+ - port_3
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/diffServiceTemplate/expectedoutputfiles/service_instance_2ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/diffServiceTemplate/expectedoutputfiles/service_instance_2ServiceTemplate.yaml
new file mode 100644
index 0000000000..3a2de0696f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/diffServiceTemplate/expectedoutputfiles/service_instance_2ServiceTemplate.yaml
@@ -0,0 +1,319 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: service_instance_2
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ availability_zone:
+ hidden: false
+ immutable: false
+ type: string
+ description: Availability zone to create servers in
+ required: false
+ status: SUPPORTED
+ static_routes_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: Static routes enabled
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: boolean
+ availability_zone_enable:
+ hidden: false
+ immutable: false
+ type: boolean
+ description: Indicates availability zone is enabled
+ required: false
+ default: false
+ status: SUPPORTED
+ service_template_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service template name
+ required: false
+ status: SUPPORTED
+ ordered_interfaces:
+ hidden: false
+ immutable: false
+ type: boolean
+ description: Indicates if service interface are ordered
+ required: false
+ default: false
+ status: SUPPORTED
+ flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor
+ required: false
+ status: SUPPORTED
+ image_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image name
+ required: true
+ status: SUPPORTED
+ service_type:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service type
+ required: true
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - firewall
+ - analyzer
+ - source-nat
+ - loadbalancer
+ service_interface_type_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of interface types
+ required: true
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ constraints:
+ - valid_values:
+ - management
+ - left
+ - right
+ - other
+ service_instance_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service instance name
+ required: true
+ status: SUPPORTED
+ interface_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of interfaces
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.contrail.InterfaceData
+ service_mode:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service mode
+ required: true
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - transparent
+ - in-network
+ - in-network-nat
+ shared_ip_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: Shared ips enabled
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: boolean
+ node_templates:
+ service_instance_2:
+ type: org.openecomp.resource.vfc.nodes.heat.st
+ properties:
+ flavor:
+ get_input: flavor
+ image_name:
+ get_input: image_name
+ availability_zone:
+ get_input: availability_zone
+ service_type:
+ get_input: service_type
+ availability_zone_enable:
+ get_input: availability_zone_enable
+ service_template_name:
+ get_input: service_template_name
+ service_instance_name:
+ get_input: service_instance_name
+ service_mode:
+ get_input: service_mode
+ port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
+ properties:
+ static_routes:
+ get_input:
+ - interface_list
+ - 0
+ - static_routes
+ virtual_network:
+ get_input:
+ - interface_list
+ - 0
+ - virtual_network
+ static_route:
+ get_input:
+ - static_routes_list
+ - 0
+ allowed_address_pairs:
+ get_input:
+ - interface_list
+ - 0
+ - allowed_address_pairs
+ shared_ip:
+ get_input:
+ - shared_ip_list
+ - 0
+ ip_address:
+ get_input:
+ - interface_list
+ - 0
+ - ip_address
+ interface_type:
+ get_input:
+ - service_interface_type_list
+ - 0
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: service_instance_2
+ relationship: tosca.relationships.network.BindsTo
+ port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
+ properties:
+ static_routes:
+ get_input:
+ - interface_list
+ - 1
+ - static_routes
+ virtual_network:
+ get_input:
+ - interface_list
+ - 1
+ - virtual_network
+ static_route:
+ get_input:
+ - static_routes_list
+ - 1
+ allowed_address_pairs:
+ get_input:
+ - interface_list
+ - 1
+ - allowed_address_pairs
+ shared_ip:
+ get_input:
+ - shared_ip_list
+ - 1
+ ip_address:
+ get_input:
+ - interface_list
+ - 1
+ - ip_address
+ interface_type:
+ get_input:
+ - service_interface_type_list
+ - 1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: service_instance_2
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ service_instance_2:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/OCS-fw.yml
+ members:
+ - service_instance_2
+ - port_0
+ - port_1
+ outputs:
+ tenant_id:
+ description: Tenant id of the Service Instance
+ value:
+ get_attribute:
+ - service_instance_2
+ - tenant_id
+ fq_name:
+ description: The FQ name of the service instance
+ value:
+ get_attribute:
+ - service_instance_2
+ - fq_name
+ service_template_name:
+ description: Service Template of the Service Instance
+ value:
+ get_attribute:
+ - service_instance_2
+ - service_template_name
+ show:
+ description: All attributes
+ value:
+ get_attribute:
+ - service_instance_2
+ - show
+ active_vms:
+ description: Number of service VMs active for this Service Instance
+ value:
+ get_attribute:
+ - service_instance_2
+ - active_vms
+ service_instance_name:
+ description: The name of the service instance
+ value:
+ get_attribute:
+ - service_instance_2
+ - service_instance_name
+ virtual_machines:
+ description: Service VMs for the Service Instance
+ value:
+ get_attribute:
+ - service_instance_2
+ - virtual_machines
+ status:
+ description: Status of the service instance
+ value:
+ get_attribute:
+ - service_instance_2
+ - status
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.service_template_2
+ requirements:
+ link_port_0:
+ - port_0
+ - link
+ link_port_1:
+ - port_1
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/diffServiceTemplate/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/diffServiceTemplate/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..a26430ba72
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/diffServiceTemplate/inputfiles/MANIFEST.json
@@ -0,0 +1,12 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "OCS-fw.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/diffServiceTemplate/inputfiles/OCS-fw.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/diffServiceTemplate/inputfiles/OCS-fw.yml
new file mode 100644
index 0000000000..725ba49459
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/diffServiceTemplate/inputfiles/OCS-fw.yml
@@ -0,0 +1,213 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Based on the following reference for the HOT-DMZ-FW template:
+ Version 3.5 8-10-2015 (Authors: Art Mishurov,am254u & Johhny Chen, jc3066) - HOT-DMZ-FW template that creates two DMZ networks (direct and protected) with a scaled out firewall service between the two.
+
+parameters:
+ HSL_direct_net_id:
+ type: string
+ description: Name of HSL (Logging) network
+ prefix_0:
+ type: string
+ prefix_1:
+ type: string
+ prefix_2:
+ type: string
+ HSL_direct_net_cidr:
+ type: string
+ description: HSL (Logging) network address (CIDR notation)
+ HSL_direct_net_gateway:
+ type: string
+ description: HSL (Logging) network gateway address
+ oam_mgmt_net_0_id:
+ type: string
+ description: Name of OAM network
+ oam_mgmt_net_1_id:
+ type: string
+ description: Name of OAM network
+ Cricket_OCS_direct_net_id:
+ type: string
+ description: Name of Cricket OCS network
+ Cricket_OCS_protected_net_id:
+ type: string
+ description: Name of Cricket OCS network
+ service_instance_name:
+ type: string
+ description: Service instance name
+ service_policy_name:
+ type: string
+ description: Policy Name
+ service_policy_direction:
+ type: string
+ description: Direction of Policy
+ start_src_ports:
+ type: number
+ description: Start of src port
+ end_src_ports:
+ type: number
+ description: End of src port
+ start_dst_ports:
+ type: number
+ description: Start of dst port
+ end_dst_ports:
+ type: number
+ description: End of dst port
+ st_name:
+ type: string
+ description: Name of service template
+ st_mode:
+ type: string
+ description: service mode
+ st_type:
+ type: string
+ description: service type
+ st_image:
+ type: string
+ description: Name of the image
+ st_image_name:
+ type: string
+ description: Name of the image
+ st_flavor:
+ type: string
+ description: Flavor
+ st_service_interface_type_list:
+ type: string
+ description: List of interface types
+ st_shared_ip_list:
+ type: string
+ description: List of shared ip enabled-disabled
+ st_static_routes_list:
+ type: string
+ description: List of static routes enabled-disabled
+ st_scaling:
+ type: string
+ description: Indicates whether service scaling is enabled
+ max_num_fw_instances:
+ type: number
+ description: maximum number of firewall instances for scaling
+ availability_zone_1:
+ type: string
+ description: availability zone
+ count:
+ type: integer
+
+resources:
+
+ hsl_direct_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: HSL_direct_net_id }
+# external: True
+
+ hsl_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: hsl_direct_net }
+ cidr: { get_param: HSL_direct_net_cidr }
+ gateway_ip: { get_param: HSL_direct_net_gateway }
+
+ service_template_1:
+ type: OS::Contrail::ServiceTemplate
+ properties:
+ name: { get_param: st_name }
+ service_mode: { get_param: st_mode }
+ service_type: { get_param: st_type }
+ image_name: { get_param: st_image }
+ flavor: { get_param: st_flavor }
+ service_interface_type_list: { "Fn::Split" : [ ",", "management,left,right,other" ] }
+ shared_ip_list: { "Fn::Split" : [ ",", Ref: st_shared_ip_list ] }
+ static_routes_list: { "Fn::Split" : [ ",", Ref: st_static_routes_list ] }
+ service_scaling: n
+
+ service_instance_1:
+ type: OS::Contrail::ServiceInstance
+ depends_on: [ hsl_ip_subnet]
+ properties:
+ name: { get_param: service_instance_name }
+ availability_zone: { get_param: availability_zone_1 }
+ service_template: { get_resource: service_template_1 }
+ scale_out:
+ max_instances: {get_param: max_num_fw_instances}
+ interface_list: [
+ {
+ virtual_network: { get_param: oam_mgmt_net_0_id }
+ },
+ {
+ virtual_network: { get_param: Cricket_OCS_direct_net_id }
+ },
+ {
+ virtual_network: { get_resource: hsl_direct_net }
+ },
+ {
+ virtual_network: {get_param: oam_mgmt_net_1_id},
+ static_routes: [
+ { "prefix": {get_param: prefix_0} },
+ { "prefix": {get_param: prefix_1} },
+ { "prefix": {get_param: prefix_2} },
+ ],
+ }
+ ]
+
+ service_template_2:
+ type: OS::Contrail::ServiceTemplate
+ properties:
+ name: { get_param: st_name }
+ service_mode: { get_param: st_mode }
+ service_type: { get_param: st_type }
+ image_name: { get_param: st_image_name }
+ flavor: { get_param: st_flavor }
+ service_interface_type_list: { "Fn::Split" : [ ",", Ref: st_service_interface_type_list ] }
+ shared_ip_list: { "Fn::Split" : [ ",", Ref: st_shared_ip_list ] }
+ static_routes_list: { "Fn::Split" : [ ",", Ref: st_static_routes_list ] }
+
+ service_instance_2:
+ type: OS::Contrail::ServiceInstance
+ depends_on: [ hsl_ip_subnet]
+ properties:
+ name: { get_param: service_instance_name }
+ availability_zone: { get_param: availability_zone_1 }
+ service_template: { get_resource: service_template_2 }
+ scale_out:
+ max_instances: 9
+ interface_list: [
+ {
+ virtual_network: { get_param: oam_mgmt_net_0_id }
+ },
+ {
+ virtual_network: { get_param: Cricket_OCS_direct_net_id }
+ }
+ ]
+
+ service_policy:
+ type: OS::Contrail::NetworkPolicy
+ depends_on: [ service_instance_1 ]
+ properties:
+ name: { get_param: service_policy_name }
+ entries:
+ policy_rule: [
+ {
+ "direction": { get_param: service_policy_direction },
+ "protocol": "any",
+ "src_ports": [{"start_port": {get_param: start_src_ports}, "end_port": {get_param: end_src_ports}}],
+ "dst_ports": [{"start_port": {get_param: start_dst_ports}, "end_port": {get_param: end_dst_ports}}],
+ "dst_addresses": [{ "virtual_network": { get_param: Cricket_OCS_direct_net_id }}],
+ "action_list": { "apply_service": [{ get_resource: service_instance_1 }]},
+ "src_addresses": [{ "virtual_network": { get_param: Cricket_OCS_protected_net_id }}],
+ "metadata": {get_attr: [service_instance_2, name]}
+ },
+ ]
+
+ service_policy_attach_direct_net:
+ type: OS::Contrail::AttachPolicy
+ depends_on: [ service_policy ]
+ properties:
+ network: { get_param: Cricket_OCS_direct_net_id }
+ policy: { get_attr: [service_policy, fq_name] }
+
+ service_policy_attach_protected_net:
+ type: OS::Contrail::AttachPolicy
+ depends_on: [ service_policy ]
+ properties:
+ network: { get_param: Cricket_OCS_protected_net_id }
+ policy: { get_attr: [service_policy, fq_name] } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/oneServiceInstance/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/oneServiceInstance/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..b00d3d8bc0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/oneServiceInstance/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,64 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.service_template:
+ derived_from: org.openecomp.resource.abstract.nodes.contrail.AbstractSubstitute
+ requirements:
+ - link_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_port_2:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_port_3:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ org.openecomp.resource.vfc.nodes.heat.compute_service_template:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.contrail.Compute \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/oneServiceInstance/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/oneServiceInstance/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..016e4d3f70
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/oneServiceInstance/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,300 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ protected_net:
+ hidden: false
+ immutable: false
+ type: string
+ service_policy_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Policy Name
+ default: MNS-25180-L-02Shared_policy_direct_fw_protected_oam_1
+ oam_direct_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of private network to be created
+ st_static_routes_list:
+ hidden: false
+ immutable: false
+ type: string
+ description: List of static routes enabled-disabled
+ default: True,True,True,True
+ st_type:
+ hidden: false
+ immutable: false
+ type: string
+ description: service type
+ default: firewall
+ st_service_interface_type_list:
+ hidden: false
+ immutable: false
+ type: string
+ description: List of interface types
+ default: management,left,right,other
+ oam_protected_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of private network to be created
+ st_mode:
+ hidden: false
+ immutable: false
+ type: string
+ description: service mode
+ default: in-network-nat
+ static_prefix_3_1:
+ hidden: false
+ immutable: false
+ type: string
+ description: prefix for static route
+ default: 107.239.80.0/21
+ oam_hsl_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of private network to be created
+ start_dst_ports:
+ hidden: false
+ immutable: false
+ type: float
+ description: Start of dst port
+ default: -1
+ st_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor
+ default: lc.medium
+ st_scaling:
+ hidden: false
+ immutable: false
+ type: string
+ description: Indicates whether service scaling is enabled
+ default: 'True'
+ service_instance_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: service instance name
+ max_num_fw_instances:
+ hidden: false
+ immutable: false
+ type: float
+ description: maximum number of firewall instances for scaling
+ default: 8
+ start_src_ports:
+ hidden: false
+ immutable: false
+ type: float
+ description: Start of src port
+ default: -1
+ availability_zone:
+ hidden: false
+ immutable: false
+ type: string
+ description: availability zone in form of Zone:Host
+ service_policy_direction:
+ hidden: false
+ immutable: false
+ type: string
+ description: Direction of Policy
+ default: <>
+ st_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: service template name or ID
+ default: MNS-25180-L-02Shared_oam_fw_template_1
+ st_availability_zone_enable_flag:
+ hidden: false
+ immutable: false
+ type: string
+ description: service template availablity_zone feature enable flag
+ default: 'True'
+ st_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of the image
+ default: NIMBUS_SRX_151X49-D303
+ st_shared_ip_list:
+ hidden: false
+ immutable: false
+ type: string
+ description: List of shared ip enabled-disabled
+ default: False,True,False,False
+ oam_mgmt_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of private network to be created
+ end_src_ports:
+ hidden: false
+ immutable: false
+ type: float
+ description: End of src port
+ default: -1
+ end_dst_ports:
+ hidden: false
+ immutable: false
+ type: float
+ description: End of dst port
+ default: -1
+ node_templates:
+ service_instance:
+ type: org.openecomp.resource.abstract.nodes.heat.service_template
+ directives:
+ - substitutable
+ properties:
+ availability_zone:
+ get_input: availability_zone
+ static_routes_list:
+ - token:
+ - false;false;false;false
+ - ;
+ - 0
+ - token:
+ - false;false;false;false
+ - ;
+ - 1
+ - token:
+ - false;false;false;false
+ - ;
+ - 2
+ - token:
+ - false;false;false;false
+ - ;
+ - 3
+ availability_zone_enable:
+ get_input: st_availability_zone_enable_flag
+ service_template_name:
+ get_input: st_name
+ ordered_interfaces: true
+ flavor:
+ get_input: st_flavor
+ image_name:
+ get_input: st_image
+ service_template_filter:
+ substitute_service_template: service_instanceServiceTemplate.yaml
+ count: 5
+ scaling_enabled:
+ get_input: st_scaling
+ mandatory: true
+ service_type:
+ get_input: st_type
+ service_interface_type_list:
+ - token:
+ - get_input: st_service_interface_type_list
+ - ','
+ - 0
+ - token:
+ - get_input: st_service_interface_type_list
+ - ','
+ - 1
+ - token:
+ - get_input: st_service_interface_type_list
+ - ','
+ - 2
+ - token:
+ - get_input: st_service_interface_type_list
+ - ','
+ - 3
+ interface_list:
+ - virtual_network:
+ get_input: oam_mgmt_net_id
+ - virtual_network:
+ get_input: oam_protected_net_id
+ - static_routes:
+ - prefix:
+ get_input: static_prefix_3_1
+ virtual_network:
+ get_input: oam_direct_net_id
+ - virtual_network:
+ get_input: oam_hsl_net_id
+ service_instance_name:
+ get_input: service_instance_name
+ service_mode:
+ get_input: st_mode
+ shared_ip_list:
+ - true
+ - true
+ - false
+ - false
+ service_policy:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.contrail.NetworkRules
+ properties:
+ entries:
+ policy_rule:
+ - src_ports:
+ - start_port:
+ get_input: start_src_ports
+ end_port:
+ get_input: end_src_ports
+ protocol: any
+ action_list:
+ apply_service:
+ - service_instance
+ dst_addresses:
+ - virtual_network:
+ get_input: oam_direct_net_id
+ dst_ports:
+ - start_port:
+ get_input: start_dst_ports
+ end_port:
+ get_input: end_dst_ports
+ src_addresses:
+ - virtual_network:
+ get_input: protected_net
+ direction:
+ get_input: service_policy_direction
+ name:
+ get_input: service_policy_name
+ requirements:
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: service_instance
+ relationship: tosca.relationships.DependsOn
+ groups:
+ lcp1_mss.oam-fw_si:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/lcp1_mss.oam-fw_si.yaml
+ description: |
+ Version 2.0 10-14-2015 (Authors: Art Mishurov,am254u & Johhny Chen, jc3066) - HOT-OAM-FW-SI template that creates two OAM networks (direct and protected) with a scaled out firewall service between the two.
+ members:
+ - service_instance
+ - service_policy \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/oneServiceInstance/expectedoutputfiles/service_instanceServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/oneServiceInstance/expectedoutputfiles/service_instanceServiceTemplate.yaml
new file mode 100644
index 0000000000..e9f2511604
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/oneServiceInstance/expectedoutputfiles/service_instanceServiceTemplate.yaml
@@ -0,0 +1,411 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: service_instance
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ availability_zone:
+ hidden: false
+ immutable: false
+ type: string
+ description: Availability zone to create servers in
+ required: false
+ status: SUPPORTED
+ static_routes_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: Static routes enabled
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: boolean
+ availability_zone_enable:
+ hidden: false
+ immutable: false
+ type: boolean
+ description: Indicates availability zone is enabled
+ required: false
+ default: false
+ status: SUPPORTED
+ service_template_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service template name
+ required: false
+ status: SUPPORTED
+ ordered_interfaces:
+ hidden: false
+ immutable: false
+ type: boolean
+ description: Indicates if service interface are ordered
+ required: false
+ default: false
+ status: SUPPORTED
+ flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor
+ required: false
+ status: SUPPORTED
+ image_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image name
+ required: true
+ status: SUPPORTED
+ service_type:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service type
+ required: true
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - firewall
+ - analyzer
+ - source-nat
+ - loadbalancer
+ service_interface_type_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of interface types
+ required: true
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ constraints:
+ - valid_values:
+ - management
+ - left
+ - right
+ - other
+ service_instance_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service instance name
+ required: true
+ status: SUPPORTED
+ interface_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of interfaces
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.contrail.InterfaceData
+ service_mode:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service mode
+ required: true
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - transparent
+ - in-network
+ - in-network-nat
+ shared_ip_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: Shared ips enabled
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: boolean
+ node_templates:
+ port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
+ properties:
+ static_routes:
+ get_input:
+ - interface_list
+ - 0
+ - static_routes
+ virtual_network:
+ get_input:
+ - interface_list
+ - 0
+ - virtual_network
+ static_route:
+ get_input:
+ - static_routes_list
+ - 0
+ allowed_address_pairs:
+ get_input:
+ - interface_list
+ - 0
+ - allowed_address_pairs
+ shared_ip:
+ get_input:
+ - shared_ip_list
+ - 0
+ ip_address:
+ get_input:
+ - interface_list
+ - 0
+ - ip_address
+ interface_type:
+ get_input:
+ - service_interface_type_list
+ - 0
+ order: 0
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: service_instance
+ relationship: tosca.relationships.network.BindsTo
+ port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
+ properties:
+ static_routes:
+ get_input:
+ - interface_list
+ - 1
+ - static_routes
+ virtual_network:
+ get_input:
+ - interface_list
+ - 1
+ - virtual_network
+ static_route:
+ get_input:
+ - static_routes_list
+ - 1
+ allowed_address_pairs:
+ get_input:
+ - interface_list
+ - 1
+ - allowed_address_pairs
+ shared_ip:
+ get_input:
+ - shared_ip_list
+ - 1
+ ip_address:
+ get_input:
+ - interface_list
+ - 1
+ - ip_address
+ interface_type:
+ get_input:
+ - service_interface_type_list
+ - 1
+ order: 1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: service_instance
+ relationship: tosca.relationships.network.BindsTo
+ port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
+ properties:
+ static_routes:
+ get_input:
+ - interface_list
+ - 2
+ - static_routes
+ virtual_network:
+ get_input:
+ - interface_list
+ - 2
+ - virtual_network
+ static_route:
+ get_input:
+ - static_routes_list
+ - 2
+ allowed_address_pairs:
+ get_input:
+ - interface_list
+ - 2
+ - allowed_address_pairs
+ shared_ip:
+ get_input:
+ - shared_ip_list
+ - 2
+ ip_address:
+ get_input:
+ - interface_list
+ - 2
+ - ip_address
+ interface_type:
+ get_input:
+ - service_interface_type_list
+ - 2
+ order: 2
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: service_instance
+ relationship: tosca.relationships.network.BindsTo
+ port_3:
+ type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
+ properties:
+ static_routes:
+ get_input:
+ - interface_list
+ - 3
+ - static_routes
+ virtual_network:
+ get_input:
+ - interface_list
+ - 3
+ - virtual_network
+ static_route:
+ get_input:
+ - static_routes_list
+ - 3
+ allowed_address_pairs:
+ get_input:
+ - interface_list
+ - 3
+ - allowed_address_pairs
+ shared_ip:
+ get_input:
+ - shared_ip_list
+ - 3
+ ip_address:
+ get_input:
+ - interface_list
+ - 3
+ - ip_address
+ interface_type:
+ get_input:
+ - service_interface_type_list
+ - 3
+ order: 3
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: service_instance
+ relationship: tosca.relationships.network.BindsTo
+ service_instance:
+ type: org.openecomp.resource.vfc.nodes.heat.compute_service_template
+ properties:
+ flavor:
+ get_input: flavor
+ image_name:
+ get_input: image_name
+ availability_zone:
+ get_input: availability_zone
+ service_type:
+ get_input: service_type
+ availability_zone_enable:
+ get_input: availability_zone_enable
+ service_template_name:
+ get_input: service_template_name
+ service_instance_name:
+ get_input: service_instance_name
+ service_mode:
+ get_input: service_mode
+ groups:
+ service_instance:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/lcp1_mss.oam-fw_si.yaml
+ members:
+ - service_instance
+ - port_0
+ - port_1
+ - port_2
+ - port_3
+ outputs:
+ tenant_id:
+ description: Tenant id of the Service Instance
+ value:
+ get_attribute:
+ - service_instance
+ - tenant_id
+ fq_name:
+ description: The FQ name of the service instance
+ value:
+ get_attribute:
+ - service_instance
+ - fq_name
+ service_template_name:
+ description: Service Template of the Service Instance
+ value:
+ get_attribute:
+ - service_instance
+ - service_template_name
+ show:
+ description: All attributes
+ value:
+ get_attribute:
+ - service_instance
+ - show
+ active_vms:
+ description: Number of service VMs active for this Service Instance
+ value:
+ get_attribute:
+ - service_instance
+ - active_vms
+ service_instance_name:
+ description: The name of the service instance
+ value:
+ get_attribute:
+ - service_instance
+ - service_instance_name
+ virtual_machines:
+ description: Service VMs for the Service Instance
+ value:
+ get_attribute:
+ - service_instance
+ - virtual_machines
+ status:
+ description: Status of the service instance
+ value:
+ get_attribute:
+ - service_instance
+ - status
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.service_template
+ requirements:
+ link_port_0:
+ - port_0
+ - link
+ link_port_1:
+ - port_1
+ - link
+ link_port_2:
+ - port_2
+ - link
+ link_port_3:
+ - port_3
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/oneServiceInstance/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/oneServiceInstance/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..63989f282b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/oneServiceInstance/inputfiles/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "vLCP",
+ "description": "",
+ "data": [
+ {
+ "file": "lcp1_mss.oam-fw_si.yaml",
+ "type": "HEAT",
+ "isBase": "false",
+ "data": [
+ {
+ "file": "lcp1_mss.oam-fw_si_with_comments.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/oneServiceInstance/inputfiles/lcp1_mss.oam-fw_si.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/oneServiceInstance/inputfiles/lcp1_mss.oam-fw_si.yaml
new file mode 100644
index 0000000000..33620a9b91
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/oneServiceInstance/inputfiles/lcp1_mss.oam-fw_si.yaml
@@ -0,0 +1,153 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 10-14-2015 (Authors: Art Mishurov,am254u & Johhny Chen, jc3066) - HOT-OAM-FW-SI template that creates two OAM networks (direct and protected) with a scaled out firewall service between the two.
+
+parameters:
+ service_policy_name:
+ type: string
+ description: Policy Name
+ service_policy_direction:
+ type: string
+ description: Direction of Policy
+ start_src_ports:
+ type: number
+ description: Start of src port
+ end_src_ports:
+ type: number
+ description: End of src port
+ start_dst_ports:
+ type: number
+ description: Start of dst port
+ end_dst_ports:
+ type: number
+ description: End of dst port
+ oam_mgmt_net_id:
+ type: string
+ description: Name of private network to be created
+ oam_protected_net_id:
+ type: string
+ description: Name of private network to be created
+ oam_direct_net_id:
+ type: string
+ description: Name of private network to be created
+ oam_hsl_net_id:
+ type: string
+ description: Name of private network to be created
+ st_name:
+ type: string
+ description: service template name or ID
+ st_type:
+ type: string
+ description: service type
+ st_image:
+ type: string
+ description: Name of the image
+ st_flavor:
+ type: string
+ description: Flavor
+ st_service_interface_type_list:
+ type: string
+ description: List of interface types
+ st_shared_ip_list:
+ type: string
+ description: List of shared ip enabled-disabled
+ st_static_routes_list:
+ type: string
+ description: List of static routes enabled-disabled
+ st_scaling:
+ type: string
+ description: Indicates whether service scaling is enabled
+ st_mode:
+ type: string
+ description: service mode
+ st_availability_zone_enable_flag:
+ type: string
+ description: service template availablity_zone feature enable flag
+ max_num_fw_instances:
+ type: number
+ description: maximum number of firewall instances for scaling
+ service_instance_name:
+ type: string
+ description: service instance name
+ availability_zone:
+ type: string
+ description: availability zone in form of Zone:Host
+ static_prefix_3_1:
+ type: string
+ description: prefix for static route
+ protected_net:
+ type: string
+
+resources:
+ service_template:
+ type: OS::Contrail::ServiceTemplate
+ properties:
+ name: { get_param: st_name }
+ service_mode: { get_param: st_mode }
+ service_type: { get_param: st_type }
+ image_name: { get_param: st_image }
+ flavor: { get_param: st_flavor }
+ service_interface_type_list: { "Fn::Split" : [ ",", Ref: st_service_interface_type_list ] }
+ shared_ip_list: [ true, on, no, 0 ]
+ static_routes_list: { "Fn::Split" : [ ";", "n;false;false;false" ] }
+ service_scaling: { get_param: st_scaling }
+ availability_zone_enable: { get_param: st_availability_zone_enable_flag }
+ ordered_interfaces: true
+
+ service_instance:
+ type: OS::Contrail::ServiceInstance
+ properties:
+ name: { get_param: service_instance_name }
+ service_template: { get_resource: service_template }
+ availability_zone: { get_param: availability_zone }
+ scale_out:
+ max_instances: 5
+ interface_list: [
+ {
+ virtual_network: {get_param: oam_mgmt_net_id}
+ },
+ {
+ virtual_network: {get_param: oam_protected_net_id}
+ },
+ {
+ virtual_network: {get_param: oam_direct_net_id},
+ static_routes: [
+ { "prefix": {get_param: static_prefix_3_1} },
+ ],
+ },
+ {
+ virtual_network: {get_param: oam_hsl_net_id}
+ },
+ ]
+
+ service_policy:
+ type: OS::Contrail::NetworkPolicy
+ depends_on: [ service_instance ]
+ properties:
+ name: { get_param: service_policy_name }
+ entries:
+ policy_rule: [
+ {
+ "direction": { get_param: service_policy_direction },
+ "protocol": "any",
+ "src_ports": [{"start_port": {get_param: start_src_ports}, "end_port": {get_param: end_src_ports}}],
+ "dst_ports": [{"start_port": {get_param: start_dst_ports}, "end_port": {get_param: end_dst_ports}}],
+ "dst_addresses": [{ "virtual_network": {get_param: oam_direct_net_id}}],
+ "action_list": {"apply_service": [{get_resource: service_instance}]},
+ "src_addresses": [{ "virtual_network": {get_param: protected_net}}]
+ },
+ ]
+ service_policy_attach_direct_net:
+ type: OS::Contrail::AttachPolicy
+ depends_on: [ service_policy ]
+ properties:
+ network: { get_param: oam_direct_net_id }
+ policy: { get_attr: [service_policy, fq_name] }
+
+ service_policy_attach_protected_net:
+ type: OS::Contrail::AttachPolicy
+ depends_on: [ service_policy ]
+ properties:
+ network: { get_param: oam_protected_net_id }
+ policy: { get_attr: [service_policy, fq_name] }
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/oneServiceInstance/inputfiles/lcp1_mss.oam-fw_si_with_comments.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/oneServiceInstance/inputfiles/lcp1_mss.oam-fw_si_with_comments.env
new file mode 100644
index 0000000000..718c5dba17
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/oneServiceInstance/inputfiles/lcp1_mss.oam-fw_si_with_comments.env
@@ -0,0 +1,26 @@
+parameters:
+ #service_instance_name: ZRDM1FRWL02OAM
+ service_policy_name: MNS-25180-L-02Shared_policy_direct_fw_protected_oam_1
+ service_policy_direction: "<>"
+ start_src_ports: -1
+ end_src_ports: -1
+ start_dst_ports: -1
+ end_dst_ports: -1
+ st_name: MNS-25180-L-02Shared_oam_fw_template_1
+ st_mode: in-network-nat
+ st_type: firewall
+ st_image: NIMBUS_SRX_151X49-D303
+ st_flavor: lc.medium
+ st_service_interface_type_list: management,left,right,other
+ st_shared_ip_list: False,True,False,False
+ st_static_routes_list: True,True,True,True
+ st_scaling: "True"
+ st_availability_zone_enable_flag: "True"
+ #availability_zone: "nova"
+ max_num_fw_instances: 8
+ #oam_mgmt_net_id: 'default-domain:MNS-25180-L-02Shared_oam_mgmt_net_1'
+ #oam_protected_net_id: 'default-domain:MNS-25180-L-02Shared_oam_protected_net_1'
+ #oam_direct_net_id: 'default-domain:MNS-25180-L-02Shared_oam_direct_net_1'
+ #oam_hsl_net_id: 'default-domain:MNS-25180-L-02Shared_oam_hsl_net_1'
+ static_prefix_3_1: 107.239.80.0/21
+ \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sameServiceTemplate/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sameServiceTemplate/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..b00d3d8bc0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sameServiceTemplate/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,64 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.service_template:
+ derived_from: org.openecomp.resource.abstract.nodes.contrail.AbstractSubstitute
+ requirements:
+ - link_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_port_2:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_port_3:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ org.openecomp.resource.vfc.nodes.heat.compute_service_template:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.contrail.Compute \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sameServiceTemplate/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sameServiceTemplate/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..942df0b120
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sameServiceTemplate/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,441 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ service_policy_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Policy Name
+ st_static_routes_list:
+ hidden: false
+ immutable: false
+ type: string
+ description: List of static routes enabled-disabled
+ st_type:
+ hidden: false
+ immutable: false
+ type: string
+ description: service type
+ st_service_interface_type_list:
+ hidden: false
+ immutable: false
+ type: string
+ description: List of interface types
+ st_mode:
+ hidden: false
+ immutable: false
+ type: string
+ description: service mode
+ Cricket_OCS_protected_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of Cricket OCS network
+ oam_mgmt_net_0_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of OAM network
+ start_dst_ports:
+ hidden: false
+ immutable: false
+ type: float
+ description: Start of dst port
+ st_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor
+ availability_zone_1:
+ hidden: false
+ immutable: false
+ type: string
+ description: availability zone
+ service_instance_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service instance name
+ st_scaling:
+ hidden: false
+ immutable: false
+ type: string
+ description: Indicates whether service scaling is enabled
+ max_num_fw_instances:
+ hidden: false
+ immutable: false
+ type: float
+ description: maximum number of firewall instances for scaling
+ start_src_ports:
+ hidden: false
+ immutable: false
+ type: float
+ description: Start of src port
+ service_policy_direction:
+ hidden: false
+ immutable: false
+ type: string
+ description: Direction of Policy
+ st_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of service template
+ HSL_direct_net_gateway:
+ hidden: false
+ immutable: false
+ type: string
+ description: HSL (Logging) network gateway address
+ st_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of the image
+ st_shared_ip_list:
+ hidden: false
+ immutable: false
+ type: string
+ description: List of shared ip enabled-disabled
+ prefix_0:
+ hidden: false
+ immutable: false
+ type: string
+ Cricket_OCS_direct_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of Cricket OCS network
+ oam_mgmt_net_1_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of OAM network
+ prefix_1:
+ hidden: false
+ immutable: false
+ type: string
+ end_src_ports:
+ hidden: false
+ immutable: false
+ type: float
+ description: End of src port
+ prefix_2:
+ hidden: false
+ immutable: false
+ type: string
+ end_dst_ports:
+ hidden: false
+ immutable: false
+ type: float
+ description: End of dst port
+ st_image_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of the image
+ HSL_direct_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of HSL (Logging) network
+ HSL_direct_net_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ description: HSL (Logging) network address (CIDR notation)
+ node_templates:
+ service_instance_1:
+ type: org.openecomp.resource.abstract.nodes.heat.service_template
+ directives:
+ - substitutable
+ properties:
+ flavor:
+ get_input: st_flavor
+ availability_zone:
+ get_input: availability_zone_1
+ image_name:
+ get_input: st_image
+ service_template_filter:
+ substitute_service_template: service_instance_1ServiceTemplate.yaml
+ count: 1
+ scaling_enabled:
+ get_input: st_scaling
+ mandatory: true
+ service_type:
+ get_input: st_type
+ static_routes_list:
+ - token:
+ - get_input: st_static_routes_list
+ - ','
+ - 0
+ - token:
+ - get_input: st_static_routes_list
+ - ','
+ - 1
+ - token:
+ - get_input: st_static_routes_list
+ - ','
+ - 2
+ - token:
+ - get_input: st_static_routes_list
+ - ','
+ - 3
+ service_template_name:
+ get_input: st_name
+ service_interface_type_list:
+ - token:
+ - management,left,right,other
+ - ','
+ - 0
+ - token:
+ - management,left,right,other
+ - ','
+ - 1
+ - token:
+ - management,left,right,other
+ - ','
+ - 2
+ - token:
+ - management,left,right,other
+ - ','
+ - 3
+ interface_list:
+ - virtual_network:
+ get_input: oam_mgmt_net_0_id
+ - virtual_network:
+ get_input: Cricket_OCS_direct_net_id
+ - virtual_network: hsl_direct_net1
+ - static_routes:
+ - prefix:
+ get_input: prefix_0
+ - prefix:
+ get_input: prefix_1
+ - prefix:
+ get_input: prefix_2
+ virtual_network:
+ get_input: oam_mgmt_net_1_id
+ service_instance_name:
+ get_input: service_instance_name
+ service_mode:
+ get_input: st_mode
+ shared_ip_list:
+ - token:
+ - get_input: st_shared_ip_list
+ - ','
+ - 0
+ - token:
+ - get_input: st_shared_ip_list
+ - ','
+ - 1
+ - token:
+ - get_input: st_shared_ip_list
+ - ','
+ - 2
+ - token:
+ - get_input: st_shared_ip_list
+ - ','
+ - 3
+ requirements:
+ - link_port_2:
+ capability: tosca.capabilities.network.Linkable
+ node: hsl_direct_net1
+ relationship: tosca.relationships.network.LinksTo
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: hsl_direct_net1
+ relationship: tosca.relationships.DependsOn
+ service_instance_2:
+ type: org.openecomp.resource.abstract.nodes.heat.service_template
+ directives:
+ - substitutable
+ properties:
+ flavor:
+ get_input: st_flavor
+ availability_zone:
+ get_input: availability_zone_1
+ image_name:
+ get_input: st_image
+ service_template_filter:
+ substitute_service_template: service_instance_2ServiceTemplate.yaml
+ count:
+ get_input: max_num_fw_instances
+ scaling_enabled:
+ get_input: st_scaling
+ mandatory: false
+ service_type:
+ get_input: st_type
+ static_routes_list:
+ - token:
+ - get_input: st_static_routes_list
+ - ','
+ - 0
+ - token:
+ - get_input: st_static_routes_list
+ - ','
+ - 1
+ - token:
+ - get_input: st_static_routes_list
+ - ','
+ - 2
+ - token:
+ - get_input: st_static_routes_list
+ - ','
+ - 3
+ service_template_name:
+ get_input: st_name
+ service_interface_type_list:
+ - token:
+ - management,left,right,other
+ - ','
+ - 0
+ - token:
+ - management,left,right,other
+ - ','
+ - 1
+ - token:
+ - management,left,right,other
+ - ','
+ - 2
+ - token:
+ - management,left,right,other
+ - ','
+ - 3
+ interface_list:
+ - virtual_network:
+ get_input: oam_mgmt_net_0_id
+ - virtual_network:
+ get_input: Cricket_OCS_direct_net_id
+ - virtual_network: hsl_direct_net2
+ - static_routes:
+ - prefix:
+ get_input: prefix_0
+ - prefix:
+ get_input: prefix_1
+ - prefix:
+ get_input: prefix_2
+ virtual_network:
+ get_input: oam_mgmt_net_1_id
+ service_instance_name:
+ get_input: service_instance_name
+ service_mode:
+ get_input: st_mode
+ shared_ip_list:
+ - token:
+ - get_input: st_shared_ip_list
+ - ','
+ - 0
+ - token:
+ - get_input: st_shared_ip_list
+ - ','
+ - 1
+ - token:
+ - get_input: st_shared_ip_list
+ - ','
+ - 2
+ - token:
+ - get_input: st_shared_ip_list
+ - ','
+ - 3
+ requirements:
+ - link_port_2:
+ capability: tosca.capabilities.network.Linkable
+ node: hsl_direct_net2
+ relationship: tosca.relationships.network.LinksTo
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: hsl_direct_net1
+ relationship: tosca.relationships.DependsOn
+ hsl_direct_net1:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ network_name:
+ get_input: HSL_direct_net_id
+ subnets:
+ hsl_ip_subnet:
+ cidr:
+ get_input: HSL_direct_net_cidr
+ gateway_ip:
+ get_input: HSL_direct_net_gateway
+ hsl_direct_net2:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ network_name:
+ get_input: HSL_direct_net_id
+ service_policy:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.contrail.NetworkRules
+ properties:
+ entries:
+ policy_rule:
+ - src_ports:
+ - start_port:
+ get_input: start_src_ports
+ end_port:
+ get_input: end_src_ports
+ protocol: any
+ action_list:
+ apply_service:
+ - service_instance_1
+ dst_addresses:
+ - virtual_network:
+ get_input: Cricket_OCS_direct_net_id
+ dst_ports:
+ - start_port:
+ get_input: start_dst_ports
+ end_port:
+ get_input: end_dst_ports
+ src_addresses:
+ - virtual_network:
+ get_input: Cricket_OCS_protected_net_id
+ direction:
+ get_input: service_policy_direction
+ name:
+ get_input: service_policy_name
+ requirements:
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: service_instance_1
+ relationship: tosca.relationships.DependsOn
+ groups:
+ OCS-fw:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/OCS-fw.yml
+ description: |
+ Based on the following reference for the HOT-DMZ-FW template: Version 3.5 8-10-2015 (Authors: Art Mishurov,am254u & Johhny Chen, jc3066) - HOT-DMZ-FW template that creates two DMZ networks (direct and protected) with a scaled out firewall service between the two.
+ members:
+ - service_instance_1
+ - service_instance_2
+ - hsl_direct_net1
+ - hsl_direct_net2
+ - service_policy \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sameServiceTemplate/expectedoutputfiles/service_instance_1ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sameServiceTemplate/expectedoutputfiles/service_instance_1ServiceTemplate.yaml
new file mode 100644
index 0000000000..4b53e28b6f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sameServiceTemplate/expectedoutputfiles/service_instance_1ServiceTemplate.yaml
@@ -0,0 +1,407 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: service_instance_1
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ availability_zone:
+ hidden: false
+ immutable: false
+ type: string
+ description: Availability zone to create servers in
+ required: false
+ status: SUPPORTED
+ static_routes_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: Static routes enabled
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: boolean
+ availability_zone_enable:
+ hidden: false
+ immutable: false
+ type: boolean
+ description: Indicates availability zone is enabled
+ required: false
+ default: false
+ status: SUPPORTED
+ service_template_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service template name
+ required: false
+ status: SUPPORTED
+ ordered_interfaces:
+ hidden: false
+ immutable: false
+ type: boolean
+ description: Indicates if service interface are ordered
+ required: false
+ default: false
+ status: SUPPORTED
+ flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor
+ required: false
+ status: SUPPORTED
+ image_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image name
+ required: true
+ status: SUPPORTED
+ service_type:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service type
+ required: true
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - firewall
+ - analyzer
+ - source-nat
+ - loadbalancer
+ service_interface_type_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of interface types
+ required: true
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ constraints:
+ - valid_values:
+ - management
+ - left
+ - right
+ - other
+ service_instance_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service instance name
+ required: true
+ status: SUPPORTED
+ interface_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of interfaces
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.contrail.InterfaceData
+ service_mode:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service mode
+ required: true
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - transparent
+ - in-network
+ - in-network-nat
+ shared_ip_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: Shared ips enabled
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: boolean
+ node_templates:
+ service_instance_1:
+ type: org.openecomp.resource.vfc.nodes.heat.compute_service_template
+ properties:
+ flavor:
+ get_input: flavor
+ image_name:
+ get_input: image_name
+ availability_zone:
+ get_input: availability_zone
+ service_type:
+ get_input: service_type
+ availability_zone_enable:
+ get_input: availability_zone_enable
+ service_template_name:
+ get_input: service_template_name
+ service_instance_name:
+ get_input: service_instance_name
+ service_mode:
+ get_input: service_mode
+ port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
+ properties:
+ static_routes:
+ get_input:
+ - interface_list
+ - 0
+ - static_routes
+ virtual_network:
+ get_input:
+ - interface_list
+ - 0
+ - virtual_network
+ static_route:
+ get_input:
+ - static_routes_list
+ - 0
+ allowed_address_pairs:
+ get_input:
+ - interface_list
+ - 0
+ - allowed_address_pairs
+ shared_ip:
+ get_input:
+ - shared_ip_list
+ - 0
+ ip_address:
+ get_input:
+ - interface_list
+ - 0
+ - ip_address
+ interface_type:
+ get_input:
+ - service_interface_type_list
+ - 0
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: service_instance_1
+ relationship: tosca.relationships.network.BindsTo
+ port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
+ properties:
+ static_routes:
+ get_input:
+ - interface_list
+ - 1
+ - static_routes
+ virtual_network:
+ get_input:
+ - interface_list
+ - 1
+ - virtual_network
+ static_route:
+ get_input:
+ - static_routes_list
+ - 1
+ allowed_address_pairs:
+ get_input:
+ - interface_list
+ - 1
+ - allowed_address_pairs
+ shared_ip:
+ get_input:
+ - shared_ip_list
+ - 1
+ ip_address:
+ get_input:
+ - interface_list
+ - 1
+ - ip_address
+ interface_type:
+ get_input:
+ - service_interface_type_list
+ - 1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: service_instance_1
+ relationship: tosca.relationships.network.BindsTo
+ port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
+ properties:
+ static_routes:
+ get_input:
+ - interface_list
+ - 2
+ - static_routes
+ virtual_network:
+ get_input:
+ - interface_list
+ - 2
+ - virtual_network
+ static_route:
+ get_input:
+ - static_routes_list
+ - 2
+ allowed_address_pairs:
+ get_input:
+ - interface_list
+ - 2
+ - allowed_address_pairs
+ shared_ip:
+ get_input:
+ - shared_ip_list
+ - 2
+ ip_address:
+ get_input:
+ - interface_list
+ - 2
+ - ip_address
+ interface_type:
+ get_input:
+ - service_interface_type_list
+ - 2
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: service_instance_1
+ relationship: tosca.relationships.network.BindsTo
+ port_3:
+ type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
+ properties:
+ static_routes:
+ get_input:
+ - interface_list
+ - 3
+ - static_routes
+ virtual_network:
+ get_input:
+ - interface_list
+ - 3
+ - virtual_network
+ static_route:
+ get_input:
+ - static_routes_list
+ - 3
+ allowed_address_pairs:
+ get_input:
+ - interface_list
+ - 3
+ - allowed_address_pairs
+ shared_ip:
+ get_input:
+ - shared_ip_list
+ - 3
+ ip_address:
+ get_input:
+ - interface_list
+ - 3
+ - ip_address
+ interface_type:
+ get_input:
+ - service_interface_type_list
+ - 3
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: service_instance_1
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ service_instance_1:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/OCS-fw.yml
+ members:
+ - service_instance_1
+ - port_0
+ - port_1
+ - port_2
+ - port_3
+ outputs:
+ tenant_id:
+ description: Tenant id of the Service Instance
+ value:
+ get_attribute:
+ - service_instance_1
+ - tenant_id
+ fq_name:
+ description: The FQ name of the service instance
+ value:
+ get_attribute:
+ - service_instance_1
+ - fq_name
+ service_template_name:
+ description: Service Template of the Service Instance
+ value:
+ get_attribute:
+ - service_instance_1
+ - service_template_name
+ show:
+ description: All attributes
+ value:
+ get_attribute:
+ - service_instance_1
+ - show
+ active_vms:
+ description: Number of service VMs active for this Service Instance
+ value:
+ get_attribute:
+ - service_instance_1
+ - active_vms
+ service_instance_name:
+ description: The name of the service instance
+ value:
+ get_attribute:
+ - service_instance_1
+ - service_instance_name
+ virtual_machines:
+ description: Service VMs for the Service Instance
+ value:
+ get_attribute:
+ - service_instance_1
+ - virtual_machines
+ status:
+ description: Status of the service instance
+ value:
+ get_attribute:
+ - service_instance_1
+ - status
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.service_template
+ requirements:
+ link_port_0:
+ - port_0
+ - link
+ link_port_1:
+ - port_1
+ - link
+ link_port_2:
+ - port_2
+ - link
+ link_port_3:
+ - port_3
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sameServiceTemplate/expectedoutputfiles/service_instance_2ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sameServiceTemplate/expectedoutputfiles/service_instance_2ServiceTemplate.yaml
new file mode 100644
index 0000000000..f0e67ea99c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sameServiceTemplate/expectedoutputfiles/service_instance_2ServiceTemplate.yaml
@@ -0,0 +1,407 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: service_instance_2
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ availability_zone:
+ hidden: false
+ immutable: false
+ type: string
+ description: Availability zone to create servers in
+ required: false
+ status: SUPPORTED
+ static_routes_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: Static routes enabled
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: boolean
+ availability_zone_enable:
+ hidden: false
+ immutable: false
+ type: boolean
+ description: Indicates availability zone is enabled
+ required: false
+ default: false
+ status: SUPPORTED
+ service_template_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service template name
+ required: false
+ status: SUPPORTED
+ ordered_interfaces:
+ hidden: false
+ immutable: false
+ type: boolean
+ description: Indicates if service interface are ordered
+ required: false
+ default: false
+ status: SUPPORTED
+ flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor
+ required: false
+ status: SUPPORTED
+ image_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image name
+ required: true
+ status: SUPPORTED
+ service_type:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service type
+ required: true
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - firewall
+ - analyzer
+ - source-nat
+ - loadbalancer
+ service_interface_type_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of interface types
+ required: true
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ constraints:
+ - valid_values:
+ - management
+ - left
+ - right
+ - other
+ service_instance_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service instance name
+ required: true
+ status: SUPPORTED
+ interface_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of interfaces
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.contrail.InterfaceData
+ service_mode:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service mode
+ required: true
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - transparent
+ - in-network
+ - in-network-nat
+ shared_ip_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: Shared ips enabled
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: boolean
+ node_templates:
+ service_instance_2:
+ type: org.openecomp.resource.vfc.nodes.heat.compute_service_template
+ properties:
+ flavor:
+ get_input: flavor
+ image_name:
+ get_input: image_name
+ availability_zone:
+ get_input: availability_zone
+ service_type:
+ get_input: service_type
+ availability_zone_enable:
+ get_input: availability_zone_enable
+ service_template_name:
+ get_input: service_template_name
+ service_instance_name:
+ get_input: service_instance_name
+ service_mode:
+ get_input: service_mode
+ port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
+ properties:
+ static_routes:
+ get_input:
+ - interface_list
+ - 0
+ - static_routes
+ virtual_network:
+ get_input:
+ - interface_list
+ - 0
+ - virtual_network
+ static_route:
+ get_input:
+ - static_routes_list
+ - 0
+ allowed_address_pairs:
+ get_input:
+ - interface_list
+ - 0
+ - allowed_address_pairs
+ shared_ip:
+ get_input:
+ - shared_ip_list
+ - 0
+ ip_address:
+ get_input:
+ - interface_list
+ - 0
+ - ip_address
+ interface_type:
+ get_input:
+ - service_interface_type_list
+ - 0
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: service_instance_2
+ relationship: tosca.relationships.network.BindsTo
+ port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
+ properties:
+ static_routes:
+ get_input:
+ - interface_list
+ - 1
+ - static_routes
+ virtual_network:
+ get_input:
+ - interface_list
+ - 1
+ - virtual_network
+ static_route:
+ get_input:
+ - static_routes_list
+ - 1
+ allowed_address_pairs:
+ get_input:
+ - interface_list
+ - 1
+ - allowed_address_pairs
+ shared_ip:
+ get_input:
+ - shared_ip_list
+ - 1
+ ip_address:
+ get_input:
+ - interface_list
+ - 1
+ - ip_address
+ interface_type:
+ get_input:
+ - service_interface_type_list
+ - 1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: service_instance_2
+ relationship: tosca.relationships.network.BindsTo
+ port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
+ properties:
+ static_routes:
+ get_input:
+ - interface_list
+ - 2
+ - static_routes
+ virtual_network:
+ get_input:
+ - interface_list
+ - 2
+ - virtual_network
+ static_route:
+ get_input:
+ - static_routes_list
+ - 2
+ allowed_address_pairs:
+ get_input:
+ - interface_list
+ - 2
+ - allowed_address_pairs
+ shared_ip:
+ get_input:
+ - shared_ip_list
+ - 2
+ ip_address:
+ get_input:
+ - interface_list
+ - 2
+ - ip_address
+ interface_type:
+ get_input:
+ - service_interface_type_list
+ - 2
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: service_instance_2
+ relationship: tosca.relationships.network.BindsTo
+ port_3:
+ type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
+ properties:
+ static_routes:
+ get_input:
+ - interface_list
+ - 3
+ - static_routes
+ virtual_network:
+ get_input:
+ - interface_list
+ - 3
+ - virtual_network
+ static_route:
+ get_input:
+ - static_routes_list
+ - 3
+ allowed_address_pairs:
+ get_input:
+ - interface_list
+ - 3
+ - allowed_address_pairs
+ shared_ip:
+ get_input:
+ - shared_ip_list
+ - 3
+ ip_address:
+ get_input:
+ - interface_list
+ - 3
+ - ip_address
+ interface_type:
+ get_input:
+ - service_interface_type_list
+ - 3
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: service_instance_2
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ service_instance_2:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/OCS-fw.yml
+ members:
+ - service_instance_2
+ - port_0
+ - port_1
+ - port_2
+ - port_3
+ outputs:
+ tenant_id:
+ description: Tenant id of the Service Instance
+ value:
+ get_attribute:
+ - service_instance_2
+ - tenant_id
+ fq_name:
+ description: The FQ name of the service instance
+ value:
+ get_attribute:
+ - service_instance_2
+ - fq_name
+ service_template_name:
+ description: Service Template of the Service Instance
+ value:
+ get_attribute:
+ - service_instance_2
+ - service_template_name
+ show:
+ description: All attributes
+ value:
+ get_attribute:
+ - service_instance_2
+ - show
+ active_vms:
+ description: Number of service VMs active for this Service Instance
+ value:
+ get_attribute:
+ - service_instance_2
+ - active_vms
+ service_instance_name:
+ description: The name of the service instance
+ value:
+ get_attribute:
+ - service_instance_2
+ - service_instance_name
+ virtual_machines:
+ description: Service VMs for the Service Instance
+ value:
+ get_attribute:
+ - service_instance_2
+ - virtual_machines
+ status:
+ description: Status of the service instance
+ value:
+ get_attribute:
+ - service_instance_2
+ - status
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.service_template
+ requirements:
+ link_port_0:
+ - port_0
+ - link
+ link_port_1:
+ - port_1
+ - link
+ link_port_2:
+ - port_2
+ - link
+ link_port_3:
+ - port_3
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sameServiceTemplate/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sameServiceTemplate/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..a26430ba72
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sameServiceTemplate/inputfiles/MANIFEST.json
@@ -0,0 +1,12 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "OCS-fw.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sameServiceTemplate/inputfiles/OCS-fw.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sameServiceTemplate/inputfiles/OCS-fw.yml
new file mode 100644
index 0000000000..0082148f77
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sameServiceTemplate/inputfiles/OCS-fw.yml
@@ -0,0 +1,213 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Based on the following reference for the HOT-DMZ-FW template:
+ Version 3.5 8-10-2015 (Authors: Art Mishurov,am254u & Johhny Chen, jc3066) - HOT-DMZ-FW template that creates two DMZ networks (direct and protected) with a scaled out firewall service between the two.
+
+parameters:
+ HSL_direct_net_id:
+ type: string
+ description: Name of HSL (Logging) network
+ prefix_0:
+ type: string
+ prefix_1:
+ type: string
+ prefix_2:
+ type: string
+ HSL_direct_net_cidr:
+ type: string
+ description: HSL (Logging) network address (CIDR notation)
+ HSL_direct_net_gateway:
+ type: string
+ description: HSL (Logging) network gateway address
+ oam_mgmt_net_0_id:
+ type: string
+ description: Name of OAM network
+ oam_mgmt_net_1_id:
+ type: string
+ description: Name of OAM network
+ Cricket_OCS_direct_net_id:
+ type: string
+ description: Name of Cricket OCS network
+ Cricket_OCS_protected_net_id:
+ type: string
+ description: Name of Cricket OCS network
+ service_instance_name:
+ type: string
+ description: Service instance name
+ service_policy_name:
+ type: string
+ description: Policy Name
+ service_policy_direction:
+ type: string
+ description: Direction of Policy
+ start_src_ports:
+ type: number
+ description: Start of src port
+ end_src_ports:
+ type: number
+ description: End of src port
+ start_dst_ports:
+ type: number
+ description: Start of dst port
+ end_dst_ports:
+ type: number
+ description: End of dst port
+ st_name:
+ type: string
+ description: Name of service template
+ st_mode:
+ type: string
+ description: service mode
+ st_type:
+ type: string
+ description: service type
+ st_image:
+ type: string
+ description: Name of the image
+ st_image_name:
+ type: string
+ description: Name of the image
+ st_flavor:
+ type: string
+ description: Flavor
+ st_service_interface_type_list:
+ type: string
+ description: List of interface types
+ st_shared_ip_list:
+ type: string
+ description: List of shared ip enabled-disabled
+ st_static_routes_list:
+ type: string
+ description: List of static routes enabled-disabled
+ st_scaling:
+ type: string
+ description: Indicates whether service scaling is enabled
+ max_num_fw_instances:
+ type: number
+ description: maximum number of firewall instances for scaling
+ availability_zone_1:
+ type: string
+ description: availability zone
+
+resources:
+
+ hsl_direct_net1:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: HSL_direct_net_id }
+# external: True
+
+ hsl_direct_net2:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: HSL_direct_net_id }
+# external: True
+
+ hsl_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: hsl_direct_net1 }
+ cidr: { get_param: HSL_direct_net_cidr }
+ gateway_ip: { get_param: HSL_direct_net_gateway }
+
+ service_template:
+ type: OS::Contrail::ServiceTemplate
+ properties:
+ name: { get_param: st_name }
+ service_mode: { get_param: st_mode }
+ service_type: { get_param: st_type }
+ image_name: { get_param: st_image }
+ flavor: { get_param: st_flavor }
+ service_interface_type_list: { "Fn::Split" : [ ",", "management,left,right,other" ] }
+ shared_ip_list: { "Fn::Split" : [ ",", Ref: st_shared_ip_list ] }
+ static_routes_list: { "Fn::Split" : [ ",", Ref: st_static_routes_list ] }
+ service_scaling: { get_param: st_scaling }
+
+ service_instance_1:
+ type: OS::Contrail::ServiceInstance
+ depends_on: [ hsl_ip_subnet]
+ properties:
+ name: { get_param: service_instance_name }
+ availability_zone: { get_param: availability_zone_1 }
+ service_template: { get_resource: service_template }
+ interface_list: [
+ {
+ virtual_network: { get_param: oam_mgmt_net_0_id }
+ },
+ {
+ virtual_network: { get_param: Cricket_OCS_direct_net_id }
+ },
+ {
+ virtual_network: { get_resource: hsl_direct_net1 }
+ },
+ {
+ virtual_network: {get_param: oam_mgmt_net_1_id},
+ static_routes: [
+ { "prefix": {get_param: prefix_0} },
+ { "prefix": {get_param: prefix_1} },
+ { "prefix": {get_param: prefix_2} },
+ ],
+ }
+ ]
+
+ service_instance_2:
+ type: OS::Contrail::ServiceInstance
+ depends_on: [ hsl_ip_subnet]
+ properties:
+ name: { get_param: service_instance_name }
+ availability_zone: { get_param: availability_zone_1 }
+ service_template: { get_resource: service_template }
+ scale_out:
+ max_instances: {get_param: max_num_fw_instances}
+ interface_list: [
+ {
+ virtual_network: { get_param: oam_mgmt_net_0_id }
+ },
+ {
+ virtual_network: { get_param: Cricket_OCS_direct_net_id }
+ },
+ {
+ virtual_network: { get_resource: hsl_direct_net2 }
+ },
+ {
+ virtual_network: {get_param: oam_mgmt_net_1_id},
+ static_routes: [
+ { "prefix": {get_param: prefix_0} },
+ { "prefix": {get_param: prefix_1} },
+ { "prefix": {get_param: prefix_2} },
+ ],
+ }
+ ]
+
+ service_policy:
+ type: OS::Contrail::NetworkPolicy
+ depends_on: [ service_instance_1 ]
+ properties:
+ name: { get_param: service_policy_name }
+ entries:
+ policy_rule: [
+ {
+ "direction": { get_param: service_policy_direction },
+ "protocol": "any",
+ "src_ports": [{"start_port": {get_param: start_src_ports}, "end_port": {get_param: end_src_ports}}],
+ "dst_ports": [{"start_port": {get_param: start_dst_ports}, "end_port": {get_param: end_dst_ports}}],
+ "dst_addresses": [{ "virtual_network": { get_param: Cricket_OCS_direct_net_id }}],
+ "action_list": { "apply_service": [{ get_resource: service_instance_1 }]},
+ "src_addresses": [{ "virtual_network": { get_param: Cricket_OCS_protected_net_id }}],
+ },
+ ]
+
+ service_policy_attach_direct_net:
+ type: OS::Contrail::AttachPolicy
+ depends_on: [ service_policy ]
+ properties:
+ network: { get_param: Cricket_OCS_direct_net_id }
+ policy: { get_attr: [service_policy, fq_name] }
+
+ service_policy_attach_protected_net:
+ type: OS::Contrail::AttachPolicy
+ depends_on: [ service_policy ]
+ properties:
+ network: { get_param: Cricket_OCS_protected_net_id }
+ policy: { get_attr: [service_policy, fq_name] } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkMulti/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkMulti/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..73abe8ecb0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkMulti/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,71 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.service_template:
+ derived_from: org.openecomp.resource.abstract.nodes.contrail.AbstractSubstitute
+ requirements:
+ - link_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_port_2:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_port_3:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_port_4:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ org.openecomp.resource.vfc.nodes.heat.compute_service_template:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.contrail.Compute \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkMulti/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkMulti/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..c6a6364988
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkMulti/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,407 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ Internal1_shared:
+ hidden: false
+ immutable: false
+ type: string
+ service_policy_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Policy Name
+ st_static_routes_list:
+ hidden: false
+ immutable: false
+ type: string
+ description: List of static routes enabled-disabled
+ st_type:
+ hidden: false
+ immutable: false
+ type: string
+ description: service type
+ Internal2_forwarding_mode:
+ hidden: false
+ immutable: false
+ type: string
+ st_service_interface_type_list:
+ hidden: false
+ immutable: false
+ type: string
+ description: List of interface types
+ st_mode:
+ hidden: false
+ immutable: false
+ type: string
+ description: service mode
+ Cricket_OCS_protected_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of Cricket OCS network
+ oam_mgmt_net_0_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of OAM network
+ start_dst_ports:
+ hidden: false
+ immutable: false
+ type: float
+ description: Start of dst port
+ st_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor
+ availability_zone_1:
+ hidden: false
+ immutable: false
+ type: string
+ description: availability zone
+ Internal2_shared:
+ hidden: false
+ immutable: false
+ type: string
+ service_instance_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service instance name
+ st_scaling:
+ hidden: false
+ immutable: false
+ type: string
+ description: Indicates whether service scaling is enabled
+ max_num_fw_instances:
+ hidden: false
+ immutable: false
+ type: float
+ description: maximum number of firewall instances for scaling
+ Internal1_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ start_src_ports:
+ hidden: false
+ immutable: false
+ type: float
+ description: Start of src port
+ service_policy_direction:
+ hidden: false
+ immutable: false
+ type: string
+ description: Direction of Policy
+ st_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of service template
+ Internal2_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ hsl_direct_net3:
+ hidden: false
+ immutable: false
+ type: string
+ hsl_direct_net4:
+ hidden: false
+ immutable: false
+ type: string
+ HSL_direct_net_gateway:
+ hidden: false
+ immutable: false
+ type: string
+ description: HSL (Logging) network gateway address
+ hsl_direct_net1:
+ hidden: false
+ immutable: false
+ type: string
+ hsl_direct_net2:
+ hidden: false
+ immutable: false
+ type: string
+ st_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of the image
+ st_shared_ip_list:
+ hidden: false
+ immutable: false
+ type: string
+ description: List of shared ip enabled-disabled
+ Cricket_OCS_direct_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of Cricket OCS network
+ Internal1_forwarding_mode:
+ hidden: false
+ immutable: false
+ type: string
+ end_src_ports:
+ hidden: false
+ immutable: false
+ type: float
+ description: End of src port
+ end_dst_ports:
+ hidden: false
+ immutable: false
+ type: float
+ description: End of dst port
+ HSL_direct_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of HSL (Logging) network
+ HSL_direct_net_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ description: HSL (Logging) network address (CIDR notation)
+ node_templates:
+ Internal2-net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ shared:
+ get_input: Internal1_shared
+ forwarding_mode:
+ get_input: Internal1_forwarding_mode
+ network_name:
+ get_input: Internal2_net_name
+ Internal1-net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ shared:
+ get_input: Internal1_shared
+ forwarding_mode:
+ get_input: Internal1_forwarding_mode
+ network_name:
+ get_input: Internal1_net_name
+ Internal3-net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ shared:
+ get_input: Internal1_shared
+ forwarding_mode:
+ get_input: Internal1_forwarding_mode
+ network_name:
+ get_input: Internal2_net_name
+ hsl_direct_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ network_name:
+ get_input: HSL_direct_net_id
+ subnets:
+ hsl_ip_subnet:
+ cidr:
+ get_input: HSL_direct_net_cidr
+ gateway_ip:
+ get_input: HSL_direct_net_gateway
+ service_instance:
+ type: org.openecomp.resource.abstract.nodes.heat.service_template
+ directives:
+ - substitutable
+ properties:
+ flavor:
+ get_input: st_flavor
+ availability_zone:
+ get_input: availability_zone_1
+ image_name:
+ get_input: st_image
+ service_template_filter:
+ substitute_service_template: service_instanceServiceTemplate.yaml
+ count:
+ get_input: max_num_fw_instances
+ scaling_enabled:
+ get_input: st_scaling
+ mandatory: false
+ service_type:
+ get_input: st_type
+ static_routes_list:
+ - token:
+ - get_input: st_static_routes_list
+ - ','
+ - 0
+ - token:
+ - get_input: st_static_routes_list
+ - ','
+ - 1
+ - token:
+ - get_input: st_static_routes_list
+ - ','
+ - 2
+ - token:
+ - get_input: st_static_routes_list
+ - ','
+ - 3
+ - token:
+ - get_input: st_static_routes_list
+ - ','
+ - 4
+ service_template_name:
+ get_input: st_name
+ service_interface_type_list:
+ - token:
+ - get_input: st_service_interface_type_list
+ - ','
+ - 0
+ - token:
+ - get_input: st_service_interface_type_list
+ - ','
+ - 1
+ - token:
+ - get_input: st_service_interface_type_list
+ - ','
+ - 2
+ - token:
+ - get_input: st_service_interface_type_list
+ - ','
+ - 3
+ - token:
+ - get_input: st_service_interface_type_list
+ - ','
+ - 4
+ interface_list:
+ - virtual_network:
+ get_input: hsl_direct_net1
+ - virtual_network:
+ get_input: hsl_direct_net2
+ - virtual_network:
+ get_input: hsl_direct_net3
+ - virtual_network:
+ get_input: hsl_direct_net4
+ - virtual_network: hsl_direct_net
+ service_instance_name:
+ get_input: service_instance_name
+ service_mode:
+ get_input: st_mode
+ shared_ip_list:
+ - token:
+ - get_input: st_shared_ip_list
+ - ','
+ - 0
+ - token:
+ - get_input: st_shared_ip_list
+ - ','
+ - 1
+ - token:
+ - get_input: st_shared_ip_list
+ - ','
+ - 2
+ - token:
+ - get_input: st_shared_ip_list
+ - ','
+ - 3
+ - token:
+ - get_input: st_shared_ip_list
+ - ','
+ - 4
+ requirements:
+ - link_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal1-net
+ relationship: tosca.relationships.network.LinksTo
+ - link_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal2-net
+ relationship: tosca.relationships.network.LinksTo
+ - link_port_2:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal3-net
+ relationship: tosca.relationships.network.LinksTo
+ - link_port_4:
+ capability: tosca.capabilities.network.Linkable
+ node: hsl_direct_net
+ relationship: tosca.relationships.network.LinksTo
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: hsl_direct_net
+ relationship: tosca.relationships.DependsOn
+ service_policy:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.contrail.NetworkRules
+ properties:
+ entries:
+ policy_rule:
+ - src_ports:
+ - start_port:
+ get_input: start_src_ports
+ end_port:
+ get_input: end_src_ports
+ protocol: any
+ action_list:
+ apply_service:
+ - service_instance
+ dst_addresses:
+ - virtual_network:
+ get_input: Cricket_OCS_direct_net_id
+ dst_ports:
+ - start_port:
+ get_input: start_dst_ports
+ end_port:
+ get_input: end_dst_ports
+ src_addresses:
+ - virtual_network:
+ get_input: Cricket_OCS_protected_net_id
+ direction:
+ get_input: service_policy_direction
+ name:
+ get_input: service_policy_name
+ requirements:
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: service_instance
+ relationship: tosca.relationships.DependsOn
+ groups:
+ OCS-fw:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/OCS-fw.yml
+ description: |
+ Based on the following reference for the HOT-DMZ-FW template: Version 3.5 8-10-2015 (Authors: Art Mishurov,am254u & Johhny Chen, jc3066) - HOT-DMZ-FW template that creates two DMZ networks (direct and protected) with a scaled out firewall service between the two.
+ members:
+ - hsl_direct_net
+ - service_instance
+ - service_policy
+ network_base:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/network_base.yml
+ description: ASC External Networks Template
+ members:
+ - Internal2-net
+ - Internal1-net
+ - Internal3-net \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkMulti/expectedoutputfiles/service_instanceServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkMulti/expectedoutputfiles/service_instanceServiceTemplate.yaml
new file mode 100644
index 0000000000..1933f88f6c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkMulti/expectedoutputfiles/service_instanceServiceTemplate.yaml
@@ -0,0 +1,451 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: service_instance
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ availability_zone:
+ hidden: false
+ immutable: false
+ type: string
+ description: Availability zone to create servers in
+ required: false
+ status: SUPPORTED
+ static_routes_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: Static routes enabled
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: boolean
+ availability_zone_enable:
+ hidden: false
+ immutable: false
+ type: boolean
+ description: Indicates availability zone is enabled
+ required: false
+ default: false
+ status: SUPPORTED
+ service_template_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service template name
+ required: false
+ status: SUPPORTED
+ ordered_interfaces:
+ hidden: false
+ immutable: false
+ type: boolean
+ description: Indicates if service interface are ordered
+ required: false
+ default: false
+ status: SUPPORTED
+ flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor
+ required: false
+ status: SUPPORTED
+ image_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image name
+ required: true
+ status: SUPPORTED
+ service_type:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service type
+ required: true
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - firewall
+ - analyzer
+ - source-nat
+ - loadbalancer
+ service_interface_type_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of interface types
+ required: true
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ constraints:
+ - valid_values:
+ - management
+ - left
+ - right
+ - other
+ service_instance_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service instance name
+ required: true
+ status: SUPPORTED
+ interface_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of interfaces
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.contrail.InterfaceData
+ service_mode:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service mode
+ required: true
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - transparent
+ - in-network
+ - in-network-nat
+ shared_ip_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: Shared ips enabled
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: boolean
+ node_templates:
+ port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
+ properties:
+ static_routes:
+ get_input:
+ - interface_list
+ - 0
+ - static_routes
+ virtual_network:
+ get_input:
+ - interface_list
+ - 0
+ - virtual_network
+ static_route:
+ get_input:
+ - static_routes_list
+ - 0
+ allowed_address_pairs:
+ get_input:
+ - interface_list
+ - 0
+ - allowed_address_pairs
+ shared_ip:
+ get_input:
+ - shared_ip_list
+ - 0
+ ip_address:
+ get_input:
+ - interface_list
+ - 0
+ - ip_address
+ interface_type:
+ get_input:
+ - service_interface_type_list
+ - 0
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: service_instance
+ relationship: tosca.relationships.network.BindsTo
+ port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
+ properties:
+ static_routes:
+ get_input:
+ - interface_list
+ - 1
+ - static_routes
+ virtual_network:
+ get_input:
+ - interface_list
+ - 1
+ - virtual_network
+ static_route:
+ get_input:
+ - static_routes_list
+ - 1
+ allowed_address_pairs:
+ get_input:
+ - interface_list
+ - 1
+ - allowed_address_pairs
+ shared_ip:
+ get_input:
+ - shared_ip_list
+ - 1
+ ip_address:
+ get_input:
+ - interface_list
+ - 1
+ - ip_address
+ interface_type:
+ get_input:
+ - service_interface_type_list
+ - 1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: service_instance
+ relationship: tosca.relationships.network.BindsTo
+ port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
+ properties:
+ static_routes:
+ get_input:
+ - interface_list
+ - 2
+ - static_routes
+ virtual_network:
+ get_input:
+ - interface_list
+ - 2
+ - virtual_network
+ static_route:
+ get_input:
+ - static_routes_list
+ - 2
+ allowed_address_pairs:
+ get_input:
+ - interface_list
+ - 2
+ - allowed_address_pairs
+ shared_ip:
+ get_input:
+ - shared_ip_list
+ - 2
+ ip_address:
+ get_input:
+ - interface_list
+ - 2
+ - ip_address
+ interface_type:
+ get_input:
+ - service_interface_type_list
+ - 2
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: service_instance
+ relationship: tosca.relationships.network.BindsTo
+ port_3:
+ type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
+ properties:
+ static_routes:
+ get_input:
+ - interface_list
+ - 3
+ - static_routes
+ virtual_network:
+ get_input:
+ - interface_list
+ - 3
+ - virtual_network
+ static_route:
+ get_input:
+ - static_routes_list
+ - 3
+ allowed_address_pairs:
+ get_input:
+ - interface_list
+ - 3
+ - allowed_address_pairs
+ shared_ip:
+ get_input:
+ - shared_ip_list
+ - 3
+ ip_address:
+ get_input:
+ - interface_list
+ - 3
+ - ip_address
+ interface_type:
+ get_input:
+ - service_interface_type_list
+ - 3
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: service_instance
+ relationship: tosca.relationships.network.BindsTo
+ port_4:
+ type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
+ properties:
+ static_routes:
+ get_input:
+ - interface_list
+ - 4
+ - static_routes
+ virtual_network:
+ get_input:
+ - interface_list
+ - 4
+ - virtual_network
+ static_route:
+ get_input:
+ - static_routes_list
+ - 4
+ allowed_address_pairs:
+ get_input:
+ - interface_list
+ - 4
+ - allowed_address_pairs
+ shared_ip:
+ get_input:
+ - shared_ip_list
+ - 4
+ ip_address:
+ get_input:
+ - interface_list
+ - 4
+ - ip_address
+ interface_type:
+ get_input:
+ - service_interface_type_list
+ - 4
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: service_instance
+ relationship: tosca.relationships.network.BindsTo
+ service_instance:
+ type: org.openecomp.resource.vfc.nodes.heat.compute_service_template
+ properties:
+ flavor:
+ get_input: flavor
+ image_name:
+ get_input: image_name
+ availability_zone:
+ get_input: availability_zone
+ service_type:
+ get_input: service_type
+ availability_zone_enable:
+ get_input: availability_zone_enable
+ service_template_name:
+ get_input: service_template_name
+ service_instance_name:
+ get_input: service_instance_name
+ service_mode:
+ get_input: service_mode
+ groups:
+ service_instance:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/OCS-fw.yml
+ members:
+ - service_instance
+ - port_0
+ - port_1
+ - port_2
+ - port_3
+ - port_4
+ outputs:
+ tenant_id:
+ description: Tenant id of the Service Instance
+ value:
+ get_attribute:
+ - service_instance
+ - tenant_id
+ fq_name:
+ description: The FQ name of the service instance
+ value:
+ get_attribute:
+ - service_instance
+ - fq_name
+ service_template_name:
+ description: Service Template of the Service Instance
+ value:
+ get_attribute:
+ - service_instance
+ - service_template_name
+ show:
+ description: All attributes
+ value:
+ get_attribute:
+ - service_instance
+ - show
+ active_vms:
+ description: Number of service VMs active for this Service Instance
+ value:
+ get_attribute:
+ - service_instance
+ - active_vms
+ service_instance_name:
+ description: The name of the service instance
+ value:
+ get_attribute:
+ - service_instance
+ - service_instance_name
+ virtual_machines:
+ description: Service VMs for the Service Instance
+ value:
+ get_attribute:
+ - service_instance
+ - virtual_machines
+ status:
+ description: Status of the service instance
+ value:
+ get_attribute:
+ - service_instance
+ - status
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.service_template
+ requirements:
+ link_port_0:
+ - port_0
+ - link
+ link_port_1:
+ - port_1
+ - link
+ link_port_2:
+ - port_2
+ - link
+ link_port_3:
+ - port_3
+ - link
+ link_port_4:
+ - port_4
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkMulti/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkMulti/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..b7969ccd71
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkMulti/inputfiles/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "OCS-fw.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ },
+ {
+ "file": "network_base.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkMulti/inputfiles/OCS-fw.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkMulti/inputfiles/OCS-fw.yml
new file mode 100644
index 0000000000..dd578c2d8b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkMulti/inputfiles/OCS-fw.yml
@@ -0,0 +1,173 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Based on the following reference for the HOT-DMZ-FW template:
+ Version 3.5 8-10-2015 (Authors: Art Mishurov,am254u & Johhny Chen, jc3066) - HOT-DMZ-FW template that creates two DMZ networks (direct and protected) with a scaled out firewall service between the two.
+
+parameters:
+ hsl_direct_net1:
+ type: string
+ hsl_direct_net2:
+ type: string
+ hsl_direct_net3:
+ type: string
+ hsl_direct_net4:
+ type: string
+ HSL_direct_net_id:
+ type: string
+ description: Name of HSL (Logging) network
+ HSL_direct_net_cidr:
+ type: string
+ description: HSL (Logging) network address (CIDR notation)
+ HSL_direct_net_gateway:
+ type: string
+ description: HSL (Logging) network gateway address
+ oam_mgmt_net_0_id:
+ type: string
+ description: Name of OAM network
+ Cricket_OCS_direct_net_id:
+ type: string
+ description: Name of Cricket OCS network
+ Cricket_OCS_protected_net_id:
+ type: string
+ description: Name of Cricket OCS network
+ service_instance_name:
+ type: string
+ description: Service instance name
+ service_policy_name:
+ type: string
+ description: Policy Name
+ service_policy_direction:
+ type: string
+ description: Direction of Policy
+ start_src_ports:
+ type: number
+ description: Start of src port
+ end_src_ports:
+ type: number
+ description: End of src port
+ start_dst_ports:
+ type: number
+ description: Start of dst port
+ end_dst_ports:
+ type: number
+ description: End of dst port
+ st_name:
+ type: string
+ description: Name of service template
+ st_mode:
+ type: string
+ description: service mode
+ st_type:
+ type: string
+ description: service type
+ st_image:
+ type: string
+ description: Name of the image
+ st_flavor:
+ type: string
+ description: Flavor
+ st_service_interface_type_list:
+ type: string
+ description: List of interface types
+ st_shared_ip_list:
+ type: string
+ description: List of shared ip enabled-disabled
+ st_static_routes_list:
+ type: string
+ description: List of static routes enabled-disabled
+ st_scaling:
+ type: string
+ description: Indicates whether service scaling is enabled
+ max_num_fw_instances:
+ type: number
+ description: maximum number of firewall instances for scaling
+ availability_zone_1:
+ type: string
+ description: availability zone
+
+resources:
+
+ hsl_direct_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: HSL_direct_net_id }
+
+ hsl_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: hsl_direct_net }
+ cidr: { get_param: HSL_direct_net_cidr }
+ gateway_ip: { get_param: HSL_direct_net_gateway }
+
+ service_template:
+ type: OS::Contrail::ServiceTemplate
+ properties:
+ name: { get_param: st_name }
+ service_mode: { get_param: st_mode }
+ service_type: { get_param: st_type }
+ image_name: { get_param: st_image }
+ flavor: { get_param: st_flavor }
+ service_interface_type_list: { "Fn::Split" : [ ",", Ref: st_service_interface_type_list ] }
+ shared_ip_list: { "Fn::Split" : [ ",", Ref: st_shared_ip_list ] }
+ static_routes_list: { "Fn::Split" : [ ",", Ref: st_static_routes_list ] }
+ service_scaling: { get_param: st_scaling }
+
+ service_instance:
+ type: OS::Contrail::ServiceInstance
+ depends_on: [ hsl_ip_subnet]
+ properties:
+ name: { get_param: service_instance_name }
+ availability_zone: { get_param: availability_zone_1 }
+ service_template: { get_resource: service_template }
+ scale_out:
+ max_instances: {get_param: max_num_fw_instances}
+ interface_list: [
+ {
+ virtual_network: { get_param: hsl_direct_net1 }
+ },
+ {
+ virtual_network: { get_param: hsl_direct_net2 }
+ },
+ {
+ virtual_network: { get_param: hsl_direct_net3 }
+ },
+ {
+ virtual_network: { get_param: hsl_direct_net4 }
+ },
+ {
+ virtual_network: { get_resource: hsl_direct_net }
+ }
+ ]
+
+ service_policy:
+ type: OS::Contrail::NetworkPolicy
+ depends_on: [ service_instance ]
+ properties:
+ name: { get_param: service_policy_name }
+ entries:
+ policy_rule: [
+ {
+ "direction": { get_param: service_policy_direction },
+ "protocol": "any",
+ "src_ports": [{"start_port": {get_param: start_src_ports}, "end_port": {get_param: end_src_ports}}],
+ "dst_ports": [{"start_port": {get_param: start_dst_ports}, "end_port": {get_param: end_dst_ports}}],
+ "dst_addresses": [{ "virtual_network": { get_param: Cricket_OCS_direct_net_id }}],
+ "action_list": { "apply_service": [{ get_resource: service_instance }]},
+ "src_addresses": [{ "virtual_network": { get_param: Cricket_OCS_protected_net_id }}],
+ },
+ ]
+
+ service_policy_attach_direct_net:
+ type: OS::Contrail::AttachPolicy
+ depends_on: [ service_policy ]
+ properties:
+ network: { get_param: Cricket_OCS_direct_net_id }
+ policy: { get_attr: [service_policy, fq_name] }
+
+ service_policy_attach_protected_net:
+ type: OS::Contrail::AttachPolicy
+ depends_on: [ service_policy ]
+ properties:
+ network: { get_param: Cricket_OCS_protected_net_id }
+ policy: { get_attr: [service_policy, fq_name] } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkMulti/inputfiles/network_base.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkMulti/inputfiles/network_base.yml
new file mode 100644
index 0000000000..21fef30282
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkMulti/inputfiles/network_base.yml
@@ -0,0 +1,47 @@
+heat_template_version: 2013-05-23
+
+description: ASC External Networks Template
+
+parameters:
+ Internal1_net_name:
+ type: string
+ Internal2_net_name:
+ type: string
+ Internal1_forwarding_mode:
+ type: string
+ Internal2_forwarding_mode:
+ type: string
+ Internal1_shared:
+ type: string
+ Internal2_shared:
+ type: string
+
+resources:
+ Internal1-net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: Internal1_net_name }
+ forwarding_mode: { get_param: Internal1_forwarding_mode }
+ shared: { get_param: Internal1_shared }
+
+ Internal2-net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: Internal2_net_name }
+ forwarding_mode: { get_param: Internal1_forwarding_mode }
+ shared: { get_param: Internal1_shared }
+
+ Internal3-net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: Internal2_net_name }
+ forwarding_mode: { get_param: Internal1_forwarding_mode }
+ shared: { get_param: Internal1_shared }
+
+outputs:
+ hsl_direct_net1:
+ value: { list_join: [':', { get_attr: [ Internal1-net, fq_name ] } ] }
+ hsl_direct_net2:
+ value: { get_attr: [ Internal2-net, fq_name ] }
+ hsl_direct_net3:
+ value: {get_resource: Internal3-net} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..a11b54226b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,154 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.st_image:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.contrail.Compute
+ org.openecomp.resource.abstract.nodes.heat.service_template:
+ derived_from: org.openecomp.resource.abstract.nodes.contrail.AbstractSubstitute
+ requirements:
+ - link_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ org.openecomp.resource.abstract.nodes.heat.OCS-fw:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ service_policy_name:
+ type: string
+ description: Policy Name
+ st_static_routes_list:
+ type: string
+ description: List of static routes enabled-disabled
+ st_type:
+ type: string
+ description: service type
+ st_service_interface_type_list:
+ type: string
+ description: List of interface types
+ st_mode:
+ type: string
+ description: service mode
+ Cricket_OCS_protected_net_id:
+ type: string
+ description: Name of Cricket OCS network
+ oam_mgmt_net_0_id:
+ type: string
+ description: Name of OAM network
+ start_dst_ports:
+ type: float
+ description: Start of dst port
+ st_flavor:
+ type: string
+ description: Flavor
+ availability_zone_1:
+ type: string
+ description: availability zone
+ service_instance_name:
+ type: string
+ description: Service instance name
+ st_scaling:
+ type: string
+ description: Indicates whether service scaling is enabled
+ max_num_fw_instances:
+ type: float
+ description: maximum number of firewall instances for scaling
+ start_src_ports:
+ type: float
+ description: Start of src port
+ service_policy_direction:
+ type: string
+ description: Direction of Policy
+ st_name:
+ type: string
+ description: Name of service template
+ hsl_direct_net3:
+ type: string
+ hsl_direct_net4:
+ type: string
+ HSL_direct_net_gateway:
+ type: string
+ description: HSL (Logging) network gateway address
+ hsl_direct_net1:
+ type: string
+ hsl_direct_net2:
+ type: string
+ st_image:
+ type: string
+ description: Name of the image
+ st_shared_ip_list:
+ type: string
+ description: List of shared ip enabled-disabled
+ Cricket_OCS_direct_net_id:
+ type: string
+ description: Name of Cricket OCS network
+ network_param:
+ type: string
+ end_src_ports:
+ type: float
+ description: End of src port
+ end_dst_ports:
+ type: float
+ description: End of dst port
+ HSL_direct_net_id:
+ type: string
+ description: Name of HSL (Logging) network
+ HSL_direct_net_cidr:
+ type: string
+ description: HSL (Logging) network address (CIDR notation)
+ requirements:
+ - link_port_0_service_instance:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - network_service_policy:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.network.Network
+ relationship: org.openecomp.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ capabilities:
+ link_hsl_direct_net:
+ type: tosca.capabilities.network.Linkable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_hsl_direct_net:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..53ecba9888
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,90 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ Internal1_shared:
+ hidden: false
+ immutable: false
+ type: string
+ Internal1_forwarding_mode:
+ hidden: false
+ immutable: false
+ type: string
+ Internal2_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ Internal2_forwarding_mode:
+ hidden: false
+ immutable: false
+ type: string
+ Internal2_shared:
+ hidden: false
+ immutable: false
+ type: string
+ Internal1_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ node_templates:
+ Internal1-net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ shared:
+ get_input: Internal1_shared
+ forwarding_mode:
+ get_input: Internal1_forwarding_mode
+ network_name:
+ get_input: Internal1_net_name
+ test_nested:
+ type: org.openecomp.resource.abstract.nodes.heat.OCS-fw
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: OCS-fwServiceTemplate.yaml
+ network_param: Internal1-net
+ requirements:
+ - link_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal1-net
+ relationship: tosca.relationships.network.LinksTo
+ groups:
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: ASC External Networks Template
+ members:
+ - Internal1-net
+ - test_nested \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/expectedoutputfiles/OCS-fwServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/expectedoutputfiles/OCS-fwServiceTemplate.yaml
new file mode 100644
index 0000000000..1f504169ab
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/expectedoutputfiles/OCS-fwServiceTemplate.yaml
@@ -0,0 +1,294 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: OCS-fw
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ service_policy_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Policy Name
+ st_static_routes_list:
+ hidden: false
+ immutable: false
+ type: string
+ description: List of static routes enabled-disabled
+ st_type:
+ hidden: false
+ immutable: false
+ type: string
+ description: service type
+ st_service_interface_type_list:
+ hidden: false
+ immutable: false
+ type: string
+ description: List of interface types
+ st_mode:
+ hidden: false
+ immutable: false
+ type: string
+ description: service mode
+ Cricket_OCS_protected_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of Cricket OCS network
+ oam_mgmt_net_0_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of OAM network
+ start_dst_ports:
+ hidden: false
+ immutable: false
+ type: float
+ description: Start of dst port
+ st_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor
+ availability_zone_1:
+ hidden: false
+ immutable: false
+ type: string
+ description: availability zone
+ service_instance_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service instance name
+ st_scaling:
+ hidden: false
+ immutable: false
+ type: string
+ description: Indicates whether service scaling is enabled
+ max_num_fw_instances:
+ hidden: false
+ immutable: false
+ type: float
+ description: maximum number of firewall instances for scaling
+ start_src_ports:
+ hidden: false
+ immutable: false
+ type: float
+ description: Start of src port
+ service_policy_direction:
+ hidden: false
+ immutable: false
+ type: string
+ description: Direction of Policy
+ st_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of service template
+ hsl_direct_net3:
+ hidden: false
+ immutable: false
+ type: string
+ hsl_direct_net4:
+ hidden: false
+ immutable: false
+ type: string
+ HSL_direct_net_gateway:
+ hidden: false
+ immutable: false
+ type: string
+ description: HSL (Logging) network gateway address
+ hsl_direct_net1:
+ hidden: false
+ immutable: false
+ type: string
+ hsl_direct_net2:
+ hidden: false
+ immutable: false
+ type: string
+ st_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of the image
+ st_shared_ip_list:
+ hidden: false
+ immutable: false
+ type: string
+ description: List of shared ip enabled-disabled
+ Cricket_OCS_direct_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of Cricket OCS network
+ network_param:
+ hidden: false
+ immutable: false
+ type: string
+ end_src_ports:
+ hidden: false
+ immutable: false
+ type: float
+ description: End of src port
+ end_dst_ports:
+ hidden: false
+ immutable: false
+ type: float
+ description: End of dst port
+ HSL_direct_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of HSL (Logging) network
+ HSL_direct_net_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ description: HSL (Logging) network address (CIDR notation)
+ node_templates:
+ hsl_direct_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ network_name:
+ get_input: HSL_direct_net_id
+ subnets:
+ hsl_ip_subnet:
+ cidr:
+ get_input: HSL_direct_net_cidr
+ gateway_ip:
+ get_input: HSL_direct_net_gateway
+ service_instance:
+ type: org.openecomp.resource.abstract.nodes.heat.service_template
+ directives:
+ - substitutable
+ properties:
+ flavor:
+ get_input: st_flavor
+ availability_zone:
+ get_input: availability_zone_1
+ image_name:
+ get_input: st_image
+ service_template_filter:
+ substitute_service_template: service_instanceServiceTemplate.yaml
+ count:
+ get_input: max_num_fw_instances
+ mandatory: false
+ service_type:
+ get_input: st_type
+ static_routes_list:
+ - token:
+ - get_input: st_static_routes_list
+ - ','
+ - 0
+ service_template_name:
+ get_input: st_name
+ service_interface_type_list:
+ - token:
+ - get_input: st_service_interface_type_list
+ - ','
+ - 0
+ interface_list:
+ - virtual_network:
+ get_input: network_param
+ service_instance_name:
+ get_input: service_instance_name
+ service_mode:
+ get_input: st_mode
+ shared_ip_list:
+ - token:
+ - get_input: st_shared_ip_list
+ - ','
+ - 0
+ requirements:
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: hsl_direct_net
+ relationship: tosca.relationships.DependsOn
+ service_policy:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.contrail.NetworkRules
+ properties:
+ entries:
+ policy_rule:
+ - src_ports:
+ - start_port:
+ get_input: start_src_ports
+ end_port:
+ get_input: end_src_ports
+ protocol: any
+ action_list:
+ apply_service:
+ - service_instance
+ dst_addresses:
+ - virtual_network:
+ get_input: Cricket_OCS_direct_net_id
+ dst_ports:
+ - start_port:
+ get_input: start_dst_ports
+ end_port:
+ get_input: end_dst_ports
+ src_addresses:
+ - virtual_network:
+ get_input: Cricket_OCS_protected_net_id
+ direction:
+ get_input: service_policy_direction
+ name:
+ get_input: service_policy_name
+ requirements:
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: service_instance
+ relationship: tosca.relationships.DependsOn
+ groups:
+ OCS-fw:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/OCS-fw.yml
+ description: |
+ Based on the following reference for the HOT-DMZ-FW template: Version 3.5 8-10-2015 (Authors: Art Mishurov,am254u & Johhny Chen, jc3066) - HOT-DMZ-FW template that creates two DMZ networks (direct and protected) with a scaled out firewall service between the two.
+ members:
+ - hsl_direct_net
+ - service_instance
+ - service_policy
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.OCS-fw
+ capabilities:
+ link_hsl_direct_net:
+ - hsl_direct_net
+ - link
+ attachment_hsl_direct_net:
+ - hsl_direct_net
+ - attachment
+ requirements:
+ network_service_policy:
+ - service_policy
+ - network
+ link_port_0_service_instance:
+ - service_instance
+ - link_port_0 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/expectedoutputfiles/service_instanceServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/expectedoutputfiles/service_instanceServiceTemplate.yaml
new file mode 100644
index 0000000000..bbc95728c9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/expectedoutputfiles/service_instanceServiceTemplate.yaml
@@ -0,0 +1,275 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: service_instance
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ availability_zone:
+ hidden: false
+ immutable: false
+ type: string
+ description: Availability zone to create servers in
+ required: false
+ status: SUPPORTED
+ static_routes_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: Static routes enabled
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: boolean
+ availability_zone_enable:
+ hidden: false
+ immutable: false
+ type: boolean
+ description: Indicates availability zone is enabled
+ required: false
+ default: false
+ status: SUPPORTED
+ service_template_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service template name
+ required: false
+ status: SUPPORTED
+ ordered_interfaces:
+ hidden: false
+ immutable: false
+ type: boolean
+ description: Indicates if service interface are ordered
+ required: false
+ default: false
+ status: SUPPORTED
+ flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor
+ required: false
+ status: SUPPORTED
+ image_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image name
+ required: true
+ status: SUPPORTED
+ service_type:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service type
+ required: true
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - firewall
+ - analyzer
+ - source-nat
+ - loadbalancer
+ service_interface_type_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of interface types
+ required: true
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ constraints:
+ - valid_values:
+ - management
+ - left
+ - right
+ - other
+ service_instance_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service instance name
+ required: true
+ status: SUPPORTED
+ interface_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: List of interfaces
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.contrail.InterfaceData
+ service_mode:
+ hidden: false
+ immutable: false
+ type: string
+ description: Service mode
+ required: true
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - transparent
+ - in-network
+ - in-network-nat
+ shared_ip_list:
+ hidden: false
+ immutable: false
+ type: list
+ description: Shared ips enabled
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: boolean
+ node_templates:
+ port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
+ properties:
+ static_routes:
+ get_input:
+ - interface_list
+ - 0
+ - static_routes
+ virtual_network:
+ get_input:
+ - interface_list
+ - 0
+ - virtual_network
+ static_route:
+ get_input:
+ - static_routes_list
+ - 0
+ allowed_address_pairs:
+ get_input:
+ - interface_list
+ - 0
+ - allowed_address_pairs
+ shared_ip:
+ get_input:
+ - shared_ip_list
+ - 0
+ ip_address:
+ get_input:
+ - interface_list
+ - 0
+ - ip_address
+ interface_type:
+ get_input:
+ - service_interface_type_list
+ - 0
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: service_instance
+ relationship: tosca.relationships.network.BindsTo
+ service_instance:
+ type: org.openecomp.resource.vfc.nodes.heat.st_image
+ properties:
+ flavor:
+ get_input: flavor
+ image_name:
+ get_input: image_name
+ availability_zone:
+ get_input: availability_zone
+ service_type:
+ get_input: service_type
+ availability_zone_enable:
+ get_input: availability_zone_enable
+ service_template_name:
+ get_input: service_template_name
+ service_instance_name:
+ get_input: service_instance_name
+ service_mode:
+ get_input: service_mode
+ groups:
+ service_instance:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/OCS-fw.yml
+ members:
+ - service_instance
+ - port_0
+ outputs:
+ tenant_id:
+ description: Tenant id of the Service Instance
+ value:
+ get_attribute:
+ - service_instance
+ - tenant_id
+ fq_name:
+ description: The FQ name of the service instance
+ value:
+ get_attribute:
+ - service_instance
+ - fq_name
+ service_template_name:
+ description: Service Template of the Service Instance
+ value:
+ get_attribute:
+ - service_instance
+ - service_template_name
+ show:
+ description: All attributes
+ value:
+ get_attribute:
+ - service_instance
+ - show
+ active_vms:
+ description: Number of service VMs active for this Service Instance
+ value:
+ get_attribute:
+ - service_instance
+ - active_vms
+ service_instance_name:
+ description: The name of the service instance
+ value:
+ get_attribute:
+ - service_instance
+ - service_instance_name
+ virtual_machines:
+ description: Service VMs for the Service Instance
+ value:
+ get_attribute:
+ - service_instance
+ - virtual_machines
+ status:
+ description: Status of the service instance
+ value:
+ get_attribute:
+ - service_instance
+ - status
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.service_template
+ requirements:
+ link_port_0:
+ - port_0
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..ba27604c3f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/inputfiles/MANIFEST.json
@@ -0,0 +1,16 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "OCS-fw.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ },
+ {
+ "file": "main.yml",
+ "type": "HEAT"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/inputfiles/OCS-fw.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/inputfiles/OCS-fw.yml
new file mode 100644
index 0000000000..86c3fcadc8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/inputfiles/OCS-fw.yml
@@ -0,0 +1,163 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Based on the following reference for the HOT-DMZ-FW template:
+ Version 3.5 8-10-2015 (Authors: Art Mishurov,am254u & Johhny Chen, jc3066) - HOT-DMZ-FW template that creates two DMZ networks (direct and protected) with a scaled out firewall service between the two.
+
+parameters:
+ hsl_direct_net1:
+ type: string
+ hsl_direct_net2:
+ type: string
+ hsl_direct_net3:
+ type: string
+ hsl_direct_net4:
+ type: string
+ HSL_direct_net_id:
+ type: string
+ description: Name of HSL (Logging) network
+ HSL_direct_net_cidr:
+ type: string
+ description: HSL (Logging) network address (CIDR notation)
+ HSL_direct_net_gateway:
+ type: string
+ description: HSL (Logging) network gateway address
+ oam_mgmt_net_0_id:
+ type: string
+ description: Name of OAM network
+ Cricket_OCS_direct_net_id:
+ type: string
+ description: Name of Cricket OCS network
+ Cricket_OCS_protected_net_id:
+ type: string
+ description: Name of Cricket OCS network
+ service_instance_name:
+ type: string
+ description: Service instance name
+ service_policy_name:
+ type: string
+ description: Policy Name
+ service_policy_direction:
+ type: string
+ description: Direction of Policy
+ start_src_ports:
+ type: number
+ description: Start of src port
+ end_src_ports:
+ type: number
+ description: End of src port
+ start_dst_ports:
+ type: number
+ description: Start of dst port
+ end_dst_ports:
+ type: number
+ description: End of dst port
+ st_name:
+ type: string
+ description: Name of service template
+ st_mode:
+ type: string
+ description: service mode
+ st_type:
+ type: string
+ description: service type
+ st_image:
+ type: string
+ description: Name of the image
+ st_flavor:
+ type: string
+ description: Flavor
+ st_service_interface_type_list:
+ type: string
+ description: List of interface types
+ st_shared_ip_list:
+ type: string
+ description: List of shared ip enabled-disabled
+ st_static_routes_list:
+ type: string
+ description: List of static routes enabled-disabled
+ st_scaling:
+ type: string
+ description: Indicates whether service scaling is enabled
+ max_num_fw_instances:
+ type: number
+ description: maximum number of firewall instances for scaling
+ availability_zone_1:
+ type: string
+ description: availability zone
+ network_param:
+ type: string
+
+resources:
+
+ hsl_direct_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: HSL_direct_net_id }
+
+ hsl_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: hsl_direct_net }
+ cidr: { get_param: HSL_direct_net_cidr }
+ gateway_ip: { get_param: HSL_direct_net_gateway }
+
+ service_template:
+ type: OS::Contrail::ServiceTemplate
+ properties:
+ name: { get_param: st_name }
+ service_mode: { get_param: st_mode }
+ service_type: { get_param: st_type }
+ image_name: { get_param: st_image }
+ flavor: { get_param: st_flavor }
+ service_interface_type_list: { "Fn::Split" : [ ",", Ref: st_service_interface_type_list ] }
+ shared_ip_list: { "Fn::Split" : [ ",", Ref: st_shared_ip_list ] }
+ static_routes_list: { "Fn::Split" : [ ",", Ref: st_static_routes_list ] }
+ service_scaling: { get_param: st_scaling }
+
+ service_instance:
+ type: OS::Contrail::ServiceInstance
+ depends_on: [ hsl_ip_subnet]
+ properties:
+ name: { get_param: service_instance_name }
+ availability_zone: { get_param: availability_zone_1 }
+ service_template: { get_resource: service_template }
+ scale_out:
+ max_instances: {get_param: max_num_fw_instances}
+ interface_list: [
+ {
+ virtual_network: { get_param: network_param }
+ }
+ ]
+
+ service_policy:
+ type: OS::Contrail::NetworkPolicy
+ depends_on: [ service_instance ]
+ properties:
+ name: { get_param: service_policy_name }
+ entries:
+ policy_rule: [
+ {
+ "direction": { get_param: service_policy_direction },
+ "protocol": "any",
+ "src_ports": [{"start_port": {get_param: start_src_ports}, "end_port": {get_param: end_src_ports}}],
+ "dst_ports": [{"start_port": {get_param: start_dst_ports}, "end_port": {get_param: end_dst_ports}}],
+ "dst_addresses": [{ "virtual_network": { get_param: Cricket_OCS_direct_net_id }}],
+ "action_list": { "apply_service": [{ get_resource: service_instance }]},
+ "src_addresses": [{ "virtual_network": { get_param: Cricket_OCS_protected_net_id }}],
+ },
+ ]
+
+ service_policy_attach_direct_net:
+ type: OS::Contrail::AttachPolicy
+ depends_on: [ service_policy ]
+ properties:
+ network: { get_param: Cricket_OCS_direct_net_id }
+ policy: { get_attr: [service_policy, fq_name] }
+
+ service_policy_attach_protected_net:
+ type: OS::Contrail::AttachPolicy
+ depends_on: [ service_policy ]
+ properties:
+ network: { get_param: Cricket_OCS_protected_net_id }
+ policy: { get_attr: [service_policy, fq_name] } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/inputfiles/main.yml
new file mode 100644
index 0000000000..a1f7dc932d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrail2serviceinstance/sharedNetworkNested/inputfiles/main.yml
@@ -0,0 +1,30 @@
+heat_template_version: 2013-05-23
+
+description: ASC External Networks Template
+
+parameters:
+ Internal1_net_name:
+ type: string
+ Internal2_net_name:
+ type: string
+ Internal1_forwarding_mode:
+ type: string
+ Internal2_forwarding_mode:
+ type: string
+ Internal1_shared:
+ type: string
+ Internal2_shared:
+ type: string
+
+resources:
+ Internal1-net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: Internal1_net_name }
+ forwarding_mode: { get_param: Internal1_forwarding_mode }
+ shared: { get_param: Internal1_shared }
+
+ test_nested:
+ type: OCS-fw.yml
+ properties:
+ network_param: { get_resource: Internal1-net} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..23c2d851f7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,265 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ template_PortTuple_LB1:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ lb_st_interface_type_oam:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ oam_sec_group_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ nems_traffic_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ network_ipam_refs_data_ipam_subnets_addr_from_start_true:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ jsa_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ node_templates:
+ jsa_net3:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork
+ properties:
+ network_ipam_refs_data:
+ - network_ipam_refs_data_ipam_subnets:
+ - network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_name: aaa
+ template_VMInt_OAM_lb_5:
+ type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface
+ properties:
+ security_group_refs:
+ - get_input: oam_sec_group_name
+ virtual_network_refs: [
+ ]
+ virtual_machine_interface_properties:
+ virtual_machine_interface_properties_service_interface_type:
+ get_input: lb_st_interface_type_oam
+ port_tuple_refs:
+ - get_input: template_PortTuple_LB1
+ jsa_net2:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork
+ properties:
+ network_ipam_refs_data:
+ - network_ipam_refs_data_ipam_subnets:
+ - network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_name: aaa
+ template_VMInt_OAM_lb_6:
+ type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface
+ properties:
+ security_group_refs:
+ - get_input: oam_sec_group_name
+ virtual_network_refs:
+ get_attribute:
+ - jsa_net3
+ - fq_name
+ virtual_machine_interface_properties:
+ virtual_machine_interface_properties_service_interface_type:
+ get_input: lb_st_interface_type_oam
+ port_tuple_refs:
+ - get_input: template_PortTuple_LB1
+ template_VMInt_OAM_lb_7:
+ type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface
+ properties:
+ security_group_refs:
+ - get_input: oam_sec_group_name
+ virtual_machine_interface_properties:
+ virtual_machine_interface_properties_service_interface_type:
+ get_input: lb_st_interface_type_oam
+ port_tuple_refs:
+ - get_input: template_PortTuple_LB1
+ jsa_net5:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork
+ properties:
+ network_ipam_refs_data:
+ - network_ipam_refs_data_ipam_subnets:
+ - network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_name: aaa
+ jsa_net4:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ network_name:
+ get_input: nems_traffic_name
+ template_VMInt_OAM_lb_1:
+ type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface
+ properties:
+ security_group_refs:
+ - get_input: oam_sec_group_name
+ virtual_network_refs:
+ - jsa_net1
+ - jsa_net5
+ virtual_machine_interface_properties:
+ virtual_machine_interface_properties_service_interface_type:
+ get_input: lb_st_interface_type_oam
+ port_tuple_refs:
+ - get_input: template_PortTuple_LB1
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: jsa_net1
+ relationship: tosca.relationships.network.LinksTo
+ template_VMInt_OAM_lb_2:
+ type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface
+ properties:
+ security_group_refs:
+ - get_input: oam_sec_group_name
+ virtual_network_refs:
+ - list_join:
+ - ':'
+ - get_attribute:
+ - jsa_net2
+ - fq_name
+ - list_join:
+ - ':'
+ - get_attribute:
+ - jsa_net5
+ - fq_name
+ virtual_machine_interface_properties:
+ virtual_machine_interface_properties_service_interface_type:
+ get_input: lb_st_interface_type_oam
+ port_tuple_refs:
+ - get_input: template_PortTuple_LB1
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: jsa_net2
+ relationship: tosca.relationships.network.LinksTo
+ jsa_net1:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork
+ properties:
+ network_ipam_refs_data:
+ - network_ipam_refs_data_ipam_subnets:
+ - network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_name: aaa
+ template_VMInt_OAM_lb_3:
+ type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface
+ properties:
+ security_group_refs:
+ - get_input: oam_sec_group_name
+ virtual_network_refs:
+ - get_attribute:
+ - jsa_net3
+ - fq_name
+ - get_attribute:
+ - jsa_net5
+ - fq_name
+ virtual_machine_interface_properties:
+ virtual_machine_interface_properties_service_interface_type:
+ get_input: lb_st_interface_type_oam
+ port_tuple_refs:
+ - get_input: template_PortTuple_LB1
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: jsa_net3
+ relationship: tosca.relationships.network.LinksTo
+ template_VMInt_OAM_lb_4:
+ type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface
+ properties:
+ security_group_refs:
+ - get_input: oam_sec_group_name
+ virtual_network_refs:
+ - get_attribute:
+ - jsa_net4
+ - fq_name
+ virtual_machine_interface_properties:
+ virtual_machine_interface_properties_service_interface_type:
+ get_input: lb_st_interface_type_oam
+ port_tuple_refs:
+ - get_input: template_PortTuple_LB1
+ groups:
+ hot_template:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot_template.yml
+ description: cmaui server template for vMMSC
+ members:
+ - jsa_net3
+ - template_VMInt_OAM_lb_5
+ - jsa_net2
+ - template_VMInt_OAM_lb_6
+ - template_VMInt_OAM_lb_7
+ - jsa_net5
+ - jsa_net4
+ - template_VMInt_OAM_lb_1
+ - template_VMInt_OAM_lb_2
+ - jsa_net1
+ - template_VMInt_OAM_lb_3
+ - template_VMInt_OAM_lb_4 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..70cdc7d237
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/inputfiles/MANIFEST.json
@@ -0,0 +1,11 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volumes",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot_template.yml",
+ "type": "HEAT"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/inputfiles/hot_template.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/inputfiles/hot_template.yml
new file mode 100644
index 0000000000..46e80667ab
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/inputfiles/hot_template.yml
@@ -0,0 +1,177 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ network_ipam_refs_data_ipam_subnets_addr_from_start_true:
+ description: dummy
+ type: string
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2:
+ description: dummy
+ type: string
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2:
+ description: dummy
+ type: string
+ lb_st_interface_type_oam:
+ description: dummy
+ type: string
+ template_PortTuple_LB1:
+ description: dummy
+ type: string
+ oam_sec_group_name:
+ description: dummy
+ type: string
+ jsa_net_name:
+ description: dummy
+ type: string
+ nems_traffic_name:
+ description: dummy
+ type: string
+
+resources:
+ template_VMInt_OAM_lb_1:
+ type: OS::ContrailV2::VirtualMachineInterface
+ properties:
+ virtual_machine_interface_properties:
+ {
+ virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam },
+ }
+ virtual_network_refs: [{ get_resource: jsa_net1 },{ get_resource: jsa_net5 }]
+ port_tuple_refs: [{ get_param: template_PortTuple_LB1 }]
+ security_group_refs: [{ get_param: oam_sec_group_name}]
+
+ jsa_net1:
+ properties:
+ name: aaa
+ network_ipam_refs_data:
+ -
+ network_ipam_refs_data_ipam_subnets:
+ -
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_param: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ type: "OS::ContrailV2::VirtualNetwork"
+
+ template_VMInt_OAM_lb_2:
+ type: OS::ContrailV2::VirtualMachineInterface
+ properties:
+ virtual_machine_interface_properties:
+ {
+ virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam },
+ }
+ virtual_network_refs: [ { list_join: [':', { get_attr: [ jsa_net2, fq_name ] } ] },{ list_join: [':', { get_attr: [ jsa_net5, fq_name ] } ] }]
+ port_tuple_refs: [{ get_param: template_PortTuple_LB1 }]
+ security_group_refs: [{ get_param: oam_sec_group_name}]
+
+ jsa_net2:
+ properties:
+ name: aaa
+ network_ipam_refs_data:
+ -
+ network_ipam_refs_data_ipam_subnets:
+ -
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_param: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ type: "OS::ContrailV2::VirtualNetwork"
+
+ template_VMInt_OAM_lb_3:
+ type: OS::ContrailV2::VirtualMachineInterface
+ properties:
+ virtual_machine_interface_properties:
+ {
+ virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam },
+ }
+ virtual_network_refs: [{ get_attr: [ jsa_net3, fq_name ] } ,{ get_attr: [ jsa_net5, fq_name ] }]
+ port_tuple_refs: [{ get_param: template_PortTuple_LB1 }]
+ security_group_refs: [{ get_param: oam_sec_group_name}]
+
+ jsa_net3:
+ properties:
+ name: aaa
+ network_ipam_refs_data:
+ -
+ network_ipam_refs_data_ipam_subnets:
+ -
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_param: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ type: "OS::ContrailV2::VirtualNetwork"
+
+ template_VMInt_OAM_lb_4:
+ type: OS::ContrailV2::VirtualMachineInterface
+ properties:
+ virtual_machine_interface_properties:
+ {
+ virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam },
+ }
+ virtual_network_refs: [{ get_attr: [ jsa_net4, fq_name ] } ] # should not connect to contrail network
+ port_tuple_refs: [{ get_param: template_PortTuple_LB1 }]
+ security_group_refs: [{ get_param: oam_sec_group_name}]
+
+ template_VMInt_OAM_lb_5:
+ type: OS::ContrailV2::VirtualMachineInterface
+ properties:
+ virtual_machine_interface_properties:
+ {
+ virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam },
+ }
+ virtual_network_refs: []
+ port_tuple_refs: [{ get_param: template_PortTuple_LB1 }]
+ security_group_refs: [{ get_param: oam_sec_group_name}]
+
+ template_VMInt_OAM_lb_6:
+ type: OS::ContrailV2::VirtualMachineInterface
+ properties:
+ virtual_machine_interface_properties:
+ {
+ virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam },
+ }
+ virtual_network_refs: { get_attr: [ jsa_net3, fq_name ] }
+ port_tuple_refs: [{ get_param: template_PortTuple_LB1 }]
+ security_group_refs: [{ get_param: oam_sec_group_name}]
+
+
+
+ template_VMInt_OAM_lb_7:
+ type: OS::ContrailV2::VirtualMachineInterface
+ properties:
+ virtual_machine_interface_properties:
+ {
+ virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam },
+ }
+ port_tuple_refs: [{ get_param: template_PortTuple_LB1 }]
+ security_group_refs: [{ get_param: oam_sec_group_name}]
+
+ jsa_net4:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: {get_param: nems_traffic_name}
+
+ jsa_net5:
+ properties:
+ name: aaa
+ network_ipam_refs_data:
+ -
+ network_ipam_refs_data_ipam_subnets:
+ -
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_param: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ type: "OS::ContrailV2::VirtualNetwork" \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..71dbe1a8c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,203 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ template_PortTuple_LB1:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ lb_st_interface_type_oam:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ oam_sec_group_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ nems_traffic_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ network_ipam_refs_data_ipam_subnets_addr_from_start_true:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ jsa_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ node_templates:
+ jsa_net3:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork
+ properties:
+ network_ipam_refs_data:
+ - network_ipam_refs_data_ipam_subnets:
+ - network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_name: aaa
+ jsa_net2:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork
+ properties:
+ network_ipam_refs_data:
+ - network_ipam_refs_data_ipam_subnets:
+ - network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_name: aaa
+ jsa_net4:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ network_name:
+ get_input: nems_traffic_name
+ template_VMInt_OAM_lb_1:
+ type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface
+ properties:
+ security_group_refs:
+ - get_input: oam_sec_group_name
+ virtual_network_refs:
+ - jsa_net1
+ virtual_machine_interface_properties:
+ virtual_machine_interface_properties_service_interface_type:
+ get_input: lb_st_interface_type_oam
+ port_tuple_refs:
+ - get_input: template_PortTuple_LB1
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: jsa_net1
+ relationship: tosca.relationships.network.LinksTo
+ template_VMInt_OAM_lb_2:
+ type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface
+ properties:
+ security_group_refs:
+ - get_input: oam_sec_group_name
+ virtual_network_refs:
+ - list_join:
+ - ':'
+ - get_attribute:
+ - jsa_net2
+ - fq_name
+ virtual_machine_interface_properties:
+ virtual_machine_interface_properties_service_interface_type:
+ get_input: lb_st_interface_type_oam
+ port_tuple_refs:
+ - get_input: template_PortTuple_LB1
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: jsa_net2
+ relationship: tosca.relationships.network.LinksTo
+ jsa_net1:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork
+ properties:
+ network_ipam_refs_data:
+ - network_ipam_refs_data_ipam_subnets:
+ - network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_name: aaa
+ template_VMInt_OAM_lb_3:
+ type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface
+ properties:
+ security_group_refs:
+ - get_input: oam_sec_group_name
+ virtual_network_refs:
+ - get_attribute:
+ - jsa_net3
+ - fq_name
+ virtual_machine_interface_properties:
+ virtual_machine_interface_properties_service_interface_type:
+ get_input: lb_st_interface_type_oam
+ port_tuple_refs:
+ - get_input: template_PortTuple_LB1
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: jsa_net3
+ relationship: tosca.relationships.network.LinksTo
+ template_VMInt_OAM_lb_4:
+ type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface
+ properties:
+ security_group_refs:
+ - get_input: oam_sec_group_name
+ virtual_network_refs:
+ - get_attribute:
+ - jsa_net4
+ - fq_name
+ virtual_machine_interface_properties:
+ virtual_machine_interface_properties_service_interface_type:
+ get_input: lb_st_interface_type_oam
+ port_tuple_refs:
+ - get_input: template_PortTuple_LB1
+ groups:
+ hot_template:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot_template.yml
+ description: cmaui server template for vMMSC
+ members:
+ - jsa_net3
+ - jsa_net2
+ - jsa_net4
+ - template_VMInt_OAM_lb_1
+ - template_VMInt_OAM_lb_2
+ - jsa_net1
+ - template_VMInt_OAM_lb_3
+ - template_VMInt_OAM_lb_4 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..70cdc7d237
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/inputfiles/MANIFEST.json
@@ -0,0 +1,11 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volumes",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot_template.yml",
+ "type": "HEAT"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/inputfiles/hot_template.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/inputfiles/hot_template.yml
new file mode 100644
index 0000000000..b771be1c0a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/inputfiles/hot_template.yml
@@ -0,0 +1,128 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ network_ipam_refs_data_ipam_subnets_addr_from_start_true:
+ description: dummy
+ type: string
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2:
+ description: dummy
+ type: string
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2:
+ description: dummy
+ type: string
+ lb_st_interface_type_oam:
+ description: dummy
+ type: string
+ template_PortTuple_LB1:
+ description: dummy
+ type: string
+ oam_sec_group_name:
+ description: dummy
+ type: string
+ jsa_net_name:
+ description: dummy
+ type: string
+ nems_traffic_name:
+ description: dummy
+ type: string
+
+resources:
+ template_VMInt_OAM_lb_1:
+ type: OS::ContrailV2::VirtualMachineInterface
+ properties:
+ virtual_machine_interface_properties:
+ {
+ virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam },
+ }
+ virtual_network_refs: [{ get_resource: jsa_net1 }]
+ port_tuple_refs: [{ get_param: template_PortTuple_LB1 }]
+ security_group_refs: [{ get_param: oam_sec_group_name}]
+
+ jsa_net1:
+ properties:
+ name: aaa
+ network_ipam_refs_data:
+ -
+ network_ipam_refs_data_ipam_subnets:
+ -
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_param: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ type: "OS::ContrailV2::VirtualNetwork"
+
+ template_VMInt_OAM_lb_2:
+ type: OS::ContrailV2::VirtualMachineInterface
+ properties:
+ virtual_machine_interface_properties:
+ {
+ virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam },
+ }
+ virtual_network_refs: [ { list_join: [':', { get_attr: [ jsa_net2, fq_name ] } ] }]
+ port_tuple_refs: [{ get_param: template_PortTuple_LB1 }]
+ security_group_refs: [{ get_param: oam_sec_group_name}]
+
+ jsa_net2:
+ properties:
+ name: aaa
+ network_ipam_refs_data:
+ -
+ network_ipam_refs_data_ipam_subnets:
+ -
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_param: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ type: "OS::ContrailV2::VirtualNetwork"
+
+ template_VMInt_OAM_lb_3:
+ type: OS::ContrailV2::VirtualMachineInterface
+ properties:
+ virtual_machine_interface_properties:
+ {
+ virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam },
+ }
+ virtual_network_refs: [{ get_attr: [ jsa_net3, fq_name ] } ]
+ port_tuple_refs: [{ get_param: template_PortTuple_LB1 }]
+ security_group_refs: [{ get_param: oam_sec_group_name}]
+
+ jsa_net3:
+ properties:
+ name: aaa
+ network_ipam_refs_data:
+ -
+ network_ipam_refs_data_ipam_subnets:
+ -
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_param: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ type: "OS::ContrailV2::VirtualNetwork"
+
+ template_VMInt_OAM_lb_4:
+ type: OS::ContrailV2::VirtualMachineInterface
+ properties:
+ virtual_machine_interface_properties:
+ {
+ virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam },
+ }
+ virtual_network_refs: [{ get_attr: [ jsa_net4, fq_name ] } ] # should not connect to contrail network
+ port_tuple_refs: [{ get_param: template_PortTuple_LB1 }]
+ security_group_refs: [{ get_param: oam_sec_group_name}]
+
+ jsa_net4:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: {get_param: nems_traffic_name}
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/AbstractSubstituteGlobalTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/AbstractSubstituteGlobalTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..f94194186f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/AbstractSubstituteGlobalTypesServiceTemplate.yaml
@@ -0,0 +1,88 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: AbstractSubstituteGlobalTypes
+ template_version: 1.0.0
+description: Abstract Substitute Global Types
+imports:
+ common_definitions:
+ file: CommonGlobalTypesServiceTemplate.yaml
+data_types:
+ org.openecomp.datatypes.heat.substitution.SubstitutionFiltering:
+ derived_from: tosca.datatypes.Root
+ description: Substitution Filter
+ properties:
+ substitute_service_template:
+ type: string
+ description: Substitute Service Template
+ required: true
+ status: SUPPORTED
+ index_value:
+ type: integer
+ description: Index value of the substitution service template runtime instance
+ required: false
+ default: 0
+ status: SUPPORTED
+ constraints:
+ - greater_or_equal: 0
+ count:
+ type: string
+ description: Count
+ required: false
+ default: 1
+ status: SUPPORTED
+ scaling_enabled:
+ type: boolean
+ description: Indicates whether service scaling is enabled
+ required: false
+ default: true
+ status: SUPPORTED
+ mandatory:
+ type: boolean
+ description: Mandatory
+ required: false
+ default: true
+ status: SUPPORTED
+ org.openecomp.datatypes.heat.substitution.SubstitutionFilter:
+ derived_from: tosca.datatypes.Root
+ description: Substitution Filter
+ properties:
+ substitute_service_template:
+ type: string
+ description: Substitute Service Template
+ required: true
+ status: SUPPORTED
+ index_variable:
+ type: string
+ description: Index variable
+ required: false
+ default: '%index%'
+ status: SUPPORTED
+ constraints:
+ - min_length: 3
+ count:
+ type: string
+ description: Count
+ required: false
+ default: 1
+ status: SUPPORTED
+ scaling_enabled:
+ type: boolean
+ description: Indicates whether service scaling is enabled
+ required: false
+ default: true
+ status: SUPPORTED
+ mandatory:
+ type: boolean
+ description: Mandatory
+ required: false
+ default: true
+ status: SUPPORTED
+node_types:
+ org.openecomp.resource.abstract.nodes.AbstractSubstitute:
+ derived_from: tosca.nodes.Root
+ properties:
+ service_template_filter:
+ type: org.openecomp.datatypes.heat.substitution.SubstitutionFiltering
+ description: Substitution Filter
+ required: true
+ status: SUPPORTED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/CinderVolumeGlobalTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/CinderVolumeGlobalTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..03add7648e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/CinderVolumeGlobalTypesServiceTemplate.yaml
@@ -0,0 +1,178 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: CinderVolumeGlobalTypes
+ template_version: 1.0.0
+description: Cinder Volume TOSCA Global Types
+relationship_types:
+ org.openecomp.relationships.heat.cinder.VolumeAttachesTo:
+ derived_from: tosca.relationships.AttachesTo
+ description: This type represents an attachment relationship for associating volume
+ properties:
+ volume_id:
+ type: string
+ description: The ID of the volume to be attached
+ required: true
+ status: SUPPORTED
+ location:
+ type: string
+ description: The location where the volume is exposed on the instance, mountpoint
+ required: false
+ status: SUPPORTED
+ instance_uuid:
+ type: string
+ description: The ID of the server to which the volume attaches
+ required: true
+ status: SUPPORTED
+ attributes:
+ show:
+ type: string
+ description: Detailed information about resource
+ status: SUPPORTED
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cinder.Volume:
+ derived_from: tosca.nodes.BlockStorage
+ properties:
+ availability_zone:
+ type: string
+ description: The availability zone in which the volume will be created
+ required: false
+ status: SUPPORTED
+ image:
+ type: string
+ description: If specified, the name or ID of the image to create the volume from
+ required: false
+ status: SUPPORTED
+ metadata:
+ type: map
+ description: Key/value pairs to associate with the volume
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ volume_type:
+ type: string
+ description: If specified, the type of volume to use, mapping to a specific backend
+ required: false
+ status: SUPPORTED
+ description:
+ type: string
+ description: A description of the volume
+ required: false
+ status: SUPPORTED
+ device_type:
+ type: string
+ description: Device type
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - cdrom
+ - disk
+ disk_bus:
+ type: string
+ description: 'Bus of the device: hypervisor driver chooses a suitable default
+ if omitted'
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - ide
+ - lame_bus
+ - scsi
+ - usb
+ - virtio
+ backup_id:
+ type: string
+ description: If specified, the backup to create the volume from
+ required: false
+ status: SUPPORTED
+ source_volid:
+ type: string
+ description: If specified, the volume to use as source
+ required: false
+ status: SUPPORTED
+ boot_index:
+ type: integer
+ description: Integer used for ordering the boot disks
+ required: false
+ status: SUPPORTED
+ size:
+ type: scalar-unit.size
+ description: The requested storage size (default unit is MB)
+ required: false
+ status: SUPPORTED
+ constraints:
+ - greater_or_equal: 1 GB
+ read_only:
+ type: boolean
+ description: Enables or disables read-only access mode of volume
+ required: false
+ status: SUPPORTED
+ name:
+ type: string
+ description: A name used to distinguish the volume
+ required: false
+ status: SUPPORTED
+ scheduler_hints:
+ type: map
+ description: Arbitrary key-value pairs specified by the client to help the Cinder scheduler creating a volume
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ swap_size:
+ type: scalar-unit.size
+ description: The size of the swap, in MB
+ required: false
+ status: SUPPORTED
+ delete_on_termination:
+ type: boolean
+ description: Indicate whether the volume should be deleted when the server is terminated
+ required: false
+ status: SUPPORTED
+ multiattach:
+ type: boolean
+ description: Whether allow the volume to be attached more than once
+ required: false
+ status: SUPPORTED
+ attributes:
+ display_description:
+ type: string
+ description: Description of the volume
+ status: SUPPORTED
+ attachments:
+ type: string
+ description: The list of attachments of the volume
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ encrypted:
+ type: boolean
+ description: Boolean indicating if the volume is encrypted or not
+ status: SUPPORTED
+ show:
+ type: string
+ description: Detailed information about resource
+ status: SUPPORTED
+ created_at:
+ type: timestamp
+ description: The timestamp indicating volume creation
+ status: SUPPORTED
+ display_name:
+ type: string
+ description: Name of the volume
+ status: SUPPORTED
+ metadata_values:
+ type: map
+ description: Key/value pairs associated with the volume in raw dict form
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ bootable:
+ type: boolean
+ description: Boolean indicating if the volume can be booted or not
+ status: SUPPORTED
+ status:
+ type: string
+ description: The current status of the volume
+ status: SUPPORTED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/CommonGlobalTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/CommonGlobalTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..4feb78f371
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/CommonGlobalTypesServiceTemplate.yaml
@@ -0,0 +1,354 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: CommonGlobalTypes
+ template_version: 1.0.0
+description: TOSCA Global Types
+imports:
+ NativeTypesServiceTemplate:
+ file: NativeTypesServiceTemplateServiceTemplate.yaml
+data_types:
+ org.openecomp.datatypes.heat.network.AddressPair:
+ derived_from: tosca.datatypes.Root
+ description: MAC/IP address pairs
+ properties:
+ mac_address:
+ type: string
+ description: MAC address
+ required: false
+ status: SUPPORTED
+ ip_address:
+ type: string
+ description: IP address
+ required: false
+ status: SUPPORTED
+ org.openecomp.datatypes.heat.network.AllocationPool:
+ derived_from: tosca.datatypes.Root
+ description: The start and end addresses for the allocation pool
+ properties:
+ start:
+ type: string
+ description: Start address for the allocation pool
+ required: false
+ status: SUPPORTED
+ end:
+ type: string
+ description: End address for the allocation pool
+ required: false
+ status: SUPPORTED
+ org.openecomp.datatypes.heat.network.contrail.AddressPair:
+ derived_from: tosca.datatypes.Root
+ description: Address Pair
+ properties:
+ address_mode:
+ type: string
+ description: Address mode active-active or active-standy
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - active-active
+ - active-standby
+ prefix:
+ type: string
+ description: IP address prefix
+ required: false
+ status: SUPPORTED
+ mac_address:
+ type: string
+ description: Mac address
+ required: false
+ status: SUPPORTED
+ org.openecomp.datatypes.heat.network.subnet.HostRoute:
+ derived_from: tosca.datatypes.Root
+ description: Host route info for the subnet
+ properties:
+ destination:
+ type: string
+ description: The destination for static route
+ required: false
+ status: SUPPORTED
+ nexthop:
+ type: string
+ description: The next hop for the destination
+ required: false
+ status: SUPPORTED
+ org.openecomp.datatypes.heat.network.contrail.port.StaticRoute:
+ derived_from: tosca.datatypes.Root
+ description: static route
+ properties:
+ prefix:
+ type: string
+ description: Route prefix
+ required: false
+ status: SUPPORTED
+ next_hop:
+ type: string
+ description: Next hop
+ required: false
+ status: SUPPORTED
+ next_hop_type:
+ type: string
+ description: Next hop type
+ required: false
+ status: SUPPORTED
+ org.openecomp.datatypes.heat.network.neutron.Subnet:
+ derived_from: tosca.datatypes.Root
+ description: A subnet represents an IP address block that can be used for assigning IP addresses to virtual instances
+ properties:
+ tenant_id:
+ type: string
+ description: The ID of the tenant who owns the network
+ required: false
+ status: SUPPORTED
+ enable_dhcp:
+ type: boolean
+ description: Set to true if DHCP is enabled and false if DHCP is disabled
+ required: false
+ default: true
+ status: SUPPORTED
+ ipv6_address_mode:
+ type: string
+ description: IPv6 address mode
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - dhcpv6-stateful
+ - dhcpv6-stateless
+ - slaac
+ ipv6_ra_mode:
+ type: string
+ description: IPv6 RA (Router Advertisement) mode
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - dhcpv6-stateful
+ - dhcpv6-stateless
+ - slaac
+ value_specs:
+ type: map
+ description: Extra parameters to include in the request
+ required: false
+ default: {
+ }
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ allocation_pools:
+ type: list
+ description: The start and end addresses for the allocation pools
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.AllocationPool
+ subnetpool:
+ type: string
+ description: The name or ID of the subnet pool
+ required: false
+ status: SUPPORTED
+ dns_nameservers:
+ type: list
+ description: A specified set of DNS name servers to be used
+ required: false
+ default: [
+ ]
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ host_routes:
+ type: list
+ description: The gateway IP address
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.subnet.HostRoute
+ ip_version:
+ type: integer
+ description: The gateway IP address
+ required: false
+ default: 4
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - '4'
+ - '6'
+ name:
+ type: string
+ description: The name of the subnet
+ required: false
+ status: SUPPORTED
+ prefixlen:
+ type: integer
+ description: Prefix length for subnet allocation from subnet pool
+ required: false
+ status: SUPPORTED
+ constraints:
+ - greater_or_equal: 0
+ cidr:
+ type: string
+ description: The CIDR
+ required: false
+ status: SUPPORTED
+ gateway_ip:
+ type: string
+ description: The gateway IP address
+ required: false
+ status: SUPPORTED
+capability_types:
+ org.openecomp.capabilities.metric.SnmpTrap:
+ derived_from: org.openecomp.capabilities.Metric
+ description: A node type that includes the Metric capability indicates that it can be monitored using snmp trap.
+ properties:
+ oid:
+ type: string
+ description: Object Id of the metric
+ required: true
+ status: SUPPORTED
+ org.openecomp.capabilities.metric.SnmpPolling:
+ derived_from: org.openecomp.capabilities.Metric
+ description: A node type that includes the Metric capability indicates that it can be monitored using snmp polling.
+ properties:
+ oid:
+ type: string
+ description: Object Id of the metric
+ required: true
+ status: SUPPORTED
+ org.openecomp.capabilities.metric.Ceilometer:
+ derived_from: org.openecomp.capabilities.Metric
+ description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+ properties:
+ name:
+ type: string
+ description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+ required: true
+ status: SUPPORTED
+ org.openecomp.capabilities.Metric:
+ derived_from: tosca.capabilities.nfv.Metric
+ description: A node type that includes the Metric capability indicates that it can be monitored.
+ properties:
+ unit:
+ type: string
+ description: Unit of the metric value
+ required: true
+ status: SUPPORTED
+ description:
+ type: string
+ description: Description of the metric
+ required: false
+ status: SUPPORTED
+ type:
+ type: string
+ description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+ required: true
+ status: SUPPORTED
+ category:
+ type: string
+ description: Category of the metric, for an example, compute, disk, network, storage and etc.
+ required: false
+ status: SUPPORTED
+ attributes:
+ value:
+ type: string
+ description: Runtime monitored value
+ status: SUPPORTED
+relationship_types:
+ org.openecomp.relationships.AttachesTo:
+ derived_from: tosca.relationships.Root
+ description: This type represents an attachment relationship
+group_types:
+ org.openecomp.groups.heat.HeatStack:
+ derived_from: tosca.groups.Root
+ description: Grouped all heat resources which are in the same heat stack
+ properties:
+ heat_file:
+ type: string
+ description: Heat file which associate to this group/heat stack
+ required: true
+ status: SUPPORTED
+ description:
+ type: string
+ description: Heat file description
+ required: false
+ status: SUPPORTED
+policy_types:
+ org.openecomp.policies.placement.valet.Exclusivity:
+ derived_from: tosca.policy.placement
+ description: Valet Exclusivity
+ properties:
+ level:
+ type: string
+ description: exclusivity
+ required: false
+ default: host
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - host
+ - rack
+ org.openecomp.policies.placement.valet.Diversity:
+ derived_from: tosca.policy.placement
+ description: Valet Diversity
+ properties:
+ level:
+ type: string
+ description: diversity
+ required: false
+ default: host
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - host
+ - rack
+ org.openecomp.policies.placement.Colocate:
+ derived_from: tosca.policy.placement
+ description: Keep associated nodes (groups of nodes) based upon affinity value
+ properties:
+ name:
+ type: string
+ description: The name of the policy
+ required: false
+ status: SUPPORTED
+ affinity:
+ type: string
+ description: affinity
+ required: true
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - host
+ - region
+ - compute
+ org.openecomp.policies.placement.valet.Affinity:
+ derived_from: tosca.policy.placement
+ description: Valet Affinity
+ properties:
+ level:
+ type: string
+ description: affinity
+ required: false
+ default: host
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - host
+ - rack
+ org.openecomp.policies.placement.Antilocate:
+ derived_from: tosca.policy.placement
+ description: My placement policy for separation based upon container type value
+ properties:
+ name:
+ type: string
+ description: The name of the policy
+ required: false
+ status: SUPPORTED
+ container_type:
+ type: string
+ description: container type
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - host
+ - region
+ - compute \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..ae5430cf8d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
@@ -0,0 +1,166 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: ContrailAbstractSubstituteGlobalTypes
+ template_version: 1.0.0
+description: Contrail Abstract Substitute Global Types
+imports:
+ common_definitions:
+ file: CommonGlobalTypesServiceTemplate.yaml
+data_types:
+ org.openecomp.datatypes.heat.network.contrail.InterfaceData:
+ derived_from: tosca.datatypes.Root
+ description: Interface Data
+ properties:
+ static_routes:
+ type: list
+ description: An ordered list of static routes to be added to this interface
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.contrail.port.StaticRoute
+ virtual_network:
+ type: string
+ description: Virtual Network for this interface
+ required: true
+ status: SUPPORTED
+ allowed_address_pairs:
+ type: list
+ description: List of allowed address pair for this interface
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.contrail.AddressPair
+ ip_address:
+ type: string
+ description: IP for this interface
+ required: false
+ status: SUPPORTED
+node_types:
+ org.openecomp.resource.abstract.nodes.contrail.AbstractSubstitute:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ availability_zone:
+ type: string
+ description: Availability zone to create servers in
+ required: false
+ status: SUPPORTED
+ static_routes_list:
+ type: list
+ description: Static routes enabled
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: boolean
+ availability_zone_enable:
+ type: boolean
+ description: Indicates availability zone is enabled
+ required: false
+ default: false
+ status: SUPPORTED
+ service_template_name:
+ type: string
+ description: Service template name
+ required: false
+ status: SUPPORTED
+ ordered_interfaces:
+ type: boolean
+ description: Indicates if service interface are ordered
+ required: false
+ default: false
+ status: SUPPORTED
+ flavor:
+ type: string
+ description: flavor
+ required: false
+ status: SUPPORTED
+ image_name:
+ type: string
+ description: Image name
+ required: true
+ status: SUPPORTED
+ service_type:
+ type: string
+ description: Service type
+ required: true
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - firewall
+ - analyzer
+ - source-nat
+ - loadbalancer
+ service_interface_type_list:
+ type: list
+ description: List of interface types
+ required: true
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ constraints:
+ - valid_values:
+ - management
+ - left
+ - right
+ - other
+ service_instance_name:
+ type: string
+ description: Service instance name
+ required: true
+ status: SUPPORTED
+ interface_list:
+ type: list
+ description: List of interfaces
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.contrail.InterfaceData
+ service_mode:
+ type: string
+ description: Service mode
+ required: true
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - transparent
+ - in-network
+ - in-network-nat
+ shared_ip_list:
+ type: list
+ description: Shared ips enabled
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: boolean
+ attributes:
+ tenant_id:
+ type: string
+ description: Tenant id of the Service Instance
+ status: SUPPORTED
+ fq_name:
+ type: string
+ description: The FQ name of the service instance
+ status: SUPPORTED
+ service_template_name:
+ type: string
+ description: Service Template of the Service Instance
+ status: SUPPORTED
+ show:
+ type: string
+ description: All attributes
+ status: SUPPORTED
+ active_vms:
+ type: string
+ description: Number of service VMs active for this Service Instance
+ status: SUPPORTED
+ service_instance_name:
+ type: string
+ description: The name of the service instance
+ status: SUPPORTED
+ virtual_machines:
+ type: string
+ description: Service VMs for the Service Instance
+ status: SUPPORTED
+ status:
+ type: string
+ description: Status of the service instance
+ status: SUPPORTED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailComputeGlobalTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailComputeGlobalTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..d6ad4f953c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailComputeGlobalTypesServiceTemplate.yaml
@@ -0,0 +1,89 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: ContrailComputeGlobalTypes
+ template_version: 1.0.0
+description: Contrail Compute TOSCA Global Types
+imports:
+ common_definitions:
+ file: CommonGlobalTypesServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.contrail.Compute:
+ derived_from: tosca.nodes.Compute
+ properties:
+ flavor:
+ type: string
+ description: flavor
+ required: false
+ status: SUPPORTED
+ image_name:
+ type: string
+ description: Image name
+ required: true
+ status: SUPPORTED
+ availability_zone:
+ type: string
+ description: Availability zone to create servers in
+ required: false
+ status: SUPPORTED
+ service_type:
+ type: string
+ description: Service type
+ required: true
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - firewall
+ - analyzer
+ - source-nat
+ - loadbalancer
+ availability_zone_enable:
+ type: boolean
+ description: Indicates availability zone is enabled
+ required: false
+ default: false
+ status: SUPPORTED
+ service_template_name:
+ type: string
+ description: Service template name
+ required: false
+ status: SUPPORTED
+ service_instance_name:
+ type: string
+ description: Service instance name
+ required: true
+ status: SUPPORTED
+ service_mode:
+ type: string
+ description: Service mode
+ required: true
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - transparent
+ - in-network
+ - in-network-nat
+ attributes:
+ tenant_id:
+ type: string
+ description: Tenant id of the VM
+ status: SUPPORTED
+ fq_name:
+ type: string
+ description: fq_name
+ status: SUPPORTED
+ show:
+ type: string
+ description: All attributes
+ status: SUPPORTED
+ active_vms:
+ type: string
+ description: Number of active VMs
+ status: SUPPORTED
+ virtual_machines:
+ type: string
+ description: VMs of this compute
+ status: SUPPORTED
+ status:
+ type: string
+ description: status of the compute
+ status: SUPPORTED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailNetworkRuleGlobalTypeServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
new file mode 100644
index 0000000000..1cbf435c53
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
@@ -0,0 +1,131 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: ContrailNetworkRuleGlobalType
+ template_version: 1.0.0
+description: Contrail Network Rule Global Types
+imports:
+ common_definitions:
+ file: CommonGlobalTypesServiceTemplate.yaml
+data_types:
+ org.openecomp.datatypes.heat.contrail.network.rule.PortPairs:
+ derived_from: tosca.datatypes.Root
+ description: source and destination port pairs
+ properties:
+ start_port:
+ type: string
+ description: Start port
+ required: false
+ status: SUPPORTED
+ end_port:
+ type: string
+ description: End port
+ required: false
+ status: SUPPORTED
+ org.openecomp.datatypes.heat.contrail.network.rule.VirtualNetwork:
+ derived_from: tosca.datatypes.Root
+ description: source and destination addresses
+ properties:
+ virtual_network:
+ type: string
+ description: Virtual network
+ required: false
+ status: SUPPORTED
+ org.openecomp.datatypes.heat.contrail.network.rule.RuleList:
+ derived_from: tosca.datatypes.Root
+ description: list of policy rules
+ properties:
+ policy_rule:
+ type: list
+ description: Contrail network rule
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.contrail.network.rule.Rule
+ org.openecomp.datatypes.heat.contrail.network.rule.Rule:
+ derived_from: tosca.datatypes.Root
+ description: policy rule
+ properties:
+ src_ports:
+ type: list
+ description: Source ports
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.contrail.network.rule.PortPairs
+ protocol:
+ type: string
+ description: Protocol
+ required: false
+ status: SUPPORTED
+ dst_addresses:
+ type: list
+ description: Destination addresses
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.contrail.network.rule.VirtualNetwork
+ apply_service:
+ type: string
+ description: Service to apply
+ required: false
+ status: SUPPORTED
+ dst_ports:
+ type: list
+ description: Destination ports
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.contrail.network.rule.PortPairs
+ src_addresses:
+ type: list
+ description: Source addresses
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.contrail.network.rule.VirtualNetwork
+ direction:
+ type: string
+ description: Direction
+ required: false
+ status: SUPPORTED
+node_types:
+ org.openecomp.resource.vfc.rules.nodes.heat.network.contrail.NetworkRules:
+ derived_from: tosca.nodes.Root
+ properties:
+ entries:
+ type: org.openecomp.datatypes.heat.contrail.network.rule.RuleList
+ description: A symbolic name for this contrail network rule
+ required: false
+ status: SUPPORTED
+ name:
+ type: string
+ description: A symbolic name for this contrail network rule
+ required: false
+ status: SUPPORTED
+ attributes:
+ tenant_id:
+ type: string
+ description: tenant_id
+ status: SUPPORTED
+ fq_name:
+ type: string
+ description: fq_name
+ status: SUPPORTED
+ show:
+ type: string
+ description: All attributes.
+ status: SUPPORTED
+ rules:
+ type: list
+ description: List of rules
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ requirements:
+ - network:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.network.Network
+ relationship: org.openecomp.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailPortGlobalTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailPortGlobalTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..429ed9f6a1
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailPortGlobalTypesServiceTemplate.yaml
@@ -0,0 +1,64 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: ContrailPortGlobalTypes
+ template_version: 1.0.0
+description: Contrail Port TOSCA Global Types
+imports:
+ common_definitions:
+ file: CommonGlobalTypesServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.cp.nodes.heat.network.contrail.Port:
+ derived_from: tosca.nodes.network.Port
+ properties:
+ static_routes:
+ type: list
+ description: An ordered list of static routes to be added to this interface
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.contrail.port.StaticRoute
+ virtual_network:
+ type: string
+ description: Virtual Network for this interface
+ required: true
+ status: SUPPORTED
+ static_route:
+ type: boolean
+ description: Static route enabled
+ required: false
+ default: false
+ status: SUPPORTED
+ allowed_address_pairs:
+ type: list
+ description: List of allowed address pair for this interface
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.contrail.AddressPair
+ shared_ip:
+ type: boolean
+ description: Shared ip enabled
+ required: false
+ default: false
+ status: SUPPORTED
+ ip_address:
+ type: string
+ description: IP for this interface
+ required: false
+ status: SUPPORTED
+ interface_type:
+ type: string
+ description: Interface type
+ required: true
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - management
+ - left
+ - right
+ - other
+ attributes:
+ fq_name:
+ type: string
+ description: fq_name
+ status: SUPPORTED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailV2NetworkRuleGlobalTypeServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailV2NetworkRuleGlobalTypeServiceTemplate.yaml
new file mode 100644
index 0000000000..0526291005
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailV2NetworkRuleGlobalTypeServiceTemplate.yaml
@@ -0,0 +1,156 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: ContrailV2NetworkRuleGlobalType
+ template_version: 1.0.0
+description: Contrail V2 Network Rule Global Types
+imports:
+ common_definitions:
+ file: CommonGlobalTypesServiceTemplate.yaml
+data_types:
+ org.openecomp.datatypes.heat.contrailV2.network.rule.DstPortPairs:
+ derived_from: tosca.datatypes.Root
+ description: destination port pairs
+ properties:
+ network_policy_entries_policy_rule_dst_ports_start_port:
+ type: string
+ description: Start port
+ required: false
+ status: SUPPORTED
+ network_policy_entries_policy_rule_dst_ports_end_port:
+ type: string
+ description: End port
+ required: false
+ status: SUPPORTED
+ org.openecomp.datatypes.heat.contrailV2.network.rule.RuleList:
+ derived_from: tosca.datatypes.Root
+ description: list of policy rules
+ properties:
+ network_policy_entries_policy_rule:
+ type: list
+ description: Contrail network rule
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.contrailV2.network.rule.Rule
+ org.openecomp.datatypes.heat.contrailV2.network.rule.SrcPortPairs:
+ derived_from: tosca.datatypes.Root
+ description: source port pairs
+ properties:
+ network_policy_entries_policy_rule_src_ports_start_port:
+ type: string
+ description: Start port
+ required: false
+ status: SUPPORTED
+ network_policy_entries_policy_rule_src_ports_end_port:
+ type: string
+ description: End port
+ required: false
+ status: SUPPORTED
+ org.openecomp.datatypes.heat.contrailV2.network.rule.SrcVirtualNetwork:
+ derived_from: tosca.datatypes.Root
+ description: source addresses
+ properties:
+ network_policy_entries_policy_rule_src_addresses_virtual_network:
+ type: string
+ description: Source addresses Virtual network
+ required: false
+ status: SUPPORTED
+ org.openecomp.datatypes.heat.contrailV2.network.rule.DstVirtualNetwork:
+ derived_from: tosca.datatypes.Root
+ description: destination addresses
+ properties:
+ network_policy_entries_policy_rule_dst_addresses_virtual_network:
+ type: string
+ description: Destination addresses Virtual network
+ required: false
+ status: SUPPORTED
+ org.openecomp.datatypes.heat.contrailV2.network.rule.ActionList:
+ derived_from: tosca.datatypes.Root
+ description: Action List
+ properties:
+ network_policy_entries_policy_rule_action_list_simple_action:
+ type: string
+ description: Simple Action
+ required: false
+ status: SUPPORTED
+ network_policy_entries_policy_rule_action_list_apply_service:
+ type: list
+ description: Apply Service
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ org.openecomp.datatypes.heat.contrailV2.network.rule.Rule:
+ derived_from: tosca.datatypes.Root
+ description: policy rule
+ properties:
+ network_policy_entries_policy_rule_dst_addresses:
+ type: list
+ description: Destination addresses
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.contrailV2.network.rule.DstVirtualNetwork
+ network_policy_entries_policy_rule_dst_ports:
+ type: list
+ description: Destination ports
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.contrailV2.network.rule.DstPortPairs
+ network_policy_entries_policy_rule_protocol:
+ type: string
+ description: Protocol
+ required: false
+ status: SUPPORTED
+ network_policy_entries_policy_rule_src_addresses:
+ type: list
+ description: Source addresses
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.contrailV2.network.rule.SrcVirtualNetwork
+ network_policy_entries_policy_rule_direction:
+ type: string
+ description: Direction
+ required: false
+ status: SUPPORTED
+ network_policy_entries_policy_rule_src_ports:
+ type: list
+ description: Source ports
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.contrailV2.network.rule.SrcPortPairs
+ network_policy_entries_policy_rule_action_list:
+ type: org.openecomp.datatypes.heat.contrailV2.network.rule.ActionList
+ description: Action list
+ required: false
+ status: SUPPORTED
+node_types:
+ org.openecomp.resource.vfc.rules.nodes.heat.network.contrailV2.NetworkRules:
+ derived_from: tosca.nodes.Root
+ properties:
+ name:
+ type: string
+ description: A symbolic name for this contrail v2 network rule
+ required: false
+ status: SUPPORTED
+ network_policy_entries:
+ type: org.openecomp.datatypes.heat.contrailV2.network.rule.RuleList
+ description: A symbolic name for this contrail v2 network rule
+ required: false
+ status: SUPPORTED
+ attributes:
+ fq_name:
+ type: string
+ description: fq_name
+ status: SUPPORTED
+ requirements:
+ - network:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.network.Network
+ relationship: org.openecomp.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
new file mode 100644
index 0000000000..5c4a58fb11
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
@@ -0,0 +1,69 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: ContrailV2VirtualMachineInterfaceGlobalType
+ template_version: 1.0.0
+description: Contrail Virtual Machine Interface TOSCA Global Types
+imports:
+ common_definitions:
+ file: CommonGlobalTypesServiceTemplate.yaml
+data_types:
+ org.openecomp.datatypes.heat.contrailV2.virtual.machine.interface.Properties:
+ derived_from: tosca.datatypes.Root
+ description: Virtual Machine Interface Properties.
+ properties:
+ virtual_machine_interface_properties_service_interface_type:
+ type: string
+ description: Service Interface Type.
+ required: false
+ status: SUPPORTED
+node_types:
+ org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface:
+ derived_from: tosca.nodes.network.Port
+ properties:
+ virtual_machine_intefrace_mac_addresses:
+ type: list
+ description: List of mac addresses.
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ name:
+ type: string
+ description: Virtual Machine Interface name
+ required: false
+ status: SUPPORTED
+ security_group_refs:
+ type: list
+ description: List of security groups.
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ virtual_network_refs:
+ type: list
+ description: List of virtual networks.
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ virtual_machine_interface_properties:
+ type: org.openecomp.datatypes.heat.contrailV2.virtual.machine.interface.Properties
+ description: virtual machine interface properties.
+ required: false
+ status: SUPPORTED
+ port_tuple_refs:
+ type: list
+ description: List of port tuples.
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ attributes:
+ fq_name:
+ type: string
+ description: The FQ name of the Virtual Network.
+ status: SUPPORTED
+ show:
+ type: string
+ description: All attributes.
+ status: SUPPORTED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailV2VirtualNetworkGlobalTypeServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailV2VirtualNetworkGlobalTypeServiceTemplate.yaml
new file mode 100644
index 0000000000..b950edf79f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailV2VirtualNetworkGlobalTypeServiceTemplate.yaml
@@ -0,0 +1,139 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: ContrailV2VirtualNetworkGlobalType
+ template_version: 1.0.0
+description: Contrail V2 Virtual Network Global Types
+imports:
+ common_definitions:
+ file: CommonGlobalTypesServiceTemplate.yaml
+data_types:
+ org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.ref.data.IpamSubnet:
+ derived_from: tosca.datatypes.Root
+ description: Network Ipam Ref Data Subnet
+ properties:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ type: string
+ description: Network ipam refs data ipam subnets ip prefix len
+ required: false
+ status: SUPPORTED
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ type: string
+ description: Network ipam refs data ipam subnets ip prefix
+ required: false
+ status: SUPPORTED
+ org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.RefData:
+ derived_from: tosca.datatypes.Root
+ description: network policy refs data
+ properties:
+ network_policy_refs_data_sequence:
+ type: org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.RefDataSequence
+ description: Network Policy ref data sequence
+ required: false
+ status: SUPPORTED
+ org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.IpamRefData:
+ derived_from: tosca.datatypes.Root
+ description: Network Ipam Ref Data
+ properties:
+ network_ipam_refs_data_ipam_subnets:
+ type: list
+ description: Network ipam refs data ipam subnets
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.ref.data.IpamSubnetList
+ org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.ref.data.IpamSubnetList:
+ derived_from: tosca.datatypes.Root
+ description: Network Ipam Ref Data Subnet List
+ properties:
+ network_ipam_refs_data_ipam_subnets_subnet:
+ type: org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.ref.data.IpamSubnet
+ description: Network ipam refs data ipam subnets
+ required: false
+ status: SUPPORTED
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ type: string
+ description: Network ipam refs data ipam subnets addr from start
+ required: false
+ status: SUPPORTED
+ org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.RefDataSequence:
+ derived_from: tosca.datatypes.Root
+ description: network policy refs data sequence
+ properties:
+ network_policy_refs_data_sequence_major:
+ type: integer
+ description: Network Policy ref data sequence Major
+ required: false
+ status: SUPPORTED
+ network_policy_refs_data_sequence_minor:
+ type: integer
+ description: Network Policy ref data sequence Minor
+ required: false
+ status: SUPPORTED
+node_types:
+ org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork:
+ derived_from: tosca.nodes.network.Network
+ properties:
+ network_ipam_refs_data:
+ type: list
+ description: IPAM references Data
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.IpamRefData
+ network_policy_refs_data:
+ type: list
+ description: Policy references data
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.RefData
+ network_ipam_refs:
+ type: list
+ description: IPAM references
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ network_policy_refs:
+ type: list
+ description: Policy references
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ subnets:
+ type: map
+ description: Network related subnets
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.neutron.Subnet
+ attributes:
+ fq_name:
+ type: string
+ description: fq_name
+ status: SUPPORTED
+ subnets_name:
+ type: list
+ description: Subnets name of this network
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ subnets_show:
+ type: map
+ description: Detailed information about each subnet
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ subnets:
+ type: map
+ description: Network related subnets
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.neutron.Subnet
+ capabilities:
+ attachment:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
new file mode 100644
index 0000000000..05ab81741d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
@@ -0,0 +1,84 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: ContrailVirtualNetworkGlobalType
+ template_version: 1.0.0
+description: Contrail Virtual Network Global Types
+imports:
+ common_definitions:
+ file: CommonGlobalTypesServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork:
+ derived_from: tosca.nodes.network.Network
+ properties:
+ shared:
+ type: string
+ description: Is virtual network shared
+ required: false
+ status: SUPPORTED
+ forwarding_mode:
+ type: string
+ description: forwarding mode of the virtual network
+ required: false
+ status: SUPPORTED
+ external:
+ type: string
+ description: Is virtual network external
+ required: false
+ status: SUPPORTED
+ allow_transit:
+ type: string
+ description: Whether this network should be transitive.
+ required: false
+ status: SUPPORTED
+ flood_unknown_unicast:
+ type: string
+ description: flood L2 packets on network
+ required: false
+ status: SUPPORTED
+ route_targets:
+ type: list
+ description: route targets associated with the virtual network
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ subnets:
+ type: map
+ description: Network related subnets
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.neutron.Subnet
+ attributes:
+ fq_name:
+ type: string
+ description: fq_name
+ status: SUPPORTED
+ show:
+ type: string
+ description: All attributes.
+ status: SUPPORTED
+ subnets_name:
+ type: list
+ description: Subnets name of this network
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ subnets_show:
+ type: map
+ description: Detailed information about each subnet
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ subnets:
+ type: map
+ description: Network related subnets
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.neutron.Subnet
+ capabilities:
+ attachment:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..251525391b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,196 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ cmaui_cinder_volume_size:
+ label: CMAUI Cinder volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the CMAUI Cinder volume
+ timezone:
+ label: timezone
+ hidden: false
+ immutable: false
+ type: string
+ description: timezone
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ oam_network_netmask:
+ label: oam network netmask
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ oam_network_gateway:
+ label: oam network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ label: CMAUI oam_net IP addresses
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI oam_net IP addresses
+ entry_schema:
+ type: string
+ external_dns:
+ label: dns server
+ hidden: false
+ immutable: false
+ type: string
+ description: dns server
+ oam_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ external_ntp:
+ label: ntp server
+ hidden: false
+ immutable: false
+ type: string
+ description: ntp server
+ CMAUI_volume_type:
+ label: CMAUI vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ node_templates:
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ requirements:
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: cmaui_volume
+ relationship: tosca.relationships.DependsOn
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: cmaui_port_0
+ relationship: tosca.relationships.DependsOn
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: cmaui_volume
+ relationship: cmaui_volume_attachment
+ cmaui_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'
+ cmaui_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ relationship_templates:
+ cmaui_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: cmaui_volume
+ instance_uuid: server_cmaui
+ groups:
+ hot_template:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot_template.yml
+ description: cmaui server template for vMMSC
+ members:
+ - server_cmaui
+ - cmaui_volume
+ - cmaui_port_0 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/NativeTypesServiceTemplateServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/NativeTypesServiceTemplateServiceTemplate.yaml
new file mode 100644
index 0000000000..27c64039f1
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/NativeTypesServiceTemplateServiceTemplate.yaml
@@ -0,0 +1,205 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: NativeTypesServiceTemplate
+ template_version: 1.0.0
+description: TOSCA Native Node Types
+node_types:
+ tosca.nodes.Compute:
+ derived_from: tosca.nodes.Root
+ attributes:
+ private_address:
+ type: string
+ description: private address
+ status: SUPPORTED
+ public_address:
+ type: string
+ description: public_address
+ status: SUPPORTED
+ networks:
+ type: map
+ description: networks
+ status: SUPPORTED
+ entry_schema:
+ type: tosca.datatypes.network.NetworkInfo
+ ports:
+ type: map
+ description: ports
+ status: SUPPORTED
+ entry_schema:
+ type: tosca.datatypes.network.PortInfo
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ capabilities:
+ scalable:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ tosca.nodes.network.Port:
+ derived_from: tosca.nodes.Root
+ properties:
+ ip_range_end:
+ type: string
+ required: false
+ status: SUPPORTED
+ ip_range_start:
+ type: string
+ required: false
+ status: SUPPORTED
+ ip_address:
+ type: string
+ required: false
+ status: SUPPORTED
+ is_default:
+ type: boolean
+ required: false
+ default: false
+ status: SUPPORTED
+ order:
+ type: integer
+ required: true
+ default: 0
+ status: SUPPORTED
+ constraints:
+ - greater_or_equal: 0
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.BindsTo
+ occurrences:
+ - 1
+ - 1
+ tosca.nodes.Root:
+ attributes:
+ tosca_name:
+ type: string
+ description: tosca name
+ status: SUPPORTED
+ state:
+ type: string
+ description: state
+ status: SUPPORTED
+ tosca_id:
+ type: string
+ description: tosca id
+ status: SUPPORTED
+ interfaces: {
+ }
+ tosca.nodes.network.Network:
+ derived_from: tosca.nodes.Root
+ properties:
+ physical_network:
+ type: string
+ required: false
+ status: SUPPORTED
+ dhcp_enabled:
+ type: boolean
+ required: false
+ default: true
+ status: SUPPORTED
+ segmentation_id:
+ type: string
+ required: false
+ status: SUPPORTED
+ network_id:
+ type: string
+ required: false
+ status: SUPPORTED
+ ip_version:
+ type: integer
+ required: false
+ default: 4
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - 4
+ - 6
+ start_ip:
+ type: string
+ required: false
+ status: SUPPORTED
+ network_name:
+ type: string
+ required: false
+ status: SUPPORTED
+ cidr:
+ type: string
+ required: false
+ status: SUPPORTED
+ gateway_ip:
+ type: string
+ required: false
+ status: SUPPORTED
+ network_type:
+ type: string
+ required: false
+ status: SUPPORTED
+ end_ip:
+ type: string
+ required: false
+ status: SUPPORTED
+ capabilities:
+ link:
+ type: tosca.capabilities.network.Linkable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ tosca.nodes.BlockStorage:
+ derived_from: tosca.nodes.Root
+ properties:
+ size:
+ type: scalar-unit.size
+ required: false
+ status: SUPPORTED
+ constraints:
+ - greater_or_equal: 1 MB
+ volume_id:
+ type: string
+ required: false
+ status: SUPPORTED
+ snapshot_id:
+ type: string
+ required: false
+ status: SUPPORTED
+ capabilities:
+ attachment:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/NeutronNetGlobalTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/NeutronNetGlobalTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..e80e2727c7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/NeutronNetGlobalTypesServiceTemplate.yaml
@@ -0,0 +1,97 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: NeutronNetGlobalTypes
+ template_version: 1.0.0
+description: Neutron Network TOSCA Global Types
+imports:
+ common_definitions:
+ file: CommonGlobalTypesServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vl.nodes.heat.network.neutron.Net:
+ derived_from: tosca.nodes.network.Network
+ properties:
+ dhcp_agent_ids:
+ type: list
+ description: The IDs of the DHCP agent to schedule the network
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ tenant_id:
+ type: string
+ description: The ID of the tenant which will own the network
+ required: false
+ status: SUPPORTED
+ port_security_enabled:
+ type: boolean
+ description: Flag to enable/disable port security on the network
+ required: false
+ status: SUPPORTED
+ shared:
+ type: boolean
+ description: Whether this network should be shared across all tenants
+ required: false
+ default: false
+ status: SUPPORTED
+ admin_state_up:
+ type: boolean
+ description: A boolean value specifying the administrative status of the network
+ required: false
+ default: true
+ status: SUPPORTED
+ qos_policy:
+ type: string
+ description: The name or ID of QoS policy to attach to this network
+ required: false
+ status: SUPPORTED
+ subnets:
+ type: map
+ description: Network related subnets
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.neutron.Subnet
+ value_specs:
+ type: map
+ description: Extra parameters to include in the request
+ required: false
+ default: {
+ }
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ attributes:
+ qos_policy_id:
+ type: string
+ description: The QoS policy ID attached to this network
+ status: SUPPORTED
+ show:
+ type: string
+ description: Detailed information about resource
+ status: SUPPORTED
+ subnets_name:
+ type: list
+ description: Subnets name of this network
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ subnets:
+ type: map
+ description: Network related subnets
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.neutron.Subnet
+ mtu:
+ type: scalar-unit.size
+ description: The maximum transmission unit size(in bytes) for the network
+ status: SUPPORTED
+ status:
+ type: string
+ description: The status of the network
+ status: SUPPORTED
+ capabilities:
+ attachment:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/NeutronPortGlobalTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/NeutronPortGlobalTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..a337d6ed18
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/NeutronPortGlobalTypesServiceTemplate.yaml
@@ -0,0 +1,151 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: NeutronPortGlobalTypes
+ template_version: 1.0.0
+description: Neutron Port TOSCA Global Types
+imports:
+ common_definitions:
+ file: CommonGlobalTypesServiceTemplate.yaml
+data_types:
+ org.openecomp.datatypes.heat.neutron.port.FixedIps:
+ derived_from: tosca.datatypes.Root
+ description: subnet/ip_address
+ properties:
+ subnet:
+ type: string
+ description: Subnet in which to allocate the IP address for this port
+ required: false
+ status: SUPPORTED
+ ip_address:
+ type: string
+ description: IP address desired in the subnet for this port
+ required: false
+ status: SUPPORTED
+node_types:
+ org.openecomp.resource.cp.nodes.heat.network.neutron.Port:
+ derived_from: tosca.nodes.network.Port
+ properties:
+ port_security_enabled:
+ type: boolean
+ description: Flag to enable/disable port security on the network
+ required: false
+ status: SUPPORTED
+ device_id:
+ type: string
+ description: Device ID of this port
+ required: false
+ status: SUPPORTED
+ qos_policy:
+ type: string
+ description: The name or ID of QoS policy to attach to this network
+ required: false
+ status: SUPPORTED
+ allowed_address_pairs:
+ type: list
+ description: Additional MAC/IP address pairs allowed to pass through the port
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.AddressPair
+ binding:vnic_type:
+ type: string
+ description: The vnic type to be bound on the neutron port
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - macvtap
+ - direct
+ - normal
+ value_specs:
+ type: map
+ description: Extra parameters to include in the request
+ required: false
+ default: {
+ }
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ device_owner:
+ type: string
+ description: Name of the network owning the port
+ required: false
+ status: SUPPORTED
+ network:
+ type: string
+ description: Network this port belongs to
+ required: false
+ status: SUPPORTED
+ replacement_policy:
+ type: string
+ description: Policy on how to respond to a stack-update for this resource
+ required: false
+ default: AUTO
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - REPLACE_ALWAYS
+ - AUTO
+ security_groups:
+ type: list
+ description: List of security group names or IDs
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ fixed_ips:
+ type: list
+ description: Desired IPs for this port
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.neutron.port.FixedIps
+ mac_address:
+ type: string
+ description: MAC address to give to this port
+ required: false
+ status: SUPPORTED
+ admin_state_up:
+ type: boolean
+ description: A boolean value specifying the administrative status of the network
+ required: false
+ default: true
+ status: SUPPORTED
+ name:
+ type: string
+ description: A symbolic name for this port
+ required: false
+ status: SUPPORTED
+ attributes:
+ tenant_id:
+ type: string
+ description: Tenant owning the port
+ status: SUPPORTED
+ network_id:
+ type: string
+ description: Unique identifier for the network owning the port
+ status: SUPPORTED
+ qos_policy_id:
+ type: string
+ description: The QoS policy ID attached to this network
+ status: SUPPORTED
+ show:
+ type: string
+ description: Detailed information about resource
+ status: SUPPORTED
+ subnets:
+ type: list
+ description: Subnets of this network
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ status:
+ type: string
+ description: The status of the network
+ status: SUPPORTED
+ capabilities:
+ attachment:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/NeutronSecurityRulesGlobalTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..1cbef86d8d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
@@ -0,0 +1,116 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: NeutronSecurityRulesGlobalTypes
+ template_version: 1.0.0
+description: Neutron Security Rules TOSCA Global Types
+imports:
+ common_definitions:
+ file: CommonGlobalTypesServiceTemplate.yaml
+data_types:
+ org.openecomp.datatypes.heat.network.neutron.SecurityRules.Rule:
+ derived_from: tosca.datatypes.Root
+ description: Rules Pairs
+ properties:
+ remote_group_id:
+ type: string
+ description: The remote group ID to be associated with this security group rule
+ required: false
+ status: SUPPORTED
+ protocol:
+ type: string
+ description: The protocol that is matched by the security group rule
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - tcp
+ - udp
+ - icmp
+ ethertype:
+ type: string
+ description: Ethertype of the traffic
+ required: false
+ default: IPv4
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - IPv4
+ - IPv6
+ port_range_max:
+ type: integer
+ description: 'The maximum port number in the range that is matched by the
+ security group rule. '
+ required: false
+ status: SUPPORTED
+ constraints:
+ - in_range:
+ - 0
+ - 65535
+ remote_ip_prefix:
+ type: string
+ description: The remote IP prefix (CIDR) to be associated with this security group rule
+ required: false
+ status: SUPPORTED
+ remote_mode:
+ type: string
+ description: Whether to specify a remote group or a remote IP prefix
+ required: false
+ default: remote_ip_prefix
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - remote_ip_prefix
+ - remote_group_id
+ direction:
+ type: string
+ description: The direction in which the security group rule is applied
+ required: false
+ default: ingress
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - egress
+ - ingress
+ port_range_min:
+ type: integer
+ description: The minimum port number in the range that is matched by the security group rule.
+ required: false
+ status: SUPPORTED
+ constraints:
+ - in_range:
+ - 0
+ - 65535
+node_types:
+ org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules:
+ derived_from: tosca.nodes.Root
+ properties:
+ name:
+ type: string
+ description: A symbolic name for this security group, which is not required to be unique.
+ required: false
+ status: SUPPORTED
+ description:
+ type: string
+ description: Description of the security group
+ required: false
+ status: SUPPORTED
+ rules:
+ type: list
+ description: List of security group rules
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.neutron.SecurityRules.Rule
+ attributes:
+ show:
+ type: string
+ description: Detailed information about resource
+ status: SUPPORTED
+ requirements:
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ relationship: org.openecomp.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/NovaServerGlobalTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/NovaServerGlobalTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..0ec79f5229
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/expectedoutputfiles/NovaServerGlobalTypesServiceTemplate.yaml
@@ -0,0 +1,249 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: NovaServerGlobalTypes
+ template_version: 1.0.0
+description: Nova Server TOSCA Global Types
+imports:
+ common_definitions:
+ file: CommonGlobalTypesServiceTemplate.yaml
+data_types:
+ org.openecomp.datatypes.heat.novaServer.network.PortExtraProperties:
+ derived_from: tosca.datatypes.Root
+ description: Nova server network expand properties for port
+ properties:
+ port_security_enabled:
+ type: boolean
+ description: Flag to enable/disable port security on the port
+ required: false
+ status: SUPPORTED
+ mac_address:
+ type: string
+ description: MAC address to give to this port
+ required: false
+ status: SUPPORTED
+ admin_state_up:
+ type: boolean
+ description: The administrative state of this port
+ required: false
+ default: true
+ status: SUPPORTED
+ qos_policy:
+ type: string
+ description: The name or ID of QoS policy to attach to this port
+ required: false
+ status: SUPPORTED
+ allowed_address_pairs:
+ type: list
+ description: Additional MAC/IP address pairs allowed to pass through the port
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.AddressPair
+ binding:vnic_type:
+ type: string
+ description: The vnic type to be bound on the neutron port
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - macvtap
+ - direct
+ - normal
+ value_specs:
+ type: map
+ description: Extra parameters to include in the request
+ required: false
+ default: {
+ }
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ org.openecomp.datatypes.heat.novaServer.network.AddressInfo:
+ derived_from: tosca.datatypes.network.NetworkInfo
+ description: Network addresses with corresponding port id
+ properties:
+ port_id:
+ type: string
+ description: Port id
+ required: false
+ status: SUPPORTED
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.nova.Server:
+ derived_from: tosca.nodes.Compute
+ properties:
+ admin_pass:
+ type: string
+ description: The administrator password for the server
+ required: false
+ status: SUPPORTED
+ availability_zone:
+ type: string
+ description: Availability zone to create servers in
+ required: false
+ status: SUPPORTED
+ image:
+ type: string
+ description: The ID or name of the image to boot with
+ required: false
+ status: SUPPORTED
+ image_update_policy:
+ type: string
+ description: Policy on how to apply an image-id update
+ required: false
+ default: REBUILD
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - REBUILD_PRESERVE_EPHEMERAL
+ - REPLACE
+ - REBUILD
+ metadata:
+ type: json
+ description: Arbitrary JSON metadata to store for this server
+ required: false
+ status: SUPPORTED
+ contrail_service_instance_ind:
+ type: boolean
+ description: Nova server related to service instance indicator
+ required: false
+ default: false
+ status: SUPPORTED
+ user_data_update_policy:
+ type: string
+ description: Policy on how to apply a user_data update
+ required: false
+ default: REPLACE
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - REPLACE
+ - IGNORE
+ flavor_update_policy:
+ type: string
+ description: Policy on how to apply a flavor update
+ required: false
+ default: RESIZE
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - RESIZE
+ - REPLACE
+ user_data:
+ type: string
+ description: User data script to be executed by cloud-init
+ required: false
+ default: ''
+ status: SUPPORTED
+ flavor:
+ type: string
+ description: The ID or name of the flavor to boot onto
+ required: true
+ status: SUPPORTED
+ key_name:
+ type: string
+ description: Name of keypair to inject into the server
+ required: false
+ status: SUPPORTED
+ reservation_id:
+ type: string
+ description: A UUID for the set of servers being requested
+ required: false
+ status: SUPPORTED
+ security_groups:
+ type: list
+ description: List of security group names or IDs
+ required: false
+ default: [
+ ]
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ config_drive:
+ type: boolean
+ description: enable config drive on the server
+ required: false
+ status: SUPPORTED
+ personality:
+ type: map
+ description: A map of files to create/overwrite on the server upon boot
+ required: false
+ default: {
+ }
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ software_config_transport:
+ type: string
+ description: How the server should receive the metadata required for software configuration
+ required: false
+ default: POLL_SERVER_CFN
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - POLL_SERVER_CFN
+ - POLL_SERVER_HEAT
+ - POLL_TEMP_URL
+ - ZAQAR_MESSAGE
+ user_data_format:
+ type: string
+ description: How the user_data should be formatted for the server
+ required: false
+ default: HEAT_CFNTOOLS
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - SOFTWARE_CONFIG
+ - RAW
+ - HEAT_CFNTOOLS
+ diskConfig:
+ type: string
+ description: Control how the disk is partitioned when the server is created
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - AUTO
+ - MANUAL
+ name:
+ type: string
+ description: Server name
+ required: false
+ status: SUPPORTED
+ scheduler_hints:
+ type: map
+ description: Arbitrary key-value pairs specified by the client to help boot a server
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ attributes:
+ accessIPv4:
+ type: string
+ description: The manually assigned alternative public IPv4 address of the server
+ status: SUPPORTED
+ addresses:
+ type: map
+ description: A dict of all network addresses with corresponding port_id
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.novaServer.network.AddressInfo
+ accessIPv6:
+ type: string
+ description: The manually assigned alternative public IPv6 address of the server
+ status: SUPPORTED
+ instance_name:
+ type: string
+ description: AWS compatible instance name
+ status: SUPPORTED
+ name:
+ type: string
+ description: Name of the server
+ status: SUPPORTED
+ show:
+ type: string
+ description: Detailed information about resource
+ status: SUPPORTED
+ console_urls:
+ type: string
+ description: URLs of servers consoles
+ status: SUPPORTED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..b2916ccf9c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/inputfiles/MANIFEST.json
@@ -0,0 +1,11 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot_template.yml",
+ "type": "HEAT"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/inputfiles/hot_template.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/inputfiles/hot_template.yml
new file mode 100644
index 0000000000..574c0ac118
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/global_types/inputfiles/hot_template.yml
@@ -0,0 +1,122 @@
+heat_template_version: 2013-05-23
+
+#################################
+#
+# Changes from MSO 01/26/2016
+# Updated per ECOMP feedback
+#
+#################################
+
+description: cmaui server template for vMMSC
+
+parameters:
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_cinder_volume_size:
+ type: number
+ label: CMAUI Cinder volume size
+ description: the size of the CMAUI Cinder volume
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ oam_net_name:
+ type: string
+ description: UID of OAM network
+ oam_network_netmask:
+ type: string
+ label: oam network netmask
+ description: oam network gateway
+ oam_network_gateway:
+ type: string
+ label: oam network gateway
+ description: oam network gateway
+ external_dns:
+ type: string
+ label: dns server
+ description: dns server
+ external_ntp:
+ type: string
+ label: ntp server
+ description: ntp server
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ timezone:
+ type: string
+ label: timezone
+ description: timezone
+ cmaui_oam_ips:
+ type: comma_delimited_list
+ label: CMAUI oam_net IP addresses
+ description: CMAUI oam_net IP addresses
+ CMAUI_volume_type:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+
+resources:
+
+ cmaui_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ cmaui_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: cmaui_cinder_volume_size}
+ volume_type: {get_param: CMAUI_volume_type}
+
+ cmaui_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: cmaui_volume}
+ instance_uuid: {get_resource: server_cmaui}
+
+ server_cmaui:
+ type: OS::Nova::Server
+ depends_on: [ cmaui_volume,cmaui_port_0]
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_0 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ cmaui.mgmt.ip=${cmaui.mgmt.ip}
+ cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
+ cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
+ cmaui.external.dns=${cmaui.external.dns}
+ cmaui.external.ntp=${cmaui.external.ntp}
+ cmaui.node=${cmaui.node}
+ cmaui.timezone=${cmaui.timezone}
+ params:
+ ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 0]}
+ ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${cmaui.external.dns}: {get_param: external_dns}
+ ${cmaui.external.ntp}: {get_param: external_ntp}
+ ${cmaui.node}: {get_param: [cmaui_names, 0]}
+ ${cmaui.timezone}: {get_param: timezone}
+ user_data_format: RAW \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-mog-0108-bs1271/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-mog-0108-bs1271/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..c60020d80c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-mog-0108-bs1271/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,1459 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.pd_server:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.ps_server:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.sm_server:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.cm_server:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.oam_server:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ pd_flavor_name:
+ label: PD flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor name of PD instance
+ default: m3.xlarge
+ availabilityzone_name:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ default: nova
+ repl_net_ips:
+ label: repl network ips
+ hidden: false
+ immutable: false
+ type: list
+ description: ips of repl network
+ default:
+ - 107.239.33.57
+ - 107.239.33.58
+ entry_schema:
+ type: string
+ sl_net_name:
+ label: silver lining network name
+ hidden: false
+ immutable: false
+ type: string
+ description: id of the sl network
+ default: exn_protected_net_0
+ pd_image_name:
+ label: image name
+ hidden: false
+ immutable: false
+ type: string
+ description: PD image name
+ default: MOG_BASE_8.0
+ mog_script_name:
+ label: mog Config script name
+ hidden: false
+ immutable: false
+ type: string
+ description: Config script name
+ default: http://10.147.38.210:8080/v1/AUTH_8e501b8121f34a6eaaf526d3305985cc/mogtestcontainer/mog-cloudinit.sh
+ pd_server_names:
+ label: PD server names
+ hidden: false
+ immutable: false
+ type: list
+ description: name of the PD instance
+ default:
+ - ZRDM1MOGX01MPD001
+ - ZRDM1MOGX01MPD002
+ entry_schema:
+ type: string
+ sm_server_names:
+ label: SM server names
+ hidden: false
+ immutable: false
+ type: list
+ description: name of the SM instance
+ default:
+ - ZRDM1MOGX01MSM001
+ - ZRDM1MOGX01MSM002
+ entry_schema:
+ type: string
+ dummy_net_netmask_1:
+ hidden: false
+ immutable: false
+ type: string
+ description: CSB internal network subnet mask
+ default: 255.255.255.0
+ dummy_net_netmask_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: CSB internal network subnet mask
+ default: 255.255.255.0
+ ran_net_floating_ip:
+ label: mog ran net virtual ip
+ hidden: false
+ immutable: false
+ type: string
+ description: mog ran net virtual ip
+ default: 107.239.36.5
+ ran_net_ips:
+ label: RAN network ips
+ hidden: false
+ immutable: false
+ type: list
+ description: RAN network ip
+ default:
+ - 107.239.36.3
+ - 107.239.36.4
+ entry_schema:
+ type: string
+ dummy_net_end_0:
+ label: csb internal end
+ hidden: false
+ immutable: false
+ type: string
+ description: csb internal end
+ default: 169.254.1.254
+ oam_image_name:
+ label: image name
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM image name
+ default: MOG_BASE_8.0
+ dummy_net_end_1:
+ label: csb internal end
+ hidden: false
+ immutable: false
+ type: string
+ description: csb internal end
+ default: 169.254.2.254
+ oam_net_name:
+ label: oam network name
+ hidden: false
+ immutable: false
+ type: string
+ description: name of the oam network
+ default: oam_protected_net_0
+ oam_net_ips:
+ label: internet network ips
+ hidden: false
+ immutable: false
+ type: list
+ description: ip of the OAM network
+ default:
+ - 107.250.172.213
+ - 107.250.172.214
+ - 107.250.172.215
+ - 107.250.172.216
+ - 107.250.172.217
+ entry_schema:
+ type: string
+ ran_net_name:
+ label: RAN network name
+ hidden: false
+ immutable: false
+ type: string
+ description: RAN network name
+ default: gn_direct_net_0
+ cluster-manager-vol-1:
+ label: mog-cm-vol-1
+ hidden: false
+ immutable: false
+ type: string
+ description: Cluster Manager volume 1
+ default: 43ccf5ba-2d50-427b-a38f-e8c7d8670eee
+ cluster-manager-vol-2:
+ label: mog-cm-vol-2
+ hidden: false
+ immutable: false
+ type: string
+ description: Cluster Manager volume 2 with ISO image
+ default: 6f92e211-2d61-487d-8f84-d2d00cea3698
+ csb_net_netmask:
+ hidden: false
+ immutable: false
+ type: string
+ description: CSB internal network subnet mask
+ default: 255.255.255.0
+ oam_flavor_name:
+ label: OAM flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor name of OAM instance
+ default: m3.xlarge
+ dummy_net_start_0:
+ label: csb internal start
+ hidden: false
+ immutable: false
+ type: string
+ description: csb internal start
+ default: 169.254.1.4
+ dummy_net_start_1:
+ label: csb internal start
+ hidden: false
+ immutable: false
+ type: string
+ description: csb internal start
+ default: 169.254.2.4
+ cm_flavor_name:
+ label: CM flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor name of CM instance
+ default: m3.xlarge
+ sm_image_name:
+ label: image name
+ hidden: false
+ immutable: false
+ type: string
+ description: SM image name
+ default: MOG_BASE_8.0
+ mog_parameter_name:
+ label: mog script parameter name
+ hidden: false
+ immutable: false
+ type: string
+ description: Config script parameter csv file name
+ default: http://10.147.38.210:8080/v1/AUTH_8e501b8121f34a6eaaf526d3305985cc/mogtestcontainer
+ ps_server_names:
+ label: PS server names
+ hidden: false
+ immutable: false
+ type: list
+ description: name of the PS instance
+ default:
+ - ZRDM1MOGX01MPS001
+ - ZRDM1MOGX01MPS002
+ - ZRDM1MOGX01MPS003
+ - ZRDM1MOGX01MPS004
+ entry_schema:
+ type: string
+ csb_net_ips:
+ hidden: false
+ immutable: false
+ type: list
+ description: mog_csb_net IP addresses
+ default:
+ - 172.26.0.10
+ - 172.26.0.11
+ - 172.26.0.12
+ - 172.26.0.13
+ - 172.26.0.14
+ - 172.26.0.15
+ - 172.26.0.16
+ - 172.26.0.17
+ - 172.26.0.18
+ - 172.26.0.19
+ - 172.26.0.20
+ entry_schema:
+ type: string
+ ps_flavor_name:
+ label: PS flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor name of PS instance
+ default: m3.xlarge
+ rx_net_ips:
+ label: Rx network ips
+ hidden: false
+ immutable: false
+ type: list
+ description: Rx network ips
+ default:
+ - 107.239.34.3
+ - 107.239.34.4
+ entry_schema:
+ type: string
+ dummy_net_name_1:
+ label: csb internal network name
+ hidden: false
+ immutable: false
+ type: string
+ description: csb internal network name
+ default: mog_dummy_1
+ dummy_net_cidr_1:
+ label: csb ineternal cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: csb internal cidr
+ default: 169.254.2.0/24
+ dummy_net_name_0:
+ label: csb internal network name
+ hidden: false
+ immutable: false
+ type: string
+ description: csb internal network name
+ default: mog_dummy_0
+ dummy_net_cidr_0:
+ label: csb ineternal cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: csb internal cidr
+ default: 169.254.1.0/24
+ mog_swift_container:
+ label: mog Config URL
+ hidden: false
+ immutable: false
+ type: string
+ description: Config URL
+ default: http://10.147.38.210:8080/v1/AUTH_8e501b8121f34a6eaaf526d3305985cc/mogtestcontainer
+ oam-vol-2:
+ label: mog-oam-vol-2
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM volume 2
+ default: 6d169cb6-6ddc-41dc-920c-2839898a2924
+ sl_net_floating_ip:
+ label: mog sl net virtual ip
+ hidden: false
+ immutable: false
+ type: string
+ description: mog sl net virtual ip
+ default: 107.239.45.6
+ session-manager-vol-1:
+ label: mog-sm-vol-1
+ hidden: false
+ immutable: false
+ type: string
+ description: Session Manager volume 1
+ default: 49201898-333d-4c88-b58d-cf573b091633
+ rx_net_floating_ip:
+ label: mog rx net virtual ip
+ hidden: false
+ immutable: false
+ type: string
+ description: mog rx net virtual ip
+ default: 107.239.34.5
+ session-manager-vol-2:
+ label: mog-sm-vol-2
+ hidden: false
+ immutable: false
+ type: string
+ description: Session Manager volume 2
+ default: 4c35b5f1-ce99-4220-a6e2-cda6e2d713a0
+ oam-vol-1:
+ label: mog-oam-vol-1
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM volume 1
+ default: 0a7fcd9e-2624-401d-ac21-b0191f85ec77
+ csb_net_start:
+ label: csb internal start
+ hidden: false
+ immutable: false
+ type: string
+ description: csb internal start
+ default: 172.26.0.1
+ cm_image_name:
+ label: image name
+ hidden: false
+ immutable: false
+ type: string
+ description: CM image name
+ default: MOG_BASE_8.0
+ sm_flavor_name:
+ label: SM flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor name of SM instance
+ default: m2.xlarge4
+ ps_image_name:
+ label: PS image name
+ hidden: false
+ immutable: false
+ type: string
+ description: PS image name
+ default: MOG_BASE_8.0
+ oam_server_names:
+ label: OAM server names
+ hidden: false
+ immutable: false
+ type: list
+ description: name of the OAM instance
+ default:
+ - ZRDM1MOGX01OAM001
+ - ZRDM1MOGX01OAM002
+ entry_schema:
+ type: string
+ csb_net_cidr:
+ label: csb ineternal cidr
+ hidden: false
+ immutable: false
+ type: string
+ description: csb internal cidr
+ default: 172.26.0.0/24
+ cm_server_names:
+ label: CM server names
+ hidden: false
+ immutable: false
+ type: list
+ description: name of the CM instance
+ default:
+ - ZRDM1MOGX01MCM001
+ entry_schema:
+ type: string
+ sl_net_ips:
+ label: silver lining network ips
+ hidden: false
+ immutable: false
+ type: list
+ description: ips of the sl network
+ default:
+ - 107.239.45.4
+ - 107.239.45.5
+ entry_schema:
+ type: string
+ rx_net_name:
+ label: Rx network name
+ hidden: false
+ immutable: false
+ type: string
+ description: Rx network name
+ default: cor_direct_net_1
+ repl_net_name:
+ label: Replication network name
+ hidden: false
+ immutable: false
+ type: string
+ description: name of the replication network
+ default: cor_direct_net_0
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ default: mog_security_group
+ csb_net_end:
+ label: csb internal end
+ hidden: false
+ immutable: false
+ type: string
+ description: csb internal end
+ default: 172.26.0.254
+ csb_net_name:
+ label: csb internal network name
+ hidden: false
+ immutable: false
+ type: string
+ description: csb internal network name
+ default: int_mog_csb_net
+ mog_script_dir:
+ label: mog Config script directory
+ hidden: false
+ immutable: false
+ type: string
+ description: Config script directory
+ default: /root
+ node_templates:
+ cm01_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - oam_net_ips
+ - 4
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cm01
+ relationship: tosca.relationships.network.BindsTo
+ cm01_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - csb_net_ips
+ - 10
+ network: csb_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: csb_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cm01
+ relationship: tosca.relationships.network.BindsTo
+ sm02_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ network: csb_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: csb_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_sm02
+ relationship: tosca.relationships.network.BindsTo
+ server_ps04:
+ type: org.openecomp.resource.vfc.nodes.heat.ps_server
+ properties:
+ flavor:
+ get_input: ps_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: ps_image_name
+ user_data_format: RAW
+ name:
+ get_input:
+ - ps_server_names
+ - 3
+ scheduler_hints:
+ group: servergroup_mog03
+ server_ps03:
+ type: org.openecomp.resource.vfc.nodes.heat.ps_server
+ properties:
+ flavor:
+ get_input: ps_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: ps_image_name
+ user_data_format: RAW
+ name:
+ get_input:
+ - ps_server_names
+ - 2
+ scheduler_hints:
+ group: servergroup_mog03
+ sm01_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ network: csb_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: csb_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_sm01
+ relationship: tosca.relationships.network.BindsTo
+ sm02_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - repl_net_ips
+ - 1
+ network:
+ get_input: repl_net_name
+ server_ps02:
+ type: org.openecomp.resource.vfc.nodes.heat.ps_server
+ properties:
+ flavor:
+ get_input: ps_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: ps_image_name
+ user_data_format: RAW
+ name:
+ get_input:
+ - ps_server_names
+ - 1
+ scheduler_hints:
+ group: servergroup_mog03
+ sm01_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ network: dummy_net_0
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: dummy_net_0
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_sm01
+ relationship: tosca.relationships.network.BindsTo
+ sm02_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ network: dummy_net_0
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: dummy_net_0
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_sm02
+ relationship: tosca.relationships.network.BindsTo
+ server_ps01:
+ type: org.openecomp.resource.vfc.nodes.heat.ps_server
+ properties:
+ flavor:
+ get_input: ps_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: ps_image_name
+ user_data_format: RAW
+ name:
+ get_input:
+ - ps_server_names
+ - 0
+ scheduler_hints:
+ group: servergroup_mog03
+ csb_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ dhcp_enabled: true
+ network_name:
+ get_input: csb_net_name
+ subnets:
+ csb_ip_subnet:
+ enable_dhcp: true
+ name:
+ get_input: csb_net_name
+ cidr:
+ get_input: csb_net_cidr
+ allocation_pools:
+ - start:
+ get_input: csb_net_start
+ end:
+ get_input: csb_net_end
+ sm01_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - repl_net_ips
+ - 0
+ network:
+ get_input: repl_net_name
+ pd01_port_5:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - ran_net_ips
+ - 0
+ allowed_address_pairs:
+ - ip_address:
+ get_input: ran_net_floating_ip
+ network:
+ get_input: ran_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pd_01
+ relationship: tosca.relationships.network.BindsTo
+ pd01_port_4:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ network: dummy_net_1
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: dummy_net_1
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pd_01
+ relationship: tosca.relationships.network.BindsTo
+ pd02_port_5:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - ran_net_ips
+ - 1
+ allowed_address_pairs:
+ - ip_address:
+ get_input: ran_net_floating_ip
+ network:
+ get_input: ran_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pd_02
+ relationship: tosca.relationships.network.BindsTo
+ pd01_port_6:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - sl_net_ips
+ - 0
+ allowed_address_pairs:
+ - ip_address:
+ get_input: sl_net_floating_ip
+ network:
+ get_input: sl_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pd_01
+ relationship: tosca.relationships.network.BindsTo
+ pd02_port_6:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - sl_net_ips
+ - 1
+ allowed_address_pairs:
+ - ip_address:
+ get_input: sl_net_floating_ip
+ network:
+ get_input: sl_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pd_02
+ relationship: tosca.relationships.network.BindsTo
+ server_sm02:
+ type: org.openecomp.resource.vfc.nodes.heat.sm_server
+ properties:
+ flavor:
+ get_input: sm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: sm_image_name
+ user_data_format: RAW
+ name:
+ get_input:
+ - sm_server_names
+ - 1
+ scheduler_hints:
+ group: servergroup_mog02
+ ps02_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ network: csb_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: csb_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_ps02
+ relationship: tosca.relationships.network.BindsTo
+ ps04_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ network: csb_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: csb_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_ps04
+ relationship: tosca.relationships.network.BindsTo
+ ps03_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ network: csb_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: csb_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_ps03
+ relationship: tosca.relationships.network.BindsTo
+ ps01_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ network: csb_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: csb_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_ps01
+ relationship: tosca.relationships.network.BindsTo
+ server_sm01:
+ type: org.openecomp.resource.vfc.nodes.heat.sm_server
+ properties:
+ flavor:
+ get_input: sm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: sm_image_name
+ user_data_format: RAW
+ name:
+ get_input:
+ - sm_server_names
+ - 0
+ scheduler_hints:
+ group: servergroup_mog02
+ dummy_net_0:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ dhcp_enabled: true
+ network_name:
+ get_input: dummy_net_name_0
+ subnets:
+ dummy_ip_subnet_0:
+ enable_dhcp: true
+ name:
+ get_input: dummy_net_name_0
+ cidr:
+ get_input: dummy_net_cidr_0
+ allocation_pools:
+ - start:
+ get_input: dummy_net_start_0
+ end:
+ get_input: dummy_net_end_0
+ server_cm01:
+ type: org.openecomp.resource.vfc.nodes.heat.cm_server
+ properties:
+ flavor:
+ get_input: cm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: cm_image_name
+ user_data_format: RAW
+ name:
+ get_input:
+ - cm_server_names
+ - 0
+ scheduler_hints:
+ group: servergroup_mog03
+ server_pd_02:
+ type: org.openecomp.resource.vfc.nodes.heat.pd_server
+ properties:
+ flavor:
+ get_input: pd_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pd_image_name
+ user_data_format: RAW
+ name:
+ get_input:
+ - pd_server_names
+ - 1
+ scheduler_hints:
+ group: servergroup_mog01
+ server_pd_01:
+ type: org.openecomp.resource.vfc.nodes.heat.pd_server
+ properties:
+ flavor:
+ get_input: pd_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pd_image_name
+ user_data_format: RAW
+ name:
+ get_input:
+ - pd_server_names
+ - 0
+ scheduler_hints:
+ group: servergroup_mog01
+ server_oam01:
+ type: org.openecomp.resource.vfc.nodes.heat.oam_server
+ properties:
+ flavor:
+ get_input: oam_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: oam_image_name
+ user_data_format: RAW
+ name:
+ get_input:
+ - oam_server_names
+ - 0
+ scheduler_hints:
+ group: servergroup_mog02
+ server_oam02:
+ type: org.openecomp.resource.vfc.nodes.heat.oam_server
+ properties:
+ flavor:
+ get_input: oam_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: oam_image_name
+ user_data_format: RAW
+ name:
+ get_input:
+ - oam_server_names
+ - 1
+ scheduler_hints:
+ group: servergroup_mog02
+ dummy_net_1:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ dhcp_enabled: true
+ network_name:
+ get_input: dummy_net_name_1
+ subnets:
+ dummy_ip_subnet_1:
+ enable_dhcp: true
+ name:
+ get_input: dummy_net_name_1
+ cidr:
+ get_input: dummy_net_cidr_1
+ allocation_pools:
+ - start:
+ get_input: dummy_net_start_1
+ end:
+ get_input: dummy_net_end_1
+ mog_security_group:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules
+ properties:
+ name:
+ get_input: security_group_name
+ description: mog security group
+ rules:
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ requirements:
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: pd01_port_0
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: pd01_port_1
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: pd01_port_2
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: pd01_port_3
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: pd01_port_4
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: pd01_port_5
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: pd01_port_6
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: pd02_port_0
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: pd02_port_1
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: pd02_port_2
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: pd02_port_3
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: pd02_port_4
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: pd02_port_5
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: pd02_port_6
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: oam01_port_0
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: oam01_port_1
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: oam02_port_0
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: oam02_port_1
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: sm01_port_0
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: sm01_port_1
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: sm01_port_2
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: sm02_port_0
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: sm02_port_1
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: sm02_port_2
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: ps01_port_0
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: ps02_port_0
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: ps03_port_0
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: ps04_port_0
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: cm01_port_0
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: cm01_port_1
+ relationship: org.openecomp.relationships.AttachesTo
+ pd01_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - oam_net_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pd_01
+ relationship: tosca.relationships.network.BindsTo
+ pd02_port_3:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - rx_net_ips
+ - 1
+ allowed_address_pairs:
+ - ip_address:
+ get_input: rx_net_floating_ip
+ network:
+ get_input: rx_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pd_02
+ relationship: tosca.relationships.network.BindsTo
+ pd01_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ network: csb_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: csb_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pd_01
+ relationship: tosca.relationships.network.BindsTo
+ pd02_port_4:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ network: dummy_net_1
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: dummy_net_1
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pd_02
+ relationship: tosca.relationships.network.BindsTo
+ pd01_port_3:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - rx_net_ips
+ - 0
+ allowed_address_pairs:
+ - ip_address:
+ get_input: rx_net_floating_ip
+ network:
+ get_input: rx_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pd_01
+ relationship: tosca.relationships.network.BindsTo
+ pd02_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - oam_net_ips
+ - 1
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pd_02
+ relationship: tosca.relationships.network.BindsTo
+ pd01_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ network: dummy_net_0
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: dummy_net_0
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pd_01
+ relationship: tosca.relationships.network.BindsTo
+ pd02_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ network: dummy_net_0
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: dummy_net_0
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pd_02
+ relationship: tosca.relationships.network.BindsTo
+ oam01_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - oam_net_ips
+ - 2
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_oam01
+ relationship: tosca.relationships.network.BindsTo
+ pd02_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ network: csb_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: csb_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_pd_02
+ relationship: tosca.relationships.network.BindsTo
+ oam02_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - oam_net_ips
+ - 3
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_oam02
+ relationship: tosca.relationships.network.BindsTo
+ oam01_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ network: csb_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: csb_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_oam01
+ relationship: tosca.relationships.network.BindsTo
+ oam02_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - mog_security_group
+ network: csb_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: csb_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_oam02
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ servergroup_mog01:
+ type: tosca.groups.Root
+ members:
+ - server_pd_01
+ - server_pd_02
+ servergroup_mog02:
+ type: tosca.groups.Root
+ members:
+ - server_oam01
+ - server_oam02
+ - server_sm01
+ - server_sm02
+ servergroup_mog03:
+ type: tosca.groups.Root
+ members:
+ - server_ps01
+ - server_ps02
+ - server_ps03
+ - server_ps04
+ - server_cm01
+ hot-mog-0108-bs1271:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot-mog-0108-bs1271.yml
+ description: heat template that creates MOG stack
+ members:
+ - cm01_port_1
+ - cm01_port_0
+ - sm02_port_0
+ - server_ps04
+ - server_ps03
+ - sm01_port_0
+ - sm02_port_2
+ - server_ps02
+ - sm01_port_1
+ - sm02_port_1
+ - server_ps01
+ - csb_net
+ - sm01_port_2
+ - pd01_port_5
+ - pd01_port_4
+ - pd02_port_5
+ - pd01_port_6
+ - pd02_port_6
+ - server_sm02
+ - ps02_port_0
+ - ps04_port_0
+ - ps03_port_0
+ - ps01_port_0
+ - server_sm01
+ - dummy_net_0
+ - server_cm01
+ - server_pd_02
+ - server_pd_01
+ - server_oam01
+ - server_oam02
+ - dummy_net_1
+ - mog_security_group
+ - pd01_port_1
+ - pd02_port_3
+ - pd01_port_0
+ - pd02_port_4
+ - pd01_port_3
+ - pd02_port_1
+ - pd01_port_2
+ - pd02_port_2
+ - oam01_port_1
+ - pd02_port_0
+ - oam02_port_1
+ - oam01_port_0
+ - oam02_port_0
+ policies:
+ servergroup_mog01:
+ type: org.openecomp.policies.placement.Antilocate
+ properties:
+ container_type: host
+ targets:
+ - servergroup_mog01
+ servergroup_mog02:
+ type: org.openecomp.policies.placement.Antilocate
+ properties:
+ container_type: host
+ targets:
+ - servergroup_mog02
+ servergroup_mog03:
+ type: org.openecomp.policies.placement.Antilocate
+ properties:
+ container_type: host
+ targets:
+ - servergroup_mog03 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-mog-0108-bs1271/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-mog-0108-bs1271/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..40c2b4c296
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-mog-0108-bs1271/inputfiles/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-mog-0108-bs1271.yml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-mog-0108-bs1271.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-mog-0108-bs1271/inputfiles/hot-mog-0108-bs1271.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-mog-0108-bs1271/inputfiles/hot-mog-0108-bs1271.env
new file mode 100644
index 0000000000..407bc8db30
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-mog-0108-bs1271/inputfiles/hot-mog-0108-bs1271.env
@@ -0,0 +1,60 @@
+parameters:
+ pd_server_names: ZRDM1MOGX01MPD001,ZRDM1MOGX01MPD002
+ pd_image_name: MOG_BASE_8.0
+ pd_flavor_name: m3.xlarge
+ oam_server_names: ZRDM1MOGX01OAM001,ZRDM1MOGX01OAM002
+ oam_image_name: MOG_BASE_8.0
+ oam_flavor_name: m3.xlarge
+ sm_server_names: ZRDM1MOGX01MSM001,ZRDM1MOGX01MSM002
+ sm_image_name: MOG_BASE_8.0
+ sm_flavor_name: m2.xlarge4
+ ps_server_names: ZRDM1MOGX01MPS001,ZRDM1MOGX01MPS002,ZRDM1MOGX01MPS003,ZRDM1MOGX01MPS004
+ ps_image_name: MOG_BASE_8.0
+ ps_flavor_name: m3.xlarge
+ cm_server_names: ZRDM1MOGX01MCM001
+ cm_image_name: MOG_BASE_8.0
+ cm_flavor_name: m3.xlarge
+ availabilityzone_name: nova
+ oam_net_name: oam_protected_net_0
+ oam_net_ips: 107.250.172.213,107.250.172.214,107.250.172.215,107.250.172.216,107.250.172.217
+ #internet_net_name: dmz_protected_net_0
+ #internet_net_ips: 107.239.53.4,107.239.53.5
+ # internet_net_floating_ip: 107.239.53.6
+ sl_net_name: exn_protected_net_0
+ sl_net_ips: 107.239.45.4,107.239.45.5
+ sl_net_floating_ip: 107.239.45.6
+ repl_net_name: cor_direct_net_0
+ repl_net_ips: 107.239.33.57,107.239.33.58
+ rx_net_name: cor_direct_net_1
+ rx_net_ips: 107.239.34.3,107.239.34.4
+ rx_net_floating_ip: 107.239.34.5
+ ran_net_name: gn_direct_net_0
+ ran_net_ips: 107.239.36.3,107.239.36.4
+ ran_net_floating_ip: 107.239.36.5
+ dummy_net_name_0: mog_dummy_0
+ dummy_net_start_0: 169.254.1.4
+ dummy_net_end_0: 169.254.1.254
+ dummy_net_cidr_0: 169.254.1.0/24
+ dummy_net_netmask_0: 255.255.255.0
+ dummy_net_name_1: mog_dummy_1
+ dummy_net_start_1: 169.254.2.4
+ dummy_net_end_1: 169.254.2.254
+ dummy_net_cidr_1: 169.254.2.0/24
+ dummy_net_netmask_1: 255.255.255.0
+ csb_net_name: int_mog_csb_net
+ csb_net_ips: 172.26.0.10,172.26.0.11,172.26.0.12,172.26.0.13,172.26.0.14,172.26.0.15,172.26.0.16,172.26.0.17,172.26.0.18,172.26.0.19,172.26.0.20
+ csb_net_start: 172.26.0.1
+ csb_net_end: 172.26.0.254
+ csb_net_cidr: 172.26.0.0/24
+ csb_net_netmask: 255.255.255.0
+ security_group_name: mog_security_group
+ mog_swift_container: http://10.147.38.210:8080/v1/AUTH_8e501b8121f34a6eaaf526d3305985cc/mogtestcontainer
+ mog_script_dir: /root
+ mog_script_name: http://10.147.38.210:8080/v1/AUTH_8e501b8121f34a6eaaf526d3305985cc/mogtestcontainer/mog-cloudinit.sh
+ mog_parameter_name: http://10.147.38.210:8080/v1/AUTH_8e501b8121f34a6eaaf526d3305985cc/mogtestcontainer
+ cluster-manager-vol-1: 43ccf5ba-2d50-427b-a38f-e8c7d8670eee
+ session-manager-vol-1: 49201898-333d-4c88-b58d-cf573b091633
+ session-manager-vol-2: 4c35b5f1-ce99-4220-a6e2-cda6e2d713a0
+ oam-vol-1: 0a7fcd9e-2624-401d-ac21-b0191f85ec77
+ oam-vol-2: 6d169cb6-6ddc-41dc-920c-2839898a2924
+ cluster-manager-vol-2: 6f92e211-2d61-487d-8f84-d2d00cea3698
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-mog-0108-bs1271/inputfiles/hot-mog-0108-bs1271.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-mog-0108-bs1271/inputfiles/hot-mog-0108-bs1271.yml
new file mode 100644
index 0000000000..85ca654ce1
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-mog-0108-bs1271/inputfiles/hot-mog-0108-bs1271.yml
@@ -0,0 +1,733 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates MOG stack
+
+parameters:
+ pd_server_names:
+ type: comma_delimited_list
+ label: PD server names
+ description: name of the PD instance
+ pd_image_name:
+ type: string
+ label: image name
+ description: PD image name
+ pd_flavor_name:
+ type: string
+ label: PD flavor name
+ description: flavor name of PD instance
+ oam_server_names:
+ type: comma_delimited_list
+ label: OAM server names
+ description: name of the OAM instance
+ oam_image_name:
+ type: string
+ label: image name
+ description: OAM image name
+ oam_flavor_name:
+ type: string
+ label: OAM flavor name
+ description: flavor name of OAM instance
+ sm_server_names:
+ type: comma_delimited_list
+ label: SM server names
+ description: name of the SM instance
+ sm_image_name:
+ type: string
+ label: image name
+ description: SM image name
+ sm_flavor_name:
+ type: string
+ label: SM flavor name
+ description: flavor name of SM instance
+ ps_server_names:
+ type: comma_delimited_list
+ label: PS server names
+ description: name of the PS instance
+ ps_image_name:
+ type: string
+ label: PS image name
+ description: PS image name
+ ps_flavor_name:
+ type: string
+ label: PS flavor name
+ description: flavor name of PS instance
+ cm_server_names:
+ type: comma_delimited_list
+ label: CM server names
+ description: name of the CM instance
+ cm_image_name:
+ type: string
+ label: image name
+ description: CM image name
+ cm_flavor_name:
+ type: string
+ label: CM flavor name
+ description: flavor name of CM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ oam_net_name:
+ type: string
+ label: oam network name
+ description: name of the oam network
+ oam_net_ips:
+ type: comma_delimited_list
+ label: internet network ips
+ description: ip of the OAM network
+ # internet_net_name:
+ # type: string
+ # label: internet network name
+ # description: id of the internet network
+ # internet_net_ips:
+ # type: comma_delimited_list
+ # label: internet network ips
+ # description: ip of the internet network
+ # internet_net_floating_ip:
+ # type: string
+ # label: mog internet virtual ip
+ # description: mog internet virtual ip
+ sl_net_name:
+ type: string
+ label: silver lining network name
+ description: id of the sl network
+ sl_net_ips:
+ type: comma_delimited_list
+ label: silver lining network ips
+ description: ips of the sl network
+ sl_net_floating_ip:
+ type: string
+ label: mog sl net virtual ip
+ description: mog sl net virtual ip
+ repl_net_name:
+ type: string
+ label: Replication network name
+ description: name of the replication network
+ repl_net_ips:
+ type: comma_delimited_list
+ label: repl network ips
+ description: ips of repl network
+ rx_net_name:
+ type: string
+ label: Rx network name
+ description: Rx network name
+ rx_net_ips:
+ type: comma_delimited_list
+ label: Rx network ips
+ description: Rx network ips
+ rx_net_floating_ip:
+ type: string
+ label: mog rx net virtual ip
+ description: mog rx net virtual ip
+ ran_net_name:
+ type: string
+ label: RAN network name
+ description: RAN network name
+ ran_net_ips:
+ type: comma_delimited_list
+ label: RAN network ips
+ description: RAN network ip
+ ran_net_floating_ip:
+ type: string
+ label: mog ran net virtual ip
+ description: mog ran net virtual ip
+ csb_net_name:
+ type: string
+ label: csb internal network name
+ description: csb internal network name
+ csb_net_start:
+ type: string
+ label: csb internal start
+ description: csb internal start
+ csb_net_end:
+ type: string
+ label: csb internal end
+ description: csb internal end
+ csb_net_cidr:
+ type: string
+ label: csb ineternal cidr
+ description: csb internal cidr
+ csb_net_netmask:
+ type: string
+ description: CSB internal network subnet mask
+ csb_net_ips:
+ type: comma_delimited_list
+ description: mog_csb_net IP addresses
+ dummy_net_name_0:
+ type: string
+ label: csb internal network name
+ description: csb internal network name
+ dummy_net_start_0:
+ type: string
+ label: csb internal start
+ description: csb internal start
+ dummy_net_end_0:
+ type: string
+ label: csb internal end
+ description: csb internal end
+ dummy_net_cidr_0:
+ type: string
+ label: csb ineternal cidr
+ description: csb internal cidr
+ dummy_net_netmask_0:
+ type: string
+ description: CSB internal network subnet mask
+ dummy_net_name_1:
+ type: string
+ label: csb internal network name
+ description: csb internal network name
+ dummy_net_start_1:
+ type: string
+ label: csb internal start
+ description: csb internal start
+ dummy_net_end_1:
+ type: string
+ label: csb internal end
+ description: csb internal end
+ dummy_net_cidr_1:
+ type: string
+ label: csb ineternal cidr
+ description: csb internal cidr
+ dummy_net_netmask_1:
+ type: string
+ description: CSB internal network subnet mask
+
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ cluster-manager-vol-1:
+ type: string
+ label: mog-cm-vol-1
+ description: Cluster Manager volume 1
+ session-manager-vol-1:
+ type: string
+ label: mog-sm-vol-1
+ description: Session Manager volume 1
+ session-manager-vol-2:
+ type: string
+ label: mog-sm-vol-2
+ description: Session Manager volume 2
+ oam-vol-1:
+ type: string
+ label: mog-oam-vol-1
+ description: OAM volume 1
+ oam-vol-2:
+ type: string
+ label: mog-oam-vol-2
+ description: OAM volume 2
+ mog_swift_container:
+ type: string
+ label: mog Config URL
+ description: Config URL
+ mog_script_dir:
+ type: string
+ label: mog Config script directory
+ description: Config script directory
+ mog_script_name:
+ type: string
+ label: mog Config script name
+ description: Config script name
+ mog_parameter_name:
+ type: string
+ label: mog script parameter name
+ description: Config script parameter csv file name
+ cluster-manager-vol-2:
+ type: string
+ label: mog-cm-vol-2
+ description: Cluster Manager volume 2 with ISO image
+
+resources:
+ mog_security_group:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: mog security group
+ name: {get_param: security_group_name}
+ rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0}
+ ]
+
+ csb_net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: csb_net_name}
+
+ csb_ip_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: csb_net_name}
+ network_id: { get_resource: csb_net }
+ cidr: { get_param: csb_net_cidr }
+ allocation_pools: [{"start": {get_param: csb_net_start}, "end": {get_param: csb_net_end}}]
+ enable_dhcp: true
+
+ dummy_net_0:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: dummy_net_name_0}
+
+ dummy_ip_subnet_0:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: dummy_net_name_0}
+ network_id: { get_resource: dummy_net_0 }
+ cidr: { get_param: dummy_net_cidr_0 }
+ allocation_pools: [{"start": {get_param: dummy_net_start_0}, "end": {get_param: dummy_net_end_0}}]
+ enable_dhcp: true
+
+ dummy_net_1:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: dummy_net_name_1}
+
+ dummy_ip_subnet_1:
+ type: OS::Neutron::Subnet
+ properties:
+ name: {get_param: dummy_net_name_1}
+ network_id: { get_resource: dummy_net_1 }
+ cidr: { get_param: dummy_net_cidr_1 }
+ allocation_pools: [{"start": {get_param: dummy_net_start_1}, "end": {get_param: dummy_net_end_1}}]
+ enable_dhcp: true
+
+
+ mogconfig:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ template: |
+ #!/bin/bash
+ wget -P script_dir swift_container/script_name
+ wget -P script_dir swift_container/parameter_name
+ chmod 755 script_dir/script_name
+ script_dir/script_name
+ params:
+ swift_container: {get_param: mog_swift_container}
+ script_dir: {get_param: mog_script_dir}
+ script_name: {get_param: mog_script_name}
+ #parameter_name: {get_param: mog_parameter_name}
+
+
+ servergroup_mog01:
+ type: OS::Nova::ServerGroup
+ properties:
+ policies:
+ - anti-affinity
+ server_pd_01:
+ type: OS::Nova::Server
+ properties:
+# config_drive: "True"
+ name: {get_param: [pd_server_names, 0]}
+ image: {get_param: pd_image_name}
+ flavor: {get_param: pd_flavor_name}
+ availability_zone: {get_param: availabilityzone_name}
+ networks:
+ - port: {get_resource: pd01_port_0}
+ - port: {get_resource: pd01_port_1}
+ - port: {get_resource: pd01_port_2}
+ - port: {get_resource: pd01_port_3}
+ - port: {get_resource: pd01_port_4}
+ - port: {get_resource: pd01_port_5}
+ - port: {get_resource: pd01_port_6}
+ # - port: {get_resource: pd01_port_7}
+ user_data:
+ scheduler_hints: {group: {get_resource: servergroup_mog01}}
+ user_data_format: RAW
+
+
+ pd01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_resource: csb_net}
+ security_groups: [{get_resource: mog_security_group}]
+ pd01_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [oam_net_ips, 0]}}]
+ security_groups: [{get_resource: mog_security_group}]
+ pd01_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_resource: dummy_net_0}
+ security_groups: [{get_resource: mog_security_group}]
+ pd01_port_3:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: rx_net_name}
+ fixed_ips: [{"ip_address": {get_param: [rx_net_ips, 0]}}]
+ allowed_address_pairs: [{"ip_address": {get_param: rx_net_floating_ip} }]
+ security_groups: [{get_resource: mog_security_group}]
+ pd01_port_4:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_resource: dummy_net_1}
+ security_groups: [{get_resource: mog_security_group}]
+ pd01_port_5:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: ran_net_name}
+ fixed_ips: [{"ip_address": {get_param: [ran_net_ips, 0]}}]
+ allowed_address_pairs: [{"ip_address": {get_param: ran_net_floating_ip} }]
+ security_groups: [{get_resource: mog_security_group}]
+
+ pd01_port_6:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: sl_net_name}
+ fixed_ips: [{"ip_address": {get_param: [sl_net_ips, 0]}}]
+ allowed_address_pairs: [{"ip_address": {get_param: sl_net_floating_ip}}]
+ security_groups: [{get_resource: mog_security_group}]
+
+ # pd01_port_7:
+ #j type: OS::Neutron::Port
+ # properties:
+ # network: {get_param: internet_net_name}
+ # fixed_ips: [{"ip_address": {get_param: [internet_net_ips, 0]}}]
+ # allowed_address_pairs: [{"ip_address": {get_param: internet_net_floating_ip} }]
+ # security_groups: [{get_resource: mog_security_group}]
+
+ server_pd_02:
+ type: OS::Nova::Server
+ properties:
+# config_drive: "True"
+ name: {get_param: [pd_server_names, 1]}
+ image: {get_param: pd_image_name}
+ flavor: {get_param: pd_flavor_name}
+ availability_zone: {get_param: availabilityzone_name}
+ networks:
+ - port: {get_resource: pd02_port_0}
+ - port: {get_resource: pd02_port_1}
+ - port: {get_resource: pd02_port_2}
+ - port: {get_resource: pd02_port_3}
+ - port: {get_resource: pd02_port_4}
+ - port: {get_resource: pd02_port_5}
+ - port: {get_resource: pd02_port_6}
+ # - port: {get_resource: pd02_port_7}
+
+ user_data:
+ scheduler_hints: {group: {get_resource: servergroup_mog01}}
+ user_data_format: RAW
+
+ pd02_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_resource: csb_net}
+ security_groups: [{get_resource: mog_security_group}]
+
+ pd02_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [oam_net_ips, 1]}}]
+ security_groups: [{get_resource: mog_security_group}]
+
+ pd02_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_resource: dummy_net_0}
+ security_groups: [{get_resource: mog_security_group}]
+
+ pd02_port_3:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: rx_net_name}
+ fixed_ips: [{"ip_address": {get_param: [rx_net_ips, 1]}}]
+ allowed_address_pairs: [{"ip_address": {get_param: rx_net_floating_ip} }]
+ security_groups: [{get_resource: mog_security_group}]
+
+ pd02_port_4:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_resource: dummy_net_1}
+ security_groups: [{get_resource: mog_security_group}]
+
+ pd02_port_5:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: ran_net_name}
+ fixed_ips: [{"ip_address": {get_param: [ran_net_ips, 1]}}]
+ allowed_address_pairs: [{"ip_address": {get_param: ran_net_floating_ip} }]
+ security_groups: [{get_resource: mog_security_group}]
+
+ pd02_port_6:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: sl_net_name}
+ fixed_ips: [{"ip_address": {get_param: [sl_net_ips, 1]}}]
+ allowed_address_pairs: [{"ip_address": {get_param: sl_net_floating_ip}}]
+ security_groups: [{get_resource: mog_security_group}]
+
+ # pd02_port_7:
+ # type: OS::Neutron::Port
+ # properties:
+ # network: {get_param: internet_net_name}
+ # fixed_ips: [{"ip_address": {get_param: [internet_net_ips, 1]}}]
+ # allowed_address_pairs: [{"ip_address": {get_param: internet_net_floating_ip} }]
+ # security_groups: [{get_resource: mog_security_group}]
+
+ servergroup_mog02:
+ type: OS::Nova::ServerGroup
+ properties:
+ policies:
+ - anti-affinity
+ server_oam01:
+ type: OS::Nova::Server
+ properties:
+# config_drive: "True"
+ name: {get_param: [oam_server_names, 0]}
+ image: {get_param: oam_image_name}
+ flavor: {get_param: oam_flavor_name}
+ availability_zone: {get_param: availabilityzone_name}
+ networks:
+ - port: {get_resource: oam01_port_0}
+ - port: {get_resource: oam01_port_1}
+# block_device_mapping:
+# - device_name: vdd
+# volume_id: { get_param: oam-vol-1 }
+ user_data:
+ scheduler_hints: {group: {get_resource: servergroup_mog02}}
+ user_data_format: RAW
+
+ oam01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_resource: csb_net}
+ security_groups: [{get_resource: mog_security_group}]
+
+ oam01_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [oam_net_ips, 2]}}]
+ security_groups: [{get_resource: mog_security_group}]
+
+
+ server_oam02:
+ type: OS::Nova::Server
+ properties:
+# config_drive: "True"
+ name: {get_param: [oam_server_names, 1]}
+ image: {get_param: oam_image_name}
+ flavor: {get_param: oam_flavor_name}
+ availability_zone: {get_param: availabilityzone_name}
+ networks:
+ - port: {get_resource: oam02_port_0}
+ - port: {get_resource: oam02_port_1}
+# block_device_mapping:
+# - device_name: vdd
+# volume_id: { get_param: oam-vol-2 }
+ user_data:
+ scheduler_hints: {group: {get_resource: servergroup_mog02}}
+ user_data_format: RAW
+
+ oam02_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_resource: csb_net}
+ security_groups: [{get_resource: mog_security_group}]
+
+ oam02_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [oam_net_ips, 3]}}]
+ security_groups: [{get_resource: mog_security_group}]
+
+
+ server_sm01:
+ type: OS::Nova::Server
+ properties:
+# config_drive: "True"
+ name: {get_param: [sm_server_names, 0]}
+ image: {get_param: sm_image_name}
+ flavor: {get_param: sm_flavor_name}
+ availability_zone: {get_param: availabilityzone_name}
+ networks:
+ - port: {get_resource: sm01_port_0}
+ - port: {get_resource: sm01_port_1}
+# block_device_mapping:
+# - device_name: vdd
+# volume_id: { get_param: session-manager-vol-1 }
+ user_data:
+ scheduler_hints: {group: {get_resource: servergroup_mog02}}
+ user_data_format: RAW
+
+ sm01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_resource: csb_net}
+ security_groups: [{get_resource: mog_security_group}]
+
+ sm01_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_resource: dummy_net_0}
+ security_groups: [{get_resource: mog_security_group}]
+
+ sm01_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: repl_net_name}
+ fixed_ips: [{"ip_address": {get_param: [repl_net_ips, 0]}}]
+ security_groups: [{get_resource: mog_security_group}]
+
+ server_sm02:
+ type: OS::Nova::Server
+ properties:
+# config_drive: "True"
+ name: {get_param: [sm_server_names, 1]}
+ image: {get_param: sm_image_name}
+ flavor: {get_param: sm_flavor_name}
+ availability_zone: {get_param: availabilityzone_name}
+# block_device_mapping:
+# - device_name: vdd
+# volume_id: { get_param: session-manager-vol-2 }
+ networks:
+ - port: {get_resource: sm02_port_0}
+ - port: {get_resource: sm02_port_1}
+ user_data:
+ scheduler_hints: {group: {get_resource: servergroup_mog02}}
+ user_data_format: RAW
+
+ sm02_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_resource: csb_net}
+ security_groups: [{get_resource: mog_security_group}]
+
+ sm02_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_resource: dummy_net_0}
+ security_groups: [{get_resource: mog_security_group}]
+
+ sm02_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: repl_net_name}
+ fixed_ips: [{"ip_address": {get_param: [repl_net_ips, 1]}}]
+ security_groups: [{get_resource: mog_security_group}]
+
+ servergroup_mog03:
+ type: OS::Nova::ServerGroup
+ properties:
+ policies:
+ - anti-affinity
+ server_ps01:
+ type: OS::Nova::Server
+ properties:
+# config_drive: "True"
+ name: {get_param: [ps_server_names, 0]}
+ image: {get_param: ps_image_name}
+ flavor: {get_param: ps_flavor_name}
+ availability_zone: {get_param: availabilityzone_name}
+ networks:
+ - port: {get_resource: ps01_port_0}
+ user_data:
+ scheduler_hints: {group: {get_resource: servergroup_mog03}}
+ user_data_format: RAW
+
+ ps01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_resource: csb_net}
+ security_groups: [{get_resource: mog_security_group}]
+
+ server_ps02:
+ type: OS::Nova::Server
+ properties:
+# config_drive: "True"
+ name: {get_param: [ps_server_names, 1]}
+ image: {get_param: ps_image_name}
+ flavor: {get_param: ps_flavor_name}
+ availability_zone: {get_param: availabilityzone_name}
+ networks:
+ - port: {get_resource: ps02_port_0}
+ user_data:
+ scheduler_hints: {group: {get_resource: servergroup_mog03}}
+ user_data_format: RAW
+
+ ps02_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_resource: csb_net}
+ security_groups: [{get_resource: mog_security_group}]
+
+ server_ps03:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: [ps_server_names, 2]}
+ image: {get_param: ps_image_name}
+ flavor: {get_param: ps_flavor_name}
+ availability_zone: {get_param: availabilityzone_name}
+ networks:
+ - port: {get_resource: ps03_port_0}
+ user_data:
+ scheduler_hints: {group: {get_resource: servergroup_mog03}}
+ user_data_format: RAW
+
+ ps03_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_resource: csb_net}
+ security_groups: [{get_resource: mog_security_group}]
+
+ server_ps04:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: [ps_server_names, 3]}
+ image: {get_param: ps_image_name}
+ flavor: {get_param: ps_flavor_name}
+ availability_zone: {get_param: availabilityzone_name}
+ networks:
+ - port: {get_resource: ps04_port_0}
+ user_data:
+ scheduler_hints: {group: {get_resource: servergroup_mog03}}
+ user_data_format: RAW
+
+ ps04_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_resource: csb_net}
+ security_groups: [{get_resource: mog_security_group}]
+
+ server_cm01:
+ type: OS::Nova::Server
+ properties:
+# config_drive: "True"
+ name: {get_param: [cm_server_names, 0]}
+ image: {get_param: cm_image_name}
+ flavor: {get_param: cm_flavor_name}
+ availability_zone: {get_param: availabilityzone_name}
+ networks:
+ - port: {get_resource: cm01_port_0}
+ - port: {get_resource: cm01_port_1}
+# block_device_mapping:
+# - device_name: vdd
+# volume_id: { get_param: cluster-manager-vol-2 }
+# - device_name: vde
+# volume_id: { get_param: cluster-manager-vol-1 }
+ user_data:
+ scheduler_hints: {group: {get_resource: servergroup_mog03}}
+ user_data_format: RAW
+
+ cm01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_resource: csb_net}
+ fixed_ips: [{"ip_address": {get_param: [csb_net_ips, 10]}}]
+ security_groups: [{get_resource: mog_security_group}]
+
+ cm01_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ fixed_ips: [{"ip_address": {get_param: [oam_net_ips, 4]}}]
+ security_groups: [{get_resource: mog_security_group}]
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..14c9a99cf7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/MANIFEST.json
@@ -0,0 +1,99 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-oam_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-oam_v1.0.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "hot-nimbus-oam-volumes_v1.0.yaml",
+ "type": "HEAT_VOL",
+ "data": [{
+ "file": "hot-nimbus-oam-volumes_v1.0.env",
+ "type": "HEAT_ENV"
+ }]
+ }
+ ]
+ },
+ {
+ "file": "hot-nimbus-pcm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pcm_v1.0.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "hot-nimbus-pcm-volumes_v1.0.yaml",
+ "type": "HEAT_VOL",
+ "data": [{
+ "file": "hot-nimbus-pcm-volumes_v1.0.env",
+ "type": "HEAT_ENV"
+ }]
+ }
+ ]
+ },
+ {
+ "file": "hot-nimbus-ppd_v1.0.yaml",
+ "type": "HEAT",
+ "data": [{
+ "file": "hot-nimbus-ppd_v1.1.env",
+ "type": "HEAT_ENV"
+ }]
+ },
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [{
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }]
+ },
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [{
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }]
+ },
+ {
+ "file": "nested-oam_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested-pcm_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested-ppd_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested-pps_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested-psm_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "cloud-nimbus.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "nimbus-ethernet",
+ "type": "OTHER"
+ },
+ {
+ "file": "nimbus-ethernet-gw",
+ "type": "OTHER"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/cloud-nimbus.sh b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/cloud-nimbus.sh
new file mode 100644
index 0000000000..8e5a486289
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/cloud-nimbus.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+echo "Running first-boot script"
+FLAG="first-boot.sh"
+echo "First boot run" > ${FLAG}
+echo "$vm_name" >> ${FLAG}
+touch /var/lib/cloud/instance/payload/launch-params
+chmod 644 /var/lib/cloud/instance/payload/launch-params
+#for i in $(ls /sys/class/net); do
+# echo "Restart $i" >> ${FLAG}
+# ifdown ${i}
+# ifup ${i}
+#done
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-oam-volumes_v1.0.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-oam-volumes_v1.0.env
new file mode 100644
index 0000000000..b494d8c270
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-oam-volumes_v1.0.env
@@ -0,0 +1,6 @@
+parameters:
+ pcrf_oam_vol_size: 500
+ pcrf_oam_volume_silver-1: Silver
+ pcrf_oam_volume_silver-2: Silver
+ pcrf_oam_vol_name_1: sde1-pcrfx01-oam001-vol-1
+ pcrf_oam_vol_name_2: sde1-pcrfx01-oam001-vol-2 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-oam-volumes_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-oam-volumes_v1.0.yaml
new file mode 100644
index 0000000000..3b05f6fc8b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-oam-volumes_v1.0.yaml
@@ -0,0 +1,45 @@
+heat_template_version: 2013-05-23
+
+parameters:
+ pcrf_oam_vol_size:
+ type: number
+ label: Cinder volume size
+ description: the size of the Cinder volume
+ pcrf_oam_vol_name_1:
+ type: string
+ label: OAM volume name 1
+ description: Assigning name to volume
+ pcrf_oam_vol_name_2:
+ type: string
+ label: OAM volume name 2
+ description: Assigning name to volume
+ pcrf_oam_volume_silver-1:
+ type: string
+ label: vm volume type
+ description: the name of the target volume backend for OAM1
+ pcrf_oam_volume_silver-2:
+ type: string
+ label: vm volume type
+ description: the name of the target volume backend for OAM2
+
+resources:
+ pcrf_oam_volume_id_11:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: pcrf_oam_vol_size}
+ volume_type: {get_param: pcrf_oam_volume_silver-1}
+ name: {get_param: pcrf_oam_vol_name_1}
+
+ pcrf_oam_volume_id_22:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: pcrf_oam_vol_size}
+ volume_type: {get_param: pcrf_oam_volume_silver-2}
+ name: {get_param: pcrf_oam_vol_name_2}
+outputs:
+ pcrf_oam_volume_id_1:
+ description: the oam 001 volume id
+ value: { get_resource: pcrf_oam_volume_id_11 }
+ pcrf_oam_volume_id_2:
+ description: the oam 002 volume id
+ value: { get_resource: pcrf_oam_volume_id_22 } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-oam_v1.0.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-oam_v1.0.env
new file mode 100644
index 0000000000..138feb5822
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-oam_v1.0.env
@@ -0,0 +1,18 @@
+parameters:
+ pcrf_oam_server_names: ZRDM1PCRF01OAM001,ZRDM1PCRF01OAM002
+ pcrf_oam_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_oam_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.111,172.26.16.112
+ pcrf_arbiter_vip: 172.26.16.115
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_oam_net_name: MNS-25180-L-01_oam_protected_net_0
+ pcrf_oam_net_ips: 107.239.64.117,107.239.64.118
+ pcrf_oam_net_gw: 107.239.64.1
+ pcrf_oam_net_mask: 255.255.248.0
+ pcrf_oam_volume_id_1: a4aa05fb-fcdc-457b-8077-6845fdfc3257
+ pcrf_oam_volume_id_2: 93d8fc1f-f1c3-4933-86b2-039881ee910f
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-oam_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-oam_v1.0.yaml
new file mode 100644
index 0000000000..2aa1235de2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-oam_v1.0.yaml
@@ -0,0 +1,109 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates multiple PCRF OAM nodes stack
+
+parameters:
+ pcrf_oam_server_names:
+ type: comma_delimited_list
+ label: PCRF OAM server names
+ description: name of the PCRF OAM instance
+ pcrf_oam_image_name:
+ type: string
+ label: PCRF OAM image name
+ description: PCRF OAM image name
+ pcrf_oam_flavor_name:
+ type: string
+ label: PCRF OAM flavor name
+ description: flavor name of PCRF OAM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_arbiter_vip:
+ type: string
+ label: OAM Arbiter LB VIP
+ description: OAM Arbiter LB VIP
+ pcrf_oam_net_name:
+ type: string
+ label: OAM network name
+ description: OAM network name
+ pcrf_oam_net_ips:
+ type: comma_delimited_list
+ label: OAM network ips
+ description: OAM network ips
+ pcrf_oam_net_gw:
+ type: string
+ label: CPS network gateway
+ description: CPS network gateway
+ pcrf_oam_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_oam_volume_id_1:
+ type: string
+ label: CPS OAM 001 Cinder Volume
+ description: CPS OAM 001 Cinder Volumes
+ pcrf_oam_volume_id_2:
+ type: string
+ label: CPS OAM 002 Cinder Volume
+ description: CPS OAM 002 Cinder Volumes
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_oam_001:
+ type: nested-oam_v1.0.yaml
+ properties:
+ pcrf_oam_server_name: { get_param: [pcrf_oam_server_names, 0] }
+ pcrf_oam_image_name: { get_param: pcrf_oam_image_name }
+ pcrf_oam_flavor_name: { get_param: pcrf_oam_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_oam_volume_id: { get_param: pcrf_oam_volume_id_1 }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_oam_net_name: { get_param: pcrf_oam_net_name }
+ pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 0] }
+ pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }
+ pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }
+ pcrf_arbiter_vip: { get_param: pcrf_arbiter_vip }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_oam_002:
+ type: nested-oam_v1.0.yaml
+ depends_on: [server_pcrf_oam_001]
+ properties:
+ pcrf_oam_server_name: { get_param: [pcrf_oam_server_names, 1] }
+ pcrf_oam_image_name: { get_param: pcrf_oam_image_name }
+ pcrf_oam_flavor_name: { get_param: pcrf_oam_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_oam_volume_id: { get_param: pcrf_oam_volume_id_2 }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_oam_net_name: { get_param: pcrf_oam_net_name }
+ pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 1] }
+ pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }
+ pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }
+ pcrf_arbiter_vip: { get_param: pcrf_arbiter_vip }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-pcm-volumes_v1.0.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-pcm-volumes_v1.0.env
new file mode 100644
index 0000000000..788365dcd3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-pcm-volumes_v1.0.env
@@ -0,0 +1,4 @@
+parameters:
+ pcrf_pcm_vol_size: 50
+ pcrf_pcm_volume_silver: Silver
+ pcrf_pcm_vol_name_1: sde1-pcrfx01-pcm001-vol-1
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-pcm-volumes_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-pcm-volumes_v1.0.yaml
new file mode 100644
index 0000000000..11a491164d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-pcm-volumes_v1.0.yaml
@@ -0,0 +1,28 @@
+heat_template_version: 2013-05-23
+
+parameters:
+ pcrf_pcm_vol_size:
+ type: number
+ label: Cinder volume size
+ description: the size of the Cinder volume
+ pcrf_pcm_vol_name_1:
+ type: string
+ label: PCM volume name
+ description: Assigning name to volume
+ pcrf_pcm_volume_silver:
+ type: string
+ label: vm volume type
+ description: the name of the target volume backend for PCM
+
+resources:
+ pcrf_pcm_volume_id_1:
+ type: OS::Cinder::Volume
+ properties:
+ size: { get_param: pcrf_pcm_vol_size }
+ volume_type: { get_param: pcrf_pcm_volume_silver }
+ name: { get_param: pcrf_pcm_vol_name_1 }
+
+outputs:
+ pcrf_pcm_volume_id_1:
+ description: the pcrf_pcm_volume_id
+ value: { get_resource: pcrf_pcm_volume_id_1 } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-pcm_v1.0.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-pcm_v1.0.env
new file mode 100644
index 0000000000..82fb510291
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-pcm_v1.0.env
@@ -0,0 +1,16 @@
+parameters:
+ pcrf_pcm_server_names: ZRDM1PCRF01PCM001
+ pcrf_pcm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pcm_flavor_name: lc.2xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.113
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_oam_net_name: MNS-25180-L-01_oam_protected_net_0
+ pcrf_oam_net_ips: 107.239.64.121
+ pcrf_oam_net_gw: 107.239.64.1
+ pcrf_oam_net_mask: 255.255.248.0
+ pcrf_pcm_volume_id_1: 3438a3fe-1241-4390-80f2-d0b86238c40e
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-pcm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-pcm_v1.0.yaml
new file mode 100644
index 0000000000..2dd7480bfc
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-pcm_v1.0.yaml
@@ -0,0 +1,80 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Cluman stack
+
+parameters:
+ pcrf_pcm_server_names:
+ type: comma_delimited_list
+ label: PCRF CM server names
+ description: name of the PCRF CM instance
+ pcrf_pcm_image_name:
+ type: string
+ label: PCRF CM image name
+ description: PCRF CM image name
+ pcrf_pcm_flavor_name:
+ type: string
+ label: PCRF CM flavor name
+ description: flavor name of PCRF CM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_oam_net_name:
+ type: string
+ label: OAM network name
+ description: OAM network name
+ pcrf_oam_net_ips:
+ type: comma_delimited_list
+ label: OAM network ips
+ description: OAM network ips
+ pcrf_oam_net_gw:
+ type: string
+ label: CPS network gateway
+ description: CPS network gateway
+ pcrf_oam_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_pcm_volume_id_1:
+ type: string
+ label: CPS Cluman Cinder Volume
+ description: CPS Cluman Cinder Volume
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_pcm_001:
+ type: nested-pcm_v1.0.yaml
+ properties:
+ pcrf_pcm_server_name: { get_param: [pcrf_pcm_server_names, 0] }
+ pcrf_pcm_image_name: { get_param: pcrf_pcm_image_name }
+ pcrf_pcm_flavor_name: { get_param: pcrf_pcm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_pcm_volume_id: { get_param: pcrf_pcm_volume_id_1 }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_oam_net_name: { get_param: pcrf_oam_net_name }
+ pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 0] }
+ pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }
+ pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-ppd_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-ppd_v1.0.yaml
new file mode 100644
index 0000000000..2fffa0df8c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-ppd_v1.0.yaml
@@ -0,0 +1,286 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Director stack
+
+parameters:
+ pcrf_ppd_server_names:
+ type: comma_delimited_list
+ label: PCRF PD server names
+ description: name of the PCRF PD instance
+ pcrf_ppd_image_name:
+ type: string
+ label: PCRF PD image name
+ description: PCRF PD image name
+ pcrf_ppd_flavor_name:
+ type: string
+ label: PCRF PD flavor name
+ description: flavor name of PCRF PD instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_lb_internal_vip:
+ type: string
+ label: CPS Internal LB VIP
+ description: CPS Internal LB VIP
+ pcrf_oam_net_name:
+ type: string
+ label: OAM network name
+ description: OAM network name
+ pcrf_oam_net_ips:
+ type: comma_delimited_list
+ label: OAM network ips
+ description: OAM network ips
+ pcrf_oam_net_gw:
+ type: string
+ label: CPS network gateway
+ description: CPS network gateway
+ pcrf_oam_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_lb_management_vip:
+ type: string
+ label: CPS OAM LB VIP
+ description: CPS OAM LB VIP
+ pcrf_gx_net_name:
+ type: string
+ label: Gx network name
+ description: Gx network name
+ pcrf_gx_net_ips:
+ type: comma_delimited_list
+ label: Gx network ips
+ description: Gx network ips
+ pcrf_gx_net_mask:
+ type: string
+ label: Gx network mask
+ description: Gx network mask
+ pcrf_sp_net_name:
+ type: string
+ label: Sp network name
+ description: Sp network name
+ pcrf_sp_net_ips:
+ type: comma_delimited_list
+ label: Sp network ips
+ description: Sp network ips
+ pcrf_sp_net_mask:
+ type: string
+ label: Sp network mask
+ description: Sp network mask
+ pcrf_sy_net_name:
+ type: string
+ label: Sy network name
+ description: Sy network name
+ pcrf_sy_net_ips:
+ type: comma_delimited_list
+ label: Sy network ips
+ description: Sy network ips
+ pcrf_sy_net_mask:
+ type: string
+ label: Sy network mask
+ description: Sy network mask
+ pcrf_rx_net_name:
+ type: string
+ label: Rx network name
+ description: Rx network name
+ pcrf_rx_net_ips:
+ type: comma_delimited_list
+ label: Rx network ips
+ description: Rx network ips
+ pcrf_rx_net_mask:
+ type: string
+ label: Rx network mask
+ description: Rx network mask
+ pcrf_sd_net_name:
+ type: string
+ label: Sd network name
+ description: Sd network name
+ pcrf_sd_net_ips:
+ type: comma_delimited_list
+ label: Sd network ips
+ description: Sd network ips
+ pcrf_sd_net_mask:
+ type: string
+ label: Sd network mask
+ description: Sd network mask
+ pcrf_sgi_sy_net_name:
+ type: string
+ label: Sgi Sy network name
+ description: Sgi Sy network name
+ pcrf_sgi_sy_net_ips:
+ type: comma_delimited_list
+ label: Sgi Sy network ips
+ description: Sgi Sy network ips
+ pcrf_sgi_sy_net_mask:
+ type: string
+ label: Sgi Sy network mask
+ description: Sgi Sy network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_ppd_001:
+ type: nested-ppd_v1.0.yaml
+ properties:
+ pcrf_ppd_server_name: { get_param: [pcrf_ppd_server_names, 0] }
+ pcrf_ppd_image_name: { get_param: pcrf_ppd_image_name }
+ pcrf_ppd_flavor_name: { get_param: pcrf_ppd_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_lb_internal_vip: { get_param: pcrf_lb_internal_vip }
+ pcrf_oam_net_name: { get_param: pcrf_oam_net_name }
+ pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 0] }
+ pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }
+ pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }
+ pcrf_lb_management_vip: { get_param: pcrf_lb_management_vip }
+ pcrf_gx_net_name: { get_param: pcrf_gx_net_name }
+ pcrf_gx_net_ip: { get_param: [pcrf_gx_net_ips, 0] }
+ pcrf_gx_net_mask: { get_param: pcrf_gx_net_mask }
+ pcrf_sp_net_name: { get_param: pcrf_sp_net_name }
+ pcrf_sp_net_ip: { get_param: [pcrf_sp_net_ips, 0] }
+ pcrf_sp_net_mask: { get_param: pcrf_sp_net_mask }
+ pcrf_sy_net_name: { get_param: pcrf_sy_net_name }
+ pcrf_sy_net_ip: { get_param: [pcrf_sy_net_ips, 0] }
+ pcrf_sy_net_mask: { get_param: pcrf_sy_net_mask }
+ pcrf_rx_net_name: { get_param: pcrf_rx_net_name }
+ pcrf_rx_net_ip: { get_param: [pcrf_rx_net_ips, 0] }
+ pcrf_rx_net_mask: { get_param: pcrf_rx_net_mask }
+ pcrf_sd_net_name: { get_param: pcrf_sd_net_name }
+ pcrf_sd_net_ip: { get_param: [pcrf_sd_net_ips, 0] }
+ pcrf_sd_net_mask: { get_param: pcrf_sd_net_mask }
+ pcrf_sgi_sy_net_name: { get_param: pcrf_sgi_sy_net_name }
+ pcrf_sgi_sy_net_ip: { get_param: [pcrf_sgi_sy_net_ips, 0] }
+ pcrf_sgi_sy_net_mask: { get_param: pcrf_sgi_sy_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_ppd_002:
+ type: nested-ppd_v1.0.yaml
+ properties:
+ pcrf_ppd_server_name: { get_param: [pcrf_ppd_server_names, 1] }
+ pcrf_ppd_image_name: { get_param: pcrf_ppd_image_name }
+ pcrf_ppd_flavor_name: { get_param: pcrf_ppd_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_lb_internal_vip: { get_param: pcrf_lb_internal_vip }
+ pcrf_oam_net_name: { get_param: pcrf_oam_net_name }
+ pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 1] }
+ pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }
+ pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }
+ pcrf_lb_management_vip: { get_param: pcrf_lb_management_vip }
+ pcrf_gx_net_name: { get_param: pcrf_gx_net_name }
+ pcrf_gx_net_ip: { get_param: [pcrf_gx_net_ips, 1] }
+ pcrf_gx_net_mask: { get_param: pcrf_gx_net_mask }
+ pcrf_sp_net_name: { get_param: pcrf_sp_net_name }
+ pcrf_sp_net_ip: { get_param: [pcrf_sp_net_ips, 1] }
+ pcrf_sp_net_mask: { get_param: pcrf_sp_net_mask }
+ pcrf_sy_net_name: { get_param: pcrf_sy_net_name }
+ pcrf_sy_net_ip: { get_param: [pcrf_sy_net_ips, 1] }
+ pcrf_sy_net_mask: { get_param: pcrf_sy_net_mask }
+ pcrf_rx_net_name: { get_param: pcrf_rx_net_name }
+ pcrf_rx_net_ip: { get_param: [pcrf_rx_net_ips, 1] }
+ pcrf_rx_net_mask: { get_param: pcrf_rx_net_mask }
+ pcrf_sd_net_name: { get_param: pcrf_sd_net_name }
+ pcrf_sd_net_ip: { get_param: [pcrf_sd_net_ips, 1] }
+ pcrf_sd_net_mask: { get_param: pcrf_sd_net_mask }
+ pcrf_sgi_sy_net_name: { get_param: pcrf_sgi_sy_net_name }
+ pcrf_sgi_sy_net_ip: { get_param: [pcrf_sgi_sy_net_ips, 1] }
+ pcrf_sgi_sy_net_mask: { get_param: pcrf_sgi_sy_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_ppd_003:
+ type: nested-ppd_v1.0.yaml
+ properties:
+ pcrf_ppd_server_name: { get_param: [pcrf_ppd_server_names, 2] }
+ pcrf_ppd_image_name: { get_param: pcrf_ppd_image_name }
+ pcrf_ppd_flavor_name: { get_param: pcrf_ppd_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_lb_internal_vip: { get_param: pcrf_lb_internal_vip }
+ pcrf_oam_net_name: { get_param: pcrf_oam_net_name }
+ pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 2] }
+ pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }
+ pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }
+ pcrf_lb_management_vip: { get_param: pcrf_lb_management_vip }
+ pcrf_gx_net_name: { get_param: pcrf_gx_net_name }
+ pcrf_gx_net_ip: { get_param: [pcrf_gx_net_ips, 2] }
+ pcrf_gx_net_mask: { get_param: pcrf_gx_net_mask }
+ pcrf_sp_net_name: { get_param: pcrf_sp_net_name }
+ pcrf_sp_net_ip: { get_param: [pcrf_sp_net_ips, 2] }
+ pcrf_sp_net_mask: { get_param: pcrf_sp_net_mask }
+ pcrf_sy_net_name: { get_param: pcrf_sy_net_name }
+ pcrf_sy_net_ip: { get_param: [pcrf_sy_net_ips, 2] }
+ pcrf_sy_net_mask: { get_param: pcrf_sy_net_mask }
+ pcrf_rx_net_name: { get_param: pcrf_rx_net_name }
+ pcrf_rx_net_ip: { get_param: [pcrf_rx_net_ips, 2] }
+ pcrf_rx_net_mask: { get_param: pcrf_rx_net_mask }
+ pcrf_sd_net_name: { get_param: pcrf_sd_net_name }
+ pcrf_sd_net_ip: { get_param: [pcrf_sd_net_ips, 2] }
+ pcrf_sd_net_mask: { get_param: pcrf_sd_net_mask }
+ pcrf_sgi_sy_net_name: { get_param: pcrf_sgi_sy_net_name }
+ pcrf_sgi_sy_net_ip: { get_param: [pcrf_sgi_sy_net_ips, 2] }
+ pcrf_sgi_sy_net_mask: { get_param: pcrf_sgi_sy_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_ppd_004:
+ type: nested-ppd_v1.0.yaml
+ properties:
+ pcrf_ppd_server_name: { get_param: [pcrf_ppd_server_names, 3] }
+ pcrf_ppd_image_name: { get_param: pcrf_ppd_image_name }
+ pcrf_ppd_flavor_name: { get_param: pcrf_ppd_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_lb_internal_vip: { get_param: pcrf_lb_internal_vip }
+ pcrf_oam_net_name: { get_param: pcrf_oam_net_name }
+ pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 3] }
+ pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }
+ pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }
+ pcrf_lb_management_vip: { get_param: pcrf_lb_management_vip }
+ pcrf_gx_net_name: { get_param: pcrf_gx_net_name }
+ pcrf_gx_net_ip: { get_param: [pcrf_gx_net_ips, 3] }
+ pcrf_gx_net_mask: { get_param: pcrf_gx_net_mask }
+ pcrf_sp_net_name: { get_param: pcrf_sp_net_name }
+ pcrf_sp_net_ip: { get_param: [pcrf_sp_net_ips, 3] }
+ pcrf_sp_net_mask: { get_param: pcrf_sp_net_mask }
+ pcrf_sy_net_name: { get_param: pcrf_sy_net_name }
+ pcrf_sy_net_ip: { get_param: [pcrf_sy_net_ips, 3] }
+ pcrf_sy_net_mask: { get_param: pcrf_sy_net_mask }
+ pcrf_rx_net_name: { get_param: pcrf_rx_net_name }
+ pcrf_rx_net_ip: { get_param: [pcrf_rx_net_ips, 3] }
+ pcrf_rx_net_mask: { get_param: pcrf_rx_net_mask }
+ pcrf_sd_net_name: { get_param: pcrf_sd_net_name }
+ pcrf_sd_net_ip: { get_param: [pcrf_sd_net_ips, 3] }
+ pcrf_sd_net_mask: { get_param: pcrf_sd_net_mask }
+ pcrf_sgi_sy_net_name: { get_param: pcrf_sgi_sy_net_name }
+ pcrf_sgi_sy_net_ip: { get_param: [pcrf_sgi_sy_net_ips, 3] }
+ pcrf_sgi_sy_net_mask: { get_param: pcrf_sgi_sy_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-ppd_v1.1.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-ppd_v1.1.env
new file mode 100644
index 0000000000..bb6dfe468c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-ppd_v1.1.env
@@ -0,0 +1,35 @@
+parameters:
+ pcrf_ppd_server_names: ZRDM1PCRF01PPD001,ZRDM1PCRF01PPD002,ZRDM1PCRF01PPD003,ZRDM1PCRF01PPD004
+ pcrf_ppd_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_ppd_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.3,172.26.16.4,172.26.16.5,172.26.16.6
+ pcrf_lb_internal_vip: 172.26.16.114
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_oam_net_name: MNS-25180-L-01_oam_protected_net_0
+ pcrf_oam_net_ips: 107.239.64.113,107.239.64.114,107.239.64.115,107.239.64.116
+ pcrf_lb_management_vip: 107.239.64.123
+ pcrf_oam_net_gw: 107.239.64.1
+ pcrf_oam_net_mask: 255.255.248.0
+ pcrf_gx_net_name: Mobisupport-25193-I-INT1_cor_pcrf_gx_net_0
+ pcrf_gx_net_ips: 107.239.24.67,107.239.24.68,107.239.24.69,107.239.24.70
+ pcrf_gx_net_mask: 255.255.255.248
+ pcrf_sp_net_name: Mobisupport-25193-I-INT1_cor_pcrf_sp_net_0
+ pcrf_sp_net_ips: 107.239.24.75,107.239.24.76,107.239.24.77,107.239.24.78
+ pcrf_sp_net_mask: 255.255.255.248
+ pcrf_sy_net_name: Mobisupport-25193-I-INT1_cor_pcrf_sy_net_0
+ pcrf_sy_net_ips: 107.239.24.83,107.239.24.84,107.239.24.85,107.239.24.86
+ pcrf_sy_net_mask: 255.255.255.248
+ pcrf_rx_net_name: Mobisupport-25193-I-INT1_cor_pcrf_rx_net_0
+ pcrf_rx_net_ips: 107.239.24.91,107.239.24.92,107.239.24.93,107.239.24.94
+ pcrf_rx_net_mask: 255.255.255.248
+ pcrf_sd_net_name: Mobisupport-25193-I-INT1_cor_pcrf_sd_net_0
+ pcrf_sd_net_ips: 107.239.24.99,107.239.24.100,107.239.24.101,107.239.24.102
+ pcrf_sd_net_mask: 255.255.255.248
+ pcrf_sgi_sy_net_name: Mobisupport-25193-I-INT1_sgi_pcrf_sy_net_0
+ pcrf_sgi_sy_net_ips: 107.239.26.131,107.239.26.132,107.239.26.133,107.239.26.134
+ pcrf_sgi_sy_net_mask: 255.255.255.248
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..340be2b815
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,11 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..05bd6c9318
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,121 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_pps_001:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_002:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 1] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_003:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 2] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_004:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 3] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_005:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 4] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_006:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f24e4763c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,10 @@
+parameters:
+ pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..c2d7b05ead
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,199 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_psm_001:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_002:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 1] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_003:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 2] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_004:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 3] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_005:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 4] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_006:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 5] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_007:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 6] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 6] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_008:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 7] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 7] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_009:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 8] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 8] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_010:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 9] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 9] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_011:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 10] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 10] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_012:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nested-oam_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nested-oam_v1.0.yaml
new file mode 100644
index 0000000000..a832498a6c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nested-oam_v1.0.yaml
@@ -0,0 +1,156 @@
+heat_template_version: 2013-05-23
+
+description: nested heat template that creates a PCRF OAM node stack
+
+parameters:
+ pcrf_oam_server_name:
+ type: string
+ label: PCRF OAM server name
+ description: PCRF OAM server name
+ pcrf_oam_image_name:
+ type: string
+ label: image name
+ description: PCRF OAM image name
+ pcrf_oam_flavor_name:
+ type: string
+ label: PCRF OAM flavor name
+ description: flavor name of PCRF OAM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_arbiter_vip:
+ type: string
+ label: OAM Arbiter LB VIP
+ description: OAM Arbiter LB VIP
+ pcrf_oam_net_name:
+ type: string
+ label: OAM network name
+ description: OAM network name
+ pcrf_oam_net_ip:
+ type: string
+ label: OAM network ip
+ description: OAM network ip
+ pcrf_oam_net_gw:
+ type: string
+ label: CPS network gateway
+ description: CPS network gateway
+ pcrf_oam_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_oam_volume_id:
+ type: string
+ label: CPS OAM Cinder Volume
+ description: CPS OAM Cinder Volume
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: "file:///nimbus-ethernet" }
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth1
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: nimbus-ethernet-gw }
+ params:
+ $dev: eth1
+ $ip: { get_param: pcrf_oam_net_ip }
+ $netmask: { get_param: pcrf_oam_net_mask }
+ $gateway: { get_param: pcrf_oam_net_gw }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+ - ifdown eth1 && ifup eth1
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ template: { get_file: cloud-nimbus.sh }
+ params:
+ $vm_name: { get_param: pcrf_oam_server_name }
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_oam:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_oam_server_name }
+ image: { get_param: pcrf_oam_image_name }
+ flavor: { get_param: pcrf_oam_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcrf_oam_port_0}
+ - port: { get_resource: pcrf_oam_port_1}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_oam_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ allowed_address_pairs:
+ - ip_address: { get_param: pcrf_arbiter_vip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
+
+ pcrf_oam_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_oam_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_oam_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
+
+ pcrf_oam_vol_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: { get_param: pcrf_oam_volume_id }
+ mountpoint: /dev/vdd
+ instance_uuid: { get_resource: pcrf_server_oam }
+
+outputs:
+ pcrf_oam_vol_attachment_id:
+ description: the pcrf_oam_vol_attachment_id id
+ value: { get_resource: pcrf_oam_vol_attachment }
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nested-pcm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nested-pcm_v1.0.yaml
new file mode 100644
index 0000000000..820d09b3dc
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nested-pcm_v1.0.yaml
@@ -0,0 +1,150 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Cluman stack
+
+parameters:
+ pcrf_pcm_server_name:
+ type: string
+ label: PCRF CM server name
+ description: PCRF CM server name
+ pcrf_pcm_image_name:
+ type: string
+ label: image name
+ description: PCRF CM image name
+ pcrf_pcm_flavor_name:
+ type: string
+ label: PCRF CM flavor name
+ description: flavor name of PCRF CM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_oam_net_name:
+ type: string
+ label: OAM network name
+ description: OAM network name
+ pcrf_oam_net_ip:
+ type: string
+ label: OAM network ip
+ description: OAM network ip
+ pcrf_oam_net_gw:
+ type: string
+ label: CPS network gateway
+ description: CPS network gateway
+ pcrf_oam_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_pcm_volume_id:
+ type: string
+ label: CPS Cluman Cinder Volume
+ description: CPS Cluman Cinder Volume
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: nimbus-ethernet }
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth1
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: nimbus-ethernet-gw }
+ params:
+ $dev: eth1
+ $ip: { get_param: pcrf_oam_net_ip }
+ $netmask: { get_param: pcrf_oam_net_mask }
+ $gateway: { get_param: pcrf_oam_net_gw }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+ - ifdown eth1 && ifup eth1
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ template: { get_file: cloud-nimbus.sh }
+ params:
+ $vm_name: { get_param: pcrf_pcm_server_name }
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_pcm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_pcm_server_name }
+ image: { get_param: pcrf_pcm_image_name }
+ flavor: { get_param: pcrf_pcm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcrf_pcm_port_0}
+ - port: { get_resource: pcrf_pcm_port_1}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_pcm_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
+
+ pcrf_pcm_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_oam_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_oam_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
+
+ volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: { get_param: pcrf_pcm_volume_id }
+ mountpoint: /dev/vdd
+ instance_uuid: { get_resource: pcrf_server_pcm }
+
+outputs:
+ pcrf_server_pcm_id:
+ description: the pcm server id
+ value: { get_resource: pcrf_server_pcm } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nested-ppd_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nested-ppd_v1.0.yaml
new file mode 100644
index 0000000000..397e85c252
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nested-ppd_v1.0.yaml
@@ -0,0 +1,333 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Director stack
+
+parameters:
+ pcrf_ppd_server_name:
+ type: string
+ label: PCRF PD server name
+ description: PCRF PD server name
+ pcrf_ppd_image_name:
+ type: string
+ label: image name
+ description: PCRF PD image name
+ pcrf_ppd_flavor_name:
+ type: string
+ label: PCRF PD flavor name
+ description: flavor name of PCRF PD instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_lb_internal_vip:
+ type: string
+ label: CPS Internal LB VIP
+ description: CPS Internal LB VIP
+ pcrf_oam_net_name:
+ type: string
+ label: OAM network name
+ description: OAM network name
+ pcrf_oam_net_ip:
+ type: string
+ label: OAM network ip
+ description: OAM network ip
+ pcrf_oam_net_gw:
+ type: string
+ label: CPS network gateway
+ description: CPS network gateway
+ pcrf_oam_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_lb_management_vip:
+ type: string
+ label: CPS OAM LB VIP
+ description: CPS OAM LB VIP
+ pcrf_gx_net_name:
+ type: string
+ label: Gx network name
+ description: Gx network name
+ pcrf_gx_net_ip:
+ type: string
+ label: Gx network ip
+ description: Gx network ip
+ pcrf_gx_net_mask:
+ type: string
+ label: Gx network mask
+ description: Gx network mask
+ pcrf_sp_net_name:
+ type: string
+ label: Sp network name
+ description: Sp network name
+ pcrf_sp_net_ip:
+ type: string
+ label: Sp network ip
+ description: Sp network ip
+ pcrf_sp_net_mask:
+ type: string
+ label: Sp network mask
+ description: Sp network mask
+ pcrf_sy_net_name:
+ type: string
+ label: Sy network name
+ description: Sy network name
+ pcrf_sy_net_ip:
+ type: string
+ label: Sy network ip
+ description: Sy network ip
+ pcrf_sy_net_mask:
+ type: string
+ label: Sy network mask
+ description: Sy network mask
+ pcrf_rx_net_name:
+ type: string
+ label: Rx network name
+ description: Rx network name
+ pcrf_rx_net_ip:
+ type: string
+ label: Rx network ip
+ description: Rx network ip
+ pcrf_rx_net_mask:
+ type: string
+ label: Rx network mask
+ description: Rx network mask
+ pcrf_sd_net_name:
+ type: string
+ label: Sd network name
+ description: Sd network name
+ pcrf_sd_net_ip:
+ type: string
+ label: Sd network ip
+ description: Sd network ip
+ pcrf_sd_net_mask:
+ type: string
+ label: Sd network mask
+ description: Sd network mask
+ pcrf_sgi_sy_net_name:
+ type: string
+ label: Sgi Sy network name
+ description: Sgi Sy network name
+ pcrf_sgi_sy_net_ip:
+ type: string
+ label: Sgi Sy network ip
+ description: Sgi Sy network ip
+ pcrf_sgi_sy_net_mask:
+ type: string
+ label: Sgi Sy network mask
+ description: Sgi Sy network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: nimbus-ethernet }
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth1
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: nimbus-ethernet-gw }
+ params:
+ $dev: eth1
+ $ip: { get_param: pcrf_oam_net_ip }
+ $netmask: { get_param: pcrf_oam_net_mask }
+ $gateway: { get_param: pcrf_oam_net_gw }
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth2
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: nimbus-ethernet }
+ params:
+ $dev: eth2
+ $ip: { get_param: pcrf_gx_net_ip }
+ $netmask: { get_param: pcrf_gx_net_mask }
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth3
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: nimbus-ethernet }
+ params:
+ $dev: eth3
+ $ip: { get_param: pcrf_sp_net_ip }
+ $netmask: { get_param: pcrf_sp_net_mask }
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth4
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: nimbus-ethernet }
+ params:
+ $dev: eth4
+ $ip: { get_param: pcrf_sy_net_ip }
+ $netmask: { get_param: pcrf_sy_net_mask }
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth5
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: nimbus-ethernet }
+ params:
+ $dev: eth5
+ $ip: { get_param: pcrf_rx_net_ip }
+ $netmask: { get_param: pcrf_rx_net_mask }
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth6
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: nimbus-ethernet }
+ params:
+ $dev: eth6
+ $ip: { get_param: pcrf_sd_net_ip }
+ $netmask: { get_param: pcrf_sd_net_mask }
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth7
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: nimbus-ethernet }
+ params:
+ $dev: eth7
+ $ip: { get_param: pcrf_sgi_sy_net_ip }
+ $netmask: { get_param: pcrf_sgi_sy_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+ - ifdown eth1 && ifup eth1
+ - ifdown eth2 && ifup eth2
+ - ifdown eth3 && ifup eth3
+ - ifdown eth4 && ifup eth4
+ - ifdown eth5 && ifup eth5
+ - ifdown eth6 && ifup eth6
+ - ifdown eth7 && ifup eth7
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ template: { get_file: cloud-nimbus.sh }
+ params:
+ $vm_name: { get_param: pcrf_ppd_server_name }
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_ppd:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_ppd_server_name }
+ image: { get_param: pcrf_ppd_image_name }
+ flavor: { get_param: pcrf_ppd_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcrf_ppd_port_0}
+ - port: { get_resource: pcrf_ppd_port_1}
+ - port: { get_resource: pcrf_ppd_port_2}
+ - port: { get_resource: pcrf_ppd_port_3}
+ - port: { get_resource: pcrf_ppd_port_4}
+ - port: { get_resource: pcrf_ppd_port_5}
+ - port: { get_resource: pcrf_ppd_port_6}
+ - port: { get_resource: pcrf_ppd_port_7}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_ppd_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
+ allowed_address_pairs:
+ - ip_address: { get_param: pcrf_lb_internal_vip }
+
+ pcrf_ppd_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_oam_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_oam_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
+ allowed_address_pairs:
+ - ip_address: { get_param: pcrf_lb_management_vip }
+
+ pcrf_ppd_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_gx_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_gx_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
+
+ pcrf_ppd_port_3:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_sp_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_sp_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
+
+ pcrf_ppd_port_4:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_sy_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_sy_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
+
+ pcrf_ppd_port_5:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_rx_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_rx_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
+
+ pcrf_ppd_port_6:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_sd_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_sd_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
+
+ pcrf_ppd_port_7:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_sgi_sy_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_sgi_sy_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nested-pps_v1.0.yaml
new file mode 100644
index 0000000000..fc5b6f74c3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nested-pps_v1.0.yaml
@@ -0,0 +1,99 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_name:
+ type: string
+ label: PCRF PS server name
+ description: PCRF PS server name
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ template: { get_file: cloud-nimbus.sh }
+ params:
+ $vm_name: { get_param: pcrf_pps_server_name }
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: nimbus-ethernet }
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_pps:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_pps_server_name }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcrf_pps_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_pps_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nested-psm_v1.0.yaml
new file mode 100644
index 0000000000..c86aa34713
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nested-psm_v1.0.yaml
@@ -0,0 +1,99 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_name:
+ type: string
+ label: PCRF SM server name
+ description: PCRF SM server name
+ pcrf_psm_image_name:
+ type: string
+ label: image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: nimbus-ethernet }
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ template: { get_file: cloud-nimbus.sh }
+ params:
+ $vm_name: { get_param: pcrf_psm_server_name }
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_psm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_psm_server_name }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: psm01_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+ #scheduler_hints: {group: { get_resource: servergroup_nimbus }}
+
+ psm01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }] \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nimbus-ethernet b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nimbus-ethernet
new file mode 100644
index 0000000000..51250a7b82
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nimbus-ethernet
@@ -0,0 +1,5 @@
+DEVICE=$dev
+BOOTPROTO=none
+NM_CONTROLLED=no
+IPADDR=$ip
+NETMASK=$netmask
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nimbus-ethernet-gw b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nimbus-ethernet-gw
new file mode 100644
index 0000000000..3e08d643bb
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/inputfiles/nimbus-ethernet-gw
@@ -0,0 +1,6 @@
+DEVICE=$dev
+BOOTPROTO=none
+NM_CONTROLLED=no
+IPADDR=$ip
+NETMASK=$netmask
+GATEWAY=$gateway
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..e04c27f8fc
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,642 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.nested-pps_v1.0:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ pcrf_cps_net_ip:
+ type: string
+ description: CPS network ip
+ availabilityzone_name:
+ type: string
+ description: availabilityzone name
+ pcrf_vnf_id:
+ type: string
+ description: PCRF VNF Id
+ pcrf_cps_net_name:
+ type: string
+ description: CPS network name
+ pcrf_cps_net_mask:
+ type: string
+ description: CPS network mask
+ pcrf_pps_image_name:
+ type: string
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ description: flavor name of PCRF PS instance
+ pcrf_pps_server_name:
+ type: string
+ description: PCRF PS server name
+ pcrf_security_group_name:
+ type: string
+ description: the name of security group
+ requirements:
+ - link_pcrf_pps_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_pcrf_server_pps:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ capabilities:
+ binding_pcrf_server_pps:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_pcrf_pps_port_0:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_pcrf_server_pps:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_pcrf_server_pps:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_pcrf_server_pps:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_pcrf_server_pps:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ org.openecomp.resource.abstract.nodes.heat.nested-ppd_v1.0:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ pcrf_ppd_image_name:
+ type: string
+ description: PCRF PD image name
+ availabilityzone_name:
+ type: string
+ description: availabilityzone name
+ pcrf_sp_net_ip:
+ type: string
+ description: Sp network ip
+ pcrf_ppd_server_name:
+ type: string
+ description: PCRF PD server name
+ pcrf_gx_net_ip:
+ type: string
+ description: Gx network ip
+ pcrf_sy_net_name:
+ type: string
+ description: Sy network name
+ pcrf_sp_net_mask:
+ type: string
+ description: Sp network mask
+ pcrf_sd_net_ip:
+ type: string
+ description: Sd network ip
+ pcrf_vnf_id:
+ type: string
+ description: PCRF VNF Id
+ pcrf_oam_net_name:
+ type: string
+ description: OAM network name
+ pcrf_oam_net_ip:
+ type: string
+ description: OAM network ip
+ pcrf_cps_net_mask:
+ type: string
+ description: CPS network mask
+ pcrf_gx_net_mask:
+ type: string
+ description: Gx network mask
+ pcrf_sgi_sy_net_name:
+ type: string
+ description: Sgi Sy network name
+ pcrf_sd_net_name:
+ type: string
+ description: Sd network name
+ pcrf_oam_net_gw:
+ type: string
+ description: CPS network gateway
+ pcrf_rx_net_name:
+ type: string
+ description: Rx network name
+ pcrf_rx_net_ip:
+ type: string
+ description: Rx network ip
+ pcrf_sy_net_ip:
+ type: string
+ description: Sy network ip
+ pcrf_sgi_sy_net_ip:
+ type: string
+ description: Sgi Sy network ip
+ pcrf_ppd_flavor_name:
+ type: string
+ description: flavor name of PCRF PD instance
+ pcrf_cps_net_ip:
+ type: string
+ description: CPS network ip
+ pcrf_sy_net_mask:
+ type: string
+ description: Sy network mask
+ pcrf_cps_net_name:
+ type: string
+ description: CPS network name
+ pcrf_oam_net_mask:
+ type: string
+ description: CPS network mask
+ pcrf_lb_management_vip:
+ type: string
+ description: CPS OAM LB VIP
+ pcrf_sgi_sy_net_mask:
+ type: string
+ description: Sgi Sy network mask
+ pcrf_lb_internal_vip:
+ type: string
+ description: CPS Internal LB VIP
+ pcrf_sd_net_mask:
+ type: string
+ description: Sd network mask
+ pcrf_gx_net_name:
+ type: string
+ description: Gx network name
+ pcrf_sp_net_name:
+ type: string
+ description: Sp network name
+ pcrf_rx_net_mask:
+ type: string
+ description: Rx network mask
+ pcrf_security_group_name:
+ type: string
+ description: the name of security group
+ requirements:
+ - link_pcrf_ppd_port_5:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_pcrf_ppd_port_6:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_pcrf_ppd_port_3:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_pcrf_server_ppd:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_pcrf_ppd_port_4:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_pcrf_ppd_port_7:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_pcrf_ppd_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_pcrf_ppd_port_2:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_pcrf_ppd_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ attachment_pcrf_ppd_port_1:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_pcrf_ppd_port_2:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_pcrf_server_ppd:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_pcrf_ppd_port_0:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_pcrf_ppd_port_5:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_pcrf_ppd_port_6:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_pcrf_ppd_port_3:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_pcrf_server_ppd:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_pcrf_ppd_port_4:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_pcrf_server_ppd:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_pcrf_server_ppd:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_pcrf_ppd_port_7:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_pcrf_server_ppd:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ org.openecomp.resource.abstract.nodes.heat.nested-pcm_v1.0:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ pcrf_pcm_flavor_name:
+ type: string
+ description: flavor name of PCRF CM instance
+ availabilityzone_name:
+ type: string
+ description: availabilityzone name
+ pcrf_cps_net_ip:
+ type: string
+ description: CPS network ip
+ pcrf_pcm_image_name:
+ type: string
+ description: PCRF CM image name
+ pcrf_vnf_id:
+ type: string
+ description: PCRF VNF Id
+ pcrf_oam_net_name:
+ type: string
+ description: OAM network name
+ pcrf_cps_net_name:
+ type: string
+ description: CPS network name
+ pcrf_oam_net_ip:
+ type: string
+ description: OAM network ip
+ pcrf_oam_net_mask:
+ type: string
+ description: CPS network mask
+ pcrf_cps_net_mask:
+ type: string
+ description: CPS network mask
+ pcrf_pcm_server_name:
+ type: string
+ description: PCRF CM server name
+ pcrf_oam_net_gw:
+ type: string
+ description: CPS network gateway
+ pcrf_pcm_volume_id:
+ type: string
+ description: CPS Cluman Cinder Volume
+ pcrf_security_group_name:
+ type: string
+ description: the name of security group
+ attributes:
+ pcrf_server_pcm_id:
+ type: string
+ description: the pcm server id
+ requirements:
+ - link_pcrf_pcm_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_pcrf_server_pcm:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_pcrf_pcm_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ endpoint_pcrf_server_pcm:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_pcrf_pcm_port_0:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_pcrf_server_pcm:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_pcrf_server_pcm:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_pcrf_server_pcm:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_pcrf_server_pcm:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_pcrf_pcm_port_1:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ org.openecomp.resource.abstract.nodes.heat.nested-oam_v1.0:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ availabilityzone_name:
+ type: string
+ description: availabilityzone name
+ pcrf_oam_flavor_name:
+ type: string
+ description: flavor name of PCRF OAM instance
+ pcrf_oam_server_name:
+ type: string
+ description: PCRF OAM server name
+ pcrf_cps_net_ip:
+ type: string
+ description: CPS network ip
+ pcrf_vnf_id:
+ type: string
+ description: PCRF VNF Id
+ pcrf_oam_net_name:
+ type: string
+ description: OAM network name
+ pcrf_cps_net_name:
+ type: string
+ description: CPS network name
+ pcrf_arbiter_vip:
+ type: string
+ description: OAM Arbiter LB VIP
+ pcrf_oam_net_ip:
+ type: string
+ description: OAM network ip
+ pcrf_oam_net_mask:
+ type: string
+ description: CPS network mask
+ pcrf_cps_net_mask:
+ type: string
+ description: CPS network mask
+ pcrf_oam_volume_id:
+ type: string
+ description: CPS OAM Cinder Volume
+ pcrf_oam_net_gw:
+ type: string
+ description: CPS network gateway
+ pcrf_oam_image_name:
+ type: string
+ description: PCRF OAM image name
+ pcrf_security_group_name:
+ type: string
+ description: the name of security group
+ attributes:
+ pcrf_oam_vol_attachment_id:
+ type: string
+ description: the pcrf_oam_vol_attachment_id id
+ requirements:
+ - local_storage_pcrf_server_oam:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_pcrf_oam_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_pcrf_oam_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ endpoint_pcrf_server_oam:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_pcrf_server_oam:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_pcrf_server_oam:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_pcrf_oam_port_1:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_pcrf_oam_port_0:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_pcrf_server_oam:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_pcrf_server_oam:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ org.openecomp.resource.abstract.nodes.heat.nested-psm_v1.0:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ pcrf_cps_net_ip:
+ type: string
+ description: CPS network ip
+ pcrf_psm_flavor_name:
+ type: string
+ description: flavor name of PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ description: PCRF SM image name
+ availabilityzone_name:
+ type: string
+ description: availabilityzone name
+ pcrf_vnf_id:
+ type: string
+ description: PCRF VNF Id
+ pcrf_cps_net_name:
+ type: string
+ description: CPS network name
+ pcrf_cps_net_mask:
+ type: string
+ description: CPS network mask
+ pcrf_psm_server_name:
+ type: string
+ description: PCRF SM server name
+ pcrf_security_group_name:
+ type: string
+ description: the name of security group
+ requirements:
+ - local_storage_pcrf_server_psm:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_psm01_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ endpoint_pcrf_server_psm:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_pcrf_server_psm:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_pcrf_server_psm:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_psm01_port_0:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_pcrf_server_psm:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_pcrf_server_psm:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..d6c309eb24
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/MainServiceTemplate.yaml
@@ -0,0 +1,1646 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ availabilityzone_name:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ default: nova
+ pcrf_sgi_sy_net_ips:
+ label: Sgi Sy network ips
+ hidden: false
+ immutable: false
+ type: list
+ description: Sgi Sy network ips
+ default:
+ - 107.239.26.131
+ - 107.239.26.132
+ - 107.239.26.133
+ - 107.239.26.134
+ entry_schema:
+ type: string
+ pcrf_ppd_server_names:
+ label: PCRF PD server names
+ hidden: false
+ immutable: false
+ type: list
+ description: name of the PCRF PD instance
+ default:
+ - ZRDM1PCRF01PPD001
+ - ZRDM1PCRF01PPD002
+ - ZRDM1PCRF01PPD003
+ - ZRDM1PCRF01PPD004
+ entry_schema:
+ type: string
+ pcrf_oam_vol_size:
+ label: Cinder volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the Cinder volume
+ default: 500
+ pcrf_oam_vol_name_2:
+ label: OAM volume name 2
+ hidden: false
+ immutable: false
+ type: string
+ description: Assigning name to volume
+ default: sde1-pcrfx01-oam001-vol-2
+ pcrf_pps_flavor_name:
+ label: PCRF PS flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor name of PCRF PS instance
+ default: lc.3xlarge
+ pcrf_psm_server_names:
+ label: PCRF SM server names
+ hidden: false
+ immutable: false
+ type: list
+ description: name of the PCRF SM instance
+ default:
+ - ZRDM1PCRF01PSM001
+ - ZRDM1PCRF01PSM002
+ - ZRDM1PCRF01PSM003
+ - ZRDM1PCRF01PSM004
+ - ZRDM1PCRF01PSM005
+ - ZRDM1PCRF01PSM006
+ - ZRDM1PCRF01PSM007
+ - ZRDM1PCRF01PSM008
+ - ZRDM1PCRF01PSM009
+ - ZRDM1PCRF01PSM010
+ - ZRDM1PCRF01PSM011
+ - ZRDM1PCRF01PSM012
+ entry_schema:
+ type: string
+ pcrf_oam_vol_name_1:
+ label: OAM volume name 1
+ hidden: false
+ immutable: false
+ type: string
+ description: Assigning name to volume
+ default: sde1-pcrfx01-oam001-vol-1
+ pcrf_sy_net_name:
+ label: Sy network name
+ hidden: false
+ immutable: false
+ type: string
+ description: Sy network name
+ default: Mobisupport-25193-I-INT1_cor_pcrf_sy_net_0
+ pcrf_pcm_vol_size:
+ label: Cinder volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the Cinder volume
+ default: 50
+ pcrf_vnf_id:
+ label: PCRF VNF Id
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF VNF Id
+ default: 730797234b4a40aa99335157b02871cd
+ pcrf_pcm_image_name:
+ label: PCRF CM image name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF CM image name
+ default: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_oam_net_name:
+ label: OAM network name
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM network name
+ default: MNS-25180-L-01_oam_protected_net_0
+ pcrf_sd_net_ips:
+ label: Sd network ips
+ hidden: false
+ immutable: false
+ type: list
+ description: Sd network ips
+ default:
+ - 107.239.24.99
+ - 107.239.24.100
+ - 107.239.24.101
+ - 107.239.24.102
+ entry_schema:
+ type: string
+ pcrf_sp_net_ips:
+ label: Sp network ips
+ hidden: false
+ immutable: false
+ type: list
+ description: Sp network ips
+ default:
+ - 107.239.24.75
+ - 107.239.24.76
+ - 107.239.24.77
+ - 107.239.24.78
+ entry_schema:
+ type: string
+ pcrf_cps_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ default: 255.255.255.0
+ pcrf_pcm_volume_silver:
+ label: vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend for PCM
+ default: Silver
+ pcrf_rx_net_ips:
+ label: Rx network ips
+ hidden: false
+ immutable: false
+ type: list
+ description: Rx network ips
+ default:
+ - 107.239.24.91
+ - 107.239.24.92
+ - 107.239.24.93
+ - 107.239.24.94
+ entry_schema:
+ type: string
+ pcrf_sgi_sy_net_name:
+ label: Sgi Sy network name
+ hidden: false
+ immutable: false
+ type: string
+ description: Sgi Sy network name
+ default: Mobisupport-25193-I-INT1_sgi_pcrf_sy_net_0
+ pcrf_sd_net_name:
+ label: Sd network name
+ hidden: false
+ immutable: false
+ type: string
+ description: Sd network name
+ default: Mobisupport-25193-I-INT1_cor_pcrf_sd_net_0
+ pcrf_pcm_volume_id_1:
+ label: CPS Cluman Cinder Volume
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS Cluman Cinder Volume
+ default: 3438a3fe-1241-4390-80f2-d0b86238c40e
+ pcrf_oam_volume_silver-2:
+ label: vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend for OAM2
+ default: Silver
+ pcrf_oam_volume_silver-1:
+ label: vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend for OAM1
+ default: Silver
+ pcrf_oam_flavor_name:
+ label: PCRF OAM flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor name of PCRF OAM instance
+ default: lc.4xlarge4
+ pcrf_pcm_server_names:
+ label: PCRF CM server names
+ hidden: false
+ immutable: false
+ type: list
+ description: name of the PCRF CM instance
+ default:
+ - ZRDM1PCRF01PCM001
+ entry_schema:
+ type: string
+ pcrf_cps_net_name:
+ label: CPS network name
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network name
+ default: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_oam_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ default: 255.255.248.0
+ pcrf_sgi_sy_net_mask:
+ label: Sgi Sy network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: Sgi Sy network mask
+ default: 255.255.255.248
+ pcrf_pps_image_name:
+ label: PCRF PS image name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF PS image name
+ default: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_lb_internal_vip:
+ label: CPS Internal LB VIP
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS Internal LB VIP
+ default: 172.26.16.114
+ pcrf_pcm_flavor_name:
+ label: PCRF CM flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor name of PCRF CM instance
+ default: lc.2xlarge4
+ pcrf_ppd_image_name:
+ label: PCRF PD image name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF PD image name
+ default: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pcm_vol_name_1:
+ label: PCM volume name
+ hidden: false
+ immutable: false
+ type: string
+ description: Assigning name to volume
+ default: sde1-pcrfx01-pcm001-vol-1
+ pcrf_sp_net_mask:
+ label: Sp network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: Sp network mask
+ default: 255.255.255.248
+ pcrf_psm_flavor_name:
+ label: PCRF SM flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor name of PCRF SM instance
+ default: lc.4xlarge4
+ pcrf_psm_image_name:
+ label: PCRF SM image name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF SM image name
+ default: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_oam_net_ips:
+ label: OAM network ips
+ hidden: false
+ immutable: false
+ type: list
+ description: OAM network ips
+ default:
+ - 107.239.64.121
+ entry_schema:
+ type: string
+ pcrf_gx_net_mask:
+ label: Gx network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: Gx network mask
+ default: 255.255.255.248
+ pcrf_oam_net_gw:
+ label: CPS network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network gateway
+ default: 107.239.64.1
+ pcrf_gx_net_ips:
+ label: Gx network ips
+ hidden: false
+ immutable: false
+ type: list
+ description: Gx network ips
+ default:
+ - 107.239.24.67
+ - 107.239.24.68
+ - 107.239.24.69
+ - 107.239.24.70
+ entry_schema:
+ type: string
+ pcrf_rx_net_name:
+ label: Rx network name
+ hidden: false
+ immutable: false
+ type: string
+ description: Rx network name
+ default: Mobisupport-25193-I-INT1_cor_pcrf_rx_net_0
+ pcrf_oam_image_name:
+ label: PCRF OAM image name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF OAM image name
+ default: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_cps_net_ips:
+ label: CPS network ips
+ hidden: false
+ immutable: false
+ type: list
+ description: CPS network ips
+ default:
+ - 172.26.16.113
+ entry_schema:
+ type: string
+ pcrf_oam_volume_id_1:
+ label: CPS OAM 001 Cinder Volume
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS OAM 001 Cinder Volumes
+ default: a4aa05fb-fcdc-457b-8077-6845fdfc3257
+ pcrf_oam_volume_id_2:
+ label: CPS OAM 002 Cinder Volume
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS OAM 002 Cinder Volumes
+ default: 93d8fc1f-f1c3-4933-86b2-039881ee910f
+ pcrf_pps_server_names:
+ label: PCRF PS server names
+ hidden: false
+ immutable: false
+ type: list
+ description: PCRF PS server names
+ default:
+ - ZRDM1PCRF01PPS001
+ - ZRDM1PCRF01PPS002
+ - ZRDM1PCRF01PPS003
+ - ZRDM1PCRF01PPS004
+ - ZRDM1PCRF01PPS005
+ - ZRDM1PCRF01PPS006
+ entry_schema:
+ type: string
+ pcrf_ppd_flavor_name:
+ label: PCRF PD flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor name of PCRF PD instance
+ default: lc.4xlarge4
+ pcrf_sy_net_mask:
+ label: Sy network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: Sy network mask
+ default: 255.255.255.248
+ pcrf_arbiter_vip:
+ label: OAM Arbiter LB VIP
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM Arbiter LB VIP
+ default: 172.26.16.115
+ pcrf_lb_management_vip:
+ label: CPS OAM LB VIP
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS OAM LB VIP
+ default: 107.239.64.123
+ pcrf_sy_net_ips:
+ label: Sy network ips
+ hidden: false
+ immutable: false
+ type: list
+ description: Sy network ips
+ default:
+ - 107.239.24.83
+ - 107.239.24.84
+ - 107.239.24.85
+ - 107.239.24.86
+ entry_schema:
+ type: string
+ pcrf_sd_net_mask:
+ label: Sd network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: Sd network mask
+ default: 255.255.255.248
+ pcrf_gx_net_name:
+ label: Gx network name
+ hidden: false
+ immutable: false
+ type: string
+ description: Gx network name
+ default: Mobisupport-25193-I-INT1_cor_pcrf_gx_net_0
+ pcrf_sp_net_name:
+ label: Sp network name
+ hidden: false
+ immutable: false
+ type: string
+ description: Sp network name
+ default: Mobisupport-25193-I-INT1_cor_pcrf_sp_net_0
+ pcrf_oam_server_names:
+ label: PCRF OAM server names
+ hidden: false
+ immutable: false
+ type: list
+ description: name of the PCRF OAM instance
+ default:
+ - ZRDM1PCRF01OAM001
+ - ZRDM1PCRF01OAM002
+ entry_schema:
+ type: string
+ pcrf_security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ default: nimbus_security_group
+ pcrf_rx_net_mask:
+ label: Rx network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: Rx network mask
+ default: 255.255.255.248
+ node_templates:
+ server_pcrf_psm_012:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-psm_v1.0
+ directives:
+ - substitutable
+ properties:
+ pcrf_cps_net_ip:
+ get_input:
+ - pcrf_cps_net_ips
+ - 11
+ service_template_filter:
+ substitute_service_template: nested-psm_v1.0ServiceTemplate.yaml
+ pcrf_psm_flavor_name:
+ get_input: pcrf_psm_flavor_name
+ pcrf_psm_image_name:
+ get_input: pcrf_psm_image_name
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcrf_vnf_id:
+ get_input: pcrf_vnf_id
+ pcrf_cps_net_name:
+ get_input: pcrf_cps_net_name
+ pcrf_cps_net_mask:
+ get_input: pcrf_cps_net_mask
+ pcrf_psm_server_name:
+ get_input:
+ - pcrf_psm_server_names
+ - 11
+ pcrf_security_group_name:
+ get_input: pcrf_security_group_name
+ server_pcrf_pcm_001:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v1.0
+ directives:
+ - substitutable
+ properties:
+ pcrf_pcm_flavor_name:
+ get_input: pcrf_pcm_flavor_name
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcrf_cps_net_ip:
+ get_input:
+ - pcrf_cps_net_ips
+ - 0
+ service_template_filter:
+ substitute_service_template: nested-pcm_v1.0ServiceTemplate.yaml
+ pcrf_pcm_image_name:
+ get_input: pcrf_pcm_image_name
+ pcrf_vnf_id:
+ get_input: pcrf_vnf_id
+ pcrf_oam_net_name:
+ get_input: pcrf_oam_net_name
+ pcrf_cps_net_name:
+ get_input: pcrf_cps_net_name
+ pcrf_oam_net_ip:
+ get_input:
+ - pcrf_oam_net_ips
+ - 0
+ pcrf_oam_net_mask:
+ get_input: pcrf_oam_net_mask
+ pcrf_cps_net_mask:
+ get_input: pcrf_cps_net_mask
+ pcrf_pcm_server_name:
+ get_input:
+ - pcrf_pcm_server_names
+ - 0
+ pcrf_pcm_volume_id:
+ get_input: pcrf_pcm_volume_id_1
+ pcrf_oam_net_gw:
+ get_input: pcrf_oam_net_gw
+ pcrf_security_group_name:
+ get_input: pcrf_security_group_name
+ requirements:
+ - local_storage_pcrf_server_pcm:
+ capability: tosca.capabilities.Attachment
+ node: pcrf_pcm_volume_id_1
+ relationship: tosca.relationships.AttachesTo
+ pcrf_oam_volume_id_11:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ volume_type:
+ get_input: pcrf_oam_volume_silver-1
+ size: '(get_input : pcrf_oam_vol_size) * 1024'
+ name:
+ get_input: pcrf_oam_vol_name_1
+ server_pcrf_oam_001:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-oam_v1.0
+ directives:
+ - substitutable
+ properties:
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcrf_oam_flavor_name:
+ get_input: pcrf_oam_flavor_name
+ pcrf_oam_server_name:
+ get_input:
+ - pcrf_oam_server_names
+ - 0
+ pcrf_cps_net_ip:
+ get_input:
+ - pcrf_cps_net_ips
+ - 0
+ service_template_filter:
+ substitute_service_template: nested-oam_v1.0ServiceTemplate.yaml
+ pcrf_vnf_id:
+ get_input: pcrf_vnf_id
+ pcrf_oam_net_name:
+ get_input: pcrf_oam_net_name
+ pcrf_cps_net_name:
+ get_input: pcrf_cps_net_name
+ pcrf_oam_net_ip:
+ get_input:
+ - pcrf_oam_net_ips
+ - 0
+ pcrf_oam_net_mask:
+ get_input: pcrf_oam_net_mask
+ pcrf_arbiter_vip:
+ get_input: pcrf_arbiter_vip
+ pcrf_cps_net_mask:
+ get_input: pcrf_cps_net_mask
+ pcrf_oam_volume_id:
+ get_input: pcrf_oam_volume_id_1
+ pcrf_oam_net_gw:
+ get_input: pcrf_oam_net_gw
+ pcrf_oam_image_name:
+ get_input: pcrf_oam_image_name
+ pcrf_security_group_name:
+ get_input: pcrf_security_group_name
+ requirements:
+ - local_storage_pcrf_server_oam:
+ capability: tosca.capabilities.Attachment
+ node: pcrf_oam_volume_id_11
+ relationship: tosca.relationships.AttachesTo
+ server_pcrf_oam_002:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-oam_v1.0
+ directives:
+ - substitutable
+ properties:
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcrf_oam_flavor_name:
+ get_input: pcrf_oam_flavor_name
+ pcrf_oam_server_name:
+ get_input:
+ - pcrf_oam_server_names
+ - 1
+ pcrf_cps_net_ip:
+ get_input:
+ - pcrf_cps_net_ips
+ - 1
+ service_template_filter:
+ substitute_service_template: nested-oam_v1.0ServiceTemplate.yaml
+ pcrf_vnf_id:
+ get_input: pcrf_vnf_id
+ pcrf_oam_net_name:
+ get_input: pcrf_oam_net_name
+ pcrf_cps_net_name:
+ get_input: pcrf_cps_net_name
+ pcrf_oam_net_ip:
+ get_input:
+ - pcrf_oam_net_ips
+ - 1
+ pcrf_oam_net_mask:
+ get_input: pcrf_oam_net_mask
+ pcrf_arbiter_vip:
+ get_input: pcrf_arbiter_vip
+ pcrf_cps_net_mask:
+ get_input: pcrf_cps_net_mask
+ pcrf_oam_volume_id:
+ get_input: pcrf_oam_volume_id_2
+ pcrf_oam_net_gw:
+ get_input: pcrf_oam_net_gw
+ pcrf_oam_image_name:
+ get_input: pcrf_oam_image_name
+ pcrf_security_group_name:
+ get_input: pcrf_security_group_name
+ requirements:
+ - local_storage_pcrf_server_oam:
+ capability: tosca.capabilities.Attachment
+ node: pcrf_oam_volume_id_22
+ relationship: tosca.relationships.AttachesTo
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: server_pcrf_oam_001
+ relationship: tosca.relationships.DependsOn
+ server_pcrf_ppd_003:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-ppd_v1.0
+ directives:
+ - substitutable
+ properties:
+ pcrf_ppd_image_name:
+ get_input: pcrf_ppd_image_name
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcrf_sp_net_ip:
+ get_input:
+ - pcrf_sp_net_ips
+ - 2
+ pcrf_ppd_server_name:
+ get_input:
+ - pcrf_ppd_server_names
+ - 2
+ pcrf_gx_net_ip:
+ get_input:
+ - pcrf_gx_net_ips
+ - 2
+ pcrf_sy_net_name:
+ get_input: pcrf_sy_net_name
+ pcrf_sp_net_mask:
+ get_input: pcrf_sp_net_mask
+ service_template_filter:
+ substitute_service_template: nested-ppd_v1.0ServiceTemplate.yaml
+ pcrf_sd_net_ip:
+ get_input:
+ - pcrf_sd_net_ips
+ - 2
+ pcrf_vnf_id:
+ get_input: pcrf_vnf_id
+ pcrf_oam_net_name:
+ get_input: pcrf_oam_net_name
+ pcrf_oam_net_ip:
+ get_input:
+ - pcrf_oam_net_ips
+ - 2
+ pcrf_cps_net_mask:
+ get_input: pcrf_cps_net_mask
+ pcrf_gx_net_mask:
+ get_input: pcrf_gx_net_mask
+ pcrf_sgi_sy_net_name:
+ get_input: pcrf_sgi_sy_net_name
+ pcrf_sd_net_name:
+ get_input: pcrf_sd_net_name
+ pcrf_oam_net_gw:
+ get_input: pcrf_oam_net_gw
+ pcrf_rx_net_name:
+ get_input: pcrf_rx_net_name
+ pcrf_rx_net_ip:
+ get_input:
+ - pcrf_rx_net_ips
+ - 2
+ pcrf_sy_net_ip:
+ get_input:
+ - pcrf_sy_net_ips
+ - 2
+ pcrf_sgi_sy_net_ip:
+ get_input:
+ - pcrf_sgi_sy_net_ips
+ - 2
+ pcrf_ppd_flavor_name:
+ get_input: pcrf_ppd_flavor_name
+ pcrf_cps_net_ip:
+ get_input:
+ - pcrf_cps_net_ips
+ - 2
+ pcrf_sy_net_mask:
+ get_input: pcrf_sy_net_mask
+ pcrf_cps_net_name:
+ get_input: pcrf_cps_net_name
+ pcrf_oam_net_mask:
+ get_input: pcrf_oam_net_mask
+ pcrf_lb_management_vip:
+ get_input: pcrf_lb_management_vip
+ pcrf_sgi_sy_net_mask:
+ get_input: pcrf_sgi_sy_net_mask
+ pcrf_lb_internal_vip:
+ get_input: pcrf_lb_internal_vip
+ pcrf_sd_net_mask:
+ get_input: pcrf_sd_net_mask
+ pcrf_gx_net_name:
+ get_input: pcrf_gx_net_name
+ pcrf_sp_net_name:
+ get_input: pcrf_sp_net_name
+ pcrf_security_group_name:
+ get_input: pcrf_security_group_name
+ pcrf_rx_net_mask:
+ get_input: pcrf_rx_net_mask
+ server_pcrf_ppd_004:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-ppd_v1.0
+ directives:
+ - substitutable
+ properties:
+ pcrf_ppd_image_name:
+ get_input: pcrf_ppd_image_name
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcrf_sp_net_ip:
+ get_input:
+ - pcrf_sp_net_ips
+ - 3
+ pcrf_ppd_server_name:
+ get_input:
+ - pcrf_ppd_server_names
+ - 3
+ pcrf_gx_net_ip:
+ get_input:
+ - pcrf_gx_net_ips
+ - 3
+ pcrf_sy_net_name:
+ get_input: pcrf_sy_net_name
+ pcrf_sp_net_mask:
+ get_input: pcrf_sp_net_mask
+ service_template_filter:
+ substitute_service_template: nested-ppd_v1.0ServiceTemplate.yaml
+ pcrf_sd_net_ip:
+ get_input:
+ - pcrf_sd_net_ips
+ - 3
+ pcrf_vnf_id:
+ get_input: pcrf_vnf_id
+ pcrf_oam_net_name:
+ get_input: pcrf_oam_net_name
+ pcrf_oam_net_ip:
+ get_input:
+ - pcrf_oam_net_ips
+ - 3
+ pcrf_cps_net_mask:
+ get_input: pcrf_cps_net_mask
+ pcrf_gx_net_mask:
+ get_input: pcrf_gx_net_mask
+ pcrf_sgi_sy_net_name:
+ get_input: pcrf_sgi_sy_net_name
+ pcrf_sd_net_name:
+ get_input: pcrf_sd_net_name
+ pcrf_oam_net_gw:
+ get_input: pcrf_oam_net_gw
+ pcrf_rx_net_name:
+ get_input: pcrf_rx_net_name
+ pcrf_rx_net_ip:
+ get_input:
+ - pcrf_rx_net_ips
+ - 3
+ pcrf_sy_net_ip:
+ get_input:
+ - pcrf_sy_net_ips
+ - 3
+ pcrf_sgi_sy_net_ip:
+ get_input:
+ - pcrf_sgi_sy_net_ips
+ - 3
+ pcrf_ppd_flavor_name:
+ get_input: pcrf_ppd_flavor_name
+ pcrf_cps_net_ip:
+ get_input:
+ - pcrf_cps_net_ips
+ - 3
+ pcrf_sy_net_mask:
+ get_input: pcrf_sy_net_mask
+ pcrf_cps_net_name:
+ get_input: pcrf_cps_net_name
+ pcrf_oam_net_mask:
+ get_input: pcrf_oam_net_mask
+ pcrf_lb_management_vip:
+ get_input: pcrf_lb_management_vip
+ pcrf_sgi_sy_net_mask:
+ get_input: pcrf_sgi_sy_net_mask
+ pcrf_lb_internal_vip:
+ get_input: pcrf_lb_internal_vip
+ pcrf_sd_net_mask:
+ get_input: pcrf_sd_net_mask
+ pcrf_gx_net_name:
+ get_input: pcrf_gx_net_name
+ pcrf_sp_net_name:
+ get_input: pcrf_sp_net_name
+ pcrf_security_group_name:
+ get_input: pcrf_security_group_name
+ pcrf_rx_net_mask:
+ get_input: pcrf_rx_net_mask
+ pcrf_pcm_volume_id_1:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ volume_type:
+ get_input: pcrf_pcm_volume_silver
+ size: '(get_input : pcrf_pcm_vol_size) * 1024'
+ name:
+ get_input: pcrf_pcm_vol_name_1
+ server_pcrf_ppd_001:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-ppd_v1.0
+ directives:
+ - substitutable
+ properties:
+ pcrf_ppd_image_name:
+ get_input: pcrf_ppd_image_name
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcrf_sp_net_ip:
+ get_input:
+ - pcrf_sp_net_ips
+ - 0
+ pcrf_ppd_server_name:
+ get_input:
+ - pcrf_ppd_server_names
+ - 0
+ pcrf_gx_net_ip:
+ get_input:
+ - pcrf_gx_net_ips
+ - 0
+ pcrf_sy_net_name:
+ get_input: pcrf_sy_net_name
+ pcrf_sp_net_mask:
+ get_input: pcrf_sp_net_mask
+ service_template_filter:
+ substitute_service_template: nested-ppd_v1.0ServiceTemplate.yaml
+ pcrf_sd_net_ip:
+ get_input:
+ - pcrf_sd_net_ips
+ - 0
+ pcrf_vnf_id:
+ get_input: pcrf_vnf_id
+ pcrf_oam_net_name:
+ get_input: pcrf_oam_net_name
+ pcrf_oam_net_ip:
+ get_input:
+ - pcrf_oam_net_ips
+ - 0
+ pcrf_cps_net_mask:
+ get_input: pcrf_cps_net_mask
+ pcrf_gx_net_mask:
+ get_input: pcrf_gx_net_mask
+ pcrf_sgi_sy_net_name:
+ get_input: pcrf_sgi_sy_net_name
+ pcrf_sd_net_name:
+ get_input: pcrf_sd_net_name
+ pcrf_oam_net_gw:
+ get_input: pcrf_oam_net_gw
+ pcrf_rx_net_name:
+ get_input: pcrf_rx_net_name
+ pcrf_rx_net_ip:
+ get_input:
+ - pcrf_rx_net_ips
+ - 0
+ pcrf_sy_net_ip:
+ get_input:
+ - pcrf_sy_net_ips
+ - 0
+ pcrf_sgi_sy_net_ip:
+ get_input:
+ - pcrf_sgi_sy_net_ips
+ - 0
+ pcrf_ppd_flavor_name:
+ get_input: pcrf_ppd_flavor_name
+ pcrf_cps_net_ip:
+ get_input:
+ - pcrf_cps_net_ips
+ - 0
+ pcrf_sy_net_mask:
+ get_input: pcrf_sy_net_mask
+ pcrf_cps_net_name:
+ get_input: pcrf_cps_net_name
+ pcrf_oam_net_mask:
+ get_input: pcrf_oam_net_mask
+ pcrf_lb_management_vip:
+ get_input: pcrf_lb_management_vip
+ pcrf_sgi_sy_net_mask:
+ get_input: pcrf_sgi_sy_net_mask
+ pcrf_lb_internal_vip:
+ get_input: pcrf_lb_internal_vip
+ pcrf_sd_net_mask:
+ get_input: pcrf_sd_net_mask
+ pcrf_gx_net_name:
+ get_input: pcrf_gx_net_name
+ pcrf_sp_net_name:
+ get_input: pcrf_sp_net_name
+ pcrf_security_group_name:
+ get_input: pcrf_security_group_name
+ pcrf_rx_net_mask:
+ get_input: pcrf_rx_net_mask
+ server_pcrf_ppd_002:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-ppd_v1.0
+ directives:
+ - substitutable
+ properties:
+ pcrf_ppd_image_name:
+ get_input: pcrf_ppd_image_name
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcrf_sp_net_ip:
+ get_input:
+ - pcrf_sp_net_ips
+ - 1
+ pcrf_ppd_server_name:
+ get_input:
+ - pcrf_ppd_server_names
+ - 1
+ pcrf_gx_net_ip:
+ get_input:
+ - pcrf_gx_net_ips
+ - 1
+ pcrf_sy_net_name:
+ get_input: pcrf_sy_net_name
+ pcrf_sp_net_mask:
+ get_input: pcrf_sp_net_mask
+ service_template_filter:
+ substitute_service_template: nested-ppd_v1.0ServiceTemplate.yaml
+ pcrf_sd_net_ip:
+ get_input:
+ - pcrf_sd_net_ips
+ - 1
+ pcrf_vnf_id:
+ get_input: pcrf_vnf_id
+ pcrf_oam_net_name:
+ get_input: pcrf_oam_net_name
+ pcrf_oam_net_ip:
+ get_input:
+ - pcrf_oam_net_ips
+ - 1
+ pcrf_cps_net_mask:
+ get_input: pcrf_cps_net_mask
+ pcrf_gx_net_mask:
+ get_input: pcrf_gx_net_mask
+ pcrf_sgi_sy_net_name:
+ get_input: pcrf_sgi_sy_net_name
+ pcrf_sd_net_name:
+ get_input: pcrf_sd_net_name
+ pcrf_oam_net_gw:
+ get_input: pcrf_oam_net_gw
+ pcrf_rx_net_name:
+ get_input: pcrf_rx_net_name
+ pcrf_rx_net_ip:
+ get_input:
+ - pcrf_rx_net_ips
+ - 1
+ pcrf_sy_net_ip:
+ get_input:
+ - pcrf_sy_net_ips
+ - 1
+ pcrf_sgi_sy_net_ip:
+ get_input:
+ - pcrf_sgi_sy_net_ips
+ - 1
+ pcrf_ppd_flavor_name:
+ get_input: pcrf_ppd_flavor_name
+ pcrf_cps_net_ip:
+ get_input:
+ - pcrf_cps_net_ips
+ - 1
+ pcrf_sy_net_mask:
+ get_input: pcrf_sy_net_mask
+ pcrf_cps_net_name:
+ get_input: pcrf_cps_net_name
+ pcrf_oam_net_mask:
+ get_input: pcrf_oam_net_mask
+ pcrf_lb_management_vip:
+ get_input: pcrf_lb_management_vip
+ pcrf_sgi_sy_net_mask:
+ get_input: pcrf_sgi_sy_net_mask
+ pcrf_lb_internal_vip:
+ get_input: pcrf_lb_internal_vip
+ pcrf_sd_net_mask:
+ get_input: pcrf_sd_net_mask
+ pcrf_gx_net_name:
+ get_input: pcrf_gx_net_name
+ pcrf_sp_net_name:
+ get_input: pcrf_sp_net_name
+ pcrf_security_group_name:
+ get_input: pcrf_security_group_name
+ pcrf_rx_net_mask:
+ get_input: pcrf_rx_net_mask
+ server_pcrf_psm_003:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-psm_v1.0
+ directives:
+ - substitutable
+ properties:
+ pcrf_cps_net_ip:
+ get_input:
+ - pcrf_cps_net_ips
+ - 2
+ service_template_filter:
+ substitute_service_template: nested-psm_v1.0ServiceTemplate.yaml
+ pcrf_psm_flavor_name:
+ get_input: pcrf_psm_flavor_name
+ pcrf_psm_image_name:
+ get_input: pcrf_psm_image_name
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcrf_vnf_id:
+ get_input: pcrf_vnf_id
+ pcrf_cps_net_name:
+ get_input: pcrf_cps_net_name
+ pcrf_cps_net_mask:
+ get_input: pcrf_cps_net_mask
+ pcrf_psm_server_name:
+ get_input:
+ - pcrf_psm_server_names
+ - 2
+ pcrf_security_group_name:
+ get_input: pcrf_security_group_name
+ server_pcrf_psm_004:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-psm_v1.0
+ directives:
+ - substitutable
+ properties:
+ pcrf_cps_net_ip:
+ get_input:
+ - pcrf_cps_net_ips
+ - 3
+ service_template_filter:
+ substitute_service_template: nested-psm_v1.0ServiceTemplate.yaml
+ pcrf_psm_flavor_name:
+ get_input: pcrf_psm_flavor_name
+ pcrf_psm_image_name:
+ get_input: pcrf_psm_image_name
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcrf_vnf_id:
+ get_input: pcrf_vnf_id
+ pcrf_cps_net_name:
+ get_input: pcrf_cps_net_name
+ pcrf_cps_net_mask:
+ get_input: pcrf_cps_net_mask
+ pcrf_psm_server_name:
+ get_input:
+ - pcrf_psm_server_names
+ - 3
+ pcrf_security_group_name:
+ get_input: pcrf_security_group_name
+ server_pcrf_psm_001:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-psm_v1.0
+ directives:
+ - substitutable
+ properties:
+ pcrf_cps_net_ip:
+ get_input:
+ - pcrf_cps_net_ips
+ - 0
+ service_template_filter:
+ substitute_service_template: nested-psm_v1.0ServiceTemplate.yaml
+ pcrf_psm_flavor_name:
+ get_input: pcrf_psm_flavor_name
+ pcrf_psm_image_name:
+ get_input: pcrf_psm_image_name
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcrf_vnf_id:
+ get_input: pcrf_vnf_id
+ pcrf_cps_net_name:
+ get_input: pcrf_cps_net_name
+ pcrf_cps_net_mask:
+ get_input: pcrf_cps_net_mask
+ pcrf_psm_server_name:
+ get_input:
+ - pcrf_psm_server_names
+ - 0
+ pcrf_security_group_name:
+ get_input: pcrf_security_group_name
+ server_pcrf_psm_002:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-psm_v1.0
+ directives:
+ - substitutable
+ properties:
+ pcrf_cps_net_ip:
+ get_input:
+ - pcrf_cps_net_ips
+ - 1
+ service_template_filter:
+ substitute_service_template: nested-psm_v1.0ServiceTemplate.yaml
+ pcrf_psm_flavor_name:
+ get_input: pcrf_psm_flavor_name
+ pcrf_psm_image_name:
+ get_input: pcrf_psm_image_name
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcrf_vnf_id:
+ get_input: pcrf_vnf_id
+ pcrf_cps_net_name:
+ get_input: pcrf_cps_net_name
+ pcrf_cps_net_mask:
+ get_input: pcrf_cps_net_mask
+ pcrf_psm_server_name:
+ get_input:
+ - pcrf_psm_server_names
+ - 1
+ pcrf_security_group_name:
+ get_input: pcrf_security_group_name
+ server_pcrf_psm_007:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-psm_v1.0
+ directives:
+ - substitutable
+ properties:
+ pcrf_cps_net_ip:
+ get_input:
+ - pcrf_cps_net_ips
+ - 6
+ service_template_filter:
+ substitute_service_template: nested-psm_v1.0ServiceTemplate.yaml
+ pcrf_psm_flavor_name:
+ get_input: pcrf_psm_flavor_name
+ pcrf_psm_image_name:
+ get_input: pcrf_psm_image_name
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcrf_vnf_id:
+ get_input: pcrf_vnf_id
+ pcrf_cps_net_name:
+ get_input: pcrf_cps_net_name
+ pcrf_cps_net_mask:
+ get_input: pcrf_cps_net_mask
+ pcrf_psm_server_name:
+ get_input:
+ - pcrf_psm_server_names
+ - 6
+ pcrf_security_group_name:
+ get_input: pcrf_security_group_name
+ server_pcrf_psm_008:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-psm_v1.0
+ directives:
+ - substitutable
+ properties:
+ pcrf_cps_net_ip:
+ get_input:
+ - pcrf_cps_net_ips
+ - 7
+ service_template_filter:
+ substitute_service_template: nested-psm_v1.0ServiceTemplate.yaml
+ pcrf_psm_flavor_name:
+ get_input: pcrf_psm_flavor_name
+ pcrf_psm_image_name:
+ get_input: pcrf_psm_image_name
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcrf_vnf_id:
+ get_input: pcrf_vnf_id
+ pcrf_cps_net_name:
+ get_input: pcrf_cps_net_name
+ pcrf_cps_net_mask:
+ get_input: pcrf_cps_net_mask
+ pcrf_psm_server_name:
+ get_input:
+ - pcrf_psm_server_names
+ - 7
+ pcrf_security_group_name:
+ get_input: pcrf_security_group_name
+ server_pcrf_psm_005:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-psm_v1.0
+ directives:
+ - substitutable
+ properties:
+ pcrf_cps_net_ip:
+ get_input:
+ - pcrf_cps_net_ips
+ - 4
+ service_template_filter:
+ substitute_service_template: nested-psm_v1.0ServiceTemplate.yaml
+ pcrf_psm_flavor_name:
+ get_input: pcrf_psm_flavor_name
+ pcrf_psm_image_name:
+ get_input: pcrf_psm_image_name
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcrf_vnf_id:
+ get_input: pcrf_vnf_id
+ pcrf_cps_net_name:
+ get_input: pcrf_cps_net_name
+ pcrf_cps_net_mask:
+ get_input: pcrf_cps_net_mask
+ pcrf_psm_server_name:
+ get_input:
+ - pcrf_psm_server_names
+ - 4
+ pcrf_security_group_name:
+ get_input: pcrf_security_group_name
+ server_pcrf_psm_006:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-psm_v1.0
+ directives:
+ - substitutable
+ properties:
+ pcrf_cps_net_ip:
+ get_input:
+ - pcrf_cps_net_ips
+ - 5
+ service_template_filter:
+ substitute_service_template: nested-psm_v1.0ServiceTemplate.yaml
+ pcrf_psm_flavor_name:
+ get_input: pcrf_psm_flavor_name
+ pcrf_psm_image_name:
+ get_input: pcrf_psm_image_name
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcrf_vnf_id:
+ get_input: pcrf_vnf_id
+ pcrf_cps_net_name:
+ get_input: pcrf_cps_net_name
+ pcrf_cps_net_mask:
+ get_input: pcrf_cps_net_mask
+ pcrf_psm_server_name:
+ get_input:
+ - pcrf_psm_server_names
+ - 5
+ pcrf_security_group_name:
+ get_input: pcrf_security_group_name
+ pcrf_oam_volume_id_22:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ volume_type:
+ get_input: pcrf_oam_volume_silver-2
+ size: '(get_input : pcrf_oam_vol_size) * 1024'
+ name:
+ get_input: pcrf_oam_vol_name_2
+ server_pcrf_psm_009:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-psm_v1.0
+ directives:
+ - substitutable
+ properties:
+ pcrf_cps_net_ip:
+ get_input:
+ - pcrf_cps_net_ips
+ - 8
+ service_template_filter:
+ substitute_service_template: nested-psm_v1.0ServiceTemplate.yaml
+ pcrf_psm_flavor_name:
+ get_input: pcrf_psm_flavor_name
+ pcrf_psm_image_name:
+ get_input: pcrf_psm_image_name
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcrf_vnf_id:
+ get_input: pcrf_vnf_id
+ pcrf_cps_net_name:
+ get_input: pcrf_cps_net_name
+ pcrf_cps_net_mask:
+ get_input: pcrf_cps_net_mask
+ pcrf_psm_server_name:
+ get_input:
+ - pcrf_psm_server_names
+ - 8
+ pcrf_security_group_name:
+ get_input: pcrf_security_group_name
+ server_pcrf_pps_001:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-pps_v1.0
+ directives:
+ - substitutable
+ properties:
+ pcrf_cps_net_ip:
+ get_input:
+ - pcrf_cps_net_ips
+ - 0
+ service_template_filter:
+ substitute_service_template: nested-pps_v1.0ServiceTemplate.yaml
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcrf_vnf_id:
+ get_input: pcrf_vnf_id
+ pcrf_cps_net_name:
+ get_input: pcrf_cps_net_name
+ pcrf_cps_net_mask:
+ get_input: pcrf_cps_net_mask
+ pcrf_pps_image_name:
+ get_input: pcrf_pps_image_name
+ pcrf_pps_flavor_name:
+ get_input: pcrf_pps_flavor_name
+ pcrf_pps_server_name:
+ get_input:
+ - pcrf_pps_server_names
+ - 0
+ pcrf_security_group_name:
+ get_input: pcrf_security_group_name
+ server_pcrf_pps_002:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-pps_v1.0
+ directives:
+ - substitutable
+ properties:
+ pcrf_cps_net_ip:
+ get_input:
+ - pcrf_cps_net_ips
+ - 1
+ service_template_filter:
+ substitute_service_template: nested-pps_v1.0ServiceTemplate.yaml
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcrf_vnf_id:
+ get_input: pcrf_vnf_id
+ pcrf_cps_net_name:
+ get_input: pcrf_cps_net_name
+ pcrf_cps_net_mask:
+ get_input: pcrf_cps_net_mask
+ pcrf_pps_image_name:
+ get_input: pcrf_pps_image_name
+ pcrf_pps_flavor_name:
+ get_input: pcrf_pps_flavor_name
+ pcrf_pps_server_name:
+ get_input:
+ - pcrf_pps_server_names
+ - 1
+ pcrf_security_group_name:
+ get_input: pcrf_security_group_name
+ server_pcrf_pps_003:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-pps_v1.0
+ directives:
+ - substitutable
+ properties:
+ pcrf_cps_net_ip:
+ get_input:
+ - pcrf_cps_net_ips
+ - 2
+ service_template_filter:
+ substitute_service_template: nested-pps_v1.0ServiceTemplate.yaml
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcrf_vnf_id:
+ get_input: pcrf_vnf_id
+ pcrf_cps_net_name:
+ get_input: pcrf_cps_net_name
+ pcrf_cps_net_mask:
+ get_input: pcrf_cps_net_mask
+ pcrf_pps_image_name:
+ get_input: pcrf_pps_image_name
+ pcrf_pps_flavor_name:
+ get_input: pcrf_pps_flavor_name
+ pcrf_pps_server_name:
+ get_input:
+ - pcrf_pps_server_names
+ - 2
+ pcrf_security_group_name:
+ get_input: pcrf_security_group_name
+ server_pcrf_pps_004:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-pps_v1.0
+ directives:
+ - substitutable
+ properties:
+ pcrf_cps_net_ip:
+ get_input:
+ - pcrf_cps_net_ips
+ - 3
+ service_template_filter:
+ substitute_service_template: nested-pps_v1.0ServiceTemplate.yaml
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcrf_vnf_id:
+ get_input: pcrf_vnf_id
+ pcrf_cps_net_name:
+ get_input: pcrf_cps_net_name
+ pcrf_cps_net_mask:
+ get_input: pcrf_cps_net_mask
+ pcrf_pps_image_name:
+ get_input: pcrf_pps_image_name
+ pcrf_pps_flavor_name:
+ get_input: pcrf_pps_flavor_name
+ pcrf_pps_server_name:
+ get_input:
+ - pcrf_pps_server_names
+ - 3
+ pcrf_security_group_name:
+ get_input: pcrf_security_group_name
+ server_pcrf_pps_005:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-pps_v1.0
+ directives:
+ - substitutable
+ properties:
+ pcrf_cps_net_ip:
+ get_input:
+ - pcrf_cps_net_ips
+ - 4
+ service_template_filter:
+ substitute_service_template: nested-pps_v1.0ServiceTemplate.yaml
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcrf_vnf_id:
+ get_input: pcrf_vnf_id
+ pcrf_cps_net_name:
+ get_input: pcrf_cps_net_name
+ pcrf_cps_net_mask:
+ get_input: pcrf_cps_net_mask
+ pcrf_pps_image_name:
+ get_input: pcrf_pps_image_name
+ pcrf_pps_flavor_name:
+ get_input: pcrf_pps_flavor_name
+ pcrf_pps_server_name:
+ get_input:
+ - pcrf_pps_server_names
+ - 4
+ pcrf_security_group_name:
+ get_input: pcrf_security_group_name
+ server_pcrf_pps_006:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-pps_v1.0
+ directives:
+ - substitutable
+ properties:
+ pcrf_cps_net_ip:
+ get_input:
+ - pcrf_cps_net_ips
+ - 5
+ service_template_filter:
+ substitute_service_template: nested-pps_v1.0ServiceTemplate.yaml
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcrf_vnf_id:
+ get_input: pcrf_vnf_id
+ pcrf_cps_net_name:
+ get_input: pcrf_cps_net_name
+ pcrf_cps_net_mask:
+ get_input: pcrf_cps_net_mask
+ pcrf_pps_image_name:
+ get_input: pcrf_pps_image_name
+ pcrf_pps_flavor_name:
+ get_input: pcrf_pps_flavor_name
+ pcrf_pps_server_name:
+ get_input:
+ - pcrf_pps_server_names
+ - 5
+ pcrf_security_group_name:
+ get_input: pcrf_security_group_name
+ server_pcrf_psm_010:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-psm_v1.0
+ directives:
+ - substitutable
+ properties:
+ pcrf_cps_net_ip:
+ get_input:
+ - pcrf_cps_net_ips
+ - 9
+ service_template_filter:
+ substitute_service_template: nested-psm_v1.0ServiceTemplate.yaml
+ pcrf_psm_flavor_name:
+ get_input: pcrf_psm_flavor_name
+ pcrf_psm_image_name:
+ get_input: pcrf_psm_image_name
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcrf_vnf_id:
+ get_input: pcrf_vnf_id
+ pcrf_cps_net_name:
+ get_input: pcrf_cps_net_name
+ pcrf_cps_net_mask:
+ get_input: pcrf_cps_net_mask
+ pcrf_psm_server_name:
+ get_input:
+ - pcrf_psm_server_names
+ - 9
+ pcrf_security_group_name:
+ get_input: pcrf_security_group_name
+ server_pcrf_psm_011:
+ type: org.openecomp.resource.abstract.nodes.heat.nested-psm_v1.0
+ directives:
+ - substitutable
+ properties:
+ pcrf_cps_net_ip:
+ get_input:
+ - pcrf_cps_net_ips
+ - 10
+ service_template_filter:
+ substitute_service_template: nested-psm_v1.0ServiceTemplate.yaml
+ pcrf_psm_flavor_name:
+ get_input: pcrf_psm_flavor_name
+ pcrf_psm_image_name:
+ get_input: pcrf_psm_image_name
+ availabilityzone_name:
+ get_input: availabilityzone_name
+ pcrf_vnf_id:
+ get_input: pcrf_vnf_id
+ pcrf_cps_net_name:
+ get_input: pcrf_cps_net_name
+ pcrf_cps_net_mask:
+ get_input: pcrf_cps_net_mask
+ pcrf_psm_server_name:
+ get_input:
+ - pcrf_psm_server_names
+ - 10
+ pcrf_security_group_name:
+ get_input: pcrf_security_group_name
+ groups:
+ hot-nimbus-ppd_v1.0:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot-nimbus-ppd_v1.0.yaml
+ description: heat template that creates PCRF Policy Director stack
+ members:
+ - server_pcrf_ppd_003
+ - server_pcrf_ppd_004
+ - server_pcrf_ppd_001
+ - server_pcrf_ppd_002
+ hot-nimbus-pcm_v1.0:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot-nimbus-pcm_v1.0.yaml
+ description: heat template that creates PCRF Cluman stack
+ members:
+ - server_pcrf_pcm_001
+ hot-nimbus-oam_v1.0:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot-nimbus-oam_v1.0.yaml
+ description: heat template that creates multiple PCRF OAM nodes stack
+ members:
+ - server_pcrf_oam_001
+ - server_pcrf_oam_002
+ hot-nimbus-oam-volumes_v1.0:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot-nimbus-oam-volumes_v1.0.yaml
+ members:
+ - pcrf_oam_volume_id_11
+ - pcrf_oam_volume_id_22
+ hot-nimbus-psm_v1.0:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot-nimbus-psm_v1.0.yaml
+ description: heat template that creates PCRF Session Manager stack
+ members:
+ - server_pcrf_psm_003
+ - server_pcrf_psm_004
+ - server_pcrf_psm_001
+ - server_pcrf_psm_012
+ - server_pcrf_psm_002
+ - server_pcrf_psm_007
+ - server_pcrf_psm_008
+ - server_pcrf_psm_005
+ - server_pcrf_psm_006
+ - server_pcrf_psm_009
+ - server_pcrf_psm_010
+ - server_pcrf_psm_011
+ hot-nimbus-pcm-volumes_v1.0:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot-nimbus-pcm-volumes_v1.0.yaml
+ members:
+ - pcrf_pcm_volume_id_1
+ hot-nimbus-pps_v1.0:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot-nimbus-pps_v1.0.yaml
+ description: heat template that creates PCRF Policy Server stack
+ members:
+ - server_pcrf_pps_001
+ - server_pcrf_pps_002
+ - server_pcrf_pps_003
+ - server_pcrf_pps_004
+ - server_pcrf_pps_005
+ - server_pcrf_pps_006
+ outputs:
+ pcrf_oam_volume_id_1:
+ description: the oam 001 volume id
+ value: pcrf_oam_volume_id_11
+ pcrf_oam_volume_id_2:
+ description: the oam 002 volume id
+ value: pcrf_oam_volume_id_22
+ pcrf_pcm_volume_id_1:
+ description: the pcrf_pcm_volume_id
+ value: pcrf_pcm_volume_id_1 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/nested-oam_v1.0ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/nested-oam_v1.0ServiceTemplate.yaml
new file mode 100644
index 0000000000..59b9cde00c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/nested-oam_v1.0ServiceTemplate.yaml
@@ -0,0 +1,225 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested-oam_v1.0
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.pcrf_oam_server:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ availabilityzone_name:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ pcrf_oam_flavor_name:
+ label: PCRF OAM flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor name of PCRF OAM instance
+ pcrf_oam_server_name:
+ label: PCRF OAM server name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF OAM server name
+ pcrf_cps_net_ip:
+ label: CPS network ip
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network ip
+ pcrf_vnf_id:
+ label: PCRF VNF Id
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF VNF Id
+ pcrf_oam_net_name:
+ label: OAM network name
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM network name
+ pcrf_cps_net_name:
+ label: CPS network name
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network name
+ pcrf_arbiter_vip:
+ label: OAM Arbiter LB VIP
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM Arbiter LB VIP
+ pcrf_oam_net_ip:
+ label: OAM network ip
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM network ip
+ pcrf_oam_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ pcrf_cps_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ pcrf_oam_volume_id:
+ label: CPS OAM Cinder Volume
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS OAM Cinder Volume
+ pcrf_oam_net_gw:
+ label: CPS network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network gateway
+ pcrf_oam_image_name:
+ label: image name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF OAM image name
+ pcrf_security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ node_templates:
+ pcrf_server_oam:
+ type: org.openecomp.resource.vfc.nodes.heat.pcrf_oam_server
+ properties:
+ flavor:
+ get_input: pcrf_oam_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcrf_oam_image_name
+ config_drive: 'True'
+ metadata:
+ vnf_id:
+ get_input: pcrf_vnf_id
+ user_data_format: RAW
+ name:
+ get_input: pcrf_oam_server_name
+ pcrf_oam_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: pcrf_security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: pcrf_oam_net_ip
+ network:
+ get_input: pcrf_oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: pcrf_server_oam
+ relationship: tosca.relationships.network.BindsTo
+ pcrf_oam_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: pcrf_security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: pcrf_cps_net_ip
+ allowed_address_pairs:
+ - ip_address:
+ get_input: pcrf_arbiter_vip
+ network:
+ get_input: pcrf_cps_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: pcrf_server_oam
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested-oam_v1.0:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested-oam_v1.0.yaml
+ description: nested heat template that creates a PCRF OAM node stack
+ members:
+ - pcrf_server_oam
+ - pcrf_oam_port_1
+ - pcrf_oam_port_0
+ outputs:
+ pcrf_oam_vol_attachment_id:
+ description: the pcrf_oam_vol_attachment_id id
+ value: pcrf_oam_vol_attachment
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested-oam_v1.0
+ capabilities:
+ endpoint_pcrf_server_oam:
+ - pcrf_server_oam
+ - endpoint
+ host_pcrf_server_oam:
+ - pcrf_server_oam
+ - host
+ binding_pcrf_server_oam:
+ - pcrf_server_oam
+ - binding
+ attachment_pcrf_oam_port_1:
+ - pcrf_oam_port_1
+ - attachment
+ attachment_pcrf_oam_port_0:
+ - pcrf_oam_port_0
+ - attachment
+ scalable_pcrf_server_oam:
+ - pcrf_server_oam
+ - scalable
+ os_pcrf_server_oam:
+ - pcrf_server_oam
+ - os
+ requirements:
+ local_storage_pcrf_server_oam:
+ - pcrf_server_oam
+ - local_storage
+ link_pcrf_oam_port_1:
+ - pcrf_oam_port_1
+ - link
+ link_pcrf_oam_port_0:
+ - pcrf_oam_port_0
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/nested-pcm_v1.0ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/nested-pcm_v1.0ServiceTemplate.yaml
new file mode 100644
index 0000000000..86a37e4e55
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/nested-pcm_v1.0ServiceTemplate.yaml
@@ -0,0 +1,216 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested-pcm_v1.0
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.pcrf_pcm_server:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ pcrf_pcm_flavor_name:
+ label: PCRF CM flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor name of PCRF CM instance
+ availabilityzone_name:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ pcrf_cps_net_ip:
+ label: CPS network ip
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network ip
+ pcrf_pcm_image_name:
+ label: image name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF CM image name
+ pcrf_vnf_id:
+ label: PCRF VNF Id
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF VNF Id
+ pcrf_oam_net_name:
+ label: OAM network name
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM network name
+ pcrf_cps_net_name:
+ label: CPS network name
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network name
+ pcrf_oam_net_ip:
+ label: OAM network ip
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM network ip
+ pcrf_oam_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ pcrf_cps_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ pcrf_pcm_server_name:
+ label: PCRF CM server name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF CM server name
+ pcrf_oam_net_gw:
+ label: CPS network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network gateway
+ pcrf_pcm_volume_id:
+ label: CPS Cluman Cinder Volume
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS Cluman Cinder Volume
+ pcrf_security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ node_templates:
+ pcrf_pcm_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: pcrf_security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: pcrf_cps_net_ip
+ network:
+ get_input: pcrf_cps_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: pcrf_server_pcm
+ relationship: tosca.relationships.network.BindsTo
+ pcrf_server_pcm:
+ type: org.openecomp.resource.vfc.nodes.heat.pcrf_pcm_server
+ properties:
+ flavor:
+ get_input: pcrf_pcm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcrf_pcm_image_name
+ config_drive: 'True'
+ metadata:
+ vnf_id:
+ get_input: pcrf_vnf_id
+ user_data_format: RAW
+ name:
+ get_input: pcrf_pcm_server_name
+ pcrf_pcm_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: pcrf_security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: pcrf_oam_net_ip
+ network:
+ get_input: pcrf_oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: pcrf_server_pcm
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested-pcm_v1.0:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested-pcm_v1.0.yaml
+ description: heat template that creates PCRF Cluman stack
+ members:
+ - pcrf_pcm_port_0
+ - pcrf_server_pcm
+ - pcrf_pcm_port_1
+ outputs:
+ pcrf_server_pcm_id:
+ description: the pcm server id
+ value: pcrf_server_pcm
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v1.0
+ capabilities:
+ endpoint_pcrf_server_pcm:
+ - pcrf_server_pcm
+ - endpoint
+ attachment_pcrf_pcm_port_0:
+ - pcrf_pcm_port_0
+ - attachment
+ binding_pcrf_server_pcm:
+ - pcrf_server_pcm
+ - binding
+ os_pcrf_server_pcm:
+ - pcrf_server_pcm
+ - os
+ host_pcrf_server_pcm:
+ - pcrf_server_pcm
+ - host
+ scalable_pcrf_server_pcm:
+ - pcrf_server_pcm
+ - scalable
+ attachment_pcrf_pcm_port_1:
+ - pcrf_pcm_port_1
+ - attachment
+ requirements:
+ local_storage_pcrf_server_pcm:
+ - pcrf_server_pcm
+ - local_storage
+ link_pcrf_pcm_port_0:
+ - pcrf_pcm_port_0
+ - link
+ link_pcrf_pcm_port_1:
+ - pcrf_pcm_port_1
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/nested-ppd_v1.0ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/nested-ppd_v1.0ServiceTemplate.yaml
new file mode 100644
index 0000000000..976cbebf83
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/nested-ppd_v1.0ServiceTemplate.yaml
@@ -0,0 +1,464 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested-ppd_v1.0
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.pcrf_ppd_server:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ pcrf_ppd_image_name:
+ label: image name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF PD image name
+ availabilityzone_name:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ pcrf_sp_net_ip:
+ label: Sp network ip
+ hidden: false
+ immutable: false
+ type: string
+ description: Sp network ip
+ pcrf_ppd_server_name:
+ label: PCRF PD server name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF PD server name
+ pcrf_gx_net_ip:
+ label: Gx network ip
+ hidden: false
+ immutable: false
+ type: string
+ description: Gx network ip
+ pcrf_sy_net_name:
+ label: Sy network name
+ hidden: false
+ immutable: false
+ type: string
+ description: Sy network name
+ pcrf_sp_net_mask:
+ label: Sp network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: Sp network mask
+ pcrf_sd_net_ip:
+ label: Sd network ip
+ hidden: false
+ immutable: false
+ type: string
+ description: Sd network ip
+ pcrf_vnf_id:
+ label: PCRF VNF Id
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF VNF Id
+ pcrf_oam_net_name:
+ label: OAM network name
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM network name
+ pcrf_oam_net_ip:
+ label: OAM network ip
+ hidden: false
+ immutable: false
+ type: string
+ description: OAM network ip
+ pcrf_cps_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ pcrf_gx_net_mask:
+ label: Gx network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: Gx network mask
+ pcrf_sgi_sy_net_name:
+ label: Sgi Sy network name
+ hidden: false
+ immutable: false
+ type: string
+ description: Sgi Sy network name
+ pcrf_sd_net_name:
+ label: Sd network name
+ hidden: false
+ immutable: false
+ type: string
+ description: Sd network name
+ pcrf_oam_net_gw:
+ label: CPS network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network gateway
+ pcrf_rx_net_name:
+ label: Rx network name
+ hidden: false
+ immutable: false
+ type: string
+ description: Rx network name
+ pcrf_rx_net_ip:
+ label: Rx network ip
+ hidden: false
+ immutable: false
+ type: string
+ description: Rx network ip
+ pcrf_sy_net_ip:
+ label: Sy network ip
+ hidden: false
+ immutable: false
+ type: string
+ description: Sy network ip
+ pcrf_sgi_sy_net_ip:
+ label: Sgi Sy network ip
+ hidden: false
+ immutable: false
+ type: string
+ description: Sgi Sy network ip
+ pcrf_ppd_flavor_name:
+ label: PCRF PD flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor name of PCRF PD instance
+ pcrf_cps_net_ip:
+ label: CPS network ip
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network ip
+ pcrf_sy_net_mask:
+ label: Sy network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: Sy network mask
+ pcrf_cps_net_name:
+ label: CPS network name
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network name
+ pcrf_oam_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ pcrf_lb_management_vip:
+ label: CPS OAM LB VIP
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS OAM LB VIP
+ pcrf_sgi_sy_net_mask:
+ label: Sgi Sy network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: Sgi Sy network mask
+ pcrf_lb_internal_vip:
+ label: CPS Internal LB VIP
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS Internal LB VIP
+ pcrf_sd_net_mask:
+ label: Sd network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: Sd network mask
+ pcrf_gx_net_name:
+ label: Gx network name
+ hidden: false
+ immutable: false
+ type: string
+ description: Gx network name
+ pcrf_sp_net_name:
+ label: Sp network name
+ hidden: false
+ immutable: false
+ type: string
+ description: Sp network name
+ pcrf_rx_net_mask:
+ label: Rx network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: Rx network mask
+ pcrf_security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ node_templates:
+ pcrf_ppd_port_5:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: pcrf_security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: pcrf_rx_net_ip
+ network:
+ get_input: pcrf_rx_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: pcrf_server_ppd
+ relationship: tosca.relationships.network.BindsTo
+ pcrf_ppd_port_6:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: pcrf_security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: pcrf_sd_net_ip
+ network:
+ get_input: pcrf_sd_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: pcrf_server_ppd
+ relationship: tosca.relationships.network.BindsTo
+ pcrf_ppd_port_3:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: pcrf_security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: pcrf_sp_net_ip
+ network:
+ get_input: pcrf_sp_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: pcrf_server_ppd
+ relationship: tosca.relationships.network.BindsTo
+ pcrf_server_ppd:
+ type: org.openecomp.resource.vfc.nodes.heat.pcrf_ppd_server
+ properties:
+ flavor:
+ get_input: pcrf_ppd_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcrf_ppd_image_name
+ config_drive: 'True'
+ metadata:
+ vnf_id:
+ get_input: pcrf_vnf_id
+ user_data_format: RAW
+ name:
+ get_input: pcrf_ppd_server_name
+ pcrf_ppd_port_4:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: pcrf_security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: pcrf_sy_net_ip
+ network:
+ get_input: pcrf_sy_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: pcrf_server_ppd
+ relationship: tosca.relationships.network.BindsTo
+ pcrf_ppd_port_7:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: pcrf_security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: pcrf_sgi_sy_net_ip
+ network:
+ get_input: pcrf_sgi_sy_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: pcrf_server_ppd
+ relationship: tosca.relationships.network.BindsTo
+ pcrf_ppd_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: pcrf_security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: pcrf_oam_net_ip
+ allowed_address_pairs:
+ - ip_address:
+ get_input: pcrf_lb_management_vip
+ network:
+ get_input: pcrf_oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: pcrf_server_ppd
+ relationship: tosca.relationships.network.BindsTo
+ pcrf_ppd_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: pcrf_security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: pcrf_gx_net_ip
+ network:
+ get_input: pcrf_gx_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: pcrf_server_ppd
+ relationship: tosca.relationships.network.BindsTo
+ pcrf_ppd_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: pcrf_security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: pcrf_cps_net_ip
+ allowed_address_pairs:
+ - ip_address:
+ get_input: pcrf_lb_internal_vip
+ network:
+ get_input: pcrf_cps_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: pcrf_server_ppd
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested-ppd_v1.0:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested-ppd_v1.0.yaml
+ description: heat template that creates PCRF Policy Director stack
+ members:
+ - pcrf_ppd_port_5
+ - pcrf_ppd_port_6
+ - pcrf_ppd_port_3
+ - pcrf_server_ppd
+ - pcrf_ppd_port_4
+ - pcrf_ppd_port_7
+ - pcrf_ppd_port_1
+ - pcrf_ppd_port_2
+ - pcrf_ppd_port_0
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested-ppd_v1.0
+ capabilities:
+ attachment_pcrf_ppd_port_1:
+ - pcrf_ppd_port_1
+ - attachment
+ attachment_pcrf_ppd_port_2:
+ - pcrf_ppd_port_2
+ - attachment
+ binding_pcrf_server_ppd:
+ - pcrf_server_ppd
+ - binding
+ attachment_pcrf_ppd_port_0:
+ - pcrf_ppd_port_0
+ - attachment
+ attachment_pcrf_ppd_port_5:
+ - pcrf_ppd_port_5
+ - attachment
+ attachment_pcrf_ppd_port_6:
+ - pcrf_ppd_port_6
+ - attachment
+ attachment_pcrf_ppd_port_3:
+ - pcrf_ppd_port_3
+ - attachment
+ os_pcrf_server_ppd:
+ - pcrf_server_ppd
+ - os
+ attachment_pcrf_ppd_port_4:
+ - pcrf_ppd_port_4
+ - attachment
+ endpoint_pcrf_server_ppd:
+ - pcrf_server_ppd
+ - endpoint
+ scalable_pcrf_server_ppd:
+ - pcrf_server_ppd
+ - scalable
+ attachment_pcrf_ppd_port_7:
+ - pcrf_ppd_port_7
+ - attachment
+ host_pcrf_server_ppd:
+ - pcrf_server_ppd
+ - host
+ requirements:
+ link_pcrf_ppd_port_3:
+ - pcrf_ppd_port_3
+ - link
+ link_pcrf_ppd_port_2:
+ - pcrf_ppd_port_2
+ - link
+ local_storage_pcrf_server_ppd:
+ - pcrf_server_ppd
+ - local_storage
+ link_pcrf_ppd_port_1:
+ - pcrf_ppd_port_1
+ - link
+ link_pcrf_ppd_port_0:
+ - pcrf_ppd_port_0
+ - link
+ link_pcrf_ppd_port_7:
+ - pcrf_ppd_port_7
+ - link
+ link_pcrf_ppd_port_6:
+ - pcrf_ppd_port_6
+ - link
+ link_pcrf_ppd_port_5:
+ - pcrf_ppd_port_5
+ - link
+ link_pcrf_ppd_port_4:
+ - pcrf_ppd_port_4
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/nested-pps_v1.0ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/nested-pps_v1.0ServiceTemplate.yaml
new file mode 100644
index 0000000000..692a2f0d4b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/nested-pps_v1.0ServiceTemplate.yaml
@@ -0,0 +1,160 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested-pps_v1.0
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.pcrf_pps_server:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ pcrf_cps_net_ip:
+ label: CPS network ip
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network ip
+ availabilityzone_name:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ pcrf_vnf_id:
+ label: PCRF VNF Id
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF VNF Id
+ pcrf_cps_net_name:
+ label: CPS network name
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network name
+ pcrf_cps_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ pcrf_pps_image_name:
+ label: PCRF PS image name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ label: PCRF PS flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor name of PCRF PS instance
+ pcrf_pps_server_name:
+ label: PCRF PS server name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF PS server name
+ pcrf_security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ node_templates:
+ pcrf_pps_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: pcrf_security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: pcrf_cps_net_ip
+ network:
+ get_input: pcrf_cps_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: pcrf_server_pps
+ relationship: tosca.relationships.network.BindsTo
+ pcrf_server_pps:
+ type: org.openecomp.resource.vfc.nodes.heat.pcrf_pps_server
+ properties:
+ flavor:
+ get_input: pcrf_pps_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcrf_pps_image_name
+ config_drive: 'True'
+ metadata:
+ vnf_id:
+ get_input: pcrf_vnf_id
+ user_data_format: RAW
+ name:
+ get_input: pcrf_pps_server_name
+ groups:
+ nested-pps_v1.0:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested-pps_v1.0.yaml
+ description: heat template that creates PCRF Policy Server stack
+ members:
+ - pcrf_pps_port_0
+ - pcrf_server_pps
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested-pps_v1.0
+ capabilities:
+ binding_pcrf_server_pps:
+ - pcrf_server_pps
+ - binding
+ attachment_pcrf_pps_port_0:
+ - pcrf_pps_port_0
+ - attachment
+ scalable_pcrf_server_pps:
+ - pcrf_server_pps
+ - scalable
+ os_pcrf_server_pps:
+ - pcrf_server_pps
+ - os
+ endpoint_pcrf_server_pps:
+ - pcrf_server_pps
+ - endpoint
+ host_pcrf_server_pps:
+ - pcrf_server_pps
+ - host
+ requirements:
+ link_pcrf_pps_port_0:
+ - pcrf_pps_port_0
+ - link
+ local_storage_pcrf_server_pps:
+ - pcrf_server_pps
+ - local_storage \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/nested-psm_v1.0ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/nested-psm_v1.0ServiceTemplate.yaml
new file mode 100644
index 0000000000..770e1dceb8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/hot-nimbus-oam-volumes_v1.0/out/nested-psm_v1.0ServiceTemplate.yaml
@@ -0,0 +1,160 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested-psm_v1.0
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.pcrf_psm_server:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ pcrf_cps_net_ip:
+ label: CPS network ip
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network ip
+ pcrf_psm_flavor_name:
+ label: PCRF SM flavor name
+ hidden: false
+ immutable: false
+ type: string
+ description: flavor name of PCRF SM instance
+ pcrf_psm_image_name:
+ label: image name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF SM image name
+ availabilityzone_name:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ pcrf_vnf_id:
+ label: PCRF VNF Id
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF VNF Id
+ pcrf_cps_net_name:
+ label: CPS network name
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network name
+ pcrf_cps_net_mask:
+ label: CPS network mask
+ hidden: false
+ immutable: false
+ type: string
+ description: CPS network mask
+ pcrf_psm_server_name:
+ label: PCRF SM server name
+ hidden: false
+ immutable: false
+ type: string
+ description: PCRF SM server name
+ pcrf_security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ node_templates:
+ pcrf_server_psm:
+ type: org.openecomp.resource.vfc.nodes.heat.pcrf_psm_server
+ properties:
+ flavor:
+ get_input: pcrf_psm_flavor_name
+ availability_zone:
+ get_input: availabilityzone_name
+ image:
+ get_input: pcrf_psm_image_name
+ config_drive: 'True'
+ metadata:
+ vnf_id:
+ get_input: pcrf_vnf_id
+ user_data_format: RAW
+ name:
+ get_input: pcrf_psm_server_name
+ psm01_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - get_input: pcrf_security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input: pcrf_cps_net_ip
+ network:
+ get_input: pcrf_cps_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: pcrf_server_psm
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested-psm_v1.0:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested-psm_v1.0.yaml
+ description: heat template that creates PCRF Session Manager stack
+ members:
+ - pcrf_server_psm
+ - psm01_port_0
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested-psm_v1.0
+ capabilities:
+ endpoint_pcrf_server_psm:
+ - pcrf_server_psm
+ - endpoint
+ binding_pcrf_server_psm:
+ - pcrf_server_psm
+ - binding
+ os_pcrf_server_psm:
+ - pcrf_server_psm
+ - os
+ attachment_psm01_port_0:
+ - psm01_port_0
+ - attachment
+ host_pcrf_server_psm:
+ - pcrf_server_psm
+ - host
+ scalable_pcrf_server_psm:
+ - pcrf_server_psm
+ - scalable
+ requirements:
+ local_storage_pcrf_server_psm:
+ - pcrf_server_psm
+ - local_storage
+ link_psm01_port_0:
+ - psm01_port_0
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/neutron_port_translation/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/neutron_port_translation/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..8f3b23b959
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/neutron_port_translation/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,115 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ node_templates:
+ jsa_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ jsa_net1:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ cmaui1_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 1
+ network:
+ get_input: oam_net_name
+ cmaui1_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - subnet: subnetNameVal
+ ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 1
+ - subnet: subnetNameVal2
+ ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 1
+ network: jsa_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: jsa_net
+ relationship: tosca.relationships.network.LinksTo
+ cmaui1_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - subnet: subnetNameVal
+ ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 1
+ - subnet: subnetNameVal2
+ ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 1
+ network: jsa_net1
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: jsa_net1
+ relationship: tosca.relationships.network.LinksTo
+ groups:
+ hot_template:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot_template.yml
+ description: cmaui server template for vMMSC
+ members:
+ - jsa_net
+ - jsa_net1
+ - cmaui1_port_0
+ - cmaui1_port_1
+ - cmaui1_port_2 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/neutron_port_translation/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/neutron_port_translation/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..70cdc7d237
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/neutron_port_translation/inputfiles/MANIFEST.json
@@ -0,0 +1,11 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volumes",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot_template.yml",
+ "type": "HEAT"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/neutron_port_translation/inputfiles/hot_template.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/neutron_port_translation/inputfiles/hot_template.yml
new file mode 100644
index 0000000000..47ba8fcb2a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/neutron_port_translation/inputfiles/hot_template.yml
@@ -0,0 +1,49 @@
+heat_template_version: 2013-05-23
+
+#################################
+#
+# Changes from MSO 01/26/2016
+# Updated per ECOMP feedback
+#
+#################################
+
+description: cmaui server template for vMMSC
+
+resources:
+ cmaui1_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 1]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ cmaui1_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: jsa_net }
+ fixed_ips: [{"subnet": subnetNameVal, "ip_address": {get_param: [cmaui_oam_ips, 1]}}, {"subnet": subnetNameVal2, "ip_address": {get_param: [cmaui_oam_ips, 1]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ jsa_net:
+ type: OS::Neutron::Net
+ properties:
+ name: {get_param: jsa_net_name}
+ shared: True
+
+ cmaui1_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: jsa_net1 }
+ fixed_ips: [{"subnet": subnetNameVal, "ip_address": {get_param: [cmaui_oam_ips, 1]}}, {"subnet": subnetNameVal2, "ip_address": {get_param: [cmaui_oam_ips, 1]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ jsa_net1:
+ type: OS::Neutron::Net
+ properties:
+ name: {get_param: jsa_net_name}
+ shared: True
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/neutron_security_group_translation/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/neutron_security_group_translation/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..f6a55b2d14
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/neutron_security_group_translation/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,169 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.MASTER:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ MASTER_image_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: JSA MASTER instance image name
+ MASTER_names:
+ hidden: false
+ immutable: false
+ type: string
+ description: JSA MASTER instance name
+ security_group_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: security group name of JSA
+ MASTER_flavor_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: the flavor name of JSA MASTER instance
+ oam_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of OAM network
+ node_templates:
+ jsa_security_group:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules
+ properties:
+ name:
+ get_input: security_group_name
+ description: ems security group
+ rules:
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: ingress
+ requirements:
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: MASTER_mgmt_port
+ relationship: org.openecomp.relationships.AttachesTo
+ MASTER_mgmt_port:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ security_groups:
+ - jsa_security_group
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: MASTER_instance
+ relationship: tosca.relationships.network.BindsTo
+ MASTER_instance:
+ type: org.openecomp.resource.vfc.nodes.heat.MASTER
+ properties:
+ flavor:
+ get_input: MASTER_flavor_name
+ image:
+ get_input: MASTER_image_name
+ name:
+ get_input: MASTER_names
+ groups:
+ hot_template:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot_template.yml
+ description: |
+ Version 2.0 02-11-2016 (Authors: John Doe, user PROD)
+ members:
+ - jsa_security_group
+ - MASTER_mgmt_port
+ - MASTER_instance \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/neutron_security_group_translation/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/neutron_security_group_translation/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..70cdc7d237
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/neutron_security_group_translation/inputfiles/MANIFEST.json
@@ -0,0 +1,11 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volumes",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot_template.yml",
+ "type": "HEAT"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/neutron_security_group_translation/inputfiles/hot_template.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/neutron_security_group_translation/inputfiles/hot_template.yml
new file mode 100644
index 0000000000..6c6f52a681
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/neutron_security_group_translation/inputfiles/hot_template.yml
@@ -0,0 +1,57 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-11-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ oam_net_name:
+ type: string
+ description: network name of OAM network
+ security_group_name:
+ type: string
+ description: security group name of JSA
+ MASTER_names:
+ type: string
+ description: JSA MASTER instance name
+ MASTER_image_name:
+ type: string
+ description: JSA MASTER instance image name
+ MASTER_flavor_name:
+ type: string
+ description: the flavor name of JSA MASTER instance
+
+resources:
+ jsa_security_group:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: ems security group
+ name: {get_param: security_group_name}
+ rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"}
+ ]
+
+
+ MASTER_instance:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: MASTER_names}
+ image: {get_param: MASTER_image_name}
+ flavor: {get_param: MASTER_flavor_name}
+ networks:
+ - port: {get_resource: MASTER_mgmt_port}
+
+ MASTER_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: oam_net_name}
+ security_groups: [{get_resource: jsa_security_group}]
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novaservergroups/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novaservergroups/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..94f731985b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novaservergroups/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,603 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.smp:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ hostid_fe1:
+ hidden: false
+ immutable: false
+ type: string
+ description: FE1 Hostid (from Ulticom license)
+ ip_address_stp2:
+ hidden: false
+ immutable: false
+ type: string
+ description: STP2 IP address
+ Mobility_OAM_protected_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Network name for OAM
+ hostid_fe2:
+ hidden: false
+ immutable: false
+ type: string
+ description: FE2 Hostid (from Ulticom license)
+ flavor_scp_fe_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: SCP FE Flavor
+ default: a1.Small
+ ip_address_stp1:
+ hidden: false
+ immutable: false
+ type: string
+ description: STP1 IP address
+ int_vscp_ce_network_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Inter-CE Network
+ int_vscp_ce_network_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ description: Private Network Address (CIDR notation)
+ cluster_type:
+ hidden: false
+ immutable: false
+ type: string
+ constraints:
+ - valid_values:
+ - Test
+ - Prod
+ be_Mobility_OAM_protected_ip_1:
+ label: be_1 OAM ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: be_1 OAM ip address
+ be_Mobility_OAM_protected_ip_2:
+ label: be_2 OAM ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: be_2 OAM ip address
+ be_Mobility_OAM_protected_ip_0:
+ label: be_0 OAM ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: be_0 OAM ip address
+ ip_address_dra:
+ hidden: false
+ immutable: false
+ type: string
+ description: DRA VIP address
+ image_smp_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: SCP SMP image
+ default: asc_base_image_smp
+ fe_connectivity:
+ hidden: false
+ immutable: false
+ type: string
+ constraints:
+ - valid_values:
+ - NEE
+ - STP
+ lab_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Lab name
+ smp_Mobility_OAM_protected_ip_1:
+ label: smp_1 OAM ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: smp_1 OAM ip address
+ fe_SIGNET_vrf_B1_direct_ip_0:
+ label: fe1 SIGTRAN ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: fe1 SIGTRAN ip address
+ smp_Mobility_OAM_protected_ip_0:
+ label: smp_0 OAM ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: smp_0 OAM ip address
+ int_vscp_cluster_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: LAN3 Cluster
+ be_Mobility_OAM_protected_ip_3:
+ label: be_3 OAM ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: be_3 OAM ip address
+ be_Mobility_OAM_protected_ip_4:
+ label: be_4 OAM ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: be_4 OAM ip address
+ hostname_nee1:
+ hidden: false
+ immutable: false
+ type: string
+ description: NEE1 Hostname (from Ulticom license)
+ int_vscp_fe_cluster_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: LAN2 FE Cluster/KA
+ SIGNET_vrf_A1_direct_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Network name for SIGTRAN_A
+ key_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: keypair to enable SSH access to the instance.
+ default: vSCP-keypair
+ int_vscp_fe_cluster_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ description: Private Network2 Address (CIDR notation)
+ fe_name_1:
+ hidden: false
+ immutable: false
+ type: string
+ description: name of VM
+ default: vSCP_FE2
+ fe_name_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: name of VM
+ default: vSCP_FE1
+ be_name_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: name of VM
+ default: vSCP_BE1
+ int_vscp_cluster_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ description: Private Network3 Address (CIDR notation)
+ be_name_1:
+ hidden: false
+ immutable: false
+ type: string
+ description: name of VM
+ default: vSCP_BE2
+ be_name_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: name of VM
+ default: vSCP_BE3
+ point_code_stp:
+ hidden: false
+ immutable: false
+ type: string
+ description: STP virtual point code (in "zone-cluster-member" format)
+ be_name_3:
+ hidden: false
+ immutable: false
+ type: string
+ description: name of VM
+ default: vSCP_BE4
+ be_name_4:
+ hidden: false
+ immutable: false
+ type: string
+ description: name of VM
+ default: vSCP_BE5
+ global_title_scp:
+ hidden: false
+ immutable: false
+ type: string
+ description: vSCP Global Title address
+ vnf_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique name for this VNF instance
+ default: This_is_the_SCP_name
+ be_Cricket_OCS_protected_ip_2:
+ label: be3 Cricket_OCS ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: be3 Cricket_OCS ip address
+ fe_Mobility_OAM_protected_ip_0:
+ label: fe_0 OAM ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: fe_0 OAM ip address
+ hostname_fe1:
+ hidden: false
+ immutable: false
+ type: string
+ description: FE1 Hostname (from Ulticom license)
+ be_Cricket_OCS_protected_ip_1:
+ label: be2 Cricket_OCS ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: be2 Cricket_OCS ip address
+ hostname_fe2:
+ hidden: false
+ immutable: false
+ type: string
+ description: FE2 Hostname (from Ulticom license)
+ be_Cricket_OCS_protected_ip_4:
+ label: be5 Cricket_OCS ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: be5 Cricket_OCS ip address
+ be_Cricket_OCS_protected_ip_3:
+ label: be4 Cricket_OCS ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: be4 Cricket_OCS ip address
+ fe_Mobility_OAM_protected_ip_1:
+ label: fe_1 OAM ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: fe_1 OAM ip address
+ be_Cricket_OCS_protected_ip_0:
+ label: be1 Cricket_OCS ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: be1 Cricket_OCS ip address
+ route_table_fe1:
+ hidden: false
+ immutable: false
+ type: string
+ description: Additional route table for FE1
+ Cricket_OCS_protected_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Network name for CRICKET_OCS
+ smp_name_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: name of VM
+ default: vSMP2
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_SCP_id
+ smp_name_1:
+ hidden: false
+ immutable: false
+ type: string
+ description: name of VM
+ default: vSMP2
+ flavor_smp_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: SCP SMP Flavor
+ default: a1.Small
+ image_scp_be_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: SCP BE image
+ default: asc_base_image_be
+ smp_name_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: name of VM
+ default: vSMP1
+ route_table_fe2:
+ hidden: false
+ immutable: false
+ type: string
+ description: Additional route table for FE2
+ hostid_nee1:
+ hidden: false
+ immutable: false
+ type: string
+ description: NEE1 Hostid (from Ulticom license)
+ SIGNET_vrf_B1_direct_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Network name for SIGTRAN_B
+ fe_SIGNET_vrf_A1_direct_ip_0:
+ label: fe2 SIGTRAN ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: fe2 SIGTRAN ip address
+ availability_zone_0:
+ hidden: false
+ immutable: false
+ type: string
+ nee_name_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: name of VM
+ default: vNEE
+ ip_port_stp1:
+ hidden: false
+ immutable: false
+ type: string
+ description: STP1 IP port
+ ip_port_stp2:
+ hidden: false
+ immutable: false
+ type: string
+ description: STP2 IP port
+ image_scp_fe_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: SCP FE image
+ default: asc_base_image_fe
+ flavor_scp_be_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: SCP BE Flavor
+ default: a1.Small
+ security_group_name:
+ label: vSCP security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: vSCP security group name
+ ip_port_fe2:
+ hidden: false
+ immutable: false
+ type: string
+ description: FE2 IP port in SIGTRAN network
+ route_table_be:
+ hidden: false
+ immutable: false
+ type: string
+ description: Additional route table for BEs
+ ip_port_fe1:
+ hidden: false
+ immutable: false
+ type: string
+ description: FE1 IP port in SIGTRAN network
+ port_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: port name
+ default: port_name
+ point_code_scp:
+ hidden: false
+ immutable: false
+ type: string
+ description: vSCP point code (in "zone-cluster-member" format)
+ global_title_stp:
+ hidden: false
+ immutable: false
+ type: string
+ description: STP Global Title address
+ point_code_stp1:
+ hidden: false
+ immutable: false
+ type: string
+ description: STP1 point code (in "zone-cluster-member" format)
+ point_code_stp2:
+ hidden: false
+ immutable: false
+ type: string
+ description: STP2 point code (in "zone-cluster-member" format)
+ node_templates:
+ server_smp2:
+ type: org.openecomp.resource.vfc.nodes.heat.smp
+ properties:
+ flavor:
+ get_input: flavor_smp_name
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: image_smp_name
+ metadata:
+ jx_vm_role: smp2
+ vnf_id:
+ get_input: vnf_id
+ jx_lab_name:
+ get_input: lab_name
+ user_data_format: RAW
+ name:
+ get_input: smp_name_2
+ scheduler_hints:
+ group: FE_SMP_Affinity
+ server_smp3:
+ type: org.openecomp.resource.vfc.nodes.heat.smp
+ properties:
+ flavor:
+ get_input: flavor_smp_name
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: image_smp_name
+ metadata:
+ jx_vm_role: smp2
+ vnf_id:
+ get_input: vnf_id
+ jx_lab_name:
+ get_input: lab_name
+ user_data_format: RAW
+ name:
+ get_input: smp_name_2
+ scheduler_hints:
+ group2: Multi_Anti_Affinity
+ group1: FE_SMP_Affinity
+ port3:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ network:
+ get_input: port_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_smp3
+ relationship: tosca.relationships.network.BindsTo
+ port4:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ network:
+ get_input: port_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_smp3
+ relationship: tosca.relationships.network.BindsTo
+ port1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ network:
+ get_input: port_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_smp1
+ relationship: tosca.relationships.network.BindsTo
+ server_smp1:
+ type: org.openecomp.resource.vfc.nodes.heat.smp
+ properties:
+ flavor:
+ get_input: flavor_smp_name
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: image_smp_name
+ metadata:
+ jx_vm_role: smp2
+ vnf_id:
+ get_input: vnf_id
+ jx_lab_name:
+ get_input: lab_name
+ user_data_format: RAW
+ name:
+ get_input: smp_name_1
+ scheduler_hints:
+ group: BE_Affinity
+ port2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ network:
+ get_input: port_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_smp2
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ FE_SMP_Affinity:
+ type: tosca.groups.Root
+ members:
+ - server_smp2
+ - server_smp3
+ Multi_Anti_Affinity:
+ type: tosca.groups.Root
+ members:
+ - server_smp3
+ hot_template:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot_template.yml
+ description: ASC Template
+ members:
+ - server_smp2
+ - server_smp3
+ - port3
+ - port4
+ - port1
+ - server_smp1
+ - port2
+ BE_Affinity:
+ type: tosca.groups.Root
+ members:
+ - server_smp1
+ policies:
+ FE_SMP_Affinity:
+ type: org.openecomp.policies.placement.Colocate
+ properties:
+ name: abc
+ affinity: host
+ targets:
+ - FE_SMP_Affinity
+ Multi_Anti_Affinity:
+ type: org.openecomp.policies.placement.Antilocate
+ properties:
+ name: def
+ container_type: host
+ targets:
+ - Multi_Anti_Affinity
+ BE_Affinity:
+ type: org.openecomp.policies.placement.Colocate
+ properties:
+ name: def
+ affinity: host
+ targets:
+ - BE_Affinity \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novaservergroups/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novaservergroups/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..b2916ccf9c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novaservergroups/inputfiles/MANIFEST.json
@@ -0,0 +1,11 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot_template.yml",
+ "type": "HEAT"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novaservergroups/inputfiles/hot_template.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novaservergroups/inputfiles/hot_template.yml
new file mode 100644
index 0000000000..8dcbe20043
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novaservergroups/inputfiles/hot_template.yml
@@ -0,0 +1,383 @@
+heat_template_version: 2013-05-23
+
+description: ASC Template
+
+parameters:
+ cluster_type:
+ type: string
+ constraints:
+ - allowed_values: [ Test, Prod ]
+ fe_connectivity:
+ type: string
+ constraints:
+ - allowed_values: [ NEE, STP ]
+ key_name:
+ type: string
+ description: keypair to enable SSH access to the instance.
+ default: vSCP-keypair
+
+# Availability Zone information may need to be updated and the specifications under Nova server capabilities uncommented
+ availability_zone_0:
+ type: string
+
+ vnf_name:
+ type: string
+ description: Unique name for this VNF instance
+ default: This_is_the_SCP_name
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_SCP_id
+
+ port_name:
+ type: string
+ description: port name
+ default: port_name
+
+ flavor_scp_be_name:
+ type: string
+ description: SCP BE Flavor
+ default: a1.Small
+ flavor_scp_fe_name:
+ type: string
+ description: SCP FE Flavor
+ default: a1.Small
+ flavor_smp_name:
+ type: string
+ description: SCP SMP Flavor
+ default: a1.Small
+ image_scp_be_name:
+ type: string
+ description: SCP BE image
+ default: asc_base_image_be
+ image_scp_fe_name:
+ type: string
+ description: SCP FE image
+ default: asc_base_image_fe
+ image_smp_name:
+ type: string
+ description: SCP SMP image
+ default: asc_base_image_smp
+ int_vscp_fe_cluster_net_id:
+ type: string
+ description: LAN2 FE Cluster/KA
+ int_vscp_fe_cluster_cidr:
+ type: string
+ description: Private Network2 Address (CIDR notation)
+ int_vscp_cluster_net_id:
+ type: string
+ description: LAN3 Cluster
+ int_vscp_cluster_cidr:
+ type: string
+ description: Private Network3 Address (CIDR notation)
+ int_vscp_ce_network_net_id:
+ type: string
+ description: Inter-CE Network
+ int_vscp_ce_network_cidr:
+ type: string
+ description: Private Network Address (CIDR notation)
+ SIGNET_vrf_A1_direct_net_id:
+ type: string
+ description: Network name for SIGTRAN_A
+ SIGNET_vrf_B1_direct_net_id:
+ type: string
+ description: Network name for SIGTRAN_B
+ Cricket_OCS_protected_net_id:
+ type: string
+ description: Network name for CRICKET_OCS
+ Mobility_OAM_protected_net_id:
+ type: string
+ description: Network name for OAM
+ be_Cricket_OCS_protected_ip_0:
+ type: string
+ label: be1 Cricket_OCS ip address
+ description: be1 Cricket_OCS ip address
+ be_Cricket_OCS_protected_ip_1:
+ type: string
+ label: be2 Cricket_OCS ip address
+ description: be2 Cricket_OCS ip address
+ be_Cricket_OCS_protected_ip_2:
+ type: string
+ label: be3 Cricket_OCS ip address
+ description: be3 Cricket_OCS ip address
+ be_Cricket_OCS_protected_ip_3:
+ type: string
+ label: be4 Cricket_OCS ip address
+ description: be4 Cricket_OCS ip address
+ be_Cricket_OCS_protected_ip_4:
+ type: string
+ label: be5 Cricket_OCS ip address
+ description: be5 Cricket_OCS ip address
+ fe_SIGNET_vrf_B1_direct_ip_0:
+ type: string
+ label: fe1 SIGTRAN ip address
+ description: fe1 SIGTRAN ip address
+ fe_SIGNET_vrf_A1_direct_ip_0:
+ type: string
+ label: fe2 SIGTRAN ip address
+ description: fe2 SIGTRAN ip address
+ be_Mobility_OAM_protected_ip_0:
+ type: string
+ label: be_0 OAM ip address
+ description: be_0 OAM ip address
+ be_Mobility_OAM_protected_ip_1:
+ type: string
+ label: be_1 OAM ip address
+ description: be_1 OAM ip address
+ be_Mobility_OAM_protected_ip_2:
+ type: string
+ label: be_2 OAM ip address
+ description: be_2 OAM ip address
+ be_Mobility_OAM_protected_ip_3:
+ type: string
+ label: be_3 OAM ip address
+ description: be_3 OAM ip address
+ be_Mobility_OAM_protected_ip_4:
+ type: string
+ label: be_4 OAM ip address
+ description: be_4 OAM ip address
+ fe_Mobility_OAM_protected_ip_0:
+ type: string
+ label: fe_0 OAM ip address
+ description: fe_0 OAM ip address
+ fe_Mobility_OAM_protected_ip_1:
+ type: string
+ label: fe_1 OAM ip address
+ description: fe_1 OAM ip address
+ smp_Mobility_OAM_protected_ip_0:
+ type: string
+ label: smp_0 OAM ip address
+ description: smp_0 OAM ip address
+ smp_Mobility_OAM_protected_ip_1:
+ type: string
+ label: smp_1 OAM ip address
+ description: smp_1 OAM ip address
+ be_name_0:
+ type: string
+ default: vSCP_BE1
+ description: name of VM
+ be_name_1:
+ type: string
+ default: vSCP_BE2
+ description: name of VM
+ be_name_2:
+ type: string
+ default: vSCP_BE3
+ description: name of VM
+ be_name_3:
+ type: string
+ default: vSCP_BE4
+ description: name of VM
+ be_name_4:
+ type: string
+ default: vSCP_BE5
+ description: name of VM
+ fe_name_0:
+ type: string
+ default: vSCP_FE1
+ description: name of VM
+ fe_name_1:
+ type: string
+ default: vSCP_FE2
+ description: name of VM
+ smp_name_0:
+ type: string
+ default: vSMP1
+ description: name of VM
+ smp_name_1:
+ type: string
+ default: vSMP2
+ description: name of VM
+ smp_name_2:
+ type: string
+ default: vSMP2
+ description: name of VM
+ ##smp_name_2:
+ ##type: string
+ ##default: vSMP2
+ ##description: name of VM
+ nee_name_0:
+ type: string
+ default: vNEE
+ description: name of VM
+
+ hostname_fe1:
+ type: string
+ description: FE1 Hostname (from Ulticom license)
+ hostid_fe1:
+ type: string
+ description: FE1 Hostid (from Ulticom license)
+
+ hostname_fe2:
+ type: string
+ description: FE2 Hostname (from Ulticom license)
+ hostid_fe2:
+ type: string
+ description: FE2 Hostid (from Ulticom license)
+
+ hostname_nee1:
+ type: string
+ description: NEE1 Hostname (from Ulticom license)
+ hostid_nee1:
+ type: string
+ description: NEE1 Hostid (from Ulticom license)
+
+ point_code_scp:
+ type: string
+ description: vSCP point code (in "zone-cluster-member" format)
+ point_code_stp:
+ type: string
+ description: STP virtual point code (in "zone-cluster-member" format)
+ point_code_stp1:
+ type: string
+ description: STP1 point code (in "zone-cluster-member" format)
+ point_code_stp2:
+ type: string
+ description: STP2 point code (in "zone-cluster-member" format)
+ ip_address_stp1:
+ type: string
+ description: STP1 IP address
+ ip_port_stp1:
+ type: string
+ description: STP1 IP port
+ ip_address_stp2:
+ type: string
+ description: STP2 IP address
+ ip_port_stp2:
+ type: string
+ description: STP2 IP port
+ ip_port_fe1:
+ type: string
+ description: FE1 IP port in SIGTRAN network
+ ip_port_fe2:
+ type: string
+ description: FE2 IP port in SIGTRAN network
+
+ global_title_scp:
+ type: string
+ description: vSCP Global Title address
+ global_title_stp:
+ type: string
+ description: STP Global Title address
+
+ security_group_name:
+ type: string
+ label: vSCP security group name
+ description: vSCP security group name
+
+ route_table_be:
+ type: string
+ description: Additional route table for BEs
+
+ route_table_fe1:
+ type: string
+ description: Additional route table for FE1
+
+ route_table_fe2:
+ type: string
+ description: Additional route table for FE2
+
+ ip_address_dra:
+ type: string
+ description: DRA VIP address
+
+ lab_name:
+ type: string
+ description: Lab name
+
+resources:
+
+ server_smp1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: smp_name_1 }
+ image: { get_param: image_smp_name }
+ # key_name: { get_param: key_name }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: flavor_smp_name }
+ scheduler_hints: { group: { get_resource: BE_Affinity } }
+ networks:
+ - port: { get_resource: port1 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ jx_lab_name: {get_param: lab_name}
+ jx_vm_role: smp2
+ user_data_format: RAW
+ server_smp2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: smp_name_2 }
+ image: { get_param: image_smp_name }
+ # key_name: { get_param: key_name }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: flavor_smp_name }
+ scheduler_hints: { group: { get_resource: FE_SMP_Affinity } }
+ networks:
+ - port: { get_resource: port2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ jx_lab_name: {get_param: lab_name}
+ jx_vm_role: smp2
+ user_data_format: RAW
+
+ server_smp3:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: smp_name_2 }
+ image: { get_param: image_smp_name }
+ # key_name: { get_param: key_name }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: flavor_smp_name }
+ scheduler_hints: { group1: { get_resource: FE_SMP_Affinity }, group2: { get_resource: Multi_Anti_Affinity } }
+ networks:
+ - port: { get_resource: port3 }
+ - port: { get_resource: port4 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ jx_lab_name: {get_param: lab_name}
+ jx_vm_role: smp2
+ user_data_format: RAW
+
+ port1:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: port_name}
+ replacement_policy: AUTO
+
+ port2:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: port_name}
+ replacement_policy: AUTO
+
+ port3:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: port_name}
+ replacement_policy: AUTO
+
+ port4:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: port_name}
+ replacement_policy: AUTO
+
+ FE_SMP_Affinity:
+ type: OS::Nova::ServerGroup
+ properties:
+ policies: ["affinity"]
+ name: abc
+ BE_Affinity:
+ type: OS::Nova::ServerGroup
+ properties:
+ policies: ["affinity"]
+ name: def
+ Multi_Anti_Affinity:
+ type: OS::Nova::ServerGroup
+ properties:
+ policies: ["anti-affinity"]
+ name: def
+
+
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..e77677efb7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,187 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.nested:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ cmaui_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ cmaui_cinder_volume_size:
+ type: float
+ description: the size of the CMAUI Cinder volume
+ timezone:
+ type: string
+ description: timezone
+ security_group_name:
+ type: string
+ description: the name of security group
+ cmaui_volume:
+ type: string
+ description: Volume for CMAUI server
+ oam_network_netmask:
+ type: string
+ description: oam network gateway
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ oam_network_gateway:
+ type: string
+ description: oam network gateway
+ availability_zone_0:
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ type: list
+ description: CMAUI oam_net IP addresses
+ entry_schema:
+ type: string
+ inner_cmaui_volume_a1:
+ type: string
+ description: the name of the target volume backend
+ inner_cmaui_volume_b2:
+ type: string
+ description: the name of the target volume backend
+ external_dns:
+ type: string
+ description: dns server
+ oam_net_name:
+ type: string
+ description: UID of OAM network
+ external_ntp:
+ type: string
+ description: ntp server
+ CMAUI_volume_type:
+ type: string
+ description: the name of the target volume backend
+ requirements:
+ - link_cmaui_port_2:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_server_cmaui2:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - local_storage_server_cmaui1:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_cmaui_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ scalable_server_cmaui1:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui1:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui1:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui2:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui2:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_2:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_cmaui1:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui2:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui2:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_0:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_cmaui2:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui1:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..4507d8f8b2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,194 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ cmaui_cinder_volume_size:
+ label: CMAUI Cinder volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the CMAUI Cinder volume
+ timezone:
+ label: timezone
+ hidden: false
+ immutable: false
+ type: string
+ description: timezone
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ oam_network_netmask:
+ label: oam network netmask
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ oam_network_gateway:
+ label: oam network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ inner_cmaui_volume_a2:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ inner_cmaui_volume_a1:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_oam_ips:
+ label: CMAUI oam_net IP addresses
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI oam_net IP addresses
+ entry_schema:
+ type: string
+ external_dns:
+ label: dns server
+ hidden: false
+ immutable: false
+ type: string
+ description: dns server
+ oam_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ external_ntp:
+ label: ntp server
+ hidden: false
+ immutable: false
+ type: string
+ description: ntp server
+ CMAUI_volume_type:
+ label: CMAUI vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ node_templates:
+ stam_nested:
+ type: org.openecomp.resource.abstract.nodes.heat.nested
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nestedServiceTemplate.yaml
+ inner_cmaui_volume_a1:
+ get_input: inner_cmaui_volume_a1
+ inner_cmaui_volume_b2:
+ get_input: inner_cmaui_volume_a2
+ requirements:
+ - local_storage_server_cmaui2:
+ capability: tosca.capabilities.Attachment
+ node: cmaui_volume2
+ relationship: tosca.relationships.AttachesTo
+ - local_storage_server_cmaui1:
+ capability: tosca.capabilities.Attachment
+ node: inner_cmaui_volume_a1
+ relationship: tosca.relationships.AttachesTo
+ - local_storage_server_cmaui1:
+ capability: tosca.capabilities.Attachment
+ node: cmaui_volume2
+ relationship: tosca.relationships.AttachesTo
+ inner_cmaui_volume_a1:
+ 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'
+ 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'
+ groups:
+ a_vol:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/a_vol.yml
+ description: volume
+ members:
+ - inner_cmaui_volume_a1
+ - cmaui_volume2
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: cmaui server template for vMMSC
+ members:
+ - stam_nested
+ outputs:
+ inner_cmaui_volume_a2:
+ value: cmaui_volume2
+ inner_cmaui_volume_a1:
+ value: inner_cmaui_volume_a1 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/expectedoutputfiles/nestedServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/expectedoutputfiles/nestedServiceTemplate.yaml
new file mode 100644
index 0000000000..a9ec66bf29
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/expectedoutputfiles/nestedServiceTemplate.yaml
@@ -0,0 +1,279 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ cmaui_cinder_volume_size:
+ label: CMAUI Cinder volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the CMAUI Cinder volume
+ timezone:
+ label: timezone
+ hidden: false
+ immutable: false
+ type: string
+ description: timezone
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ cmaui_volume:
+ label: CMAUI volume size
+ hidden: false
+ immutable: false
+ type: string
+ description: Volume for CMAUI server
+ oam_network_netmask:
+ label: oam network netmask
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ oam_network_gateway:
+ label: oam network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ label: CMAUI oam_net IP addresses
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI oam_net IP addresses
+ entry_schema:
+ type: string
+ inner_cmaui_volume_a1:
+ label: CMAUI vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ inner_cmaui_volume_b2:
+ label: CMAUI vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ external_dns:
+ label: dns server
+ hidden: false
+ immutable: false
+ type: string
+ description: dns server
+ oam_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ external_ntp:
+ label: ntp server
+ hidden: false
+ immutable: false
+ type: string
+ description: ntp server
+ CMAUI_volume_type:
+ label: CMAUI vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ node_templates:
+ cmaui_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui2
+ relationship: tosca.relationships.network.BindsTo
+ server_cmaui2:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ server_cmaui1:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ cmaui_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui1
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested.yml
+ description: cmaui server template for vMMSC
+ members:
+ - cmaui_port_2
+ - server_cmaui2
+ - server_cmaui1
+ - cmaui_port_0
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested
+ capabilities:
+ scalable_server_cmaui1:
+ - server_cmaui1
+ - scalable
+ endpoint_server_cmaui1:
+ - server_cmaui1
+ - endpoint
+ os_server_cmaui1:
+ - server_cmaui1
+ - os
+ scalable_server_cmaui2:
+ - server_cmaui2
+ - scalable
+ endpoint_server_cmaui2:
+ - server_cmaui2
+ - endpoint
+ attachment_cmaui_port_2:
+ - cmaui_port_2
+ - attachment
+ host_server_cmaui1:
+ - server_cmaui1
+ - host
+ os_server_cmaui2:
+ - server_cmaui2
+ - os
+ binding_server_cmaui2:
+ - server_cmaui2
+ - binding
+ attachment_cmaui_port_0:
+ - cmaui_port_0
+ - attachment
+ host_server_cmaui2:
+ - server_cmaui2
+ - host
+ binding_server_cmaui1:
+ - server_cmaui1
+ - binding
+ requirements:
+ link_cmaui_port_0:
+ - cmaui_port_0
+ - link
+ link_cmaui_port_2:
+ - cmaui_port_2
+ - link
+ local_storage_server_cmaui2:
+ - server_cmaui2
+ - local_storage
+ local_storage_server_cmaui1:
+ - server_cmaui1
+ - local_storage \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..0aa103e5b8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/inputfiles/MANIFEST.json
@@ -0,0 +1,24 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "nested.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ },
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "false",
+ "data":[
+ {
+ "file": "a_vol.yml",
+ "type": "HEAT_VOL",
+ "isBase": "false"
+ }
+ ]
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/inputfiles/a_vol.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/inputfiles/a_vol.yml
new file mode 100644
index 0000000000..df5be20848
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/inputfiles/a_vol.yml
@@ -0,0 +1,32 @@
+heat_template_version: 2013-05-23
+
+description: volume
+
+parameters:
+ cmaui_cinder_volume_size:
+ type: number
+ label: CMAUI Cinder volume size
+ description: the size of the CMAUI Cinder volume
+ CMAUI_volume_type:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+
+resources:
+ inner_cmaui_volume_a1:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: cmaui_cinder_volume_size}
+ volume_type: {get_param: CMAUI_volume_type}
+
+ cmaui_volume2:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: cmaui_cinder_volume_size}
+ volume_type: {get_param: CMAUI_volume_type}
+
+outputs:
+ inner_cmaui_volume_a1:
+ value: {get_resource: inner_cmaui_volume_a1}
+ inner_cmaui_volume_a2:
+ value: {get_resource: cmaui_volume2} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/inputfiles/main.yml
new file mode 100644
index 0000000000..7994b332df
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/inputfiles/main.yml
@@ -0,0 +1,77 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ inner_cmaui_volume_a1:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ inner_cmaui_volume_a2:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_cinder_volume_size:
+ type: number
+ label: CMAUI Cinder volume size
+ description: the size of the CMAUI Cinder volume
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ oam_net_name:
+ type: string
+ description: UID of OAM network
+ oam_network_netmask:
+ type: string
+ label: oam network netmask
+ description: oam network gateway
+ oam_network_gateway:
+ type: string
+ label: oam network gateway
+ description: oam network gateway
+ external_dns:
+ type: string
+ label: dns server
+ description: dns server
+ external_ntp:
+ type: string
+ label: ntp server
+ description: ntp server
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ timezone:
+ type: string
+ label: timezone
+ description: timezone
+ cmaui_oam_ips:
+ type: comma_delimited_list
+ label: CMAUI oam_net IP addresses
+ description: CMAUI oam_net IP addresses
+ CMAUI_volume_type:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+
+resources:
+
+ stam_nested:
+ type: nested.yml
+ properties:
+ inner_cmaui_volume_a1: { get_param: inner_cmaui_volume_a1}
+ inner_cmaui_volume_b2: { get_param: inner_cmaui_volume_a2} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/inputfiles/nested.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/inputfiles/nested.yml
new file mode 100644
index 0000000000..078b228d29
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/innernestedconnection/inputfiles/nested.yml
@@ -0,0 +1,170 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_volume:
+ type: string
+ label: CMAUI volume size
+ description: Volume for CMAUI server
+ cmaui_cinder_volume_size:
+ type: number
+ label: CMAUI Cinder volume size
+ description: the size of the CMAUI Cinder volume
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ oam_net_name:
+ type: string
+ description: UID of OAM network
+ oam_network_netmask:
+ type: string
+ label: oam network netmask
+ description: oam network gateway
+ oam_network_gateway:
+ type: string
+ label: oam network gateway
+ description: oam network gateway
+ external_dns:
+ type: string
+ label: dns server
+ description: dns server
+ external_ntp:
+ type: string
+ label: ntp server
+ description: ntp server
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ timezone:
+ type: string
+ label: timezone
+ description: timezone
+ cmaui_oam_ips:
+ type: comma_delimited_list
+ label: CMAUI oam_net IP addresses
+ description: CMAUI oam_net IP addresses
+ CMAUI_volume_type:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+ inner_cmaui_volume_a1:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+ inner_cmaui_volume_b2:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+
+resources:
+
+ cmaui_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+ cmaui_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ cmaui_volume_attachment1:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_param: inner_cmaui_volume_a1}
+ instance_uuid: {get_resource: server_cmaui1}
+
+ cmaui_volume_attachment2:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_param: inner_cmaui_volume_b2}
+ instance_uuid: {get_resource: server_cmaui1}
+
+ cmaui_volume_attachment3:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_param: inner_cmaui_volume_b2}
+ instance_uuid: {get_resource: server_cmaui2}
+
+ server_cmaui1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_0 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ cmaui.mgmt.ip=${cmaui.mgmt.ip}
+ cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
+ cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
+ cmaui.external.dns=${cmaui.external.dns}
+ cmaui.external.ntp=${cmaui.external.ntp}
+ cmaui.node=${cmaui.node}
+ cmaui.timezone=${cmaui.timezone}
+ params:
+ ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 0]}
+ ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${cmaui.external.dns}: {get_param: external_dns}
+ ${cmaui.external.ntp}: {get_param: external_ntp}
+ ${cmaui.node}: {get_param: [cmaui_names, 0]}
+ ${cmaui.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ server_cmaui2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ cmaui.mgmt.ip=${cmaui.mgmt.ip}
+ cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
+ cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
+ cmaui.external.dns=${cmaui.external.dns}
+ cmaui.external.ntp=${cmaui.external.ntp}
+ cmaui.node=${cmaui.node}
+ cmaui.timezone=${cmaui.timezone}
+ params:
+ ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 0]}
+ ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${cmaui.external.dns}: {get_param: external_dns}
+ ${cmaui.external.ntp}: {get_param: external_ntp}
+ ${cmaui.node}: {get_param: [cmaui_names, 0]}
+ ${cmaui.timezone}: {get_param: timezone}
+ user_data_format: RAW \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multiconnection/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multiconnection/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..dc3e231da4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multiconnection/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,276 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ cmaui_cinder_volume_size:
+ label: CMAUI Cinder volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the CMAUI Cinder volume
+ timezone:
+ label: timezone
+ hidden: false
+ immutable: false
+ type: string
+ description: timezone
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ cmaui_volume:
+ label: CMAUI vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ oam_network_netmask:
+ label: oam network netmask
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ cmaui_volume_param1:
+ hidden: false
+ immutable: false
+ type: string
+ description: nova server id
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ oam_network_gateway:
+ label: oam network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ cmaui_volume_param2:
+ hidden: false
+ immutable: false
+ type: string
+ description: nova server id
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ label: CMAUI oam_net IP addresses
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI oam_net IP addresses
+ entry_schema:
+ type: string
+ external_dns:
+ label: dns server
+ hidden: false
+ immutable: false
+ type: string
+ description: dns server
+ oam_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ CMAUI_volume_type:
+ label: CMAUI vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ external_ntp:
+ label: ntp server
+ hidden: false
+ immutable: false
+ type: string
+ description: ntp server
+ node_templates:
+ cmaui_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui2
+ relationship: tosca.relationships.network.BindsTo
+ server_cmaui2:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: cmaui_volume2
+ relationship: cmaui_volume_attachment3
+ server_cmaui1:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: cmaui_volume1
+ relationship: cmaui_volume_attachment1
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: cmaui_volume2
+ relationship: cmaui_volume_attachment2
+ cmaui_volume1:
+ 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'
+ 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'
+ cmaui_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui1
+ relationship: tosca.relationships.network.BindsTo
+ relationship_templates:
+ cmaui_volume_attachment2:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id:
+ get_input: cmaui_volume_param2
+ instance_uuid: server_cmaui1
+ cmaui_volume_attachment3:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id:
+ get_input: cmaui_volume_param2
+ instance_uuid: server_cmaui2
+ cmaui_volume_attachment1:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id:
+ get_input: cmaui_volume_param1
+ instance_uuid: server_cmaui1
+ groups:
+ addOn:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/addOn.yml
+ description: cmaui server template for vMMSC
+ members:
+ - cmaui_port_2
+ - server_cmaui2
+ - server_cmaui1
+ - cmaui_port_1
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: volume
+ members:
+ - cmaui_volume1
+ - cmaui_volume2 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multiconnection/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multiconnection/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..1f762d0ccc
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multiconnection/inputfiles/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ },
+ {
+ "file": "addOn.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multiconnection/inputfiles/addOn.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multiconnection/inputfiles/addOn.yml
new file mode 100644
index 0000000000..1083268acf
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multiconnection/inputfiles/addOn.yml
@@ -0,0 +1,168 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ cmaui_volume_param1:
+ type: string
+ description: nova server id
+ cmaui_volume_param2:
+ type: string
+ description: nova server id
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_cinder_volume_size:
+ type: number
+ label: CMAUI Cinder volume size
+ description: the size of the CMAUI Cinder volume
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ oam_net_name:
+ type: string
+ description: UID of OAM network
+ oam_network_netmask:
+ type: string
+ label: oam network netmask
+ description: oam network gateway
+ oam_network_gateway:
+ type: string
+ label: oam network gateway
+ description: oam network gateway
+ external_dns:
+ type: string
+ label: dns server
+ description: dns server
+ external_ntp:
+ type: string
+ label: ntp server
+ description: ntp server
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ timezone:
+ type: string
+ label: timezone
+ description: timezone
+ cmaui_oam_ips:
+ type: comma_delimited_list
+ label: CMAUI oam_net IP addresses
+ description: CMAUI oam_net IP addresses
+ CMAUI_volume_type:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+ cmaui_volume:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+
+resources:
+
+ cmaui_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+ cmaui_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ cmaui_volume_attachment1:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_param: cmaui_volume_param1}
+ instance_uuid: {get_resource: server_cmaui1}
+
+ cmaui_volume_attachment2:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_param: cmaui_volume_param2}
+ instance_uuid: {get_resource: server_cmaui1}
+
+ cmaui_volume_attachment3:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_param: cmaui_volume_param2}
+ instance_uuid: {get_resource: server_cmaui2}
+
+ server_cmaui1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_1 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ cmaui.mgmt.ip=${cmaui.mgmt.ip}
+ cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
+ cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
+ cmaui.external.dns=${cmaui.external.dns}
+ cmaui.external.ntp=${cmaui.external.ntp}
+ cmaui.node=${cmaui.node}
+ cmaui.timezone=${cmaui.timezone}
+ params:
+ ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 0]}
+ ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${cmaui.external.dns}: {get_param: external_dns}
+ ${cmaui.external.ntp}: {get_param: external_ntp}
+ ${cmaui.node}: {get_param: [cmaui_names, 0]}
+ ${cmaui.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ server_cmaui2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ cmaui.mgmt.ip=${cmaui.mgmt.ip}
+ cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
+ cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
+ cmaui.external.dns=${cmaui.external.dns}
+ cmaui.external.ntp=${cmaui.external.ntp}
+ cmaui.node=${cmaui.node}
+ cmaui.timezone=${cmaui.timezone}
+ params:
+ ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 0]}
+ ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${cmaui.external.dns}: {get_param: external_dns}
+ ${cmaui.external.ntp}: {get_param: external_ntp}
+ ${cmaui.node}: {get_param: [cmaui_names, 0]}
+ ${cmaui.timezone}: {get_param: timezone}
+ user_data_format: RAW \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multiconnection/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multiconnection/inputfiles/main.yml
new file mode 100644
index 0000000000..89734ad14b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multiconnection/inputfiles/main.yml
@@ -0,0 +1,31 @@
+heat_template_version: 2013-05-23
+
+description: volume
+
+parameters:
+ cmaui_cinder_volume_size:
+ type: number
+ label: CMAUI Cinder volume size
+ description: the size of the CMAUI Cinder volume
+ CMAUI_volume_type:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+
+resources:
+ cmaui_volume1:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: cmaui_cinder_volume_size}
+ volume_type: {get_param: CMAUI_volume_type}
+ cmaui_volume2:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: cmaui_cinder_volume_size}
+ volume_type: {get_param: CMAUI_volume_type}
+
+outputs:
+ cmaui_volume_param1:
+ value: {get_resource: cmaui_volume1}
+ cmaui_volume_param2:
+ value: {get_resource: cmaui_volume2} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multinotconnected/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multinotconnected/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..0d723c6e6f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multinotconnected/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,314 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ availability_zone_10:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_cinder_volume_size:
+ label: CMAUI Cinder volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the CMAUI Cinder volume
+ timezone:
+ label: timezone
+ hidden: false
+ immutable: false
+ type: string
+ description: timezone
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ cmaui_volume:
+ label: CMAUI vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ oam_network_netmask:
+ label: oam network netmask
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_volume_param1:
+ hidden: false
+ immutable: false
+ type: string
+ description: nova server id
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ oam_network_gateway:
+ label: oam network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ cmaui_volume_param2:
+ hidden: false
+ immutable: false
+ type: string
+ description: nova server id
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ label: CMAUI oam_net IP addresses
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI oam_net IP addresses
+ entry_schema:
+ type: string
+ external_dns:
+ label: dns server
+ hidden: false
+ immutable: false
+ type: string
+ description: dns server
+ server_cmaui21:
+ hidden: false
+ immutable: false
+ type: string
+ description: nova server id
+ oam_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ CMAUI_volume_type:
+ label: CMAUI vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ external_ntp:
+ label: ntp server
+ hidden: false
+ immutable: false
+ type: string
+ description: ntp server
+ node_templates:
+ cmaui_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui2
+ relationship: tosca.relationships.network.BindsTo
+ cmaui_port_11:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui21
+ relationship: tosca.relationships.network.BindsTo
+ server_cmaui2:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: cmaui_volume2
+ relationship: cmaui_volume_attachment3
+ server_cmaui1:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: cmaui_volume2
+ relationship: cmaui_volume_attachment2
+ cmaui_volume1:
+ 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'
+ server_cmaui21:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_10
+ image:
+ get_input: cmaui_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ 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'
+ cmaui_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui1
+ relationship: tosca.relationships.network.BindsTo
+ relationship_templates:
+ cmaui_volume_attachment2:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id:
+ get_input: cmaui_volume_param2
+ instance_uuid: server_cmaui1
+ cmaui_volume_attachment3:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id:
+ get_input: cmaui_volume_param2
+ instance_uuid: server_cmaui2
+ groups:
+ addOn:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/addOn.yml
+ description: cmaui server template for vMMSC
+ members:
+ - cmaui_port_2
+ - server_cmaui2
+ - server_cmaui1
+ - cmaui_port_1
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: volume
+ members:
+ - cmaui_port_11
+ - cmaui_volume1
+ - server_cmaui21
+ - cmaui_volume2 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multinotconnected/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multinotconnected/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..1f762d0ccc
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multinotconnected/inputfiles/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ },
+ {
+ "file": "addOn.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multinotconnected/inputfiles/addOn.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multinotconnected/inputfiles/addOn.yml
new file mode 100644
index 0000000000..9716dc2f20
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multinotconnected/inputfiles/addOn.yml
@@ -0,0 +1,171 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ cmaui_volume_param1:
+ type: string
+ description: nova server id
+ server_cmaui21:
+ type: string
+ description: nova server id
+ cmaui_volume_param2:
+ type: string
+ description: nova server id
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_cinder_volume_size:
+ type: number
+ label: CMAUI Cinder volume size
+ description: the size of the CMAUI Cinder volume
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ oam_net_name:
+ type: string
+ description: UID of OAM network
+ oam_network_netmask:
+ type: string
+ label: oam network netmask
+ description: oam network gateway
+ oam_network_gateway:
+ type: string
+ label: oam network gateway
+ description: oam network gateway
+ external_dns:
+ type: string
+ label: dns server
+ description: dns server
+ external_ntp:
+ type: string
+ label: ntp server
+ description: ntp server
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ timezone:
+ type: string
+ label: timezone
+ description: timezone
+ cmaui_oam_ips:
+ type: comma_delimited_list
+ label: CMAUI oam_net IP addresses
+ description: CMAUI oam_net IP addresses
+ CMAUI_volume_type:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+ cmaui_volume:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+
+resources:
+
+ cmaui_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+ cmaui_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ cmaui_volume_attachment1:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_param: server_cmaui21}
+ instance_uuid: {get_resource: server_cmaui1}
+
+ cmaui_volume_attachment2:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_param: cmaui_volume_param2}
+ instance_uuid: {get_resource: server_cmaui1}
+
+ cmaui_volume_attachment3:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_param: cmaui_volume_param2}
+ instance_uuid: {get_resource: server_cmaui2}
+
+ server_cmaui1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_1 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ cmaui.mgmt.ip=${cmaui.mgmt.ip}
+ cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
+ cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
+ cmaui.external.dns=${cmaui.external.dns}
+ cmaui.external.ntp=${cmaui.external.ntp}
+ cmaui.node=${cmaui.node}
+ cmaui.timezone=${cmaui.timezone}
+ params:
+ ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 0]}
+ ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${cmaui.external.dns}: {get_param: external_dns}
+ ${cmaui.external.ntp}: {get_param: external_ntp}
+ ${cmaui.node}: {get_param: [cmaui_names, 0]}
+ ${cmaui.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ server_cmaui2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ cmaui.mgmt.ip=${cmaui.mgmt.ip}
+ cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
+ cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
+ cmaui.external.dns=${cmaui.external.dns}
+ cmaui.external.ntp=${cmaui.external.ntp}
+ cmaui.node=${cmaui.node}
+ cmaui.timezone=${cmaui.timezone}
+ params:
+ ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 0]}
+ ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${cmaui.external.dns}: {get_param: external_dns}
+ ${cmaui.external.ntp}: {get_param: external_ntp}
+ ${cmaui.node}: {get_param: [cmaui_names, 0]}
+ ${cmaui.timezone}: {get_param: timezone}
+ user_data_format: RAW \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multinotconnected/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multinotconnected/inputfiles/main.yml
new file mode 100644
index 0000000000..d81d9d8aed
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/multinotconnected/inputfiles/main.yml
@@ -0,0 +1,128 @@
+heat_template_version: 2013-05-23
+
+description: volume
+
+parameters:
+ availability_zone_10:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_cinder_volume_size:
+ type: number
+ label: CMAUI Cinder volume size
+ description: the size of the CMAUI Cinder volume
+ CMAUI_volume_type:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+ vnf_id:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ oam_net_name:
+ type: string
+ description: UID of OAM network
+ oam_network_netmask:
+ type: string
+ label: oam network netmask
+ description: oam network gateway
+ oam_network_gateway:
+ type: string
+ label: oam network gateway
+ description: oam network gateway
+ external_dns:
+ type: string
+ label: dns server
+ description: dns server
+ external_ntp:
+ type: string
+ label: ntp server
+ description: ntp server
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ timezone:
+ type: string
+ label: timezone
+ description: timezone
+ cmaui_oam_ips:
+ type: comma_delimited_list
+ label: CMAUI oam_net IP addresses
+ description: CMAUI oam_net IP addresses
+ cmaui_volume:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+
+resources:
+ cmaui_volume1:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: cmaui_cinder_volume_size}
+ volume_type: {get_param: CMAUI_volume_type}
+ cmaui_volume2:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: cmaui_cinder_volume_size}
+ volume_type: {get_param: CMAUI_volume_type}
+
+ server_cmaui21:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_10 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_11 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ cmaui.mgmt.ip=${cmaui.mgmt.ip}
+ cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
+ cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
+ cmaui.external.dns=${cmaui.external.dns}
+ cmaui.external.ntp=${cmaui.external.ntp}
+ cmaui.node=${cmaui.node}
+ cmaui.timezone=${cmaui.timezone}
+ params:
+ ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 0]}
+ ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${cmaui.external.dns}: {get_param: external_dns}
+ ${cmaui.external.ntp}: {get_param: external_ntp}
+ ${cmaui.node}: {get_param: [cmaui_names, 0]}
+ ${cmaui.timezone}: {get_param: timezone}
+ user_data_format: RAW
+
+ cmaui_port_11:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+outputs:
+ cmaui_volume_param1:
+ value: {get_resource: cmaui_volume1}
+ cmaui_volume_param2:
+ value: {get_resource: cmaui_volume2}
+ cmaui_volume_param3:
+ value: {get_resource: server_cmaui21} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestedconnection/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestedconnection/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..889961bd45
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestedconnection/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,109 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.nested:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ cmaui_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_volume_param:
+ type: string
+ description: nova server id
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ security_group_name:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ availability_zone_0:
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ type: string
+ requirements:
+ - local_storage_server_cmaui:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_cmaui_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ host_server_cmaui:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_0:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestedconnection/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestedconnection/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..2b09784a72
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestedconnection/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,76 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ cmaui_cinder_volume_size:
+ label: CMAUI Cinder volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the CMAUI Cinder volume
+ CMAUI_volume_type:
+ label: CMAUI vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ node_templates:
+ test_vol:
+ 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'
+ test_nested:
+ type: org.openecomp.resource.abstract.nodes.heat.nested
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nestedServiceTemplate.yaml
+ cmaui_volume_param: test_vol
+ requirements:
+ - local_storage_server_cmaui:
+ capability: tosca.capabilities.Attachment
+ node: test_vol
+ relationship: tosca.relationships.AttachesTo
+ groups:
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - test_vol
+ - test_nested \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestedconnection/expectedoutputfiles/nestedServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestedconnection/expectedoutputfiles/nestedServiceTemplate.yaml
new file mode 100644
index 0000000000..485e7031b4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestedconnection/expectedoutputfiles/nestedServiceTemplate.yaml
@@ -0,0 +1,150 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_volume_param:
+ hidden: false
+ immutable: false
+ type: string
+ description: nova server id
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ node_templates:
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ cmaui_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: p1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested.yml
+ description: cmaui server template for vMMSC
+ members:
+ - server_cmaui
+ - cmaui_port_0
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested
+ capabilities:
+ host_server_cmaui:
+ - server_cmaui
+ - host
+ os_server_cmaui:
+ - server_cmaui
+ - os
+ endpoint_server_cmaui:
+ - server_cmaui
+ - endpoint
+ binding_server_cmaui:
+ - server_cmaui
+ - binding
+ scalable_server_cmaui:
+ - server_cmaui
+ - scalable
+ attachment_cmaui_port_0:
+ - cmaui_port_0
+ - attachment
+ requirements:
+ local_storage_server_cmaui:
+ - server_cmaui
+ - local_storage
+ link_cmaui_port_0:
+ - cmaui_port_0
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestedconnection/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestedconnection/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..aca75b5055
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestedconnection/inputfiles/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ },
+ {
+ "file": "nested.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestedconnection/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestedconnection/inputfiles/main.yml
new file mode 100644
index 0000000000..b016f53d5b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestedconnection/inputfiles/main.yml
@@ -0,0 +1,26 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ cmaui_cinder_volume_size:
+ type: number
+ label: CMAUI Cinder volume size
+ description: the size of the CMAUI Cinder volume
+ CMAUI_volume_type:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+
+resources:
+ test_vol:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: cmaui_cinder_volume_size}
+ volume_type: {get_param: CMAUI_volume_type}
+
+ test_nested:
+ type: nested.yml
+ properties:
+ cmaui_volume_param: { get_resource: test_vol}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestedconnection/inputfiles/nested.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestedconnection/inputfiles/nested.yml
new file mode 100644
index 0000000000..922c4d1613
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestedconnection/inputfiles/nested.yml
@@ -0,0 +1,55 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ cmaui_volume_param:
+ type: string
+ description: nova server id
+ p1:
+ type: string
+ description: UID of OAM network
+ security_group_name:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+
+resources:
+
+ cmaui_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: p1 }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_0 }
+
+ cmaui_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_param: cmaui_volume_param}
+ instance_uuid: {get_resource: server_cmaui} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..889961bd45
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,109 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.nested:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ cmaui_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_volume_param:
+ type: string
+ description: nova server id
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ security_group_name:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ availability_zone_0:
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ type: string
+ requirements:
+ - local_storage_server_cmaui:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_cmaui_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ host_server_cmaui:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_0:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..9722ae1b16
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,146 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_cinder_volume_size:
+ label: CMAUI Cinder volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the CMAUI Cinder volume
+ security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ CMAUI_volume_type:
+ label: CMAUI vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ node_templates:
+ server_cmaui1:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ test_vol:
+ 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'
+ cmaui_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: p1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui1
+ relationship: tosca.relationships.network.BindsTo
+ test_nested:
+ type: org.openecomp.resource.abstract.nodes.heat.nested
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nestedServiceTemplate.yaml
+ cmaui_volume_param: server_cmaui1
+ groups:
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - server_cmaui1
+ - test_vol
+ - cmaui_port_1
+ - test_nested \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/expectedoutputfiles/nestedServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/expectedoutputfiles/nestedServiceTemplate.yaml
new file mode 100644
index 0000000000..485e7031b4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/expectedoutputfiles/nestedServiceTemplate.yaml
@@ -0,0 +1,150 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_volume_param:
+ hidden: false
+ immutable: false
+ type: string
+ description: nova server id
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ node_templates:
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ cmaui_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: p1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested.yml
+ description: cmaui server template for vMMSC
+ members:
+ - server_cmaui
+ - cmaui_port_0
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested
+ capabilities:
+ host_server_cmaui:
+ - server_cmaui
+ - host
+ os_server_cmaui:
+ - server_cmaui
+ - os
+ endpoint_server_cmaui:
+ - server_cmaui
+ - endpoint
+ binding_server_cmaui:
+ - server_cmaui
+ - binding
+ scalable_server_cmaui:
+ - server_cmaui
+ - scalable
+ attachment_cmaui_port_0:
+ - cmaui_port_0
+ - attachment
+ requirements:
+ local_storage_server_cmaui:
+ - server_cmaui
+ - local_storage
+ link_cmaui_port_0:
+ - cmaui_port_0
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..aca75b5055
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/inputfiles/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ },
+ {
+ "file": "nested.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/inputfiles/main.yml
new file mode 100644
index 0000000000..46c2d64d8e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/inputfiles/main.yml
@@ -0,0 +1,64 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ cmaui_cinder_volume_size:
+ type: number
+ label: CMAUI Cinder volume size
+ description: the size of the CMAUI Cinder volume
+ CMAUI_volume_type:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+ security_group_name:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+ p1:
+ type: string
+ description: UID of OAM network
+
+resources:
+ test_vol:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: cmaui_cinder_volume_size}
+ volume_type: {get_param: CMAUI_volume_type}
+ cmaui_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: p1 }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_cmaui1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_1 }
+
+ test_nested:
+ type: nested.yml
+ properties:
+ cmaui_volume_param: { get_resource: server_cmaui1}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/inputfiles/nested.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/inputfiles/nested.yml
new file mode 100644
index 0000000000..922c4d1613
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/inputfiles/nested.yml
@@ -0,0 +1,55 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ cmaui_volume_param:
+ type: string
+ description: nova server id
+ p1:
+ type: string
+ description: UID of OAM network
+ security_group_name:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+
+resources:
+
+ cmaui_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: p1 }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_0 }
+
+ cmaui_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_param: cmaui_volume_param}
+ instance_uuid: {get_resource: server_cmaui} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..fd5eae6858
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,158 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.nested:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ cmaui_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_volume_param2:
+ type: string
+ description: nova server id
+ security_group_name:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ availability_zone_0:
+ type: string
+ description: availabilityzone name
+ shared_vol1:
+ type: string
+ description: nova server id
+ cmaui_oam_ips:
+ type: string
+ requirements:
+ - link_cmaui_port_2:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_server_cmaui2:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - local_storage_server_cmaui1:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_cmaui_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ scalable_server_cmaui1:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui1:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui1:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui2:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui2:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_2:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_cmaui1:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui2:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui2:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_cmaui2:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui1:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_1:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..383ef54a4e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,114 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ cmaui_cinder_volume_size:
+ label: CMAUI Cinder volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the CMAUI Cinder volume
+ shared_vol1:
+ hidden: false
+ immutable: false
+ type: string
+ description: volume name
+ shared_vol2:
+ hidden: false
+ immutable: false
+ type: string
+ description: volume name
+ CMAUI_volume_type:
+ label: CMAUI vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ node_templates:
+ test_vol1:
+ 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'
+ 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'
+ test_nested:
+ type: org.openecomp.resource.abstract.nodes.heat.nested
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nestedServiceTemplate.yaml
+ cmaui_volume_param2:
+ get_input: shared_vol2
+ shared_vol1:
+ get_input: shared_vol1
+ requirements:
+ - local_storage_server_cmaui2:
+ capability: tosca.capabilities.Attachment
+ node: test_vol1
+ relationship: tosca.relationships.AttachesTo
+ - local_storage_server_cmaui1:
+ capability: tosca.capabilities.Attachment
+ node: test_vol1
+ relationship: tosca.relationships.AttachesTo
+ - local_storage_server_cmaui1:
+ capability: tosca.capabilities.Attachment
+ node: test_vol2
+ relationship: tosca.relationships.AttachesTo
+ groups:
+ addOn:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/addOn.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - test_nested
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - test_vol1
+ - test_vol2
+ outputs:
+ out1_not_shared:
+ value: test_nested \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/expectedoutputfiles/nestedServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/expectedoutputfiles/nestedServiceTemplate.yaml
new file mode 100644
index 0000000000..68a602e14a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/expectedoutputfiles/nestedServiceTemplate.yaml
@@ -0,0 +1,212 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_volume_param2:
+ hidden: false
+ immutable: false
+ type: string
+ description: nova server id
+ security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ shared_vol1:
+ hidden: false
+ immutable: false
+ type: string
+ description: nova server id
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ node_templates:
+ cmaui_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: p1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui2
+ relationship: tosca.relationships.network.BindsTo
+ server_cmaui2:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ server_cmaui1:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ cmaui_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: p1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui1
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested.yml
+ description: cmaui server template for vMMSC
+ members:
+ - cmaui_port_2
+ - server_cmaui2
+ - server_cmaui1
+ - cmaui_port_1
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested
+ capabilities:
+ scalable_server_cmaui1:
+ - server_cmaui1
+ - scalable
+ endpoint_server_cmaui1:
+ - server_cmaui1
+ - endpoint
+ os_server_cmaui1:
+ - server_cmaui1
+ - os
+ scalable_server_cmaui2:
+ - server_cmaui2
+ - scalable
+ endpoint_server_cmaui2:
+ - server_cmaui2
+ - endpoint
+ attachment_cmaui_port_2:
+ - cmaui_port_2
+ - attachment
+ host_server_cmaui1:
+ - server_cmaui1
+ - host
+ os_server_cmaui2:
+ - server_cmaui2
+ - os
+ binding_server_cmaui2:
+ - server_cmaui2
+ - binding
+ host_server_cmaui2:
+ - server_cmaui2
+ - host
+ binding_server_cmaui1:
+ - server_cmaui1
+ - binding
+ attachment_cmaui_port_1:
+ - cmaui_port_1
+ - attachment
+ requirements:
+ link_cmaui_port_2:
+ - cmaui_port_2
+ - link
+ link_cmaui_port_1:
+ - cmaui_port_1
+ - link
+ local_storage_server_cmaui2:
+ - server_cmaui2
+ - local_storage
+ local_storage_server_cmaui1:
+ - server_cmaui1
+ - local_storage \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..8ba5fc48f4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/inputfiles/MANIFEST.json
@@ -0,0 +1,22 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ },
+ {
+ "file": "nested.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ },
+ {
+ "file": "addOn.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/inputfiles/addOn.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/inputfiles/addOn.yml
new file mode 100644
index 0000000000..20fb8c92d8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/inputfiles/addOn.yml
@@ -0,0 +1,30 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ shared_vol1:
+ type: string
+ description: volume name
+ shared_vol2:
+ type: string
+ description: volume name
+ cmaui_cinder_volume_size:
+ type: number
+ label: CMAUI Cinder volume size
+ description: the size of the CMAUI Cinder volume
+ CMAUI_volume_type:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+
+resources:
+ test_nested:
+ type: nested.yml
+ properties:
+ shared_vol1: { get_param: shared_vol1}
+ cmaui_volume_param2: { get_param: shared_vol2}
+outputs:
+ out1_not_shared:
+ value: {get_resource: test_nested} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/inputfiles/main.yml
new file mode 100644
index 0000000000..e32c24e200
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/inputfiles/main.yml
@@ -0,0 +1,32 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ cmaui_cinder_volume_size:
+ type: number
+ label: CMAUI Cinder volume size
+ description: the size of the CMAUI Cinder volume
+ CMAUI_volume_type:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+
+resources:
+ test_vol1:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: cmaui_cinder_volume_size}
+ volume_type: {get_param: CMAUI_volume_type}
+ test_vol2:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: cmaui_cinder_volume_size}
+ volume_type: {get_param: CMAUI_volume_type}
+
+outputs:
+ shared_vol1:
+ value: {get_resource: test_vol1}
+ shared_vol2:
+ value: {get_resource: test_vol2}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/inputfiles/nested.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/inputfiles/nested.yml
new file mode 100644
index 0000000000..b5c913c48d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestedconnection/inputfiles/nested.yml
@@ -0,0 +1,87 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ shared_vol1:
+ type: string
+ description: nova server id
+ cmaui_volume_param2:
+ type: string
+ description: nova server id
+ p1:
+ type: string
+ description: UID of OAM network
+ security_group_name:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+resources:
+
+ cmaui_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: p1 }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ cmaui_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: p1 }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_cmaui1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_1 }
+
+ server_cmaui2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_2 }
+
+ cmaui_volume_attachment1:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_param: shared_vol1}
+ instance_uuid: {get_resource: server_cmaui1}
+
+ cmaui_volume_attachment2:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_param: cmaui_volume_param2}
+ instance_uuid: {get_resource: server_cmaui1}
+
+ cmaui_volume_attachment3:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_param: shared_vol1}
+ instance_uuid: {get_resource: server_cmaui2} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..fd5eae6858
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,158 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.nested:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ cmaui_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_volume_param2:
+ type: string
+ description: nova server id
+ security_group_name:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ availability_zone_0:
+ type: string
+ description: availabilityzone name
+ shared_vol1:
+ type: string
+ description: nova server id
+ cmaui_oam_ips:
+ type: string
+ requirements:
+ - link_cmaui_port_2:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_server_cmaui2:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - local_storage_server_cmaui1:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_cmaui_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ scalable_server_cmaui1:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui1:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui1:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui2:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui2:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_2:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_cmaui1:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui2:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui2:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_cmaui2:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui1:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_1:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..f279e7f83d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,181 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_cinder_volume_size:
+ label: CMAUI Cinder volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the CMAUI Cinder volume
+ security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ shared_vol1:
+ hidden: false
+ immutable: false
+ type: string
+ description: volume name
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ shared_vol2:
+ hidden: false
+ immutable: false
+ type: string
+ description: volume name
+ CMAUI_volume_type:
+ label: CMAUI vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ node_templates:
+ test_vol1:
+ 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'
+ 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'
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ cmaui_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: p1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ test_nested:
+ type: org.openecomp.resource.abstract.nodes.heat.nested
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nestedServiceTemplate.yaml
+ cmaui_volume_param2:
+ get_input: shared_vol2
+ shared_vol1:
+ get_input: shared_vol1
+ requirements:
+ - local_storage_server_cmaui1:
+ capability: tosca.capabilities.Attachment
+ node: test_vol2
+ relationship: tosca.relationships.AttachesTo
+ groups:
+ addOn:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/addOn.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - test_nested
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - test_vol1
+ - test_vol2
+ - server_cmaui
+ - cmaui_port_0
+ outputs:
+ out1_not_shared:
+ value: test_nested \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/expectedoutputfiles/nestedServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/expectedoutputfiles/nestedServiceTemplate.yaml
new file mode 100644
index 0000000000..68a602e14a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/expectedoutputfiles/nestedServiceTemplate.yaml
@@ -0,0 +1,212 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_volume_param2:
+ hidden: false
+ immutable: false
+ type: string
+ description: nova server id
+ security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ shared_vol1:
+ hidden: false
+ immutable: false
+ type: string
+ description: nova server id
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ node_templates:
+ cmaui_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: p1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui2
+ relationship: tosca.relationships.network.BindsTo
+ server_cmaui2:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ server_cmaui1:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ cmaui_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: p1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui1
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested.yml
+ description: cmaui server template for vMMSC
+ members:
+ - cmaui_port_2
+ - server_cmaui2
+ - server_cmaui1
+ - cmaui_port_1
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested
+ capabilities:
+ scalable_server_cmaui1:
+ - server_cmaui1
+ - scalable
+ endpoint_server_cmaui1:
+ - server_cmaui1
+ - endpoint
+ os_server_cmaui1:
+ - server_cmaui1
+ - os
+ scalable_server_cmaui2:
+ - server_cmaui2
+ - scalable
+ endpoint_server_cmaui2:
+ - server_cmaui2
+ - endpoint
+ attachment_cmaui_port_2:
+ - cmaui_port_2
+ - attachment
+ host_server_cmaui1:
+ - server_cmaui1
+ - host
+ os_server_cmaui2:
+ - server_cmaui2
+ - os
+ binding_server_cmaui2:
+ - server_cmaui2
+ - binding
+ host_server_cmaui2:
+ - server_cmaui2
+ - host
+ binding_server_cmaui1:
+ - server_cmaui1
+ - binding
+ attachment_cmaui_port_1:
+ - cmaui_port_1
+ - attachment
+ requirements:
+ link_cmaui_port_2:
+ - cmaui_port_2
+ - link
+ link_cmaui_port_1:
+ - cmaui_port_1
+ - link
+ local_storage_server_cmaui2:
+ - server_cmaui2
+ - local_storage
+ local_storage_server_cmaui1:
+ - server_cmaui1
+ - local_storage \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..8ba5fc48f4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/inputfiles/MANIFEST.json
@@ -0,0 +1,22 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ },
+ {
+ "file": "nested.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ },
+ {
+ "file": "addOn.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/inputfiles/addOn.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/inputfiles/addOn.yml
new file mode 100644
index 0000000000..20fb8c92d8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/inputfiles/addOn.yml
@@ -0,0 +1,30 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ shared_vol1:
+ type: string
+ description: volume name
+ shared_vol2:
+ type: string
+ description: volume name
+ cmaui_cinder_volume_size:
+ type: number
+ label: CMAUI Cinder volume size
+ description: the size of the CMAUI Cinder volume
+ CMAUI_volume_type:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+
+resources:
+ test_nested:
+ type: nested.yml
+ properties:
+ shared_vol1: { get_param: shared_vol1}
+ cmaui_volume_param2: { get_param: shared_vol2}
+outputs:
+ out1_not_shared:
+ value: {get_resource: test_nested} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/inputfiles/main.yml
new file mode 100644
index 0000000000..2e272bf42f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/inputfiles/main.yml
@@ -0,0 +1,70 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ cmaui_cinder_volume_size:
+ type: number
+ label: CMAUI Cinder volume size
+ description: the size of the CMAUI Cinder volume
+ CMAUI_volume_type:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+ p1:
+ type: string
+ description: UID of OAM network
+ security_group_name:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+
+resources:
+ test_vol1:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: cmaui_cinder_volume_size}
+ volume_type: {get_param: CMAUI_volume_type}
+ test_vol2:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: cmaui_cinder_volume_size}
+ volume_type: {get_param: CMAUI_volume_type}
+ cmaui_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: p1 }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_0 }
+
+outputs:
+ shared_vol1:
+ value: {get_resource: server_cmaui}
+ shared_vol2:
+ value: {get_resource: test_vol2}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/inputfiles/nested.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/inputfiles/nested.yml
new file mode 100644
index 0000000000..b5c913c48d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/sharednestednotconnected/inputfiles/nested.yml
@@ -0,0 +1,87 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ shared_vol1:
+ type: string
+ description: nova server id
+ cmaui_volume_param2:
+ type: string
+ description: nova server id
+ p1:
+ type: string
+ description: UID of OAM network
+ security_group_name:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+resources:
+
+ cmaui_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: p1 }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ cmaui_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: p1 }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_cmaui1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_1 }
+
+ server_cmaui2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_2 }
+
+ cmaui_volume_attachment1:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_param: shared_vol1}
+ instance_uuid: {get_resource: server_cmaui1}
+
+ cmaui_volume_attachment2:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_param: cmaui_volume_param2}
+ instance_uuid: {get_resource: server_cmaui1}
+
+ cmaui_volume_attachment3:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_param: shared_vol1}
+ instance_uuid: {get_resource: server_cmaui2} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumemulticonnection/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumemulticonnection/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..8a24ebce83
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumemulticonnection/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,326 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui_image:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: String
+ cmaui_cinder_volume_size:
+ label: CMAUI Cinder volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the CMAUI Cinder volume
+ timezone:
+ label: timezone
+ hidden: false
+ immutable: false
+ type: string
+ description: timezone
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ cmaui_volume:
+ label: CMAUI vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ oam_network_netmask:
+ label: oam network netmask
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ cmaui_volume_param1:
+ hidden: false
+ immutable: false
+ type: string
+ description: nova server id
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ oam_network_gateway:
+ label: oam network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ cmaui_volume_param2:
+ hidden: false
+ immutable: false
+ type: string
+ description: nova server id
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ label: CMAUI oam_net IP addresses
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI oam_net IP addresses
+ entry_schema:
+ type: String
+ external_dns:
+ label: dns server
+ hidden: false
+ immutable: false
+ type: string
+ description: dns server
+ oam_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ CMAUI_volume_type:
+ label: CMAUI vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ external_ntp:
+ label: ntp server
+ hidden: false
+ immutable: false
+ type: string
+ description: ntp server
+ node_templates:
+ cmaui_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui2
+ relationship: tosca.relationships.network.BindsTo
+ server_cmaui2:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui_image
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ user_data:
+ str_replace:
+ template: |
+ cmaui.mgmt.ip=${cmaui.mgmt.ip}
+ cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
+ cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
+ cmaui.external.dns=${cmaui.external.dns}
+ cmaui.external.ntp=${cmaui.external.ntp}
+ cmaui.node=${cmaui.node}
+ cmaui.timezone=${cmaui.timezone}
+ params:
+ ${cmaui.mgmt.netmask}:
+ get_input: oam_network_netmask
+ ${cmaui.node}:
+ get_input:
+ - cmaui_names
+ - 0
+ ${cmaui.mgmt.gateway}:
+ get_input: oam_network_gateway
+ ${cmaui.mgmt.ip}:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ ${cmaui.external.ntp}:
+ get_input: external_ntp
+ ${cmaui.timezone}:
+ get_input: timezone
+ ${cmaui.external.dns}:
+ get_input: external_dns
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: cmaui_volume2
+ relationship: cmaui_volume_attachment3
+ server_cmaui1:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui_image
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ user_data:
+ str_replace:
+ template: |
+ cmaui.mgmt.ip=${cmaui.mgmt.ip}
+ cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
+ cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
+ cmaui.external.dns=${cmaui.external.dns}
+ cmaui.external.ntp=${cmaui.external.ntp}
+ cmaui.node=${cmaui.node}
+ cmaui.timezone=${cmaui.timezone}
+ params:
+ ${cmaui.mgmt.netmask}:
+ get_input: oam_network_netmask
+ ${cmaui.node}:
+ get_input:
+ - cmaui_names
+ - 0
+ ${cmaui.mgmt.gateway}:
+ get_input: oam_network_gateway
+ ${cmaui.mgmt.ip}:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ ${cmaui.external.ntp}:
+ get_input: external_ntp
+ ${cmaui.timezone}:
+ get_input: timezone
+ ${cmaui.external.dns}:
+ get_input: external_dns
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: cmaui_volume1
+ relationship: cmaui_volume_attachment1
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: cmaui_volume2
+ relationship: cmaui_volume_attachment2
+ cmaui_volume1:
+ 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'
+ 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'
+ cmaui_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui1
+ relationship: tosca.relationships.network.BindsTo
+ relationship_templates:
+ cmaui_volume_attachment2:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id:
+ get_input: cmaui_volume_param2
+ instance_uuid: server_cmaui1
+ cmaui_volume_attachment3:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id:
+ get_input: cmaui_volume_param2
+ instance_uuid: server_cmaui2
+ cmaui_volume_attachment1:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id:
+ get_input: cmaui_volume_param1
+ instance_uuid: server_cmaui1
+ groups:
+ addOn:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/addOn.yml
+ description: cmaui server template for vMMSC
+ members:
+ - cmaui_port_2
+ - server_cmaui2
+ - server_cmaui1
+ - cmaui_port_1
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: volume
+ members:
+ - cmaui_volume1
+ - cmaui_volume2 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumesharednestedconnection/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumesharednestedconnection/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..5e78625e01
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumesharednestedconnection/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,104 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+topology_template:
+ inputs:
+ cmaui_cinder_volume_size:
+ label: CMAUI Cinder volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the CMAUI Cinder volume
+ shared_vol1:
+ hidden: false
+ immutable: false
+ type: string
+ description: volume name
+ shared_vol2:
+ hidden: false
+ immutable: false
+ type: string
+ description: volume name
+ CMAUI_volume_type:
+ label: CMAUI vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ node_templates:
+ test_vol1:
+ 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'
+ 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'
+ test_nested:
+ type: org.openecomp.resource.abstract.nodes.heat.nested
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nestedServiceTemplate.yaml
+ cmaui_volume_param1:
+ get_input: shared_vol1
+ cmaui_volume_param2:
+ get_input: shared_vol2
+ requirements:
+ - local_storage_server_cmaui2:
+ capability: tosca.capabilities.Attachment
+ node: test_vol1
+ relationship: tosca.relationships.AttachesTo
+ - local_storage_server_cmaui1:
+ capability: tosca.capabilities.Attachment
+ node: test_vol1
+ relationship: tosca.relationships.AttachesTo
+ - local_storage_server_cmaui1:
+ capability: tosca.capabilities.Attachment
+ node: test_vol2
+ relationship: tosca.relationships.AttachesTo
+ groups:
+ addOn:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/addOn.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - test_nested
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - test_vol1
+ - test_vol2
+ outputs:
+ out1_not_shared:
+ value: test_nested \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumesharednestedconnection/inputfiles/addOn.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumesharednestedconnection/inputfiles/addOn.yml
new file mode 100644
index 0000000000..3114081d2b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumesharednestedconnection/inputfiles/addOn.yml
@@ -0,0 +1,30 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ shared_vol1:
+ type: string
+ description: volume name
+ shared_vol2:
+ type: string
+ description: volume name
+ cmaui_cinder_volume_size:
+ type: number
+ label: CMAUI Cinder volume size
+ description: the size of the CMAUI Cinder volume
+ CMAUI_volume_type:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+
+resources:
+ test_nested:
+ type: nested.yml
+ properties:
+ cmaui_volume_param1: { get_param: shared_vol1}
+ cmaui_volume_param2: { get_param: shared_vol2}
+outputs:
+ out1_not_shared:
+ value: {get_resource: test_nested} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/multi/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/multi/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..641b84337f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/multi/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,143 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ shared_network_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ jsa_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ node_templates:
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ test_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ cmaui_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: shared_network_id
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ addOn:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/addOn.yml
+ description: cmaui server template for vMMSC
+ members:
+ - server_cmaui
+ - cmaui_port_0
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - test_net \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/multi/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/multi/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..1f762d0ccc
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/multi/inputfiles/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ },
+ {
+ "file": "addOn.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/multi/inputfiles/addOn.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/multi/inputfiles/addOn.yml
new file mode 100644
index 0000000000..e6c5954fb0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/multi/inputfiles/addOn.yml
@@ -0,0 +1,48 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ p1:
+ type: string
+ description: UID of OAM network
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ security_group_name:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ shared_network_id:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+resources:
+
+ cmaui_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: shared_network_id }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_0 } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/multi/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/multi/inputfiles/main.yml
new file mode 100644
index 0000000000..73a2e3b45c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/multi/inputfiles/main.yml
@@ -0,0 +1,20 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ jsa_net_name:
+ type: string
+ description: network name of jsa log network
+
+resources:
+ test_net:
+ type: OS::Neutron::Net
+ properties:
+ name: {get_param: jsa_net_name}
+ shared: True
+
+outputs:
+ shared_network_id:
+ value: {get_resource: test_net} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..44aca0ee4d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,106 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.nested:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ cmaui_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ security_group_name:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ availability_zone_0:
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ type: string
+ requirements:
+ - local_storage_server_cmaui:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_cmaui_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ host_server_cmaui:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_0:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..052286f8a9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,225 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ left_vn_fqdn:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ Internal1_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ src_port_start:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ Internal1_default_gateway:
+ hidden: false
+ immutable: false
+ type: string
+ Internal1_dhcp:
+ hidden: false
+ immutable: false
+ type: string
+ src_port_end:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ policy_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ dst_port_end:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ simple_action:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ service_instance_fq_name:
+ hidden: false
+ immutable: false
+ type: string
+ Internal2_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ protocol:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ Internal2_dhcp:
+ hidden: false
+ immutable: false
+ type: string
+ dst_port_start:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ network_ipam_refs_data_ipam_subnets_addr_from_start_true:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ Internal2_default_gateway:
+ hidden: false
+ immutable: false
+ type: string
+ right_vn_fqdn:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ left_vn:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ direction:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ node_templates:
+ template_NetworkPolicy:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.contrailV2.NetworkRules
+ properties:
+ name:
+ get_input: policy_name
+ network_policy_entries:
+ network_policy_entries_policy_rule:
+ - network_policy_entries_policy_rule_dst_addresses:
+ - network_policy_entries_policy_rule_dst_addresses_virtual_network:
+ get_input: right_vn_fqdn
+ network_policy_entries_policy_rule_dst_ports:
+ - network_policy_entries_policy_rule_dst_ports_start_port:
+ get_input: dst_port_start
+ network_policy_entries_policy_rule_dst_ports_end_port:
+ get_input: dst_port_end
+ network_policy_entries_policy_rule_protocol:
+ get_input: protocol
+ network_policy_entries_policy_rule_src_addresses:
+ - network_policy_entries_policy_rule_src_addresses_virtual_network:
+ get_input: left_vn_fqdn
+ network_policy_entries_policy_rule_direction:
+ get_input: direction
+ network_policy_entries_policy_rule_src_ports:
+ - network_policy_entries_policy_rule_src_ports_start_port:
+ get_input: src_port_start
+ network_policy_entries_policy_rule_src_ports_end_port:
+ get_input: src_port_end
+ network_policy_entries_policy_rule_action_list:
+ network_policy_entries_policy_rule_action_list_simple_action:
+ get_input: simple_action
+ network_policy_entries_policy_rule_action_list_apply_service:
+ - get_input: service_instance_fq_name
+ requirements:
+ - network:
+ capability: tosca.capabilities.Attachment
+ node: test_net
+ relationship: org.openecomp.relationships.AttachesTo
+ test_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork
+ properties:
+ network_ipam_refs_data:
+ - network_ipam_refs_data_ipam_subnets:
+ - network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_policy_refs_data:
+ - network_policy_refs_data_sequence:
+ network_policy_refs_data_sequence_major: 0
+ network_policy_refs_data_sequence_minor: 0
+ network_name:
+ get_input: left_vn
+ network_ipam_refs:
+ - UNSUPPORTED_RESOURCE_template_NetworkIpam_2
+ network_policy_refs:
+ - list_join:
+ - ':'
+ - get_attribute:
+ - template_NetworkPolicy
+ - fq_name
+ requirements:
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: template_NetworkPolicy
+ relationship: tosca.relationships.DependsOn
+ test_nested:
+ type: org.openecomp.resource.abstract.nodes.heat.nested
+ directives:
+ - substitutable
+ properties:
+ p1: test_net
+ service_template_filter:
+ substitute_service_template: nestedServiceTemplate.yaml
+ requirements:
+ - link_cmaui_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net
+ relationship: tosca.relationships.network.LinksTo
+ groups:
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - template_NetworkPolicy
+ - test_net
+ - test_nested \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/expectedoutputfiles/nestedServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/expectedoutputfiles/nestedServiceTemplate.yaml
new file mode 100644
index 0000000000..cfe7f567c5
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/expectedoutputfiles/nestedServiceTemplate.yaml
@@ -0,0 +1,145 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ node_templates:
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ cmaui_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: p1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested.yml
+ description: cmaui server template for vMMSC
+ members:
+ - server_cmaui
+ - cmaui_port_0
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested
+ capabilities:
+ host_server_cmaui:
+ - server_cmaui
+ - host
+ os_server_cmaui:
+ - server_cmaui
+ - os
+ endpoint_server_cmaui:
+ - server_cmaui
+ - endpoint
+ binding_server_cmaui:
+ - server_cmaui
+ - binding
+ scalable_server_cmaui:
+ - server_cmaui
+ - scalable
+ attachment_cmaui_port_0:
+ - cmaui_port_0
+ - attachment
+ requirements:
+ local_storage_server_cmaui:
+ - server_cmaui
+ - local_storage
+ link_cmaui_port_0:
+ - cmaui_port_0
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..aca75b5055
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/inputfiles/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ },
+ {
+ "file": "nested.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/inputfiles/main.yml
new file mode 100644
index 0000000000..30e107dec7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/inputfiles/main.yml
@@ -0,0 +1,140 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ Internal1_cidr:
+ type: string
+ Internal2_cidr:
+ type: string
+ Internal1_default_gateway:
+ type: string
+ Internal2_default_gateway:
+ type: string
+ Internal1_dhcp:
+ type: string
+ Internal2_dhcp:
+ type: string
+ direction:
+ description: dummy
+ type: string
+ dst_port_end:
+ description: dummy
+ type: string
+ dst_port_start:
+ description: dummy
+ type: string
+ left_vn:
+ description: dummy
+ type: string
+ left_vn_fqdn:
+ description: dummy
+ type: string
+ network_ipam_refs_data_ipam_subnets_addr_from_start_true:
+ description: dummy
+ type: string
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2:
+ description: dummy
+ type: string
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2:
+ description: dummy
+ type: string
+ policy_name:
+ description: dummy
+ type: string
+ protocol:
+ description: dummy
+ type: string
+ right_vn_fqdn:
+ description: dummy
+ type: string
+ simple_action:
+ description: dummy
+ type: string
+ src_port_end:
+ description: dummy
+ type: string
+ src_port_start:
+ description: dummy
+ type: string
+ service_instance_fq_name:
+ type: string
+
+resources:
+ template_NetworkIpam_2:
+ properties:
+ name:
+ get_param: left_vn
+ type: "OS::ContrailV2::NetworkIpam"
+ template_NetworkPolicy:
+ properties:
+ name:
+ get_param: policy_name
+ network_policy_entries:
+ network_policy_entries_policy_rule:
+ -
+ network_policy_entries_policy_rule_action_list:
+ network_policy_entries_policy_rule_action_list_apply_service:
+ -
+ get_param: service_instance_fq_name
+ network_policy_entries_policy_rule_action_list_simple_action:
+ get_param: simple_action
+ network_policy_entries_policy_rule_direction:
+ get_param: direction
+ network_policy_entries_policy_rule_dst_addresses:
+ -
+ network_policy_entries_policy_rule_dst_addresses_virtual_network:
+ get_param: right_vn_fqdn
+ network_policy_entries_policy_rule_dst_ports:
+ -
+ network_policy_entries_policy_rule_dst_ports_end_port:
+ get_param: dst_port_end
+ network_policy_entries_policy_rule_dst_ports_start_port:
+ get_param: dst_port_start
+ network_policy_entries_policy_rule_protocol:
+ get_param: protocol
+ network_policy_entries_policy_rule_src_addresses:
+ -
+ network_policy_entries_policy_rule_src_addresses_virtual_network:
+ get_param: left_vn_fqdn
+ network_policy_entries_policy_rule_src_ports:
+ -
+ network_policy_entries_policy_rule_src_ports_end_port:
+ get_param: src_port_end
+ network_policy_entries_policy_rule_src_ports_start_port:
+ get_param: src_port_start
+ type: "OS::ContrailV2::NetworkPolicy"
+ test_net:
+ depends_on:
+ - template_NetworkIpam_2
+ - template_NetworkPolicy
+ properties:
+ name:
+ get_param: left_vn
+ network_ipam_refs:
+ -
+ get_resource: template_NetworkIpam_2
+ network_ipam_refs_data:
+ -
+ network_ipam_refs_data_ipam_subnets:
+ -
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_param: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ network_policy_refs: [ { list_join: [':', { get_attr: [ template_NetworkPolicy, fq_name ] } ] } ]
+ network_policy_refs_data:
+ -
+ network_policy_refs_data_sequence:
+ network_policy_refs_data_sequence_major: 0
+ network_policy_refs_data_sequence_minor: 0
+ type: "OS::ContrailV2::VirtualNetwork"
+
+ test_nested:
+ type: nested.yml
+ properties:
+ p1: { get_resource: test_net}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/inputfiles/nested.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/inputfiles/nested.yml
new file mode 100644
index 0000000000..56a099500b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/inputfiles/nested.yml
@@ -0,0 +1,45 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ p1:
+ type: string
+ description: UID of OAM network
+ security_group_name:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+resources:
+
+ cmaui_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: p1 }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_0 } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..351b12fd58
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,251 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.nested1:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ cmaui_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ type: string
+ description: UID of OAM network
+ p2:
+ type: string
+ description: UID of OAM network
+ abc_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ abc_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ security_group_name:
+ description: not impotrtant
+ availability_zone_0:
+ type: string
+ description: availabilityzone name
+ abc_oam_ips:
+ type: string
+ cmaui_oam_ips:
+ type: string
+ abc_image:
+ type: string
+ description: Image for CMAUI server
+ requirements:
+ - link_cmaui_port_2:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_server_cmaui:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - local_storage_server_abc:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_abc_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_cmaui_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ scalable_server_abc:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_abc_port_1:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_abc:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_abc:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_cmaui:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_abc:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_abc:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_2:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_1:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ org.openecomp.resource.abstract.nodes.heat.nested2:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ cmaui_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ security_group_name:
+ description: not impotrtant
+ availability_zone_0:
+ type: string
+ description: availabilityzone name
+ abc_oam_ips:
+ type: string
+ cmaui_oam_ips:
+ type: string
+ requirements:
+ - local_storage_server_cmaui:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_cmaui_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ host_server_cmaui:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_1:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..427e7be436
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,334 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ left_vn_fqdn:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ Internal1_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ src_port_start:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ Internal1_default_gateway:
+ hidden: false
+ immutable: false
+ type: string
+ Internal1_dhcp:
+ hidden: false
+ immutable: false
+ type: string
+ src_port_end:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ policy_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ dst_port_end:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ simple_action:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ service_instance_fq_name:
+ hidden: false
+ immutable: false
+ type: string
+ jsa_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ Internal2_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ protocol:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ shared_network_id1:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ Internal2_dhcp:
+ hidden: false
+ immutable: false
+ type: string
+ shared_network_id2:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ dst_port_start:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ network_ipam_refs_data_ipam_subnets_addr_from_start_true:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ Internal2_default_gateway:
+ hidden: false
+ immutable: false
+ type: string
+ right_vn_fqdn:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ left_vn:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ direction:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: dummy
+ node_templates:
+ template_NetworkPolicy:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.contrailV2.NetworkRules
+ properties:
+ name:
+ get_input: policy_name
+ network_policy_entries:
+ network_policy_entries_policy_rule:
+ - network_policy_entries_policy_rule_dst_addresses:
+ - network_policy_entries_policy_rule_dst_addresses_virtual_network:
+ get_input: right_vn_fqdn
+ network_policy_entries_policy_rule_dst_ports:
+ - network_policy_entries_policy_rule_dst_ports_start_port:
+ get_input: dst_port_start
+ network_policy_entries_policy_rule_dst_ports_end_port:
+ get_input: dst_port_end
+ network_policy_entries_policy_rule_protocol:
+ get_input: protocol
+ network_policy_entries_policy_rule_src_addresses:
+ - network_policy_entries_policy_rule_src_addresses_virtual_network:
+ get_input: left_vn_fqdn
+ network_policy_entries_policy_rule_direction:
+ get_input: direction
+ network_policy_entries_policy_rule_src_ports:
+ - network_policy_entries_policy_rule_src_ports_start_port:
+ get_input: src_port_start
+ network_policy_entries_policy_rule_src_ports_end_port:
+ get_input: src_port_end
+ network_policy_entries_policy_rule_action_list:
+ network_policy_entries_policy_rule_action_list_simple_action:
+ get_input: simple_action
+ network_policy_entries_policy_rule_action_list_apply_service:
+ - get_input: service_instance_fq_name
+ requirements:
+ - network:
+ capability: tosca.capabilities.Attachment
+ node: test_net1
+ relationship: org.openecomp.relationships.AttachesTo
+ - network:
+ capability: tosca.capabilities.Attachment
+ node: test_net2
+ relationship: org.openecomp.relationships.AttachesTo
+ test_net2:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork
+ properties:
+ network_ipam_refs_data:
+ - network_ipam_refs_data_ipam_subnets:
+ - network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_policy_refs_data:
+ - network_policy_refs_data_sequence:
+ network_policy_refs_data_sequence_major: 0
+ network_policy_refs_data_sequence_minor: 0
+ network_name:
+ get_input: left_vn
+ network_ipam_refs:
+ - UNSUPPORTED_RESOURCE_template_NetworkIpam_2
+ network_policy_refs:
+ - list_join:
+ - ':'
+ - get_attribute:
+ - template_NetworkPolicy
+ - fq_name
+ requirements:
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: template_NetworkPolicy
+ relationship: tosca.relationships.DependsOn
+ test_nested2:
+ type: org.openecomp.resource.abstract.nodes.heat.nested2
+ directives:
+ - substitutable
+ properties:
+ p1:
+ get_input: shared_network_id1
+ service_template_filter:
+ substitute_service_template: nested2ServiceTemplate.yaml
+ requirements:
+ - link_cmaui_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net1
+ relationship: tosca.relationships.network.LinksTo
+ test_nested3:
+ type: org.openecomp.resource.abstract.nodes.heat.nested1
+ directives:
+ - substitutable
+ properties:
+ p1:
+ get_input: shared_network_id1
+ service_template_filter:
+ substitute_service_template: nested1ServiceTemplate.yaml
+ p2:
+ get_input: shared_network_id2
+ requirements:
+ - link_cmaui_port_2:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net2
+ relationship: tosca.relationships.network.LinksTo
+ - link_abc_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net2
+ relationship: tosca.relationships.network.LinksTo
+ - link_cmaui_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net1
+ relationship: tosca.relationships.network.LinksTo
+ test_net1:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork
+ properties:
+ network_ipam_refs_data:
+ - network_ipam_refs_data_ipam_subnets:
+ - network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_policy_refs_data:
+ - network_policy_refs_data_sequence:
+ network_policy_refs_data_sequence_major: 0
+ network_policy_refs_data_sequence_minor: 0
+ network_name:
+ get_input: left_vn
+ network_ipam_refs:
+ - UNSUPPORTED_RESOURCE_template_NetworkIpam_2
+ network_policy_refs:
+ - list_join:
+ - ':'
+ - get_attribute:
+ - template_NetworkPolicy
+ - fq_name
+ requirements:
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: template_NetworkPolicy
+ relationship: tosca.relationships.DependsOn
+ test_nested1:
+ type: org.openecomp.resource.abstract.nodes.heat.nested1
+ directives:
+ - substitutable
+ properties:
+ p1:
+ get_input: shared_network_id1
+ service_template_filter:
+ substitute_service_template: nested1ServiceTemplate.yaml
+ p2:
+ get_input: shared_network_id2
+ requirements:
+ - link_cmaui_port_2:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net2
+ relationship: tosca.relationships.network.LinksTo
+ - link_abc_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net2
+ relationship: tosca.relationships.network.LinksTo
+ - link_cmaui_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net1
+ relationship: tosca.relationships.network.LinksTo
+ groups:
+ addOn:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/addOn.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - test_nested2
+ - test_nested3
+ - test_nested1
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - template_NetworkPolicy
+ - test_net2
+ - test_net1 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/expectedoutputfiles/nested1ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/expectedoutputfiles/nested1ServiceTemplate.yaml
new file mode 100644
index 0000000000..cd5b767492
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/expectedoutputfiles/nested1ServiceTemplate.yaml
@@ -0,0 +1,252 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested1
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.abc:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ p2:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ abc_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ abc_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ security_group_name:
+ hidden: false
+ immutable: false
+ description: not impotrtant
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ abc_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ abc_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ node_templates:
+ cmaui_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: p2
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ server_abc:
+ type: org.openecomp.resource.vfc.nodes.heat.abc
+ properties:
+ flavor:
+ get_input: abc_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: abc_image
+ name:
+ get_input:
+ - abc_names
+ - 0
+ abc_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - abc_oam_ips
+ - 0
+ network:
+ get_input: p2
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_abc
+ relationship: tosca.relationships.network.BindsTo
+ cmaui_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: p1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested1:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested1.yml
+ description: cmaui server template for vMMSC
+ members:
+ - cmaui_port_2
+ - server_cmaui
+ - server_abc
+ - abc_port_1
+ - cmaui_port_1
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested1
+ capabilities:
+ scalable_server_abc:
+ - server_abc
+ - scalable
+ os_server_cmaui:
+ - server_cmaui
+ - os
+ attachment_abc_port_1:
+ - abc_port_1
+ - attachment
+ scalable_server_cmaui:
+ - server_cmaui
+ - scalable
+ host_server_abc:
+ - server_abc
+ - host
+ os_server_abc:
+ - server_abc
+ - os
+ host_server_cmaui:
+ - server_cmaui
+ - host
+ binding_server_abc:
+ - server_abc
+ - binding
+ endpoint_server_cmaui:
+ - server_cmaui
+ - endpoint
+ binding_server_cmaui:
+ - server_cmaui
+ - binding
+ endpoint_server_abc:
+ - server_abc
+ - endpoint
+ attachment_cmaui_port_2:
+ - cmaui_port_2
+ - attachment
+ attachment_cmaui_port_1:
+ - cmaui_port_1
+ - attachment
+ requirements:
+ local_storage_server_cmaui:
+ - server_cmaui
+ - local_storage
+ link_abc_port_1:
+ - abc_port_1
+ - link
+ link_cmaui_port_2:
+ - cmaui_port_2
+ - link
+ link_cmaui_port_1:
+ - cmaui_port_1
+ - link
+ local_storage_server_abc:
+ - server_abc
+ - local_storage \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/expectedoutputfiles/nested2ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/expectedoutputfiles/nested2ServiceTemplate.yaml
new file mode 100644
index 0000000000..992e1c017c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/expectedoutputfiles/nested2ServiceTemplate.yaml
@@ -0,0 +1,146 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested2
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ security_group_name:
+ hidden: false
+ immutable: false
+ description: not impotrtant
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ abc_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ node_templates:
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ cmaui_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: p1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested2:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested2.yml
+ description: cmaui server template for vMMSC
+ members:
+ - server_cmaui
+ - cmaui_port_1
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested2
+ capabilities:
+ host_server_cmaui:
+ - server_cmaui
+ - host
+ os_server_cmaui:
+ - server_cmaui
+ - os
+ endpoint_server_cmaui:
+ - server_cmaui
+ - endpoint
+ binding_server_cmaui:
+ - server_cmaui
+ - binding
+ scalable_server_cmaui:
+ - server_cmaui
+ - scalable
+ attachment_cmaui_port_1:
+ - cmaui_port_1
+ - attachment
+ requirements:
+ local_storage_server_cmaui:
+ - server_cmaui
+ - local_storage
+ link_cmaui_port_1:
+ - cmaui_port_1
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..e593097c44
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/inputfiles/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ },
+ {
+ "file": "nested1.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ },
+ {
+ "file": "nested2.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ },
+ {
+ "file": "addOn.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/inputfiles/addOn.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/inputfiles/addOn.yml
new file mode 100644
index 0000000000..d956043627
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/inputfiles/addOn.yml
@@ -0,0 +1,32 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ shared_network_id1:
+ type: string
+ description: network name of jsa log network
+
+ shared_network_id2:
+ type: string
+ description: network name of jsa log network
+
+resources:
+
+ test_nested1:
+ type: nested1.yml
+ properties:
+ p1: { get_param: shared_network_id1}
+ p2: { get_param: shared_network_id2}
+
+ test_nested2:
+ type: nested2.yml
+ properties:
+ p1: { get_param: shared_network_id1}
+
+ test_nested3:
+ type: nested1.yml
+ properties:
+ p1: { get_param: shared_network_id1}
+ p2: { get_param: shared_network_id2} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/inputfiles/main.yml
new file mode 100644
index 0000000000..65d1a21a47
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/inputfiles/main.yml
@@ -0,0 +1,174 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ jsa_net_name:
+ type: string
+ description: network name of jsa log network
+ Internal1_cidr:
+ type: string
+ Internal2_cidr:
+ type: string
+ Internal1_default_gateway:
+ type: string
+ Internal2_default_gateway:
+ type: string
+ Internal1_dhcp:
+ type: string
+ Internal2_dhcp:
+ type: string
+ direction:
+ description: dummy
+ type: string
+ dst_port_end:
+ description: dummy
+ type: string
+ dst_port_start:
+ description: dummy
+ type: string
+ left_vn:
+ description: dummy
+ type: string
+ left_vn_fqdn:
+ description: dummy
+ type: string
+ network_ipam_refs_data_ipam_subnets_addr_from_start_true:
+ description: dummy
+ type: string
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2:
+ description: dummy
+ type: string
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2:
+ description: dummy
+ type: string
+ policy_name:
+ description: dummy
+ type: string
+ protocol:
+ description: dummy
+ type: string
+ right_vn_fqdn:
+ description: dummy
+ type: string
+ simple_action:
+ description: dummy
+ type: string
+ src_port_end:
+ description: dummy
+ type: string
+ src_port_start:
+ description: dummy
+ type: string
+ service_instance_fq_name:
+ type: string
+
+resources:
+ template_NetworkIpam_2:
+ properties:
+ name:
+ get_param: left_vn
+ type: "OS::ContrailV2::NetworkIpam"
+ template_NetworkPolicy:
+ properties:
+ name:
+ get_param: policy_name
+ network_policy_entries:
+ network_policy_entries_policy_rule:
+ -
+ network_policy_entries_policy_rule_action_list:
+ network_policy_entries_policy_rule_action_list_apply_service:
+ -
+ get_param: service_instance_fq_name
+ network_policy_entries_policy_rule_action_list_simple_action:
+ get_param: simple_action
+ network_policy_entries_policy_rule_direction:
+ get_param: direction
+ network_policy_entries_policy_rule_dst_addresses:
+ -
+ network_policy_entries_policy_rule_dst_addresses_virtual_network:
+ get_param: right_vn_fqdn
+ network_policy_entries_policy_rule_dst_ports:
+ -
+ network_policy_entries_policy_rule_dst_ports_end_port:
+ get_param: dst_port_end
+ network_policy_entries_policy_rule_dst_ports_start_port:
+ get_param: dst_port_start
+ network_policy_entries_policy_rule_protocol:
+ get_param: protocol
+ network_policy_entries_policy_rule_src_addresses:
+ -
+ network_policy_entries_policy_rule_src_addresses_virtual_network:
+ get_param: left_vn_fqdn
+ network_policy_entries_policy_rule_src_ports:
+ -
+ network_policy_entries_policy_rule_src_ports_end_port:
+ get_param: src_port_end
+ network_policy_entries_policy_rule_src_ports_start_port:
+ get_param: src_port_start
+ type: "OS::ContrailV2::NetworkPolicy"
+ test_net1:
+ depends_on:
+ - template_NetworkIpam_2
+ - template_NetworkPolicy
+ properties:
+ name:
+ get_param: left_vn
+ network_ipam_refs:
+ -
+ get_resource: template_NetworkIpam_2
+ network_ipam_refs_data:
+ -
+ network_ipam_refs_data_ipam_subnets:
+ -
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_param: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ network_policy_refs: [ { list_join: [':', { get_attr: [ template_NetworkPolicy, fq_name ] } ] } ]
+ network_policy_refs_data:
+ -
+ network_policy_refs_data_sequence:
+ network_policy_refs_data_sequence_major: 0
+ network_policy_refs_data_sequence_minor: 0
+ type: "OS::ContrailV2::VirtualNetwork"
+
+ test_net2:
+ depends_on:
+ - template_NetworkIpam_2
+ - template_NetworkPolicy
+ properties:
+ name:
+ get_param: left_vn
+ network_ipam_refs:
+ -
+ get_resource: template_NetworkIpam_2
+ network_ipam_refs_data:
+ -
+ network_ipam_refs_data_ipam_subnets:
+ -
+ network_ipam_refs_data_ipam_subnets_addr_from_start:
+ get_param: network_ipam_refs_data_ipam_subnets_addr_from_start_true
+ network_ipam_refs_data_ipam_subnets_subnet:
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
+ network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+ get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
+ network_policy_refs: [ { list_join: [':', { get_attr: [ template_NetworkPolicy, fq_name ] } ] } ]
+ network_policy_refs_data:
+ -
+ network_policy_refs_data_sequence:
+ network_policy_refs_data_sequence_major: 0
+ network_policy_refs_data_sequence_minor: 0
+ type: "OS::ContrailV2::VirtualNetwork"
+
+outputs:
+ shared_network_id1:
+ value: {get_resource: test_net1}
+
+ shared_network_id2:
+ value: {get_resource: test_net2} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/inputfiles/nested1.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/inputfiles/nested1.yml
new file mode 100644
index 0000000000..66a15d0440
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/inputfiles/nested1.yml
@@ -0,0 +1,86 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ p1:
+ type: string
+ description: UID of OAM network
+ p2:
+ type: string
+ description: UID of OAM network
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ abc_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ security_group_name:
+ type: not_important
+ description: not impotrtant
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ abc_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ abc_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+ abc_oam_ips:
+ type: string
+resources:
+
+ cmaui_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: p1 }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ cmaui_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: p2 }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ abc_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: p2 }
+ fixed_ips: [{"ip_address": {get_param: [abc_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_1 }
+ - port: { get_resource: cmaui_port_2 }
+
+ server_abc:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [abc_names, 0]}
+ image: { get_param: abc_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: abc_flavor }
+ networks:
+ - port: { get_resource: abc_port_1 } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/inputfiles/nested2.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/inputfiles/nested2.yml
new file mode 100644
index 0000000000..b09d3aff8e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/shared/inputfiles/nested2.yml
@@ -0,0 +1,48 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ p1:
+ type: string
+ description: UID of OAM network
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ security_group_name:
+ type: not_important
+ description: not impotrtant
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+ abc_oam_ips:
+ type: string
+
+resources:
+
+ cmaui_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: p1 }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_1 } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/multi/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/multi/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..641b84337f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/multi/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,143 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ shared_network_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ jsa_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ node_templates:
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ test_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ cmaui_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: shared_network_id
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ addOn:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/addOn.yml
+ description: cmaui server template for vMMSC
+ members:
+ - server_cmaui
+ - cmaui_port_0
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - test_net \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/multi/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/multi/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..1f762d0ccc
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/multi/inputfiles/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ },
+ {
+ "file": "addOn.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/multi/inputfiles/addOn.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/multi/inputfiles/addOn.yml
new file mode 100644
index 0000000000..e6c5954fb0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/multi/inputfiles/addOn.yml
@@ -0,0 +1,48 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ p1:
+ type: string
+ description: UID of OAM network
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ security_group_name:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ shared_network_id:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+resources:
+
+ cmaui_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: shared_network_id }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_0 } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/multi/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/multi/inputfiles/main.yml
new file mode 100644
index 0000000000..73a2e3b45c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/multi/inputfiles/main.yml
@@ -0,0 +1,20 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ jsa_net_name:
+ type: string
+ description: network name of jsa log network
+
+resources:
+ test_net:
+ type: OS::Neutron::Net
+ properties:
+ name: {get_param: jsa_net_name}
+ shared: True
+
+outputs:
+ shared_network_id:
+ value: {get_resource: test_net} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/nested/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/nested/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..8db67317a4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/nested/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,134 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.nested:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ cmaui_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ type: string
+ description: UID of OAM network
+ p2:
+ type: string
+ p3:
+ type: string
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ security_group_name:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ availability_zone_0:
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ type: string
+ requirements:
+ - link_cmaui_port_2:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_server_cmaui:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_cmaui_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_cmaui_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ host_server_cmaui:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_2:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_0:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_1:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/nested/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/nested/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..db605c9de0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/nested/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,110 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.jsa:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ contrail_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ jsa_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ jsa_name:
+ hidden: false
+ immutable: false
+ type: string
+ node_templates:
+ test_nestedInvalidConnectionToNetwork:
+ type: org.openecomp.resource.abstract.nodes.heat.nested
+ directives:
+ - substitutable
+ properties:
+ p1: test_nova
+ service_template_filter:
+ substitute_service_template: nestedServiceTemplate.yaml
+ test_contrailV2_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork
+ properties:
+ network_name:
+ get_input: contrail_net_name
+ test_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ test_nova:
+ type: org.openecomp.resource.vfc.nodes.heat.jsa
+ properties:
+ image: image
+ name:
+ get_input: jsa_name
+ test_nested:
+ type: org.openecomp.resource.abstract.nodes.heat.nested
+ directives:
+ - substitutable
+ properties:
+ p1: test_net
+ service_template_filter:
+ substitute_service_template: nestedServiceTemplate.yaml
+ p2:
+ get_attribute:
+ - test_contrailV2_net
+ - fq_name
+ requirements:
+ - link_cmaui_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: test_contrailV2_net
+ relationship: tosca.relationships.network.LinksTo
+ - link_cmaui_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net
+ relationship: tosca.relationships.network.LinksTo
+ groups:
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - test_nestedInvalidConnectionToNetwork
+ - test_contrailV2_net
+ - test_net
+ - test_nova
+ - test_nested \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/nested/expectedoutputfiles/nestedServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/nested/expectedoutputfiles/nestedServiceTemplate.yaml
new file mode 100644
index 0000000000..12cfaca893
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/nested/expectedoutputfiles/nestedServiceTemplate.yaml
@@ -0,0 +1,203 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ p2:
+ hidden: false
+ immutable: false
+ type: string
+ p3:
+ hidden: false
+ immutable: false
+ type: string
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ node_templates:
+ cmaui_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: p3
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ cmaui_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: p2
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ cmaui_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: p1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested.yml
+ description: cmaui server template for vMMSC
+ members:
+ - cmaui_port_2
+ - server_cmaui
+ - cmaui_port_1
+ - cmaui_port_0
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested
+ capabilities:
+ host_server_cmaui:
+ - server_cmaui
+ - host
+ os_server_cmaui:
+ - server_cmaui
+ - os
+ endpoint_server_cmaui:
+ - server_cmaui
+ - endpoint
+ binding_server_cmaui:
+ - server_cmaui
+ - binding
+ attachment_cmaui_port_2:
+ - cmaui_port_2
+ - attachment
+ scalable_server_cmaui:
+ - server_cmaui
+ - scalable
+ attachment_cmaui_port_0:
+ - cmaui_port_0
+ - attachment
+ attachment_cmaui_port_1:
+ - cmaui_port_1
+ - attachment
+ requirements:
+ local_storage_server_cmaui:
+ - server_cmaui
+ - local_storage
+ link_cmaui_port_0:
+ - cmaui_port_0
+ - link
+ link_cmaui_port_2:
+ - cmaui_port_2
+ - link
+ link_cmaui_port_1:
+ - cmaui_port_1
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/nested/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/nested/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..aca75b5055
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/nested/inputfiles/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ },
+ {
+ "file": "nested.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/nested/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/nested/inputfiles/main.yml
new file mode 100644
index 0000000000..3d23ff660a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/nested/inputfiles/main.yml
@@ -0,0 +1,42 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ jsa_net_name:
+ type: string
+ description: network name of jsa log network
+ contrail_net_name:
+ type: string
+ jsa_name:
+ type: string
+
+resources:
+ test_nova:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: jsa_name}
+ image: image
+
+ test_net:
+ type: OS::Neutron::Net
+ properties:
+ name: {get_param: jsa_net_name}
+ shared: True
+
+ test_contrailV2_net:
+ type: OS::ContrailV2::VirtualNetwork
+ properties:
+ name: { get_param: contrail_net_name }
+
+ test_nested:
+ type: nested.yml
+ properties:
+ p1: { get_resource: test_net}
+ p2: { get_attr: [ test_contrailV2_net, fq_name ] }
+
+ test_nestedInvalidConnectionToNetwork:
+ type: nested.yml
+ properties:
+ p1: { get_resource: test_nova} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/nested/inputfiles/nested.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/nested/inputfiles/nested.yml
new file mode 100644
index 0000000000..fb2c8e12e5
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/nested/inputfiles/nested.yml
@@ -0,0 +1,67 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ p1:
+ type: string
+ description: UID of OAM network
+ p2:
+ type: string
+ p3:
+ type: string
+ security_group_name:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+resources:
+
+ cmaui_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: p1 }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ cmaui_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: p2 }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ cmaui_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: p3 }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_0 }
+ - port: { get_resource: cmaui_port_1 }
+ - port: { get_resource: cmaui_port_2 } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..edb1307945
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,251 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.nested1:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ cmaui_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ shared_network_id1:
+ type: string
+ description: UID of OAM network
+ p2:
+ type: string
+ description: UID of OAM network
+ abc_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ abc_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ security_group_name:
+ description: not impotrtant
+ availability_zone_0:
+ type: string
+ description: availabilityzone name
+ abc_oam_ips:
+ type: string
+ cmaui_oam_ips:
+ type: string
+ abc_image:
+ type: string
+ description: Image for CMAUI server
+ requirements:
+ - link_cmaui_port_2:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_server_cmaui:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - local_storage_server_abc:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_abc_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_cmaui_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ scalable_server_abc:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_abc_port_1:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_abc:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_abc:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_cmaui:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_abc:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_abc:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_2:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_1:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ org.openecomp.resource.abstract.nodes.heat.nested2:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ cmaui_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ security_group_name:
+ description: not impotrtant
+ availability_zone_0:
+ type: string
+ description: availabilityzone name
+ abc_oam_ips:
+ type: string
+ cmaui_oam_ips:
+ type: string
+ requirements:
+ - local_storage_server_cmaui:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_cmaui_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ host_server_cmaui:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_1:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..a762422392
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,172 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.jsa:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ shared_test_nova:
+ hidden: false
+ immutable: false
+ type: string
+ shared_network_id1:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ shared_network_id2:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ jsa_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ jsa_name:
+ hidden: false
+ immutable: false
+ type: string
+ node_templates:
+ test_nestedInvalidConnectionToNetwork:
+ type: org.openecomp.resource.abstract.nodes.heat.nested1
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nested1ServiceTemplate.yaml
+ shared_network_id1:
+ get_input: shared_test_nova
+ test_net2:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ test_nested2:
+ type: org.openecomp.resource.abstract.nodes.heat.nested2
+ directives:
+ - substitutable
+ properties:
+ p1:
+ get_input: shared_network_id1
+ service_template_filter:
+ substitute_service_template: nested2ServiceTemplate.yaml
+ requirements:
+ - link_cmaui_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net1
+ relationship: tosca.relationships.network.LinksTo
+ test_nested3:
+ type: org.openecomp.resource.abstract.nodes.heat.nested1
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nested1ServiceTemplate.yaml
+ shared_network_id1:
+ get_input: shared_network_id1
+ p2:
+ get_input: shared_network_id2
+ requirements:
+ - link_cmaui_port_2:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net2
+ relationship: tosca.relationships.network.LinksTo
+ - link_abc_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net2
+ relationship: tosca.relationships.network.LinksTo
+ - link_cmaui_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net1
+ relationship: tosca.relationships.network.LinksTo
+ test_net1:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ test_nested1:
+ type: org.openecomp.resource.abstract.nodes.heat.nested1
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nested1ServiceTemplate.yaml
+ shared_network_id1:
+ get_input: shared_network_id1
+ p2:
+ get_input: shared_network_id2
+ requirements:
+ - link_cmaui_port_2:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net2
+ relationship: tosca.relationships.network.LinksTo
+ - link_abc_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net2
+ relationship: tosca.relationships.network.LinksTo
+ - link_cmaui_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net1
+ relationship: tosca.relationships.network.LinksTo
+ test_nova:
+ type: org.openecomp.resource.vfc.nodes.heat.jsa
+ properties:
+ image: image
+ name:
+ get_input: jsa_name
+ groups:
+ addOn:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/addOn.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - test_nestedInvalidConnectionToNetwork
+ - test_nested2
+ - test_nested3
+ - test_nested1
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - test_net2
+ - test_net1
+ - test_nova \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/expectedoutputfiles/nested1ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/expectedoutputfiles/nested1ServiceTemplate.yaml
new file mode 100644
index 0000000000..2096251177
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/expectedoutputfiles/nested1ServiceTemplate.yaml
@@ -0,0 +1,252 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested1
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.abc:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ shared_network_id1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ p2:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ abc_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ abc_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ security_group_name:
+ hidden: false
+ immutable: false
+ description: not impotrtant
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ abc_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ abc_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ node_templates:
+ cmaui_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: p2
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ server_abc:
+ type: org.openecomp.resource.vfc.nodes.heat.abc
+ properties:
+ flavor:
+ get_input: abc_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: abc_image
+ name:
+ get_input:
+ - abc_names
+ - 0
+ abc_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - abc_oam_ips
+ - 0
+ network:
+ get_input: p2
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_abc
+ relationship: tosca.relationships.network.BindsTo
+ cmaui_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: shared_network_id1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested1:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested1.yml
+ description: cmaui server template for vMMSC
+ members:
+ - cmaui_port_2
+ - server_cmaui
+ - server_abc
+ - abc_port_1
+ - cmaui_port_1
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested1
+ capabilities:
+ scalable_server_abc:
+ - server_abc
+ - scalable
+ os_server_cmaui:
+ - server_cmaui
+ - os
+ attachment_abc_port_1:
+ - abc_port_1
+ - attachment
+ scalable_server_cmaui:
+ - server_cmaui
+ - scalable
+ host_server_abc:
+ - server_abc
+ - host
+ os_server_abc:
+ - server_abc
+ - os
+ host_server_cmaui:
+ - server_cmaui
+ - host
+ binding_server_abc:
+ - server_abc
+ - binding
+ endpoint_server_cmaui:
+ - server_cmaui
+ - endpoint
+ binding_server_cmaui:
+ - server_cmaui
+ - binding
+ endpoint_server_abc:
+ - server_abc
+ - endpoint
+ attachment_cmaui_port_2:
+ - cmaui_port_2
+ - attachment
+ attachment_cmaui_port_1:
+ - cmaui_port_1
+ - attachment
+ requirements:
+ local_storage_server_cmaui:
+ - server_cmaui
+ - local_storage
+ link_abc_port_1:
+ - abc_port_1
+ - link
+ link_cmaui_port_2:
+ - cmaui_port_2
+ - link
+ link_cmaui_port_1:
+ - cmaui_port_1
+ - link
+ local_storage_server_abc:
+ - server_abc
+ - local_storage \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/expectedoutputfiles/nested2ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/expectedoutputfiles/nested2ServiceTemplate.yaml
new file mode 100644
index 0000000000..992e1c017c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/expectedoutputfiles/nested2ServiceTemplate.yaml
@@ -0,0 +1,146 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested2
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ security_group_name:
+ hidden: false
+ immutable: false
+ description: not impotrtant
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ abc_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ node_templates:
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ cmaui_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: p1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested2:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested2.yml
+ description: cmaui server template for vMMSC
+ members:
+ - server_cmaui
+ - cmaui_port_1
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested2
+ capabilities:
+ host_server_cmaui:
+ - server_cmaui
+ - host
+ os_server_cmaui:
+ - server_cmaui
+ - os
+ endpoint_server_cmaui:
+ - server_cmaui
+ - endpoint
+ binding_server_cmaui:
+ - server_cmaui
+ - binding
+ scalable_server_cmaui:
+ - server_cmaui
+ - scalable
+ attachment_cmaui_port_1:
+ - cmaui_port_1
+ - attachment
+ requirements:
+ local_storage_server_cmaui:
+ - server_cmaui
+ - local_storage
+ link_cmaui_port_1:
+ - cmaui_port_1
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..e593097c44
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/inputfiles/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ },
+ {
+ "file": "nested1.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ },
+ {
+ "file": "nested2.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ },
+ {
+ "file": "addOn.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/inputfiles/addOn.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/inputfiles/addOn.yml
new file mode 100644
index 0000000000..ca1cf7d31d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/inputfiles/addOn.yml
@@ -0,0 +1,38 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ shared_network_id1:
+ type: string
+ description: network name of jsa log network
+
+ shared_network_id2:
+ type: string
+ description: network name of jsa log network
+ shared_test_nova:
+ type: string
+resources:
+
+ test_nested1:
+ type: nested1.yml
+ properties:
+ shared_network_id1: { get_param: shared_network_id1}
+ p2: { get_param: shared_network_id2}
+
+ test_nested2:
+ type: nested2.yml
+ properties:
+ p1: { get_param: shared_network_id1}
+
+ test_nested3:
+ type: nested1.yml
+ properties:
+ shared_network_id1: { get_param: shared_network_id1}
+ p2: { get_param: shared_network_id2}
+
+ test_nestedInvalidConnectionToNetwork:
+ type: nested1.yml
+ properties:
+ shared_network_id1: { get_param: shared_test_nova} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/inputfiles/main.yml
new file mode 100644
index 0000000000..3c015747ff
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/inputfiles/main.yml
@@ -0,0 +1,39 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ jsa_net_name:
+ type: string
+ description: network name of jsa log network
+
+ jsa_name:
+ type: string
+
+resources:
+ test_net1:
+ type: OS::Neutron::Net
+ properties:
+ name: {get_param: jsa_net_name}
+ shared: True
+
+ test_net2:
+ type: OS::Neutron::Net
+ properties:
+ name: {get_param: jsa_net_name}
+ shared: True
+
+ test_nova:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: jsa_name}
+ image: image
+
+outputs:
+ shared_network_id1:
+ value: {get_resource: test_net1}
+ shared_network_id2:
+ value: {get_resource: test_net2}
+ shared_test_nova:
+ value: {get_resource: test_nova} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/inputfiles/nested1.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/inputfiles/nested1.yml
new file mode 100644
index 0000000000..9ad6c61f17
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/inputfiles/nested1.yml
@@ -0,0 +1,86 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ shared_network_id1:
+ type: string
+ description: UID of OAM network
+ p2:
+ type: string
+ description: UID of OAM network
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ abc_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ security_group_name:
+ type: not_important
+ description: not impotrtant
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ abc_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ abc_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+ abc_oam_ips:
+ type: string
+resources:
+
+ cmaui_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: shared_network_id1 }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ cmaui_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: p2 }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ abc_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: p2 }
+ fixed_ips: [{"ip_address": {get_param: [abc_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_1 }
+ - port: { get_resource: cmaui_port_2 }
+
+ server_abc:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [abc_names, 0]}
+ image: { get_param: abc_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: abc_flavor }
+ networks:
+ - port: { get_resource: abc_port_1 } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/inputfiles/nested2.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/inputfiles/nested2.yml
new file mode 100644
index 0000000000..b09d3aff8e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/inputfiles/nested2.yml
@@ -0,0 +1,48 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ p1:
+ type: string
+ description: UID of OAM network
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ security_group_name:
+ type: not_important
+ description: not impotrtant
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+ abc_oam_ips:
+ type: string
+
+resources:
+
+ cmaui_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: p1 }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_1 } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetresourcegroupconnection/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetresourcegroupconnection/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..44aca0ee4d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetresourcegroupconnection/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,106 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.nested:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ cmaui_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ security_group_name:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ availability_zone_0:
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ type: string
+ requirements:
+ - local_storage_server_cmaui:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_cmaui_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ host_server_cmaui:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_0:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetresourcegroupconnection/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetresourcegroupconnection/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..c364c62d6d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetresourcegroupconnection/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,85 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ jsa_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ node_templates:
+ mvs_modules:
+ type: org.openecomp.resource.abstract.nodes.heat.nested
+ directives:
+ - substitutable
+ properties:
+ p1: test_net
+ service_template_filter:
+ substitute_service_template: nestedServiceTemplate.yaml
+ count: 3
+ mandatory: true
+ requirements:
+ - link_cmaui_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net
+ relationship: tosca.relationships.network.LinksTo
+ test_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ test_nested:
+ type: org.openecomp.resource.abstract.nodes.heat.nested
+ directives:
+ - substitutable
+ properties:
+ p1: test_net
+ service_template_filter:
+ substitute_service_template: nestedServiceTemplate.yaml
+ requirements:
+ - link_cmaui_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net
+ relationship: tosca.relationships.network.LinksTo
+ groups:
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - mvs_modules
+ - test_net
+ - test_nested \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetresourcegroupconnection/expectedoutputfiles/nestedServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetresourcegroupconnection/expectedoutputfiles/nestedServiceTemplate.yaml
new file mode 100644
index 0000000000..cfe7f567c5
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetresourcegroupconnection/expectedoutputfiles/nestedServiceTemplate.yaml
@@ -0,0 +1,145 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ security_group_name:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ node_templates:
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ cmaui_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: p1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested.yml
+ description: cmaui server template for vMMSC
+ members:
+ - server_cmaui
+ - cmaui_port_0
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested
+ capabilities:
+ host_server_cmaui:
+ - server_cmaui
+ - host
+ os_server_cmaui:
+ - server_cmaui
+ - os
+ endpoint_server_cmaui:
+ - server_cmaui
+ - endpoint
+ binding_server_cmaui:
+ - server_cmaui
+ - binding
+ scalable_server_cmaui:
+ - server_cmaui
+ - scalable
+ attachment_cmaui_port_0:
+ - cmaui_port_0
+ - attachment
+ requirements:
+ local_storage_server_cmaui:
+ - server_cmaui
+ - local_storage
+ link_cmaui_port_0:
+ - cmaui_port_0
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetresourcegroupconnection/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetresourcegroupconnection/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..aca75b5055
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetresourcegroupconnection/inputfiles/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ },
+ {
+ "file": "nested.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetresourcegroupconnection/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetresourcegroupconnection/inputfiles/main.yml
new file mode 100644
index 0000000000..eaedecd792
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetresourcegroupconnection/inputfiles/main.yml
@@ -0,0 +1,31 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ jsa_net_name:
+ type: string
+ description: network name of jsa log network
+
+resources:
+ test_net:
+ type: OS::Neutron::Net
+ properties:
+ name: {get_param: jsa_net_name}
+ shared: True
+
+ test_nested:
+ type: nested.yml
+ properties:
+ p1: { get_resource: test_net}
+
+ mvs_modules:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: 3
+ index_var: "%index%"
+ resource_def:
+ type: nested.yml
+ properties:
+ p1: { get_resource: test_net} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetresourcegroupconnection/inputfiles/nested.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetresourcegroupconnection/inputfiles/nested.yml
new file mode 100644
index 0000000000..56a099500b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetresourcegroupconnection/inputfiles/nested.yml
@@ -0,0 +1,45 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ p1:
+ type: string
+ description: UID of OAM network
+ security_group_name:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+resources:
+
+ cmaui_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: p1 }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_0 } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..8744a29bc3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,177 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.nested1:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ cmaui_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ type: string
+ description: UID of OAM network
+ p2:
+ type: string
+ description: UID of OAM network
+ abc_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ abc_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ security_group_name:
+ description: not impotrtant
+ availability_zone_0:
+ type: string
+ description: availabilityzone name
+ abc_oam_ips:
+ type: string
+ cmaui_oam_ips:
+ type: string
+ abc_image:
+ type: string
+ description: Image for CMAUI server
+ requirements:
+ - link_cmaui_port_2:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_server_cmaui:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - local_storage_server_abc:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_abc_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - link_cmaui_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ scalable_server_abc:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_abc_port_1:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_abc:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_abc:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host_server_cmaui:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_abc:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_abc:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_2:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_1:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..5a6dfd9376
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,131 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ shared_network_id1:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ shared_network_id2:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ jsa_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ node_templates:
+ mvs_modules:
+ type: org.openecomp.resource.abstract.nodes.heat.nested1
+ directives:
+ - substitutable
+ properties:
+ p1:
+ get_input: shared_network_id1
+ service_template_filter:
+ substitute_service_template: nested1ServiceTemplate.yaml
+ count: 3
+ mandatory: true
+ p2:
+ get_input: shared_network_id2
+ requirements:
+ - link_cmaui_port_2:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net2
+ relationship: tosca.relationships.network.LinksTo
+ - link_abc_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net2
+ relationship: tosca.relationships.network.LinksTo
+ - link_cmaui_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net1
+ relationship: tosca.relationships.network.LinksTo
+ test_net2:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ test_net1:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ test_nested1:
+ type: org.openecomp.resource.abstract.nodes.heat.nested1
+ directives:
+ - substitutable
+ properties:
+ p1:
+ get_input: shared_network_id1
+ service_template_filter:
+ substitute_service_template: nested1ServiceTemplate.yaml
+ p2:
+ get_input: shared_network_id2
+ requirements:
+ - link_cmaui_port_2:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net2
+ relationship: tosca.relationships.network.LinksTo
+ - link_abc_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net2
+ relationship: tosca.relationships.network.LinksTo
+ - link_cmaui_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net1
+ relationship: tosca.relationships.network.LinksTo
+ groups:
+ addOn:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/addOn.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - mvs_modules
+ - test_nested1
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - test_net2
+ - test_net1 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/expectedoutputfiles/nested1ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/expectedoutputfiles/nested1ServiceTemplate.yaml
new file mode 100644
index 0000000000..cd5b767492
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/expectedoutputfiles/nested1ServiceTemplate.yaml
@@ -0,0 +1,252 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested1
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.abc:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ p2:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ abc_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ abc_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ security_group_name:
+ hidden: false
+ immutable: false
+ description: not impotrtant
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ abc_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ abc_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ node_templates:
+ cmaui_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: p2
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ server_abc:
+ type: org.openecomp.resource.vfc.nodes.heat.abc
+ properties:
+ flavor:
+ get_input: abc_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: abc_image
+ name:
+ get_input:
+ - abc_names
+ - 0
+ abc_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - abc_oam_ips
+ - 0
+ network:
+ get_input: p2
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_abc
+ relationship: tosca.relationships.network.BindsTo
+ cmaui_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: p1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested1:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested1.yml
+ description: cmaui server template for vMMSC
+ members:
+ - cmaui_port_2
+ - server_cmaui
+ - server_abc
+ - abc_port_1
+ - cmaui_port_1
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested1
+ capabilities:
+ scalable_server_abc:
+ - server_abc
+ - scalable
+ os_server_cmaui:
+ - server_cmaui
+ - os
+ attachment_abc_port_1:
+ - abc_port_1
+ - attachment
+ scalable_server_cmaui:
+ - server_cmaui
+ - scalable
+ host_server_abc:
+ - server_abc
+ - host
+ os_server_abc:
+ - server_abc
+ - os
+ host_server_cmaui:
+ - server_cmaui
+ - host
+ binding_server_abc:
+ - server_abc
+ - binding
+ endpoint_server_cmaui:
+ - server_cmaui
+ - endpoint
+ binding_server_cmaui:
+ - server_cmaui
+ - binding
+ endpoint_server_abc:
+ - server_abc
+ - endpoint
+ attachment_cmaui_port_2:
+ - cmaui_port_2
+ - attachment
+ attachment_cmaui_port_1:
+ - cmaui_port_1
+ - attachment
+ requirements:
+ local_storage_server_cmaui:
+ - server_cmaui
+ - local_storage
+ link_abc_port_1:
+ - abc_port_1
+ - link
+ link_cmaui_port_2:
+ - cmaui_port_2
+ - link
+ link_cmaui_port_1:
+ - cmaui_port_1
+ - link
+ local_storage_server_abc:
+ - server_abc
+ - local_storage \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..4f3d9058b2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/inputfiles/MANIFEST.json
@@ -0,0 +1,22 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ },
+ {
+ "file": "nested1.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ },
+ {
+ "file": "addOn.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/inputfiles/addOn.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/inputfiles/addOn.yml
new file mode 100644
index 0000000000..10e477919f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/inputfiles/addOn.yml
@@ -0,0 +1,32 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ shared_network_id1:
+ type: string
+ description: network name of jsa log network
+
+ shared_network_id2:
+ type: string
+ description: network name of jsa log network
+
+resources:
+
+ test_nested1:
+ type: nested1.yml
+ properties:
+ p1: { get_param: shared_network_id1}
+ p2: { get_param: shared_network_id2}
+
+ mvs_modules:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: 3
+ index_var: "%index%"
+ resource_def:
+ type: nested1.yml
+ properties:
+ p1: { get_param: shared_network_id1}
+ p2: { get_param: shared_network_id2} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/inputfiles/main.yml
new file mode 100644
index 0000000000..9601c0f86d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/inputfiles/main.yml
@@ -0,0 +1,29 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ jsa_net_name:
+ type: string
+ description: network name of jsa log network
+
+resources:
+ test_net1:
+ type: OS::Neutron::Net
+ properties:
+ name: {get_param: jsa_net_name}
+ shared: True
+
+ test_net2:
+ type: OS::Neutron::Net
+ properties:
+ name: {get_param: jsa_net_name}
+ shared: True
+
+outputs:
+ shared_network_id1:
+ value: {get_resource: test_net1}
+
+ shared_network_id2:
+ value: {get_resource: test_net2} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/inputfiles/nested1.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/inputfiles/nested1.yml
new file mode 100644
index 0000000000..f46cf21121
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttosharednetresourcegrouplinking/inputfiles/nested1.yml
@@ -0,0 +1,86 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ p1:
+ type: string
+ description: UID of OAM network
+ p2:
+ type: string
+ description: UID of OAM network
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ abc_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ security_group_name:
+ type: not_important
+ description: not impotrtant
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ abc_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ abc_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+ abc_oam_ips:
+ type: string
+resources:
+
+ cmaui_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: p1 }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ cmaui_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: p2 }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ abc_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: p2 }
+ fixed_ips: [{"ip_address": {get_param: [abc_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_1 }
+ - port: { get_resource: cmaui_port_2 }
+
+ server_abc:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [abc_names, 0]}
+ image: { get_param: abc_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: abc_flavor }
+ networks:
+ - port: { get_resource: abc_port_1 } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securitygrouptonovaconnectionmulti/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securitygrouptonovaconnectionmulti/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..c253158ad4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securitygrouptonovaconnectionmulti/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,634 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.smp:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ hostid_fe1:
+ hidden: false
+ immutable: false
+ type: string
+ description: FE1 Hostid (from Ulticom license)
+ ip_address_stp2:
+ hidden: false
+ immutable: false
+ type: string
+ description: STP2 IP address
+ Mobility_OAM_protected_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Network name for OAM
+ hostid_fe2:
+ hidden: false
+ immutable: false
+ type: string
+ description: FE2 Hostid (from Ulticom license)
+ flavor_scp_fe_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: SCP FE Flavor
+ default: a1.Small
+ ip_address_stp1:
+ hidden: false
+ immutable: false
+ type: string
+ description: STP1 IP address
+ int_vscp_ce_network_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Inter-CE Network
+ int_vscp_ce_network_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ description: Private Network Address (CIDR notation)
+ cluster_type:
+ hidden: false
+ immutable: false
+ type: string
+ constraints:
+ - valid_values:
+ - Test
+ - Prod
+ be_Mobility_OAM_protected_ip_1:
+ label: be_1 OAM ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: be_1 OAM ip address
+ be_Mobility_OAM_protected_ip_2:
+ label: be_2 OAM ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: be_2 OAM ip address
+ be_Mobility_OAM_protected_ip_0:
+ label: be_0 OAM ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: be_0 OAM ip address
+ ip_address_dra:
+ hidden: false
+ immutable: false
+ type: string
+ description: DRA VIP address
+ image_smp_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: SCP SMP image
+ default: asc_base_image_smp
+ fe_connectivity:
+ hidden: false
+ immutable: false
+ type: string
+ constraints:
+ - valid_values:
+ - NEE
+ - STP
+ lab_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Lab name
+ smp_Mobility_OAM_protected_ip_1:
+ label: smp_1 OAM ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: smp_1 OAM ip address
+ fe_SIGNET_vrf_B1_direct_ip_0:
+ label: fe1 SIGTRAN ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: fe1 SIGTRAN ip address
+ smp_Mobility_OAM_protected_ip_0:
+ label: smp_0 OAM ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: smp_0 OAM ip address
+ int_vscp_cluster_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: LAN3 Cluster
+ be_Mobility_OAM_protected_ip_3:
+ label: be_3 OAM ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: be_3 OAM ip address
+ be_Mobility_OAM_protected_ip_4:
+ label: be_4 OAM ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: be_4 OAM ip address
+ hostname_nee1:
+ hidden: false
+ immutable: false
+ type: string
+ description: NEE1 Hostname (from Ulticom license)
+ int_vscp_fe_cluster_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: LAN2 FE Cluster/KA
+ SIGNET_vrf_A1_direct_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Network name for SIGTRAN_A
+ key_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: keypair to enable SSH access to the instance.
+ default: vSCP-keypair
+ int_vscp_fe_cluster_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ description: Private Network2 Address (CIDR notation)
+ fe_name_1:
+ hidden: false
+ immutable: false
+ type: string
+ description: name of VM
+ default: vSCP_FE2
+ fe_name_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: name of VM
+ default: vSCP_FE1
+ be_name_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: name of VM
+ default: vSCP_BE1
+ int_vscp_cluster_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ description: Private Network3 Address (CIDR notation)
+ be_name_1:
+ hidden: false
+ immutable: false
+ type: string
+ description: name of VM
+ default: vSCP_BE2
+ be_name_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: name of VM
+ default: vSCP_BE3
+ point_code_stp:
+ hidden: false
+ immutable: false
+ type: string
+ description: STP virtual point code (in "zone-cluster-member" format)
+ be_name_3:
+ hidden: false
+ immutable: false
+ type: string
+ description: name of VM
+ default: vSCP_BE4
+ be_name_4:
+ hidden: false
+ immutable: false
+ type: string
+ description: name of VM
+ default: vSCP_BE5
+ global_title_scp:
+ hidden: false
+ immutable: false
+ type: string
+ description: vSCP Global Title address
+ vnf_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique name for this VNF instance
+ default: This_is_the_SCP_name
+ be_Cricket_OCS_protected_ip_2:
+ label: be3 Cricket_OCS ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: be3 Cricket_OCS ip address
+ fe_Mobility_OAM_protected_ip_0:
+ label: fe_0 OAM ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: fe_0 OAM ip address
+ hostname_fe1:
+ hidden: false
+ immutable: false
+ type: string
+ description: FE1 Hostname (from Ulticom license)
+ be_Cricket_OCS_protected_ip_1:
+ label: be2 Cricket_OCS ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: be2 Cricket_OCS ip address
+ hostname_fe2:
+ hidden: false
+ immutable: false
+ type: string
+ description: FE2 Hostname (from Ulticom license)
+ be_Cricket_OCS_protected_ip_4:
+ label: be5 Cricket_OCS ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: be5 Cricket_OCS ip address
+ be_Cricket_OCS_protected_ip_3:
+ label: be4 Cricket_OCS ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: be4 Cricket_OCS ip address
+ fe_Mobility_OAM_protected_ip_1:
+ label: fe_1 OAM ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: fe_1 OAM ip address
+ be_Cricket_OCS_protected_ip_0:
+ label: be1 Cricket_OCS ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: be1 Cricket_OCS ip address
+ route_table_fe1:
+ hidden: false
+ immutable: false
+ type: string
+ description: Additional route table for FE1
+ Cricket_OCS_protected_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Network name for CRICKET_OCS
+ smp_name_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: name of VM
+ default: vSMP2
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_SCP_id
+ smp_name_1:
+ hidden: false
+ immutable: false
+ type: string
+ description: name of VM
+ default: vSMP2
+ flavor_smp_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: SCP SMP Flavor
+ default: a1.Small
+ image_scp_be_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: SCP BE image
+ default: asc_base_image_be
+ smp_name_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: name of VM
+ default: vSMP1
+ route_table_fe2:
+ hidden: false
+ immutable: false
+ type: string
+ description: Additional route table for FE2
+ hostid_nee1:
+ hidden: false
+ immutable: false
+ type: string
+ description: NEE1 Hostid (from Ulticom license)
+ SIGNET_vrf_B1_direct_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Network name for SIGTRAN_B
+ fe_SIGNET_vrf_A1_direct_ip_0:
+ label: fe2 SIGTRAN ip address
+ hidden: false
+ immutable: false
+ type: string
+ description: fe2 SIGTRAN ip address
+ availability_zone_0:
+ hidden: false
+ immutable: false
+ type: string
+ nee_name_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: name of VM
+ default: vNEE
+ fe_smp_affinity_param:
+ hidden: false
+ immutable: false
+ type: string
+ description: be affinity param
+ ip_port_stp1:
+ hidden: false
+ immutable: false
+ type: string
+ description: STP1 IP port
+ ip_port_stp2:
+ hidden: false
+ immutable: false
+ type: string
+ description: STP2 IP port
+ image_scp_fe_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: SCP FE image
+ default: asc_base_image_fe
+ flavor_scp_be_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: SCP BE Flavor
+ default: a1.Small
+ security_group_name:
+ label: vSCP security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: vSCP security group name
+ ip_port_fe2:
+ hidden: false
+ immutable: false
+ type: string
+ description: FE2 IP port in SIGTRAN network
+ route_table_be:
+ hidden: false
+ immutable: false
+ type: string
+ description: Additional route table for BEs
+ ip_port_fe1:
+ hidden: false
+ immutable: false
+ type: string
+ description: FE1 IP port in SIGTRAN network
+ port_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: port name
+ default: port_name
+ be_affinity_param:
+ hidden: false
+ immutable: false
+ type: string
+ description: be affinity param
+ point_code_scp:
+ hidden: false
+ immutable: false
+ type: string
+ description: vSCP point code (in "zone-cluster-member" format)
+ global_title_stp:
+ hidden: false
+ immutable: false
+ type: string
+ description: STP Global Title address
+ point_code_stp1:
+ hidden: false
+ immutable: false
+ type: string
+ description: STP1 point code (in "zone-cluster-member" format)
+ point_code_stp2:
+ hidden: false
+ immutable: false
+ type: string
+ description: STP2 point code (in "zone-cluster-member" format)
+ multi_anti_affinity_param:
+ hidden: false
+ immutable: false
+ type: string
+ description: be affinity param
+ node_templates:
+ server_smp2:
+ type: org.openecomp.resource.vfc.nodes.heat.smp
+ properties:
+ flavor:
+ get_input: flavor_smp_name
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: image_smp_name
+ metadata:
+ jx_vm_role: smp2
+ vnf_id:
+ get_input: vnf_id
+ jx_lab_name:
+ get_input: lab_name
+ user_data_format: RAW
+ name:
+ get_input: smp_name_2
+ scheduler_hints:
+ group:
+ get_input: fe_smp_affinity_param
+ server_smp3:
+ type: org.openecomp.resource.vfc.nodes.heat.smp
+ properties:
+ flavor:
+ get_input: flavor_smp_name
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: image_smp_name
+ metadata:
+ jx_vm_role: smp2
+ vnf_id:
+ get_input: vnf_id
+ jx_lab_name:
+ get_input: lab_name
+ user_data_format: RAW
+ name:
+ get_input: smp_name_2
+ scheduler_hints:
+ group2:
+ get_input: multi_anti_affinity_param
+ group1:
+ get_input: fe_smp_affinity_param
+ port3:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ network:
+ get_input: port_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_smp3
+ relationship: tosca.relationships.network.BindsTo
+ port4:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ network:
+ get_input: port_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_smp3
+ relationship: tosca.relationships.network.BindsTo
+ port1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ network:
+ get_input: port_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_smp1
+ relationship: tosca.relationships.network.BindsTo
+ port2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ network:
+ get_input: port_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_smp2
+ relationship: tosca.relationships.network.BindsTo
+ server_smp1:
+ type: org.openecomp.resource.vfc.nodes.heat.smp
+ properties:
+ flavor:
+ get_input: flavor_smp_name
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: image_smp_name
+ metadata:
+ jx_vm_role: smp2
+ vnf_id:
+ get_input: vnf_id
+ jx_lab_name:
+ get_input: lab_name
+ user_data_format: RAW
+ name:
+ get_input: smp_name_1
+ scheduler_hints:
+ group:
+ get_input: be_affinity_param
+ groups:
+ FE_SMP_Affinity:
+ type: tosca.groups.Root
+ members:
+ - server_smp2
+ - server_smp3
+ Multi_Anti_Affinity:
+ type: tosca.groups.Root
+ members:
+ - server_smp3
+ addOn1:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/addOn1.yml
+ description: ASC Template
+ members:
+ - port1
+ - server_smp1
+ addOn3:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/addOn3.yml
+ description: ASC Template
+ members:
+ - server_smp3
+ - port3
+ - port4
+ addOn2:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/addOn2.yml
+ description: ASC Template
+ members:
+ - server_smp2
+ - port2
+ BE_Affinity:
+ type: tosca.groups.Root
+ members:
+ - server_smp1
+ policies:
+ FE_SMP_Affinity:
+ type: org.openecomp.policies.placement.Colocate
+ properties:
+ name: abc
+ affinity: host
+ targets:
+ - FE_SMP_Affinity
+ Multi_Anti_Affinity:
+ type: org.openecomp.policies.placement.Antilocate
+ properties:
+ name: def
+ container_type: host
+ targets:
+ - Multi_Anti_Affinity
+ BE_Affinity:
+ type: org.openecomp.policies.placement.Colocate
+ properties:
+ name: def
+ affinity: host
+ targets:
+ - BE_Affinity \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securitygrouptonovaconnectionmulti/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securitygrouptonovaconnectionmulti/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..bcc4ef51b1
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securitygrouptonovaconnectionmulti/inputfiles/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ },
+ {
+ "file": "addOn1.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ },
+ {
+ "file": "addOn2.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ },
+ {
+ "file": "addOn3.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securitygrouptonovaconnectionmulti/inputfiles/addOn1.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securitygrouptonovaconnectionmulti/inputfiles/addOn1.yml
new file mode 100644
index 0000000000..79306fe04e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securitygrouptonovaconnectionmulti/inputfiles/addOn1.yml
@@ -0,0 +1,57 @@
+heat_template_version: 2013-05-23
+
+description: ASC Template
+
+parameters:
+ be_affinity_param:
+ type: string
+ description: be affinity param
+ availability_zone_0:
+ type: string
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_SCP_id
+ port_name:
+ type: string
+ description: port name
+ default: port_name
+ flavor_smp_name:
+ type: string
+ description: SCP SMP Flavor
+ default: a1.Small
+ image_smp_name:
+ type: string
+ description: SCP SMP image
+ default: asc_base_image_smp
+ smp_name_1:
+ type: string
+ default: vSMP2
+ description: name of VM
+ lab_name:
+ type: string
+ description: Lab name
+
+resources:
+
+ server_smp1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: smp_name_1 }
+ image: { get_param: image_smp_name }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: flavor_smp_name }
+ scheduler_hints: { group: { get_param: be_affinity_param} }
+ networks:
+ - port: { get_resource: port1 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ jx_lab_name: {get_param: lab_name}
+ jx_vm_role: smp2
+ user_data_format: RAW
+
+ port1:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: port_name}
+ replacement_policy: AUTO
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securitygrouptonovaconnectionmulti/inputfiles/addOn2.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securitygrouptonovaconnectionmulti/inputfiles/addOn2.yml
new file mode 100644
index 0000000000..9918c0bfda
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securitygrouptonovaconnectionmulti/inputfiles/addOn2.yml
@@ -0,0 +1,57 @@
+heat_template_version: 2013-05-23
+
+description: ASC Template
+
+parameters:
+ fe_smp_affinity_param:
+ type: string
+ description: be affinity param
+ availability_zone_0:
+ type: string
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_SCP_id
+ port_name:
+ type: string
+ description: port name
+ default: port_name
+ flavor_smp_name:
+ type: string
+ description: SCP SMP Flavor
+ default: a1.Small
+ image_smp_name:
+ type: string
+ description: SCP SMP image
+ default: asc_base_image_smp
+ smp_name_2:
+ type: string
+ default: vSMP2
+ description: name of VM
+ lab_name:
+ type: string
+ description: Lab name
+
+resources:
+ server_smp2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: smp_name_2 }
+ image: { get_param: image_smp_name }
+ # key_name: { get_param: key_name }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: flavor_smp_name }
+ scheduler_hints: { group: { get_param: fe_smp_affinity_param } }
+ networks:
+ - port: { get_resource: port2 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ jx_lab_name: {get_param: lab_name}
+ jx_vm_role: smp2
+ user_data_format: RAW
+
+ port2:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: port_name}
+ replacement_policy: AUTO
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securitygrouptonovaconnectionmulti/inputfiles/addOn3.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securitygrouptonovaconnectionmulti/inputfiles/addOn3.yml
new file mode 100644
index 0000000000..95382efb69
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securitygrouptonovaconnectionmulti/inputfiles/addOn3.yml
@@ -0,0 +1,67 @@
+heat_template_version: 2013-05-23
+
+description: ASC Template
+
+parameters:
+ fe_smp_affinity_param:
+ type: string
+ description: be affinity param
+ multi_anti_affinity_param:
+ type: string
+ description: be affinity param
+ availability_zone_0:
+ type: string
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_SCP_id
+ port_name:
+ type: string
+ description: port name
+ default: port_name
+ flavor_smp_name:
+ type: string
+ description: SCP SMP Flavor
+ default: a1.Small
+ image_smp_name:
+ type: string
+ description: SCP SMP image
+ default: asc_base_image_smp
+ smp_name_2:
+ type: string
+ default: vSMP2
+ description: name of VM
+ lab_name:
+ type: string
+ description: Lab name
+
+resources:
+ server_smp3:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: smp_name_2 }
+ image: { get_param: image_smp_name }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: flavor_smp_name }
+ scheduler_hints: { group1: { get_param: fe_smp_affinity_param }, group2: { get_param: multi_anti_affinity_param } }
+ networks:
+ - port: { get_resource: port3 }
+ - port: { get_resource: port4 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ jx_lab_name: {get_param: lab_name}
+ jx_vm_role: smp2
+ user_data_format: RAW
+
+ port3:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: port_name}
+ replacement_policy: AUTO
+
+ port4:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: port_name}
+ replacement_policy: AUTO
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securitygrouptonovaconnectionmulti/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securitygrouptonovaconnectionmulti/inputfiles/main.yml
new file mode 100644
index 0000000000..cc814efbd9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securitygrouptonovaconnectionmulti/inputfiles/main.yml
@@ -0,0 +1,311 @@
+heat_template_version: 2013-05-23
+
+description: ASC Template
+
+parameters:
+ cluster_type:
+ type: string
+ constraints:
+ - allowed_values: [ Test, Prod ]
+ fe_connectivity:
+ type: string
+ constraints:
+ - allowed_values: [ NEE, STP ]
+ key_name:
+ type: string
+ description: keypair to enable SSH access to the instance.
+ default: vSCP-keypair
+
+# Availability Zone information may need to be updated and the specifications under Nova server capabilities uncommented
+ availability_zone_0:
+ type: string
+
+ vnf_name:
+ type: string
+ description: Unique name for this VNF instance
+ default: This_is_the_SCP_name
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_SCP_id
+
+ port_name:
+ type: string
+ description: port name
+ default: port_name
+
+ flavor_scp_be_name:
+ type: string
+ description: SCP BE Flavor
+ default: a1.Small
+ flavor_scp_fe_name:
+ type: string
+ description: SCP FE Flavor
+ default: a1.Small
+ flavor_smp_name:
+ type: string
+ description: SCP SMP Flavor
+ default: a1.Small
+ image_scp_be_name:
+ type: string
+ description: SCP BE image
+ default: asc_base_image_be
+ image_scp_fe_name:
+ type: string
+ description: SCP FE image
+ default: asc_base_image_fe
+ image_smp_name:
+ type: string
+ description: SCP SMP image
+ default: asc_base_image_smp
+ int_vscp_fe_cluster_net_id:
+ type: string
+ description: LAN2 FE Cluster/KA
+ int_vscp_fe_cluster_cidr:
+ type: string
+ description: Private Network2 Address (CIDR notation)
+ int_vscp_cluster_net_id:
+ type: string
+ description: LAN3 Cluster
+ int_vscp_cluster_cidr:
+ type: string
+ description: Private Network3 Address (CIDR notation)
+ int_vscp_ce_network_net_id:
+ type: string
+ description: Inter-CE Network
+ int_vscp_ce_network_cidr:
+ type: string
+ description: Private Network Address (CIDR notation)
+ SIGNET_vrf_A1_direct_net_id:
+ type: string
+ description: Network name for SIGTRAN_A
+ SIGNET_vrf_B1_direct_net_id:
+ type: string
+ description: Network name for SIGTRAN_B
+ Cricket_OCS_protected_net_id:
+ type: string
+ description: Network name for CRICKET_OCS
+ Mobility_OAM_protected_net_id:
+ type: string
+ description: Network name for OAM
+ be_Cricket_OCS_protected_ip_0:
+ type: string
+ label: be1 Cricket_OCS ip address
+ description: be1 Cricket_OCS ip address
+ be_Cricket_OCS_protected_ip_1:
+ type: string
+ label: be2 Cricket_OCS ip address
+ description: be2 Cricket_OCS ip address
+ be_Cricket_OCS_protected_ip_2:
+ type: string
+ label: be3 Cricket_OCS ip address
+ description: be3 Cricket_OCS ip address
+ be_Cricket_OCS_protected_ip_3:
+ type: string
+ label: be4 Cricket_OCS ip address
+ description: be4 Cricket_OCS ip address
+ be_Cricket_OCS_protected_ip_4:
+ type: string
+ label: be5 Cricket_OCS ip address
+ description: be5 Cricket_OCS ip address
+ fe_SIGNET_vrf_B1_direct_ip_0:
+ type: string
+ label: fe1 SIGTRAN ip address
+ description: fe1 SIGTRAN ip address
+ fe_SIGNET_vrf_A1_direct_ip_0:
+ type: string
+ label: fe2 SIGTRAN ip address
+ description: fe2 SIGTRAN ip address
+ be_Mobility_OAM_protected_ip_0:
+ type: string
+ label: be_0 OAM ip address
+ description: be_0 OAM ip address
+ be_Mobility_OAM_protected_ip_1:
+ type: string
+ label: be_1 OAM ip address
+ description: be_1 OAM ip address
+ be_Mobility_OAM_protected_ip_2:
+ type: string
+ label: be_2 OAM ip address
+ description: be_2 OAM ip address
+ be_Mobility_OAM_protected_ip_3:
+ type: string
+ label: be_3 OAM ip address
+ description: be_3 OAM ip address
+ be_Mobility_OAM_protected_ip_4:
+ type: string
+ label: be_4 OAM ip address
+ description: be_4 OAM ip address
+ fe_Mobility_OAM_protected_ip_0:
+ type: string
+ label: fe_0 OAM ip address
+ description: fe_0 OAM ip address
+ fe_Mobility_OAM_protected_ip_1:
+ type: string
+ label: fe_1 OAM ip address
+ description: fe_1 OAM ip address
+ smp_Mobility_OAM_protected_ip_0:
+ type: string
+ label: smp_0 OAM ip address
+ description: smp_0 OAM ip address
+ smp_Mobility_OAM_protected_ip_1:
+ type: string
+ label: smp_1 OAM ip address
+ description: smp_1 OAM ip address
+ be_name_0:
+ type: string
+ default: vSCP_BE1
+ description: name of VM
+ be_name_1:
+ type: string
+ default: vSCP_BE2
+ description: name of VM
+ be_name_2:
+ type: string
+ default: vSCP_BE3
+ description: name of VM
+ be_name_3:
+ type: string
+ default: vSCP_BE4
+ description: name of VM
+ be_name_4:
+ type: string
+ default: vSCP_BE5
+ description: name of VM
+ fe_name_0:
+ type: string
+ default: vSCP_FE1
+ description: name of VM
+ fe_name_1:
+ type: string
+ default: vSCP_FE2
+ description: name of VM
+ smp_name_0:
+ type: string
+ default: vSMP1
+ description: name of VM
+ smp_name_1:
+ type: string
+ default: vSMP2
+ description: name of VM
+ smp_name_2:
+ type: string
+ default: vSMP2
+ description: name of VM
+ ##smp_name_2:
+ ##type: string
+ ##default: vSMP2
+ ##description: name of VM
+ nee_name_0:
+ type: string
+ default: vNEE
+ description: name of VM
+
+ hostname_fe1:
+ type: string
+ description: FE1 Hostname (from Ulticom license)
+ hostid_fe1:
+ type: string
+ description: FE1 Hostid (from Ulticom license)
+
+ hostname_fe2:
+ type: string
+ description: FE2 Hostname (from Ulticom license)
+ hostid_fe2:
+ type: string
+ description: FE2 Hostid (from Ulticom license)
+
+ hostname_nee1:
+ type: string
+ description: NEE1 Hostname (from Ulticom license)
+ hostid_nee1:
+ type: string
+ description: NEE1 Hostid (from Ulticom license)
+
+ point_code_scp:
+ type: string
+ description: vSCP point code (in "zone-cluster-member" format)
+ point_code_stp:
+ type: string
+ description: STP virtual point code (in "zone-cluster-member" format)
+ point_code_stp1:
+ type: string
+ description: STP1 point code (in "zone-cluster-member" format)
+ point_code_stp2:
+ type: string
+ description: STP2 point code (in "zone-cluster-member" format)
+ ip_address_stp1:
+ type: string
+ description: STP1 IP address
+ ip_port_stp1:
+ type: string
+ description: STP1 IP port
+ ip_address_stp2:
+ type: string
+ description: STP2 IP address
+ ip_port_stp2:
+ type: string
+ description: STP2 IP port
+ ip_port_fe1:
+ type: string
+ description: FE1 IP port in SIGTRAN network
+ ip_port_fe2:
+ type: string
+ description: FE2 IP port in SIGTRAN network
+
+ global_title_scp:
+ type: string
+ description: vSCP Global Title address
+ global_title_stp:
+ type: string
+ description: STP Global Title address
+
+ security_group_name:
+ type: string
+ label: vSCP security group name
+ description: vSCP security group name
+
+ route_table_be:
+ type: string
+ description: Additional route table for BEs
+
+ route_table_fe1:
+ type: string
+ description: Additional route table for FE1
+
+ route_table_fe2:
+ type: string
+ description: Additional route table for FE2
+
+ ip_address_dra:
+ type: string
+ description: DRA VIP address
+
+ lab_name:
+ type: string
+ description: Lab name
+
+resources:
+ FE_SMP_Affinity:
+ type: OS::Nova::ServerGroup
+ properties:
+ policies: ["affinity"]
+ name: abc
+ BE_Affinity:
+ type: OS::Nova::ServerGroup
+ properties:
+ policies: ["affinity"]
+ name: def
+ Multi_Anti_Affinity:
+ type: OS::Nova::ServerGroup
+ properties:
+ policies: ["anti-affinity"]
+ name: def
+
+outputs:
+ fe_smp_affinity_param:
+ value: {get_resource: FE_SMP_Affinity}
+ be_affinity_param:
+ value: {get_resource: BE_Affinity}
+ multi_anti_affinity_param:
+ value: {get_resource: Multi_Anti_Affinity} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..eb63b32fdf
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,1077 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ vprobe_volume_type_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: The type of the volume mapping to a backend
+ default: volumes_ceph
+ vprobe_volume_type_1:
+ hidden: false
+ immutable: false
+ type: string
+ description: The type of the volume mapping to a backend
+ default: volumes_ceph
+ vprobe_volume_type_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: The type of the volume mapping to a backend
+ default: volumes_ceph
+ oam_private_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: A string specifying a symbolic name for the network
+ vProbe_cluster_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: The component cluster name
+ default: vProbe_cluster
+ qrouter_flavor_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: The ID or name of the flavor to boot onto
+ default: m1.large
+ version_number:
+ hidden: false
+ immutable: false
+ type: string
+ description: The version number of the component
+ default: 11.1.5
+ vLB_version_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: The version name of the component.
+ default: vProbe.r.11.1.e._08_16-12_53
+ vprobe_flavor_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: The name of the flavor to boot onto
+ default: m1.large
+ domain_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: The servers domain
+ ntp_timezone:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of NTP Time zone to be used
+ default: UTC
+ packet_mirror_network_subnet_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ description: The Classless Inter-Domain Routing
+ default: 20.20.5.0/24
+ vLBAgent_cluster_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: The component cluster name
+ default: vLBAgent_cluster
+ vLB_type:
+ hidden: false
+ immutable: false
+ type: string
+ description: The type of VLB. MME or SGW.
+ default: mme
+ qrouter_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: VM Names for QRouter VMs
+ entry_schema:
+ type: string
+ win_domain_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Windows servers' domain
+ tenant_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of tenant to be used
+ vLB_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: VM Names for vLB VMs
+ entry_schema:
+ type: string
+ vprobe_volume_size_2:
+ hidden: false
+ immutable: false
+ type: float
+ description: The size of the volume in GB
+ default: 1
+ vLBAgent_flavor_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: The ID or name of the flavor to boot onto
+ default: m1.large
+ vprobe_volume_name_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: The name of the volume
+ default: data
+ vprobe_volume_size_0:
+ hidden: false
+ immutable: false
+ type: float
+ description: The size of the volume in GB
+ default: 100
+ vprobe_volume_name_1:
+ hidden: false
+ immutable: false
+ type: string
+ description: The name of the volume
+ default: log
+ vprobe_volume_size_1:
+ hidden: false
+ immutable: false
+ type: float
+ description: The size of the volume in GB
+ default: 5
+ vprobe_volume_name_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: The name of the volume
+ default: config
+ packet_mirror_network_subnet_alloc_start:
+ hidden: false
+ immutable: false
+ type: string
+ description: Start address for the allocation pool
+ default: 20.20.5.2
+ vLBAgent_version_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: The version name of the component
+ default: vProbe.r.11.1.e._08_16-12_53
+ vLB_volume_name_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: The name of the volume
+ default: config
+ cdr_network:
+ hidden: false
+ immutable: false
+ type: string
+ description: A string specifying a symbolic name for the network
+ vLBAgent_type:
+ hidden: false
+ immutable: false
+ type: string
+ description: vLBAgent Type. mme or sgw
+ default: mme
+ vProbe_node_count:
+ hidden: false
+ immutable: false
+ type: float
+ description: The number of nodes to create
+ default: 1
+ packet_internal_network_subnet_alloc_end:
+ hidden: false
+ immutable: false
+ type: string
+ description: End address for the allocation pool
+ default: 192.0.6.250
+ vLBAgent_volume_type_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: The type of the volume mapping to a backend
+ default: volumes_ceph
+ vLBAgent_volume_type_1:
+ hidden: false
+ immutable: false
+ type: string
+ description: The type of the volume mapping to a backend
+ default: volumes_ceph
+ vLBAgent_volume_size_1:
+ hidden: false
+ immutable: false
+ type: float
+ description: The size of the volume in GB
+ default: 1
+ vLBAgent_volume_type_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: The Cinder volume type. Used to specify the backend.
+ default: volumes_ceph
+ vLB_volume_name_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: The name of the volume
+ default: data
+ vLB_volume_type_1:
+ hidden: false
+ immutable: false
+ type: string
+ description: The type of the volume mapping to a backend
+ default: volumes_ceph
+ vLBAgent_volume_size_2:
+ hidden: false
+ immutable: false
+ type: float
+ description: The size of the volume in Gigabytes.
+ default: 1
+ vLB_volume_name_1:
+ hidden: false
+ immutable: false
+ type: string
+ description: The name of the volume
+ default: log
+ vLB_volume_type_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: The type of the volume mapping to a backend
+ default: volumes_ceph
+ vLBAgent_volume_size_0:
+ hidden: false
+ immutable: false
+ type: float
+ description: The size of the volume in GB
+ default: 15
+ vLB_volume_type_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: The type of the volume mapping to a backend
+ default: volumes_ceph
+ vLBAgent_volume_name_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: The name of the volume
+ default: config
+ vLBAgent_volume_name_1:
+ hidden: false
+ immutable: false
+ type: string
+ description: The name of the volume
+ default: log
+ vLBAgent_volume_name_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: The name of the volume
+ default: data
+ vLB_volume_size_1:
+ hidden: false
+ immutable: false
+ type: float
+ description: The size of the volume in GB.
+ default: 1
+ vLB_volume_size_0:
+ hidden: false
+ immutable: false
+ type: float
+ description: The size of the volume in GB.
+ default: 10
+ packet_mirror_network_subnet_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: The name of the subnet
+ default: rprb_26071_mme_int_pktmirror_net_1_subnet
+ vLB_volume_size_2:
+ hidden: false
+ immutable: false
+ type: float
+ description: The size of the volume in GB.
+ default: 1
+ vf_module_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: The VF MODULE ID of the RADCOM System.
+ qrouter_cluster_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: The component cluster name
+ default: qrouter_cluster
+ vprobe_type:
+ hidden: false
+ immutable: false
+ type: string
+ description: The type of vProbe. MME or SGW.
+ default: mme
+ base_image_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: The base ID or name of the image to boot with
+ default: rprb_centos_6_7_05_24_2016
+ vf_module_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: The VNF module name for vProbe elements.
+ vLB_node_count:
+ hidden: false
+ immutable: false
+ type: float
+ description: The number of nodes to create.
+ default: 1
+ packet_mirror_network_subnet_alloc_end:
+ hidden: false
+ immutable: false
+ type: string
+ description: End address for the allocation pool
+ default: 20.20.5.250
+ packet_internal_network_subnet_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: The name of the subnet
+ default: rprb_26071_mme_int_pktinternal_net_1_subnet
+ vProbe_version_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: The version name of the component
+ default: vProbe.r.11.1.e._08_16-12_53
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: The VNF ID of the RADCOM System.
+ availability_zone_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of the availability zone for server placement
+ region_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of region to be used
+ availability_zone_1:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of the availability zone for server placement
+ qtrace_name_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: VM Name for QRouter VMs
+ availability_zone_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of the availability zone for server placement.
+ vprobe_AppDependenciesMachineType:
+ hidden: false
+ immutable: false
+ type: string
+ description: The application dependencies
+ default: DatabaseUpgrade
+ manager_name_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: VM Name for Manager VM 0
+ availability_zone_3:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of the availability zone for server placement
+ vLB_cluster_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: The component cluster name.
+ default: vLB_cluster
+ packet_internal_network_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: A string specifying a symbolic name for the network
+ default: rprb_26071_mme_int_pktinternal_net_1
+ packet_mirror_network_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: A string specifying a symbolic name for the network
+ default: rprb_26071_mme_int_pktmirror_net_1
+ packet_internal_network_subnet_alloc_start:
+ hidden: false
+ immutable: false
+ type: string
+ description: Start address for the allocation pool
+ default: 192.0.6.2
+ qrouter_volume_type_1:
+ hidden: false
+ immutable: false
+ type: string
+ description: The type of the volume mapping to a backend
+ default: volumes_ceph
+ vLBAgent_node_count:
+ hidden: false
+ immutable: false
+ type: float
+ description: The number of nodes to create
+ default: 1
+ qrouter_volume_type_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: The type of the volume mapping to a backend
+ default: volumes_ceph
+ vprobe_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: VM Names for vProbe VMs
+ entry_schema:
+ type: string
+ qrouter_node_count:
+ hidden: false
+ immutable: false
+ type: float
+ description: The number of nodes to create
+ default: 1
+ qrouter_volume_name_2:
+ hidden: false
+ immutable: false
+ type: string
+ description: The name of the volume
+ default: config
+ vLBAgent_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: VM Names for vLBAgent VMs
+ entry_schema:
+ type: string
+ vLB_flavor_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: The name of the flavor to boot onto.
+ default: m1.large
+ qrouter_volume_name_1:
+ hidden: false
+ immutable: false
+ type: string
+ description: The name of the volume
+ default: log
+ qrouter_volume_name_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: The name of the volume
+ default: data
+ qrouter_volume_type_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: The type of the volume mapping to a backend
+ default: volumes_ceph
+ qrouter_volume_size_0:
+ hidden: false
+ immutable: false
+ type: float
+ description: The size of the volume in GB
+ default: 1
+ qrouter_volume_size_1:
+ hidden: false
+ immutable: false
+ type: float
+ description: The size of the volume in GB
+ default: 1
+ packet_internal_network_subnet_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ description: The Classless Inter-Domain Routing
+ default: 192.0.6.0/24
+ manager_oam_direct_ip_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: The public ip address of the manager
+ qrouter_volume_size_2:
+ hidden: false
+ immutable: false
+ type: float
+ description: The size of the volume in GB
+ default: 1
+ rpmrepository_ip_0:
+ hidden: false
+ immutable: false
+ type: string
+ description: The public ip address of the repository
+ node_templates:
+ vLBAgent:
+ type: org.openecomp.resource.abstract.nodes.heat.FEAdd_On_Module_vLBAgentTemplate
+ directives:
+ - substitutable
+ properties:
+ vf_module_id:
+ get_input: vf_module_id
+ packet_mirror_network: packet_mirror_network
+ oam_private_net_name:
+ get_input: oam_private_net_name
+ vProbe_cluster_name:
+ get_input: vProbe_cluster_name
+ vlb_agent_image_name:
+ get_input: base_image_name
+ vf_module_name:
+ get_input: vf_module_name
+ vLB_node_count:
+ get_input: vLB_node_count
+ service_template_filter:
+ substitute_service_template: FEAdd_On_Module_vLBAgentTemplateServiceTemplate.yaml
+ domain_name:
+ get_input: domain_name
+ ntp_timezone:
+ get_input: ntp_timezone
+ packet_internal_network: packet_internal_network
+ vnf_id:
+ get_input: vnf_id
+ vLBAgent_cluster_name:
+ get_input: vLBAgent_cluster_name
+ availability_zone_0:
+ get_input: availability_zone_2
+ region_name:
+ get_input: region_name
+ manager_name_0:
+ get_input: manager_name_0
+ vLB_cluster_name:
+ get_input: vLB_cluster_name
+ tenant_name:
+ get_input: tenant_name
+ vLBAgent_flavor_name:
+ get_input: vLBAgent_flavor_name
+ security_group: security_group
+ vLBAgent_version_name:
+ get_input: vLBAgent_version_name
+ vLBAgent_type:
+ get_input: vLBAgent_type
+ vLBAgent_node_count:
+ get_input: vLBAgent_node_count
+ vLBAgent_volume_type_0:
+ get_input: vLBAgent_volume_type_0
+ vLBAgent_volume_type_1:
+ get_input: vLBAgent_volume_type_1
+ vLBAgent_volume_size_1:
+ get_input: vLBAgent_volume_size_1
+ vLBAgent_volume_type_2:
+ get_input: vLBAgent_volume_type_2
+ vLBAgent_names:
+ get_input: vLBAgent_names
+ vLBAgent_volume_size_2:
+ get_input: vLBAgent_volume_size_2
+ vLBAgent_volume_size_0:
+ get_input: vLBAgent_volume_size_0
+ vLBAgent_volume_name_2:
+ get_input: vLBAgent_volume_name_2
+ vLBAgent_volume_name_1:
+ get_input: vLBAgent_volume_name_1
+ vLBAgent_volume_name_0:
+ get_input: vLBAgent_volume_name_0
+ manager_oam_direct_ip_0:
+ get_input: manager_oam_direct_ip_0
+ rpmrepository_ip_0:
+ get_input: rpmrepository_ip_0
+ requirements:
+ - link_packet_mirror_network_port:
+ capability: tosca.capabilities.network.Linkable
+ node: packet_mirror_network
+ relationship: tosca.relationships.network.LinksTo
+ - link_packet_internal_network_port:
+ capability: tosca.capabilities.network.Linkable
+ node: packet_internal_network
+ relationship: tosca.relationships.network.LinksTo
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: security_group
+ relationship: tosca.relationships.DependsOn
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: packet_mirror_network
+ relationship: tosca.relationships.DependsOn
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: packet_mirror_network
+ relationship: tosca.relationships.DependsOn
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: packet_internal_network
+ relationship: tosca.relationships.DependsOn
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: packet_internal_network
+ relationship: tosca.relationships.DependsOn
+ vProbe:
+ type: org.openecomp.resource.abstract.nodes.heat.FEAdd_On_Module_vProbeTemplate
+ directives:
+ - substitutable
+ properties:
+ vf_module_id:
+ get_input: vf_module_id
+ vprobe_volume_type_0:
+ get_input: vprobe_volume_type_0
+ vprobe_volume_type_1:
+ get_input: vprobe_volume_type_1
+ qrouter_cluster_name:
+ get_input: qrouter_cluster_name
+ vprobe_volume_type_2:
+ get_input: vprobe_volume_type_2
+ oam_private_net_name:
+ get_input: oam_private_net_name
+ vProbe_cluster_name:
+ get_input: vProbe_cluster_name
+ vprobe_type:
+ get_input: vprobe_type
+ vprobe_image_name:
+ get_input: base_image_name
+ vprobe_flavor_name:
+ get_input: vprobe_flavor_name
+ vf_module_name:
+ get_input: vf_module_name
+ vLB_node_count:
+ get_input: vLB_node_count
+ service_template_filter:
+ substitute_service_template: FEAdd_On_Module_vProbeTemplateServiceTemplate.yaml
+ domain_name:
+ get_input: domain_name
+ ntp_timezone:
+ get_input: ntp_timezone
+ packet_internal_network: packet_internal_network
+ vProbe_version_name:
+ get_input: vProbe_version_name
+ vnf_id:
+ get_input: vnf_id
+ availability_zone_0:
+ get_input: availability_zone_3
+ region_name:
+ get_input: region_name
+ qtrace_name_0:
+ get_input: qtrace_name_0
+ vprobe_AppDependenciesMachineType:
+ get_input: vprobe_AppDependenciesMachineType
+ manager_name_0:
+ get_input: manager_name_0
+ win_domain_name:
+ get_input: win_domain_name
+ tenant_name:
+ get_input: tenant_name
+ vprobe_volume_size_2:
+ get_input: vprobe_volume_size_2
+ vprobe_volume_name_0:
+ get_input: vprobe_volume_name_0
+ vprobe_volume_size_0:
+ get_input: vprobe_volume_size_0
+ vprobe_volume_name_1:
+ get_input: vprobe_volume_name_1
+ vprobe_volume_size_1:
+ get_input: vprobe_volume_size_1
+ vprobe_volume_name_2:
+ get_input: vprobe_volume_name_2
+ security_group: security_group
+ cdr_network:
+ get_input: cdr_network
+ vProbe_node_count:
+ get_input: vProbe_node_count
+ vprobe_names:
+ get_input: vprobe_names
+ manager_oam_direct_ip_0:
+ get_input: manager_oam_direct_ip_0
+ rpmrepository_ip_0:
+ get_input: rpmrepository_ip_0
+ requirements:
+ - link_packet_internal_network_port:
+ capability: tosca.capabilities.network.Linkable
+ node: packet_internal_network
+ relationship: tosca.relationships.network.LinksTo
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: security_group
+ relationship: tosca.relationships.DependsOn
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: packet_mirror_network
+ relationship: tosca.relationships.DependsOn
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: packet_mirror_network
+ relationship: tosca.relationships.DependsOn
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: packet_internal_network
+ relationship: tosca.relationships.DependsOn
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: packet_internal_network
+ relationship: tosca.relationships.DependsOn
+ QRouter:
+ type: org.openecomp.resource.abstract.nodes.heat.FEAdd_On_Module_QRouterTemplate
+ directives:
+ - substitutable
+ properties:
+ vf_module_id:
+ get_input: vf_module_id
+ qrouter_cluster_name:
+ get_input: qrouter_cluster_name
+ oam_private_net_name:
+ get_input: oam_private_net_name
+ qrouter_flavor_name:
+ get_input: qrouter_flavor_name
+ version_number:
+ get_input: version_number
+ vf_module_name:
+ get_input: vf_module_name
+ service_template_filter:
+ substitute_service_template: FEAdd_On_Module_QRouterTemplateServiceTemplate.yaml
+ domain_name:
+ get_input: domain_name
+ ntp_timezone:
+ get_input: ntp_timezone
+ vnf_id:
+ get_input: vnf_id
+ availability_zone_0:
+ get_input: availability_zone_0
+ region_name:
+ get_input: region_name
+ manager_name_0:
+ get_input: manager_name_0
+ qrouter_names:
+ get_input: qrouter_names
+ tenant_name:
+ get_input: tenant_name
+ security_group: security_group
+ cdr_network:
+ get_input: cdr_network
+ qrouter_image_name:
+ get_input: base_image_name
+ qrouter_volume_type_1:
+ get_input: qrouter_volume_type_1
+ qrouter_volume_type_2:
+ get_input: qrouter_volume_type_2
+ qrouter_node_count:
+ get_input: qrouter_node_count
+ qrouter_volume_name_2:
+ get_input: qrouter_volume_name_2
+ qrouter_volume_name_1:
+ get_input: qrouter_volume_name_1
+ qrouter_volume_name_0:
+ get_input: qrouter_volume_name_0
+ qrouter_volume_type_0:
+ get_input: qrouter_volume_type_0
+ qrouter_volume_size_0:
+ get_input: qrouter_volume_size_0
+ qrouter_volume_size_1:
+ get_input: qrouter_volume_size_1
+ manager_oam_direct_ip_0:
+ get_input: manager_oam_direct_ip_0
+ qrouter_volume_size_2:
+ get_input: qrouter_volume_size_2
+ rpmrepository_ip_0:
+ get_input: rpmrepository_ip_0
+ requirements:
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: security_group
+ relationship: tosca.relationships.DependsOn
+ packet_mirror_network:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ dhcp_enabled: true
+ network_name:
+ get_input: packet_mirror_network_name
+ subnets:
+ packet_mirror_network_subnet:
+ enable_dhcp: true
+ name:
+ get_input: packet_mirror_network_subnet_name
+ cidr:
+ get_input: packet_mirror_network_subnet_cidr
+ allocation_pools:
+ - start:
+ get_input: packet_mirror_network_subnet_alloc_start
+ end:
+ get_input: packet_mirror_network_subnet_alloc_end
+ packet_internal_network:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ dhcp_enabled: true
+ network_name:
+ get_input: packet_internal_network_name
+ subnets:
+ packet_internal_network_subnet:
+ enable_dhcp: true
+ name:
+ get_input: packet_internal_network_subnet_name
+ cidr:
+ get_input: packet_internal_network_subnet_cidr
+ allocation_pools:
+ - start:
+ get_input: packet_internal_network_subnet_alloc_start
+ end:
+ get_input: packet_internal_network_subnet_alloc_end
+ security_group:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules
+ properties:
+ name: FE_radcom_security_group
+ rules:
+ - protocol: tcp
+ port_range_max: 23
+ port_range_min: 23
+ - protocol: tcp
+ port_range_max: 123
+ port_range_min: 123
+ - protocol: tcp
+ port_range_max: 3389
+ port_range_min: 3389
+ - protocol: udp
+ port_range_max: 5434
+ port_range_min: 5434
+ - protocol: tcp
+ port_range_max: 5443
+ port_range_min: 5435
+ - protocol: tcp
+ port_range_max: 8000
+ port_range_min: 8000
+ - protocol: tcp
+ port_range_max: 9900
+ port_range_min: 9900
+ - protocol: tcp
+ port_range_max: 12050
+ port_range_min: 12000
+ - protocol: tcp
+ port_range_max: 161
+ port_range_min: 161
+ - protocol: udp
+ port_range_max: 8000
+ port_range_min: 8000
+ - protocol: icmp
+ - protocol: 47
+ - protocol: tcp
+ port_range_max: 22
+ port_range_min: 22
+ - protocol: tcp
+ port_range_max: 3050
+ port_range_min: 3000
+ - protocol: tcp
+ port_range_max: 8081
+ port_range_min: 8080
+ - protocol: tcp
+ port_range_max: 8084
+ port_range_min: 8084
+ - protocol: tcp
+ port_range_max: 4000
+ port_range_min: 4000
+ - protocol: tcp
+ port_range_max: 33000
+ port_range_min: 33000
+ - protocol: tcp
+ port_range_max: 8082
+ port_range_min: 8082
+ requirements:
+ - port:
+ capability: attachment_oam_private_net_network_port
+ node: QRouter
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: attachment_cdr_network_port
+ node: QRouter
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: attachment_oam_private_net_network_port
+ node: vLB
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: attachment_packet_mirror_network_port
+ node: vLB
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: attachment_packet_internal_network_port
+ node: vLB
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: attachment_oam_private_net_network_port
+ node: vLBAgent
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: attachment_packet_mirror_network_port
+ node: vLBAgent
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: attachment_packet_internal_network_port
+ node: vLBAgent
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: attachment_oam_private_net_network_port
+ node: vProbe
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: attachment_cdr_network_port
+ node: vProbe
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: attachment_packet_internal_network_port
+ node: vProbe
+ relationship: org.openecomp.relationships.AttachesTo
+ vLB:
+ type: org.openecomp.resource.abstract.nodes.heat.FEAdd_On_Module_vLBTemplate
+ directives:
+ - substitutable
+ properties:
+ vf_module_id:
+ get_input: vf_module_id
+ packet_mirror_network: packet_mirror_network
+ oam_private_net_name:
+ get_input: oam_private_net_name
+ vProbe_cluster_name:
+ get_input: vProbe_cluster_name
+ vLB_version_name:
+ get_input: vLB_version_name
+ vf_module_name:
+ get_input: vf_module_name
+ vLB_node_count:
+ get_input: vLB_node_count
+ service_template_filter:
+ substitute_service_template: FEAdd_On_Module_vLBTemplateServiceTemplate.yaml
+ domain_name:
+ get_input: domain_name
+ ntp_timezone:
+ get_input: ntp_timezone
+ packet_internal_network: packet_internal_network
+ vnf_id:
+ get_input: vnf_id
+ vLB_type:
+ get_input: vLB_type
+ availability_zone_0:
+ get_input: availability_zone_1
+ region_name:
+ get_input: region_name
+ manager_name_0:
+ get_input: manager_name_0
+ vLB_cluster_name:
+ get_input: vLB_cluster_name
+ tenant_name:
+ get_input: tenant_name
+ vLB_names:
+ get_input: vLB_names
+ security_group: security_group
+ vLB_volume_name_2:
+ get_input: vLB_volume_name_2
+ vLB_volume_name_0:
+ get_input: vLB_volume_name_0
+ vLB_volume_type_1:
+ get_input: vLB_volume_type_1
+ vLB_flavor_name:
+ get_input: vLB_flavor_name
+ vLB_volume_name_1:
+ get_input: vLB_volume_name_1
+ vLB_volume_type_2:
+ get_input: vLB_volume_type_2
+ vLB_volume_type_0:
+ get_input: vLB_volume_type_0
+ vLB_volume_size_1:
+ get_input: vLB_volume_size_1
+ vlb_image_name:
+ get_input: base_image_name
+ vLB_volume_size_0:
+ get_input: vLB_volume_size_0
+ manager_oam_direct_ip_0:
+ get_input: manager_oam_direct_ip_0
+ rpmrepository_ip_0:
+ get_input: rpmrepository_ip_0
+ vLB_volume_size_2:
+ get_input: vLB_volume_size_2
+ requirements:
+ - link_packet_mirror_network_port:
+ capability: tosca.capabilities.network.Linkable
+ node: packet_mirror_network
+ relationship: tosca.relationships.network.LinksTo
+ - link_packet_internal_network_port:
+ capability: tosca.capabilities.network.Linkable
+ node: packet_internal_network
+ relationship: tosca.relationships.network.LinksTo
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: security_group
+ relationship: tosca.relationships.DependsOn
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: packet_mirror_network
+ relationship: tosca.relationships.DependsOn
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: packet_mirror_network
+ relationship: tosca.relationships.DependsOn
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: packet_internal_network
+ relationship: tosca.relationships.DependsOn
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: packet_internal_network
+ relationship: tosca.relationships.DependsOn
+ groups:
+ FEBase_Module:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/FEBase_Module.yaml
+ members:
+ - vLBAgent
+ - vProbe
+ - QRouter
+ - packet_mirror_network
+ - packet_internal_network
+ - security_group
+ - vLB \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_QRouterCloudConfig b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_QRouterCloudConfig
new file mode 100644
index 0000000000..51c7176ee6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_QRouterCloudConfig
@@ -0,0 +1,39 @@
+#cloud-config
+ manage_etc_hosts: true
+ yum_repos:
+ Base_Repo:
+ baseurl: "https://%rpm_repo_ip_0%/repo/base"
+ enabled: true
+ gpgcheck: false
+ name: "Base Repo"
+ sslverify: 0
+ sslclientcert: /var/lib/yum/yum.cert
+ sslclientkey: /var/lib/yum/yum.key
+ Radcom:
+ baseurl: "https://%rpm_repo_ip_0%/repo/radcom"
+ enabled: true
+ gpgcheck: false
+ name: "Radcom Repo"
+ sslverify: 0
+ sslclientcert: /var/lib/yum/yum.cert
+ sslclientkey: /var/lib/yum/yum.key
+ package_upgrade: false
+ ssh_authorized_keys:
+ - "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAnuJOkl2iGaFB+BCeRak67Chy+cATmvsqLPDYQ6GMRrGg0kBMcIRExshmTJQFGC+m2xiXeo41pSLaR1vt5fDB+3ewUSBcNtZrr5VxzBWzOab1VO+sCx4f8gOkSJ7plRJ/8xZqyhV+jTkb02peWbqtW+WqERTIyGul/eMNCDnwDNxznb8jMI3KWUd3ujWgFnk8EJ9c41y2unvk42XDOUlnuvR1/FW/qPRSNwPQGLEDlDje29xB3yaMQuJRL4Z86GWb1ZVeVh/+mIO1R4Ayj0HYspDruvFa9mECR4K1QhCN9mRE5sGBMiEOK0O/pf8Y3K2J9LQ6UYAt2yHzL7fAMAKOOw=="
+ runcmd:
+ - "sed -i \"s/GSSAPIAuthentication yes/GSSAPIAuthentication no/g\" /etc/ssh/sshd_config"
+ - "sed -i \"s/#UseDNS yes/UseDNS no/g\" /etc/ssh/sshd_config"
+ - "passwd -d deployment"
+ - "mkdir -pv /mnt/config"
+ - "mount /dev/disk/by-label/config-2 /mnt/config"
+ - "a=($(cat /mnt/config/openstack/latest/meta_data.json | /usr/local/bin/python2.7 -c 'import json,sys;obj=json.load(sys.stdin); print json.dumps(obj[\"files\"]);'));paths=0; values=0;counter=0;function remove_json_chars() { input=$1; echo $1 | sed 's/\\}//g' | sed 's/,//g' | sed 's/]//g' | sed 's/\"//g'; };for data in ${a[@]} ; do index=$(( $counter % 4 )); if [[ \"$index\" == 1 ]];then b[$paths]=$(remove_json_chars $data); paths=$(( $paths + 1 )) ; fi; if [[ \"$index\" == 3 ]];then c[$values]=$(remove_json_chars $data); values=$(( $values + 1 )) ; fi; counter=$(( $counter + 1 )) ; done; path_counter=0; for file in ${c[@]} ; do cp /mnt/config/openstack${file} ${b[$path_counter]}; path_counter=$(( ${path_counter} + 1 )) ; done"
+ - "cat /mnt/config/openstack/latest/meta_data.json | /usr/local/bin/python2.7 -c 'import json,sys;obj=json.load(sys.stdin); print json.dumps(obj[\"meta\"]);' > /meta.js"
+ - "sed -i 's|_colon_|:|g' /meta.js"
+ - "sed -i 's|_slash_|/|g' /meta.js"
+ - "/usr/local/bin/python2.7 /tmp/wait_for_resources.py -m %manager_oam_direct_ip_0%"
+ - "chmod 0754 /root/call_home.py /root/RegisterStatus/register_status.py /root/CheckAvailability/check_availability.py"
+ - "sed -i 's/QROUTER_CLUSTER_NAME/%qrouter_cluster_name%/g' /root/dependencies.json"
+ - "sed -i 's/QROUTER_NODE_COUNT/%qrouter_node_count%/g' /root/dependencies.json"
+ - "sed -i 's/MANAGER_INSTANCE_NAME/%manager_hostname%.%domain_name%/g' /root/dependencies.json"
+ - "/usr/local/bin/python2.7 /root/CheckAvailability/check_availability.py %manager_oam_direct_ip_0%"
+ - "/usr/local/bin/python2.7 /root/call_home.py %manager_oam_direct_ip_0%"
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_QRouterTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_QRouterTemplate.yaml
new file mode 100644
index 0000000000..aae1455919
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_QRouterTemplate.yaml
@@ -0,0 +1,216 @@
+heat_template_version: 2014-10-16
+
+parameters:
+ cdr_network:
+ type: string
+ domain_name:
+ type: string
+ qrouter_image_name:
+ type: string
+ manager_name_0:
+ type: string
+ manager_oam_direct_ip_0:
+ type: string
+ ntp_timezone:
+ type: string
+ oam_private_net_name:
+ type: string
+ availability_zone_0:
+ type: string
+ qrouter_cluster_name:
+ type: string
+ qrouter_flavor_name:
+ type: string
+ qrouter_index:
+ type: number
+ qrouter_names:
+ type: comma_delimited_list
+ qrouter_node_count:
+ type: number
+ qrouter_volume_name_0:
+ type: string
+ qrouter_volume_name_1:
+ type: string
+ qrouter_volume_name_2:
+ type: string
+ qrouter_volume_size_0:
+ type: number
+ qrouter_volume_size_1:
+ type: number
+ qrouter_volume_size_2:
+ type: number
+ qrouter_volume_type_0:
+ type: string
+ qrouter_volume_type_1:
+ type: string
+ qrouter_volume_type_2:
+ type: string
+ region_name:
+ type: string
+ rpmrepository_ip_0:
+ type: string
+ security_group:
+ type: string
+ tenant_name:
+ type: string
+ version_number:
+ type: string
+ vf_module_id:
+ type: string
+ vf_module_name:
+ type: string
+ vnf_id:
+ type: string
+resources:
+ QRouter:
+ properties:
+ availability_zone:
+ get_param: availability_zone_0
+ config_drive: true
+ flavor:
+ get_param: qrouter_flavor_name
+ image:
+ get_param: qrouter_image_name
+ metadata:
+ cdr_network_ip_0:
+ get_attr:
+ - cdr_network_port
+ - fixed_ip_0s
+ - 0
+ - ip_address
+ cluster_name:
+ get_param: qrouter_cluster_name
+ machine_name:
+ get_param:
+ - qrouter_names
+ - get_param: qrouter_index
+ machine_type: qrouter
+ mount_colon__slash_config:
+ get_resource: qrouter_volume_2
+ mount_colon__slash_data:
+ get_resource: qrouter_volume_0
+ mount_colon__slash_log:
+ get_resource: qrouter_volume_1
+ ntp_timezone:
+ get_param: ntp_timezone
+ oam_private_network_ip_0:
+ get_attr:
+ - oam_private_net_network_port
+ - fixed_ip_0s
+ - 0
+ - ip_address
+ region:
+ get_param: region_name
+ repo_ip_0:
+ get_param: rpmrepository_ip_0
+ tenant:
+ get_param: tenant_name
+ version_number:
+ get_param: version_number
+ vf_module_id:
+ get_param: vf_module_id
+ vf_module_name:
+ get_param: vf_module_name
+ vnf_id:
+ get_param: vnf_id
+ name:
+ get_param:
+ - qrouter_names
+ - get_param: qrouter_index
+ networks:
+ - port:
+ get_resource: oam_private_net_network_port
+ - port:
+ get_resource: cdr_network_port
+ personality:
+ /root/CheckAvailability/check_availability.py:
+ get_file: check_availability.py
+ /root/RegisterStatus/register_status.py:
+ get_file: register_status.py
+ /root/call_home.py:
+ get_file: call_home.py
+ /root/dependencies.json:
+ get_file: qrouterdependencies.json
+ /tmp/wait_for_resources.py:
+ get_file: wait_for_resources.py
+ user_data:
+ str_replace:
+ params:
+ '%domain_name%':
+ get_param: domain_name
+ '%manager_hostname%':
+ get_param: manager_name_0
+ '%manager_oam_direct_ip_0%':
+ get_param: manager_oam_direct_ip_0
+ '%qrouter_cluster_name%':
+ get_param: qrouter_cluster_name
+ '%qrouter_node_count%':
+ get_param: qrouter_node_count
+ '%rpm_repo_ip_0%':
+ get_param: rpmrepository_ip_0
+ template:
+ get_file: FEAdd_On_Module_QRouterCloudConfig
+ user_data_format: RAW
+ type: OS::Nova::Server
+ cdr_network_port:
+ properties:
+ network:
+ get_param: cdr_network
+ security_groups:
+ - get_param: security_group
+ type: OS::Neutron::Port
+ oam_private_net_network_port:
+ properties:
+ network:
+ get_param: oam_private_net_name
+ security_groups:
+ - get_param: security_group
+ type: OS::Neutron::Port
+ qrouter_volume_0:
+ properties:
+ description:
+ get_param: qrouter_volume_name_0
+ size:
+ get_param: qrouter_volume_size_0
+ volume_type:
+ get_param: qrouter_volume_type_0
+ type: OS::Cinder::Volume
+ qrouter_volume_0_att:
+ properties:
+ instance_uuid:
+ get_resource: QRouter
+ volume_id:
+ get_resource: qrouter_volume_0
+ type: OS::Cinder::VolumeAttachment
+ qrouter_volume_1:
+ properties:
+ description:
+ get_param: qrouter_volume_name_1
+ size:
+ get_param: qrouter_volume_size_1
+ volume_type:
+ get_param: qrouter_volume_type_1
+ type: OS::Cinder::Volume
+ qrouter_volume_1_att:
+ properties:
+ instance_uuid:
+ get_resource: QRouter
+ volume_id:
+ get_resource: qrouter_volume_1
+ type: OS::Cinder::VolumeAttachment
+ qrouter_volume_2:
+ properties:
+ description:
+ get_param: qrouter_volume_name_2
+ size:
+ get_param: qrouter_volume_size_2
+ volume_type:
+ get_param: qrouter_volume_type_2
+ type: OS::Cinder::Volume
+ qrouter_volume_2_att:
+ properties:
+ instance_uuid:
+ get_resource: QRouter
+ volume_id:
+ get_resource: qrouter_volume_2
+ type: OS::Cinder::VolumeAttachment \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_vLBAgentCloudConfig b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_vLBAgentCloudConfig
new file mode 100644
index 0000000000..83f57aceb8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_vLBAgentCloudConfig
@@ -0,0 +1,53 @@
+#cloud-config
+ manage_etc_hosts: false
+ yum_repos:
+ Base_Repo:
+ baseurl: "https://%rpm_repo_ip_0%/repo/base"
+ enabled: true
+ gpgcheck: false
+ name: "Base Repo"
+ sslverify: 0
+ sslclientcert: /var/lib/yum/yum.cert
+ sslclientkey: /var/lib/yum/yum.key
+ Radcom:
+ baseurl: "https://%rpm_repo_ip_0%/repo/radcom"
+ enabled: true
+ gpgcheck: false
+ name: "Radcom Repo"
+ sslverify: 0
+ sslclientcert: /var/lib/yum/yum.cert
+ sslclientkey: /var/lib/yum/yum.key
+ package_upgrade: false
+ ssh_authorized_keys:
+ - "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAnuJOkl2iGaFB+BCeRak67Chy+cATmvsqLPDYQ6GMRrGg0kBMcIRExshmTJQFGC+m2xiXeo41pSLaR1vt5fDB+3ewUSBcNtZrr5VxzBWzOab1VO+sCx4f8gOkSJ7plRJ/8xZqyhV+jTkb02peWbqtW+WqERTIyGul/eMNCDnwDNxznb8jMI3KWUd3ujWgFnk8EJ9c41y2unvk42XDOUlnuvR1/FW/qPRSNwPQGLEDlDje29xB3yaMQuJRL4Z86GWb1ZVeVh/+mIO1R4Ayj0HYspDruvFa9mECR4K1QhCN9mRE5sGBMiEOK0O/pf8Y3K2J9LQ6UYAt2yHzL7fAMAKOOw=="
+ runcmd:
+ - "sed -i \"s/GSSAPIAuthentication yes/GSSAPIAuthentication no/g\" /etc/ssh/sshd_config"
+ - "sed -i \"s/#UseDNS yes/UseDNS no/g\" /etc/ssh/sshd_config"
+ - "passwd -d deployment"
+ - "mkdir -pv /mnt/config"
+ - "mount /dev/disk/by-label/config-2 /mnt/config"
+ - "a=($(cat /mnt/config/openstack/latest/meta_data.json | /usr/local/bin/python2.7 -c 'import json,sys;obj=json.load(sys.stdin); print json.dumps(obj[\"files\"]);'));paths=0; values=0;counter=0;function remove_json_chars() { input=$1; echo $1 | sed 's/\\}//g' | sed 's/,//g' | sed 's/]//g' | sed 's/\"//g'; };for data in ${a[@]} ; do index=$(( $counter % 4 )); if [[ \"$index\" == 1 ]];then b[$paths]=$(remove_json_chars $data); paths=$(( $paths + 1 )) ; fi; if [[ \"$index\" == 3 ]];then c[$values]=$(remove_json_chars $data); values=$(( $values + 1 )) ; fi; counter=$(( $counter + 1 )) ; done; path_counter=0; for file in ${c[@]} ; do cp /mnt/config/openstack${file} ${b[$path_counter]}; path_counter=$(( ${path_counter} + 1 )) ; done"
+ - "cat /mnt/config/openstack/latest/meta_data.json | /usr/local/bin/python2.7 -c 'import json,sys;obj=json.load(sys.stdin); print json.dumps(obj[\"meta\"]);' > /meta.js"
+ - "sed -i 's|_colon_|:|g' /meta.js"
+ - "sed -i 's|_slash_|/|g' /meta.js"
+ - "/usr/local/bin/python2.7 /tmp/wait_for_resources.py -m %manager_oam_direct_ip_0%"
+ - "chmod 0754 /root/call_home.py /root/RegisterStatus/register_status.py /root/CheckAvailability/check_availability.py"
+ - "/usr/local/bin/python2.7 /root/CheckAvailability/check_availability.py %manager_oam_direct_ip_0%"
+ - "echo MH vLBAgent_id_number %vLBAgent_id_number%"
+ - "echo MH probe_data %probe_data%"
+ - "echo MH probe_log %probe_log%"
+ - "echo MH probe_config %probe_config%"
+ - "echo MH vLBAgent_id_number %vLBAgent_id_number%"
+ - "probe_id=`echo %vLBAgent_id_number%`"
+ - "vLB_n_count=`echo %vLB_node_count%`"
+ - "echo vLB_n_count=$vLB_n_count"
+ - "if [[ \"$vLB_n_count\" == 0 ]];then cp -p /root/dependencies_without_vLB.json /root/dependencies.json; fi;"
+ - "if [[ \"$vLB_n_count\" > 0 ]];then cp -p /root/dependencies_with_vLB.json /root/dependencies.json; fi;"
+ - "sed -i 's/VLBAGENT_CLUSTER_NAME/%vLBAgent_cluster_name%/g' /root/dependencies.json"
+ - "sed -i 's/VPROBE_CLUSTER_NAME/%vProbe_cluster_name%/g' /root/dependencies.json"
+ - "sed -i 's/VLB_CLUSTER_NAME/%vLB_cluster_name%/g' /root/dependencies.json"
+ - "sed -i 's/VLBAGENT_NODE_COUNT/%vLBAgent_node_count%/g' /root/dependencies.json"
+ - "sed -i 's/MANAGER_INSTANCE_NAME/%manager_hostname%.%domain_name%/g' /root/dependencies.json"
+ - "echo \"${probe_id}\" > /etc/hostname"
+ - "mkdir -pv /radcom/software"
+ - "/usr/local/bin/python2.7 /root/call_home.py %manager_oam_direct_ip_0%"
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_vLBAgentTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_vLBAgentTemplate.yaml
new file mode 100644
index 0000000000..80a65d17fc
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_vLBAgentTemplate.yaml
@@ -0,0 +1,303 @@
+heat_template_version: 2014-10-16
+
+parameters:
+ domain_name:
+ type: string
+ vlb_agent_image_name:
+ type: string
+ manager_name_0:
+ type: string
+ manager_oam_direct_ip_0:
+ type: string
+ ntp_timezone:
+ type: string
+ oam_private_net_name:
+ type: string
+ packet_internal_network:
+ type: string
+ packet_mirror_network:
+ type: string
+ region_name:
+ type: string
+ rpmrepository_ip_0:
+ type: string
+ security_group:
+ type: string
+ tenant_name:
+ type: string
+ availability_zone_0:
+ type: string
+ vLBAgent_cluster_name:
+ type: string
+ vLBAgent_flavor_name:
+ type: string
+ vLBAgent_index:
+ type: number
+ vLBAgent_names:
+ type: comma_delimited_list
+ vLBAgent_node_count:
+ type: number
+ vLBAgent_type:
+ type: string
+ vLBAgent_version_name:
+ type: string
+ vLBAgent_volume_name_0:
+ type: string
+ vLBAgent_volume_name_1:
+ type: string
+ vLBAgent_volume_name_2:
+ type: string
+ vLBAgent_volume_size_0:
+ type: number
+ vLBAgent_volume_size_1:
+ type: number
+ vLBAgent_volume_size_2:
+ type: number
+ vLBAgent_volume_type_0:
+ type: string
+ vLBAgent_volume_type_1:
+ type: string
+ vLBAgent_volume_type_2:
+ type: string
+ vLB_cluster_name:
+ type: string
+ vLB_node_count:
+ type: number
+ vProbe_cluster_name:
+ type: string
+ vf_module_id:
+ type: string
+ vf_module_name:
+ type: string
+ vnf_id:
+ type: string
+resources:
+ oam_private_net_network_port:
+ properties:
+ network:
+ get_param: oam_private_net_name
+ security_groups:
+ - get_param: security_group
+ type: OS::Neutron::Port
+ packet_internal_network_port:
+ properties:
+ network:
+ get_param: packet_internal_network
+ security_groups:
+ - get_param: security_group
+ type: OS::Neutron::Port
+ packet_mirror_network_port:
+ properties:
+ network:
+ get_param: packet_mirror_network
+ security_groups:
+ - get_param: security_group
+ type: OS::Neutron::Port
+ vLBAgentInstance:
+ properties:
+ availability_zone:
+ get_param: availability_zone_0
+ config_drive: true
+ flavor:
+ get_param: vLBAgent_flavor_name
+ image:
+ get_param: vlb_agent_image_name
+ metadata:
+ DPDK: DPDK_IP
+ cluster_name:
+ get_param: vLBAgent_cluster_name
+ machine_name:
+ get_param:
+ - vLBAgent_names
+ - get_param: vLBAgent_index
+ machine_type: vLBAgent
+ manager_oam_direct_ip_0:
+ get_param: manager_oam_direct_ip_0
+ mount_colon__slash_config:
+ get_resource: vLBAgent_volume_2
+ mount_colon__slash_data:
+ get_resource: vLBAgent_volume_0
+ mount_colon__slash_log:
+ get_resource: vLBAgent_volume_1
+ ntp_timezone:
+ get_param: ntp_timezone
+ oam_private_network_cidr:
+ get_attr:
+ - oam_private_net_network_port
+ - subnets
+ - 0
+ - cidr
+ oam_private_network_ip_0:
+ get_attr:
+ - oam_private_net_network_port
+ - fixed_ip_0s
+ - 0
+ - ip_address
+ packet_internal_network_cidr:
+ get_attr:
+ - packet_internal_network_port
+ - subnets
+ - 0
+ - cidr
+ packet_internal_network_ip_0:
+ get_attr:
+ - packet_internal_network_port
+ - fixed_ip_0s
+ - 0
+ - ip_address
+ packet_mirror_network_cidr:
+ get_attr:
+ - packet_mirror_network_port
+ - subnets
+ - 0
+ - cidr
+ packet_mirror_network_ip_0:
+ get_attr:
+ - packet_mirror_network_port
+ - fixed_ip_0s
+ - 0
+ - ip_address
+ region:
+ get_param: region_name
+ repo_ip_0:
+ get_param: rpmrepository_ip_0
+ tenant:
+ get_param: tenant_name
+ vLBAgentInstance:
+ get_param: vLBAgent_index
+ vLBAgent_id:
+ get_attr:
+ - vLBAgent_id
+ - value
+ vLBAgent_name:
+ get_param:
+ - vLBAgent_names
+ - get_param: vLBAgent_index
+ vLBAgent_type:
+ get_param: vLBAgent_type
+ vLBAgent_version_name:
+ get_param: vLBAgent_version_name
+ vLB_node_count:
+ get_param: vLB_node_count
+ version_number:
+ get_param: vLBAgent_version_name
+ vf_module_id:
+ get_param: vf_module_id
+ vf_module_name:
+ get_param: vf_module_name
+ vnf_id:
+ get_param: vnf_id
+ name:
+ get_param:
+ - vLBAgent_names
+ - get_param: vLBAgent_index
+ networks:
+ - port:
+ get_resource: oam_private_net_network_port
+ - port:
+ get_resource: packet_mirror_network_port
+ - port:
+ get_resource: packet_internal_network_port
+ personality:
+ /root/CheckAvailability/check_availability.py:
+ get_file: check_availability.py
+ /root/RegisterStatus/register_status.py:
+ get_file: register_status.py
+ /root/call_home.py:
+ get_file: call_home.py
+ /root/dependencies_with_vLB.json:
+ get_file: vlbagentdependencies_with_vLB.json
+ /root/dependencies_without_vLB.json:
+ get_file: vlbagentdependencies_without_vLB.json
+ /tmp/wait_for_resources.py:
+ get_file: wait_for_resources.py
+ user_data:
+ str_replace:
+ params:
+ '%domain_name%':
+ get_param: domain_name
+ '%manager_hostname%':
+ get_param: manager_name_0
+ '%manager_oam_direct_ip_0%':
+ get_param: manager_oam_direct_ip_0
+ '%rpm_repo_ip_0%':
+ get_param: rpmrepository_ip_0
+ '%vLBAgent_cluster_name%':
+ get_param: vLBAgent_cluster_name
+ '%vLBAgent_config%':
+ get_resource: vLBAgent_volume_2
+ '%vLBAgent_data%':
+ get_resource: vLBAgent_volume_0
+ '%vLBAgent_id_number%':
+ get_attr:
+ - vLBAgent_id
+ - value
+ '%vLBAgent_log%':
+ get_resource: vLBAgent_volume_1
+ '%vLBAgent_node_count%':
+ get_param: vLBAgent_node_count
+ '%vLBAgent_version_name%':
+ get_param: vLBAgent_version_name
+ '%vLB_cluster_name%':
+ get_param: vLB_cluster_name
+ '%vLB_node_count%':
+ get_param: vLB_node_count
+ '%vProbe_cluster_name%':
+ get_param: vProbe_cluster_name
+ template:
+ get_file: FEAdd_On_Module_vLBAgentCloudConfig
+ user_data_format: RAW
+ type: OS::Nova::Server
+ vLBAgent_id:
+ properties:
+ length: 4
+ sequence: digits
+ type: OS::Heat::RandomString
+ vLBAgent_volume_0:
+ properties:
+ description:
+ get_param: vLBAgent_volume_name_0
+ size:
+ get_param: vLBAgent_volume_size_0
+ volume_type:
+ get_param: vLBAgent_volume_type_0
+ type: OS::Cinder::Volume
+ vLBAgent_volume_0_att:
+ properties:
+ instance_uuid:
+ get_resource: vLBAgentInstance
+ volume_id:
+ get_resource: vLBAgent_volume_0
+ type: OS::Cinder::VolumeAttachment
+ vLBAgent_volume_1:
+ properties:
+ description:
+ get_param: vLBAgent_volume_name_1
+ size:
+ get_param: vLBAgent_volume_size_1
+ volume_type:
+ get_param: vLBAgent_volume_type_1
+ type: OS::Cinder::Volume
+ vLBAgent_volume_1_att:
+ properties:
+ instance_uuid:
+ get_resource: vLBAgentInstance
+ volume_id:
+ get_resource: vLBAgent_volume_1
+ type: OS::Cinder::VolumeAttachment
+ vLBAgent_volume_2:
+ properties:
+ description:
+ get_param: vLBAgent_volume_name_2
+ size:
+ get_param: vLBAgent_volume_size_2
+ volume_type:
+ get_param: vLBAgent_volume_type_2
+ type: OS::Cinder::Volume
+ vLBAgent_volume_2_att:
+ properties:
+ instance_uuid:
+ get_resource: vLBAgentInstance
+ volume_id:
+ get_resource: vLBAgent_volume_2
+ type: OS::Cinder::VolumeAttachment
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_vLBCloudConfig b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_vLBCloudConfig
new file mode 100644
index 0000000000..78b6c652ce
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_vLBCloudConfig
@@ -0,0 +1,41 @@
+#cloud-config
+ manage_etc_hosts: false
+ yum_repos:
+ Base_Repo:
+ baseurl: "https://%rpm_repo_ip_0%/repo/base"
+ enabled: true
+ gpgcheck: false
+ name: "Base Repo"
+ sslverify: 0
+ sslclientcert: /var/lib/yum/yum.cert
+ sslclientkey: /var/lib/yum/yum.key
+ ssh_authorized_keys:
+ - "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAnuJOkl2iGaFB+BCeRak67Chy+cATmvsqLPDYQ6GMRrGg0kBMcIRExshmTJQFGC+m2xiXeo41pSLaR1vt5fDB+3ewUSBcNtZrr5VxzBWzOab1VO+sCx4f8gOkSJ7plRJ/8xZqyhV+jTkb02peWbqtW+WqERTIyGul/eMNCDnwDNxznb8jMI3KWUd3ujWgFnk8EJ9c41y2unvk42XDOUlnuvR1/FW/qPRSNwPQGLEDlDje29xB3yaMQuJRL4Z86GWb1ZVeVh/+mIO1R4Ayj0HYspDruvFa9mECR4K1QhCN9mRE5sGBMiEOK0O/pf8Y3K2J9LQ6UYAt2yHzL7fAMAKOOw=="
+ runcmd:
+ - "sed -i \"s/GSSAPIAuthentication yes/GSSAPIAuthentication no/g\" /etc/ssh/sshd_config"
+ - "sed -i \"s/#UseDNS yes/UseDNS no/g\" /etc/ssh/sshd_config"
+ - "passwd -d deployment"
+ - "mkdir -pv /mnt/config"
+ - "mount /dev/disk/by-label/config-2 /mnt/config"
+ - "a=($(cat /mnt/config/openstack/latest/meta_data.json | /usr/local/bin/python2.7 -c 'import json,sys;obj=json.load(sys.stdin); print json.dumps(obj[\"files\"]);'));paths=0; values=0;counter=0;function remove_json_chars() { input=$1; echo $1 | sed 's/\\}//g' | sed 's/,//g' | sed 's/]//g' | sed 's/\"//g'; };for data in ${a[@]} ; do index=$(( $counter % 4 )); if [[ \"$index\" == 1 ]];then b[$paths]=$(remove_json_chars $data); paths=$(( $paths + 1 )) ; fi; if [[ \"$index\" == 3 ]];then c[$values]=$(remove_json_chars $data); values=$(( $values + 1 )) ; fi; counter=$(( $counter + 1 )) ; done; path_counter=0; for file in ${c[@]} ; do cp /mnt/config/openstack${file} ${b[$path_counter]}; path_counter=$(( ${path_counter} + 1 )) ; done"
+ - "cat /mnt/config/openstack/latest/meta_data.json | /usr/local/bin/python2.7 -c 'import json,sys;obj=json.load(sys.stdin); print json.dumps(obj[\"meta\"]);' > /meta.js"
+ - "sed -i 's|_colon_|:|g' /meta.js"
+ - "sed -i 's|_slash_|/|g' /meta.js"
+ - "/usr/local/bin/python2.7 /tmp/wait_for_resources.py -m %manager_oam_direct_ip_0%"
+ - "chmod 0754 /root/call_home.py /root/RegisterStatus/register_status.py /root/CheckAvailability/check_availability.py"
+ - "/usr/local/bin/python2.7 /root/CheckAvailability/check_availability.py %manager_oam_direct_ip_0%"
+ - "echo MH vLB_id_number %vLB_id_number%"
+ - "echo MH probe_data %vLB_id_number%"
+ - "echo MH probe_log %vLB_log%"
+ - "echo MH probe_config %vLB_config%"
+ - "probe_id=`echo %vLB_id_number%`"
+ - "echo vLB_cluster_name %vLB_cluster_name%"
+ - "echo vLB_node_count %vLB_node_count%"
+ - "sed -i 's/VLB_CLUSTER_NAME/%vLB_cluster_name%/g' /root/dependencies.json"
+ - "sed -i 's/VPROBE_CLUSTER_NAME/%vProbe_cluster_name%/g' /root/dependencies.json"
+ - "sed -i 's/VLB_NODE_COUNT/%vLB_node_count%/g' /root/dependencies.json"
+ - "sed -i 's/MANAGER_INSTANCE_NAME/%manager_hostname%.%domain_name%/g' /root/dependencies.json"
+ - "sed -i 's/VLB_INSTANCE/%vLBInstance%/g' /root/dependencies.json"
+ - "echo \"${probe_id}\" > /etc/hostname"
+ - "mkdir -pv /radcom/software"
+ - "/usr/local/bin/python2.7 /root/call_home.py %manager_oam_direct_ip_0%"
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_vLBTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_vLBTemplate.yaml
new file mode 100644
index 0000000000..afc435adaf
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_vLBTemplate.yaml
@@ -0,0 +1,287 @@
+heat_template_version: 2014-10-16
+
+parameters:
+ domain_name:
+ type: string
+ vlb_image_name:
+ type: string
+ manager_name_0:
+ type: string
+ manager_oam_direct_ip_0:
+ type: string
+ ntp_timezone:
+ type: string
+ oam_private_net_name:
+ type: string
+ packet_internal_network:
+ type: string
+ packet_mirror_network:
+ type: string
+ region_name:
+ type: string
+ rpmrepository_ip_0:
+ type: string
+ security_group:
+ type: string
+ tenant_name:
+ type: string
+ availability_zone_0:
+ type: string
+ vLB_cluster_name:
+ type: string
+ vLB_flavor_name:
+ type: string
+ vLB_index:
+ type: number
+ vLB_names:
+ type: comma_delimited_list
+ vLB_node_count:
+ type: number
+ vLB_type:
+ type: string
+ vLB_version_name:
+ type: string
+ vLB_volume_name_0:
+ type: string
+ vLB_volume_name_1:
+ type: string
+ vLB_volume_name_2:
+ type: string
+ vLB_volume_size_0:
+ type: number
+ vLB_volume_size_1:
+ type: number
+ vLB_volume_size_2:
+ type: number
+ vLB_volume_type_0:
+ type: string
+ vLB_volume_type_1:
+ type: string
+ vLB_volume_type_2:
+ type: string
+ vProbe_cluster_name:
+ type: string
+ vf_module_id:
+ type: string
+ vf_module_name:
+ type: string
+ vnf_id:
+ type: string
+resources:
+ oam_private_net_network_port:
+ properties:
+ network:
+ get_param: oam_private_net_name
+ security_groups:
+ - get_param: security_group
+ type: OS::Neutron::Port
+ packet_internal_network_port:
+ properties:
+ network:
+ get_param: packet_internal_network
+ security_groups:
+ - get_param: security_group
+ type: OS::Neutron::Port
+ packet_mirror_network_port:
+ properties:
+ network:
+ get_param: packet_mirror_network
+ security_groups:
+ - get_param: security_group
+ type: OS::Neutron::Port
+ vLBInstance:
+ properties:
+ availability_zone:
+ get_param: availability_zone_0
+ config_drive: true
+ flavor:
+ get_param: vLB_flavor_name
+ image:
+ get_param: vlb_image_name
+ metadata:
+ DPDK: DPDK_IP
+ cluster_name:
+ get_param: vLB_cluster_name
+ machine_name:
+ get_param:
+ - vLB_names
+ - get_param: vLB_index
+ machine_type: vLB
+ manager_oam_direct_ip_0:
+ get_param: manager_oam_direct_ip_0
+ mount_colon__slash_config:
+ get_resource: vLB_volume_2
+ mount_colon__slash_data:
+ get_resource: vLB_volume_0
+ mount_colon__slash_log:
+ get_resource: vLB_volume_1
+ ntp_timezone:
+ get_param: ntp_timezone
+ oam_private_network_cidr:
+ get_attr:
+ - oam_private_net_network_port
+ - subnets
+ - 0
+ - cidr
+ oam_private_network_ip_0:
+ get_attr:
+ - oam_private_net_network_port
+ - fixed_ip_0s
+ - 0
+ - ip_address
+ packet_internal_network_cidr:
+ get_attr:
+ - packet_internal_network_port
+ - subnets
+ - 0
+ - cidr
+ packet_internal_network_ip_0:
+ get_attr:
+ - packet_internal_network_port
+ - fixed_ip_0s
+ - 0
+ - ip_address
+ packet_mirror_network_cidr:
+ get_attr:
+ - packet_mirror_network_port
+ - subnets
+ - 0
+ - cidr
+ packet_mirror_network_ip_0:
+ get_attr:
+ - packet_mirror_network_port
+ - fixed_ip_0s
+ - 0
+ - ip_address
+ region:
+ get_param: region_name
+ repo_ip_0:
+ get_param: rpmrepository_ip_0
+ tenant:
+ get_param: tenant_name
+ vLBAgentInstance:
+ get_param: vLB_index
+ vLBAgent_id:
+ get_attr:
+ - vLB_id
+ - value
+ vLBAgent_name:
+ get_param:
+ - vLB_names
+ - get_param: vLB_index
+ vLBAgent_type:
+ get_param: vLB_type
+ vLBAgent_version_name:
+ get_param: vLB_version_name
+ version_number:
+ get_param: vLB_version_name
+ vf_module_id:
+ get_param: vf_module_id
+ vf_module_name:
+ get_param: vf_module_name
+ vnf_id:
+ get_param: vnf_id
+ name:
+ get_param:
+ - vLB_names
+ - get_param: vLB_index
+ networks:
+ - port:
+ get_resource: oam_private_net_network_port
+ - port:
+ get_resource: packet_mirror_network_port
+ - port:
+ get_resource: packet_internal_network_port
+ personality:
+ /root/CheckAvailability/check_availability.py:
+ get_file: check_availability.py
+ /root/RegisterStatus/register_status.py:
+ get_file: register_status.py
+ /root/call_home.py:
+ get_file: call_home.py
+ /root/dependencies.json:
+ get_file: vlbdependencies.json
+ /tmp/wait_for_resources.py:
+ get_file: wait_for_resources.py
+ user_data:
+ str_replace:
+ params:
+ '%domain_name%':
+ get_param: domain_name
+ '%manager_hostname%':
+ get_param: manager_name_0
+ '%manager_oam_direct_ip_0%':
+ get_param: manager_oam_direct_ip_0
+ '%rpm_repo_ip_0%':
+ get_param: rpmrepository_ip_0
+ '%vLBInstance%':
+ get_param: vLB_index
+ '%vLB_cluster_name%':
+ get_param: vLB_cluster_name
+ '%vLB_config%':
+ get_resource: vLB_volume_2
+ '%vLB_data%':
+ get_resource: vLB_volume_0
+ '%vLB_id_number%':
+ get_attr:
+ - vLB_id
+ - value
+ '%vLB_log%':
+ get_resource: vLB_volume_1
+ '%vLB_node_count%':
+ get_param: vLB_node_count
+ '%vLB_version_name%':
+ get_param: vLB_version_name
+ '%vProbe_cluster_name%':
+ get_param: vProbe_cluster_name
+ template:
+ get_file: FEAdd_On_Module_vLBCloudConfig
+ user_data_format: RAW
+ type: OS::Nova::Server
+ vLB_id:
+ properties:
+ length: 4
+ sequence: digits
+ type: OS::Heat::RandomString
+ vLB_volume_0:
+ properties:
+ size:
+ get_param: vLB_volume_size_0
+ volume_type:
+ get_param: vLB_volume_type_0
+ type: OS::Cinder::Volume
+ vLB_volume_0_att:
+ properties:
+ instance_uuid:
+ get_resource: vLBInstance
+ volume_id:
+ get_resource: vLB_volume_0
+ type: OS::Cinder::VolumeAttachment
+ vLB_volume_1:
+ properties:
+ size:
+ get_param: vLB_volume_size_1
+ volume_type:
+ get_param: vLB_volume_type_1
+ type: OS::Cinder::Volume
+ vLB_volume_1_att:
+ properties:
+ instance_uuid:
+ get_resource: vLBInstance
+ volume_id:
+ get_resource: vLB_volume_1
+ type: OS::Cinder::VolumeAttachment
+ vLB_volume_2:
+ properties:
+ size:
+ get_param: vLB_volume_size_2
+ volume_type:
+ get_param: vLB_volume_type_2
+ type: OS::Cinder::Volume
+ vLB_volume_2_att:
+ properties:
+ instance_uuid:
+ get_resource: vLBInstance
+ volume_id:
+ get_resource: vLB_volume_2
+ type: OS::Cinder::VolumeAttachment
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_vProbeCloudConfig b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_vProbeCloudConfig
new file mode 100644
index 0000000000..f31b3dde85
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_vProbeCloudConfig
@@ -0,0 +1,50 @@
+#cloud-config
+ manage_etc_hosts: true
+ yum_repos:
+ Base_Repo:
+ baseurl: "https://%rpm_repo_ip_0%/repo/base"
+ enabled: true
+ gpgcheck: false
+ name: "Base Repo"
+ sslverify: 0
+ sslclientcert: /var/lib/yum/yum.cert
+ sslclientkey: /var/lib/yum/yum.key
+ Radcom:
+ baseurl: "https://%rpm_repo_ip_0%/repo/radcom"
+ enabled: true
+ gpgcheck: false
+ name: "Radcom Repo"
+ sslverify: 0
+ sslclientcert: /var/lib/yum/yum.cert
+ sslclientkey: /var/lib/yum/yum.key
+ package_upgrade: false
+ ssh_authorized_keys:
+ - "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAnuJOkl2iGaFB+BCeRak67Chy+cATmvsqLPDYQ6GMRrGg0kBMcIRExshmTJQFGC+m2xiXeo41pSLaR1vt5fDB+3ewUSBcNtZrr5VxzBWzOab1VO+sCx4f8gOkSJ7plRJ/8xZqyhV+jTkb02peWbqtW+WqERTIyGul/eMNCDnwDNxznb8jMI3KWUd3ujWgFnk8EJ9c41y2unvk42XDOUlnuvR1/FW/qPRSNwPQGLEDlDje29xB3yaMQuJRL4Z86GWb1ZVeVh/+mIO1R4Ayj0HYspDruvFa9mECR4K1QhCN9mRE5sGBMiEOK0O/pf8Y3K2J9LQ6UYAt2yHzL7fAMAKOOw=="
+ runcmd:
+ - "sed -i \"s/GSSAPIAuthentication yes/GSSAPIAuthentication no/g\" /etc/ssh/sshd_config"
+ - "sed -i \"s/#UseDNS yes/UseDNS no/g\" /etc/ssh/sshd_config"
+ - "passwd -d deployment"
+ - "mkdir -pv /mnt/config"
+ - "mount /dev/disk/by-label/config-2 /mnt/config"
+ - "a=($(cat /mnt/config/openstack/latest/meta_data.json | /usr/local/bin/python2.7 -c 'import json,sys;obj=json.load(sys.stdin); print json.dumps(obj[\"files\"]);'));paths=0; values=0;counter=0;function remove_json_chars() { input=$1; echo $1 | sed 's/\\}//g' | sed 's/,//g' | sed 's/]//g' | sed 's/\"//g'; };for data in ${a[@]} ; do index=$(( $counter % 4 )); if [[ \"$index\" == 1 ]];then b[$paths]=$(remove_json_chars $data); paths=$(( $paths + 1 )) ; fi; if [[ \"$index\" == 3 ]];then c[$values]=$(remove_json_chars $data); values=$(( $values + 1 )) ; fi; counter=$(( $counter + 1 )) ; done; path_counter=0; for file in ${c[@]} ; do cp /mnt/config/openstack${file} ${b[$path_counter]}; path_counter=$(( ${path_counter} + 1 )) ; done"
+ - "cat /mnt/config/openstack/latest/meta_data.json | /usr/local/bin/python2.7 -c 'import json,sys;obj=json.load(sys.stdin); print json.dumps(obj[\"meta\"]);' > /meta.js"
+ - "sed -i 's|_colon_|:|g' /meta.js"
+ - "sed -i 's|_slash_|/|g' /meta.js"
+ - "/usr/local/bin/python2.7 /tmp/wait_for_resources.py -m %manager_oam_direct_ip_0%"
+ - "chmod 0754 /root/call_home.py /root/RegisterStatus/register_status.py /root/CheckAvailability/check_availability.py"
+ - "/usr/local/bin/python2.7 /root/CheckAvailability/check_availability.py %manager_oam_direct_ip_0%"
+ - "echo MH probe_data %probe_data%"
+ - "echo MH probe_log %probe_log%"
+ - "echo MH probe_config %probe_config%"
+ - "sed -i 's/QROUTER_CLUSTER_NAME/%qrouter_cluster_name%/g' /root/dependencies.json"
+ - "sed -i 's/VPROBE_CLUSTER_NAME/%vProbe_cluster_name%/g' /root/dependencies.json"
+ - "sed -i 's/VPROBE_NODE_COUNT/%vProbe_node_count%/g' /root/dependencies.json"
+ - "sed -i 's/MANAGER_INSTANCE_NAME/%manager_hostname%.%domain_name%/g' /root/dependencies.json"
+ - "sed -i 's/QTRACE_HOST_NAME/%qtrace_hostname%.%win_domain_name%/g' /root/dependencies.json"
+ - "sed -i 's/PROBE_INSTANCE/%ProbeInstance%/g' /root/dependencies.json"
+ - "probe_id=$(($RANDOM%8999+1000))"
+ - "echo $probe_id > /etc/hostname"
+ - "sed -i 's/P_ID/'$probe_id'/g' /meta.js"
+ - "echo MH probe_id=$probe_id"
+ - "mkdir -pv /radcom/software"
+ - "/usr/local/bin/python2.7 /root/call_home.py %manager_oam_direct_ip_0%"
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_vProbeTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_vProbeTemplate.yaml
new file mode 100644
index 0000000000..d343ee5595
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEAdd_On_Module_vProbeTemplate.yaml
@@ -0,0 +1,308 @@
+heat_template_version: 2014-10-16
+
+parameters:
+ cdr_network:
+ type: string
+ domain_name:
+ type: string
+ vprobe_image_name:
+ type: string
+ manager_name_0:
+ type: string
+ manager_oam_direct_ip_0:
+ type: string
+ ntp_timezone:
+ type: string
+ oam_private_net_name:
+ type: string
+ packet_internal_network:
+ type: string
+ qrouter_cluster_name:
+ type: string
+ qtrace_name_0:
+ type: string
+ region_name:
+ type: string
+ rpmrepository_ip_0:
+ type: string
+ security_group:
+ type: string
+ tenant_name:
+ type: string
+ vLB_node_count:
+ type: number
+ vProbe_cluster_name:
+ type: string
+ vProbe_node_count:
+ type: number
+ vProbe_version_name:
+ type: string
+ vf_module_id:
+ type: string
+ vf_module_name:
+ type: string
+ vnf_id:
+ type: string
+ vprobe_AppDependenciesMachineType:
+ type: string
+ availability_zone_0:
+ type: string
+ vprobe_flavor_name:
+ type: string
+ vprobe_index:
+ type: number
+ vprobe_names:
+ type: comma_delimited_list
+ vprobe_type:
+ type: string
+ vprobe_volume_name_0:
+ type: string
+ vprobe_volume_name_1:
+ type: string
+ vprobe_volume_name_2:
+ type: string
+ vprobe_volume_size_0:
+ type: number
+ vprobe_volume_size_1:
+ type: number
+ vprobe_volume_size_2:
+ type: number
+ vprobe_volume_type_0:
+ type: string
+ vprobe_volume_type_1:
+ type: string
+ vprobe_volume_type_2:
+ type: string
+ win_domain_name:
+ type: string
+resources:
+ ProbeInstance:
+ properties:
+ availability_zone:
+ get_param: availability_zone_0
+ config_drive: true
+ flavor:
+ get_param: vprobe_flavor_name
+ image:
+ get_param: vprobe_image_name
+ metadata:
+ AppDependencies:
+ get_param: vprobe_AppDependenciesMachineType
+ DPDK: DPDK_IP
+ ProbeInstance:
+ get_param: vprobe_index
+ cdr_network_cidr:
+ get_attr:
+ - cdr_network_port
+ - subnets
+ - 0
+ - cidr
+ cdr_network_ip_0:
+ get_attr:
+ - cdr_network_port
+ - fixed_ip_0s
+ - 0
+ - ip_address
+ cluster_name:
+ get_param: vProbe_cluster_name
+ machine_name:
+ get_param:
+ - vprobe_names
+ - get_param: vprobe_index
+ machine_type: vProbe
+ manager_oam_direct_ip_0:
+ get_param: manager_oam_direct_ip_0
+ mount_colon__slash_config:
+ get_resource: vprobe_volume_2
+ mount_colon__slash_data:
+ get_resource: vprobe_volume_0
+ mount_colon__slash_log:
+ get_resource: vprobe_volume_1
+ ntp_timezone:
+ get_param: ntp_timezone
+ oam_private_network_cidr:
+ get_attr:
+ - oam_private_net_network_port
+ - subnets
+ - 0
+ - cidr
+ oam_private_network_ip_0:
+ get_attr:
+ - oam_private_net_network_port
+ - fixed_ip_0s
+ - 0
+ - ip_address
+ packet_internal_network_cidr:
+ get_attr:
+ - packet_internal_network_port
+ - subnets
+ - 0
+ - cidr
+ packet_internal_network_ip_0:
+ get_attr:
+ - packet_internal_network_port
+ - fixed_ip_0s
+ - 0
+ - ip_address
+ probe_id: P_ID
+ probe_name:
+ get_param:
+ - vprobe_names
+ - get_param: vprobe_index
+ region:
+ get_param: region_name
+ repo_ip_0:
+ get_param: rpmrepository_ip_0
+ tenant:
+ get_param: tenant_name
+ vLB_node_count:
+ get_param: vLB_node_count
+ vProbe_node_count:
+ get_param: vProbe_node_count
+ vProbe_version_name:
+ get_param: vProbe_version_name
+ version_number:
+ get_param: vProbe_version_name
+ vf_module_id:
+ get_param: vf_module_id
+ vf_module_name:
+ get_param: vf_module_name
+ vnf_id:
+ get_param: vnf_id
+ vprobe_type:
+ get_param: vprobe_type
+ name:
+ get_param:
+ - vprobe_names
+ - get_param: vprobe_index
+ networks:
+ - port:
+ get_resource: oam_private_net_network_port
+ - port:
+ get_resource: cdr_network_port
+ - port:
+ get_resource: packet_internal_network_port
+ personality:
+ /root/CheckAvailability/check_availability.py:
+ get_file: check_availability.py
+ /root/RegisterStatus/register_status.py:
+ get_file: register_status.py
+ /root/call_home.py:
+ get_file: call_home.py
+ /root/dependencies.json:
+ get_file: vprobedependencies.json
+ /tmp/wait_for_resources.py:
+ get_file: wait_for_resources.py
+ user_data:
+ str_replace:
+ params:
+ '%ProbeInstance%':
+ get_param: vprobe_index
+ '%domain_name%':
+ get_param: domain_name
+ '%manager_hostname%':
+ get_param: manager_name_0
+ '%manager_oam_direct_ip_0%':
+ get_param: manager_oam_direct_ip_0
+ '%probe_config%':
+ get_resource: vprobe_volume_2
+ '%probe_data%':
+ get_resource: vprobe_volume_0
+ '%probe_id_number%':
+ get_attr:
+ - vprobe_id
+ - value
+ '%probe_log%':
+ get_resource: vprobe_volume_1
+ '%qrouter_cluster_name%':
+ get_param: qrouter_cluster_name
+ '%qtrace_hostname%':
+ get_param: qtrace_name_0
+ '%rpm_repo_ip_0%':
+ get_param: rpmrepository_ip_0
+ '%vProbe_cluster_name%':
+ get_param: vProbe_cluster_name
+ '%vProbe_node_count%':
+ get_param: vProbe_node_count
+ '%vProbe_version_name%':
+ get_param: vProbe_version_name
+ '%win_domain_name%':
+ get_param: win_domain_name
+ template:
+ get_file: FEAdd_On_Module_vProbeCloudConfig
+ user_data_format: RAW
+ type: OS::Nova::Server
+ cdr_network_port:
+ properties:
+ network:
+ get_param: cdr_network
+ security_groups:
+ - get_param: security_group
+ type: OS::Neutron::Port
+ oam_private_net_network_port:
+ properties:
+ network:
+ get_param: oam_private_net_name
+ security_groups:
+ - get_param: security_group
+ type: OS::Neutron::Port
+ packet_internal_network_port:
+ properties:
+ network:
+ get_param: packet_internal_network
+ security_groups:
+ - get_param: security_group
+ type: OS::Neutron::Port
+ vprobe_id:
+ properties:
+ length: 4
+ sequence: digits
+ type: OS::Heat::RandomString
+ vprobe_volume_0:
+ properties:
+ description:
+ get_param: vprobe_volume_name_0
+ size:
+ get_param: vprobe_volume_size_0
+ volume_type:
+ get_param: vprobe_volume_type_0
+ type: OS::Cinder::Volume
+ vprobe_volume_0_att:
+ properties:
+ instance_uuid:
+ get_resource: ProbeInstance
+ volume_id:
+ get_resource: vprobe_volume_0
+ type: OS::Cinder::VolumeAttachment
+ vprobe_volume_1:
+ properties:
+ description:
+ get_param: vprobe_volume_name_1
+ size:
+ get_param: vprobe_volume_size_1
+ volume_type:
+ get_param: vprobe_volume_type_1
+ type: OS::Cinder::Volume
+ vprobe_volume_1_att:
+ properties:
+ instance_uuid:
+ get_resource: ProbeInstance
+ volume_id:
+ get_resource: vprobe_volume_1
+ type: OS::Cinder::VolumeAttachment
+ vprobe_volume_2:
+ properties:
+ description:
+ get_param: vprobe_volume_name_2
+ size:
+ get_param: vprobe_volume_size_2
+ volume_type:
+ get_param: vprobe_volume_type_2
+ type: OS::Cinder::Volume
+ vprobe_volume_2_att:
+ properties:
+ instance_uuid:
+ get_resource: ProbeInstance
+ volume_id:
+ get_resource: vprobe_volume_2
+ type: OS::Cinder::VolumeAttachment \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEBase_Module.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEBase_Module.env
new file mode 100644
index 0000000000..76907855eb
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEBase_Module.env
@@ -0,0 +1,91 @@
+parameters:
+ base_image_name: rprb_centos_6_7_05_24_2016
+ #domain_name: novalocal
+ #manager_name_0: zrsrv01qmn001
+ #manager_oam_direct_ip_0: null
+ ntp_timezone: UTC
+ packet_internal_network_name: rprb_26071_mme_int_pktinternal_net_1
+ packet_internal_network_subnet_alloc_end: 192.0.6.250
+ packet_internal_network_subnet_alloc_start: 192.0.6.2
+ packet_internal_network_subnet_cidr: 192.0.6.0/24
+ packet_internal_network_subnet_name: rprb_26071_mme_int_pktinternal_net_1_subnet
+ packet_mirror_network_name: rprb_26071_mme_int_pktmirror_net_1
+ packet_mirror_network_subnet_alloc_end: 20.20.5.250
+ packet_mirror_network_subnet_alloc_start: 20.20.5.2
+ packet_mirror_network_subnet_cidr: 20.20.5.0/24
+ packet_mirror_network_subnet_name: rprb_26071_mme_int_pktmirror_net_1_subnet
+# availability_zone_0: nova
+ qrouter_cluster_name: qrouter_cluster
+ qrouter_flavor_name: m1.large
+# qrouter_names: zrsrv01xlb000,zrsrv01xlb001,zrsrv01xlb002,zrsrv01xlb003,zrsrv01xlb004
+ qrouter_node_count: 1
+ #qrouter_vnf_module_name: QRouter
+ qrouter_volume_name_0: data
+ qrouter_volume_name_1: log
+ qrouter_volume_name_2: config
+ qrouter_volume_size_0: 1
+ qrouter_volume_size_1: 1
+ qrouter_volume_size_2: 1
+ qrouter_volume_type_0: volumes_ceph
+ qrouter_volume_type_1: volumes_ceph
+ qrouter_volume_type_2: volumes_ceph
+ #qtrace_name_0: zrsrv01qtr001
+ #region_name: Tel Aviv
+ rpmrepository_ip_0: null
+ #tenant_name: RADCOM
+# availability_zone_1: nova
+ vLBAgent_cluster_name: vLBAgent_cluster
+ vLBAgent_flavor_name: m1.large
+# vLBAgent_names: zrvlb01mme000,zrvlb01mme001,zrvlb01mme002,zrvlb01mme003,zrvlb01mme004
+ vLBAgent_node_count: 1
+ vLBAgent_type: mme
+ vLBAgent_version_name: vProbe.r.11.1.e._08_16-12_53
+ vLBAgent_volume_name_0: data
+ vLBAgent_volume_name_1: log
+ vLBAgent_volume_name_2: config
+ vLBAgent_volume_size_0: 15
+ vLBAgent_volume_size_1: 1
+ vLBAgent_volume_size_2: 1
+ vLBAgent_volume_type_0: volumes_ceph
+ vLBAgent_volume_type_1: volumes_ceph
+ vLBAgent_volume_type_2: volumes_ceph
+# availability_zone_2: nova
+ vLB_cluster_name: vLB_cluster
+ vLB_flavor_name: m1.large
+# vLB_names: zrvlb01gtp000,zrvlb01gtp001,zrvlb01gtp002,zrvlb01gtp003,zrvlb01gtp004
+ vLB_node_count: 1
+ vLB_type: mme
+ vLB_version_name: vProbe.r.11.1.e._08_16-12_53
+ vLB_volume_name_0: data
+ vLB_volume_name_1: log
+ vLB_volume_name_2: config
+ vLB_volume_size_0: 10
+ vLB_volume_size_1: 1
+ vLB_volume_size_2: 1
+ vLB_volume_type_0: volumes_ceph
+ vLB_volume_type_1: volumes_ceph
+ vLB_volume_type_2: volumes_ceph
+ vProbe_cluster_name: vProbe_cluster
+ vProbe_node_count: 1
+ vProbe_version_name: vProbe.r.11.1.e._08_16-12_53
+ version_number: 11.1.5
+ #vf_module_id: 0bb8ee04-c9aa-4b51-8aa6-763343d25692
+ #vlb_vnf_module_name: vLB
+ #vlbagent_vnf_module_name: vLBAgent
+ #vnf_id: df9ad862-763e-463b-a761-eba2077f9930
+ vprobe_AppDependenciesMachineType: DatabaseUpgrade
+# availability_zone_3: nova
+ vprobe_flavor_name: m1.large
+# vprobe_names: zrprb01mme000,zrprb01mme001,zrprb01mme002,zrprb01mme003,zrprb01mme004
+ vprobe_type: mme
+ #vf_module_name: vProbe
+ vprobe_volume_name_0: data
+ vprobe_volume_name_1: log
+ vprobe_volume_name_2: config
+ vprobe_volume_size_0: 100
+ vprobe_volume_size_1: 5
+ vprobe_volume_size_2: 1
+ vprobe_volume_type_0: volumes_ceph
+ vprobe_volume_type_1: volumes_ceph
+ vprobe_volume_type_2: volumes_ceph
+ #win_domain_name: openstacklocal
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEBase_Module.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEBase_Module.yaml
new file mode 100644
index 0000000000..5d0a5457ca
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/FEBase_Module.yaml
@@ -0,0 +1,670 @@
+heat_template_version: '2014-10-16'
+
+parameters:
+ base_image_name:
+ description: The base ID or name of the image to boot with
+ type: string
+ cdr_network:
+ description: A string specifying a symbolic name for the network
+ type: string
+ domain_name:
+ description: The servers domain
+ type: string
+ manager_name_0:
+ description: VM Name for Manager VM 0
+ type: string
+ manager_oam_direct_ip_0:
+ description: The public ip address of the manager
+ type: string
+ ntp_timezone:
+ description: Name of NTP Time zone to be used
+ type: string
+ oam_private_net_name:
+ description: A string specifying a symbolic name for the network
+ type: string
+ packet_internal_network_name:
+ description: A string specifying a symbolic name for the network
+ type: string
+ packet_internal_network_subnet_alloc_end:
+ description: End address for the allocation pool
+ type: string
+ packet_internal_network_subnet_alloc_start:
+ description: Start address for the allocation pool
+ type: string
+ packet_internal_network_subnet_cidr:
+ description: The Classless Inter-Domain Routing
+ type: string
+ packet_internal_network_subnet_name:
+ description: The name of the subnet
+ type: string
+ packet_mirror_network_name:
+ description: A string specifying a symbolic name for the network
+ type: string
+ packet_mirror_network_subnet_alloc_end:
+ description: End address for the allocation pool
+ type: string
+ packet_mirror_network_subnet_alloc_start:
+ description: Start address for the allocation pool
+ type: string
+ packet_mirror_network_subnet_cidr:
+ description: The Classless Inter-Domain Routing
+ type: string
+ packet_mirror_network_subnet_name:
+ description: The name of the subnet
+ type: string
+ availability_zone_0:
+ description: Name of the availability zone for server placement
+ type: string
+ qrouter_cluster_name:
+ description: The component cluster name
+ type: string
+ qrouter_flavor_name:
+ description: The ID or name of the flavor to boot onto
+ type: string
+ qrouter_names:
+ description: VM Names for QRouter VMs
+ type: comma_delimited_list
+ qrouter_node_count:
+ description: The number of nodes to create
+ type: number
+ qrouter_volume_name_0:
+ description: The name of the volume
+ type: string
+ qrouter_volume_name_1:
+ description: The name of the volume
+ type: string
+ qrouter_volume_name_2:
+ description: The name of the volume
+ type: string
+ qrouter_volume_size_0:
+ description: The size of the volume in GB
+ type: number
+ qrouter_volume_size_1:
+ description: The size of the volume in GB
+ type: number
+ qrouter_volume_size_2:
+ description: The size of the volume in GB
+ type: number
+ qrouter_volume_type_0:
+ description: The type of the volume mapping to a backend
+ type: string
+ qrouter_volume_type_1:
+ description: The type of the volume mapping to a backend
+ type: string
+ qrouter_volume_type_2:
+ description: The type of the volume mapping to a backend
+ type: string
+ qtrace_name_0:
+ description: VM Name for QRouter VMs
+ type: string
+ region_name:
+ description: Name of region to be used
+ type: string
+ rpmrepository_ip_0:
+ description: The public ip address of the repository
+ type: string
+ tenant_name:
+ description: Name of tenant to be used
+ type: string
+ availability_zone_1:
+ description: Name of the availability zone for server placement
+ type: string
+ vLBAgent_cluster_name:
+ description: The component cluster name
+ type: string
+ vLBAgent_flavor_name:
+ description: The ID or name of the flavor to boot onto
+ type: string
+ vLBAgent_names:
+ description: VM Names for vLBAgent VMs
+ type: comma_delimited_list
+ vLBAgent_node_count:
+ description: The number of nodes to create
+ type: number
+ vLBAgent_type:
+ description: vLBAgent Type. mme or sgw
+ type: string
+ vLBAgent_version_name:
+ description: The version name of the component
+ type: string
+ vLBAgent_volume_name_0:
+ description: The name of the volume
+ type: string
+ vLBAgent_volume_name_1:
+ description: The name of the volume
+ type: string
+ vLBAgent_volume_name_2:
+ description: The name of the volume
+ type: string
+ vLBAgent_volume_size_0:
+ description: The size of the volume in GB
+ type: number
+ vLBAgent_volume_size_1:
+ description: The size of the volume in GB
+ type: number
+ vLBAgent_volume_size_2:
+ description: The size of the volume in Gigabytes.
+ type: number
+ vLBAgent_volume_type_0:
+ description: The type of the volume mapping to a backend
+ type: string
+ vLBAgent_volume_type_1:
+ description: The type of the volume mapping to a backend
+ type: string
+ vLBAgent_volume_type_2:
+ description: The Cinder volume type. Used to specify the backend.
+ type: string
+ availability_zone_2:
+ description: Name of the availability zone for server placement.
+ type: string
+ vLB_cluster_name:
+ description: The component cluster name.
+ type: string
+ vLB_flavor_name:
+ description: The name of the flavor to boot onto.
+ type: string
+ vLB_names:
+ description: VM Names for vLB VMs
+ type: comma_delimited_list
+ vLB_node_count:
+ description: The number of nodes to create.
+ type: number
+ vLB_type:
+ description: The type of VLB. MME or SGW.
+ type: string
+ vLB_version_name:
+ description: The version name of the component.
+ type: string
+ vLB_volume_name_0:
+ description: The name of the volume
+ type: string
+ vLB_volume_name_1:
+ description: The name of the volume
+ type: string
+ vLB_volume_name_2:
+ description: The name of the volume
+ type: string
+ vLB_volume_size_0:
+ description: The size of the volume in GB.
+ type: number
+ vLB_volume_size_1:
+ description: The size of the volume in GB.
+ type: number
+ vLB_volume_size_2:
+ description: The size of the volume in GB.
+ type: number
+ vLB_volume_type_0:
+ description: The type of the volume mapping to a backend
+ type: string
+ vLB_volume_type_1:
+ description: The type of the volume mapping to a backend
+ type: string
+ vLB_volume_type_2:
+ description: The type of the volume mapping to a backend
+ type: string
+ vProbe_cluster_name:
+ description: The component cluster name
+ type: string
+ vProbe_node_count:
+ description: The number of nodes to create
+ type: number
+ vProbe_version_name:
+ description: The version name of the component
+ type: string
+ version_number:
+ description: The version number of the component
+ type: string
+ vf_module_id:
+ description: The VF MODULE ID of the RADCOM System.
+ type: string
+ vnf_id:
+ description: The VNF ID of the RADCOM System.
+ type: string
+ vprobe_AppDependenciesMachineType:
+ description: The application dependencies
+ type: string
+ availability_zone_3:
+ description: Name of the availability zone for server placement
+ type: string
+ vprobe_flavor_name:
+ description: The name of the flavor to boot onto
+ type: string
+ vprobe_names:
+ description: VM Names for vProbe VMs
+ type: comma_delimited_list
+ vprobe_type:
+ description: The type of vProbe. MME or SGW.
+ type: string
+ vf_module_name:
+ description: The VNF module name for vProbe elements.
+ type: string
+ vprobe_volume_name_0:
+ description: The name of the volume
+ type: string
+ vprobe_volume_name_1:
+ description: The name of the volume
+ type: string
+ vprobe_volume_name_2:
+ description: The name of the volume
+ type: string
+ vprobe_volume_size_0:
+ description: The size of the volume in GB
+ type: number
+ vprobe_volume_size_1:
+ description: The size of the volume in GB
+ type: number
+ vprobe_volume_size_2:
+ description: The size of the volume in GB
+ type: number
+ vprobe_volume_type_0:
+ description: The type of the volume mapping to a backend
+ type: string
+ vprobe_volume_type_1:
+ description: The type of the volume mapping to a backend
+ type: string
+ vprobe_volume_type_2:
+ description: The type of the volume mapping to a backend
+ type: string
+ win_domain_name:
+ description: Windows servers' domain
+ type: string
+resources:
+ QRouter:
+ depends_on:
+ - security_group
+ - packet_mirror_network
+ - packet_mirror_network_subnet
+ - packet_internal_network
+ - packet_internal_network_subnet
+ properties:
+ cdr_network:
+ get_param: cdr_network
+ domain_name:
+ get_param: domain_name
+ qrouter_image_name:
+ get_param: base_image_name
+ manager_name_0:
+ get_param: manager_name_0
+ manager_oam_direct_ip_0:
+ get_param: manager_oam_direct_ip_0
+ ntp_timezone:
+ get_param: ntp_timezone
+ oam_private_net_name:
+ get_param: oam_private_net_name
+ availability_zone_0:
+ get_param: availability_zone_0
+ qrouter_cluster_name:
+ get_param: qrouter_cluster_name
+ qrouter_flavor_name:
+ get_param: qrouter_flavor_name
+ qrouter_names:
+ get_param: qrouter_names
+ qrouter_node_count:
+ get_param: qrouter_node_count
+ qrouter_volume_name_0:
+ get_param: qrouter_volume_name_0
+ qrouter_volume_name_1:
+ get_param: qrouter_volume_name_1
+ qrouter_volume_name_2:
+ get_param: qrouter_volume_name_2
+ qrouter_volume_size_0:
+ get_param: qrouter_volume_size_0
+ qrouter_volume_size_1:
+ get_param: qrouter_volume_size_1
+ qrouter_volume_size_2:
+ get_param: qrouter_volume_size_2
+ qrouter_volume_type_0:
+ get_param: qrouter_volume_type_0
+ qrouter_volume_type_1:
+ get_param: qrouter_volume_type_1
+ qrouter_volume_type_2:
+ get_param: qrouter_volume_type_2
+ region_name:
+ get_param: region_name
+ rpmrepository_ip_0:
+ get_param: rpmrepository_ip_0
+ security_group:
+ get_resource: security_group
+ tenant_name:
+ get_param: tenant_name
+ version_number:
+ get_param: version_number
+ vf_module_id:
+ get_param: vf_module_id
+ vf_module_name:
+ get_param: vf_module_name
+ vnf_id:
+ get_param: vnf_id
+ type: FEAdd_On_Module_QRouterTemplate.yaml
+ packet_internal_network:
+ properties:
+ name:
+ get_param: packet_internal_network_name
+ type: OS::Neutron::Net
+ packet_internal_network_subnet:
+ properties:
+ allocation_pools:
+ - end:
+ get_param: packet_internal_network_subnet_alloc_end
+ start:
+ get_param: packet_internal_network_subnet_alloc_start
+ cidr:
+ get_param: packet_internal_network_subnet_cidr
+ enable_dhcp: true
+ gateway_ip_0: null
+ name:
+ get_param: packet_internal_network_subnet_name
+ network_id:
+ get_resource: packet_internal_network
+ type: OS::Neutron::Subnet
+ packet_mirror_network:
+ properties:
+ name:
+ get_param: packet_mirror_network_name
+ type: OS::Neutron::Net
+ packet_mirror_network_subnet:
+ properties:
+ allocation_pools:
+ - end:
+ get_param: packet_mirror_network_subnet_alloc_end
+ start:
+ get_param: packet_mirror_network_subnet_alloc_start
+ cidr:
+ get_param: packet_mirror_network_subnet_cidr
+ enable_dhcp: true
+ gateway_ip_0: null
+ name:
+ get_param: packet_mirror_network_subnet_name
+ network_id:
+ get_resource: packet_mirror_network
+ type: OS::Neutron::Subnet
+ security_group:
+ properties:
+ name: FE_radcom_security_group
+ rules:
+ - port_range_max: 23
+ port_range_min: 23
+ protocol: tcp
+ - port_range_max: 123
+ port_range_min: 123
+ protocol: tcp
+ - port_range_max: 3389
+ port_range_min: 3389
+ protocol: tcp
+ - port_range_max: 5434
+ port_range_min: 5434
+ protocol: udp
+ - port_range_max: 5443
+ port_range_min: 5435
+ protocol: tcp
+ - port_range_max: 8000
+ port_range_min: 8000
+ protocol: tcp
+ - port_range_max: 9900
+ port_range_min: 9900
+ protocol: tcp
+ - port_range_max: 12050
+ port_range_min: 12000
+ protocol: tcp
+ - port_range_max: 161
+ port_range_min: 161
+ protocol: tcp
+ - port_range_max: 8000
+ port_range_min: 8000
+ protocol: udp
+ - protocol: icmp
+ - protocol: 47
+ - port_range_max: 22
+ port_range_min: 22
+ protocol: tcp
+ - port_range_max: 3050
+ port_range_min: 3000
+ protocol: tcp
+ - port_range_max: 8081
+ port_range_min: 8080
+ protocol: tcp
+ - port_range_max: 8084
+ port_range_min: 8084
+ protocol: tcp
+ - port_range_max: 4000
+ port_range_min: 4000
+ protocol: tcp
+ - port_range_max: 33000
+ port_range_min: 33000
+ protocol: tcp
+ - port_range_max: 8082
+ port_range_min: 8082
+ protocol: tcp
+ type: OS::Neutron::SecurityGroup
+ vLB:
+ depends_on:
+ - security_group
+ - packet_mirror_network
+ - packet_mirror_network_subnet
+ - packet_internal_network
+ - packet_internal_network_subnet
+ properties:
+ domain_name:
+ get_param: domain_name
+ vlb_image_name:
+ get_param: base_image_name
+ manager_name_0:
+ get_param: manager_name_0
+ manager_oam_direct_ip_0:
+ get_param: manager_oam_direct_ip_0
+ ntp_timezone:
+ get_param: ntp_timezone
+ oam_private_net_name:
+ get_param: oam_private_net_name
+ packet_internal_network:
+ get_resource: packet_internal_network
+ packet_mirror_network:
+ get_resource: packet_mirror_network
+ region_name:
+ get_param: region_name
+ rpmrepository_ip_0:
+ get_param: rpmrepository_ip_0
+ security_group:
+ get_resource: security_group
+ tenant_name:
+ get_param: tenant_name
+ availability_zone_0:
+ get_param: availability_zone_1
+ vLB_cluster_name:
+ get_param: vLB_cluster_name
+ vLB_flavor_name:
+ get_param: vLB_flavor_name
+ vLB_names:
+ get_param: vLB_names
+ vLB_node_count:
+ get_param: vLB_node_count
+ vLB_type:
+ get_param: vLB_type
+ vLB_version_name:
+ get_param: vLB_version_name
+ vLB_volume_name_0:
+ get_param: vLB_volume_name_0
+ vLB_volume_name_1:
+ get_param: vLB_volume_name_1
+ vLB_volume_name_2:
+ get_param: vLB_volume_name_2
+ vLB_volume_size_0:
+ get_param: vLB_volume_size_0
+ vLB_volume_size_1:
+ get_param: vLB_volume_size_1
+ vLB_volume_size_2:
+ get_param: vLB_volume_size_2
+ vLB_volume_type_0:
+ get_param: vLB_volume_type_0
+ vLB_volume_type_1:
+ get_param: vLB_volume_type_1
+ vLB_volume_type_2:
+ get_param: vLB_volume_type_2
+ vProbe_cluster_name:
+ get_param: vProbe_cluster_name
+ vf_module_id:
+ get_param: vf_module_id
+ vf_module_name:
+ get_param: vf_module_name
+ vnf_id:
+ get_param: vnf_id
+ type: FEAdd_On_Module_vLBTemplate.yaml
+ vLBAgent:
+ depends_on:
+ - security_group
+ - packet_mirror_network
+ - packet_mirror_network_subnet
+ - packet_internal_network
+ - packet_internal_network_subnet
+ properties:
+ domain_name:
+ get_param: domain_name
+ vlb_agent_image_name:
+ get_param: base_image_name
+ manager_name_0:
+ get_param: manager_name_0
+ manager_oam_direct_ip_0:
+ get_param: manager_oam_direct_ip_0
+ ntp_timezone:
+ get_param: ntp_timezone
+ oam_private_net_name:
+ get_param: oam_private_net_name
+ packet_internal_network:
+ get_resource: packet_internal_network
+ packet_mirror_network:
+ get_resource: packet_mirror_network
+ region_name:
+ get_param: region_name
+ rpmrepository_ip_0:
+ get_param: rpmrepository_ip_0
+ security_group:
+ get_resource: security_group
+ tenant_name:
+ get_param: tenant_name
+ availability_zone_0:
+ get_param: availability_zone_2
+ vLBAgent_cluster_name:
+ get_param: vLBAgent_cluster_name
+ vLBAgent_flavor_name:
+ get_param: vLBAgent_flavor_name
+ vLBAgent_names:
+ get_param: vLBAgent_names
+ vLBAgent_node_count:
+ get_param: vLBAgent_node_count
+ vLBAgent_type:
+ get_param: vLBAgent_type
+ vLBAgent_version_name:
+ get_param: vLBAgent_version_name
+ vLBAgent_volume_name_0:
+ get_param: vLBAgent_volume_name_0
+ vLBAgent_volume_name_1:
+ get_param: vLBAgent_volume_name_1
+ vLBAgent_volume_name_2:
+ get_param: vLBAgent_volume_name_2
+ vLBAgent_volume_size_0:
+ get_param: vLBAgent_volume_size_0
+ vLBAgent_volume_size_1:
+ get_param: vLBAgent_volume_size_1
+ vLBAgent_volume_size_2:
+ get_param: vLBAgent_volume_size_2
+ vLBAgent_volume_type_0:
+ get_param: vLBAgent_volume_type_0
+ vLBAgent_volume_type_1:
+ get_param: vLBAgent_volume_type_1
+ vLBAgent_volume_type_2:
+ get_param: vLBAgent_volume_type_2
+ vLB_cluster_name:
+ get_param: vLB_cluster_name
+ vLB_node_count:
+ get_param: vLB_node_count
+ vProbe_cluster_name:
+ get_param: vProbe_cluster_name
+ vf_module_id:
+ get_param: vf_module_id
+ vf_module_name:
+ get_param: vf_module_name
+ vnf_id:
+ get_param: vnf_id
+ type: FEAdd_On_Module_vLBAgentTemplate.yaml
+ vProbe:
+ depends_on:
+ - security_group
+ - packet_mirror_network
+ - packet_mirror_network_subnet
+ - packet_internal_network
+ - packet_internal_network_subnet
+ properties:
+ cdr_network:
+ get_param: cdr_network
+ domain_name:
+ get_param: domain_name
+ vprobe_image_name:
+ get_param: base_image_name
+ manager_name_0:
+ get_param: manager_name_0
+ manager_oam_direct_ip_0:
+ get_param: manager_oam_direct_ip_0
+ ntp_timezone:
+ get_param: ntp_timezone
+ oam_private_net_name:
+ get_param: oam_private_net_name
+ packet_internal_network:
+ get_resource: packet_internal_network
+ qrouter_cluster_name:
+ get_param: qrouter_cluster_name
+ qtrace_name_0:
+ get_param: qtrace_name_0
+ region_name:
+ get_param: region_name
+ rpmrepository_ip_0:
+ get_param: rpmrepository_ip_0
+ security_group:
+ get_resource: security_group
+ tenant_name:
+ get_param: tenant_name
+ vLB_node_count:
+ get_param: vLB_node_count
+ vProbe_cluster_name:
+ get_param: vProbe_cluster_name
+ vProbe_node_count:
+ get_param: vProbe_node_count
+ vProbe_version_name:
+ get_param: vProbe_version_name
+ vf_module_id:
+ get_param: vf_module_id
+ vf_module_name:
+ get_param: vf_module_name
+ vnf_id:
+ get_param: vnf_id
+ vprobe_AppDependenciesMachineType:
+ get_param: vprobe_AppDependenciesMachineType
+ availability_zone_0:
+ get_param: availability_zone_3
+ vprobe_flavor_name:
+ get_param: vprobe_flavor_name
+ vprobe_names:
+ get_param: vprobe_names
+ vprobe_type:
+ get_param: vprobe_type
+ vprobe_volume_name_0:
+ get_param: vprobe_volume_name_0
+ vprobe_volume_name_1:
+ get_param: vprobe_volume_name_1
+ vprobe_volume_name_2:
+ get_param: vprobe_volume_name_2
+ vprobe_volume_size_0:
+ get_param: vprobe_volume_size_0
+ vprobe_volume_size_1:
+ get_param: vprobe_volume_size_1
+ vprobe_volume_size_2:
+ get_param: vprobe_volume_size_2
+ vprobe_volume_type_0:
+ get_param: vprobe_volume_type_0
+ vprobe_volume_type_1:
+ get_param: vprobe_volume_type_1
+ vprobe_volume_type_2:
+ get_param: vprobe_volume_type_2
+ win_domain_name:
+ get_param: win_domain_name
+ type: FEAdd_On_Module_vProbeTemplate.yaml
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..1daa39bfdc
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/MANIFEST.json
@@ -0,0 +1,89 @@
+{
+ "name": "",
+ "description": "",
+ "data": [
+ {
+ "file": "FEAdd_On_Module_vLBTemplate.yaml",
+ "type": "HEAT",
+ "isBase": "false"
+ },
+ {
+ "file": "FEAdd_On_Module_QRouterTemplate.yaml",
+ "type": "HEAT",
+ "isBase": "false"
+ },
+ {
+ "file": "FEBase_Module.yaml",
+ "type": "HEAT",
+ "isBase": "true",
+ "data": [
+ {
+ "file": "FEBase_Module.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "FEAdd_On_Module_vLBAgentTemplate.yaml",
+ "type": "HEAT",
+ "isBase": "false"
+ },
+ {
+ "file": "FEAdd_On_Module_vProbeTemplate.yaml",
+ "type": "HEAT",
+ "isBase": "false"
+ },
+ {
+ "file": "qrouterdependencies.json",
+ "type": "OTHER"
+ },
+ {
+ "file": "vlbagentdependencies_with_vLB.json",
+ "type": "OTHER"
+ },
+ {
+ "file": "wait_for_resources.py",
+ "type": "OTHER"
+ },
+ {
+ "file": "vprobedependencies.json",
+ "type": "OTHER"
+ },
+ {
+ "file": "FEAdd_On_Module_vProbeCloudConfig",
+ "type": "OTHER"
+ },
+ {
+ "file": "call_home.py",
+ "type": "OTHER"
+ },
+ {
+ "file": "check_availability.py",
+ "type": "OTHER"
+ },
+ {
+ "file": "vlbdependencies.json",
+ "type": "OTHER"
+ },
+ {
+ "file": "FEAdd_On_Module_QRouterCloudConfig",
+ "type": "OTHER"
+ },
+ {
+ "file": "vlbagentdependencies_without_vLB.json",
+ "type": "OTHER"
+ },
+ {
+ "file": "FEAdd_On_Module_vLBAgentCloudConfig",
+ "type": "OTHER"
+ },
+ {
+ "file": "register_status.py",
+ "type": "OTHER"
+ },
+ {
+ "file": "FEAdd_On_Module_vLBCloudConfig",
+ "type": "OTHER"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/call_home.py b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/call_home.py
new file mode 100644
index 0000000000..54f2a69c09
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/call_home.py
@@ -0,0 +1,97 @@
+import argparse
+import json
+import re
+import requests
+from socket import getfqdn
+from sys import platform
+from time import sleep
+
+
+PARSER = argparse.ArgumentParser()
+PARSER.add_argument("manager_ip", help="The IPv4 Address where one can read the MaveriQConductor.")
+PARSER.add_argument("--mockupfile", type=str, help="The path of the json mockupfile to use.")
+ARGS = PARSER.parse_args()
+
+URL = "http://{0}:8084/MaveriQConductor/machine/create".format(ARGS.manager_ip)
+URL_AVAIL = "http://{0}:8084/MaveriQConductor/isReady".format(ARGS.manager_ip)
+HEADERS = {
+ 'Accept': 'text/plain',
+ 'Content-type': 'application/json',
+ 'Connection': 'close'
+}
+
+NETWORK_MAP = {
+ "$$OAM_NET_IP$$": "oam_private_network_ip",
+ "$$BACKEND_NET_IP$$": "backend_interconnect_network_ip",
+ "$$PACKET_MIRROR_NET_IP$$": "packet_mirror_network_ip",
+ "$$CDR_NET_IP$$": "cdr_network_ip",
+ "$$VERTICA_NET_IP$$": "vertica_private_network_ip",
+ "$$PACKET_INTERNAL_NET_IP$$": "packet_internal_network_ip",
+ "$$OAM_PROTECTED_NET_IP$$": "oam_protected_network_ip"
+}
+
+
+def map_ips_to_networks(p_meta_data):
+ network_to_ip = {}
+ for network_name in NETWORK_MAP.keys():
+ if NETWORK_MAP[network_name] in p_meta_data:
+ network_to_ip[network_name] = str(p_meta_data[NETWORK_MAP[network_name]])
+ return network_to_ip
+
+
+def check_availability():
+ is_connected = False
+ while is_connected is False:
+ try:
+ if requests.get(URL_AVAIL, headers={'Connection': 'close'}).status_code is 200:
+ is_connected = True
+ sleep(2)
+ except requests.exceptions.ConnectionError:
+ sleep(2)
+
+
+def post_request(p_json_data, p_headers):
+ req = requests.post(url=URL, data=p_json_data, headers=p_headers)
+ return req.status_code
+
+
+def multiple_replace(regex_dictionary, text):
+ regex = re.compile("(%s)" % "|".join(map(re.escape, regex_dictionary.keys())))
+ return regex.sub(
+ lambda x: regex_dictionary[x.string[x.start():x.end()]], text
+ )
+
+
+def main():
+ # Depending on platform, load the dependencies and meta.js files.
+ if ARGS.mockupfile:
+ with open(ARGS.mockupfile, 'r') as mockup_file:
+ mockup_file_data = mockup_file.read()
+ return post_request(mockup_file_data, HEADERS)
+ else:
+ if platform.startswith('linux'):
+ with open(r'/root/dependencies.json', 'r') as json_file:
+ json_data = json_file.read()
+ with open(r'/meta.js', 'r') as json_file:
+ meta_data = json.load(json_file)
+
+ elif platform == 'cygwin' or platform == 'win32':
+ with open(r'c:\\dependencies.json', 'r') as json_file:
+ json_data = json_file.read()
+ with open(r'c:\\meta.js', 'r') as json_file:
+ meta_data = json.load(json_file)
+ else:
+ json_data = {}
+ meta_data = {}
+ raise Exception('Unsupported platform')
+ # Build dictionary mapping each IP to network.
+ regex_dict = map_ips_to_networks(meta_data)
+ regex_dict['$$HOSTNAME$$'] = getfqdn()
+
+ # Perform any replacement needed.
+ json_data = multiple_replace(regex_dict, json_data)
+ print json_data
+ check_availability()
+ return post_request(p_json_data=json_data, p_headers=HEADERS)
+
+print main()
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/check_availability.py b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/check_availability.py
new file mode 100644
index 0000000000..e93b372f15
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/check_availability.py
@@ -0,0 +1,34 @@
+#!/usr/local/bin/python2.7
+import argparse
+import requests
+import sys
+from time import sleep
+
+conductor_url = "http://{0}:8084/MaveriQConductor/isReady"
+check_api = "http://{0}:8084/MaveriQManager/api/Inventory/isReady"
+check_user = "omniq"
+check_password = "radcom"
+
+
+PARSER = argparse.ArgumentParser()
+PARSER.add_argument("ScribeIP", type=str,
+ help="The Stage the application is currently in")
+ARGS = PARSER.parse_args()
+
+print "Begining check availability check!"
+isConnected = False
+while isConnected is False:
+ try:
+ sys.stdout.write('.')
+ sleep(2)
+ if requests.get(conductor_url.format(ARGS.ScribeIP),
+ headers={'Connection': 'close'}).status_code is 200 and requests.get(
+ check_api.format(ARGS.ScribeIP,
+ headers={'Connection': 'close'}),
+ auth=requests.auth.HTTPBasicAuth(check_user,
+ check_password)).status_code is 200:
+ isConnected = True
+ except requests.exceptions.ConnectionError as e:
+ sleep(2)
+
+print 'Conductor and Scribe are ready!'
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/qrouterdependencies.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/qrouterdependencies.json
new file mode 100644
index 0000000000..0a570b612b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/qrouterdependencies.json
@@ -0,0 +1,35 @@
+{
+ "name": "$$HOSTNAME$$",
+ "type": "qrouter",
+ "cluster": "QROUTER_CLUSTER_NAME",
+ "node_count": "QROUTER_NODE_COUNT",
+ "attributes": [
+ {
+ "name": "ip-eth0",
+ "value": "$$OAM_NET_IP$$"
+ },
+ {
+ "name": "rprb_26071_oam_direct_net_1",
+ "value": "$$OAM_NET_IP$$"
+ },
+ {
+ "name": "rprb_26071_cdr_direct_net_1",
+ "value": "$$CDR_NET_IP$$"
+ }
+ ],
+ "dependencies": [
+ {
+ "resource_name": "ProcessingCluster",
+ "resource_type": "cluster",
+ "attribute": "rprb_26071_cdr_direct_net_1",
+ "role": "processing_ip",
+ "format": "all"
+ },
+ {
+ "resource_name": "MANAGER_INSTANCE_NAME",
+ "resource_type": "machine",
+ "attribute": "rprb_26071_oam_direct_net_1",
+ "role": "manager_oam_direct_ip"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/register_status.py b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/register_status.py
new file mode 100644
index 0000000000..98adafaf2f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/register_status.py
@@ -0,0 +1,126 @@
+#!/usr/local/bin/python2.7
+"""
+This script is a combination of the AddComponentScript and the OnBoardingStatus
+scripts. Depending on the arguments given, it will either post an
+"addMachineCommand" or an "logOnBoardingInfo" request.
+"""
+import argparse
+import json
+import netifaces
+import requests
+from socket import getfqdn
+import sys
+from time import time
+
+
+parser = argparse.ArgumentParser()
+parser.add_argument("scribe_ip", type=str,
+ help="The IP where the Scribe can be reached.")
+parser.add_argument("--component-type", type=str,
+ help="The component type.", required=False)
+parser.add_argument("--component-version", type=str,
+ help="The component version.", required=False)
+parser.add_argument("--stage", type=str, required=False)
+parser.add_argument("--status", required=False,
+ choices=["WARNING", "INFO", "ERROR", "OK", "FAILURE"])
+parser.add_argument("--description", type=str, required=False)
+args = parser.parse_args()
+
+add_machine_ip = "http://{0}:8084/MaveriQManager/api/Inventory/addComponent".format(args.scribe_ip)
+log_onboarding_info_ip = "http://{0}:8084/MaveriQManager/api/Inventory/logOnBoardingInfo".format(args.scribe_ip)
+user = 'omniq'
+password = 'radcom'
+
+REGION = ""
+TENANT = ""
+CLUSTER_NAME = ""
+VERSION_NUMBER = ""
+PROBE_ID = ""
+OAM_DIRECT_IP = ""
+MACHINE_TYPE = args.component_type
+MACHINE_NAME = getfqdn()
+HEALTH_STATUS = {}
+ADD_COMPONENT_BODY = {}
+
+
+def read_metadata():
+ """Read the instance metadata"""
+ global REGION
+ global TENANT
+ global CLUSTER_NAME
+ global VERSION_NUMBER
+ global PROBE_ID
+ global OAM_DIRECT_IP
+ with open('/meta.js', 'r') as json_file:
+ json_data = json.loads(json_file.read())
+ TENANT = json_data["tenant"]
+ REGION = json_data["region"]
+ CLUSTER_NAME = json_data["cluster_name"]
+ VERSION_NUMBER = json_data["version_number"]
+ OAM_DIRECT_IP = json_data["oam_private_network_ip"]
+ if MACHINE_TYPE == 'vProbe':
+ PROBE_ID = json_data["probe_id"]
+
+
+def build_health_json():
+ """Builds the actual health status"""
+ HEALTH_STATUS["Region"] = REGION
+ HEALTH_STATUS["Tenant"] = TENANT
+ HEALTH_STATUS["MachineType"] = args.component_type
+ HEALTH_STATUS["MachineName"] = getfqdn()
+ HEALTH_STATUS["MachineIP"] = OAM_DIRECT_IP
+ HEALTH_STATUS["Time"] = long(time())
+ HEALTH_STATUS["Description"] = args.description
+ HEALTH_STATUS["Status"] = args.status
+ HEALTH_STATUS["Stage"] = args.stage
+ return HEALTH_STATUS
+
+
+def build_add_json():
+ """Builds the actual health status"""
+ ADD_COMPONENT_BODY["region"] = REGION
+ ADD_COMPONENT_BODY["tenant"] = TENANT
+ ADD_COMPONENT_BODY["componentType"] = args.component_type
+ ADD_COMPONENT_BODY["clusterName"] = CLUSTER_NAME
+ ADD_COMPONENT_BODY["componentVersionNumber"] = VERSION_NUMBER
+ ADD_COMPONENT_BODY["machineName"] = MACHINE_NAME
+ ADD_COMPONENT_BODY["machineNetworkInterfaces"] = []
+ ADD_COMPONENT_BODY["OAM_IP"] = OAM_DIRECT_IP
+
+ for interface in netifaces.interfaces():
+ ADD_COMPONENT_BODY["machineNetworkInterfaces"].append({"name": interface, "value": netifaces.ifaddresses(interface)[2][0]['addr']})
+
+ if PROBE_ID is not "":
+ ADD_COMPONENT_BODY["machineID"] = REGION + '_' + TENANT + '_' +\
+ CLUSTER_NAME + '_' + MACHINE_NAME + '_' + PROBE_ID
+ else:
+ ADD_COMPONENT_BODY["machineID"] = REGION + '_' + TENANT + '_' +\
+ CLUSTER_NAME + '_' + MACHINE_NAME
+ return ADD_COMPONENT_BODY
+
+
+def send_postage(p_url, p_url_user, p_url_password, p_json_data):
+ json_header = {'Content-type': 'application/json'}
+ request = requests.post(p_url, json.dumps(p_json_data), json_header, auth=requests.auth.HTTPBasicAuth(p_url_user, p_url_password))
+ print request.status_code
+ if (request.status_code != 200):
+ sys.exit(1)
+ return request.status_code
+
+
+def post_health():
+ read_metadata()
+ return send_postage(log_onboarding_info_ip, user, password,
+ build_health_json())
+
+
+def post_add_machine():
+ read_metadata()
+ return send_postage(add_machine_ip, user, password, build_add_json())
+
+if args.stage is None and args.status is None and args.description is None:
+ print "adding machine"
+ print post_add_machine()
+else:
+ print "logging health"
+ print post_health()
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/vlbagentdependencies_with_vLB.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/vlbagentdependencies_with_vLB.json
new file mode 100644
index 0000000000..0304a18f0e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/vlbagentdependencies_with_vLB.json
@@ -0,0 +1,46 @@
+{
+ "name": "$$HOSTNAME$$",
+ "type": "vLBAgent",
+ "cluster": "VLBAGENT_CLUSTER_NAME",
+ "node_count": "VLBAGENT_NODE_COUNT",
+ "attributes": [
+ {
+ "name": "ip-eth0",
+ "value": "$$OAM_NET_IP$$"
+ },
+ {
+ "name": "rprb_26071_oam_direct_net_1",
+ "value": "$$OAM_NET_IP$$"
+ },
+ {
+ "name": "rprb_26071_mme_int_pktmirror_net_1",
+ "value": "$$PACKET_MIRROR_NET_IP$$"
+ },
+ {
+ "name": "rprb_26071_mme_int_pktinternal_net_1",
+ "value": "$$PACKET_INTERNAL_NET_IP$$"
+ }
+ ],
+ "dependencies": [
+ {
+ "resource_name": "VPROBE_CLUSTER_NAME",
+ "resource_type": "cluster",
+ "attribute": "eth0-eth2-and-ProbeInstance",
+ "role": "vProbe_cluster",
+ "format": "all"
+ },
+ {
+ "resource_name": "VLB_CLUSTER_NAME",
+ "resource_type": "cluster",
+ "attribute": "eth1-eth2-and-vLBInstance",
+ "role": "vLB_cluster",
+ "format": "all"
+ },
+ {
+ "resource_name": "MANAGER_INSTANCE_NAME",
+ "resource_type": "machine",
+ "attribute": "rprb_26071_oam_direct_net_1",
+ "role": "manager_oam_direct_ip"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/vlbagentdependencies_without_vLB.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/vlbagentdependencies_without_vLB.json
new file mode 100644
index 0000000000..1af6af96c5
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/vlbagentdependencies_without_vLB.json
@@ -0,0 +1,39 @@
+{
+ "name": "$$HOSTNAME$$",
+ "type": "vLBAgent",
+ "cluster": "VLBAGENT_CLUSTER_NAME",
+ "node_count": "VLBAGENT_NODE_COUNT",
+ "attributes": [
+ {
+ "name": "ip-eth0",
+ "value": "$$OAM_NET_IP$$"
+ },
+ {
+ "name": "rprb_26071_oam_direct_net_1",
+ "value": "$$OAM_NET_IP$$"
+ },
+ {
+ "name": "rprb_26071_mme_int_pktmirror_net_1",
+ "value": "$$PACKET_MIRROR_NET_IP$$"
+ },
+ {
+ "name": "rprb_26071_mme_int_pktinternal_net_1",
+ "value": "$$PACKET_INTERNAL_NET_IP$$"
+ }
+ ],
+ "dependencies": [
+ {
+ "resource_name": "VPROBE_CLUSTER_NAME",
+ "resource_type": "cluster",
+ "attribute": "eth0-eth2-and-ProbeInstance",
+ "role": "vProbe_cluster",
+ "format": "all"
+ },
+ {
+ "resource_name": "MANAGER_INSTANCE_NAME",
+ "resource_type": "machine",
+ "attribute": "rprb_26071_oam_direct_net_1",
+ "role": "manager_oam_direct_ip"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/vlbdependencies.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/vlbdependencies.json
new file mode 100644
index 0000000000..b0a0da7b52
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/vlbdependencies.json
@@ -0,0 +1,43 @@
+{
+ "name": "$$HOSTNAME$$",
+ "type": "vLB",
+ "cluster": "VLB_CLUSTER_NAME",
+ "node_count": "VLB_NODE_COUNT",
+ "attributes": [
+ {
+ "name": "ip-eth0",
+ "value": "$$OAM_NET_IP$$"
+ },
+ {
+ "name": "rprb_26071_oam_direct_net_1",
+ "value": "$$OAM_NET_IP$$"
+ },
+ {
+ "name": "rprb_26071_mme_int_pktmirror_net_1",
+ "value": "$$PACKET_MIRROR_NET_IP$$"
+ },
+ {
+ "name": "rprb_26071_mme_int_pktinternal_net_1",
+ "value": "$$PACKET_INTERNAL_NET_IP$$"
+ },
+ {
+ "name": "eth1-eth2-and-vLBInstance",
+ "value": "$$OAM_NET_IP$$@$$PACKET_INTERNAL_NET_IP$$@VLB_INSTANCE"
+ }
+ ],
+ "dependencies": [
+ {
+ "resource_name": "VPROBE_CLUSTER_NAME",
+ "resource_type": "cluster",
+ "attribute": "eth0-eth2-and-ProbeInstance",
+ "role": "vProbe_cluster",
+ "format": "all"
+ },
+ {
+ "resource_name": "MANAGER_INSTANCE_NAME",
+ "resource_type": "machine",
+ "attribute": "rprb_26071_oam_direct_net_1",
+ "role": "manager_oam_direct_ip"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/vprobedependencies.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/vprobedependencies.json
new file mode 100644
index 0000000000..78768cf545
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/vprobedependencies.json
@@ -0,0 +1,49 @@
+{
+ "name": "$$HOSTNAME$$",
+ "type": "vprobe",
+ "cluster": "VPROBE_CLUSTER_NAME",
+ "node_count": "VPROBE_NODE_COUNT",
+ "attributes": [
+ {
+ "name": "ip-eth0",
+ "value": "$$OAM_NET_IP$$"
+ },
+ {
+ "name": "rprb_26071_oam_direct_net_1",
+ "value": "$$OAM_NET_IP$$"
+ },
+ {
+ "name": "rprb_26071_cdr_direct_net_1",
+ "value": "$$CDR_NET_IP$$"
+ },
+ {
+ "name": "rprb_26071_mme_int_pktinternal_net_1",
+ "value": "$$PACKET_INTERNAL_NET_IP$$"
+ },
+ {
+ "name": "eth0-eth2-and-ProbeInstance",
+ "value": "$$OAM_NET_IP$$@$$PACKET_INTERNAL_NET_IP$$@PROBE_INSTANCE"
+ }
+ ],
+ "dependencies": [
+ {
+ "resource_name": "QROUTER_CLUSTER_NAME",
+ "resource_type": "cluster",
+ "attribute": "rprb_26071_cdr_direct_net_1",
+ "role": "qrouter_cluster",
+ "format": "all"
+ },
+ {
+ "resource_name": "QTRACE_HOST_NAME",
+ "resource_type": "machine",
+ "attribute": "rprb_26071_oam_direct_net_1",
+ "role": "qtrace_public_ip"
+ },
+ {
+ "resource_name": "MANAGER_INSTANCE_NAME",
+ "resource_type": "machine",
+ "attribute": "rprb_26071_oam_direct_net_1",
+ "role": "manager_oam_direct_ip"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/wait_for_resources.py b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/wait_for_resources.py
new file mode 100644
index 0000000000..5d960d659e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectiongetresource/inputfiles/wait_for_resources.py
@@ -0,0 +1,84 @@
+import argparse
+import json
+import netifaces
+import os
+import sys
+import time
+
+TIME_INTERVAL = 10
+
+
+def parse_json_file(json_path):
+ with open(json_path, 'r') as json_file:
+ data = json.load(json_file)
+ return data
+
+
+def check_network_interfaces():
+ for interface in netifaces.interfaces():
+ if(sys.platform != 'win32' or netifaces.ifaddresses(interface)[-1000][0]['addr'] != '00:00:00:00:00:00:00:e0'):
+ while 2 not in netifaces.ifaddresses(interface).keys() and 23 not in netifaces.ifaddresses(interface).keys():
+ print "Still waiting for interface:", interface
+ time.sleep(TIME_INTERVAL)
+
+
+def check_connectivity():
+ if sys.platform.startswith('linux'):
+ ping_str = "ping -c 1 "
+ elif sys.platform == 'cygwin' or sys.platform == 'win32':
+ ping_str = "ping -n 1 "
+
+ while os.system(ping_str + component_ip) != 0:
+ print "No connectivity to", component_ip, "waiting", TIME_INTERVAL, "seconds"
+ time.sleep(TIME_INTERVAL)
+
+
+def check_cinder_mounts():
+ if sys.platform.startswith('linux'):
+ meta_data = parse_json_file('/meta.js')
+ elif sys.platform == 'cygwin' or sys.platform == 'win32':
+ meta_data = parse_json_file('c:\\meta.js')
+
+ cinder_count = 0
+
+ for info in meta_data:
+ if info.startswith('mount'):
+ cinder_count += 1
+
+ if sys.platform.startswith('linux'):
+ cinder_attached = os.popen('ls /dev/disk/by-id/virtio* | wc -l').read()
+ elif sys.platform == 'cygwin' or sys.platform == 'win32':
+ cinder_attached = os.popen("wmic diskdrive get DeviceID | find /i \"PHYSICALDRIVE\" | find /V \"0\" /C").read()
+
+ while (int(cinder_attached) < cinder_count) and (cinder_count != 0):
+ print "Missing a cinder mount, waiting", TIME_INTERVAL, "seconds"
+ time.sleep(TIME_INTERVAL)
+
+ if sys.platform.startswith('linux'):
+ cinder_attached = os.popen('ls /dev/disk/by-id/virtio* | wc -l').read()
+
+ elif sys.platform == 'cygwin' or sys.platform == 'win32':
+ cinder_attached = os.popen(
+ "wmic diskdrive get DeviceID | find /i \"PHYSICALDRIVE\" | find /V \"0\" /C").read()
+
+ if int(cinder_attached) == cinder_count:
+ print "All cinder are attached and ready to be formatted and mounted"
+
+
+def main():
+ check_network_interfaces()
+ check_cinder_mounts()
+
+ if component_ip is not None:
+ check_connectivity()
+
+ print "All resources are ready"
+
+
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser(description='This script is waiting for network and volume resources to come up')
+ parser.add_argument('-m', '--component_ip', metavar='component_ip', type=str, help='The component ip', required=False)
+ args = parser.parse_args()
+ component_ip = args.component_ip
+ globals().update(args.__dict__)
+ main()
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectionmulti/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectionmulti/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..72905b3b21
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectionmulti/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,340 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ security_group_id1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ security_group_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ description: cmaui_oam_ips
+ shared_network_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ jsa_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ security_group_id3:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ security_group_id2:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ node_templates:
+ cmaui_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_id
+ - get_input: security_group_id3
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: shared_network_id
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ jsa_security_group1:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules
+ properties:
+ name:
+ get_input: security_group_name
+ description: ems security group
+ rules:
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: ingress
+ requirements:
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: cmaui_port_0
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: cmaui_port_1
+ relationship: org.openecomp.relationships.AttachesTo
+ jsa_security_group2:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules
+ properties:
+ name:
+ get_input: security_group_name
+ description: ems security group
+ rules:
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: ingress
+ requirements:
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: cmaui_port_1
+ relationship: org.openecomp.relationships.AttachesTo
+ cmaui_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_id1
+ - get_input: security_group_id2
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: shared_network_id
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ cmaui_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_id1
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: shared_network_id
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ addOn:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/addOn.yml
+ description: cmaui server template for vMMSC
+ members:
+ - cmaui_port_2
+ - server_cmaui
+ - cmaui_port_1
+ - cmaui_port_0
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - jsa_security_group1
+ - jsa_security_group2 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectionmulti/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectionmulti/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..1f762d0ccc
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectionmulti/inputfiles/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ },
+ {
+ "file": "addOn.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectionmulti/inputfiles/addOn.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectionmulti/inputfiles/addOn.yml
new file mode 100644
index 0000000000..24dc9d7678
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectionmulti/inputfiles/addOn.yml
@@ -0,0 +1,72 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ security_group_id1:
+ type: string
+ description: UID of OAM network
+ security_group_id2:
+ type: string
+ description: UID of OAM network
+ security_group_id:
+ type: string
+ description: UID of OAM network
+ security_group_id3:
+ type: string
+ description: UID of OAM network
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ shared_network_id:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+ description: cmaui_oam_ips
+resources:
+
+ cmaui_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: shared_network_id }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_id1}]
+ replacement_policy: AUTO
+
+ cmaui_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: shared_network_id }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_id1},{get_param: security_group_id2}]
+ replacement_policy: AUTO
+
+ cmaui_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: shared_network_id }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_id},{get_param: security_group_id3}]
+ replacement_policy: AUTO
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_0 }
+ - port: { get_resource: cmaui_port_1 } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectionmulti/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectionmulti/inputfiles/main.yml
new file mode 100644
index 0000000000..8a6e72c1ba
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportconnectionmulti/inputfiles/main.yml
@@ -0,0 +1,58 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ jsa_net_name:
+ type: string
+ description: network name of jsa log network
+
+resources:
+ jsa_security_group1:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: ems security group
+ name: {get_param: security_group_name}
+ rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"}
+ ]
+
+ jsa_security_group2:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: ems security group
+ name: {get_param: security_group_name}
+ rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"}
+ ]
+
+outputs:
+ security_group_id1:
+ value: {get_resource: jsa_security_group1}
+ security_group_id2:
+ value: {get_resource: jsa_security_group2} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportnestedconnection/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportnestedconnection/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..21e8ec8cdb
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportnestedconnection/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,222 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ jsa_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ node_templates:
+ jsa_security_group1:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules
+ properties:
+ name:
+ get_input: security_group_name
+ description: ems security group
+ rules:
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: ingress
+ requirements:
+ - port:
+ capability: attachment_cmaui_port_0
+ node: test_nested
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: attachment_cmaui_port_1
+ node: test_nested
+ relationship: org.openecomp.relationships.AttachesTo
+ jsa_security_group2:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules
+ properties:
+ name:
+ get_input: security_group_name
+ description: ems security group
+ rules:
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: ingress
+ requirements:
+ - port:
+ capability: attachment_cmaui_port_0
+ node: test_nested
+ relationship: org.openecomp.relationships.AttachesTo
+ test_nested:
+ type: org.openecomp.resource.abstract.nodes.heat.nested
+ directives:
+ - substitutable
+ properties:
+ p1: jsa_security_group1
+ service_template_filter:
+ substitute_service_template: nestedServiceTemplate.yaml
+ p2: jsa_security_group2
+ groups:
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - jsa_security_group1
+ - jsa_security_group2
+ - test_nested \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportnestedconnection/expectedoutputfiles/nestedServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportnestedconnection/expectedoutputfiles/nestedServiceTemplate.yaml
new file mode 100644
index 0000000000..c41ad87568
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportnestedconnection/expectedoutputfiles/nestedServiceTemplate.yaml
@@ -0,0 +1,175 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ p2:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ description: cmaui_oam_ips
+ net:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ node_templates:
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ cmaui_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: p1
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: net
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ cmaui_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: p1
+ - get_input: p2
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: net
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested.yml
+ description: cmaui server template for vMMSC
+ members:
+ - server_cmaui
+ - cmaui_port_1
+ - cmaui_port_0
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested
+ capabilities:
+ host_server_cmaui:
+ - server_cmaui
+ - host
+ os_server_cmaui:
+ - server_cmaui
+ - os
+ endpoint_server_cmaui:
+ - server_cmaui
+ - endpoint
+ binding_server_cmaui:
+ - server_cmaui
+ - binding
+ scalable_server_cmaui:
+ - server_cmaui
+ - scalable
+ attachment_cmaui_port_0:
+ - cmaui_port_0
+ - attachment
+ attachment_cmaui_port_1:
+ - cmaui_port_1
+ - attachment
+ requirements:
+ local_storage_server_cmaui:
+ - server_cmaui
+ - local_storage
+ link_cmaui_port_0:
+ - cmaui_port_0
+ - link
+ link_cmaui_port_1:
+ - cmaui_port_1
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportnestedconnection/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportnestedconnection/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..aca75b5055
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportnestedconnection/inputfiles/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ },
+ {
+ "file": "nested.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportnestedconnection/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportnestedconnection/inputfiles/main.yml
new file mode 100644
index 0000000000..bcd542b66d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportnestedconnection/inputfiles/main.yml
@@ -0,0 +1,58 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ jsa_net_name:
+ type: string
+ description: network name of jsa log network
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+
+resources:
+ jsa_security_group1:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: ems security group
+ name: {get_param: security_group_name}
+ rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"}
+ ]
+
+ jsa_security_group2:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: ems security group
+ name: {get_param: security_group_name}
+ rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"}
+ ]
+
+ test_nested:
+ type: nested.yml
+ properties:
+ p1: { get_resource: jsa_security_group1}
+ p2: { get_resource: jsa_security_group2}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportnestedconnection/inputfiles/nested.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportnestedconnection/inputfiles/nested.yml
new file mode 100644
index 0000000000..7708565ef1
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportnestedconnection/inputfiles/nested.yml
@@ -0,0 +1,58 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ p1:
+ type: string
+ description: UID of OAM network
+ p2:
+ type: string
+ description: UID of OAM network
+ net:
+ type: string
+ description: UID of OAM network
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+ description: cmaui_oam_ips
+resources:
+
+ cmaui_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: net }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: p1},{get_param: p2}]
+ replacement_policy: AUTO
+
+ cmaui_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: net }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: p1}]
+ replacement_policy: AUTO
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_0 }
+ - port: { get_resource: cmaui_port_1 } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..dc4eb45cda
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,241 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ shared_security_group_id2:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ jsa_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ shared_security_group_id1:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ node_templates:
+ jsa_security_group1:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules
+ properties:
+ name:
+ get_input: security_group_name
+ description: ems security group
+ rules:
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: ingress
+ requirements:
+ - port:
+ capability: attachment_cmaui_port_2
+ node: test_nested
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: attachment_cmaui_port_1
+ node: test_nested
+ relationship: org.openecomp.relationships.AttachesTo
+ jsa_security_group2:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules
+ properties:
+ name:
+ get_input: security_group_name
+ description: ems security group
+ rules:
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: ingress
+ requirements:
+ - port:
+ capability: attachment_cmaui_port_1
+ node: test_nested
+ relationship: org.openecomp.relationships.AttachesTo
+ test_nested:
+ type: org.openecomp.resource.abstract.nodes.heat.nested
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nestedServiceTemplate.yaml
+ p2:
+ get_input: shared_security_group_id2
+ shared_security_group_id1:
+ get_input: shared_security_group_id1
+ groups:
+ addOn:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/addOn.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - test_nested
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - jsa_security_group1
+ - jsa_security_group2 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/expectedoutputfiles/nestedServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/expectedoutputfiles/nestedServiceTemplate.yaml
new file mode 100644
index 0000000000..491e691e80
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/expectedoutputfiles/nestedServiceTemplate.yaml
@@ -0,0 +1,175 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p2:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ description: cmaui_port_1
+ net:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ shared_security_group_id1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ node_templates:
+ cmaui_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: shared_security_group_id1
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: net
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ cmaui_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: shared_security_group_id1
+ - get_input: p2
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: net
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested.yml
+ description: cmaui server template for vMMSC
+ members:
+ - cmaui_port_2
+ - server_cmaui
+ - cmaui_port_1
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested
+ capabilities:
+ host_server_cmaui:
+ - server_cmaui
+ - host
+ os_server_cmaui:
+ - server_cmaui
+ - os
+ endpoint_server_cmaui:
+ - server_cmaui
+ - endpoint
+ binding_server_cmaui:
+ - server_cmaui
+ - binding
+ attachment_cmaui_port_2:
+ - cmaui_port_2
+ - attachment
+ scalable_server_cmaui:
+ - server_cmaui
+ - scalable
+ attachment_cmaui_port_1:
+ - cmaui_port_1
+ - attachment
+ requirements:
+ local_storage_server_cmaui:
+ - server_cmaui
+ - local_storage
+ link_cmaui_port_2:
+ - cmaui_port_2
+ - link
+ link_cmaui_port_1:
+ - cmaui_port_1
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..8ba5fc48f4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/inputfiles/MANIFEST.json
@@ -0,0 +1,22 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ },
+ {
+ "file": "nested.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ },
+ {
+ "file": "addOn.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/inputfiles/addOn.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/inputfiles/addOn.yml
new file mode 100644
index 0000000000..0e7619a478
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/inputfiles/addOn.yml
@@ -0,0 +1,26 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ shared_security_group_id1:
+ type: string
+ description: network name of jsa log network
+ shared_security_group_id2:
+ type: string
+ description: network name of jsa log network
+ jsa_net_name:
+ type: string
+ description: network name of jsa log network
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+
+resources:
+ test_nested:
+ type: nested.yml
+ properties:
+ shared_security_group_id1: { get_param: shared_security_group_id1}
+ p2: { get_param: shared_security_group_id2}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/inputfiles/main.yml
new file mode 100644
index 0000000000..9167ffbafd
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/inputfiles/main.yml
@@ -0,0 +1,58 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ jsa_net_name:
+ type: string
+ description: network name of jsa log network
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+
+resources:
+ jsa_security_group1:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: ems security group
+ name: {get_param: security_group_name}
+ rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"}
+ ]
+
+ jsa_security_group2:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: ems security group
+ name: {get_param: security_group_name}
+ rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"}
+ ]
+outputs:
+ shared_security_group_id1:
+ value: {get_resource: jsa_security_group1}
+
+ shared_security_group_id2:
+ value: {get_resource: jsa_security_group2}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/inputfiles/nested.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/inputfiles/nested.yml
new file mode 100644
index 0000000000..a5a74e9d2e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/inputfiles/nested.yml
@@ -0,0 +1,59 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ shared_security_group_id1:
+ type: string
+ description: UID of OAM network
+ p2:
+ type: string
+ description: UID of OAM network
+ net:
+ type: string
+ description: UID of OAM network
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+ description: cmaui_port_1
+
+resources:
+
+ cmaui_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: net }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: shared_security_group_id1}, {get_param: p2}]
+ replacement_policy: AUTO
+
+ cmaui_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: net }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: shared_security_group_id1}]
+ replacement_policy: AUTO
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_1 }
+ - port: { get_resource: cmaui_port_2 } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnectionmulti/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnectionmulti/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..1696e6ea39
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnectionmulti/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,332 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui_image:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ security_group_id1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: String
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ security_group_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ description: cmaui_oam_ips
+ shared_network_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ jsa_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ security_group_id3:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ security_group_id2:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ node_templates:
+ cmaui_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_id
+ - get_input: security_group_id3
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: shared_network_id
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui_image
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ jsa_security_group1:
+ type: org.openecomp.resource.nodes.heat.network.neutron.SecurityRules
+ properties:
+ name:
+ get_input: security_group_name
+ description: ems security group
+ rules:
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: ingress
+ requirements:
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: cmaui_port_0
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: cmaui_port_1
+ relationship: org.openecomp.relationships.AttachesTo
+ jsa_security_group2:
+ type: org.openecomp.resource.nodes.heat.network.neutron.SecurityRules
+ properties:
+ name:
+ get_input: security_group_name
+ description: ems security group
+ rules:
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: ingress
+ requirements:
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: cmaui_port_1
+ relationship: org.openecomp.relationships.AttachesTo
+ cmaui_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_id1
+ - get_input: security_group_id2
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: shared_network_id
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ cmaui_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_id1
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: shared_network_id
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ addOn:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/addOn.yml
+ description: cmaui server template for vMMSC
+ members:
+ - cmaui_port_2
+ - server_cmaui
+ - cmaui_port_1
+ - cmaui_port_0
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - jsa_security_group1
+ - jsa_security_group2 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportlinking/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportlinking/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..5ed12af4ae
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportlinking/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,231 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+topology_template:
+ inputs:
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ shared_security_group_id2:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ jsa_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ shared_security_group_id1:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ node_templates:
+ jsa_security_group1:
+ type: org.openecomp.resource.nodes.heat.network.neutron.SecurityRules
+ properties:
+ name:
+ get_input: security_group_name
+ description: ems security group
+ rules:
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: ingress
+ requirements:
+ - port:
+ capability: attachment_cmaui_port_2
+ node: test_nested
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: attachment_cmaui_port_1
+ node: test_nested
+ relationship: org.openecomp.relationships.AttachesTo
+ jsa_security_group2:
+ type: org.openecomp.resource.nodes.heat.network.neutron.SecurityRules
+ properties:
+ name:
+ get_input: security_group_name
+ description: ems security group
+ rules:
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: ingress
+ requirements:
+ - port:
+ capability: attachment_cmaui_port_1
+ node: test_nested
+ relationship: org.openecomp.relationships.AttachesTo
+ test_nested:
+ type: org.openecomp.resource.abstract.nodes.heat.nested
+ directives:
+ - substitutable
+ properties:
+ service_template_filter:
+ substitute_service_template: nestedServiceTemplate.yaml
+ p2:
+ get_input: shared_security_group_id2
+ shared_security_group_id1:
+ get_input: shared_security_group_id1
+ groups:
+ addOn:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/addOn.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - test_nested
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - jsa_security_group1
+ - jsa_security_group2 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportlinking/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportlinking/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..8ba5fc48f4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportlinking/inputfiles/MANIFEST.json
@@ -0,0 +1,22 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ },
+ {
+ "file": "nested.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ },
+ {
+ "file": "addOn.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..267fa61cd4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,119 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.nested:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ cmaui_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ type: string
+ description: UID of OAM network
+ p2:
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ availability_zone_0:
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ type: string
+ net:
+ type: string
+ description: UID of OAM network
+ requirements:
+ - link_cmaui_port_2:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ - local_storage_server_cmaui:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_cmaui_port_1:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ host_server_cmaui:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_2:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_1:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..9466ebff85
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,243 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ shared_security_group_id2:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ jsa_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ shared_security_group_id1:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ node_templates:
+ mvs_modules:
+ type: org.openecomp.resource.abstract.nodes.heat.nested
+ directives:
+ - substitutable
+ properties:
+ p1:
+ get_input: shared_security_group_id1
+ service_template_filter:
+ substitute_service_template: nestedServiceTemplate.yaml
+ count: 3
+ mandatory: true
+ p2:
+ get_input: shared_security_group_id2
+ jsa_security_group1:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules
+ properties:
+ name:
+ get_input: security_group_name
+ description: ems security group
+ rules:
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: ingress
+ requirements:
+ - port:
+ capability: attachment_cmaui_port_2
+ node: mvs_modules
+ relationship: org.openecomp.relationships.AttachesTo
+ - port:
+ capability: attachment_cmaui_port_1
+ node: mvs_modules
+ relationship: org.openecomp.relationships.AttachesTo
+ jsa_security_group2:
+ type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules
+ properties:
+ name:
+ get_input: security_group_name
+ description: ems security group
+ rules:
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: egress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: egress
+ - protocol: tcp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv4
+ port_range_max: 65535
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ direction: ingress
+ - protocol: tcp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: udp
+ ethertype: IPv6
+ port_range_max: 65535
+ remote_ip_prefix: ::/0
+ direction: ingress
+ port_range_min: 1
+ - protocol: icmp
+ ethertype: IPv6
+ remote_ip_prefix: ::/0
+ direction: ingress
+ requirements:
+ - port:
+ capability: attachment_cmaui_port_1
+ node: mvs_modules
+ relationship: org.openecomp.relationships.AttachesTo
+ groups:
+ addOn:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/addOn.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - mvs_modules
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - jsa_security_group1
+ - jsa_security_group2 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/expectedoutputfiles/nestedServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/expectedoutputfiles/nestedServiceTemplate.yaml
new file mode 100644
index 0000000000..729e969c0c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/expectedoutputfiles/nestedServiceTemplate.yaml
@@ -0,0 +1,174 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ p1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ p2:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ hidden: false
+ immutable: false
+ type: string
+ net:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ node_templates:
+ cmaui_port_2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: p1
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: net
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ cmaui_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: p1
+ - get_input: p2
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: net
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested.yml
+ description: cmaui server template for vMMSC
+ members:
+ - cmaui_port_2
+ - server_cmaui
+ - cmaui_port_1
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested
+ capabilities:
+ host_server_cmaui:
+ - server_cmaui
+ - host
+ os_server_cmaui:
+ - server_cmaui
+ - os
+ endpoint_server_cmaui:
+ - server_cmaui
+ - endpoint
+ binding_server_cmaui:
+ - server_cmaui
+ - binding
+ attachment_cmaui_port_2:
+ - cmaui_port_2
+ - attachment
+ scalable_server_cmaui:
+ - server_cmaui
+ - scalable
+ attachment_cmaui_port_1:
+ - cmaui_port_1
+ - attachment
+ requirements:
+ local_storage_server_cmaui:
+ - server_cmaui
+ - local_storage
+ link_cmaui_port_2:
+ - cmaui_port_2
+ - link
+ link_cmaui_port_1:
+ - cmaui_port_1
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..8ba5fc48f4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/inputfiles/MANIFEST.json
@@ -0,0 +1,22 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "true"
+ },
+ {
+ "file": "nested.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ },
+ {
+ "file": "addOn.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/inputfiles/addOn.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/inputfiles/addOn.yml
new file mode 100644
index 0000000000..39c34742a4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/inputfiles/addOn.yml
@@ -0,0 +1,31 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ shared_security_group_id1:
+ type: string
+ description: network name of jsa log network
+ shared_security_group_id2:
+ type: string
+ description: network name of jsa log network
+ jsa_net_name:
+ type: string
+ description: network name of jsa log network
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+
+resources:
+ mvs_modules:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: 3
+ index_var: "%index%"
+ resource_def:
+ type: nested.yml
+ properties:
+ p1: { get_param: shared_security_group_id1}
+ p2: { get_param: shared_security_group_id2}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/inputfiles/main.yml
new file mode 100644
index 0000000000..9167ffbafd
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/inputfiles/main.yml
@@ -0,0 +1,58 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ jsa_net_name:
+ type: string
+ description: network name of jsa log network
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+
+resources:
+ jsa_security_group1:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: ems security group
+ name: {get_param: security_group_name}
+ rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"}
+ ]
+
+ jsa_security_group2:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: ems security group
+ name: {get_param: security_group_name}
+ rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": egress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"},
+ {"direction": ingress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"}
+ ]
+outputs:
+ shared_security_group_id1:
+ value: {get_resource: jsa_security_group1}
+
+ shared_security_group_id2:
+ value: {get_resource: jsa_security_group2}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/inputfiles/nested.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/inputfiles/nested.yml
new file mode 100644
index 0000000000..597ca0219c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/inputfiles/nested.yml
@@ -0,0 +1,58 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ p1:
+ type: string
+ description: UID of OAM network
+ p2:
+ type: string
+ description: UID of OAM network
+ net:
+ type: string
+ description: UID of OAM network
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_oam_ips:
+ type: string
+
+resources:
+
+ cmaui_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: net }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: p1}, {get_param: p2}]
+ replacement_policy: AUTO
+
+ cmaui_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: net }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: p1}]
+ replacement_policy: AUTO
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_1 }
+ - port: { get_resource: cmaui_port_2 } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vmme_small/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vmme_small/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..9885c31b1c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vmme_small/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,1267 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.NCB1:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.GPB2:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.NCB2:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.GPB1:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.FSB2:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.VLC1:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.FSB1:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ org.openecomp.resource.vfc.nodes.heat.VLC2:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ Internal2_name:
+ hidden: false
+ immutable: false
+ type: string
+ default: Internal2-subnet
+ vlc2-Internal2-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to vlc2-Internal2
+ default: 00:81:37:0E:02:12
+ epc-sctp-a-net-rt:
+ hidden: false
+ immutable: false
+ type: string
+ description: epc-sctp-a route target
+ default: 13979:105717
+ epc-sctp-b-net-rt:
+ hidden: false
+ immutable: false
+ type: string
+ description: epc-sctp-b route target
+ default: 13979:105719
+ gpb-flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor to use for servers gpb
+ default: m4.xlarge4
+ Internal1_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ default: 169.253.0.0/17
+ epc-sctp-a-pool-start:
+ hidden: false
+ immutable: false
+ type: string
+ description: epc-sctp-a-net network ip pool start IP address
+ default: 107.243.37.3
+ Internal2_subnet_name:
+ hidden: false
+ immutable: false
+ type: string
+ default: vmme_int_int_sub_2
+ Internal1_subnet_name:
+ hidden: false
+ immutable: false
+ type: string
+ default: vmme_int_int_sub_1
+ gpb1-Internal1-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to gpb1-Internal1
+ default: 00:80:37:0E:01:22
+ gpb1-Internal1-ip:
+ hidden: false
+ immutable: false
+ type: string
+ default: 169.254.0.101
+ FSB_1_image:
+ label: MME_FSB1
+ hidden: false
+ immutable: false
+ type: string
+ description: MME_FSB1_15B-CP04-r5a01
+ default: MME_FSB1_15B-CP04-r5a01
+ fsb1-Internal2-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to fsb1-Internal2
+ default: 00:81:37:0E:0B:12
+ ncb_zone:
+ hidden: false
+ immutable: false
+ type: string
+ description: cluster for spawnning ncb instances
+ default: nova
+ Internal2_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ default: vmme_int_int_2
+ epc-sctp-a-pool-end:
+ hidden: false
+ immutable: false
+ type: string
+ description: epc-sctp-a-net network ip pool end IP address
+ default: 107.243.37.30
+ Internal1_name:
+ hidden: false
+ immutable: false
+ type: string
+ default: Internal1-subnet
+ gpb2-name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of gpb2
+ default: ZRDM1MMEX33GPB002
+ fsb2-Internal1-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to fsb2-Internal1
+ default: 00:80:37:0E:0D:12
+ fsb2-name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of fsb1
+ default: ZRDM1MMEX33FSB002
+ static_prefix_sctp_b_1:
+ hidden: false
+ immutable: false
+ type: string
+ description: Static Prefix
+ default: 107.239.40.64/30
+ fsb2-oam-ip:
+ hidden: false
+ immutable: false
+ type: string
+ default: 107.250.172.222
+ fsb2-flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor to use for servers fsb2
+ default: m4.xlarge4
+ fsb2-Internal2-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to fsb2-Internal2
+ default: 00:81:37:0E:0D:12
+ ncb2-Internal1-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to ncb2-Internal1
+ default: 00:80:37:0E:0F:12
+ ncb2-name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of ncb2
+ default: ZRDM1MMEX33NCB002
+ epc-sctp-b-pool-end:
+ hidden: false
+ immutable: false
+ type: string
+ description: epc-sctp-b-net network ip pool end IP address
+ default: 107.243.37.62
+ vlc1-gtp-ip:
+ hidden: false
+ immutable: false
+ type: string
+ default: 107.243.37.67
+ epc-sctp-b-pool-start:
+ hidden: false
+ immutable: false
+ type: string
+ description: epc-sctp-b-net network ip pool start IP address
+ default: 107.243.37.35
+ Internal2_shared:
+ hidden: false
+ immutable: false
+ type: string
+ default: 'False'
+ Internal1_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ default: vmme_int_int_1
+ vlc2-name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of vlc2
+ default: ZRDM1MMEX33VLC002
+ Internal2_ipam_name:
+ hidden: false
+ immutable: false
+ type: string
+ default: vmme_ipam_int2
+ vlc1-sctp-b-ip:
+ hidden: false
+ immutable: false
+ type: string
+ default: 107.243.37.35
+ Internal1_net_pool_end:
+ hidden: false
+ immutable: false
+ type: string
+ default: 169.253.0.254
+ Internal1_default_gateway:
+ hidden: false
+ immutable: false
+ type: string
+ default: 169.253.0.3
+ ncb1-Internal1-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to ncb1-Internal1
+ default: 00:80:37:0E:09:12
+ epc-gtp-net-name:
+ hidden: false
+ immutable: false
+ type: string
+ description: gtp net name
+ default: EPC-GTP
+ vlc1-Internal1-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to vlc1-Internal1
+ default: 00:80:37:0E:01:12
+ gpb2-Internal1-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to gpb2-Internal1
+ default: 00:80:37:0E:02:22
+ epc-gtp-net-cidr:
+ hidden: false
+ immutable: false
+ type: string
+ description: gtp stubnet
+ default: 107.243.37.64/27
+ oam_net_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: uuid of oam network
+ default: 47bf4cca-0961-422f-bcd6-d5a4fbb1a351
+ vlc_zone:
+ hidden: false
+ immutable: false
+ type: string
+ description: cluster for spawnning vlc instances
+ default: nova
+ vlc2-Internal1-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to vlc2-Internal1
+ default: 00:80:37:0E:02:12
+ epc-sctp-a-net-cidr:
+ hidden: false
+ immutable: false
+ type: string
+ description: epc-sctp-a subnet
+ default: 107.243.37.0/27
+ Internal1_forwarding_mode:
+ hidden: false
+ immutable: false
+ type: string
+ default: l2
+ Internal2_dhcp:
+ hidden: false
+ immutable: false
+ type: boolean
+ default: false
+ fsb1-oam-ip:
+ hidden: false
+ immutable: false
+ type: string
+ default: 107.250.172.221
+ FSB_2_image:
+ label: MME_FSB2
+ hidden: false
+ immutable: false
+ type: string
+ description: MME_FSB2_15B-CP04-r5a01
+ default: MME_FSB2_15B-CP04-r5a01
+ vlc1-oam-ip:
+ hidden: false
+ immutable: false
+ type: string
+ default: 107.250.172.227
+ epc-sctp-a-net-name:
+ hidden: false
+ immutable: false
+ type: string
+ description: epc-sctp-a net name
+ default: EPC-SCTP-A
+ vlc2-oam-ip:
+ hidden: false
+ immutable: false
+ type: string
+ default: 107.250.172.228
+ Internal2_net_pool_start:
+ hidden: false
+ immutable: false
+ type: string
+ default: 169.255.0.100
+ FSB1_volume_name:
+ label: FSB1_volume
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB1_volume_1
+ default: vFSB1_1_Vol_1
+ vlc1-sctp-a-ip:
+ hidden: false
+ immutable: false
+ type: string
+ default: 107.243.37.3
+ Internal1_ipam_name:
+ hidden: false
+ immutable: false
+ type: string
+ default: vmme_ipam_int1
+ Internal1_dhcp:
+ hidden: false
+ immutable: false
+ type: boolean
+ default: false
+ Internal2_external:
+ hidden: false
+ immutable: false
+ type: string
+ default: 'False'
+ Internal2_forwarding_mode:
+ hidden: false
+ immutable: false
+ type: string
+ default: l2
+ vlc1-name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of vlc1
+ default: ZRDM1MMEX33VLC002
+ vlc-flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor to use for servers vlc
+ default: m4.xlarge4
+ epc-gtp-net-rt:
+ hidden: false
+ immutable: false
+ type: string
+ description: gtp route target
+ default: 13979:105715
+ gpb_zone:
+ hidden: false
+ immutable: false
+ type: string
+ description: cluster for spawnning gpb instances
+ default: nova
+ gpb1-Internal2-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to gpb1-Internal2
+ default: 00:81:37:0E:01:22
+ fsb1-Internal1-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to fsb1-Internal1
+ default: 00:80:37:0E:0B:12
+ FSB2_volume_name:
+ label: FSB2_volume
+ hidden: false
+ immutable: false
+ type: string
+ description: FSB2_volume_1
+ default: vFSB2_1_Vol_1
+ VMME_FSB2_boot_volume:
+ hidden: false
+ immutable: false
+ type: string
+ default: 089a0d11-4b15-4370-8343-3f90907b1221
+ fsb_zone:
+ hidden: false
+ immutable: false
+ type: string
+ description: cluster for spawnning fsb instances
+ default: nova
+ VMME_FSB1_boot_volume:
+ hidden: false
+ immutable: false
+ type: string
+ default: 8248e794-6173-4b49-b9c3-8219b0b56f4e
+ Internal2_default_gateway:
+ hidden: false
+ immutable: false
+ type: string
+ default: 169.255.0.3
+ Internal1_external:
+ hidden: false
+ immutable: false
+ type: string
+ default: 'False'
+ vlc2-sctp-a-ip:
+ hidden: false
+ immutable: false
+ type: string
+ default: 107.243.37.4
+ ncb-flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor to use for servers ncb
+ default: m4.xlarge4
+ Internal1_shared:
+ hidden: false
+ immutable: false
+ type: string
+ default: 'False'
+ fsb1-name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of fsb1
+ default: ZRDM1MMEX33FSB001
+ static_prefix_gtp_1:
+ hidden: false
+ immutable: false
+ type: string
+ description: Static Prefix
+ default: 107.239.40.96/30
+ epc-sctp-b-net-gateway:
+ hidden: false
+ immutable: false
+ type: string
+ description: epc-sctp-b-net network gateway
+ default: 107.243.37.33
+ epc-sctp-b-net-cidr:
+ hidden: false
+ immutable: false
+ type: string
+ description: epc-sctp-b subnet
+ default: 107.243.37.32/24
+ epc-gtp-pool-end:
+ hidden: false
+ immutable: false
+ type: string
+ description: gtp network ip pool end IP address
+ default: 107.243.37.94
+ epc-sctp-a-net-gateway:
+ hidden: false
+ immutable: false
+ type: string
+ description: epc-sctp-a-net network gateway
+ default: 107.243.37.1
+ vlc2-gtp-ip:
+ hidden: false
+ immutable: false
+ type: string
+ default: 107.243.37.68
+ vlc2-sctp-b-ip:
+ hidden: false
+ immutable: false
+ type: string
+ default: 107.243.37.36
+ Internal1_net_pool_start:
+ hidden: false
+ immutable: false
+ type: string
+ default: 169.253.0.100
+ volume_size:
+ label: volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: my volume size 320GB
+ default: 320
+ fsb2-image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of image to use for server fsb2
+ default: MME_FSB2_15B-CP04-r5a01
+ ncb2-Internal2-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to ncb2-Internal2
+ default: 00:81:37:0E:0F:12
+ ncb1-name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of ncb1
+ default: ZRDM1MMEX33NCB001
+ fsb1-image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of image to use for server fsb1
+ default: MME_FSB1_15B-CP04-r5a01
+ fsb1-flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor to use for servers fsb1
+ default: m4.xlarge4
+ volume_type:
+ label: volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: volume type Gold
+ default: Gold
+ Internal2_net_pool_end:
+ hidden: false
+ immutable: false
+ type: string
+ default: 169.255.0.254
+ epc-sctp-b-net-name:
+ hidden: false
+ immutable: false
+ type: string
+ description: epc-sctp-b net name
+ default: EPC-SCTP-B
+ Internal2_cidr:
+ hidden: false
+ immutable: false
+ type: string
+ default: 169.255.0.0/17
+ epc-gtp-net-gateway:
+ hidden: false
+ immutable: false
+ type: string
+ description: gtp network gateway
+ default: 107.243.37.65
+ gpb2-Internal2-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to gpb2-Internal2
+ default: 00:81:37:0E:02:22
+ ncb1-Internal2-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to ncb1-Internal2
+ default: 00:81:37:0E:09:12
+ epc-gtp-pool-start:
+ hidden: false
+ immutable: false
+ type: string
+ description: gtp network ip pool start IP address
+ default: 107.243.37.67
+ static_prefix_sctp_a_1:
+ hidden: false
+ immutable: false
+ type: string
+ description: Static Prefix
+ default: 107.239.40.32/30
+ gpb1-name:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of gpb1
+ default: ZRDM1MMEX33GPB001
+ pxe-image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Name of image to use for server ncb
+ default: MME_PXE-BOOT_cxp9025898_2r5a01.qcow2
+ vlc1-Internal2-mac:
+ hidden: false
+ immutable: false
+ type: string
+ description: static mac address assigned to vlc1-Internal2
+ default: 00:81:37:0E:01:12
+ node_templates:
+ NCB1:
+ type: org.openecomp.resource.vfc.nodes.heat.NCB1
+ properties:
+ flavor:
+ get_input: ncb-flavor
+ availability_zone:
+ get_input: ncb_zone
+ image:
+ get_input: pxe-image
+ name:
+ get_input: ncb1-name
+ NCB2:
+ type: org.openecomp.resource.vfc.nodes.heat.NCB2
+ properties:
+ flavor:
+ get_input: ncb-flavor
+ availability_zone:
+ get_input: ncb_zone
+ image:
+ get_input: pxe-image
+ name:
+ get_input: ncb2-name
+ VLC2_OAM:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ fixed_ips:
+ - ip_address:
+ get_input: vlc2-oam-ip
+ network:
+ get_input: oam_net_id
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: VLC2
+ relationship: tosca.relationships.network.BindsTo
+ epc-gtp-net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ route_targets:
+ - get_input: epc-gtp-net-rt
+ network_name:
+ get_input: epc-gtp-net-name
+ subnets:
+ epc-gtp-subnet:
+ cidr:
+ get_input: epc-gtp-net-cidr
+ gateway_ip:
+ get_input: epc-gtp-net-gateway
+ allocation_pools:
+ - start:
+ get_input: epc-gtp-pool-start
+ end:
+ get_input: epc-gtp-pool-end
+ NCB1_Internal1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: ncb1-Internal1-mac
+ network: Internal1-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal1-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: NCB1
+ relationship: tosca.relationships.network.BindsTo
+ VLC2_Internal2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: vlc2-Internal2-mac
+ network: Internal2-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal2-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: VLC2
+ relationship: tosca.relationships.network.BindsTo
+ NCB1_Internal2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: ncb1-Internal2-mac
+ network: Internal2-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal2-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: NCB1
+ relationship: tosca.relationships.network.BindsTo
+ VLC2_Internal1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: vlc2-Internal1-mac
+ network: Internal1-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal1-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: VLC2
+ relationship: tosca.relationships.network.BindsTo
+ VLC2_GTP:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ fixed_ips:
+ - ip_address:
+ get_input: vlc2-gtp-ip
+ network: epc-gtp-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: epc-gtp-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: VLC2
+ relationship: tosca.relationships.network.BindsTo
+ FSB1_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ image:
+ get_input: FSB_1_image
+ volume_type:
+ get_input: volume_type
+ size: '(get_input : volume_size) * 1024'
+ name:
+ get_input: FSB1_volume_name
+ FSB1_OAM:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ fixed_ips:
+ - ip_address:
+ get_input: fsb1-oam-ip
+ network:
+ get_input: oam_net_id
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: FSB1
+ relationship: tosca.relationships.network.BindsTo
+ FSB2_volume:
+ type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
+ properties:
+ image:
+ get_input: FSB_2_image
+ volume_type:
+ get_input: volume_type
+ size: '(get_input : volume_size) * 1024'
+ name:
+ get_input: FSB2_volume_name
+ Internal1-net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ dhcp_enabled:
+ get_input: Internal1_dhcp
+ shared:
+ get_input: Internal1_shared
+ forwarding_mode:
+ get_input: Internal1_forwarding_mode
+ external:
+ get_input: Internal1_external
+ network_name:
+ get_input: Internal1_net_name
+ subnets:
+ Internal1-subnet:
+ enable_dhcp:
+ get_input: Internal1_dhcp
+ cidr:
+ get_input: Internal1_cidr
+ gateway_ip:
+ get_input: Internal1_default_gateway
+ GPB2_Internal1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: gpb2-Internal1-mac
+ network: Internal1-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal1-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: GPB2
+ relationship: tosca.relationships.network.BindsTo
+ GPB2_Internal2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: gpb2-Internal2-mac
+ network: Internal2-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal2-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: GPB2
+ relationship: tosca.relationships.network.BindsTo
+ NCB2_Internal2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: ncb2-Internal2-mac
+ network: Internal2-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal2-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: NCB2
+ relationship: tosca.relationships.network.BindsTo
+ NCB2_Internal1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: ncb2-Internal1-mac
+ network: Internal1-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal1-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: NCB2
+ relationship: tosca.relationships.network.BindsTo
+ FSB2:
+ type: org.openecomp.resource.vfc.nodes.heat.FSB2
+ properties:
+ flavor:
+ get_input: fsb2-flavor
+ availability_zone:
+ get_input: fsb_zone
+ name:
+ get_input: fsb2-name
+ FSB1:
+ type: org.openecomp.resource.vfc.nodes.heat.FSB1
+ properties:
+ flavor:
+ get_input: fsb1-flavor
+ availability_zone:
+ get_input: fsb_zone
+ name:
+ get_input: fsb1-name
+ Internal2-net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ dhcp_enabled:
+ get_input: Internal2_dhcp
+ shared:
+ get_input: Internal2_shared
+ forwarding_mode:
+ get_input: Internal2_forwarding_mode
+ external:
+ get_input: Internal2_external
+ network_name:
+ get_input: Internal2_name
+ subnets:
+ Internal2-subnet:
+ enable_dhcp:
+ get_input: Internal2_dhcp
+ cidr:
+ get_input: Internal2_cidr
+ gateway_ip:
+ get_input: Internal2_default_gateway
+ VLC1_Internal1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: vlc1-Internal1-mac
+ network: Internal1-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal1-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: VLC1
+ relationship: tosca.relationships.network.BindsTo
+ epc-sctp-a-net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ route_targets:
+ - get_input: epc-sctp-a-net-rt
+ network_name:
+ get_input: epc-sctp-a-net-name
+ subnets:
+ epc-sctp-a-subnet:
+ cidr:
+ get_input: epc-sctp-a-net-cidr
+ gateway_ip:
+ get_input: epc-sctp-a-net-gateway
+ allocation_pools:
+ - start:
+ get_input: epc-sctp-a-pool-start
+ end:
+ get_input: epc-sctp-a-pool-end
+ VLC1_Internal2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: vlc1-Internal2-mac
+ network: Internal2-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal2-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: VLC1
+ relationship: tosca.relationships.network.BindsTo
+ VLC1_SCTP_B:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ fixed_ips:
+ - ip_address:
+ get_input: vlc1-sctp-b-ip
+ network: epc-sctp-b-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: epc-sctp-b-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: VLC1
+ relationship: tosca.relationships.network.BindsTo
+ VLC2_SCTP_B:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ fixed_ips:
+ - ip_address:
+ get_input: vlc2-sctp-b-ip
+ network: epc-sctp-b-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: epc-sctp-b-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: VLC2
+ relationship: tosca.relationships.network.BindsTo
+ VLC1_SCTP_A:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ fixed_ips:
+ - ip_address:
+ get_input: vlc1-sctp-a-ip
+ network: epc-sctp-a-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: epc-sctp-a-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: VLC1
+ relationship: tosca.relationships.network.BindsTo
+ VLC2_SCTP_A:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ fixed_ips:
+ - ip_address:
+ get_input: vlc2-sctp-a-ip
+ network: epc-sctp-a-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: epc-sctp-a-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: VLC2
+ relationship: tosca.relationships.network.BindsTo
+ VLC1:
+ type: org.openecomp.resource.vfc.nodes.heat.VLC1
+ properties:
+ flavor:
+ get_input: vlc-flavor
+ availability_zone:
+ get_input: vlc_zone
+ image:
+ get_input: pxe-image
+ name:
+ get_input: vlc1-name
+ FSB1_Internal2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: fsb1-Internal2-mac
+ network: Internal2-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal2-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: FSB1
+ relationship: tosca.relationships.network.BindsTo
+ VLC2:
+ type: org.openecomp.resource.vfc.nodes.heat.VLC2
+ properties:
+ flavor:
+ get_input: vlc-flavor
+ availability_zone:
+ get_input: vlc_zone
+ image:
+ get_input: pxe-image
+ name:
+ get_input: vlc2-name
+ FSB1_Internal1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: fsb1-Internal1-mac
+ network: Internal1-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal1-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: FSB1
+ relationship: tosca.relationships.network.BindsTo
+ FSB2_Internal2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: fsb2-Internal2-mac
+ network: Internal2-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal2-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: FSB2
+ relationship: tosca.relationships.network.BindsTo
+ FSB2_Internal1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: fsb2-Internal1-mac
+ network: Internal1-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal1-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: FSB2
+ relationship: tosca.relationships.network.BindsTo
+ VLC1_OAM:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ fixed_ips:
+ - ip_address:
+ get_input: vlc1-oam-ip
+ network:
+ get_input: oam_net_id
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: VLC1
+ relationship: tosca.relationships.network.BindsTo
+ epc-sctp-b-net:
+ type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
+ properties:
+ route_targets:
+ - get_input: epc-sctp-b-net-rt
+ network_name:
+ get_input: epc-sctp-b-net-name
+ subnets:
+ epc-sctp-b-subnet:
+ cidr:
+ get_input: epc-sctp-b-net-cidr
+ gateway_ip:
+ get_input: epc-sctp-b-net-gateway
+ allocation_pools:
+ - start:
+ get_input: epc-sctp-b-pool-start
+ end:
+ get_input: epc-sctp-b-pool-end
+ GPB2:
+ type: org.openecomp.resource.vfc.nodes.heat.GPB2
+ properties:
+ flavor:
+ get_input: gpb-flavor
+ availability_zone:
+ get_input: gpb_zone
+ image:
+ get_input: pxe-image
+ name:
+ get_input: gpb2-name
+ GPB1:
+ type: org.openecomp.resource.vfc.nodes.heat.GPB1
+ properties:
+ flavor:
+ get_input: gpb-flavor
+ availability_zone:
+ get_input: gpb_zone
+ image:
+ get_input: pxe-image
+ name:
+ get_input: gpb1-name
+ VLC1_GTP:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ fixed_ips:
+ - ip_address:
+ get_input: vlc1-gtp-ip
+ network: epc-gtp-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: epc-gtp-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: VLC1
+ relationship: tosca.relationships.network.BindsTo
+ FSB2_OAM:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ fixed_ips:
+ - ip_address:
+ get_input: fsb2-oam-ip
+ network:
+ get_input: oam_net_id
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: FSB2
+ relationship: tosca.relationships.network.BindsTo
+ GPB1_Internal2:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: gpb1-Internal2-mac
+ network: Internal2-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal2-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: GPB1
+ relationship: tosca.relationships.network.BindsTo
+ GPB1_Internal1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ mac_address:
+ get_input: gpb1-Internal1-mac
+ network: Internal1-net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: Internal1-net
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: GPB1
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ vmme_small:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/vmme_small.yml
+ description: HOT template to create vmme 2 fsb 2 ncb 2 gbp 2 vlc
+ members:
+ - NCB1
+ - NCB2
+ - VLC2_OAM
+ - epc-gtp-net
+ - NCB1_Internal1
+ - VLC2_Internal2
+ - NCB1_Internal2
+ - VLC2_Internal1
+ - VLC2_GTP
+ - FSB1_OAM
+ - Internal1-net
+ - GPB2_Internal1
+ - GPB2_Internal2
+ - NCB2_Internal2
+ - NCB2_Internal1
+ - FSB2
+ - FSB1
+ - Internal2-net
+ - VLC1_Internal1
+ - epc-sctp-a-net
+ - VLC1_Internal2
+ - VLC1_SCTP_B
+ - VLC2_SCTP_B
+ - VLC1_SCTP_A
+ - VLC2_SCTP_A
+ - VLC1
+ - FSB1_Internal2
+ - VLC2
+ - FSB1_Internal1
+ - FSB2_Internal2
+ - FSB2_Internal1
+ - VLC1_OAM
+ - epc-sctp-b-net
+ - GPB2
+ - GPB1
+ - VLC1_GTP
+ - FSB2_OAM
+ - GPB1_Internal2
+ - GPB1_Internal1
+ vmme_small_create_fsb:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/vmme_small_create_fsb.yml
+ description: server template for vMME
+ members:
+ - FSB1_volume
+ - FSB2_volume \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vmme_small/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vmme_small/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..71259e1116
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vmme_small/inputfiles/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "vmme_small.yml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "vmme_small.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "vmme_small_create_fsb.yml",
+ "type": "HEAT_VOL",
+ "data": [
+ {
+ "file": "vmme_small_create_fsb.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vmme_small/inputfiles/vmme_small.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vmme_small/inputfiles/vmme_small.env
new file mode 100644
index 0000000000..e46cfd2a2d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vmme_small/inputfiles/vmme_small.env
@@ -0,0 +1,97 @@
+parameters:
+ oam_net_id: 47bf4cca-0961-422f-bcd6-d5a4fbb1a351
+ fsb1-name: ZRDM1MMEX33FSB001
+ fsb2-name: ZRDM1MMEX33FSB002
+ ncb1-name: ZRDM1MMEX33NCB001
+ ncb2-name: ZRDM1MMEX33NCB002
+ vlc1-name: ZRDM1MMEX33VLC002
+ vlc2-name: ZRDM1MMEX33VLC002
+ gpb1-name: ZRDM1MMEX33GPB001
+ gpb2-name: ZRDM1MMEX33GPB002
+ epc-sctp-a-net-name: EPC-SCTP-A
+ epc-sctp-a-net-rt: 13979:105717
+ epc-sctp-a-net-cidr: 107.243.37.0/27
+ epc-sctp-a-net-gateway: 107.243.37.1
+ epc-sctp-a-pool-start: 107.243.37.3
+ epc-sctp-a-pool-end: 107.243.37.30
+ epc-sctp-b-net-name: EPC-SCTP-B
+ epc-sctp-b-net-rt: 13979:105719
+ epc-sctp-b-net-cidr: 107.243.37.32/24
+ epc-sctp-b-net-gateway: 107.243.37.33
+ epc-sctp-b-pool-start: 107.243.37.35
+ epc-sctp-b-pool-end: 107.243.37.62
+ epc-gtp-net-name: EPC-GTP
+ epc-gtp-net-rt: 13979:105715
+ epc-gtp-net-cidr: 107.243.37.64/27
+ epc-gtp-net-gateway: 107.243.37.65
+ epc-gtp-pool-start: 107.243.37.67
+ epc-gtp-pool-end: 107.243.37.94
+ fsb1-image: MME_FSB1_15B-CP04-r5a01
+ fsb2-image: MME_FSB2_15B-CP04-r5a01
+ fsb1-flavor: m4.xlarge4
+ fsb2-flavor: m4.xlarge4
+ fsb_zone: nova
+ fsb1-Internal1-mac: 00:80:37:0E:0B:12
+ fsb1-Internal2-mac: 00:81:37:0E:0B:12
+ fsb1-oam-ip: 107.250.172.221
+ fsb2-Internal1-mac: 00:80:37:0E:0D:12
+ fsb2-Internal2-mac: 00:81:37:0E:0D:12
+ fsb2-oam-ip: 107.250.172.222
+ pxe-image: MME_PXE-BOOT_cxp9025898_2r5a01.qcow2
+ ncb-flavor: m4.xlarge4
+ ncb_zone: nova
+ ncb1-Internal1-mac: 00:80:37:0E:09:12
+ ncb1-Internal2-mac: 00:81:37:0E:09:12
+ ncb2-Internal1-mac: 00:80:37:0E:0F:12
+ ncb2-Internal2-mac: 00:81:37:0E:0F:12
+ gpb-flavor: m4.xlarge4
+ gpb_zone: nova
+ gpb1-Internal1-mac: 00:80:37:0E:01:22
+ gpb1-Internal1-ip: 169.254.0.101
+ gpb1-Internal2-mac: 00:81:37:0E:01:22
+ gpb2-Internal1-mac: 00:80:37:0E:02:22
+ gpb2-Internal2-mac: 00:81:37:0E:02:22
+ vlc-flavor: m4.xlarge4
+ vlc_zone: nova
+ vlc1-sctp-a-ip: 107.243.37.3
+ vlc1-sctp-b-ip: 107.243.37.35
+ vlc1-gtp-ip: 107.243.37.67
+ vlc1-oam-ip: 107.250.172.227
+ vlc2-sctp-a-ip: 107.243.37.4
+ vlc2-sctp-b-ip: 107.243.37.36
+ vlc2-gtp-ip: 107.243.37.68
+ vlc2-oam-ip: 107.250.172.228
+ vlc1-Internal1-mac: 00:80:37:0E:01:12
+ vlc1-Internal2-mac: 00:81:37:0E:01:12
+ vlc2-Internal1-mac: 00:80:37:0E:02:12
+ vlc2-Internal2-mac: 00:81:37:0E:02:12
+ Internal1_net_name: vmme_int_int_1
+ Internal1_subnet_name: vmme_int_int_sub_1
+ Internal1_ipam_name: vmme_ipam_int1
+ Internal1_cidr: 169.253.0.0/17
+ Internal1_forwarding_mode: "l2"
+ Internal1_dhcp: "False"
+ Internal1_shared: "False"
+ Internal1_external: "False"
+ Internal1_name: "Internal1-subnet"
+ Internal1_default_gateway: 169.253.0.3
+ Internal1_net_pool_start: 169.253.0.100
+ Internal1_net_pool_end: 169.253.0.254
+ Internal2_net_name: vmme_int_int_2
+ Internal2_subnet_name: vmme_int_int_sub_2
+ Internal2_ipam_name: vmme_ipam_int2
+ Internal2_cidr: 169.255.0.0/17
+ Internal2_shared: "False"
+ Internal2_external: "False"
+ Internal2_forwarding_mode: "l2"
+ Internal2_dhcp: "False"
+ Internal2_name: "Internal2-subnet"
+ Internal2_default_gateway: 169.255.0.3
+ Internal2_net_pool_start: 169.255.0.100
+ Internal2_net_pool_end: 169.255.0.254
+ static_prefix_sctp_a_1: 107.239.40.32/30
+ static_prefix_gtp_1: 107.239.40.96/30
+ static_prefix_sctp_b_1: 107.239.40.64/30
+ VMME_FSB1_boot_volume: 8248e794-6173-4b49-b9c3-8219b0b56f4e
+ VMME_FSB2_boot_volume: 089a0d11-4b15-4370-8343-3f90907b1221
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vmme_small/inputfiles/vmme_small.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vmme_small/inputfiles/vmme_small.yml
new file mode 100644
index 0000000000..d7ad9a84d0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vmme_small/inputfiles/vmme_small.yml
@@ -0,0 +1,644 @@
+heat_template_version: 2013-05-23
+
+description: HOT template to create vmme 2 fsb 2 ncb 2 gbp 2 vlc
+
+parameters:
+ fsb1-oam-ip:
+ type: string
+ fsb2-oam-ip:
+ type: string
+ vlc1-oam-ip:
+ type: string
+ vlc2-oam-ip:
+ type: string
+ Internal1_net_pool_start:
+ type: string
+ Internal1_net_pool_end:
+ type: string
+ Internal2_net_pool_start:
+ type: string
+ Internal2_net_pool_end:
+ type: string
+ Internal1_default_gateway:
+ type: string
+ Internal2_default_gateway:
+ type: string
+ Internal1_shared:
+ type: string
+ Internal1_external:
+ type: string
+ Internal1_net_name:
+ type: string
+ Internal1_subnet_name:
+ type: string
+ Internal1_ipam_name:
+ type: string
+ Internal1_cidr:
+ type: string
+ Internal1_forwarding_mode:
+ type: string
+ Internal1_dhcp:
+ type: string
+ Internal1_name:
+ type: string
+ Internal2_net_name:
+ type: string
+ Internal2_subnet_name:
+ type: string
+ Internal2_ipam_name:
+ type: string
+ Internal2_cidr:
+ type: string
+ Internal2_forwarding_mode:
+ type: string
+ Internal2_dhcp:
+ type: string
+ Internal2_name:
+ type: string
+ Internal2_shared:
+ type: string
+ Internal2_external:
+ type: string
+ vlc1-sctp-a-ip:
+ type: string
+ vlc1-sctp-b-ip:
+ type: string
+ vlc1-gtp-ip:
+ type: string
+ vlc2-sctp-a-ip:
+ type: string
+ vlc2-sctp-b-ip:
+ type: string
+ vlc2-gtp-ip:
+ type: string
+ fsb1-name:
+ type: string
+ description: Name of fsb1
+ fsb2-name:
+ type: string
+ description: Name of fsb1
+ ncb1-name:
+ type: string
+ description: Name of ncb1
+ ncb2-name:
+ type: string
+ description: Name of ncb2
+ vlc1-name:
+ type: string
+ description: Name of vlc1
+ vlc2-name:
+ type: string
+ description: Name of vlc2
+ gpb1-name:
+ type: string
+ description: Name of gpb1
+ gpb2-name:
+ type: string
+ description: Name of gpb2
+ fsb_zone:
+ type: string
+ description: cluster for spawnning fsb instances
+ fsb1-image:
+ type: string
+ description: Name of image to use for server fsb1
+ fsb1-flavor:
+ type: string
+ description: Flavor to use for servers fsb1
+ oam_net_id:
+ type: string
+ description: uuid of oam network
+ fsb1-Internal1-mac:
+ type: string
+ description: static mac address assigned to fsb1-Internal1
+ fsb1-Internal2-mac:
+ type: string
+ description: static mac address assigned to fsb1-Internal2
+ fsb2-image:
+ type: string
+ description: Name of image to use for server fsb2
+ fsb2-flavor:
+ type: string
+ description: Flavor to use for servers fsb2
+ fsb2-Internal1-mac:
+ type: string
+ description: static mac address assigned to fsb2-Internal1
+ fsb2-Internal2-mac:
+ type: string
+ description: static mac address assigned to fsb2-Internal2
+ pxe-image:
+ type: string
+ description: Name of image to use for server ncb
+ ncb-flavor:
+ type: string
+ description: Flavor to use for servers ncb
+ ncb_zone:
+ type: string
+ description: cluster for spawnning ncb instances
+ ncb1-Internal1-mac:
+ type: string
+ description: static mac address assigned to ncb1-Internal1
+ ncb1-Internal2-mac:
+ type: string
+ description: static mac address assigned to ncb1-Internal2
+ ncb2-Internal1-mac:
+ type: string
+ description: static mac address assigned to ncb2-Internal1
+ ncb2-Internal2-mac:
+ type: string
+ description: static mac address assigned to ncb2-Internal2
+ gpb-flavor:
+ type: string
+ description: Flavor to use for servers gpb
+ gpb_zone:
+ type: string
+ description: cluster for spawnning gpb instances
+ gpb1-Internal1-ip:
+ type: string
+ gpb1-Internal1-mac:
+ type: string
+ description: static mac address assigned to gpb1-Internal1
+ gpb1-Internal2-mac:
+ type: string
+ description: static mac address assigned to gpb1-Internal2
+ gpb2-Internal1-mac:
+ type: string
+ description: static mac address assigned to gpb2-Internal1
+ gpb2-Internal2-mac:
+ type: string
+ description: static mac address assigned to gpb2-Internal2
+ vlc-flavor:
+ type: string
+ description: Flavor to use for servers vlc
+ vlc_zone:
+ type: string
+ description: cluster for spawnning vlc instances
+ vlc1-Internal1-mac:
+ type: string
+ description: static mac address assigned to vlc1-Internal1
+ vlc1-Internal2-mac:
+ type: string
+ description: static mac address assigned to vlc1-Internal2
+ vlc2-Internal1-mac:
+ type: string
+ description: static mac address assigned to vlc2-Internal1
+ vlc2-Internal2-mac:
+ type: string
+ description: static mac address assigned to vlc2-Internal2
+ epc-sctp-a-net-name:
+ type: string
+ description: epc-sctp-a net name
+ epc-sctp-a-net-rt:
+ type: string
+ description: epc-sctp-a route target
+ epc-sctp-a-net-cidr:
+ type: string
+ description: epc-sctp-a subnet
+ epc-sctp-a-net-gateway:
+ type: string
+ description: epc-sctp-a-net network gateway
+ epc-sctp-a-pool-start:
+ type: string
+ description: epc-sctp-a-net network ip pool start IP address
+ epc-sctp-a-pool-end:
+ type: string
+ description: epc-sctp-a-net network ip pool end IP address
+ epc-sctp-b-net-name:
+ type: string
+ description: epc-sctp-b net name
+ epc-sctp-b-net-rt:
+ type: string
+ description: epc-sctp-b route target
+ epc-sctp-b-net-cidr:
+ type: string
+ description: epc-sctp-b subnet
+ epc-sctp-b-net-gateway:
+ type: string
+ description: epc-sctp-b-net network gateway
+ epc-sctp-b-pool-start:
+ type: string
+ description: epc-sctp-b-net network ip pool start IP address
+ epc-sctp-b-pool-end:
+ type: string
+ description: epc-sctp-b-net network ip pool end IP address
+ epc-gtp-net-name:
+ type: string
+ description: gtp net name
+ epc-gtp-net-rt:
+ type: string
+ description: gtp route target
+ epc-gtp-net-cidr:
+ type: string
+ description: gtp stubnet
+ epc-gtp-net-gateway:
+ type: string
+ description: gtp network gateway
+ epc-gtp-pool-start:
+ type: string
+ description: gtp network ip pool start IP address
+ epc-gtp-pool-end:
+ type: string
+ description: gtp network ip pool end IP address
+ static_prefix_sctp_a_1:
+ type: string
+ description: Static Prefix
+ static_prefix_sctp_b_1:
+ type: string
+ description: Static Prefix
+ static_prefix_gtp_1:
+ type: string
+ description: Static Prefix
+ VMME_FSB1_boot_volume:
+ type: string
+ VMME_FSB2_boot_volume:
+ type: string
+
+resources:
+
+ Internal1_ipam:
+ type: OS::Contrail::NetworkIpam
+ properties:
+ name: { get_param: Internal1_ipam_name }
+
+ Internal2_ipam:
+ type: OS::Contrail::NetworkIpam
+ properties:
+ name: { get_param: Internal2_ipam_name }
+
+ Internal1-net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: Internal1_net_name }
+ forwarding_mode: { get_param: Internal1_forwarding_mode }
+ shared: { get_param: Internal1_shared }
+ external: { get_param: Internal1_external }
+# route_targets: { "Fn::Split" : [ ",", Ref: route_targets ] }
+
+ Internal1-subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: Internal1-net }
+ cidr: { get_param: Internal1_cidr }
+ gateway_ip: { get_param: Internal1_default_gateway }
+ enable_dhcp: { get_param: Internal1_dhcp }
+
+
+# Internal1-subnet:
+# type: OS::Contrail::VnSubnet
+# properties:
+# name: { get_param: Internal1_subnet_name }
+# network: { get_resource: Internal1-net }
+# ip_prefix: { get_param: Internal1_cidr }
+ # ipam: { get_resource: Internal1_ipam }
+ # enable_dhcp: { get_param: Internal1_dhcp }
+ # default_gateway: { get_param: Internal1_default_gateway }
+ # allocation_pools:
+ # - start: { get_param: Internal1_net_pool_start }
+ # end: { get_param: Internal1_net_pool_end }
+
+
+
+ Internal2-net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: Internal2_name }
+ forwarding_mode: { get_param: Internal2_forwarding_mode }
+ shared: { get_param: Internal2_shared }
+ external: { get_param: Internal2_external }
+# route_targets: { "Fn::Split" : [ ",", Ref: route_targets ] }
+
+# Internal2-subnet:
+# type: OS::Contrail::VnSubnet
+# properties:
+# name: { get_param: Internal2_subnet_name }
+# network: { get_resource: Internal2-net }
+# ip_prefix: { get_param: Internal2_cidr }
+# ipam: { get_resource: Internal2_ipam }
+# enable_dhcp: { get_param: Internal2_dhcp }
+# default_gateway: { get_param: Internal2_default_gateway }
+# allocation_pools:
+# - start: { get_param: Internal2_net_pool_start }
+# end: { get_param: Internal2_net_pool_end }
+
+ Internal2-subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: Internal2-net }
+ cidr: { get_param: Internal2_cidr }
+ gateway_ip: { get_param: Internal2_default_gateway }
+ enable_dhcp: { get_param: Internal2_dhcp }
+
+ epc-sctp-a-net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: epc-sctp-a-net-name }
+ route_targets: [ get_param: epc-sctp-a-net-rt ]
+
+
+ epc-sctp-a-subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: epc-sctp-a-net }
+ cidr: { get_param: epc-sctp-a-net-cidr }
+ gateway_ip: { get_param: epc-sctp-a-net-gateway }
+ allocation_pools:
+ - start: { get_param: epc-sctp-a-pool-start }
+ end: { get_param: epc-sctp-a-pool-end }
+
+ epc-sctp-b-net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: epc-sctp-b-net-name }
+ route_targets: [ get_param: epc-sctp-b-net-rt ]
+
+ epc-sctp-b-subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: epc-sctp-b-net }
+ cidr: { get_param: epc-sctp-b-net-cidr }
+ gateway_ip: { get_param: epc-sctp-b-net-gateway }
+ allocation_pools:
+ - start: { get_param: epc-sctp-b-pool-start }
+ end: { get_param: epc-sctp-b-pool-end }
+
+ epc-gtp-net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: epc-gtp-net-name }
+ route_targets: [ get_param: epc-gtp-net-rt ]
+
+ epc-gtp-subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: epc-gtp-net }
+ cidr: { get_param: epc-gtp-net-cidr }
+ gateway_ip: { get_param: epc-gtp-net-gateway }
+ allocation_pools:
+ - start: { get_param: epc-gtp-pool-start }
+ end: { get_param: epc-gtp-pool-end }
+
+ FSB1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: fsb1-name }
+ block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB1_boot_volume }, delete_on_termination: "false" }]
+ flavor: { get_param: fsb1-flavor }
+ availability_zone: { get_param: fsb_zone }
+ networks:
+ - port: { get_resource: FSB1_Internal1 }
+ - port: { get_resource: FSB1_Internal2 }
+ - port: { get_resource: FSB1_OAM }
+
+ FSB1_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: Internal1-net }
+ mac_address: { get_param: fsb1-Internal1-mac }
+
+ FSB1_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal2-net }
+ mac_address: { get_param: fsb1-Internal2-mac }
+
+ FSB1_OAM:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_id }
+ fixed_ips:
+ - ip_address: { get_param: fsb1-oam-ip }
+
+ FSB2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: fsb2-name }
+ block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+ flavor: { get_param: fsb2-flavor }
+ availability_zone: { get_param: fsb_zone }
+ networks:
+ - port: { get_resource: FSB2_Internal1 }
+ - port: { get_resource: FSB2_Internal2 }
+ - port: { get_resource: FSB2_OAM }
+
+ FSB2_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal1-net }
+ mac_address: { get_param: fsb2-Internal1-mac }
+
+
+ FSB2_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal2-net }
+ mac_address: { get_param: fsb2-Internal2-mac }
+
+ FSB2_OAM:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_id }
+ fixed_ips:
+ - ip_address: { get_param: fsb2-oam-ip }
+
+ NCB1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: ncb1-name }
+ image: { get_param: pxe-image }
+ flavor: { get_param: ncb-flavor }
+ availability_zone: { get_param: ncb_zone }
+ networks:
+ - port: { get_resource: NCB1_Internal1 }
+ - port: { get_resource: NCB1_Internal2 }
+
+ NCB1_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal1-net }
+ mac_address: { get_param: ncb1-Internal1-mac }
+
+ NCB1_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal2-net }
+ mac_address: { get_param: ncb1-Internal2-mac }
+
+ NCB2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: ncb2-name }
+ image: { get_param: pxe-image }
+ flavor: { get_param: ncb-flavor }
+ availability_zone: { get_param: ncb_zone }
+ networks:
+ - port: { get_resource: NCB2_Internal1 }
+ - port: { get_resource: NCB2_Internal2 }
+
+ NCB2_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal1-net }
+ mac_address: { get_param: ncb2-Internal1-mac }
+
+ NCB2_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal2-net }
+ mac_address: { get_param: ncb2-Internal2-mac }
+
+ GPB1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: gpb1-name }
+ image: { get_param: pxe-image }
+ flavor: { get_param: gpb-flavor }
+ availability_zone: { get_param: gpb_zone }
+ networks:
+ - port: { get_resource: GPB1_Internal1 }
+ - port: { get_resource: GPB1_Internal2 }
+
+ GPB1_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal1-net }
+ mac_address: { get_param: gpb1-Internal1-mac }
+
+ GPB1_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal2-net }
+ mac_address: { get_param: gpb1-Internal2-mac }
+
+ GPB2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: gpb2-name }
+ image: { get_param: pxe-image }
+ flavor: { get_param: gpb-flavor }
+ availability_zone: { get_param: gpb_zone }
+ networks:
+ - port: { get_resource: GPB2_Internal1 }
+ - port: { get_resource: GPB2_Internal2 }
+
+ GPB2_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal1-net }
+ mac_address: { get_param: gpb2-Internal1-mac }
+
+ GPB2_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal2-net }
+ mac_address: { get_param: gpb2-Internal2-mac }
+
+ VLC1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: vlc1-name }
+ image: { get_param: pxe-image }
+ flavor: { get_param: vlc-flavor }
+ availability_zone: { get_param: vlc_zone }
+ networks:
+ - port: { get_resource: VLC1_Internal1 }
+ - port: { get_resource: VLC1_Internal2 }
+ - port: { get_resource: VLC1_OAM }
+ - port: { get_resource: VLC1_SCTP_A }
+ - port: { get_resource: VLC1_SCTP_B }
+ - port: { get_resource: VLC1_GTP }
+
+ VLC1_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal1-net }
+ mac_address: { get_param: vlc1-Internal1-mac }
+
+ VLC1_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal2-net }
+ mac_address: { get_param: vlc1-Internal2-mac }
+
+ VLC1_OAM:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_id }
+ fixed_ips:
+ - ip_address: { get_param: vlc1-oam-ip }
+
+ VLC1_SCTP_A:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: epc-sctp-a-net }
+ fixed_ips:
+ - ip_address: { get_param: vlc1-sctp-a-ip }
+
+ VLC1_SCTP_B:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: epc-sctp-b-net }
+ fixed_ips:
+ - ip_address: { get_param: vlc1-sctp-b-ip }
+
+ VLC1_GTP:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: epc-gtp-net }
+ fixed_ips:
+ - ip_address: { get_param: vlc1-gtp-ip }
+
+ VLC2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: vlc2-name }
+ image: { get_param: pxe-image }
+ flavor: { get_param: vlc-flavor }
+ availability_zone: { get_param: vlc_zone }
+ networks:
+ - port: { get_resource: VLC2_Internal1 }
+ - port: { get_resource: VLC2_Internal2 }
+ - port: { get_resource: VLC2_OAM }
+ - port: { get_resource: VLC2_SCTP_A }
+ - port: { get_resource: VLC2_SCTP_B }
+ - port: { get_resource: VLC2_GTP }
+
+
+ VLC2_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal1-net }
+ mac_address: { get_param: vlc2-Internal1-mac }
+
+ VLC2_OAM:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_id }
+ fixed_ips:
+ - ip_address: { get_param: vlc2-oam-ip }
+
+ VLC2_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: Internal2-net }
+ mac_address: { get_param: vlc2-Internal2-mac }
+
+ VLC2_SCTP_A:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: epc-sctp-a-net }
+ fixed_ips:
+ - ip_address: { get_param: vlc2-sctp-a-ip }
+
+ VLC2_SCTP_B:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: epc-sctp-b-net }
+ fixed_ips:
+ - ip_address: { get_param: vlc2-sctp-b-ip }
+
+ VLC2_GTP:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: epc-gtp-net }
+ fixed_ips:
+ - ip_address: { get_param: vlc2-gtp-ip }
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vmme_small/inputfiles/vmme_small_create_fsb.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vmme_small/inputfiles/vmme_small_create_fsb.env
new file mode 100644
index 0000000000..750bb2dd44
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vmme_small/inputfiles/vmme_small_create_fsb.env
@@ -0,0 +1,8 @@
+parameters:
+ volume_type: Gold
+ volume_size: 320
+ FSB_1_image: MME_FSB1_15B-CP04-r5a01
+ FSB_2_image: MME_FSB2_15B-CP04-r5a01
+ FSB1_volume_name: vFSB1_1_Vol_1
+ FSB2_volume_name: vFSB2_1_Vol_1
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vmme_small/inputfiles/vmme_small_create_fsb.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vmme_small/inputfiles/vmme_small_create_fsb.yml
new file mode 100644
index 0000000000..2d695a50c1
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vmme_small/inputfiles/vmme_small_create_fsb.yml
@@ -0,0 +1,54 @@
+heat_template_version: 2013-05-23
+
+description: server template for vMME
+
+parameters:
+
+ volume_type:
+ type: string
+ label: volume type
+ description: volume type Gold
+
+ volume_size:
+ type: number
+ label: volume size
+ description: my volume size 320GB
+
+ FSB_1_image:
+ type: string
+ label: MME_FSB1
+ description: MME_FSB1_15B-CP04-r5a01
+
+ FSB_2_image:
+ type: string
+ label: MME_FSB2
+ description: MME_FSB2_15B-CP04-r5a01
+
+ FSB1_volume_name:
+ type: string
+ label: FSB1_volume
+ description: FSB1_volume_1
+
+ FSB2_volume_name:
+ type: string
+ label: FSB2_volume
+ description: FSB2_volume_1
+
+resources:
+
+ FSB1_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: volume_size}
+ volume_type: {get_param: volume_type}
+ name: {get_param: FSB1_volume_name}
+ image: {get_param: FSB_1_image}
+
+ FSB2_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: volume_size}
+ volume_type: {get_param: volume_type}
+ name: {get_param: FSB2_volume_name}
+ image: {get_param: FSB_2_image}
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..a44e7921f8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/inputfiles/MANIFEST.json
@@ -0,0 +1,24 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "nested.yml",
+ "type": "HEAT",
+ "isBase": "false",
+ "data":[
+ {
+ "file": "a_vol.yml",
+ "type": "HEAT_VOL",
+ "isBase": "false"
+ }
+ ]
+ },
+ {
+ "file": "main.yml",
+ "type": "HEAT",
+ "isBase": "false"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/inputfiles/a_vol.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/inputfiles/a_vol.yml
new file mode 100644
index 0000000000..a9f72bcecf
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/inputfiles/a_vol.yml
@@ -0,0 +1,24 @@
+heat_template_version: 2013-05-23
+
+description: volume
+
+parameters:
+ cmaui_cinder_volume_size:
+ type: number
+ label: CMAUI Cinder volume size
+ description: the size of the CMAUI Cinder volume
+ CMAUI_volume_type:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+
+resources:
+ cmaui_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: cmaui_cinder_volume_size}
+ volume_type: {get_param: CMAUI_volume_type}
+
+outputs:
+ out_cmaui_volume:
+ value: {get_resource: cmaui_volume} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/inputfiles/main.yml
new file mode 100644
index 0000000000..b97dd4b535
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/inputfiles/main.yml
@@ -0,0 +1,71 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_cinder_volume_size:
+ type: number
+ label: CMAUI Cinder volume size
+ description: the size of the CMAUI Cinder volume
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ oam_net_name:
+ type: string
+ description: UID of OAM network
+ oam_network_netmask:
+ type: string
+ label: oam network netmask
+ description: oam network gateway
+ oam_network_gateway:
+ type: string
+ label: oam network gateway
+ description: oam network gateway
+ external_dns:
+ type: string
+ label: dns server
+ description: dns server
+ external_ntp:
+ type: string
+ label: ntp server
+ description: ntp server
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ timezone:
+ type: string
+ label: timezone
+ description: timezone
+ cmaui_oam_ips:
+ type: comma_delimited_list
+ label: CMAUI oam_net IP addresses
+ description: CMAUI oam_net IP addresses
+ CMAUI_volume_type:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+
+resources:
+
+ server_cmaui:
+ type: nested.yml
+ properties:
+ cmaui_names: { get_param: [cmaui_names, 0]}
+ cmaui_image: { get_param: cmaui_image }
+ availability_zone_0: { get_param: availability_zone_0 }
+ cmaui_flavor: { get_param: cmaui_flavor } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/inputfiles/nested.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/inputfiles/nested.yml
new file mode 100644
index 0000000000..cdaf251b85
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/inputfiles/nested.yml
@@ -0,0 +1,116 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_volume:
+ type: string
+ label: CMAUI volume size
+ description: Volume for CMAUI server
+ cmaui_cinder_volume_size:
+ type: number
+ label: CMAUI Cinder volume size
+ description: the size of the CMAUI Cinder volume
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ oam_net_name:
+ type: string
+ description: UID of OAM network
+ oam_network_netmask:
+ type: string
+ label: oam network netmask
+ description: oam network gateway
+ oam_network_gateway:
+ type: string
+ label: oam network gateway
+ description: oam network gateway
+ external_dns:
+ type: string
+ label: dns server
+ description: dns server
+ external_ntp:
+ type: string
+ label: ntp server
+ description: ntp server
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ timezone:
+ type: string
+ label: timezone
+ description: timezone
+ cmaui_oam_ips:
+ type: comma_delimited_list
+ label: CMAUI oam_net IP addresses
+ description: CMAUI oam_net IP addresses
+ CMAUI_volume_type:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+ out_cmaui_volume:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+
+resources:
+
+ cmaui_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ cmaui_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_param: out_cmaui_volume}
+ instance_uuid: {get_resource: server_cmaui}
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_0 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ cmaui.mgmt.ip=${cmaui.mgmt.ip}
+ cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
+ cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
+ cmaui.external.dns=${cmaui.external.dns}
+ cmaui.external.ntp=${cmaui.external.ntp}
+ cmaui.node=${cmaui.node}
+ cmaui.timezone=${cmaui.timezone}
+ params:
+ ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 0]}
+ ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${cmaui.external.dns}: {get_param: external_dns}
+ ${cmaui.external.ntp}: {get_param: external_ntp}
+ ${cmaui.node}: {get_param: [cmaui_names, 0]}
+ ${cmaui.timezone}: {get_param: timezone}
+ user_data_format: RAW \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/out/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/out/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..0a5e36edaf
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/out/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,146 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.nested:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ cmaui_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ cmaui_cinder_volume_size:
+ type: float
+ description: the size of the CMAUI Cinder volume
+ timezone:
+ type: string
+ description: timezone
+ security_group_name:
+ type: string
+ description: the name of security group
+ cmaui_volume:
+ type: string
+ description: Volume for CMAUI server
+ oam_network_netmask:
+ type: string
+ description: oam network gateway
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ oam_network_gateway:
+ type: string
+ description: oam network gateway
+ out_cmaui_volume:
+ type: string
+ description: the name of the target volume backend
+ availability_zone_0:
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ type: list
+ description: CMAUI oam_net IP addresses
+ entry_schema:
+ type: string
+ external_dns:
+ type: string
+ description: dns server
+ oam_net_name:
+ type: string
+ description: UID of OAM network
+ external_ntp:
+ type: string
+ description: ntp server
+ CMAUI_volume_type:
+ type: string
+ description: the name of the target volume backend
+ attributes:
+ out_cmaui_volume:
+ type: string
+ requirements:
+ - local_storage_server_cmaui:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_cmaui_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ host_server_cmaui:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_volume:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_0:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/out/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/out/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..72b2c18882
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/out/MainServiceTemplate.yaml
@@ -0,0 +1,150 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ cmaui_cinder_volume_size:
+ label: CMAUI Cinder volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the CMAUI Cinder volume
+ timezone:
+ label: timezone
+ hidden: false
+ immutable: false
+ type: string
+ description: timezone
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ oam_network_netmask:
+ label: oam network netmask
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ oam_network_gateway:
+ label: oam network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ label: CMAUI oam_net IP addresses
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI oam_net IP addresses
+ entry_schema:
+ type: string
+ external_dns:
+ label: dns server
+ hidden: false
+ immutable: false
+ type: string
+ description: dns server
+ oam_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ external_ntp:
+ label: ntp server
+ hidden: false
+ immutable: false
+ type: string
+ description: ntp server
+ CMAUI_volume_type:
+ label: CMAUI vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ node_templates:
+ server_cmaui:
+ type: org.openecomp.resource.abstract.nodes.heat.nested
+ directives:
+ - substitutable
+ properties:
+ cmaui_names:
+ get_input:
+ - cmaui_names
+ - 0
+ service_template_filter:
+ substitute_service_template: nestedServiceTemplate.yaml
+ cmaui_image:
+ get_input: cmaui_image
+ cmaui_flavor:
+ get_input: cmaui_flavor
+ availability_zone_0:
+ get_input: availability_zone_0
+ groups:
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: cmaui server template for vMMSC
+ members:
+ - server_cmaui \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/out/nestedServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/out/nestedServiceTemplate.yaml
new file mode 100644
index 0000000000..242feead83
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/nested_with_inner_vol/out/nestedServiceTemplate.yaml
@@ -0,0 +1,242 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ GlobalSubstitutionTypes:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ cmaui_cinder_volume_size:
+ label: CMAUI Cinder volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the CMAUI Cinder volume
+ timezone:
+ label: timezone
+ hidden: false
+ immutable: false
+ type: string
+ description: timezone
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ cmaui_volume:
+ label: CMAUI volume size
+ hidden: false
+ immutable: false
+ type: string
+ description: Volume for CMAUI server
+ oam_network_netmask:
+ label: oam network netmask
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ oam_network_gateway:
+ label: oam network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ out_cmaui_volume:
+ label: CMAUI vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ label: CMAUI oam_net IP addresses
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI oam_net IP addresses
+ entry_schema:
+ type: string
+ external_dns:
+ label: dns server
+ hidden: false
+ immutable: false
+ type: string
+ description: dns server
+ oam_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ external_ntp:
+ label: ntp server
+ hidden: false
+ immutable: false
+ type: string
+ description: ntp server
+ CMAUI_volume_type:
+ label: CMAUI vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ node_templates:
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: cmaui_volume
+ relationship: cmaui_volume_attachment
+ cmaui_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'
+ cmaui_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ relationship_templates:
+ cmaui_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: cmaui_volume
+ instance_uuid: server_cmaui
+ groups:
+ a_vol:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/a_vol.yml
+ description: volume
+ members:
+ - cmaui_volume
+ nested:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested.yml
+ description: cmaui server template for vMMSC
+ members:
+ - server_cmaui
+ - cmaui_port_0
+ outputs:
+ out_cmaui_volume:
+ value: cmaui_volume
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested
+ capabilities:
+ host_server_cmaui:
+ - server_cmaui
+ - host
+ os_server_cmaui:
+ - server_cmaui
+ - os
+ endpoint_server_cmaui:
+ - server_cmaui
+ - endpoint
+ binding_server_cmaui:
+ - server_cmaui
+ - binding
+ scalable_server_cmaui:
+ - server_cmaui
+ - scalable
+ attachment_cmaui_volume:
+ - cmaui_volume
+ - attachment
+ attachment_cmaui_port_0:
+ - cmaui_port_0
+ - attachment
+ requirements:
+ local_storage_server_cmaui:
+ - server_cmaui
+ - local_storage
+ link_cmaui_port_0:
+ - cmaui_port_0
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_and_attach_one_file/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_and_attach_one_file/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..25cae6bdeb
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_and_attach_one_file/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,194 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ cmaui_cinder_volume_size:
+ label: CMAUI Cinder volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the CMAUI Cinder volume
+ timezone:
+ label: timezone
+ hidden: false
+ immutable: false
+ type: string
+ description: timezone
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ server_cmaui:
+ label: CMAUI server name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the cmaui server
+ oam_network_netmask:
+ label: oam network netmask
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ oam_network_gateway:
+ label: oam network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ label: CMAUI oam_net IP addresses
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI oam_net IP addresses
+ entry_schema:
+ type: string
+ external_dns:
+ label: dns server
+ hidden: false
+ immutable: false
+ type: string
+ description: dns server
+ oam_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ external_ntp:
+ label: ntp server
+ hidden: false
+ immutable: false
+ type: string
+ description: ntp server
+ CMAUI_volume_type:
+ label: CMAUI vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ node_templates:
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: cmaui_volume
+ relationship: cmaui_volume_attachment
+ cmaui_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'
+ cmaui_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ relationship_templates:
+ cmaui_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: cmaui_volume
+ instance_uuid: server_cmaui
+ groups:
+ hot_template:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot_template.yml
+ description: cmaui server template for vMMSC
+ members:
+ - server_cmaui
+ - cmaui_volume
+ - cmaui_port_0 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_and_attach_one_file/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_and_attach_one_file/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..b2916ccf9c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_and_attach_one_file/inputfiles/MANIFEST.json
@@ -0,0 +1,11 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot_template.yml",
+ "type": "HEAT"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_and_attach_one_file/inputfiles/hot_template.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_and_attach_one_file/inputfiles/hot_template.yml
new file mode 100644
index 0000000000..a0f9b45478
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_and_attach_one_file/inputfiles/hot_template.yml
@@ -0,0 +1,131 @@
+heat_template_version: 2013-05-23
+
+#################################
+#
+# Changes from MSO 01/26/2016
+# Updated per ECOMP feedback
+#
+#################################
+
+description: cmaui server template for vMMSC
+
+parameters:
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_cinder_volume_size:
+ type: number
+ label: CMAUI Cinder volume size
+ description: the size of the CMAUI Cinder volume
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ oam_net_name:
+ type: string
+ description: UID of OAM network
+ oam_network_netmask:
+ type: string
+ label: oam network netmask
+ description: oam network gateway
+ oam_network_gateway:
+ type: string
+ label: oam network gateway
+ description: oam network gateway
+ external_dns:
+ type: string
+ label: dns server
+ description: dns server
+ external_ntp:
+ type: string
+ label: ntp server
+ description: ntp server
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ timezone:
+ type: string
+ label: timezone
+ description: timezone
+ cmaui_oam_ips:
+ type: comma_delimited_list
+ label: CMAUI oam_net IP addresses
+ description: CMAUI oam_net IP addresses
+ CMAUI_volume_type:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+ server_cmaui:
+ type: string
+ label: CMAUI server name
+ description: the name of the cmaui server
+
+resources:
+
+ cmaui_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ cmaui_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: cmaui_cinder_volume_size}
+ volume_type: {get_param: CMAUI_volume_type}
+
+ cmaui_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: cmaui_volume}
+ instance_uuid: {get_resource: server_cmaui}
+
+ cmaui_volume_attachment_empty_nova:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_resource: cmaui_volume}
+ instance_uuid: {get_param: server_cmaui}
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_0 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ cmaui.mgmt.ip=${cmaui.mgmt.ip}
+ cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
+ cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
+ cmaui.external.dns=${cmaui.external.dns}
+ cmaui.external.ntp=${cmaui.external.ntp}
+ cmaui.node=${cmaui.node}
+ cmaui.timezone=${cmaui.timezone}
+ params:
+ ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 0]}
+ ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${cmaui.external.dns}: {get_param: external_dns}
+ ${cmaui.external.ntp}: {get_param: external_ntp}
+ ${cmaui.node}: {get_param: [cmaui_names, 0]}
+ ${cmaui.timezone}: {get_param: timezone}
+ user_data_format: RAW \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_nested_in_main_file_in_manifest/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_nested_in_main_file_in_manifest/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..0291368d24
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_nested_in_main_file_in_manifest/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,203 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ exposed_cmaui_volume:
+ label: CMAUI volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the CMAUI volume
+ cmaui_cinder_volume_size:
+ label: CMAUI Cinder volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the CMAUI Cinder volume
+ timezone:
+ label: timezone
+ hidden: false
+ immutable: false
+ type: string
+ description: timezone
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ oam_network_netmask:
+ label: oam network netmask
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ oam_network_gateway:
+ label: oam network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ label: CMAUI oam_net IP addresses
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI oam_net IP addresses
+ entry_schema:
+ type: string
+ external_dns:
+ label: dns server
+ hidden: false
+ immutable: false
+ type: string
+ description: dns server
+ oam_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ external_ntp:
+ label: ntp server
+ hidden: false
+ immutable: false
+ type: string
+ description: ntp server
+ CMAUI_volume_type:
+ label: CMAUI vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ node_templates:
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: cmaui_volume
+ relationship: cmaui_volume_attachment
+ cmaui_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'
+ cmaui_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ relationship_templates:
+ cmaui_volume_attachment:
+ type: org.openecomp.relationships.heat.cinder.VolumeAttachesTo
+ properties:
+ volume_id: cmaui_volume
+ instance_uuid: server_cmaui
+ groups:
+ a_vol:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/a_vol.yml
+ description: volume
+ members:
+ - cmaui_volume
+ hot_template:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot_template.yml
+ description: cmaui server template for vMMSC
+ members:
+ - server_cmaui
+ - cmaui_port_0
+ outputs:
+ exposed_cmaui_volume:
+ value: cmaui_volume \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_nested_in_main_file_in_manifest/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_nested_in_main_file_in_manifest/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..5804dbdf5e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_nested_in_main_file_in_manifest/inputfiles/MANIFEST.json
@@ -0,0 +1,19 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot_template.yml",
+ "type": "HEAT",
+ "isBase": "false",
+ "data":[
+ {
+ "file": "a_vol.yml",
+ "type": "HEAT_VOL",
+ "isBase": "false"
+ }
+ ]
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_nested_in_main_file_in_manifest/inputfiles/a_vol.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_nested_in_main_file_in_manifest/inputfiles/a_vol.yml
new file mode 100644
index 0000000000..78c2ee12c4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_nested_in_main_file_in_manifest/inputfiles/a_vol.yml
@@ -0,0 +1,24 @@
+heat_template_version: 2013-05-23
+
+description: volume
+
+parameters:
+ cmaui_cinder_volume_size:
+ type: number
+ label: CMAUI Cinder volume size
+ description: the size of the CMAUI Cinder volume
+ CMAUI_volume_type:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+
+resources:
+ cmaui_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: cmaui_cinder_volume_size}
+ volume_type: {get_param: CMAUI_volume_type}
+
+outputs:
+ exposed_cmaui_volume:
+ value: {get_resource: cmaui_volume} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_nested_in_main_file_in_manifest/inputfiles/hot_template.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_nested_in_main_file_in_manifest/inputfiles/hot_template.yml
new file mode 100644
index 0000000000..ead437747d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_nested_in_main_file_in_manifest/inputfiles/hot_template.yml
@@ -0,0 +1,112 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ exposed_cmaui_volume:
+ type: number
+ label: CMAUI volume size
+ description: the size of the CMAUI volume
+ cmaui_cinder_volume_size:
+ type: number
+ label: CMAUI Cinder volume size
+ description: the size of the CMAUI Cinder volume
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ oam_net_name:
+ type: string
+ description: UID of OAM network
+ oam_network_netmask:
+ type: string
+ label: oam network netmask
+ description: oam network gateway
+ oam_network_gateway:
+ type: string
+ label: oam network gateway
+ description: oam network gateway
+ external_dns:
+ type: string
+ label: dns server
+ description: dns server
+ external_ntp:
+ type: string
+ label: ntp server
+ description: ntp server
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ timezone:
+ type: string
+ label: timezone
+ description: timezone
+ cmaui_oam_ips:
+ type: comma_delimited_list
+ label: CMAUI oam_net IP addresses
+ description: CMAUI oam_net IP addresses
+ CMAUI_volume_type:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+
+resources:
+
+ cmaui_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ cmaui_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_param: exposed_cmaui_volume}
+ instance_uuid: {get_resource: server_cmaui}
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_0 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ cmaui.mgmt.ip=${cmaui.mgmt.ip}
+ cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
+ cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
+ cmaui.external.dns=${cmaui.external.dns}
+ cmaui.external.ntp=${cmaui.external.ntp}
+ cmaui.node=${cmaui.node}
+ cmaui.timezone=${cmaui.timezone}
+ params:
+ ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 0]}
+ ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${cmaui.external.dns}: {get_param: external_dns}
+ ${cmaui.external.ntp}: {get_param: external_ntp}
+ ${cmaui.node}: {get_param: [cmaui_names, 0]}
+ ${cmaui.timezone}: {get_param: timezone}
+ user_data_format: RAW \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_parallel_to_main_file/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_parallel_to_main_file/expectedoutputfiles/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..09919379e0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_parallel_to_main_file/expectedoutputfiles/MainServiceTemplate.yaml
@@ -0,0 +1,189 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ ContrailComputeGlobalTypes:
+ file: ContrailComputeGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailPortGlobalTypes:
+ file: ContrailPortGlobalTypesServiceTemplate.yaml
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ ContrailAbstractSubstituteGlobalTypes:
+ file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailV2VirtualMachineInterfaceGlobalType:
+ file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: string
+ cmaui_cinder_volume_size:
+ label: CMAUI Cinder volume size
+ hidden: false
+ immutable: false
+ type: float
+ description: the size of the CMAUI Cinder volume
+ timezone:
+ label: timezone
+ hidden: false
+ immutable: false
+ type: string
+ description: timezone
+ security_group_name:
+ label: security group name
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of security group
+ cmaui_volume:
+ label: CMAUI vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ oam_network_netmask:
+ label: oam network netmask
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ vnf_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ oam_network_gateway:
+ label: oam network gateway
+ hidden: false
+ immutable: false
+ type: string
+ description: oam network gateway
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ cmaui_oam_ips:
+ label: CMAUI oam_net IP addresses
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI oam_net IP addresses
+ entry_schema:
+ type: string
+ external_dns:
+ label: dns server
+ hidden: false
+ immutable: false
+ type: string
+ description: dns server
+ oam_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ external_ntp:
+ label: ntp server
+ hidden: false
+ immutable: false
+ type: string
+ description: ntp server
+ CMAUI_volume_type:
+ label: CMAUI vm volume type
+ hidden: false
+ immutable: false
+ type: string
+ description: the name of the target volume backend
+ node_templates:
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ metadata:
+ vnf_id:
+ get_input: vnf_id
+ user_data_format: RAW
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ cmaui_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'
+ cmaui_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: oam_net_name
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ a_vol:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/a_vol.yml
+ description: volume
+ members:
+ - cmaui_volume
+ hot_template:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/hot_template.yml
+ description: cmaui server template for vMMSC
+ members:
+ - server_cmaui
+ - cmaui_port_0 \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_parallel_to_main_file/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_parallel_to_main_file/inputfiles/MANIFEST.json
new file mode 100644
index 0000000000..e35976356f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_parallel_to_main_file/inputfiles/MANIFEST.json
@@ -0,0 +1,16 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create 2 cinder volume attachment",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot_template.yml",
+ "isBase": true,
+ "type": "HEAT"
+ },
+ {
+ "file": "a_vol.yml",
+ "type": "HEAT_VOL"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_parallel_to_main_file/inputfiles/a_vol.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_parallel_to_main_file/inputfiles/a_vol.yml
new file mode 100644
index 0000000000..c32b9461eb
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_parallel_to_main_file/inputfiles/a_vol.yml
@@ -0,0 +1,20 @@
+heat_template_version: 2013-05-23
+
+description: volume
+
+parameters:
+ cmaui_cinder_volume_size:
+ type: number
+ label: CMAUI Cinder volume size
+ description: the size of the CMAUI Cinder volume
+ CMAUI_volume_type:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+
+resources:
+ cmaui_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: cmaui_cinder_volume_size}
+ volume_type: {get_param: CMAUI_volume_type}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_parallel_to_main_file/inputfiles/hot_template.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_parallel_to_main_file/inputfiles/hot_template.yml
new file mode 100644
index 0000000000..2d0ed3c426
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/vol_att/volume_file_parallel_to_main_file/inputfiles/hot_template.yml
@@ -0,0 +1,112 @@
+heat_template_version: 2013-05-23
+
+description: cmaui server template for vMMSC
+
+parameters:
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+ default: This_is_ths_MMSC-CMAUI_id
+ cmaui_names:
+ type: comma_delimited_list
+ description: CMAUI1, CMAUI2 server names
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ cmaui_cinder_volume_size:
+ type: number
+ label: CMAUI Cinder volume size
+ description: the size of the CMAUI Cinder volume
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ oam_net_name:
+ type: string
+ description: UID of OAM network
+ oam_network_netmask:
+ type: string
+ label: oam network netmask
+ description: oam network gateway
+ oam_network_gateway:
+ type: string
+ label: oam network gateway
+ description: oam network gateway
+ external_dns:
+ type: string
+ label: dns server
+ description: dns server
+ external_ntp:
+ type: string
+ label: ntp server
+ description: ntp server
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ timezone:
+ type: string
+ label: timezone
+ description: timezone
+ cmaui_oam_ips:
+ type: comma_delimited_list
+ label: CMAUI oam_net IP addresses
+ description: CMAUI oam_net IP addresses
+ CMAUI_volume_type:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+ cmaui_volume:
+ type: string
+ label: CMAUI vm volume type
+ description: the name of the target volume backend
+
+resources:
+
+ cmaui_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: oam_net_name }
+ fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
+ security_groups: [{get_param: security_group_name}]
+ replacement_policy: AUTO
+
+ cmaui_volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: {get_param: cmaui_volume}
+ instance_uuid: {get_resource: server_cmaui}
+
+ server_cmaui:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [cmaui_names, 0]}
+ image: { get_param: cmaui_image }
+ availability_zone: { get_param: availability_zone_0 }
+ flavor: { get_param: cmaui_flavor }
+ networks:
+ - port: { get_resource: cmaui_port_0 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ user_data:
+ str_replace:
+ template: |
+ cmaui.mgmt.ip=${cmaui.mgmt.ip}
+ cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
+ cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
+ cmaui.external.dns=${cmaui.external.dns}
+ cmaui.external.ntp=${cmaui.external.ntp}
+ cmaui.node=${cmaui.node}
+ cmaui.timezone=${cmaui.timezone}
+ params:
+ ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 0]}
+ ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
+ ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
+ ${cmaui.external.dns}: {get_param: external_dns}
+ ${cmaui.external.ntp}: {get_param: external_ntp}
+ ${cmaui.node}: {get_param: [cmaui_names, 0]}
+ ${cmaui.timezone}: {get_param: timezone}
+ user_data_format: RAW \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/testManifestFormat.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/testManifestFormat.json
new file mode 100644
index 0000000000..38073c6742
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/testManifestFormat.json
@@ -0,0 +1,59 @@
+{
+ "name": "vSRX",
+ "description": "juniper firewall",
+ "version": "0.1",
+ "data": [
+ {
+ "file": "vSRX.yml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "bella.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "im_network_heat.yml",
+ "type": "HEAT_NET"
+ },
+ {
+ "file": "im_volume_heat.yml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "im_nested_heat.yml",
+ "type": "HEAT",
+ "data": [{
+ "file": "alpha.env",
+ "type": "HEAT_ENV"
+ }]
+ },
+ {
+ "file": "vSRX_VM.yml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "bella_vm.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "im_network_heat.yml",
+ "type": "HEAT_NET",
+ "data": [{
+ "file": "mika.env",
+ "type": "HEAT_ENV"
+ }]
+ },
+ {
+ "file": "im_volume_heat.yml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "im_artifact.yml",
+ "type": "CHEF"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/vmme_small_create_fsb/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/vmme_small_create_fsb/MANIFEST.json
new file mode 100644
index 0000000000..02733a6e3f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/vmme_small_create_fsb/MANIFEST.json
@@ -0,0 +1,29 @@
+{
+ "name": "vMME_Small",
+ "description": "HOT template to create vmme 2 fsb 2 ncb 2 gbp 2 vlc",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "vmme_small.yml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "vmme_small.env",
+ "type": "HEAT_ENV"
+ },{
+ "file": "vmme_small_create_fsb.yml",
+ "type": "HEAT_NET",
+ "data":[
+ {
+ "file": "vmme_small_create_fsb.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ }
+ ]
+ },{
+ "file": "create_stack.sh",
+ "type": "SHELL"
+ }
+ ]
+}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/vmme_small_create_fsb/create_stack.sh b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/vmme_small_create_fsb/create_stack.sh
new file mode 100644
index 0000000000..186d1c34fb
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/vmme_small_create_fsb/create_stack.sh
@@ -0,0 +1 @@
+heat stack-create vMME -e vmme_small.env -f vmme_small.yml
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/vmme_small_create_fsb/vmme_small.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/vmme_small_create_fsb/vmme_small.env
new file mode 100644
index 0000000000..e46cfd2a2d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/vmme_small_create_fsb/vmme_small.env
@@ -0,0 +1,97 @@
+parameters:
+ oam_net_id: 47bf4cca-0961-422f-bcd6-d5a4fbb1a351
+ fsb1-name: ZRDM1MMEX33FSB001
+ fsb2-name: ZRDM1MMEX33FSB002
+ ncb1-name: ZRDM1MMEX33NCB001
+ ncb2-name: ZRDM1MMEX33NCB002
+ vlc1-name: ZRDM1MMEX33VLC002
+ vlc2-name: ZRDM1MMEX33VLC002
+ gpb1-name: ZRDM1MMEX33GPB001
+ gpb2-name: ZRDM1MMEX33GPB002
+ epc-sctp-a-net-name: EPC-SCTP-A
+ epc-sctp-a-net-rt: 13979:105717
+ epc-sctp-a-net-cidr: 107.243.37.0/27
+ epc-sctp-a-net-gateway: 107.243.37.1
+ epc-sctp-a-pool-start: 107.243.37.3
+ epc-sctp-a-pool-end: 107.243.37.30
+ epc-sctp-b-net-name: EPC-SCTP-B
+ epc-sctp-b-net-rt: 13979:105719
+ epc-sctp-b-net-cidr: 107.243.37.32/24
+ epc-sctp-b-net-gateway: 107.243.37.33
+ epc-sctp-b-pool-start: 107.243.37.35
+ epc-sctp-b-pool-end: 107.243.37.62
+ epc-gtp-net-name: EPC-GTP
+ epc-gtp-net-rt: 13979:105715
+ epc-gtp-net-cidr: 107.243.37.64/27
+ epc-gtp-net-gateway: 107.243.37.65
+ epc-gtp-pool-start: 107.243.37.67
+ epc-gtp-pool-end: 107.243.37.94
+ fsb1-image: MME_FSB1_15B-CP04-r5a01
+ fsb2-image: MME_FSB2_15B-CP04-r5a01
+ fsb1-flavor: m4.xlarge4
+ fsb2-flavor: m4.xlarge4
+ fsb_zone: nova
+ fsb1-Internal1-mac: 00:80:37:0E:0B:12
+ fsb1-Internal2-mac: 00:81:37:0E:0B:12
+ fsb1-oam-ip: 107.250.172.221
+ fsb2-Internal1-mac: 00:80:37:0E:0D:12
+ fsb2-Internal2-mac: 00:81:37:0E:0D:12
+ fsb2-oam-ip: 107.250.172.222
+ pxe-image: MME_PXE-BOOT_cxp9025898_2r5a01.qcow2
+ ncb-flavor: m4.xlarge4
+ ncb_zone: nova
+ ncb1-Internal1-mac: 00:80:37:0E:09:12
+ ncb1-Internal2-mac: 00:81:37:0E:09:12
+ ncb2-Internal1-mac: 00:80:37:0E:0F:12
+ ncb2-Internal2-mac: 00:81:37:0E:0F:12
+ gpb-flavor: m4.xlarge4
+ gpb_zone: nova
+ gpb1-Internal1-mac: 00:80:37:0E:01:22
+ gpb1-Internal1-ip: 169.254.0.101
+ gpb1-Internal2-mac: 00:81:37:0E:01:22
+ gpb2-Internal1-mac: 00:80:37:0E:02:22
+ gpb2-Internal2-mac: 00:81:37:0E:02:22
+ vlc-flavor: m4.xlarge4
+ vlc_zone: nova
+ vlc1-sctp-a-ip: 107.243.37.3
+ vlc1-sctp-b-ip: 107.243.37.35
+ vlc1-gtp-ip: 107.243.37.67
+ vlc1-oam-ip: 107.250.172.227
+ vlc2-sctp-a-ip: 107.243.37.4
+ vlc2-sctp-b-ip: 107.243.37.36
+ vlc2-gtp-ip: 107.243.37.68
+ vlc2-oam-ip: 107.250.172.228
+ vlc1-Internal1-mac: 00:80:37:0E:01:12
+ vlc1-Internal2-mac: 00:81:37:0E:01:12
+ vlc2-Internal1-mac: 00:80:37:0E:02:12
+ vlc2-Internal2-mac: 00:81:37:0E:02:12
+ Internal1_net_name: vmme_int_int_1
+ Internal1_subnet_name: vmme_int_int_sub_1
+ Internal1_ipam_name: vmme_ipam_int1
+ Internal1_cidr: 169.253.0.0/17
+ Internal1_forwarding_mode: "l2"
+ Internal1_dhcp: "False"
+ Internal1_shared: "False"
+ Internal1_external: "False"
+ Internal1_name: "Internal1-subnet"
+ Internal1_default_gateway: 169.253.0.3
+ Internal1_net_pool_start: 169.253.0.100
+ Internal1_net_pool_end: 169.253.0.254
+ Internal2_net_name: vmme_int_int_2
+ Internal2_subnet_name: vmme_int_int_sub_2
+ Internal2_ipam_name: vmme_ipam_int2
+ Internal2_cidr: 169.255.0.0/17
+ Internal2_shared: "False"
+ Internal2_external: "False"
+ Internal2_forwarding_mode: "l2"
+ Internal2_dhcp: "False"
+ Internal2_name: "Internal2-subnet"
+ Internal2_default_gateway: 169.255.0.3
+ Internal2_net_pool_start: 169.255.0.100
+ Internal2_net_pool_end: 169.255.0.254
+ static_prefix_sctp_a_1: 107.239.40.32/30
+ static_prefix_gtp_1: 107.239.40.96/30
+ static_prefix_sctp_b_1: 107.239.40.64/30
+ VMME_FSB1_boot_volume: 8248e794-6173-4b49-b9c3-8219b0b56f4e
+ VMME_FSB2_boot_volume: 089a0d11-4b15-4370-8343-3f90907b1221
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/vmme_small_create_fsb/vmme_small.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/vmme_small_create_fsb/vmme_small.yml
new file mode 100644
index 0000000000..1050166050
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/vmme_small_create_fsb/vmme_small.yml
@@ -0,0 +1,676 @@
+heat_template_version: 2013-05-23
+
+description: >
+ HOT template to create vmme 2 fsb 2 ncb 2 gbp 2 vlc
+
+parameters:
+ fsb1-oam-ip:
+ type: string
+ fsb2-oam-ip:
+ type: string
+ vlc1-oam-ip:
+ type: string
+ vlc2-oam-ip:
+ type: string
+ Internal1_net_pool_start:
+ type: string
+ Internal1_net_pool_end:
+ type: string
+ Internal2_net_pool_start:
+ type: string
+ Internal2_net_pool_end:
+ type: string
+ Internal1_default_gateway:
+ type: string
+ Internal2_default_gateway:
+ type: string
+ Internal1_shared:
+ type: string
+ Internal1_external:
+ type: string
+ Internal1_net_name:
+ type: string
+ Internal1_subnet_name:
+ type: string
+ Internal1_ipam_name:
+ type: string
+ Internal1_cidr:
+ type: string
+ Internal1_forwarding_mode:
+ type: string
+ Internal1_dhcp:
+ type: string
+ Internal1_name:
+ type: string
+ Internal2_net_name:
+ type: string
+ Internal2_subnet_name:
+ type: string
+ Internal2_ipam_name:
+ type: string
+ Internal2_cidr:
+ type: string
+ Internal2_forwarding_mode:
+ type: string
+ Internal2_dhcp:
+ type: string
+ Internal2_name:
+ type: string
+ Internal2_shared:
+ type: string
+ Internal2_external:
+ type: string
+ vlc1-sctp-a-ip:
+ type: string
+ vlc1-sctp-b-ip:
+ type: string
+ vlc1-gtp-ip:
+ type: string
+ vlc2-sctp-a-ip:
+ type: string
+ vlc2-sctp-b-ip:
+ type: string
+ vlc2-gtp-ip:
+ type: string
+ fsb1-name:
+ type: string
+ description: Name of fsb1
+ fsb2-name:
+ type: string
+ description: Name of fsb1
+ ncb1-name:
+ type: string
+ description: Name of ncb1
+ ncb2-name:
+ type: string
+ description: Name of ncb2
+ vlc1-name:
+ type: string
+ description: Name of vlc1
+ vlc2-name:
+ type: string
+ description: Name of vlc2
+ gpb1-name:
+ type: string
+ description: Name of gpb1
+ gpb2-name:
+ type: string
+ description: Name of gpb2
+ fsb_zone:
+ type: string
+ description: cluster for spawnning fsb instances
+ fsb1-image:
+ type: string
+ description: Name of image to use for server fsb1
+ fsb1-flavor:
+ type: string
+ description: Flavor to use for servers fsb1
+ oam_net_id:
+ type: string
+ description: uuid of oam network
+ fsb1-Internal1-mac:
+ type: string
+ description: static mac address assigned to fsb1-Internal1
+ fsb1-Internal2-mac:
+ type: string
+ description: static mac address assigned to fsb1-Internal2
+ fsb2-image:
+ type: string
+ description: Name of image to use for server fsb2
+ fsb2-flavor:
+ type: string
+ description: Flavor to use for servers fsb2
+ fsb2-Internal1-mac:
+ type: string
+ description: static mac address assigned to fsb2-Internal1
+ fsb2-Internal2-mac:
+ type: string
+ description: static mac address assigned to fsb2-Internal2
+ pxe-image:
+ type: string
+ description: Name of image to use for server ncb
+ ncb-flavor:
+ type: string
+ description: Flavor to use for servers ncb
+ ncb_zone:
+ type: string
+ description: cluster for spawnning ncb instances
+ ncb1-Internal1-mac:
+ type: string
+ description: static mac address assigned to ncb1-Internal1
+ ncb1-Internal2-mac:
+ type: string
+ description: static mac address assigned to ncb1-Internal2
+ ncb2-Internal1-mac:
+ type: string
+ description: static mac address assigned to ncb2-Internal1
+ ncb2-Internal2-mac:
+ type: string
+ description: static mac address assigned to ncb2-Internal2
+ gpb-flavor:
+ type: string
+ description: Flavor to use for servers gpb
+ gpb_zone:
+ type: string
+ description: cluster for spawnning gpb instances
+ gpb1-Internal1-ip:
+ type: string
+ gpb1-Internal1-mac:
+ type: string
+ description: static mac address assigned to gpb1-Internal1
+ gpb1-Internal2-mac:
+ type: string
+ description: static mac address assigned to gpb1-Internal2
+ gpb2-Internal1-mac:
+ type: string
+ description: static mac address assigned to gpb2-Internal1
+ gpb2-Internal2-mac:
+ type: string
+ description: static mac address assigned to gpb2-Internal2
+ vlc-flavor:
+ type: string
+ description: Flavor to use for servers vlc
+ vlc_zone:
+ type: string
+ description: cluster for spawnning vlc instances
+ vlc1-Internal1-mac:
+ type: string
+ description: static mac address assigned to vlc1-Internal1
+ vlc1-Internal2-mac:
+ type: string
+ description: static mac address assigned to vlc1-Internal2
+ vlc2-Internal1-mac:
+ type: string
+ description: static mac address assigned to vlc2-Internal1
+ vlc2-Internal2-mac:
+ type: string
+ description: static mac address assigned to vlc2-Internal2
+ epc-sctp-a-net-name:
+ type: string
+ description: epc-sctp-a net name
+ epc-sctp-a-net-rt:
+ type: string
+ description: epc-sctp-a route target
+ epc-sctp-a-net-cidr:
+ type: string
+ description: epc-sctp-a subnet
+ epc-sctp-a-net-gateway:
+ type: string
+ description: epc-sctp-a-net network gateway
+ epc-sctp-a-pool-start:
+ type: string
+ description: epc-sctp-a-net network ip pool start IP address
+ epc-sctp-a-pool-end:
+ type: string
+ description: epc-sctp-a-net network ip pool end IP address
+ epc-sctp-b-net-name:
+ type: string
+ description: epc-sctp-b net name
+ epc-sctp-b-net-rt:
+ type: string
+ description: epc-sctp-b route target
+ epc-sctp-b-net-cidr:
+ type: string
+ description: epc-sctp-b subnet
+ epc-sctp-b-net-gateway:
+ type: string
+ description: epc-sctp-b-net network gateway
+ epc-sctp-b-pool-start:
+ type: string
+ description: epc-sctp-b-net network ip pool start IP address
+ epc-sctp-b-pool-end:
+ type: string
+ description: epc-sctp-b-net network ip pool end IP address
+ epc-gtp-net-name:
+ type: string
+ description: gtp net name
+ epc-gtp-net-rt:
+ type: string
+ description: gtp route target
+ epc-gtp-net-cidr:
+ type: string
+ description: gtp stubnet
+ epc-gtp-net-gateway:
+ type: string
+ description: gtp network gateway
+ epc-gtp-pool-start:
+ type: string
+ description: gtp network ip pool start IP address
+ epc-gtp-pool-end:
+ type: string
+ description: gtp network ip pool end IP address
+ static_prefix_sctp_a_1:
+ type: string
+ description: Static Prefix
+ static_prefix_sctp_b_1:
+ type: string
+ description: Static Prefix
+ static_prefix_gtp_1:
+ type: string
+ description: Static Prefix
+ VMME_FSB1_boot_volume:
+ type: string
+ VMME_FSB2_boot_volume:
+ type: string
+
+resources:
+ FSB1_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: 3
+ volume_type: {get_param: volume_type}
+ name: {get_param: FSB1_volume_name}
+ image: {get_param: FSB_1_image}
+
+ FSB2_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: volume_size}
+ volume_type: {get_param: volume_type}
+ name: {get_param: FSB2_volume_name}
+ image: {get_param: FSB_2_image}
+
+ Internal1_ipam:
+ type: OS::Contrail::NetworkIpam
+ properties:
+ name: { get_param: Internal1_ipam_name }
+
+ Internal2_ipam:
+ type: OS::Contrail::NetworkIpam
+ properties:
+ name: { get_param: Internal2_ipam_name }
+
+ Internal1-net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: Internal1_net_name }
+ forwarding_mode: { get_param: Internal1_forwarding_mode }
+ shared: { get_param: Internal1_shared }
+ external: true
+# route_targets: { "Fn::Split" : [ ",", Ref: route_targets ] }
+ testConvertGetParamFunctions:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: Internal1_net_name }
+ forwarding_mode: { get_param: Internal1_forwarding_mode }
+ shared: { get_param: Internal1_shared }
+ external: { get_param: [my_instance, networks, private, 0] }
+# route_targets: { "Fn::Split" : [ ",", Ref: route_targets ] }
+ testConvertGetAttributeFunctions:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: Internal1_net_name }
+ forwarding_mode: { get_param: Internal1_forwarding_mode }
+ shared: { get_param: Internal1_shared }
+ external: { get_param: Internal1_external }
+# route_targets: { "Fn::Split" : [ ",", Ref: route_targets ] }
+
+ Internal1-subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: Internal1-net }
+ cidr: { get_param: Internal1_cidr }
+ gateway_ip: { get_param: Internal1_default_gateway }
+ enable_dhcp: { get_param: Internal1_dhcp }
+
+
+# Internal1-subnet:
+# type: OS::Contrail::VnSubnet
+# properties:
+# name: { get_param: Internal1_subnet_name }
+# network: { get_resource: Internal1-net }
+# ip_prefix: { get_param: Internal1_cidr }
+ # ipam: { get_resource: Internal1_ipam }
+ # enable_dhcp: { get_param: Internal1_dhcp }
+ # default_gateway: { get_param: Internal1_default_gateway }
+ # allocation_pools:
+ # - start: { get_param: Internal1_net_pool_start }
+ # end: { get_param: Internal1_net_pool_end }
+
+
+
+ Internal2-net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: Internal2_name }
+ forwarding_mode: { get_param: Internal2_forwarding_mode }
+ shared: { get_param: Internal2_shared }
+ external: { get_param: Internal2_external }
+# route_targets: { "Fn::Split" : [ ",", Ref: route_targets ] }
+
+# Internal2-subnet:
+# type: OS::Contrail::VnSubnet
+# properties:
+# name: { get_param: Internal2_subnet_name }
+# network: { get_resource: Internal2-net }
+# ip_prefix: { get_param: Internal2_cidr }
+# ipam: { get_resource: Internal2_ipam }
+# enable_dhcp: { get_param: Internal2_dhcp }
+# default_gateway: { get_param: Internal2_default_gateway }
+# allocation_pools:
+# - start: { get_param: Internal2_net_pool_start }
+# end: { get_param: Internal2_net_pool_end }
+
+ Internal2-subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: Internal2-net }
+ cidr: { get_param: Internal2_cidr }
+ gateway_ip: { get_param: Internal2_default_gateway }
+ enable_dhcp: { get_param: Internal2_dhcp }
+
+ epc-sctp-a-net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: epc-sctp-a-net-name }
+ route_targets: [ get_param: epc-sctp-a-net-rt ]
+
+
+ epc-sctp-a-subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: epc-sctp-a-net }
+ cidr: { get_param: epc-sctp-a-net-cidr }
+ gateway_ip: { get_param: epc-sctp-a-net-gateway }
+ allocation_pools:
+ - start: { get_param: epc-sctp-a-pool-start }
+ end: { get_param: epc-sctp-a-pool-end }
+
+ epc-sctp-b-net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: epc-sctp-b-net-name }
+ route_targets: [ get_param: epc-sctp-b-net-rt ]
+
+ epc-sctp-b-subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: epc-sctp-b-net }
+ cidr: { get_param: epc-sctp-b-net-cidr }
+ gateway_ip: { get_param: epc-sctp-b-net-gateway }
+ allocation_pools:
+ - start: { get_param: epc-sctp-b-pool-start }
+ end: { get_param: epc-sctp-b-pool-end }
+
+ epc-gtp-net:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ name: { get_param: epc-gtp-net-name }
+ route_targets: [ get_param: epc-gtp-net-rt ]
+
+ epc-gtp-subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: { get_resource: epc-gtp-net }
+ cidr: { get_param: epc-gtp-net-cidr }
+ gateway_ip: { get_param: epc-gtp-net-gateway }
+ allocation_pools:
+ - start: { get_param: epc-gtp-pool-start }
+ end: { get_param: epc-gtp-pool-end }
+
+ FSB1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: fsb1-name }
+ block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB1_boot_volume }, delete_on_termination: "false" }]
+ flavor: { get_param: fsb1-flavor }
+ availability_zone: { get_param: fsb_zone }
+ networks:
+ - port: { get_resource: FSB1_Internal1 }
+ - port: { get_resource: FSB1_Internal2 }
+ - port: { get_resource: FSB1_OAM }
+
+ FSB1_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: Internal1-net }
+ mac_address: { get_param: fsb1-Internal1-mac }
+
+ FSB1_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: Internal2-net }
+ mac_address: { get_param: fsb1-Internal2-mac }
+
+ FSB1_OAM:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: oam_net_id }
+ fixed_ips:
+ - ip_address: { get_param: fsb1-oam-ip }
+
+ FSB2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: fsb2-name }
+ block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+ flavor: { get_param: fsb2-flavor }
+ availability_zone: { get_param: fsb_zone }
+ networks:
+ - port: { get_resource: FSB2_Internal1 }
+ - port: { get_resource: FSB2_Internal2 }
+ - port: { get_resource: FSB2_OAM }
+
+ FSB2_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: Internal1-net }
+ mac_address: { get_param: fsb2-Internal1-mac }
+
+
+ FSB2_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: Internal2-net }
+ mac_address: { get_param: fsb2-Internal2-mac }
+
+ FSB2_OAM:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: oam_net_id }
+ fixed_ips:
+ - ip_address: { get_param: fsb2-oam-ip }
+
+ NCB1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: ncb1-name }
+ image: { get_param: pxe-image }
+ flavor: { get_param: ncb-flavor }
+ availability_zone: { get_param: ncb_zone }
+ networks:
+ - port: { get_resource: NCB1_Internal1 }
+ - port: { get_resource: NCB1_Internal2 }
+
+ NCB1_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: Internal1-net }
+ mac_address: { get_param: ncb1-Internal1-mac }
+
+ NCB1_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: Internal2-net }
+ mac_address: { get_param: ncb1-Internal2-mac }
+
+ NCB2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: ncb2-name }
+ image: { get_param: pxe-image }
+ flavor: { get_param: ncb-flavor }
+ availability_zone: { get_param: ncb_zone }
+ networks:
+ - port: { get_resource: NCB2_Internal1 }
+ - port: { get_resource: NCB2_Internal2 }
+
+ NCB2_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: Internal1-net }
+ mac_address: { get_param: ncb2-Internal1-mac }
+
+ NCB2_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: Internal2-net }
+ mac_address: { get_param: ncb2-Internal2-mac }
+
+ GPB1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: gpb1-name }
+ image: gpb_image
+ flavor: { get_param: gpb-flavor }
+ availability_zone: { get_param: gpb_zone }
+ networks:
+ - port: { get_resource: GPB1_Internal1 }
+ - port: { get_resource: GPB1_Internal2 }
+
+ GPB1_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: Internal1-net }
+ mac_address: { get_param: gpb1-Internal1-mac }
+
+ GPB1_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: Internal2-net }
+ mac_address: { get_param: gpb1-Internal2-mac }
+
+ GPB2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: gpb2-name }
+ image: { get_param: pxe-image }
+ flavor: { get_param: gpb-flavor }
+ availability_zone: { get_param: gpb_zone }
+ networks:
+ - port: { get_resource: GPB2_Internal1 }
+ - port: { get_resource: GPB2_Internal2 }
+
+ GPB2_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: Internal1-net }
+ mac_address: { get_param: gpb2-Internal1-mac }
+
+ GPB2_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: Internal2-net }
+ mac_address: { get_param: gpb2-Internal2-mac }
+
+ VLC1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: vlc1-name }
+ image: { get_param: pxe-image }
+ flavor: { get_param: vlc-flavor }
+ availability_zone: { get_param: vlc_zone }
+ networks:
+ - port: { get_resource: VLC1_Internal1 }
+ - port: { get_resource: VLC1_Internal2 }
+ - port: { get_resource: VLC1_OAM }
+ - port: { get_resource: VLC1_SCTP_A }
+ - port: { get_resource: VLC1_SCTP_B }
+ - port: { get_resource: VLC1_GTP }
+
+ VLC1_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: Internal1-net }
+ mac_address: { get_param: vlc1-Internal1-mac }
+
+ VLC1_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: Internal2-net }
+ mac_address: { get_param: vlc1-Internal2-mac }
+
+ VLC1_OAM:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: oam_net_id }
+ fixed_ips:
+ - ip_address: { get_param: vlc1-oam-ip }
+
+ VLC1_SCTP_A:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: epc-sctp-a-net }
+ fixed_ips:
+ - ip_address: { get_param: vlc1-sctp-a-ip }
+
+ VLC1_SCTP_B:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: epc-sctp-b-net }
+ fixed_ips:
+ - ip_address: { get_param: vlc1-sctp-b-ip }
+
+ VLC1_GTP:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: epc-gtp-net }
+ fixed_ips:
+ - ip_address: { get_param: vlc1-gtp-ip }
+
+ VLC2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: vlc2-name }
+ image: { get_param: pxe-image }
+ flavor: { get_param: vlc-flavor }
+ availability_zone: { get_param: vlc_zone }
+ networks:
+ - port: { get_resource: VLC2_Internal1 }
+ - port: { get_resource: VLC2_Internal2 }
+ - port: { get_resource: VLC2_OAM }
+ - port: { get_resource: VLC2_SCTP_A }
+ - port: { get_resource: VLC2_SCTP_B }
+ - port: { get_resource: VLC2_GTP }
+
+
+ VLC2_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: Internal1-net }
+ mac_address: { get_param: vlc2-Internal1-mac }
+
+ VLC2_OAM:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: oam_net_id }
+ fixed_ips:
+ - ip_address: { get_param: vlc2-oam-ip }
+
+ VLC2_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: Internal2-net }
+ mac_address: { get_param: vlc2-Internal2-mac }
+
+ VLC2_SCTP_A:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: epc-sctp-a-net }
+ fixed_ips:
+ - ip_address: { get_param: vlc2-sctp-a-ip }
+
+ VLC2_SCTP_B:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: epc-sctp-b-net }
+ fixed_ips:
+ - ip_address: { get_param: vlc2-sctp-b-ip }
+
+ VLC2_GTP:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_resource: epc-gtp-net }
+ fixed_ips:
+ - ip_address: { get_param: vlc2-gtp-ip }
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/vmme_small_create_fsb/vmme_small_create_fsb.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/vmme_small_create_fsb/vmme_small_create_fsb.env
new file mode 100644
index 0000000000..750bb2dd44
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/vmme_small_create_fsb/vmme_small_create_fsb.env
@@ -0,0 +1,8 @@
+parameters:
+ volume_type: Gold
+ volume_size: 320
+ FSB_1_image: MME_FSB1_15B-CP04-r5a01
+ FSB_2_image: MME_FSB2_15B-CP04-r5a01
+ FSB1_volume_name: vFSB1_1_Vol_1
+ FSB2_volume_name: vFSB2_1_Vol_1
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/vmme_small_create_fsb/vmme_small_create_fsb.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/vmme_small_create_fsb/vmme_small_create_fsb.yml
new file mode 100644
index 0000000000..2d695a50c1
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/vmme_small_create_fsb/vmme_small_create_fsb.yml
@@ -0,0 +1,54 @@
+heat_template_version: 2013-05-23
+
+description: server template for vMME
+
+parameters:
+
+ volume_type:
+ type: string
+ label: volume type
+ description: volume type Gold
+
+ volume_size:
+ type: number
+ label: volume size
+ description: my volume size 320GB
+
+ FSB_1_image:
+ type: string
+ label: MME_FSB1
+ description: MME_FSB1_15B-CP04-r5a01
+
+ FSB_2_image:
+ type: string
+ label: MME_FSB2
+ description: MME_FSB2_15B-CP04-r5a01
+
+ FSB1_volume_name:
+ type: string
+ label: FSB1_volume
+ description: FSB1_volume_1
+
+ FSB2_volume_name:
+ type: string
+ label: FSB2_volume
+ description: FSB2_volume_1
+
+resources:
+
+ FSB1_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: volume_size}
+ volume_type: {get_param: volume_type}
+ name: {get_param: FSB1_volume_name}
+ image: {get_param: FSB_1_image}
+
+ FSB2_volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: {get_param: volume_size}
+ volume_type: {get_param: volume_type}
+ name: {get_param: FSB2_volume_name}
+ image: {get_param: FSB_2_image}
+
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/pom.xml b/openecomp-be/lib/openecomp-sdc-translator-lib/pom.xml
new file mode 100644
index 0000000000..6fec777238
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/pom.xml
@@ -0,0 +1,37 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <packaging>pom</packaging>
+ <parent>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <groupId>org.openecomp.sdc</groupId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <name>openecomp-sdc-translator-lib</name>
+ <artifactId>openecomp-sdc-translator-lib</artifactId>
+
+ <modules>
+ <module>openecomp-sdc-translator-api</module>
+ <module>openecomp-sdc-translator-core</module>
+ </modules>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-translator-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-translator-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <!--dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-common-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency-->
+ </dependencies>
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/pom.xml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/pom.xml
new file mode 100644
index 0000000000..4f92b644c4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/pom.xml
@@ -0,0 +1,38 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../..</relativePath>
+ </parent>
+
+ <name>openecomp-sdc-validation-api</name>
+ <artifactId>openecomp-sdc-validation-api</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-facade-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.swagger</groupId>
+ <artifactId>swagger-annotations</artifactId>
+ <version>1.5.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-datatypes-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <version>1.1.2</version>
+ </dependency>
+ </dependencies>
+
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/api/ValidationManager.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/api/ValidationManager.java
new file mode 100644
index 0000000000..d18af3a27b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/api/ValidationManager.java
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.validation.api;
+
+
+import org.openecomp.sdc.datatypes.error.ErrorMessage;
+
+import java.util.List;
+import java.util.Map;
+
+public interface ValidationManager {
+
+ Map<String, List<ErrorMessage>> validate();
+
+ void addFile(String fileName, byte[] validationContent);
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/errors/ErrorMessagesFormatBuilder.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/errors/ErrorMessagesFormatBuilder.java
new file mode 100644
index 0000000000..210ce76c41
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/errors/ErrorMessagesFormatBuilder.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.validation.errors;
+
+public class ErrorMessagesFormatBuilder {
+
+ public static String getErrorWithParameters(String error, String... params) {
+ return String.format(error, params);
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/errors/Messages.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/errors/Messages.java
new file mode 100644
index 0000000000..bca4e820a9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/errors/Messages.java
@@ -0,0 +1,117 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.validation.errors;
+
+public enum Messages {
+ INVALID_ZIP_FILE("Invalid zip file"),
+ /* upload errors */
+
+ //NO_ZIP_UPLOADED("No zip file was uploaded or zip file doesn't exist"),
+ ZIP_SHOULD_NOT_CONTAIN_FOLDERS("Zip file should not contain folders"),
+ MANIFEST_NOT_EXIST("Manifest doesn't exist"),
+ NO_ZIP_FILE_WAS_UPLOADED_OR_ZIP_NOT_EXIST("no zip file was uploaded or zip file doesn't exist"),
+
+
+ /* manifest errors*/
+ MISSING_FILE_IN_ZIP("Missing file in zip"),
+ MISSING_FILE_IN_MANIFEST("Missing file in manifest"),
+ MISSING_FILE_NAME_IN_MANIFEST("Missing file name in manifest - %s"),
+ MISSING_NESTED_FILE("Missing nested file - %s"),
+ MISSING_ARTIFACT("Missing artifact - %s"),
+ WRONG_HEAT_FILE_EXTENSION("Wrong HEAT file extension - %s"),
+ WRONG_ENV_FILE_EXTENSION("Wrong ENV file extension - %s"),
+ INVALID_MANIFEST_FILE("invalid manifest file"),
+ INVALID_FILE_TYPE("Missing or Unknown file type in Manifest"),
+ ENV_NOT_ASSOCIATED_TO_HEAT("ENV file must be associated to a HEAT file"),
+
+ /* content errors*/
+ INVALID_YAML_FORMAT("Invalid YAML format - %s"),
+ INVALID_YAML_FORMAT_REASON("Invalid YAML format Problem - [%s]"),
+ EMPTY_YAML_FILE("empty yaml"),
+ GENERAL_YAML_PARSER_ERROR("general parser error"),
+ GENERAL_HEAT_PARSER_ERROR("general parser error"),
+ INVALID_HEAT_FORMAT_REASON("Invalid HEAT format problem - [%s]"),
+ MISSING_RESOURCE_IN_DEPENDS_ON("a Missing resource in depend On Missing Resource ID [%s]"),
+ REFERENCED_PARAMETER_NOT_FOUND("Referenced parameter - %s - not found, used in resource - %s"),
+ GET_ATTR_NOT_FOUND("get_attr attribute not found - %s in resource %s"),
+ MISSING_PARAMETER_IN_NESTED(
+ "Referenced parameter not found in nested file - %s, resource name - %s, "
+ + "parameter name - %s"),
+ NESTED_LOOP("Nested files loop - %s"),
+ MORE_THAN_ONE_BIND_FROM_NOVA_TO_PORT("Resource Port %s exceed allowed relations from NovaServer"),
+ SERVER_NOT_DEFINED_FROM_NOVA("Missing server group definition - %s, %s"),
+ WRONG_POLICY_IN_SERVER_GROUP("Wrong policy in server group - %s"),
+ MISSING_IMAGE_AND_FLAVOR("Missing both Image and Flavor in NOVA Server - %s"),
+ ENV_INCLUDES_PARAMETER_NOT_IN_HEAT("Env file %s includes a parameter not in HEAT - %s"),
+ PARAMETER_ENV_VALUE_NOT_ALIGN_WITH_TYPE("Parameter env value %s not align with type"),
+ PARAMETER_DEFAULT_VALUE_NOT_ALIGN_WITH_TYPE(
+ "Parameter - %s default value not align with type %s"),
+ INVALID_RESOURCE_TYPE("A resource has an invalid or unsupported type - %s, Resource ID [%s]"),
+ ARTIFACT_FILE_NOT_REFERENCED("Artifact file is not referenced."),
+ SERVER_OR_SECURITY_GROUP_NOT_IN_USE("%s not in use, Resource Id [%s]"),
+ PORT_NO_BIND_TO_ANY_NOVA_SERVER("Port not bind to any NOVA Server, Resource Id [%s]"),
+ INVALID_GET_RESOURCE_SYNTAX(
+ "invalid get_resource syntax is in use - %s , get_resource function should"
+ + " get the resource id of the referenced resource"),
+ INVALID_RESOURCE_GROUP_TYPE(
+ "OS::Heat::ResourceGroup resource with resource_def which is not "
+ + "pointing to nested heat file is not supported,"
+ + " Resource ID [%s], resource_def type [%s]"),
+
+ /* warnings */
+ REFERENCED_RESOURCE_NOT_FOUND("Referenced resource - %s not found"),
+ MISSING_GET_PARAM("Missing get_param in %s, Resource Id [%s]"),
+
+ /*Ecomp Guide lines*/
+ MISSING_NOVA_SERVER_METADATA("Missing Nova Server Metadata property Resource id [%s]"),
+ MISSING_NOVA_SERVER_VNF_ID("Missing VNF_ID Resource id [%s]"),
+ MISSING_NOVA_SERVER_VF_MODULE_ID("Missing VF_MODULE_ID, Resource id [%s]"),
+ NETWORK_PARAM_NOT_ALIGNED_WITH_GUIDE_LINE(
+ "Network Parameter Name not aligned with Guidelines Parameter Name [%s] Resource ID [%s]"),
+ MISSIN_BASE_HEAT_FILE(
+ "Missing Base HEAT. Pay attention that without Base HEAT, there will be no shared resources"),
+ MULTI_BASE_HEAT_FILE("Multi Base HEAT. Expected only one. Files %s."),
+ RESOURCE_NOT_DEFINED_IN_OUTPUT(
+ "Resource is not defined as output and thus cannot be Shared. resource id - %s"),
+ RESOURCE_CONNECTED_TO_TWO_EXTERNAL_NETWORKS_WITH_SAME_ROLE(
+ "A resource is connected twice to the same network role Resource ID [%s] Network Role [%s]."),
+ VOLUME_HEAT_NOT_EXPOSED("Volume is not defined as output and thus cannot be attached %s"),
+ FLOATING_IP_NOT_IN_USE("OS::Neutron::FloatingIP is in use, Resource ID [%s]"),
+ FIXED_IPS_NOT_ALIGNED_WITH_GUIDE_LINES("Fixed_IPS not aligned with Guidelines, Resource ID [%s]"),
+ NOVA_SERVER_NAME_NOT_ALIGNED_WITH_GUIDE_LINES(
+ "Server Name not aligned with Guidelines, Resource ID [%s]"),
+ AVAILABILITY_ZONE_NOT_ALIGNED_WITH_GUIDE_LINES(
+ "Server Availability Zone not aligned with Guidelines, Resource ID [%s]"),
+ WRONG_IMAGE_OR_FLAVOR_NAME_NOVA_SERVER("Wrong %s name format in NOVA Server, Resource ID [%s]");
+
+
+ private String errorMessage;
+
+ Messages(String errorMessage) {
+ this.errorMessage = errorMessage;
+ }
+
+ public String getErrorMessage() {
+ return errorMessage;
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/factory/ValidationManagerFactory.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/factory/ValidationManagerFactory.java
new file mode 100644
index 0000000000..6031bc14f7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/factory/ValidationManagerFactory.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.validation.factory;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+import org.openecomp.core.validation.api.ValidationManager;
+
+public abstract class ValidationManagerFactory extends AbstractComponentFactory<ValidationManager> {
+
+ public static ValidationManagerFactory getInstance() {
+ return AbstractFactory.getInstance(ValidationManagerFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/interfaces/Validator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/interfaces/Validator.java
new file mode 100644
index 0000000000..e32dfd72b9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/interfaces/Validator.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.validation.interfaces;
+
+import org.openecomp.core.validation.types.GlobalValidationContext;
+
+public interface Validator {
+
+ //public void validate(String fileName, GlobalValidationContext globalContext);
+ void validate(GlobalValidationContext globalContext);
+ //Object convert(FileValidationContext
+ // fileValidationContext);
+
+ /*default boolean filter(FileValidationContext filecontext,
+ GlobalValidationContext globalValidationContext){
+ return true;
+ }*/
+}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/types/FileValidationContext.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/types/FileValidationContext.java
new file mode 100644
index 0000000000..81e8931dab
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/types/FileValidationContext.java
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.validation.types;
+
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
+public class FileValidationContext {
+ private String fileName;
+ private MessageContainer messageContainer = new MessageContainer();
+ private byte[] content;
+
+ public FileValidationContext(String fileName, byte[] fileContent) {
+ this.fileName = fileName;
+ this.content = fileContent;
+ }
+
+
+ MessageContainer getMessageContainer() {
+ return this.messageContainer;
+ }
+
+ public InputStream getContent() {
+ return new ByteArrayInputStream(content);
+ }
+
+ public String getFileName() {
+ return this.fileName;
+ }
+
+ public boolean isEmpty() {
+ return content == null || content.length == 0;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/types/GlobalValidationContext.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/types/GlobalValidationContext.java
new file mode 100644
index 0000000000..e6917e84f6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/types/GlobalValidationContext.java
@@ -0,0 +1,142 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.validation.types;
+
+import org.apache.commons.collections4.CollectionUtils;
+import org.openecomp.core.utilities.CommonMethods;
+import org.openecomp.core.validation.interfaces.Validator;
+import org.openecomp.sdc.common.utils.AsdcCommon;
+import org.openecomp.sdc.datatypes.error.ErrorLevel;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.InputStream;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.function.BiPredicate;
+import java.util.stream.Collectors;
+
+public class GlobalValidationContext {
+
+ private static Logger logger = LoggerFactory.getLogger(Validator.class);
+ private Map<String, FileValidationContext> fileContextMap = new HashMap<>();
+ private Map<String, MessageContainer> messageContainerMap = new HashMap<>();
+
+ /**
+ * Add message.
+ *
+ * @param fileName the file name
+ * @param level the level
+ * @param message the message
+ */
+ public void addMessage(String fileName, ErrorLevel level, String message) {
+
+ printLog(fileName, message, level);
+
+ if (fileContextMap.containsKey(fileName)) {
+ fileContextMap.get(fileName).getMessageContainer().getMessageBuilder().setMessage(message)
+ .setLevel(level).create();
+ } else {
+ if (CommonMethods.isEmpty(fileName)) {
+ fileName = AsdcCommon.UPLOAD_FILE;
+ }
+ MessageContainer messageContainer;
+ synchronized (this) {
+ messageContainer = messageContainerMap.get(fileName);
+ if (messageContainer == null) {
+ messageContainer = new MessageContainer();
+ messageContainerMap.put(fileName, messageContainer);
+ }
+ }
+ messageContainer.getMessageBuilder().setMessage(message).setLevel(level).create();
+ }
+ }
+
+ /**
+ * Gets file content.
+ *
+ * @param fileName the file name
+ * @return the file content
+ */
+ public InputStream getFileContent(String fileName) {
+ FileValidationContext fileContext = fileContextMap.get(fileName);
+ if (fileContext == null || fileContext.isEmpty()) {
+ return null;
+ }
+ return fileContext.getContent();
+ }
+
+ public void addFileContext(String fileName, byte[] fileContent) {
+ fileContextMap.put(fileName, new FileValidationContext(fileName, fileContent));
+ }
+
+ /**
+ * Gets context message containers.
+ *
+ * @return the context message containers
+ */
+ public Map<String, MessageContainer> getContextMessageContainers() {
+
+ Map<String, MessageContainer> contextMessageContainer = new HashMap<>();
+ fileContextMap.entrySet().stream().filter(entry -> CollectionUtils
+ .isNotEmpty(entry.getValue().getMessageContainer().getErrorMessageList())).forEach(
+ entry -> contextMessageContainer.put(
+ entry.getKey(), entry.getValue().getMessageContainer()));
+ messageContainerMap.entrySet().stream()
+ .filter(entry -> CollectionUtils.isNotEmpty(entry.getValue().getErrorMessageList()))
+ .forEach(entry -> contextMessageContainer.put(entry.getKey(), entry.getValue()));
+ return contextMessageContainer;
+ }
+
+ public Map<String, FileValidationContext> getFileContextMap() {
+ return fileContextMap;
+ }
+
+ private void printLog(String fileName, String message, ErrorLevel level) {
+
+ String messageToPrint = message + " in file[" + fileName + "]";
+
+ switch (level) {
+ case ERROR:
+ logger.error(messageToPrint);
+ break;
+ case WARNING:
+ logger.warn(messageToPrint);
+ break;
+ case INFO:
+ logger.info(messageToPrint);
+ break;
+ default:
+ break;
+ }
+ }
+
+ public Collection<String> files(BiPredicate<String, GlobalValidationContext> func) {
+ return fileContextMap.keySet().stream().filter(t -> func.test(t, this))
+ .collect(Collectors.toList());
+ }
+
+ public Collection<String> getFiles() {
+ return this.getFileContextMap().keySet();
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/types/MessageContainer.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/types/MessageContainer.java
new file mode 100644
index 0000000000..9d37bade67
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/types/MessageContainer.java
@@ -0,0 +1,82 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.validation.types;
+
+import org.openecomp.sdc.datatypes.error.ErrorLevel;
+import org.openecomp.sdc.datatypes.error.ErrorMessage;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.function.Predicate;
+
+public class MessageContainer {
+
+ private List<ErrorMessage> errorMessageList = new ArrayList<>();
+
+ public List<ErrorMessage> getErrorMessageList() {
+ return errorMessageList;
+ }
+
+ public MessageBuilder getMessageBuilder() {
+ return new MessageBuilder();
+ }
+
+ /**
+ * Gets error message list by level.
+ *
+ * @param level the level
+ * @return the error message list by level
+ */
+ public List<ErrorMessage> getErrorMessageListByLevel(ErrorLevel level) {
+
+ List<ErrorMessage> errors = new ArrayList<>();
+ errorMessageList.stream().filter(new Predicate<ErrorMessage>() {
+ @Override
+ public boolean test(ErrorMessage errorMessage) {
+ return errorMessage.getLevel().equals(level);
+ }
+ }).forEach(errorMessage -> errors.add(errorMessage));
+ return errors;
+ }
+
+ public class MessageBuilder {
+
+ String message;
+ ErrorLevel level;
+
+ MessageBuilder setMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ MessageBuilder setLevel(ErrorLevel level) {
+ this.level = level;
+ return this;
+ }
+
+ void create() {
+ ErrorMessage errorMessage = new ErrorMessage(level, message);
+ if (!errorMessageList.contains(errorMessage)) {
+ errorMessageList.add(errorMessage);
+ }
+ }
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/types/MessageContainerUtil.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/types/MessageContainerUtil.java
new file mode 100644
index 0000000000..c678bb5014
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/types/MessageContainerUtil.java
@@ -0,0 +1,64 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.core.validation.types;
+
+import org.openecomp.sdc.datatypes.error.ErrorLevel;
+import org.openecomp.sdc.datatypes.error.ErrorMessage;
+
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class MessageContainerUtil {
+
+ /**
+ * Gets message by level.
+ *
+ * @param level the level
+ * @param messages the messages
+ * @return the message by level
+ */
+ public static Map<String,
+ List<ErrorMessage>> getMessageByLevel(
+ ErrorLevel level,Map<String,List<ErrorMessage>> messages) {
+ if (messages == null) {
+ return null;
+ }
+ Map<String, List<ErrorMessage>> filteredMessages = new HashMap<>();
+ messages.entrySet().stream().forEach(
+ entry -> entry.getValue().stream().filter(message -> message.getLevel().equals(level))
+ .forEach(message -> addMessage(entry.getKey(), message, filteredMessages
+ )));
+ return filteredMessages;
+ }
+
+ private static void addMessage(String fileName, ErrorMessage message,
+ Map<String, List<ErrorMessage>> messages) {
+ List<ErrorMessage> messageList = messages.get(fileName);
+ if (messageList == null) {
+ messageList = new ArrayList<>();
+ messages.put(fileName, messageList);
+ }
+ messageList.add(message);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/resources/factoryConfiguration.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/resources/factoryConfiguration.json
new file mode 100644
index 0000000000..42a5583bdf
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/resources/factoryConfiguration.json
@@ -0,0 +1,3 @@
+{
+ "org.openecomp.core.validation.factory.ValidationManagerFactory":"org.openecomp.sdc.validation.impl.ValidationManagerFactoryImpl"
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/resources/validationConfiguration.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/resources/validationConfiguration.json
new file mode 100644
index 0000000000..971f4274d9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/resources/validationConfiguration.json
@@ -0,0 +1,24 @@
+{
+ "validatorConfigurationList": [
+ {
+ "name": "yamlValidator",
+ "enableInd": true,
+ "implementationClass": "org.openecomp.sdc.validation.impl.validators.YamlValidator"
+ },
+ {
+ "name": "heatValidator",
+ "enableInd": true,
+ "implementationClass": "org.openecomp.sdc.validation.impl.validators.HeatValidator"
+ },
+ {
+ "name": "manifestValidator",
+ "enableInd": true,
+ "implementationClass": "org.openecomp.sdc.validation.impl.validators.ManifestValidator"
+ },
+ {
+ "name": "ecompGuideLineValidator",
+ "enableInd": true,
+ "implementationClass": "org.openecomp.sdc.validation.impl.validators.EcompGuideLineValidator"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/pom.xml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/pom.xml
new file mode 100644
index 0000000000..9a68e2e11e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/pom.xml
@@ -0,0 +1,93 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../..</relativePath>
+ </parent>
+
+ <name>openecomp-sdc-validation-core</name>
+ <artifactId>openecomp-sdc-validation-core</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.google.code.gson</groupId>
+ <artifactId>gson</artifactId>
+ <version>2.3.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.yaml</groupId>
+ <artifactId>snakeyaml</artifactId>
+ <version>1.14</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.7.10</version>
+
+ </dependency>
+
+
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <version>1.1.2</version>
+
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <scope>test</scope>
+ <version>6.8.5</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>snakeyaml</artifactId>
+ <groupId>org.yaml</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>RELEASE</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-utilities-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-validation-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-validation-impl</artifactId>
+ <version>${project.version}</version>
+ <!--scope>runtime</scope-->
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-datatypes-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <scope>test</scope>
+ <version>1.10.19</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <version>19.0</version>
+ </dependency>
+ </dependencies>
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/main/java/org/openecomp/sdc/validation/impl/ValidationManagerFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/main/java/org/openecomp/sdc/validation/impl/ValidationManagerFactoryImpl.java
new file mode 100644
index 0000000000..87d4dd8118
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/main/java/org/openecomp/sdc/validation/impl/ValidationManagerFactoryImpl.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.validation.impl;
+
+
+import org.openecomp.core.validation.api.ValidationManager;
+import org.openecomp.core.validation.factory.ValidationManagerFactory;
+
+
+public class ValidationManagerFactoryImpl extends ValidationManagerFactory {
+
+ @Override
+ public ValidationManager createInterface() {
+ return new ValidationManagerImpl();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/main/java/org/openecomp/sdc/validation/impl/ValidationManagerImpl.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/main/java/org/openecomp/sdc/validation/impl/ValidationManagerImpl.java
new file mode 100644
index 0000000000..64c409b463
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/main/java/org/openecomp/sdc/validation/impl/ValidationManagerImpl.java
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.validation.impl;
+
+import org.apache.commons.collections4.CollectionUtils;
+import org.openecomp.core.validation.api.ValidationManager;
+import org.openecomp.core.validation.interfaces.Validator;
+import org.openecomp.core.validation.types.GlobalValidationContext;
+import org.openecomp.core.validation.types.MessageContainer;
+import org.openecomp.sdc.datatypes.error.ErrorMessage;
+import org.openecomp.sdc.validation.utils.ValidationConfigurationManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class ValidationManagerImpl implements ValidationManager {
+
+ private static Logger logger = LoggerFactory.getLogger(ValidationManagerImpl.class);
+ private GlobalValidationContext globalContext;
+ private List<Validator> validators;
+
+ public ValidationManagerImpl() {
+ globalContext = new GlobalValidationContext();
+ validators = ValidationConfigurationManager.initValidators();
+ }
+
+ @Override
+ public void addFile(String fileName, byte[] fileContent) {
+ globalContext.addFileContext(fileName, fileContent);
+ }
+
+ @Override
+ public Map<String, List<ErrorMessage>> validate() {
+ for (Validator validator : validators) {
+ validator.validate(globalContext);
+ }
+ return convertMessageContainsToErrorMessage(globalContext.getContextMessageContainers());
+ }
+
+ private Map<String, List<ErrorMessage>> convertMessageContainsToErrorMessage(
+ Map<String, MessageContainer> contextMessageContainers) {
+ Map<String, List<ErrorMessage>> errors = new HashMap<>();
+ contextMessageContainers.entrySet().stream()
+ .filter(entry -> CollectionUtils.isNotEmpty(entry.getValue().getErrorMessageList()))
+ .forEach(entry -> errors.put(entry.getKey(), entry.getValue().getErrorMessageList()));
+ return errors;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/main/java/org/openecomp/sdc/validation/utils/ValidationConfiguration.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/main/java/org/openecomp/sdc/validation/utils/ValidationConfiguration.java
new file mode 100644
index 0000000000..1a74e1cc34
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/main/java/org/openecomp/sdc/validation/utils/ValidationConfiguration.java
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.validation.utils;
+
+import java.util.Collections;
+import java.util.List;
+
+public class ValidationConfiguration {
+ private List<ValidatorConfiguration> validatorConfigurationList;
+
+ public List<ValidatorConfiguration> getValidatorConfigurationList() {
+ return Collections.unmodifiableList(validatorConfigurationList);
+ }
+
+ public void setValidatorConfigurationList(
+ List<ValidatorConfiguration> validatorConfigurationList) {
+ this.validatorConfigurationList = validatorConfigurationList;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/main/java/org/openecomp/sdc/validation/utils/ValidationConfigurationManager.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/main/java/org/openecomp/sdc/validation/utils/ValidationConfigurationManager.java
new file mode 100644
index 0000000000..cc921ce985
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/main/java/org/openecomp/sdc/validation/utils/ValidationConfigurationManager.java
@@ -0,0 +1,74 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.validation.utils;
+
+import org.apache.commons.collections4.CollectionUtils;
+import org.openecomp.core.utilities.CommonMethods;
+import org.openecomp.core.utilities.file.FileUtils;
+import org.openecomp.core.utilities.json.JsonUtil;
+import org.openecomp.core.validation.interfaces.Validator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+public class ValidationConfigurationManager {
+
+ private static final String VALIDATION_CONFIGURATION = "validationConfiguration.json";
+ private static final List<Validator> validators = new ArrayList<>();
+ private static Logger logger = LoggerFactory.getLogger(ValidationConfigurationManager.class);
+
+ /**
+ * Init validators list.
+ *
+ * @return the list
+ */
+ public static List<Validator> initValidators() {
+ synchronized (validators) {
+ if (CollectionUtils.isEmpty(validators)) {
+ InputStream validationConfigurationJson =
+ FileUtils.getFileInputStream(VALIDATION_CONFIGURATION);
+ ValidationConfiguration validationConfiguration =
+ JsonUtil.json2Object(validationConfigurationJson, ValidationConfiguration.class);
+ List<ValidatorConfiguration> conf = validationConfiguration.getValidatorConfigurationList();
+ conf.stream().filter(ValidatorConfiguration::isEnableInd).forEachOrdered(
+ validatorConfiguration -> validators.add(validatorInit(validatorConfiguration)));
+ }
+ }
+ return validators;
+ }
+
+ private static Validator validatorInit(ValidatorConfiguration validatorConf) {
+ Validator validator = null;
+ try {
+ validator =
+ CommonMethods.newInstance(validatorConf.getImplementationClass(), Validator.class);
+ } catch (IllegalArgumentException iae) {
+ logger.error("Validator:" + validatorConf.getName() + " Class:"
+ + validatorConf.getImplementationClass() + " failed in initialization. error:"
+ + iae.toString() + " trace:" + Arrays.toString(iae.getStackTrace()));
+ }
+ return validator;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/main/java/org/openecomp/sdc/validation/utils/ValidationManagerUtil.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/main/java/org/openecomp/sdc/validation/utils/ValidationManagerUtil.java
new file mode 100644
index 0000000000..960bdc2165
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/main/java/org/openecomp/sdc/validation/utils/ValidationManagerUtil.java
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.validation.utils;
+
+import org.openecomp.core.utilities.file.FileContentHandler;
+import org.openecomp.core.utilities.file.FileUtils;
+import org.openecomp.core.validation.api.ValidationManager;
+import org.openecomp.core.validation.errors.Messages;
+import org.openecomp.core.validation.factory.ValidationManagerFactory;
+import org.openecomp.sdc.common.utils.AsdcCommon;
+import org.openecomp.sdc.datatypes.error.ErrorLevel;
+import org.openecomp.sdc.datatypes.error.ErrorMessage;
+
+import java.io.InputStream;
+import java.util.List;
+import java.util.Map;
+
+public class ValidationManagerUtil {
+
+ /**
+ * Handle missing manifest.
+ *
+ * @param fileContentMap the file content map
+ * @param errors the errors
+ */
+ public static void handleMissingManifest(FileContentHandler fileContentMap,
+ Map<String, List<ErrorMessage>> errors) {
+ InputStream manifest = fileContentMap.getFileContent(AsdcCommon.MANIFEST_NAME);
+ if (manifest == null) {
+ ErrorMessage.ErrorMessageUtil.addMessage(AsdcCommon.MANIFEST_NAME, errors)
+ .add(new ErrorMessage(ErrorLevel.ERROR, Messages.MANIFEST_NOT_EXIST.getErrorMessage()));
+ }
+ }
+
+ /**
+ * Init validation manager validation manager.
+ *
+ * @param fileContentMap the file content map
+ * @return the validation manager
+ */
+ public static ValidationManager initValidationManager(FileContentHandler fileContentMap) {
+ ValidationManager validationManager = ValidationManagerFactory.getInstance().createInterface();
+ fileContentMap.getFileList().stream().forEach(fileName -> validationManager
+ .addFile(fileName, FileUtils.toByteArray(fileContentMap.getFileContent(fileName))));
+ return validationManager;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/main/java/org/openecomp/sdc/validation/utils/ValidatorConfiguration.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/main/java/org/openecomp/sdc/validation/utils/ValidatorConfiguration.java
new file mode 100644
index 0000000000..12feb641ae
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/main/java/org/openecomp/sdc/validation/utils/ValidatorConfiguration.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.validation.utils;
+
+public class ValidatorConfiguration {
+ private String name;
+ private boolean enableInd = true;
+ private String implementationClass;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public boolean isEnableInd() {
+ return enableInd;
+ }
+
+ public void setEnableInd(boolean enableInd) {
+ this.enableInd = enableInd;
+ }
+
+ public String getImplementationClass() {
+ return implementationClass;
+ }
+
+ public void setImplementationClass(String implementationClass) {
+ this.implementationClass = implementationClass;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/java/org/openecomp/sdc/heat/services/tree/HeatTreeManagerTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/java/org/openecomp/sdc/heat/services/tree/HeatTreeManagerTest.java
new file mode 100644
index 0000000000..6a9f8df12d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/java/org/openecomp/sdc/heat/services/tree/HeatTreeManagerTest.java
@@ -0,0 +1,51 @@
+package org.openecomp.sdc.heat.services.tree;
+
+import org.openecomp.sdc.heat.datatypes.structure.HeatStructureTree;
+import org.openecomp.core.utilities.file.FileContentHandler;
+import org.openecomp.core.utilities.file.FileUtils;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.net.URL;
+
+public class HeatTreeManagerTest {
+
+ @Test
+ public void testHeatTreeCreation() {
+
+ FileContentHandler fileContentMap = new FileContentHandler();
+ URL url = this.getClass().getResource("/heatTreeValidationOutput");
+
+ File templateDir = new File(url.getFile());
+ File[] files = templateDir.listFiles();
+
+ if (files == null || files.length == 0) {
+ return;
+ }
+
+ for (File file : files) {
+ fileContentMap.addFile(file.getName(), getFileContent(file));
+ }
+
+ HeatTreeManager heatTreeManager = HeatTreeManagerUtil.initHeatTreeManager(fileContentMap);
+ heatTreeManager.createTree();
+ HeatStructureTree tree = heatTreeManager.getTree();
+ Assert.assertNotNull(tree);
+ Assert.assertEquals(tree.getHEAT().size(), 2);
+ }
+
+ private byte[] getFileContent(File file) {
+ try {
+ return FileUtils.toByteArray(new FileInputStream(file));
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ return new byte[0];
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/MANIFEST.json
new file mode 100644
index 0000000000..f1553f5c74
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/MANIFEST.json
@@ -0,0 +1,35 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "hot-nimbus-psm_volume.yaml",
+ "type": "HEAT_VOL"
+ },
+ {
+ "file": "nested-pps_v1.0.yaml",
+ "type": "HEAT"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..809835d2b8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,12 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+ mock_param: abskdjska
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..d3318ee0ca
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,94 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ default: True
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ availability_zone_1:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+
+resources:
+ server_pcrf_pps_001:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+
+ availability_zone_legal_name_1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [pcrf_pps_server_names, 0] }
+ availability_zone: {get_param: availability_zone_1}
+ metadata:
+ vnf_id: { get_param: pcrf_vnf_id }
+ vf_module_id: { get_param: pcrf_vnf_module_id }
+
+ availability_zone_illegal_name_1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [pcrf_pps_server_names, 0] }
+ availability_zone: {get_param: availability_zone_name}
+ metadata:
+ vnf_id: { get_param: pcrf_vnf_id }
+ vf_module_id: { get_param: pcrf_vnf_module_id }
+
+ availability_zone_illegal_name_2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [pcrf_pps_server_names, 0] }
+ availability_zone: {get_param: availability_zone}
+ metadata:
+ vnf_id: { get_param: pcrf_vnf_id }
+ vf_module_id: { get_param: pcrf_vnf_module_id }
+
+ SecurityGroup_expose:
+ type: OS::Neutron::SecurityGroup
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..809835d2b8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,12 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+ mock_param: abskdjska
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..072a8ba934
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,109 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ default: True
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ availability_zone_1:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ pcrf_images:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ pcrf_network_v0_ips:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ network_net_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+
+resources:
+ server_pcrf_pps_001:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+
+ resource_illegal_image:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [pcrf_pps_server_names, 0] }
+ image: {get_param: pcrf_images}
+ flavor: {get_param: pcrf_flavor_11}
+ metadata:
+ vnf_id: { get_param: pcrf_vnf_id }
+ vf_module_id: { get_param: pcrf_vnf_module_id }
+
+ resource_illegal_network_1:
+ type: OS::Neutron::Port
+ properties:
+ name: { get_param: [pcrf_pps_server_names, 0] }
+ network: {get_param: network_net_id}
+
+ resource_illegal_network_2:
+ type: OS::Neutron::Port
+ properties:
+ name: { get_param: [pcrf_pps_server_names, 0] }
+ network: {get_param: network_net_id}
+ fixed_ips:
+ - ip_address: {get_param: pcrf_network_v0_ips}
+
+ availability_zone_illegal_name_2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [pcrf_pps_server_names, 0] }
+ availability_zone: {get_param: availability_zone}
+ metadata:
+ vnf_id: { get_param: pcrf_vnf_id }
+ vf_module_id: { get_param: pcrf_vnf_module_id }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/hot-nimbus-psm_volume.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/hot-nimbus-psm_volume.yaml
new file mode 100644
index 0000000000..288607cf55
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/hot-nimbus-psm_volume.yaml
@@ -0,0 +1,21 @@
+
+heat_template_version: 2013-05-23
+
+parameters:
+ not_null:
+ type: number
+ label: not_number
+
+
+resources:
+ volume_not_expose:
+ type: OS::Cinder::Volume
+ properties:
+ not_null: {get_param: not_null}
+
+
+outputs:
+ not_expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: volume_expose }
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/nested-pps_v1.0.yaml
new file mode 100644
index 0000000000..cb23fb8e8c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/src/test/resources/heatTreeValidationOutput/nested-pps_v1.0.yaml
@@ -0,0 +1,98 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_name:
+ type: string
+ default: True
+ label: PCRF PS server name
+ description: PCRF PS server name
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availability_zone_0:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_pps_server_name }
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_pps:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_pps_server_name }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ availability_zone: { get_param: availability_zone_0 }
+ networks:
+ - port: { get_resource: pcrf_pps_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_pps_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/pom.xml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/pom.xml
new file mode 100644
index 0000000000..bacd79a97a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/pom.xml
@@ -0,0 +1,100 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../..</relativePath>
+ </parent>
+
+ <name>openecomp-sdc-validation-impl</name>
+ <artifactId>openecomp-sdc-validation-impl</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.yaml</groupId>
+ <artifactId>snakeyaml</artifactId>
+ <version>1.17</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.google.code.gson</groupId>
+ <artifactId>gson</artifactId>
+ <version>2.3.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.7.10</version>
+
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <version>1.1.2</version>
+
+ </dependency>
+
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <scope>test</scope>
+ <version>6.8.5</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>snakeyaml</artifactId>
+ <groupId>org.yaml</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>RELEASE</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-utilities-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-validation-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-common-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <scope>test</scope>
+ <version>1.10.19</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <version>19.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-heat-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.yaml</groupId>
+ <artifactId>snakeyaml</artifactId>
+ </dependency>
+
+
+ </dependencies>
+
+
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/util/HeatValidationService.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/util/HeatValidationService.java
new file mode 100644
index 0000000000..920724ed3b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/util/HeatValidationService.java
@@ -0,0 +1,323 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.validation.impl.util;
+
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections4.MapUtils;
+import org.openecomp.core.utilities.yaml.YamlUtil;
+import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder;
+import org.openecomp.core.validation.errors.Messages;
+import org.openecomp.core.validation.types.GlobalValidationContext;
+import org.openecomp.sdc.datatypes.error.ErrorLevel;
+import org.openecomp.sdc.heat.datatypes.model.Environment;
+import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
+import org.openecomp.sdc.heat.datatypes.model.Output;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.heat.datatypes.model.ResourceReferenceFunctions;
+import org.openecomp.sdc.heat.services.HeatStructureUtil;
+import org.openecomp.sdc.validation.impl.validators.HeatValidator;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+
+public class HeatValidationService {
+
+ private static final Logger logger = LoggerFactory.getLogger(HeatValidator.class);
+
+ /**
+ * Check artifacts existence.
+ *
+ * @param fileName the file name
+ * @param artifactsNames the artifacts names
+ * @param globalContext the global context
+ */
+ public static void checkArtifactsExistence(String fileName, Set<String> artifactsNames,
+ GlobalValidationContext globalContext) {
+ artifactsNames
+ .stream()
+ .filter(artifactName -> !globalContext.getFileContextMap().containsKey(artifactName))
+ .forEach(artifactName -> {
+ globalContext
+ .addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.MISSING_ARTIFACT.getErrorMessage(),
+ artifactName));
+ });
+ }
+
+
+ /**
+ * Check resource existence from resources map.
+ *
+ * @param fileName the file name
+ * @param resourcesNames the resources names
+ * @param valuesToSearchIn the values to search in
+ * @param globalContext the global context
+ */
+ public static void checkResourceExistenceFromResourcesMap(String fileName,
+ Set<String> resourcesNames,
+ Collection<?> valuesToSearchIn,
+ GlobalValidationContext globalContext) {
+ if (CollectionUtils.isNotEmpty(valuesToSearchIn)) {
+ for (Object value : valuesToSearchIn) {
+ if (value instanceof Resource) {
+ Resource resource = (Resource) value;
+ //checkResourceDependsOn(fileName,resource,resourcesNames,globalContext);
+
+ Collection<Object> resourcePropertiesValues =
+ resource.getProperties() == null ? null : resource.getProperties().values();
+ if (CollectionUtils.isNotEmpty(resourcePropertiesValues)) {
+ for (Object propertyValue : resourcePropertiesValues) {
+ handleReferencedResources(fileName, propertyValue, resourcesNames, globalContext);
+ }
+ }
+ } else if (value instanceof Output) {
+ Output output = (Output) value;
+ Object outputsValue = output.getValue();
+ handleReferencedResources(fileName, outputsValue, resourcesNames, globalContext);
+ }
+ }
+ }
+ }
+
+
+ private static void handleReferencedResources(String fileName, Object valueToSearchReferencesIn,
+ Set<String> resourcesNames,
+ GlobalValidationContext globalContext) {
+ Set<String> referencedResourcesNames = HeatStructureUtil
+ .getReferencedValuesByFunctionName(fileName,
+ ResourceReferenceFunctions.GET_RESOURCE.getFunction(), valueToSearchReferencesIn,
+ globalContext);
+ if (CollectionUtils.isNotEmpty(referencedResourcesNames)) {
+ HeatValidationService
+ .checkIfResourceReferenceExist(fileName, resourcesNames, referencedResourcesNames,
+ globalContext);
+ }
+ }
+
+
+ private static void checkIfResourceReferenceExist(String fileName,
+ Set<String> referencedResourcesNames,
+ Set<String> referencedResources,
+ GlobalValidationContext globalContext) {
+ referencedResources.stream()
+ .filter(referencedResource -> !referencedResourcesNames.contains(referencedResource))
+ .forEach(referencedResource -> {
+ globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.REFERENCED_RESOURCE_NOT_FOUND.getErrorMessage(),
+ referencedResource));
+ });
+ }
+
+ /**
+ * Draw files loop string.
+ *
+ * @param filesInPath the files in path
+ * @return the string
+ */
+ public static String drawFilesLoop(List<String> filesInPath) {
+ StringBuilder stringBuilder = new StringBuilder();
+ stringBuilder.append("[");
+ int pathSize = filesInPath.size();
+
+ for (int i = 0; i < pathSize; i++) {
+ stringBuilder.append(filesInPath.get(i));
+ if (i != pathSize - 1) {
+ stringBuilder.append(" -- ");
+ }
+ }
+ if (!filesInPath.get(0).equals(filesInPath.get(pathSize - 1))) {
+ stringBuilder.append(" -- ");
+ stringBuilder.append(filesInPath.get(0));
+ }
+ stringBuilder.append("]");
+
+ return stringBuilder.toString();
+ }
+
+
+ /**
+ * Check nested parameters.
+ *
+ * @param callingNestedFileName the calling nested file name
+ * @param nestedFileName the nested file name
+ * @param resourceName the resource name
+ * @param globalContext the global context
+ * @param resourceFileProperties the resource file properties
+ */
+ public static void checkNestedParameters(String callingNestedFileName, String nestedFileName,
+ String resourceName,
+ GlobalValidationContext globalContext,
+ Set<String> resourceFileProperties) {
+ HeatOrchestrationTemplate heatOrchestrationTemplate;
+ try {
+ heatOrchestrationTemplate = new YamlUtil()
+ .yamlToObject(globalContext.getFileContent(nestedFileName),
+ HeatOrchestrationTemplate.class);
+ } catch (Exception e0) {
+ return;
+ }
+ Set<String> nestedParametersNames = heatOrchestrationTemplate.getParameters() == null ? null
+ : heatOrchestrationTemplate.getParameters().keySet();
+
+ if (CollectionUtils.isNotEmpty(nestedParametersNames)) {
+ resourceFileProperties
+ .stream()
+ .filter(propertyName -> !nestedParametersNames.contains(propertyName))
+ .forEach(propertyName -> globalContext
+ .addMessage(callingNestedFileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.MISSING_PARAMETER_IN_NESTED.getErrorMessage(),
+ nestedFileName, resourceName, propertyName)));
+ }
+ }
+
+
+ /**
+ * Is nested loop exist in file boolean.
+ *
+ * @param callingFileName the calling file name
+ * @param nestedFileName the nested file name
+ * @param filesInLoop the files in loop
+ * @param globalContext the global context
+ * @return the boolean
+ */
+ public static boolean isNestedLoopExistInFile(String callingFileName, String nestedFileName,
+ List<String> filesInLoop,
+ GlobalValidationContext globalContext) {
+ HeatOrchestrationTemplate nestedHeatOrchestrationTemplate;
+ try {
+ nestedHeatOrchestrationTemplate = new YamlUtil()
+ .yamlToObject(globalContext.getFileContent(nestedFileName),
+ HeatOrchestrationTemplate.class);
+ } catch (Exception e0) {
+ logger.warn("HEAT Validator will not be executed on file " + nestedFileName
+ + " due to illegal HEAT format");
+ return false;
+ }
+ filesInLoop.add(nestedFileName);
+ Collection<Resource> nestedResources =
+ nestedHeatOrchestrationTemplate.getResources() == null ? null
+ : nestedHeatOrchestrationTemplate.getResources().values();
+ if (CollectionUtils.isNotEmpty(nestedResources)) {
+ for (Resource resource : nestedResources) {
+ String resourceType = resource.getType();
+
+ if (Objects.nonNull(resourceType) && isNestedResource(resourceType)) {
+ return resourceType.equals(callingFileName) || !filesInLoop.contains(resourceType)
+ && isNestedLoopExistInFile(callingFileName, resourceType, filesInLoop, globalContext);
+ }
+ }
+ }
+ return false;
+ }
+
+
+ /**
+ * Loop over output map and validate get attr from nested.
+ *
+ * @param fileName the file name
+ * @param outputMap the output map
+ * @param heatOrchestrationTemplate the heat orchestration template
+ * @param globalContext the global context
+ */
+ @SuppressWarnings("unchecked")
+ public static void loopOverOutputMapAndValidateGetAttrFromNested(String fileName,
+ Map<String, Output> outputMap,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ GlobalValidationContext globalContext) {
+ for (Output output : outputMap.values()) {
+ Object outputValue = output.getValue();
+ if (outputValue != null && outputValue instanceof Map) {
+ Map<String, Object> outputValueMap = (Map<String, Object>) outputValue;
+ List<String> getAttrValue =
+ (List<String>) outputValueMap.get(ResourceReferenceFunctions.GET_ATTR.getFunction());
+ if (!CollectionUtils.isEmpty(getAttrValue)) {
+ String resourceName = getAttrValue.get(0);
+ String propertyName = getAttrValue.get(1);
+ String resourceType =
+ getResourceTypeFromResourcesMap(resourceName, heatOrchestrationTemplate);
+
+ if (Objects.nonNull(resourceType)
+ && HeatValidationService.isNestedResource(resourceType)) {
+ Map<String, Output> nestedOutputMap;
+ HeatOrchestrationTemplate nestedHeatOrchestrationTemplate;
+ try {
+ nestedHeatOrchestrationTemplate = new YamlUtil()
+ .yamlToObject(globalContext.getFileContent(resourceType),
+ HeatOrchestrationTemplate.class);
+ } catch (Exception e0) {
+ return;
+ }
+ nestedOutputMap = nestedHeatOrchestrationTemplate.getOutputs();
+
+ if (MapUtils.isEmpty(nestedOutputMap) || !nestedOutputMap.containsKey(propertyName)) {
+ globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.GET_ATTR_NOT_FOUND.getErrorMessage(),
+ propertyName, resourceName));
+ }
+ }
+ }
+ }
+ }
+ }
+
+
+ public static boolean isNestedResource(String resourceType) {
+ return resourceType.contains(".yaml") || resourceType.contains(".yml");
+ }
+
+
+ private static String getResourceTypeFromResourcesMap(String resourceName,
+ HeatOrchestrationTemplate heatOrchestrationTemplate) {
+ return heatOrchestrationTemplate.getResources().get(resourceName).getType();
+ }
+
+ /**
+ * Validate env content environment.
+ *
+ * @param fileName the file name
+ * @param envFileName the env file name
+ * @param globalContext the global context
+ * @return the environment
+ */
+ public static Environment validateEnvContent(String fileName, String envFileName,
+ GlobalValidationContext globalContext) {
+ Environment envContent = null;
+ try {
+ envContent =
+ new YamlUtil().yamlToObject(globalContext.getFileContent(envFileName), Environment.class);
+ } catch (Exception e0) {
+ return null;
+ }
+ return envContent;
+ }
+
+
+ public static String getResourceGroupResourceName(String resourceCallingToResourceGroup) {
+ return "OS::Heat::ResourceGroup in " + resourceCallingToResourceGroup;
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/util/ResourceValidationHeatValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/util/ResourceValidationHeatValidator.java
new file mode 100644
index 0000000000..3457bed1e9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/util/ResourceValidationHeatValidator.java
@@ -0,0 +1,617 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.validation.impl.util;
+
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections4.MapUtils;
+import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder;
+import org.openecomp.core.validation.errors.Messages;
+import org.openecomp.core.validation.types.GlobalValidationContext;
+import org.openecomp.sdc.datatypes.error.ErrorLevel;
+import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
+import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes;
+import org.openecomp.sdc.heat.datatypes.model.Output;
+import org.openecomp.sdc.heat.datatypes.model.PolicyTypes;
+import org.openecomp.sdc.heat.datatypes.model.PropertiesMapKeyTypes;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.heat.datatypes.model.ResourceReferenceFunctions;
+import org.openecomp.sdc.heat.datatypes.model.ResourceTypeToMessageString;
+import org.openecomp.sdc.heat.services.HeatStructureUtil;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+
+
+public class ResourceValidationHeatValidator {
+
+ /**
+ * Validate resource type.
+ *
+ * @param fileName the file name
+ * @param baseFileName the base file name
+ * @param securityGroupsNamesFromBaseFileOutputs the security groups names from base file outputs
+ * @param heatOrchestrationTemplate the heat orchestration template
+ * @param globalContext the global context
+ */
+ public static void validateResourceType(String fileName, String baseFileName,
+ Set<String> securityGroupsNamesFromBaseFileOutputs,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ GlobalValidationContext globalContext) {
+ Map<String, Resource> resourceMap =
+ heatOrchestrationTemplate.getResources() == null ? new HashMap<>()
+ : heatOrchestrationTemplate.getResources();
+ Map<String, Integer> numberOfVisitsInPort = new HashMap<>();
+ Set<String> resourcesNames = resourceMap.keySet();
+ Set<String> sharedResourcesFromOutputMap =
+ getSharedResourcesNamesFromOutputs(fileName, heatOrchestrationTemplate.getOutputs(),
+ globalContext);
+ boolean isBaseFile = baseFileName != null && fileName.equals(baseFileName);
+
+ Map<HeatResourcesTypes, List<String>> resourceTypeToNamesListMap = HeatResourcesTypes
+ .getListForResourceType(HeatResourcesTypes.NOVA_SERVER_GROUP_RESOURCE_TYPE,
+ HeatResourcesTypes.NEUTRON_SECURITY_GROUP_RESOURCE_TYPE,
+ HeatResourcesTypes.CONTRAIL_NETWORK_RULE_RESOURCE_TYPE);
+
+ initResourceTypeListWithItsResourcesNames(fileName, resourceTypeToNamesListMap, resourceMap,
+ sharedResourcesFromOutputMap, globalContext);
+ initVisitedPortsMap(fileName, resourceMap, numberOfVisitsInPort, globalContext);
+
+
+ for (Map.Entry<String, Resource> resourceEntry : resourceMap.entrySet()) {
+ String resourceType = resourceEntry.getValue().getType();
+ validateSecurityGroupsFromBaseOutput(fileName, resourceEntry, isBaseFile,
+ securityGroupsNamesFromBaseFileOutputs, globalContext);
+ checkResourceDependsOn(fileName, resourceEntry.getValue(), resourcesNames, globalContext);
+
+ if (Objects.isNull(resourceType)) {
+ globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.INVALID_RESOURCE_TYPE.getErrorMessage(), "null",
+ resourceEntry.getKey()));
+ } else {
+ HeatResourcesTypes heatResourceType = HeatResourcesTypes.findByHeatResource(resourceType);
+
+ if (heatResourceType != null) {
+ switch (heatResourceType) {
+ case NOVA_SERVER_RESOURCE_TYPE:
+ validateNovaServerResourceType(fileName, resourceEntry, numberOfVisitsInPort,
+ resourceTypeToNamesListMap
+ .get(HeatResourcesTypes.NOVA_SERVER_GROUP_RESOURCE_TYPE),
+ heatOrchestrationTemplate, globalContext);
+ break;
+
+ case NOVA_SERVER_GROUP_RESOURCE_TYPE:
+ validateNovaServerGroupPolicy(fileName, resourceEntry, globalContext);
+ break;
+
+ case RESOURCE_GROUP_RESOURCE_TYPE:
+ validateResourceGroupType(fileName, resourceEntry, globalContext);
+ break;
+
+ case NEUTRON_PORT_RESOURCE_TYPE:
+ validateNeutronPortType(fileName, resourceEntry, resourceTypeToNamesListMap
+ .get(HeatResourcesTypes.NEUTRON_SECURITY_GROUP_RESOURCE_TYPE), globalContext);
+ break;
+
+ case CONTRAIL_NETWORK_ATTACH_RULE_RESOURCE_TYPE:
+ validateContrailAttachPolicyType(resourceEntry, resourceTypeToNamesListMap
+ .get(HeatResourcesTypes.CONTRAIL_NETWORK_RULE_RESOURCE_TYPE));
+ break;
+ default:
+ }
+ } else {
+ if (HeatValidationService.isNestedResource(resourceType)) {
+ handleNestedResourceType(fileName, resourceEntry.getKey(), resourceEntry.getValue(),
+ globalContext);
+ }
+ }
+ }
+ }
+
+ checkForEmptyResourceNamesInMap(fileName,
+ CollectionUtils.isEmpty(securityGroupsNamesFromBaseFileOutputs), resourceTypeToNamesListMap,
+ globalContext);
+ handleOrphanPorts(fileName, numberOfVisitsInPort, globalContext);
+ }
+
+
+ private static void validateNovaServerResourceType(String fileName,
+ Map.Entry<String, Resource> resourceEntry,
+ Map<String, Integer> numberOfVisitsInPort,
+ List<String> serverGroupResourcesNames,
+ HeatOrchestrationTemplate
+ heatOrchestrationTemplate,
+ GlobalValidationContext globalContext) {
+ validateAssignedValueForImageOrFlavorFromNova(fileName, resourceEntry, globalContext);
+ validateNovaServerPortBinding(fileName, resourceEntry.getValue(), numberOfVisitsInPort,
+ globalContext);
+ validateAllServerGroupsPointedByServerExistAndDefined(fileName, resourceEntry,
+ serverGroupResourcesNames, heatOrchestrationTemplate, globalContext);
+
+ }
+
+
+ private static void handleNestedResourceType(String fileName, String resourceName,
+ Resource resource,
+ GlobalValidationContext globalContext) {
+ validateAllPropertiesMatchNestedParameters(fileName, resourceName, resource, globalContext);
+ validateLoopsOfNestingFromFile(fileName, resource.getType(), globalContext);
+ }
+
+
+ private static void validateResourceGroupType(String fileName,
+ Map.Entry<String, Resource> resourceEntry,
+ GlobalValidationContext globalContext) {
+ Resource resourceDef = HeatStructureUtil
+ .getResourceDef(fileName, resourceEntry.getKey(), resourceEntry.getValue(), globalContext);
+ // validateResourceGroupTypeIsSupported(fileName, resourceEntry.getKey(),resourceDef.getType(),
+ // globalContext);
+ if (resourceDef != null) {
+ if (Objects.nonNull(resourceDef.getType())
+ && HeatValidationService.isNestedResource(resourceDef.getType())) {
+ handleNestedResourceType(fileName, resourceDef.getType(), resourceDef, globalContext);
+ }
+ }
+ }
+
+
+ private static void validateAllPropertiesMatchNestedParameters(String fileName,
+ String resourceName,
+ Resource resource,
+ GlobalValidationContext
+ globalContext) {
+
+ String resourceType = resource.getType();
+ if (globalContext.getFileContextMap().containsKey(resourceType)) {
+ Set<String> propertiesNames =
+ resource.getProperties() == null ? null : resource.getProperties().keySet();
+ if (CollectionUtils.isNotEmpty(propertiesNames)) {
+ HeatValidationService
+ .checkNestedParameters(fileName, resourceType, resourceName, globalContext,
+ propertiesNames);
+ }
+ } else {
+ globalContext.addMessage(resourceType, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.MISSING_NESTED_FILE.getErrorMessage(), resourceType));
+ }
+ }
+
+
+ private static void validateAssignedValueForImageOrFlavorFromNova(String fileName,
+ Map.Entry<String, Resource>
+ resourceEntry,
+ GlobalValidationContext
+ globalContext) {
+
+ Resource resource = resourceEntry.getValue();
+ Map<String, Object> propertiesMap = resource.getProperties();
+ if (propertiesMap.get(PropertiesMapKeyTypes.IMAGE.getKeyMap()) == null
+ && propertiesMap.get(PropertiesMapKeyTypes.FLAVOR.getKeyMap()) == null) {
+ globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.MISSING_IMAGE_AND_FLAVOR.getErrorMessage(),
+ resourceEntry.getKey()));
+ }
+ }
+
+
+ private static void validateLoopsOfNestingFromFile(String fileName, String resourceType,
+ GlobalValidationContext globalContext) {
+ List<String> filesInLoop = new ArrayList<>(Collections.singletonList(fileName));
+ if (HeatValidationService
+ .isNestedLoopExistInFile(fileName, resourceType, filesInLoop, globalContext)) {
+ globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.NESTED_LOOP.getErrorMessage(),
+ HeatValidationService.drawFilesLoop(filesInLoop)));
+ }
+ }
+
+
+ /* validation 22*/
+ @SuppressWarnings("unchecked")
+ private static void validateNovaServerPortBinding(String fileName, Resource resource,
+ Map<String, Integer> numberOfVisitsInPort,
+ GlobalValidationContext globalContext) {
+
+ Map<String, Object> propertiesMap = resource.getProperties();
+ List<Object> networksList =
+ (List<Object>) propertiesMap.get(PropertiesMapKeyTypes.NETWORKS.getKeyMap());
+
+ if (CollectionUtils.isNotEmpty(networksList)) {
+ networksList
+ .stream()
+ .filter(networkObject -> networkObject instanceof Map)
+ .forEach(networkObject -> {
+ Map<String, Object> portValueMap =
+ (Map<String, Object>) ((Map) networkObject).get("port");
+ if (MapUtils.isNotEmpty(portValueMap)) {
+ checkPortBindingFromMap(fileName, portValueMap, numberOfVisitsInPort, globalContext);
+ }
+ });
+ }
+ }
+
+ /* validation 23*/
+ @SuppressWarnings("unchecked")
+ private static void validateAllServerGroupsPointedByServerExistAndDefined(String fileName,
+ Map.Entry<String, Resource> resourceEntry,
+ List<String> serverGroupNamesList,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ GlobalValidationContext globalContext) {
+ Map<String, Resource> resourcesMap = heatOrchestrationTemplate.getResources();
+
+ Map<String, Object> resourceProperties = resourceEntry.getValue().getProperties();
+ Map<String, Object> schedulerHintsMap = resourceProperties == null ? null
+ : (Map<String, Object>) resourceProperties
+ .get(ResourceReferenceFunctions.SCHEDULER_HINTS.getFunction());
+
+ if (MapUtils.isNotEmpty(schedulerHintsMap)) {
+ for (Object serverGroupMap : schedulerHintsMap.values()) {
+ Map<String, Object> currentServerMap = (Map<String, Object>) serverGroupMap;
+ String serverResourceName = currentServerMap == null ? null
+ : (String) currentServerMap.get(ResourceReferenceFunctions.GET_RESOURCE.getFunction());
+ Resource serverResource = serverResourceName == null || resourcesMap == null ? null
+ : resourcesMap.get(serverResourceName);
+ if (serverResource != null && !serverResource.getType()
+ .equals(HeatResourcesTypes.NOVA_SERVER_GROUP_RESOURCE_TYPE.getHeatResource())) {
+ globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.SERVER_NOT_DEFINED_FROM_NOVA.getErrorMessage(),
+ serverResourceName, resourceEntry.getKey()));
+ } else {
+ serverGroupNamesList.remove(serverResourceName);
+ }
+ }
+ }
+ }
+
+
+ /* validation 24*/
+ @SuppressWarnings("unchecked")
+ private static void validateNovaServerGroupPolicy(String fileName,
+ Map.Entry<String, Resource> resourceEntry,
+ GlobalValidationContext globalContext) {
+
+ Resource resource = resourceEntry.getValue();
+ List<String> policiesList = resource.getProperties() == null ? null
+ : (List<String>) resource.getProperties().get("policies");
+
+ if (CollectionUtils.isNotEmpty(policiesList)) {
+ if (policiesList.size() == 1) {
+ String policy = policiesList.get(0);
+ if (!PolicyTypes.isGivenPolicyValid(policy)) {
+ globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.WRONG_POLICY_IN_SERVER_GROUP.getErrorMessage(),
+ resourceEntry.getKey()));
+ }
+ } else {
+ globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.WRONG_POLICY_IN_SERVER_GROUP.getErrorMessage(),
+ resourceEntry.getKey()));
+ }
+ }
+ }
+
+
+ private static void validateNeutronPortType(String filename,
+ Map.Entry<String, Resource> resourceEntry,
+ List<String> securityGroupResourceNameList,
+ GlobalValidationContext globalContext) {
+ validateAllSecurityGroupsAreUsed(filename, resourceEntry, securityGroupResourceNameList,
+ globalContext);
+
+ }
+
+
+ @SuppressWarnings("unchecked")
+ private static void validateAllSecurityGroupsAreUsed(String filename,
+ Map.Entry<String, Resource> resourceEntry,
+ List<String> securityGroupResourceNameList,
+ GlobalValidationContext globalContext) {
+ Map<String, Object> propertiesMap = resourceEntry.getValue().getProperties();
+
+ if (MapUtils.isEmpty(propertiesMap)) {
+ return;
+ }
+
+ Object securityGroupsValue = propertiesMap.get("security_groups");
+
+ if (Objects.isNull(securityGroupsValue)) {
+ return;
+ }
+
+ if (securityGroupsValue instanceof List) {
+ List<Object> securityGroupsListFromCurrResource =
+ (List<Object>) propertiesMap.get("security_groups");
+ for (Object securityGroup : securityGroupsListFromCurrResource) {
+ removeSecurityGroupNamesFromListByGivenFunction(filename,
+ ResourceReferenceFunctions.GET_RESOURCE.getFunction(), securityGroup,
+ securityGroupResourceNameList, globalContext);
+ }
+ }
+ }
+
+
+ private static void validateSecurityGroupsFromBaseOutput(String filename,
+ Map.Entry<String, Resource> resourceEntry,
+ boolean isBaseFile,
+ Set<String> securityGroupNamesFromBaseOutput,
+ GlobalValidationContext globalContext) {
+ if (!isBaseFile && CollectionUtils.isNotEmpty(securityGroupNamesFromBaseOutput)) {
+ Map<String, Object> propertiesMap = resourceEntry.getValue().getProperties();
+
+ if (MapUtils.isEmpty(propertiesMap)) {
+ return;
+ }
+
+ for (Map.Entry<String, Object> propertyEntry : propertiesMap.entrySet()) {
+ removeSecurityGroupNamesFromListByGivenFunction(filename,
+ ResourceReferenceFunctions.GET_PARAM.getFunction(), propertyEntry.getValue(),
+ securityGroupNamesFromBaseOutput, globalContext);
+ }
+ }
+ }
+
+
+ private static void removeSecurityGroupNamesFromListByGivenFunction(String filename,
+ String functionName,
+ Object securityGroup,
+ Collection<String> securityGroupResourceNameList,
+ GlobalValidationContext globalContext) {
+ Set<String> securityGroupsNamesFromFunction = HeatStructureUtil
+ .getReferencedValuesByFunctionName(filename, functionName, securityGroup, globalContext);
+ securityGroupsNamesFromFunction.forEach(securityGroupResourceNameList::remove);
+ }
+
+
+ @SuppressWarnings("unchecked")
+ private static void validateContrailAttachPolicyType(Map.Entry<String, Resource> resourceEntry,
+ List<String> networkPolicyResourceNames) {
+ Map<String, Object> propertiesMap = resourceEntry.getValue().getProperties();
+
+ if (MapUtils.isNotEmpty(propertiesMap)) {
+ Map<String, Object> policyMap = (Map<String, Object>) propertiesMap.get("policy");
+ if (MapUtils.isNotEmpty(policyMap)) {
+ List<Object> securityGroupList =
+ (List<Object>) policyMap.get(ResourceReferenceFunctions.GET_ATTR.getFunction());
+ //noinspection SuspiciousMethodCalls
+ if (CollectionUtils.isNotEmpty(securityGroupList)) {
+ //noinspection SuspiciousMethodCalls
+ networkPolicyResourceNames.remove(securityGroupList.get(0));
+ }
+ }
+ }
+ }
+
+
+ private static void getResourceNamesListFromSpecificResource(String filename,
+ List<String> resourcesNames,
+ HeatResourcesTypes heatResourcesType,
+ Map<String, Resource> resourcesMap,
+ Set<String> sharedResourcesFromOutputMap,
+ GlobalValidationContext globalContext) {
+
+ for (Map.Entry<String, Resource> resourceEntry : resourcesMap.entrySet()) {
+ String resourceType = resourceEntry.getValue().getType();
+ if (Objects.isNull(resourceType)) {
+ globalContext.addMessage(filename, ErrorLevel.WARNING, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.INVALID_RESOURCE_TYPE.getErrorMessage(), null,
+ resourceEntry.getKey()));
+ } else {
+ if (resourceType.equals(heatResourcesType.getHeatResource())
+ && !isSharedResource(resourceEntry.getKey(), sharedResourcesFromOutputMap)) {
+ resourcesNames.add(resourceEntry.getKey());
+ }
+ }
+ }
+ }
+
+
+ private static boolean isSharedResource(String resourceName,
+ Set<String> sharedResourcesFromOutputMap) {
+ return !CollectionUtils.isEmpty(sharedResourcesFromOutputMap)
+ && sharedResourcesFromOutputMap.contains(resourceName);
+ }
+
+ /**
+ * Handle not empty resource names list.
+ *
+ * @param fileName the file name
+ * @param resourcesNameList the resources name list
+ * @param securityOrServerGroup the security or server group
+ * @param globalContext the global context
+ */
+ public static void handleNotEmptyResourceNamesList(String fileName,
+ Collection<String> resourcesNameList,
+ String securityOrServerGroup,
+ GlobalValidationContext globalContext) {
+ if (CollectionUtils.isNotEmpty(resourcesNameList)) {
+ resourcesNameList.forEach(name ->
+ globalContext
+ .addMessage(
+ fileName,
+ ErrorLevel.WARNING,
+ ErrorMessagesFormatBuilder
+ .getErrorWithParameters(
+ Messages.SERVER_OR_SECURITY_GROUP_NOT_IN_USE.getErrorMessage(),
+ securityOrServerGroup, name)));
+ }
+ }
+
+
+ private static void initVisitedPortsMap(String filename, Map<String, Resource> resourceMap,
+ Map<String, Integer> numberOfVisitsInPort,
+ GlobalValidationContext globalContext) {
+ for (Map.Entry<String, Resource> resourceEntry : resourceMap.entrySet()) {
+ String resourceType = resourceEntry.getValue().getType();
+
+ if (Objects.isNull(resourceType)) {
+ globalContext.addMessage(filename, ErrorLevel.WARNING, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.INVALID_RESOURCE_TYPE.getErrorMessage(), "null",
+ resourceEntry.getKey()));
+ } else {
+ if (resourceType.equals(HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource())) {
+ numberOfVisitsInPort.put(resourceEntry.getKey(), 0);
+ }
+ }
+ }
+ }
+
+ private static boolean checkIfPortWasVisited(String resourcePortName,
+ Map<String, Integer> numberOfVisitsInPort) {
+ return numberOfVisitsInPort.containsKey(resourcePortName)
+ && numberOfVisitsInPort.get(resourcePortName) == 1;
+ }
+
+
+ private static void incrementNumberOfVisitsInPort(String resourcePortName,
+ Map<String, Integer> numberOfVisitsInPort) {
+ if (numberOfVisitsInPort.containsKey(resourcePortName)) {
+ numberOfVisitsInPort.put(resourcePortName, numberOfVisitsInPort.get(resourcePortName) + 1);
+ }
+ }
+
+
+ private static void handleOrphanPorts(String fileName, Map<String, Integer> numberOfVisitsInPort,
+ GlobalValidationContext globalContext) {
+ numberOfVisitsInPort
+ .entrySet()
+ .stream()
+ .filter(entry -> entry.getValue() == 0)
+ .forEach(entry ->
+ globalContext
+ .addMessage(
+ fileName,
+ ErrorLevel.WARNING,
+ ErrorMessagesFormatBuilder
+ .getErrorWithParameters(
+ Messages.PORT_NO_BIND_TO_ANY_NOVA_SERVER.getErrorMessage(),
+ entry.getKey())));
+ }
+
+ @SuppressWarnings("unchecked")
+ private static void checkResourceDependsOn(String fileName, Resource resource,
+ Set<String> resourcesNames,
+ GlobalValidationContext globalContext) {
+ Object dependencies = resource.getDepends_on();
+ if (dependencies instanceof Collection) {
+ ((Collection<String>) dependencies)
+ .stream()
+ .filter(resource_id -> !resourcesNames.contains(resource_id))
+ .forEach(resource_id -> globalContext.addMessage(fileName, ErrorLevel.ERROR,
+ ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.MISSING_RESOURCE_IN_DEPENDS_ON.getErrorMessage(),
+ (String) resource_id)));
+ } else if (dependencies instanceof String) {
+ if (!resourcesNames.contains(dependencies)) {
+ globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.MISSING_RESOURCE_IN_DEPENDS_ON.getErrorMessage(),
+ (String) dependencies));
+ }
+ }
+ }
+
+
+ private static void checkPortBindingFromMap(String fileName, Map<String, Object> portValueMap,
+ Map<String, Integer> numberOfVisitsInPort,
+ GlobalValidationContext globalContext) {
+ String resourcePortName =
+ (String) portValueMap.get(ResourceReferenceFunctions.GET_RESOURCE.getFunction());
+ if (checkIfPortWasVisited(resourcePortName, numberOfVisitsInPort)) {
+ globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.MORE_THAN_ONE_BIND_FROM_NOVA_TO_PORT.getErrorMessage(),
+ (String) portValueMap.get(ResourceReferenceFunctions.GET_RESOURCE.getFunction())));
+ } else {
+ incrementNumberOfVisitsInPort(resourcePortName, numberOfVisitsInPort);
+ }
+ }
+
+
+ private static void initResourceTypeListWithItsResourcesNames(String filename,
+ Map<HeatResourcesTypes, List<String>> resourcesTypesListMap,
+ Map<String, Resource> resourcesMap,
+ Set<String> sharedResourcesFromOutputsMap,
+ GlobalValidationContext globalContext) {
+ for (Map.Entry<HeatResourcesTypes, List<String>> resourcesTypesToListEntry
+ : resourcesTypesListMap.entrySet()) {
+ HeatResourcesTypes currentType = resourcesTypesToListEntry.getKey();
+ List<String> currNamesList = new ArrayList<>();
+ getResourceNamesListFromSpecificResource(filename, currNamesList, currentType, resourcesMap,
+ sharedResourcesFromOutputsMap, globalContext);
+ resourcesTypesListMap.put(currentType, currNamesList);
+ }
+ }
+
+
+ private static void checkForEmptyResourceNamesInMap(String fileName,
+ boolean isBaseFileContainPorts,
+ Map<HeatResourcesTypes, List<String>> resourcesTypesListMap,
+ GlobalValidationContext globalContext) {
+ if (isBaseFileContainPorts) {
+ for (Map.Entry<HeatResourcesTypes, List<String>> resourcesTypesListEntry
+ : resourcesTypesListMap.entrySet()) {
+ handleNotEmptyResourceNamesList(fileName, resourcesTypesListEntry.getValue(),
+ ResourceTypeToMessageString
+ .getTypeForMessageFromResourceType(resourcesTypesListEntry.getKey()),
+ globalContext);
+ }
+ }
+ }
+
+
+ private static Set<String> getSharedResourcesNamesFromOutputs(String filename,
+ Map<String, Output> outputsMap,
+ GlobalValidationContext globalContext) {
+ Set<String> sharedResources = new HashSet<>();
+
+ if (MapUtils.isEmpty(outputsMap)) {
+ return null;
+ }
+
+ for (Map.Entry<String, Output> outputEntry : outputsMap.entrySet()) {
+ Output output = outputEntry.getValue();
+ Object valueObject = output.getValue();
+ if (valueObject instanceof Map) {
+ Map<String, Object> outputValueMap = (Map<String, Object>) valueObject;
+ Object getResourceValue =
+ outputValueMap.get(ResourceReferenceFunctions.GET_RESOURCE.getFunction());
+ if (Objects.nonNull(getResourceValue)) {
+ if (getResourceValue instanceof String) {
+ String resourceName =
+ (String) outputValueMap.get(ResourceReferenceFunctions.GET_RESOURCE.getFunction());
+ sharedResources.add(resourceName);
+ } else {
+ globalContext.addMessage(filename, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.INVALID_GET_RESOURCE_SYNTAX.getErrorMessage(),
+ getResourceValue.toString()));
+ }
+ }
+
+ }
+ }
+
+ return sharedResources;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/EcompGuideLineValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/EcompGuideLineValidator.java
new file mode 100644
index 0000000000..5be56e4b38
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/EcompGuideLineValidator.java
@@ -0,0 +1,784 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.validation.impl.validators;
+
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections4.MapUtils;
+import org.openecomp.core.utilities.CommonMethods;
+import org.openecomp.core.utilities.yaml.YamlUtil;
+import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder;
+import org.openecomp.core.validation.errors.Messages;
+import org.openecomp.core.validation.interfaces.Validator;
+import org.openecomp.core.validation.types.GlobalValidationContext;
+import org.openecomp.sdc.common.utils.AsdcCommon;
+import org.openecomp.sdc.datatypes.error.ErrorLevel;
+import org.openecomp.sdc.datatypes.model.heat.ForbiddenHeatResourceTypes;
+import org.openecomp.sdc.heat.datatypes.DefinedHeatParameterTypes;
+import org.openecomp.sdc.heat.datatypes.manifest.FileData;
+import org.openecomp.sdc.heat.datatypes.manifest.ManifestContent;
+import org.openecomp.sdc.heat.datatypes.model.Environment;
+import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
+import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.heat.datatypes.model.ResourceReferenceFunctions;
+import org.openecomp.sdc.heat.services.HeatStructureUtil;
+import org.openecomp.sdc.heat.services.manifest.ManifestUtil;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.regex.Pattern;
+
+public class EcompGuideLineValidator extends HeatValidator implements Validator {
+ @Override
+ public void validate(GlobalValidationContext globalContext) {
+
+ ManifestContent manifestContent;
+ try {
+ manifestContent = checkValidationPreCondition(globalContext);
+ } catch (Exception exception) {
+ return;
+ }
+
+ //global validations
+ Set<String> baseFiles = validateManifest(manifestContent, globalContext);
+
+ Map<String, FileData.Type> fileTypeMap = ManifestUtil.getFileTypeMap(manifestContent);
+ Map<String, FileData> fileEnvMap = ManifestUtil.getFileAndItsEnv(manifestContent);
+ globalContext
+ .getFiles()
+ .stream()
+ .filter(fileName -> FileData
+ .isHeatFile(fileTypeMap.get(fileName)))
+ .forEach(fileName -> validate(fileName,
+ fileEnvMap.get(fileName) != null ? fileEnvMap.get(fileName).getFile() : null,
+ fileTypeMap, baseFiles, globalContext));
+ }
+
+ private void validate(String fileName, String envFileName, Map<String, FileData.Type> fileTypeMap,
+ Set<String> baseFiles, GlobalValidationContext globalContext) {
+ HeatOrchestrationTemplate heatOrchestrationTemplate =
+ checkHeatOrchestrationPreCondition(fileName, globalContext);
+ if (heatOrchestrationTemplate == null) {
+ return;
+ }
+
+ validateBaseFile(fileName, baseFiles, heatOrchestrationTemplate, globalContext);
+ validateHeatVolumeFile(fileName, fileTypeMap, heatOrchestrationTemplate, globalContext);
+ validateHeatNamingConvention(fileName, heatOrchestrationTemplate, globalContext);
+ validateHeatNovaResource(fileName, envFileName, heatOrchestrationTemplate, globalContext);
+ validateResourceTypeIsForbidden(fileName, heatOrchestrationTemplate, globalContext);
+ validateFixedIpsNamingConvention(fileName, heatOrchestrationTemplate, globalContext);
+ }
+
+ private void validateHeatNovaResource(String fileName, String envFileName,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ GlobalValidationContext globalContext) {
+ Map<String, String> uniqueResourcePortNetworkRole = new HashMap<>();
+ //if no resources exist return
+ if (heatOrchestrationTemplate.getResources() == null
+ || heatOrchestrationTemplate.getResources().size() == 0) {
+ return;
+ }
+
+ heatOrchestrationTemplate
+ .getResources()
+ .entrySet()
+ .stream()
+ .filter(entry -> entry.getValue().getType()
+ .equals(HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource()))
+ .forEach(entry -> validateNovaServerResourceType(entry.getKey(), fileName, envFileName,
+ entry, uniqueResourcePortNetworkRole, heatOrchestrationTemplate, globalContext));
+ }
+
+ private void validateNovaServerResourceType(String resourceId, String fileName,
+ String envFileName,
+ Map.Entry<String, Resource> resourceEntry,
+ Map<String, String> uniqueResourcePortNetworkRole,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ GlobalValidationContext globalValidationContext) {
+ validateNovaServerResourceMetaData(fileName, resourceId,
+ heatOrchestrationTemplate.getResources().get(resourceId), globalValidationContext);
+ validateNovaServerResourceNetworkUniqueRole(fileName, resourceId, heatOrchestrationTemplate,
+ globalValidationContext);
+ validateNovaServerNamingConvention(fileName, envFileName, resourceEntry,
+ globalValidationContext);
+ validateNovaServerAvailabilityZoneName(fileName, resourceEntry, globalValidationContext);
+ validateImageAndFlavorFromNovaServer(fileName, resourceEntry, globalValidationContext);
+ }
+
+ @SuppressWarnings("unchecked")
+ private void validateNovaServerResourceMetaData(String fileName, String resourceId,
+ Resource resource,
+ GlobalValidationContext globalValidationContext) {
+ Map<String, Object> novaServerProp = resource.getProperties();
+ Object novaServerPropMetadata;
+ if (MapUtils.isNotEmpty(novaServerProp)) {
+ novaServerPropMetadata = novaServerProp.get("metadata");
+ if (novaServerPropMetadata == null) {
+ globalValidationContext.addMessage(
+ fileName,
+ ErrorLevel.WARNING,
+ ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.MISSING_NOVA_SERVER_METADATA.getErrorMessage(),
+ resourceId));
+ } else if (novaServerPropMetadata instanceof Map) {
+ TreeMap<String, Object> propertyMap = new TreeMap(new Comparator<String>() {
+
+ @Override
+ public int compare(String o1, String o2) {
+ return o1.compareToIgnoreCase(o2);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ return false;
+ }
+ });
+ propertyMap.putAll((Map) novaServerPropMetadata);
+ if (!propertyMap.containsKey("vf_module_id")) {
+ globalValidationContext.addMessage(fileName, ErrorLevel.WARNING,
+ ErrorMessagesFormatBuilder.getErrorWithParameters(
+ Messages.MISSING_NOVA_SERVER_VF_MODULE_ID.getErrorMessage(), resourceId));
+ }
+ if (!propertyMap.containsKey("vnf_id")) {
+ globalValidationContext.addMessage(fileName, ErrorLevel.WARNING,
+ ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.MISSING_NOVA_SERVER_VNF_ID.getErrorMessage(),
+ resourceId));
+ }
+ }
+ }
+ }
+
+ private void validateNovaServerResourceNetworkUniqueRole(String fileName, String resourceId,
+ HeatOrchestrationTemplate
+ heatOrchestrationTemplate,
+ GlobalValidationContext
+ globalValidationContext) {
+
+ String network;
+ String role;
+ Map<String, String> uniqueResourcePortNetworkRole = new HashMap<>();
+
+ Object propertyNetworkValue =
+ heatOrchestrationTemplate.getResources().get(resourceId).getProperties().get("networks");
+ if (propertyNetworkValue != null && propertyNetworkValue instanceof List) {
+ List<String> portResourceIdList =
+ getNovaNetworkPortResourceList(fileName, (List) propertyNetworkValue,
+ globalValidationContext);
+ for (String portResourceId : portResourceIdList) {
+ Resource portResource = heatOrchestrationTemplate.getResources().get(portResourceId);
+ if (portResource != null && portResource.getType()
+ .equals(HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource())) {
+ Map portNetwork =
+ getPortNetwork(fileName, resourceId, portResource, globalValidationContext);
+ if (Objects.nonNull(portNetwork)) {
+ network = (String) portNetwork.get("get_param");
+ if (Objects.nonNull(network)) {
+ role = getNetworkRole(network);
+ if (role != null && uniqueResourcePortNetworkRole.containsKey(role)) {
+ globalValidationContext.addMessage(fileName, ErrorLevel.WARNING,
+ ErrorMessagesFormatBuilder.getErrorWithParameters(
+ Messages.RESOURCE_CONNECTED_TO_TWO_EXTERNAL_NETWORKS_WITH_SAME_ROLE
+ .getErrorMessage(), resourceId, role));
+ } else {
+ uniqueResourcePortNetworkRole.put(role, portResourceId);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+
+ private Map getPortNetwork(String fileName, String resourceId, Resource portResource,
+ GlobalValidationContext globalValidationContext) {
+ Object portNetwork = portResource.getProperties().get("network_id");
+ if (portNetwork == null) {
+ portNetwork = portResource.getProperties().get("network");
+ }
+ if (!(portNetwork instanceof Map)) {
+ globalValidationContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.MISSING_GET_PARAM.getErrorMessage(),
+ "network or network_id", resourceId));
+ return null;
+ }
+ return (Map) portNetwork;
+ }
+
+ private List<String> getNovaNetworkPortResourceList(String filename, List propertyNetworkValue,
+ GlobalValidationContext globalContext) {
+ List<String> portResourceIdList = new ArrayList<>();
+ for (Object propValue : propertyNetworkValue) {
+ Object portPropValue = ((Map) propValue).get("port");
+ Collection<String> portResourceIds = HeatStructureUtil
+ .getReferencedValuesByFunctionName(filename, "get_resource", portPropValue,
+ globalContext);
+ if (portResourceIds != null) {
+ portResourceIdList.addAll(portResourceIds);
+ }
+ }
+
+ return portResourceIdList;
+ }
+
+ private String getNetworkRole(String network) {
+ if (network == null) {
+ return null;
+ }
+ if (network.contains("_net_id")) {
+ return network.substring(0, network.indexOf("_net_id"));
+ } else if (network.contains("net_name")) {
+ return network.substring(0, network.indexOf("_net_name"));
+ } else if (network.contains("net_fqdn")) {
+ return network.substring(0, network.indexOf("_net_fqdn"));
+ }
+ return null;
+ }
+
+ private void validateHeatNamingConvention(String fileName,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ GlobalValidationContext globalContext) {
+ validatePortNetworkNamingConvention(fileName, heatOrchestrationTemplate, globalContext);
+ }
+
+ private void validatePortNetworkNamingConvention(String fileName,
+ HeatOrchestrationTemplate
+ heatOrchestrationTemplate,
+ GlobalValidationContext globalContext) {
+ if (MapUtils.isEmpty(heatOrchestrationTemplate.getResources())) {
+ return;
+ }
+ String[] regexList = new String[]{".*_net_id", ".*_net_name", ".*_net_fqdn"};
+
+ heatOrchestrationTemplate
+ .getResources()
+ .entrySet()
+ .stream()
+ .filter(entry -> entry.getValue().getType() != null && entry.getValue().getType()
+ .equals(HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource()))
+ .forEach(entry -> entry.getValue()
+ .getProperties()
+ .entrySet()
+ .stream()
+ .filter(propertyEntry -> propertyEntry != null
+ && (propertyEntry.getKey().toLowerCase().equals("network".toLowerCase())
+ ||
+ propertyEntry.getKey().equals("network_id")))
+ .forEach(propertyEntry -> validateParamNamingConvention(fileName, entry.getKey(),
+ propertyEntry.getValue(), regexList,
+ Messages.NETWORK_PARAM_NOT_ALIGNED_WITH_GUIDE_LINE, globalContext)));
+ }
+
+ private void validateParamNamingConvention(String fileName, String resourceId,
+ Object propertyValue, String[] regexList,
+ Messages message,
+ GlobalValidationContext globalContext) {
+ Object paramName;
+ if (propertyValue instanceof Map) {
+ paramName = ((Map) propertyValue).get("get_param");
+ if (paramName instanceof String) {
+ if (!evalPattern((String) paramName, regexList)) {
+ globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(message.getErrorMessage(), (String) paramName, resourceId));
+ }
+ }
+ } else {
+ globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.MISSING_GET_PARAM.getErrorMessage(),
+ "network or network_id", resourceId));
+ }
+ }
+
+ private boolean evalPattern(Object paramVal, String[] regexList) {
+ String value = "";
+ if (paramVal instanceof String) {
+ value = ((String) paramVal);
+ }
+ if (paramVal instanceof Integer) {
+ value = paramVal.toString();
+ }
+ return evalPattern(value, regexList);
+ }
+
+ private boolean evalPattern(String paramVal, String[] regexList) {
+
+ for (String regex : regexList) {
+ if (Pattern.matches(regex, paramVal)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+
+ private void validateHeatVolumeFile(String fileName, Map<String, FileData.Type> fileTypeMap,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ GlobalValidationContext globalContext) {
+ //if not heat volume return
+ if (!fileTypeMap.get(fileName).equals(FileData.Type.HEAT_VOL)) {
+ return;
+ }
+
+ //if no resources exist return
+ if (heatOrchestrationTemplate.getResources() == null
+ || heatOrchestrationTemplate.getResources().size() == 0) {
+ return;
+ }
+
+ Set<String> expectedExposedResources = new HashSet<>();
+ Set<String> actualExposedResources = new HashSet<>();
+ heatOrchestrationTemplate.getResources()
+ .entrySet()
+ .stream()
+ .filter(entry -> entry.getValue().getType()
+ .equals(HeatResourcesTypes.CINDER_VOLUME_RESOURCE_TYPE.getHeatResource()))
+ .forEach(entry -> expectedExposedResources.add(entry.getKey()));
+
+ if (heatOrchestrationTemplate.getOutputs() != null) {
+
+ heatOrchestrationTemplate.getOutputs().entrySet()
+ .stream()
+ .filter(entry -> isPropertyValueGetResource(fileName, entry.getValue().getValue(),
+ globalContext))
+ .forEach(entry -> actualExposedResources.add(
+ getResourceIdFromPropertyValue(fileName, entry.getValue().getValue(),
+ globalContext)));
+ }
+
+ actualExposedResources.stream().forEach(expectedExposedResources::remove);
+
+ if (expectedExposedResources.size() > 0) {
+ expectedExposedResources
+ .stream()
+ .forEach(name -> globalContext.addMessage(fileName, ErrorLevel.WARNING,
+ ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.VOLUME_HEAT_NOT_EXPOSED.getErrorMessage(),
+ name)));
+ }
+ }
+
+ private void validateBaseFile(String fileName, Set<String> baseFiles,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ GlobalValidationContext globalContext) {
+
+ //if not base return
+ if (baseFiles == null || !baseFiles.contains(fileName)) {
+ return;
+ }
+
+ //if no resources exist return
+ if (heatOrchestrationTemplate.getResources() == null
+ || heatOrchestrationTemplate.getResources().size() == 0) {
+ return;
+ }
+
+ Set<String> expectedExposedResources = new HashSet<>();
+ Set<String> actualExposedResources = new HashSet<>();
+ heatOrchestrationTemplate.getResources()
+ .entrySet()
+ .stream()
+ .filter(entry -> isExpectedToBeExposed(entry.getValue().getType()))
+ .forEach(entry -> expectedExposedResources.add(entry.getKey()));
+
+ if (heatOrchestrationTemplate.getOutputs() != null) {
+
+ heatOrchestrationTemplate.getOutputs().entrySet()
+ .stream()
+ .filter(entry -> isPropertyValueGetResource(fileName, entry.getValue().getValue(),
+ globalContext))
+ .forEach(entry -> actualExposedResources.add(
+ getResourceIdFromPropertyValue(fileName, entry.getValue().getValue(),
+ globalContext)));
+ }
+ actualExposedResources.stream().forEach(expectedExposedResources::remove);
+
+ if (expectedExposedResources.size() > 0) {
+ expectedExposedResources
+ .stream()
+ .forEach(name -> globalContext.addMessage(fileName, ErrorLevel.WARNING,
+ ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.RESOURCE_NOT_DEFINED_IN_OUTPUT.getErrorMessage(),
+ name)));
+ }
+ }
+
+ private void validateResourceTypeIsForbidden(String fileName,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ GlobalValidationContext globalContext) {
+ if (MapUtils.isEmpty(heatOrchestrationTemplate.getResources())) {
+ return;
+ }
+
+ heatOrchestrationTemplate.getResources()
+ .entrySet()
+ .stream()
+ .filter(entry ->
+ ForbiddenHeatResourceTypes.findByForbiddenHeatResource(entry.getValue().getType())
+ != null)
+ .filter(entry -> ForbiddenHeatResourceTypes
+ .findByForbiddenHeatResource(entry.getValue().getType())
+ .equals(ForbiddenHeatResourceTypes.HEAT_FLOATING_IP_TYPE))
+ .forEach(entry -> globalContext.addMessage(fileName, ErrorLevel.WARNING,
+ ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.FLOATING_IP_NOT_IN_USE.getErrorMessage(),
+ entry.getKey())));
+ }
+
+
+ private void validateFixedIpsNamingConvention(String fileName,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ GlobalValidationContext globalContext) {
+ if (MapUtils.isEmpty(heatOrchestrationTemplate.getResources())) {
+ return;
+ }
+
+ heatOrchestrationTemplate.getResources()
+ .entrySet()
+ .stream()
+ .filter(entry -> HeatResourcesTypes.findByHeatResource(entry.getValue().getType()) != null)
+ .filter(entry -> HeatResourcesTypes.findByHeatResource(entry.getValue().getType())
+ .equals(HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE))
+ .forEach(entry -> checkNeutronPortFixedIpsName(fileName, entry, globalContext));
+ }
+
+ private void validateImageAndFlavorFromNovaServer(String fileName,
+ Map.Entry<String, Resource> resourceEntry,
+ GlobalValidationContext globalContext) {
+ if (MapUtils.isEmpty(resourceEntry.getValue().getProperties())) {
+ return;
+ }
+
+ String[] imageOrFlavorAsParameters = new String[]{"image", "flavor"};
+ Map<String, Object> propertiesMap = resourceEntry.getValue().getProperties();
+
+ for (String imageOrFlavor : imageOrFlavorAsParameters) {
+ checkImageAndFlavorNames(fileName, imageOrFlavor, resourceEntry.getKey(), propertiesMap,
+ globalContext);
+ }
+ }
+
+ private void checkImageAndFlavorNames(String fileName, String imageOrFlavor, String resourceId,
+ Map<String, Object> propertiesMap,
+ GlobalValidationContext globalContext) {
+ Object nameValue =
+ propertiesMap.get(imageOrFlavor) == null ? null : propertiesMap.get(imageOrFlavor);
+ String[] regexList = new String[]{".*_" + imageOrFlavor + "_name"};
+
+ if (Objects.nonNull(nameValue)) {
+ if (nameValue instanceof Map) {
+ String imageOrFlavorName = getWantedNameFromPropertyValueGetParam(nameValue);
+ if (Objects.nonNull(imageOrFlavorName)) {
+ if (!evalPattern(imageOrFlavorName, regexList)) {
+ globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(
+ Messages.WRONG_IMAGE_OR_FLAVOR_NAME_NOVA_SERVER.getErrorMessage(),
+ imageOrFlavor, resourceId));
+ }
+ }
+ } else {
+ globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.MISSING_GET_PARAM.getErrorMessage(), imageOrFlavor,
+ resourceId));
+ }
+ }
+ }
+
+
+ @SuppressWarnings("unchecked")
+ private void checkNeutronPortFixedIpsName(String fileName,
+ Map.Entry<String, Resource> resourceEntry,
+ GlobalValidationContext globalContext) {
+ String[] regexList =
+ new String[]{"[^_]+_[^_]+_ips", "[^_]+_[^_]+_v6_ips", "[^_]+_[^_]+_ip_(\\d+)",
+ "[^_]+_[^_]+_v6_ip_(\\d+)"};
+
+ if (MapUtils.isEmpty(resourceEntry.getValue().getProperties())) {
+ return;
+ }
+
+ Map<String, Object> propertiesMap = resourceEntry.getValue().getProperties();
+ Object fixedIps = propertiesMap.get("fixed_ips");
+ if (Objects.nonNull(fixedIps) && fixedIps instanceof List) {
+ List<Object> fixedIpsList = (List<Object>) fixedIps;
+ for (Object fixedIpsObject : fixedIpsList) {
+ Map.Entry<String, Object> fixedIpsEntry =
+ ((Map<String, Object>) fixedIpsObject).entrySet().iterator().next();
+ if (Objects.nonNull(fixedIpsEntry)) {
+ if (fixedIpsEntry.getValue() instanceof Map) {
+ String fixedIpsName = getWantedNameFromPropertyValueGetParam(fixedIpsEntry.getValue());
+ if (Objects.nonNull(fixedIpsName)) {
+ if (!evalPattern(fixedIpsName, regexList)) {
+ globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(
+ Messages.FIXED_IPS_NOT_ALIGNED_WITH_GUIDE_LINES.getErrorMessage(),
+ resourceEntry.getKey()));
+ }
+ }
+ } else {
+ globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.MISSING_GET_PARAM.getErrorMessage(), "fixed_ips",
+ resourceEntry.getKey()));
+ }
+ }
+ }
+ }
+ }
+
+
+ private void validateNovaServerNamingConvention(String fileName, String envFileName,
+ Map.Entry<String, Resource> resourceEntry,
+ GlobalValidationContext globalContext) {
+ if (MapUtils.isEmpty(resourceEntry.getValue().getProperties())) {
+ return;
+ }
+
+ checkIfNovaNameByGuidelines(fileName, envFileName, resourceEntry, globalContext);
+ }
+
+ private void checkIfNovaNameByGuidelines(String fileName, String envFileName,
+ Map.Entry<String, Resource> resourceEntry,
+ GlobalValidationContext globalContext) {
+ if (MapUtils.isEmpty(resourceEntry.getValue().getProperties())) {
+ return;
+ }
+
+ Object novaServerName = resourceEntry.getValue().getProperties().get("name");
+ Map novaNameMap;
+ String novaName;
+ if (Objects.nonNull(novaServerName)) {
+ if (novaServerName instanceof Map) {
+ novaNameMap = (Map) novaServerName;
+ Object novaNameGetParam =
+ novaNameMap.get(ResourceReferenceFunctions.GET_PARAM.getFunction()) == null ? null
+ : novaNameMap.get(ResourceReferenceFunctions.GET_PARAM.getFunction());
+ if (Objects.nonNull(novaNameGetParam)) {
+ checkNovaNameGetParamValueMap(fileName, novaNameGetParam, resourceEntry, globalContext);
+ novaName = novaNameGetParam instanceof List ? (String) ((List) novaNameGetParam).get(0)
+ : (String) novaNameGetParam;
+ checkIfNovaNameParameterInEnvIsStringOrList(fileName, envFileName, resourceEntry,
+ novaName, globalContext);
+ }
+ } else {
+ globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.MISSING_GET_PARAM.getErrorMessage(),
+ "nova server name", resourceEntry.getKey()));
+ }
+ }
+
+ }
+
+ private void checkIfNovaNameParameterInEnvIsStringOrList(String fileName, String envFileName,
+ Map.Entry<String, Resource>
+ resourceEntry,
+ String novaServerName,
+ GlobalValidationContext globalContext) {
+ if (Objects.nonNull(envFileName)) {
+ Environment environment = validateEnvContent(envFileName, globalContext);
+
+ if (environment != null && MapUtils.isNotEmpty(environment.getParameters())) {
+ Object novaServerNameEnvValue =
+ environment.getParameters().containsKey(novaServerName) ? environment.getParameters()
+ .get(novaServerName) : null;
+ if (Objects.nonNull(novaServerNameEnvValue)) {
+ if (!DefinedHeatParameterTypes
+ .isNovaServerEnvValueIsFromRightType(novaServerNameEnvValue)) {
+ globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(
+ Messages.NOVA_SERVER_NAME_NOT_ALIGNED_WITH_GUIDE_LINES.getErrorMessage(),
+ resourceEntry.getKey()));
+ }
+ }
+ }
+ }
+ }
+
+
+ private void validateNovaServerAvailabilityZoneName(String fileName,
+ Map.Entry<String, Resource> resourceEntry,
+ GlobalValidationContext globalContext) {
+ String[] regexList = new String[]{"availability_zone_(\\d+)"};
+
+ if (MapUtils.isEmpty(resourceEntry.getValue().getProperties())) {
+ return;
+ }
+
+ Object availabilityZoneMap =
+ resourceEntry.getValue().getProperties().containsKey("availability_zone") ? resourceEntry
+ .getValue().getProperties().get("availability_zone") : null;
+
+ if (Objects.nonNull(availabilityZoneMap)) {
+ if (availabilityZoneMap instanceof Map) {
+ String availabilityZoneName = getWantedNameFromPropertyValueGetParam(availabilityZoneMap);
+
+ if (availabilityZoneName != null) {
+ if (!evalPattern(availabilityZoneName, regexList)) {
+ globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(
+ Messages.AVAILABILITY_ZONE_NOT_ALIGNED_WITH_GUIDE_LINES.getErrorMessage(),
+ resourceEntry.getKey()));
+ }
+ }
+ } else {
+ globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.MISSING_GET_PARAM.getErrorMessage(),
+ "availability_zone", resourceEntry.getKey()));
+ }
+ }
+
+ }
+
+ @SuppressWarnings("unchecked")
+ private void checkNovaNameGetParamValueMap(String fileName, Object getParamValue,
+ Map.Entry<String, Resource> resourceEntry,
+ GlobalValidationContext globalContext) {
+ if (getParamValue instanceof List) {
+ List<Object> getParamNameList = (List) getParamValue;
+ String[] regexName = new String[]{".*_names"};
+ isNovaNameAsListLegal(fileName, getParamNameList, regexName, resourceEntry, globalContext);
+ } else if (getParamValue instanceof String) {
+ String[] regexName = new String[]{".*_name_(\\d+)"};
+ isNovaNameAsStringLegal(fileName, (String) getParamValue, regexName, resourceEntry,
+ globalContext);
+ }
+
+ }
+
+
+ private void isNovaNameAsListLegal(String fileName, List<Object> getParamNameList,
+ String[] regexName, Map.Entry<String, Resource> resourceEntry,
+ GlobalValidationContext globalContext) {
+
+ if (getParamNameList.size() != 2 || !evalPattern(getParamNameList.get(0), regexName)) {
+ globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(
+ Messages.NOVA_SERVER_NAME_NOT_ALIGNED_WITH_GUIDE_LINES.getErrorMessage(),
+ resourceEntry.getKey()));
+ }
+ }
+
+ private boolean isNovaNameAsStringLegal(String fileName, String novaName, String[] regexName,
+ Map.Entry<String, Resource> resourceEntry,
+ GlobalValidationContext globalContext) {
+ if (!evalPattern(novaName, regexName)) {
+ globalContext.addMessage(fileName, ErrorLevel.WARNING, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(
+ Messages.NOVA_SERVER_NAME_NOT_ALIGNED_WITH_GUIDE_LINES.getErrorMessage(),
+ resourceEntry.getKey()));
+ return false;
+ }
+ return true;
+ }
+
+ private String getWantedNameFromPropertyValueGetParam(Object value) {
+ Set<String> paramName = HeatStructureUtil
+ .getReferencedValuesByFunctionName(null, ResourceReferenceFunctions.GET_PARAM.getFunction(),
+ value, null);
+ if (paramName != null && CollectionUtils.isNotEmpty(paramName)) {
+ return (String) paramName.toArray()[0];
+ }
+ return null;
+ }
+
+ private String getResourceIdFromPropertyValue(String filename, Object value,
+ GlobalValidationContext globalContext) {
+ Set<String> referenceValues = HeatStructureUtil.getReferencedValuesByFunctionName(filename,
+ ResourceReferenceFunctions.GET_RESOURCE.getFunction(), value, globalContext);
+ if (referenceValues != null && CollectionUtils.isNotEmpty(referenceValues)) {
+ return (String) referenceValues.toArray()[0];
+ }
+ return null;
+ }
+
+ private boolean isPropertyValueGetResource(String filename, Object value,
+ GlobalValidationContext globalContext) {
+ Set<String> referenceValues = HeatStructureUtil.getReferencedValuesByFunctionName(filename,
+ ResourceReferenceFunctions.GET_RESOURCE.getFunction(), value, globalContext);
+ return referenceValues != null && (referenceValues.size() > 0);
+ }
+
+ private boolean isExpectedToBeExposed(String type) {
+ return HeatResourcesTypes.isResourceExpectedToBeExposed(type);
+ }
+
+ private Set<String> validateManifest(ManifestContent manifestContent,
+ GlobalValidationContext globalContext) {
+ Set<String> baseFiles = ManifestUtil.getBaseFiles(manifestContent);
+ if (baseFiles == null || baseFiles.size() == 0) {
+ globalContext.addMessage(
+ AsdcCommon.MANIFEST_NAME,
+ ErrorLevel.WARNING,
+ ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.MISSIN_BASE_HEAT_FILE.getErrorMessage()));
+ } else if (baseFiles.size() > 1) {
+ String baseFileList = getElementListAsString(baseFiles);
+ globalContext.addMessage(
+ AsdcCommon.MANIFEST_NAME,
+ ErrorLevel.WARNING,
+ ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.MULTI_BASE_HEAT_FILE.getErrorMessage(),
+ baseFileList));
+ }
+ return baseFiles;
+ }
+
+ private String getElementListAsString(Set<String> elementCollection) {
+
+ return "[" + CommonMethods.collectionToCommaSeparatedString(elementCollection) + "]";
+ }
+
+
+ private Environment validateEnvContent(String envFileName,
+ GlobalValidationContext globalContext) {
+ Environment envContent;
+ try {
+ envContent =
+ new YamlUtil().yamlToObject(globalContext.getFileContent(envFileName), Environment.class);
+ } catch (Exception exception) {
+ return null;
+ }
+ return envContent;
+ }
+
+ private HeatOrchestrationTemplate checkHeatOrchestrationPreCondition(String fileName,
+ GlobalValidationContext
+ globalContext) {
+ HeatOrchestrationTemplate heatOrchestrationTemplate;
+ try {
+ heatOrchestrationTemplate = new YamlUtil()
+ .yamlToObject(globalContext.getFileContent(fileName), HeatOrchestrationTemplate.class);
+
+ } catch (Exception exception) {
+ return null;
+ }
+ return heatOrchestrationTemplate;
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/HeatValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/HeatValidator.java
new file mode 100644
index 0000000000..c287394a54
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/HeatValidator.java
@@ -0,0 +1,469 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.validation.impl.validators;
+
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections4.MapUtils;
+import org.openecomp.core.utilities.json.JsonUtil;
+import org.openecomp.core.utilities.yaml.YamlUtil;
+import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder;
+import org.openecomp.core.validation.errors.Messages;
+import org.openecomp.core.validation.interfaces.Validator;
+import org.openecomp.core.validation.types.GlobalValidationContext;
+import org.openecomp.sdc.common.utils.AsdcCommon;
+import org.openecomp.sdc.datatypes.error.ErrorLevel;
+import org.openecomp.sdc.heat.datatypes.DefinedHeatParameterTypes;
+import org.openecomp.sdc.heat.datatypes.manifest.FileData;
+import org.openecomp.sdc.heat.datatypes.manifest.ManifestContent;
+import org.openecomp.sdc.heat.datatypes.model.Environment;
+import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
+import org.openecomp.sdc.heat.datatypes.model.HeatPseudoParameters;
+import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes;
+import org.openecomp.sdc.heat.datatypes.model.Output;
+import org.openecomp.sdc.heat.datatypes.model.Parameter;
+import org.openecomp.sdc.heat.datatypes.model.Resource;
+import org.openecomp.sdc.heat.datatypes.model.ResourceReferenceFunctions;
+import org.openecomp.sdc.heat.services.HeatStructureUtil;
+import org.openecomp.sdc.heat.services.manifest.ManifestUtil;
+import org.openecomp.sdc.validation.impl.util.HeatValidationService;
+import org.openecomp.sdc.validation.impl.util.ResourceValidationHeatValidator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.InputStream;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+
+public class HeatValidator implements Validator {
+
+ protected static Logger logger = LoggerFactory.getLogger(HeatValidator.class);
+
+ /* validation 9*/
+ private static void validateAllRequiredArtifactsExist(String fileName,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ Set<String> artifacts,
+ GlobalValidationContext globalContext) {
+ Collection<Resource> resourcesValues = heatOrchestrationTemplate.getResources() == null ? null
+ : heatOrchestrationTemplate.getResources().values();
+
+ if (CollectionUtils.isNotEmpty(resourcesValues)) {
+ for (Resource resource : resourcesValues) {
+ Collection<Object> properties =
+ resource.getProperties() == null ? null : resource.getProperties().values();
+ if (CollectionUtils.isNotEmpty(properties)) {
+ for (Object property : properties) {
+ if (property instanceof Map) {
+ Set<String> artifactNames = HeatStructureUtil
+ .getReferencedValuesByFunctionName(fileName,
+ ResourceReferenceFunctions.GET_FILE.getFunction(), property, globalContext);
+ artifacts.addAll(artifactNames);
+ HeatValidationService.checkArtifactsExistence(fileName, artifactNames, globalContext);
+ }
+ }
+ }
+ }
+ }
+
+
+ }
+
+ /* validation 14 */
+ private static void validateAllResourceReferencesExist(String fileName,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ GlobalValidationContext globalContext) {
+
+ Set<String> resourcesNames = heatOrchestrationTemplate.getResources() == null ? null
+ : heatOrchestrationTemplate.getResources().keySet();
+ Collection<Resource> resourcesValues = heatOrchestrationTemplate.getResources() == null ? null
+ : heatOrchestrationTemplate.getResources().values();
+ Collection<Output> outputsValues = heatOrchestrationTemplate.getOutputs() == null ? null
+ : heatOrchestrationTemplate.getOutputs().values();
+
+ HeatValidationService
+ .checkResourceExistenceFromResourcesMap(fileName, resourcesNames, resourcesValues,
+ globalContext);
+ HeatValidationService
+ .checkResourceExistenceFromResourcesMap(fileName, resourcesNames, outputsValues,
+ globalContext);
+
+ }
+
+ /* validation 16 */
+ private static void validateGetParamPointToParameter(String fileName,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ GlobalValidationContext globalContext) {
+ Set<String> parametersNames = heatOrchestrationTemplate.getParameters() == null ? null
+ : heatOrchestrationTemplate.getParameters().keySet();
+ Map<String, Resource> resourcesMap = heatOrchestrationTemplate.getResources();
+
+ if (CollectionUtils.isNotEmpty(parametersNames) && MapUtils.isNotEmpty(resourcesMap)) {
+ for (Map.Entry<String, Resource> resourceEntry : resourcesMap.entrySet()) {
+ Resource resource = resourceEntry.getValue();
+ Map<String, Object> properties = resource.getProperties();
+ if (MapUtils.isNotEmpty(properties)) {
+ Collection<Object> propertiesValues = properties.values();
+ if (CollectionUtils.isNotEmpty(propertiesValues)) {
+ for (Object propertyObject : propertiesValues) {
+ //Set<String> referencedParameterNames = HeatValidationService
+ // .getParameterNameFromGetParamMap(propertyObject);
+ Set<String> referencedParameterNames = HeatStructureUtil
+ .getReferencedValuesByFunctionName(fileName, "get_param", propertyObject,
+ globalContext);
+
+ validateReferenceParams(fileName, resourceEntry.getKey(), parametersNames,
+ referencedParameterNames, globalContext);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private static void validateReferenceParams(String fileName, String resourceName,
+ Set<String> parametersNamesFromFile,
+ Set<String> referencedParametersNames,
+ GlobalValidationContext globalContext) {
+
+ for (String parameterName : referencedParametersNames) {
+ if (!isHeatPseudoParameter(parameterName)
+ && !parametersNamesFromFile.contains(parameterName)) {
+ globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.REFERENCED_PARAMETER_NOT_FOUND.getErrorMessage(),
+ parameterName, resourceName));
+ }
+ }
+ }
+
+ private static boolean isHeatPseudoParameter(String parameterName) {
+ return HeatPseudoParameters.getPseudoParameterNames().contains(parameterName);
+ }
+
+ /* validation 18*/
+ private static void validateGetAttr(String fileName,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ GlobalValidationContext globalContext) {
+ Map<String, Output> outputMap;
+ outputMap = heatOrchestrationTemplate.getOutputs();
+
+ if (MapUtils.isNotEmpty(outputMap)) {
+ HeatValidationService.loopOverOutputMapAndValidateGetAttrFromNested(fileName, outputMap,
+ heatOrchestrationTemplate, globalContext);
+ }
+ }
+
+ /* validation 17 + */
+ private static void validateEnvFile(String fileName, String envFileName,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ GlobalValidationContext globalContext) {
+
+ Environment envContent;
+
+ if (!envFileName.contains(".env")) {
+ globalContext.addMessage(envFileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.WRONG_ENV_FILE_EXTENSION.getErrorMessage(),
+ envFileName));
+ }
+
+ envContent = HeatValidationService.validateEnvContent(fileName, envFileName, globalContext);
+ if (envContent != null) {
+ validateEnvContentIsSubSetOfHeatParameters(envFileName, envContent, globalContext,
+ heatOrchestrationTemplate);
+ validateEnvParametersMatchDefinedHeatParameterTypes(envFileName, envContent, globalContext,
+ heatOrchestrationTemplate);
+ }
+
+ }
+
+ private static void validateEnvContentIsSubSetOfHeatParameters(String envFile,
+ Environment envContent,
+ GlobalValidationContext globalContext,
+ HeatOrchestrationTemplate heatOrchestrationTemplate) {
+ Set<String> parametersNames = heatOrchestrationTemplate.getParameters() == null ? null
+ : heatOrchestrationTemplate.getParameters().keySet();
+
+ if (MapUtils.isNotEmpty(envContent.getParameters())) {
+ if (CollectionUtils.isNotEmpty(parametersNames)) {
+ for (Map.Entry<String, Object> envEntry : envContent.getParameters().entrySet()) {
+ String envParameter = envEntry.getKey();
+ if (!parametersNames.contains(envParameter)) {
+ globalContext.addMessage(envFile, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(
+ Messages.ENV_INCLUDES_PARAMETER_NOT_IN_HEAT.getErrorMessage(), envFile,
+ envParameter));
+ }
+ }
+ } else {
+ for (Map.Entry<String, Object> envEntry : envContent.getParameters().entrySet()) {
+ globalContext.addMessage(envFile, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.ENV_INCLUDES_PARAMETER_NOT_IN_HEAT.getErrorMessage(),
+ envFile, envEntry.getKey()));
+ }
+ }
+ }
+ }
+
+ private static void validateParameterDefaultTypeAlignWithType(String fileName,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ GlobalValidationContext globalContext) {
+ Map<String, Parameter> parametersMap = heatOrchestrationTemplate.getParameters() == null ? null
+ : heatOrchestrationTemplate.getParameters();
+
+ if (MapUtils.isNotEmpty(parametersMap)) {
+ for (Map.Entry<String, Parameter> parameterEntry : parametersMap.entrySet()) {
+ Parameter parameter = parameterEntry.getValue();
+ String parameterType = parameter.getType();
+ Object parameterDefault = parameter.get_default();
+ if (parameterDefault != null && parameterType != null) {
+ boolean isValueMatchDefault =
+ DefinedHeatParameterTypes.isValueIsFromGivenType(parameterDefault, parameterType);
+ if (!isValueMatchDefault) {
+ globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(
+ Messages.PARAMETER_DEFAULT_VALUE_NOT_ALIGN_WITH_TYPE.getErrorMessage(),
+ parameterEntry.getKey(), parameterType));
+ }
+ }
+ }
+ }
+ }
+
+ private static void validateEnvParametersMatchDefinedHeatParameterTypes(String envFile,
+ Environment envContent,
+ GlobalValidationContext globalContext,
+ HeatOrchestrationTemplate heatOrchestrationTemplate) {
+ Map<String, Parameter> heatParameters = heatOrchestrationTemplate.getParameters();
+
+ if (MapUtils.isNotEmpty(heatParameters) && MapUtils.isNotEmpty(envContent.getParameters())) {
+ for (Map.Entry<String, Object> envEntry : envContent.getParameters().entrySet()) {
+ String parameterName = envEntry.getKey();
+ Object parameterEnvValue = envEntry.getValue();
+ Parameter parameterFromHeatFile = heatParameters.get(parameterName);
+ if (parameterFromHeatFile != null) {
+ String parameterType = parameterFromHeatFile.getType();
+ if (!DefinedHeatParameterTypes.isEmptyValueInEnv(parameterEnvValue)
+ && !DefinedHeatParameterTypes.isValueIsFromGivenType(parameterEnvValue,
+ parameterType)) {
+ globalContext.addMessage(envFile, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(
+ Messages.PARAMETER_ENV_VALUE_NOT_ALIGN_WITH_TYPE.getErrorMessage(),
+ parameterName));
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ public void validate(GlobalValidationContext globalContext) {
+
+ ManifestContent manifestContent;
+ try {
+ manifestContent = checkValidationPreCondition(globalContext);
+ } catch (Exception e0) {
+ return;
+ }
+ String baseFileName;
+ Map<String, FileData.Type> fileTypeMap = ManifestUtil.getFileTypeMap(manifestContent);
+ Map<String, FileData> fileEnvMap = ManifestUtil.getFileAndItsEnv(manifestContent);
+ Set<String> baseFiles = ManifestUtil.getBaseFiles(manifestContent);
+ Set<String> securityGroupsNamesFromBaseFileOutputs;
+ Set<String> artifacts = new HashSet<>();
+
+
+ baseFileName = CollectionUtils.isEmpty(baseFiles) ? null : baseFiles.iterator().next();
+ securityGroupsNamesFromBaseFileOutputs = baseFileName == null ? null
+ : checkForBaseFilePortsExistenceAndReturnSecurityGroupNamesFromOutputsIfNot(baseFileName,
+ globalContext);
+
+
+ globalContext.getFiles().stream()
+ .filter(fileName -> FileData.isHeatFile(fileTypeMap.get(fileName))).forEach(
+ fileName -> validate(fileName,
+ fileEnvMap.get(fileName) == null ? null : fileEnvMap.get(fileName).getFile(),
+ baseFileName == null ? null : baseFileName, artifacts,
+ securityGroupsNamesFromBaseFileOutputs, globalContext));
+
+
+ Set<String> manifestArtifacts = ManifestUtil.getArtifacts(manifestContent);
+
+ globalContext.getFiles().stream()
+ .filter(fileName -> manifestArtifacts.contains(fileName) && !artifacts.contains(fileName))
+ .forEach(fileName -> globalContext.addMessage(fileName, ErrorLevel.WARNING,
+ Messages.ARTIFACT_FILE_NOT_REFERENCED.getErrorMessage()));
+
+ ResourceValidationHeatValidator
+ .handleNotEmptyResourceNamesList(baseFileName, securityGroupsNamesFromBaseFileOutputs,
+ "SecurityGroup", globalContext);
+
+ }
+
+ private void validate(String fileName, String envFileName, String baseFileName,
+ Set<String> artifacts, Set<String> securityGroupsNamesFromBaseFileOutputs,
+ GlobalValidationContext globalContext) {
+ HeatOrchestrationTemplate heatOrchestrationTemplate =
+ checkHeatOrchestrationPreCondition(fileName, globalContext);
+
+
+ if (heatOrchestrationTemplate != null) {
+ if (!(fileName.contains(".yaml") || fileName.contains(".yml"))) {
+ globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.WRONG_HEAT_FILE_EXTENSION.getErrorMessage(),
+ fileName));
+ }
+
+ validateHeatBaseStructure(fileName, heatOrchestrationTemplate, globalContext);
+
+ ResourceValidationHeatValidator
+ .validateResourceType(fileName, baseFileName, securityGroupsNamesFromBaseFileOutputs,
+ heatOrchestrationTemplate, globalContext);
+ validateParameterDefaultTypeAlignWithType(fileName, heatOrchestrationTemplate, globalContext);
+ validateAllResourceReferencesExist(fileName, heatOrchestrationTemplate, globalContext);
+ validateGetParamPointToParameter(fileName, heatOrchestrationTemplate, globalContext);
+ validateGetAttr(fileName, heatOrchestrationTemplate, globalContext);
+ validateAllRequiredArtifactsExist(fileName, heatOrchestrationTemplate, artifacts,
+ globalContext);
+
+ if (envFileName != null) {
+ validateEnvFile(fileName, envFileName, heatOrchestrationTemplate, globalContext);
+ }
+ }
+ }
+
+ private void validateHeatBaseStructure(String fileName,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ GlobalValidationContext globalContext) {
+ if (heatOrchestrationTemplate.getHeat_template_version() == null) {
+ globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.INVALID_HEAT_FORMAT_REASON.getErrorMessage(),
+ "missing template version"));
+ }
+ if (heatOrchestrationTemplate.getResources() == null
+ || heatOrchestrationTemplate.getResources().size() == 0) {
+ globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.INVALID_HEAT_FORMAT_REASON.getErrorMessage(),
+ "heat file must have minimum one resource"));
+ }
+ }
+
+ protected ManifestContent checkValidationPreCondition(GlobalValidationContext globalContext) {
+ InputStream manifest = globalContext.getFileContent(AsdcCommon.MANIFEST_NAME);
+ if (manifest == null) {
+ throw new RuntimeException("Can't load manifest file for Heat Validator");
+ }
+ ManifestContent manifestContent;
+ try {
+ manifestContent = JsonUtil.json2Object(manifest, ManifestContent.class);
+ } catch (Exception e0) {
+ throw new RuntimeException("Can't load manifest file for Heat Validator");
+ }
+
+ return manifestContent;
+ }
+
+
+ private HeatOrchestrationTemplate checkHeatOrchestrationPreCondition(String fileName,
+ GlobalValidationContext globalContext) {
+ HeatOrchestrationTemplate heatOrchestrationTemplate;
+ try {
+ heatOrchestrationTemplate = new YamlUtil()
+ .yamlToObject(globalContext.getFileContent(fileName), HeatOrchestrationTemplate.class);
+ } catch (Exception e0) {
+ globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.INVALID_HEAT_FORMAT_REASON.getErrorMessage(),
+ getParserExceptionReason(e0)));
+ return null;
+ }
+
+ return heatOrchestrationTemplate;
+ }
+
+
+ private Set<String> checkForBaseFilePortsExistenceAndReturnSecurityGroupNamesFromOutputsIfNot(
+ String baseFileName, GlobalValidationContext globalContext) {
+ Set<String> securityGroupsNamesFromOutputsMap = new HashSet<>();
+ HeatOrchestrationTemplate heatOrchestrationTemplate =
+ checkHeatOrchestrationPreCondition(baseFileName, globalContext);
+
+ if (heatOrchestrationTemplate != null) {
+ Map<String, Resource> resourceMap = heatOrchestrationTemplate.getResources();
+ if (!isPortResourceExistInBaseFile(resourceMap)) {
+ getSecurityGroupsReferencedResourcesFromOutputs(securityGroupsNamesFromOutputsMap,
+ heatOrchestrationTemplate.getOutputs(), resourceMap);
+ }
+ }
+
+ return securityGroupsNamesFromOutputsMap;
+ }
+
+
+ @SuppressWarnings("unchecked")
+ private void getSecurityGroupsReferencedResourcesFromOutputs(
+ Set<String> securityGroupsNamesFromOutputsMap, Map<String, Output> outputMap,
+ Map<String, Resource> resourceMap) {
+ if (MapUtils.isNotEmpty(outputMap)) {
+ for (Map.Entry<String, Output> outputEntry : outputMap.entrySet()) {
+ Object outputValue = outputEntry.getValue().getValue();
+ if (Objects.nonNull(outputValue) && outputValue instanceof Map) {
+ String resourceName = (String) ((Map) outputValue)
+ .get(ResourceReferenceFunctions.GET_RESOURCE.getFunction());
+ if (Objects.nonNull(resourceName)) {
+ Resource resource = resourceMap.get(resourceName);
+ if (Objects.nonNull(resource) && resource.getType().equals(
+ HeatResourcesTypes.NEUTRON_SECURITY_GROUP_RESOURCE_TYPE.getHeatResource())) {
+ securityGroupsNamesFromOutputsMap.add(outputEntry.getKey());
+ }
+ }
+ }
+ }
+ }
+ }
+
+
+ private boolean isPortResourceExistInBaseFile(Map<String, Resource> resourceMap) {
+ for (Map.Entry<String, Resource> resourceEntry : resourceMap.entrySet()) {
+ if (resourceEntry.getValue().getType()
+ .equals(HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource())) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+
+ private String getParserExceptionReason(Exception e0) {
+ String reason;
+
+ if (e0.getCause() != null && e0.getCause().getCause() != null) {
+ reason = e0.getCause().getCause().getMessage();
+ } else if (e0.getCause() != null) {
+ reason = e0.getCause().getMessage();
+ } else {
+ reason = Messages.GENERAL_HEAT_PARSER_ERROR.getErrorMessage();
+ }
+ return reason;
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/ManifestValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/ManifestValidator.java
new file mode 100644
index 0000000000..4ce40f0007
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/ManifestValidator.java
@@ -0,0 +1,153 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.validation.impl.validators;
+
+import org.openecomp.core.utilities.json.JsonUtil;
+import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder;
+import org.openecomp.core.validation.errors.Messages;
+import org.openecomp.core.validation.interfaces.Validator;
+import org.openecomp.core.validation.types.GlobalValidationContext;
+import org.openecomp.sdc.common.utils.AsdcCommon;
+import org.openecomp.sdc.datatypes.error.ErrorLevel;
+import org.openecomp.sdc.heat.datatypes.manifest.FileData;
+import org.openecomp.sdc.heat.datatypes.manifest.ManifestContent;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ManifestValidator implements Validator {
+
+ private static Logger logger = LoggerFactory.getLogger(YamlValidator.class);
+
+
+ @Override
+ public void validate(GlobalValidationContext globalContext) {
+
+
+ InputStream content = globalContext.getFileContent(AsdcCommon.MANIFEST_NAME);
+ ManifestContent manifestContent;
+
+ try {
+ manifestContent = JsonUtil.json2Object(content, ManifestContent.class);
+ } catch (RuntimeException re) {
+ globalContext.addMessage(AsdcCommon.MANIFEST_NAME, ErrorLevel.ERROR,
+ Messages.INVALID_MANIFEST_FILE.getErrorMessage());
+ return;
+ }
+
+ List<String> manifestFiles = getManifestFileList(manifestContent, globalContext);
+ manifestFiles.stream().filter(name ->
+ !globalContext.getFileContextMap().containsKey(name)
+ ).forEach(name -> globalContext
+ .addMessage(name, ErrorLevel.ERROR, Messages.MISSING_FILE_IN_ZIP.getErrorMessage()));
+
+ globalContext.getFileContextMap().keySet().stream().filter(name ->
+ !manifestFiles.contains(name) && !AsdcCommon.MANIFEST_NAME.equals(name)
+ ).forEach(name ->
+ globalContext.addMessage(name, ErrorLevel.WARNING,
+ Messages.MISSING_FILE_IN_MANIFEST.getErrorMessage())
+ );
+
+ }
+
+ private List<String> getManifestFileList(ManifestContent manifestContent,
+ GlobalValidationContext context) {
+ ManifestScanner manifestScanner = new ManifestScanner();
+ manifestScanner.init(context);
+ manifestScanner.scan(null, manifestContent.getData(), context);
+ return manifestScanner.getFileList();
+ }
+
+
+ private class ManifestScanner {
+ private GlobalValidationContext globalValidationContext;
+ private List<String> fileList;
+
+ public void init(GlobalValidationContext globalValidationContext) {
+ this.globalValidationContext = globalValidationContext;
+ this.fileList = new ArrayList<>();
+ }
+
+
+ public void scan(FileData fileData, List<FileData> data,
+ GlobalValidationContext globalContext) {
+ if (fileData == null) {
+ for (FileData childFileData : data) {
+ if (childFileData.getType() != null
+ && childFileData.getType().equals(FileData.Type.HEAT_ENV)) {
+ globalContext.addMessage(childFileData.getFile(), ErrorLevel.ERROR,
+ ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.ENV_NOT_ASSOCIATED_TO_HEAT.getErrorMessage()));
+ }
+ }
+ }
+ if (fileData != null) {
+ fileList.add(fileData.getFile());
+ validateFileTypeVsFileName(fileData);
+ }
+ if (data == null) {
+ return;
+ }
+ data.stream().forEach(chileFileData -> {
+ scan(chileFileData, chileFileData.getData(), globalContext);
+ });
+ }
+
+
+ public List<String> getFileList() {
+ return this.fileList;
+ }
+
+ private void validateFileTypeVsFileName(FileData fileData) {
+ String fileName = fileData.getFile();
+ if (fileName == null) {
+ this.globalValidationContext.addMessage(AsdcCommon.MANIFEST_NAME, ErrorLevel.ERROR,
+ Messages.MISSING_FILE_NAME_IN_MANIFEST.getErrorMessage());
+
+ }
+ FileData.Type type = fileData.getType();
+ if (type == null) {
+ this.globalValidationContext
+ .addMessage(fileName, ErrorLevel.ERROR, Messages.INVALID_FILE_TYPE.getErrorMessage());
+ } else if (type.equals(FileData.Type.HEAT_NET) || type.equals(FileData.Type.HEAT_VOL)
+ || type.equals(FileData.Type.HEAT)) {
+ if (fileName != null && !fileName.endsWith(".yml") && !fileName.endsWith(".yaml")) {
+ this.globalValidationContext.addMessage(fileName, ErrorLevel.ERROR,
+ ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.WRONG_HEAT_FILE_EXTENSION.getErrorMessage(),
+ fileName));
+ }
+ } else if (type.equals(FileData.Type.HEAT_ENV)) {
+ if (fileName != null && !fileName.endsWith(".env")) {
+ this.globalValidationContext.addMessage(fileName, ErrorLevel.ERROR,
+ ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.WRONG_ENV_FILE_EXTENSION.getErrorMessage(),
+ fileName));
+ }
+ }
+ }
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/YamlValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/YamlValidator.java
new file mode 100644
index 0000000000..4d05b2b066
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/YamlValidator.java
@@ -0,0 +1,97 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.validation.impl.validators;
+
+import org.openecomp.core.utilities.yaml.YamlUtil;
+import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder;
+import org.openecomp.core.validation.errors.Messages;
+import org.openecomp.core.validation.interfaces.Validator;
+import org.openecomp.core.validation.types.GlobalValidationContext;
+import org.openecomp.sdc.datatypes.error.ErrorLevel;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.yaml.snakeyaml.error.MarkedYAMLException;
+import org.yaml.snakeyaml.parser.ParserException;
+
+import java.io.InputStream;
+import java.util.Collection;
+import java.util.Map;
+
+public class YamlValidator implements Validator {
+
+ private static final Logger logger = LoggerFactory.getLogger(YamlValidator.class);
+
+ @Override
+ public void validate(GlobalValidationContext globalContext) {
+
+ Collection<String> files = globalContext.files(
+ (fileName, globalValidationContext) -> (fileName.endsWith(".yaml")
+ || fileName.endsWith(".yml") || fileName.endsWith(".env")));
+
+ files.stream().forEach(fileName -> validate(fileName, globalContext));
+ }
+
+ private void validate(String fileName, GlobalValidationContext globalContext) {
+ InputStream rowContent = globalContext.getFileContent(fileName);
+ if (rowContent == null) {
+ globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.INVALID_YAML_FORMAT_REASON.getErrorMessage(),
+ Messages.EMPTY_YAML_FILE.getErrorMessage()));
+ return; /* no need to continue validation */
+ }
+
+ try {
+ convert(rowContent, Map.class);
+ } catch (Exception exception) {
+
+ globalContext.addMessage(fileName, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.INVALID_YAML_FORMAT_REASON.getErrorMessage(),
+ getParserExceptionReason(exception)));
+ logger.error("Exception in yaml parser. message:" + exception.getMessage());
+ }
+ }
+
+ private String getParserExceptionReason(Exception exception) {
+ String reason = null;
+
+ if (exception.getCause() instanceof MarkedYAMLException) {
+ if (exception.getCause() != null) {
+ if (exception.getCause().getCause() instanceof ParserException) {
+ reason = exception.getCause().getCause().getMessage();
+ } else {
+ reason = exception.getCause().getMessage();
+ }
+ }
+ } else if (exception instanceof MarkedYAMLException) {
+
+ reason = exception.getMessage();
+
+ } else {
+ reason = Messages.GENERAL_YAML_PARSER_ERROR.getErrorMessage();
+ }
+ return reason;
+ }
+
+
+ private <T> T convert(InputStream content, Class<T> type) {
+ return new YamlUtil().yamlToObject(content, type);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ErrorMessagesTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ErrorMessagesTest.java
new file mode 100644
index 0000000000..d762689049
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ErrorMessagesTest.java
@@ -0,0 +1,25 @@
+package org.openecomp.sdc.validation.impl.validators;
+
+import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder;
+import org.openecomp.core.validation.errors.Messages;
+import org.junit.Test;
+import org.testng.Assert;
+
+public class ErrorMessagesTest {
+
+ @Test
+ public void testErrorFormatWithOneParam() {
+ String error1 = ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.MISSING_FILE_NAME_IN_MANIFEST.getErrorMessage(),
+ "file.yaml");
+ Assert.assertNotNull(error1);
+ }
+
+ @Test
+ public void testErrorFormatWithTwoParams() {
+ String error1 = ErrorMessagesFormatBuilder
+ .getErrorWithParameters(Messages.REFERENCED_PARAMETER_NOT_FOUND.getErrorMessage(), "param",
+ "res");
+ Assert.assertNotNull(error1);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ValidatorBaseTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ValidatorBaseTest.java
new file mode 100644
index 0000000000..f9c5bf423b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ValidatorBaseTest.java
@@ -0,0 +1,84 @@
+package org.openecomp.sdc.validation.impl.validators;
+
+import org.openecomp.core.utilities.file.FileUtils;
+import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder;
+import org.openecomp.core.validation.interfaces.Validator;
+import org.openecomp.core.validation.types.GlobalValidationContext;
+import org.openecomp.core.validation.types.MessageContainer;
+import org.testng.Assert;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+public abstract class ValidatorBaseTest {
+
+ private static GlobalValidationContext createGlobalContextFromPath(String path) {
+ GlobalValidationContext globalValidationContext = new GlobalValidationContext();
+ Map<String, byte[]> contentMap = getContentMapByPath(path);
+ if (contentMap == null) {
+ return null;
+ }
+ contentMap.entrySet().stream()
+ .forEach(entry -> globalValidationContext.addFileContext(entry.getKey(), entry.getValue()));
+
+ return globalValidationContext;
+ }
+
+
+ // New test base implementation
+
+ private static Map<String, byte[]> getContentMapByPath(String path) {
+ Map<String, byte[]> contentMap = new HashMap<>();
+ byte[] fileContent;
+ FileInputStream fis;
+ URL url = ValidatorBaseTest.class.getResource(path);
+ File pathFile = new File(url.getFile());
+ File[] files;
+ if (pathFile.isDirectory()) {
+ files = pathFile.listFiles();
+ } else {
+ files = new File[]{pathFile};
+ }
+
+ if (files == null || files.length == 0) {
+ return null;
+ }
+
+ for (File file : files) {
+ try {
+ fis = new FileInputStream(file);
+ fileContent = FileUtils.toByteArray(fis);
+ contentMap.put(file.getName(), fileContent);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ return contentMap;
+ }
+
+ public abstract Map<String, MessageContainer> runValidation(String path);
+
+ protected Map<String, MessageContainer> testValidator(Validator validator, String path) {
+
+ GlobalValidationContext globalValidationContext = createGlobalContextFromPath(path);
+ validator.validate(globalValidationContext);
+
+ assert globalValidationContext != null;
+ return globalValidationContext.getContextMessageContainers();
+
+
+ }
+
+ protected void validateErrorMessage(String actualMessage, String expected, String... params) {
+ Assert.assertEquals(actualMessage.replace("\n", "").replace("\r", ""),
+ ErrorMessagesFormatBuilder.getErrorWithParameters(expected, params).replace("\n", "")
+ .replace("\r", ""));
+
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/EcompGuideLineValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/EcompGuideLineValidatorTest.java
new file mode 100644
index 0000000000..44e9a3a580
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/EcompGuideLineValidatorTest.java
@@ -0,0 +1,281 @@
+package org.openecomp.sdc.validation.impl.validators.validators;
+
+import org.openecomp.sdc.validation.impl.validators.EcompGuideLineValidator;
+
+import org.openecomp.sdc.validation.impl.validators.ValidatorBaseTest;
+import org.openecomp.core.validation.types.MessageContainer;
+
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+import java.util.Map;
+
+public class EcompGuideLineValidatorTest extends ValidatorBaseTest {
+
+ @Test
+ public void testMissingBaseHeat() {
+ Map<String, MessageContainer> messages =
+ runValidation("/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+ Assert.assertEquals(messages.get("MANIFEST.json").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("MANIFEST.json").getErrorMessageList().get(0).getMessage(),
+ "Missing Base HEAT. Pay attention that without Base HEAT, there will be no shared resources");
+ }
+
+ @Test
+ public void testMultiBaseHeat() {
+ Map<String, MessageContainer> messages =
+ runValidation("/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+ Assert.assertEquals(messages.get("MANIFEST.json").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("MANIFEST.json").getErrorMessageList().get(0).getMessage(),
+ "Multi Base HEAT. Expected only one. Files [second.yaml,first.yaml].");
+ }
+
+ @Test
+ public void testBaseHeatExposeVolume() {
+ Map<String, MessageContainer> messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 0);
+
+ messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
+ "Resource is not defined as output and thus cannot be Shared. resource id - volume_expose");
+ }
+
+ @Test
+ public void testBaseHeatExposeServerGroup() {
+ Map<String, MessageContainer> messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 0);
+
+ messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
+ "Resource is not defined as output and thus cannot be Shared. resource id - ServerGroup_expose");
+ }
+
+ @Test
+ public void testBaseHeatExposeSecurityGroup() {
+ Map<String, MessageContainer> messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 0);
+
+ messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
+ "Resource is not defined as output and thus cannot be Shared. resource id - SecurityGroup_expose");
+ }
+
+
+ @Test
+ public void testBaseHeatExposeNetwork() {
+ Map<String, MessageContainer> messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 0);
+
+ messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
+ "Resource is not defined as output and thus cannot be Shared. resource id - SecurityGroup_expose");
+ }
+
+ @Test
+ public void testBaseHeatExposeNetworkAndVolume() {
+ Map<String, MessageContainer> messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 0);
+
+ messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 2);
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
+ "Resource is not defined as output and thus cannot be Shared. resource id - volume_expose");
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(1).getMessage(),
+ "Resource is not defined as output and thus cannot be Shared. resource id - net_expose");
+ }
+
+ @Test
+ public void testNovaResourceNetworkUniqueRole() {
+ Map<String, MessageContainer> messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 0);
+
+ messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
+ "A resource is connected twice to the same network role Resource ID [FSB2] Network Role [Internal1].");
+ }
+
+ @Test
+ public void testHeatVolumeExpose() {
+ Map<String, MessageContainer> messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 0);
+
+ messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+ Assert.assertEquals(messages.get("firstVol.yaml").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("firstVol.yaml").getErrorMessageList().get(0).getMessage(),
+ "Volume is not defined as output and thus cannot be attached volume_expose");
+
+ }
+
+ @Test
+ public void testHeatPortNetworkNamingConvention() {
+ Map<String, MessageContainer> messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 0);
+
+ messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 3);
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
+ "Network Parameter Name not aligned with Guidelines Parameter Name [not_valid_network_name] Resource ID [port_resource]");
+ }
+
+ @Test
+ public void testHeatNovaServerMetaDataValidation() {
+ Map<String, MessageContainer> messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 0);
+
+ messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
+ "Missing VNF_ID Resource id [FSB2]");
+ }
+
+ @Test
+ public void testNeutronFixedIpName() {
+ Map<String, MessageContainer> messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 0);
+
+ messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 3);
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
+ "Fixed_IPS not aligned with Guidelines, Resource ID [port_resource_0]");
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(1).getMessage(),
+ "Fixed_IPS not aligned with Guidelines, Resource ID [port_resource_1]");
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(2).getMessage(),
+ "Fixed_IPS not aligned with Guidelines, Resource ID [port_resource_2]");
+ }
+
+
+ @Test
+ public void testNovaServerName() {
+ Map<String, MessageContainer> messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 0);
+
+ messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 2);
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
+ "Server Name not aligned with Guidelines, Resource ID [FSB2]");
+ }
+
+ @Test
+ public void testAvailabilityZoneName() {
+ Map<String, MessageContainer> messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 0);
+
+ messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 3);
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
+ "Server Availability Zone not aligned with Guidelines, Resource ID [FSB2]");
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(1).getMessage(),
+ "Server Availability Zone not aligned with Guidelines, Resource ID [FSB3]");
+ }
+
+ @Test
+ public void testFloatingIpResourceType() {
+ Map<String, MessageContainer> messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 0);
+
+
+ messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
+ "OS::Neutron::FloatingIP is in use, Resource ID [FSB2]");
+ }
+
+ @Test
+ public void testImageAndFlavorNames() {
+ Map<String, MessageContainer> messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 0);
+
+ messages = runValidation(
+ "/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 2);
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
+ "Wrong flavor name format in NOVA Server, Resource ID [FSB2]");
+ Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(1).getMessage(),
+ "Wrong image name format in NOVA Server, Resource ID [FSB3]");
+ }
+
+
+ @Override
+ public Map<String, MessageContainer> runValidation(String path) {
+ EcompGuideLineValidator validator = new EcompGuideLineValidator();
+ return testValidator(validator, path);
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/EcompNamingConventionTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/EcompNamingConventionTest.java
new file mode 100644
index 0000000000..e4203945aa
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/EcompNamingConventionTest.java
@@ -0,0 +1,104 @@
+package org.openecomp.sdc.validation.impl.validators.validators;
+
+import org.openecomp.sdc.validation.impl.validators.EcompGuideLineValidator;
+import org.openecomp.sdc.validation.impl.validators.ValidatorBaseTest;
+import org.openecomp.core.validation.types.MessageContainer;
+
+import java.io.IOException;
+import java.util.Map;
+
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class EcompNamingConventionTest extends ValidatorBaseTest {
+
+ @Test
+ public void testNeutronFixedIpName() throws IOException {
+ Map<String, MessageContainer> messages = runValidation(
+ "/openecomp/org/validation/validators/ecomp_naming_convention/neutron_port_fixed_ip_name/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 2);
+
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 3);
+ Assert.assertEquals(
+ messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(),
+ "Fixed_IPS not aligned with Guidelines, Resource ID [fixed_ip_illegal_name_1]");
+ Assert.assertEquals(
+ messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(),
+ "Fixed_IPS not aligned with Guidelines, Resource ID [fixed_ip_illegal_name_2]");
+ Assert.assertEquals(
+ messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(2).getMessage(),
+ "Fixed_IPS not aligned with Guidelines, Resource ID [fixed_ip_illegal_name_3]");
+ }
+
+
+ @Test
+ public void testNovaServerName() throws IOException {
+ Map<String, MessageContainer> messages = runValidation(
+ "/openecomp/org/validation/validators/ecomp_naming_convention/nova_server_name/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 2);
+
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 6);
+ Assert.assertEquals(
+ messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(),
+ "Server Name not aligned with Guidelines, Resource ID [nova_server_ilegal_name_1]");
+ Assert.assertEquals(
+ messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(),
+ "Server Name not aligned with Guidelines, Resource ID [nova_server_ilegal_name_2]");
+ Assert.assertEquals(
+ messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(2).getMessage(),
+ "Server Name not aligned with Guidelines, Resource ID [nova_server_ilegal_name_3]");
+ Assert.assertEquals(
+ messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(3).getMessage(),
+ "Server Name not aligned with Guidelines, Resource ID [nova_server_ilegal_name_4]");
+ Assert.assertEquals(
+ messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(4).getMessage(),
+ "Server Name not aligned with Guidelines, Resource ID [nova_server_ilegal_name_5]");
+ Assert.assertEquals(
+ messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(5).getMessage(),
+ "Missing get_param in nova server name, Resource Id [nova_server_ilegal_name_6]");
+ }
+
+
+ @Test
+ public void testAvailabilityZoneName() throws IOException {
+ Map<String, MessageContainer> messages = runValidation(
+ "/openecomp/org/validation/validators/ecomp_naming_convention/availability_zone_name/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 2);
+
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 2);
+ Assert.assertEquals(
+ messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(),
+ "Server Availability Zone not aligned with Guidelines, Resource ID [availability_zone_illegal_name_1]");
+ Assert.assertEquals(
+ messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(),
+ "Server Availability Zone not aligned with Guidelines, Resource ID [availability_zone_illegal_name_2]");
+ }
+
+
+ @Test
+ public void testFloatingIpResourceType() throws IOException {
+ Map<String, MessageContainer> messages = runValidation(
+ "/openecomp/org/validation/validators/ecomp_naming_convention/floating_ip_resource_type/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 2);
+
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 1);
+ Assert.assertEquals(
+ messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(),
+ "OS::Neutron::FloatingIP is in use, Resource ID [floating_ip_type]");
+ }
+
+
+ @Override
+ public Map<String, MessageContainer> runValidation(String path) {
+ EcompGuideLineValidator ecompGuideLineValidator = new EcompGuideLineValidator();
+ return testValidator(ecompGuideLineValidator, path);
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/HeatValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/HeatValidatorTest.java
new file mode 100644
index 0000000000..9ff375c1a3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/HeatValidatorTest.java
@@ -0,0 +1,356 @@
+package org.openecomp.sdc.validation.impl.validators.validators;
+
+import org.openecomp.sdc.validation.impl.validators.HeatValidator;
+import org.openecomp.sdc.validation.impl.validators.ValidatorBaseTest;
+import org.openecomp.core.validation.types.MessageContainer;
+
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+import java.io.IOException;
+import java.util.Map;
+
+public class HeatValidatorTest extends ValidatorBaseTest {
+
+
+ @Test
+ public void testInvalidHeatFormat(){
+ Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/invalid_heat_format/negative_test/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+
+ Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "Invalid HEAT format problem - [Cannot create property=kuku for JavaBean=Resource{type='null', properties=null, metadata=null, depends_on=null, update_policy='null', deletion_policy='null'}\n" +
+ " in 'reader', line 25, column 5:\n" +
+ " kuku: kuku\n" +
+ " ^\n" +
+ "Unable to find property 'kuku' on class: org.openecomp.sdc.heat.datatypes.model.Resource\n" +
+ " in 'reader', line 25, column 11:\n" +
+ " kuku: kuku\n" +
+ " ^\n" +
+ "]");
+ }
+
+
+ @Test
+ public void testResourcesReferencesExistInHeat() throws IOException {
+ Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/negative_test/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 2);
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "Referenced resource - not_existing_resource not found");
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(), "invalid get_resource syntax is in use - null , get_resource function should get the resource id of the referenced resource");
+ }
+
+
+ @Test
+ public void testGetResourceValueIsValid(){
+ Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/get_resource_value_valid/negative_test/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 3);
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "invalid get_resource syntax is in use - [param_1, param_2] , get_resource function should get the resource id of the referenced resource");
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(), "invalid get_resource syntax is in use - {get_param=param_1} , get_resource function should get the resource id of the referenced resource");
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(2).getMessage(), "invalid get_resource syntax is in use - null , get_resource function should get the resource id of the referenced resource");
+ }
+
+ @Test
+ public void testTwoResourcesDoesNotHoldSameId() throws IOException {
+ Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 0);
+ }
+
+ @Test
+ public void negativeTestGetParamPointToExistingParameter() throws IOException {
+ Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+
+ Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "Referenced parameter - not_existing_param_1 - not found, used in resource - server_pcrf_psm_001");
+ }
+
+ @Test
+ public void testGetAttrFromNested() throws IOException {
+ Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/negative_test/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+
+ Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "get_attr attribute not found - nested_output in resource server_pcrf_psm_001");
+ }
+
+ @Test
+ public void testPropertiesMatchNestedParameters() throws IOException {
+ Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "Referenced parameter not found in nested file - nested-pps_v1.0.yaml, resource name - server_pcrf_pps_001, parameter name - parameter_not_existing_in_nested");
+ }
+
+ @Test
+ public void testNovaPropertiesHasAssignedValue() throws IOException {
+ Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/negative_test/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+
+ Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "Missing both Image and Flavor in NOVA Server - nova_server_resource_missing_both");
+ }
+
+ @Test
+ public void testNoLoopsNesting() throws IOException {
+ Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 4);
+
+ Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 2);
+ Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "A resource has an invalid or unsupported type - null, Resource ID [server_pcrf_psm_002]");
+ Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(1).getMessage(), "Nested files loop - [hot-nimbus-psm_v1.0.yaml -- nested-psm_v1.0.yaml -- nested-points-to-hot-nimbus-psm.yaml -- hot-nimbus-psm_v1.0.yaml]");
+
+ Assert.assertEquals(messages.get("nested-points-to-hot-nimbus-psm.yaml").getErrorMessageList().size(), 2);
+ Assert.assertEquals(messages.get("nested-points-to-hot-nimbus-psm.yaml").getErrorMessageList().get(0).getMessage(), "Nested files loop - [nested-points-to-hot-nimbus-psm.yaml -- hot-nimbus-psm_v1.0.yaml -- nested-psm_v1.0.yaml -- nested-points-to-hot-nimbus-psm.yaml]");
+ Assert.assertEquals(messages.get("nested-points-to-hot-nimbus-psm.yaml").getErrorMessageList().get(1).getMessage(), "Nested files loop - [nested-points-to-hot-nimbus-psm.yaml -- nested-psm_v1.0.yaml -- nested-points-to-hot-nimbus-psm.yaml]");
+
+ Assert.assertEquals(messages.get("yaml-point-to-itself.yaml").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("yaml-point-to-itself.yaml").getErrorMessageList().get(0).getMessage(), "Nested files loop - [yaml-point-to-itself.yaml -- yaml-point-to-itself.yaml]");
+
+ Assert.assertEquals(messages.get("nested-psm_v1.0.yaml").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("nested-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "Nested files loop - [nested-psm_v1.0.yaml -- nested-points-to-hot-nimbus-psm.yaml -- hot-nimbus-psm_v1.0.yaml -- nested-psm_v1.0.yaml]");
+ }
+
+ @Test
+ public void testOnlyOneNovaPointsToOnePort() throws IOException {
+ Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+
+ Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "Resource Port oam1_int_port exceed allowed relations from NovaServer");
+ }
+
+ @Test
+ public void testServerGroupsPointedByServersDefinedCorrectly() throws IOException {
+ Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/negative_test/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 3);
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "Missing server group definition - BE_Affinity_2, nova_server_1");
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(), "Missing server group definition - BE_Affinity_2, nova_server_2");
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(2).getMessage(), "Referenced resource - BE_Affinity_1 not found");
+ }
+
+
+ @Test
+ public void testPolicyIsAffinityOrAntiAffinity() throws IOException {
+ Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/negative_test/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+
+ Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "Wrong policy in server group - pcrf_server_policies_1");
+ }
+
+
+ @Test
+ public void testEnvContentIsSubSetOfHeatParameters() throws IOException {
+ Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.env").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.env").getErrorMessageList().get(0).getMessage(), "Env file hot-nimbus-pps_v1.0.env includes a parameter not in HEAT - mock_param");
+ }
+
+ @Test
+ public void testDefaultValueAlignWithType() throws IOException {
+ Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/default_value_align_with_type/negative_test/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "Parameter - pcrf_pps_image_name_1 default value not align with type number");
+ }
+
+
+ @Test
+ public void testEnvParametersMatchDefinedHeatParameterTypes() throws IOException {
+ Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.env").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.env").getErrorMessageList().get(0).getMessage(), "Parameter env value pcrf_pps_flavor_name not align with type");
+
+ }
+
+ @Test
+ public void testReferencedArtifactsExist() throws IOException {
+ Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/negative_test/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "Missing artifact - nimbus-ethernet");
+
+ }
+
+
+ @Test
+ public void testResourcesGroupWithNested() throws IOException {
+ Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 3);
+
+ Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 2);
+ Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "Referenced parameter not found in nested file - nested-from-resources-group.yaml, resource name - nested-from-resources-group.yaml, parameter name - property_not_in_nested");
+ Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(1).getMessage(), "OS::Heat::ResourceGroup resource with resource_def which is not pointing to nested heat file is not supported, Resource ID [resource_without_resources_group], resource_def type [OS::Nova::Server]");
+
+ Assert.assertEquals(messages.get("nested-pps_v1.0.yaml").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("nested-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "Nested files loop - [nested-pps_v1.0.yaml -- nested-from-resources-group.yaml -- hot-nimbus-pps_v1.0.yaml -- nested-pps_v1.0.yaml]");
+
+ Assert.assertEquals(messages.get("nested-not-exist.yaml").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("nested-not-exist.yaml").getErrorMessageList().get(0).getMessage(), "Missing nested file - nested-not-exist.yaml");
+ }
+
+
+ @Test
+ public void testResourceGroupWithInvalidType(){
+ Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+
+ Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 3);
+ Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "OS::Heat::ResourceGroup resource with resource_def which is not pointing to nested heat file is not supported, Resource ID [resource_with_resources_group_1], resource_def type [{get_param=pcrf_vnf_id}]");
+ Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(1).getMessage(), "OS::Heat::ResourceGroup resource with resource_def which is not pointing to nested heat file is not supported, Resource ID [resource_with_resources_group_2], resource_def type [OS::Nova::Server]");
+ Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(2).getMessage(), "A resource has an invalid or unsupported type - null, Resource ID [resource_with_resources_group_3]");
+ }
+
+
+ @Test
+ public void testNetworkPolicyAssociatedWithAttachPolicy() throws IOException {
+ Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/network_policy_associated_with_attach_policy/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "NetworkPolicy not in use, Resource Id [not_used_server_pcrf_policy]");
+ }
+
+
+ @Test
+ public void testSecurityGroupsCalledByPort() throws IOException {
+ Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/security_group_called_by_port/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 2);
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "SecurityGroup not in use, Resource Id [not_used_security_group]");
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(), "Port not bind to any NOVA Server, Resource Id [attach_policy_resource]");
+ }
+
+
+ @Test
+ public void testServerGroupCalledByServer() throws IOException {
+ Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/server_group_called_by_nova_server/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "ServerGroup not in use, Resource Id [not_used_server_group]");
+
+ }
+
+
+ @Test
+ public void testSecurityGroupBaseFileNoPorts() throws IOException {
+ Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/security_group_base_file_no_ports/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+
+ Assert.assertEquals(messages.get("baseFile.yaml").getErrorMessageList().size(), 1);
+ Assert.assertEquals(messages.get("baseFile.yaml").getErrorMessageList().get(0).getMessage(), "SecurityGroup not in use, Resource Id [shared_security_group_id3]");
+ }
+
+
+ @Test
+ public void testDependsOn(){
+ Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/depends_on_points_to_existing_resource/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 2);
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "a Missing resource in depend On Missing Resource ID [resource_not_exist]");
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(), "a Missing resource in depend On Missing Resource ID [resource_3]");
+ }
+
+
+ @Test
+ public void testSharedResourcesValidation(){
+ Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/shared_resources/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 2);
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), "SecurityGroup not in use, Resource Id [not_used_security_group]");
+ Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(), "Port not bind to any NOVA Server, Resource Id [attach_policy_resource]");
+ }
+
+
+ @Test
+ public void testNoErrorWhenEmptyValueForParameterInEnv(){
+ Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/env_empty_value/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+
+ MessageContainer envMessages = messages.get("env_empty_value.env");
+ Assert.assertNull(envMessages);
+ }
+
+
+ @Test
+ public void testGetParamPseudoParameters(){
+ Map<String, MessageContainer> messages = runValidation("/openecomp/org/validation/validators/heat_validator/pseudo_parameters/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 0);
+
+ }
+
+
+ @Override
+ public Map<String, MessageContainer> runValidation(String path) {
+ HeatValidator heatValidator = new HeatValidator();
+ return testValidator(heatValidator, path);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/ManifestValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/ManifestValidatorTest.java
new file mode 100644
index 0000000000..479a1fb83b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/ManifestValidatorTest.java
@@ -0,0 +1,125 @@
+package org.openecomp.sdc.validation.impl.validators.validators;
+
+
+import org.openecomp.sdc.common.utils.AsdcCommon;
+import org.openecomp.sdc.validation.impl.validators.ManifestValidator;
+import org.openecomp.sdc.validation.impl.validators.ValidatorBaseTest;
+import org.openecomp.core.validation.errors.Messages;
+import org.openecomp.core.validation.types.MessageContainer;
+
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+import java.util.Map;
+
+public class ManifestValidatorTest extends ValidatorBaseTest {
+
+
+ @Test
+ public void testValidManifest() {
+ Map<String, MessageContainer> messages =
+ runValidation("/openecomp/org/validation/validators/manifestValidator/validFiles");
+ Assert.assertNotNull(messages);
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 0);
+ }
+
+ @Test
+ public void testManifestMissingFileInZip() {
+ Map<String, MessageContainer> messages =
+ runValidation("/openecomp/org/validation/validators/manifestValidator/missingFileInZip");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+ Assert.assertTrue(messages.containsKey("singleVol.yaml"));
+ validateErrorMessage(messages.get("singleVol.yaml").getErrorMessageList().get(0).getMessage(),
+ Messages.MISSING_FILE_IN_ZIP.getErrorMessage());
+ }
+
+ @Test
+ public void testInvalidManifest() {
+ Map<String, MessageContainer> messages =
+ runValidation("/openecomp/org/validation/validators/manifestValidator/invalidManifest");
+ Assert.assertNotNull(messages);
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+ Assert.assertTrue(messages.containsKey(AsdcCommon.MANIFEST_NAME));
+ validateErrorMessage(
+ messages.get(AsdcCommon.MANIFEST_NAME).getErrorMessageList().get(0).getMessage(),
+ Messages.INVALID_MANIFEST_FILE.getErrorMessage(), AsdcCommon.MANIFEST_NAME);
+
+ }
+
+ @Test
+ public void testMissingFileInManifest() {
+ Map<String, MessageContainer> messages =
+ runValidation("/openecomp/org/validation/validators/manifestValidator/missingFileInManifest");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+ Assert.assertTrue(messages.containsKey("extraFile.env"));
+ validateErrorMessage(messages.get("extraFile.env").getErrorMessageList().get(0).getMessage(),
+ Messages.MISSING_FILE_IN_MANIFEST.getErrorMessage());
+
+ }
+
+ @Test
+ public void testInvalidFileTypeInManifest() {
+ Map<String, MessageContainer> messages = runValidation(
+ "/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 4);
+ Assert.assertTrue(messages.containsKey("single.env.illegalSuffix"));
+ Assert.assertTrue(messages.containsKey("illegalTypeFile.yaml"));
+ Assert.assertTrue(messages.containsKey("single.yaml.illegalSuffix"));
+ Assert.assertTrue(messages.containsKey("singleVol.yaml.illegalSuffix"));
+ validateErrorMessage(
+ messages.get("single.env.illegalSuffix").getErrorMessageList().get(0).getMessage(),
+ Messages.WRONG_ENV_FILE_EXTENSION.getErrorMessage(), "single.env.illegalSuffix");
+ validateErrorMessage(
+ messages.get("illegalTypeFile.yaml").getErrorMessageList().get(0).getMessage(),
+ Messages.INVALID_FILE_TYPE.getErrorMessage(), "illegalTypeFile.yaml");
+ validateErrorMessage(
+ messages.get("single.yaml.illegalSuffix").getErrorMessageList().get(0).getMessage(),
+ Messages.WRONG_HEAT_FILE_EXTENSION.getErrorMessage(), "single.yaml.illegalSuffix");
+ validateErrorMessage(
+ messages.get("singleVol.yaml.illegalSuffix").getErrorMessageList().get(0).getMessage(),
+ Messages.WRONG_HEAT_FILE_EXTENSION.getErrorMessage(), "singleVol.yaml.illegalSuffix");
+
+ }
+
+
+ @Test
+ public void testMissingFileInManifestAndInZip() {
+
+ Map<String, MessageContainer> messages = runValidation(
+ "/openecomp/org/validation/validators/manifestValidator/missingFileInManifestAndInZip");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 2);
+ Assert.assertTrue(messages.containsKey("extraFile.env"));
+ Assert.assertTrue(messages.containsKey("singleVol.yaml"));
+ validateErrorMessage(messages.get("extraFile.env").getErrorMessageList().get(0).getMessage(),
+ Messages.MISSING_FILE_IN_MANIFEST.getErrorMessage());
+ validateErrorMessage(messages.get("singleVol.yaml").getErrorMessageList().get(0).getMessage(),
+ Messages.MISSING_FILE_IN_ZIP.getErrorMessage());
+
+ }
+
+
+ @Test
+ public void testEnvInRoot() {
+ Map<String, MessageContainer> messages =
+ runValidation("/openecomp/org/validation/validators/manifestValidator/envInRoot");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+ Assert.assertTrue(messages.containsKey("second.env"));
+ validateErrorMessage(messages.get("second.env").getErrorMessageList().get(0).getMessage(),
+ "ENV file must be associated to a HEAT file");
+ }
+
+ public Map<String, MessageContainer> runValidation(String path) {
+ ManifestValidator manifestValidator = new ManifestValidator();
+ return testValidator(manifestValidator, path);
+
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/YamlValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/YamlValidatorTest.java
new file mode 100644
index 0000000000..abce8ec88c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/validators/YamlValidatorTest.java
@@ -0,0 +1,89 @@
+package org.openecomp.sdc.validation.impl.validators.validators;
+
+
+import org.openecomp.sdc.validation.impl.validators.ValidatorBaseTest;
+import org.openecomp.sdc.validation.impl.validators.YamlValidator;
+import org.openecomp.core.validation.errors.Messages;
+import org.openecomp.core.validation.types.MessageContainer;
+
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+import java.util.Map;
+
+public class YamlValidatorTest extends ValidatorBaseTest {
+
+
+ public Map<String, MessageContainer> runValidation(String path) {
+ YamlValidator validator = new YamlValidator();
+ return testValidator(validator, path);
+
+ }
+
+ @Test
+ public void testValidYaml() {
+
+ Map<String, MessageContainer> messages = runValidation(
+ "/openecomp/org/validation/validators/yaml_validator/valid_yaml/input/validHeat.yaml");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 0);
+ }
+
+// @Test
+ public void testInvalidTabYaml() {
+
+ Map<String, MessageContainer> messages = runValidation(
+ "/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalidYamlTab.yaml");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+ validateErrorMessage(
+ messages.get("invalidYamlTab.yaml").getErrorMessageList().get(0).getMessage(),
+ Messages.INVALID_YAML_FORMAT_REASON.getErrorMessage(),
+ "while scanning for the next tokenfound character '\\t(TAB)' that cannot start any token. (Do not use \\t(TAB) for indentation) in 'reader', line 14, column 5: \tadmin_state_up: true ^");
+
+ }
+
+
+ @Test
+ public void testDuplicateKeyInYaml() {
+
+ Map<String, MessageContainer> messages =
+ runValidation("/openecomp/org/validation/validators/yaml_validator/duplicateKey.yaml");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+ Assert.assertTrue(messages.containsKey("duplicateKey.yaml"));
+ validateErrorMessage(
+ messages.get("duplicateKey.yaml").getErrorMessageList().get(0).getMessage(),
+ Messages.INVALID_YAML_FORMAT_REASON.getErrorMessage(),
+ "while parsing MappingNode in 'reader', line 6, column 3: Key_1_unique: ^duplicate key: Key_2_not_unique in 'reader', line 31, column 1: ^");
+ }
+
+
+ @Test
+ public void testInvalidYamlStructure() {
+
+ Map<String, MessageContainer> messages =
+ runValidation("/openecomp/org/validation/validators/yaml_validator/invalidYamlStructure.yaml");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+ Assert.assertTrue(messages.containsKey("invalidYamlStructure.yaml"));
+ validateErrorMessage(
+ messages.get("invalidYamlStructure.yaml").getErrorMessageList().get(0).getMessage(),
+ Messages.INVALID_YAML_FORMAT_REASON.getErrorMessage(),
+ "while parsing a block mapping in 'reader', line 8, column 7: admin_state_up: true ^expected <block end>, but found BlockEntry in 'reader', line 10, column 7: - shared: true ^");
+ }
+
+ @Test
+ public void testEmptyYaml() {
+
+ Map<String, MessageContainer> messages =
+ runValidation("/openecomp/org/validation/validators/yaml_validator/emptyYaml.yaml");
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+ Assert.assertTrue(messages.containsKey("emptyYaml.yaml"));
+ validateErrorMessage(messages.get("emptyYaml.yaml").getErrorMessageList().get(0).getMessage(),
+ Messages.INVALID_YAML_FORMAT_REASON.getErrorMessage(),
+ Messages.EMPTY_YAML_FILE.getErrorMessage());
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/first.yaml
new file mode 100644
index 0000000000..368834e847
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/first.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+ SecurityGroup_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ not_expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_param: ServerGroup_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/firstVol.yaml
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/firstVol.yaml
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/negative/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/first.yaml
new file mode 100644
index 0000000000..08955562d4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/first.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+ net_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: net_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/firstVol.yaml
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/firstVol.yaml
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetwork/positive/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/first.yaml
new file mode 100644
index 0000000000..f5c6b598cc
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/first.yaml
@@ -0,0 +1,18 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+ net_expose:
+ type: OS::Neutron::Net
+ volume_expose:
+ type: OS::Cinder::Volume
+
+
+
+outputs:
+ not_expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_param: ServerGroup_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/firstVol.yaml
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/firstVol.yaml
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/negative/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/first.yaml
new file mode 100644
index 0000000000..0c7abd6d49
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/first.yaml
@@ -0,0 +1,21 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+ net_expose:
+ type: OS::Neutron::Net
+ volume_expose:
+ type: OS::Cinder::Volume
+
+
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: net_expose }
+ expose_resource_volume_output:
+ description: the pcrf_server
+ value: { get_resource: volume_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/firstVol.yaml
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/firstVol.yaml
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeNetworkAndVolume/positive/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/first.yaml
new file mode 100644
index 0000000000..fe5effbc24
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/first.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+ SecurityGroup_expose:
+ type: OS::Neutron::SecurityGroup
+
+outputs:
+ not_expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_param: ServerGroup_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/firstVol.yaml
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/firstVol.yaml
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/negative/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/first.yaml
new file mode 100644
index 0000000000..781bcba716
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/first.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+ SecurityGroup_expose:
+ type: OS::Neutron::SecurityGroup
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: SecurityGroup_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/firstVol.yaml
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/firstVol.yaml
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeSecurityGroup/positive/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/first.yaml
new file mode 100644
index 0000000000..5660cc003b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/first.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+ ServerGroup_expose:
+ type: OS::Nova::ServerGroup
+
+outputs:
+ not_expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_param: ServerGroup_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/firstVol.yaml
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/firstVol.yaml
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/negative/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/first.yaml
new file mode 100644
index 0000000000..89fafb9d3a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/first.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+ serverGroup_expose:
+ type: OS::Nova::ServerGroup
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: serverGroup_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/firstVol.yaml
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/firstVol.yaml
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeServerGroup/positive/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/first.yaml
new file mode 100644
index 0000000000..e2a4301249
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/first.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+ volume_expose:
+ type: OS::Cinder::Volume
+
+outputs:
+ not_expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_param: volume_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/firstVol.yaml
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/firstVol.yaml
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/negative/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/first.yaml
new file mode 100644
index 0000000000..63b576edb8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/first.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+ volume_expose:
+ type: OS::Cinder::Volume
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: volume_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/firstVol.yaml
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/firstVol.yaml
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/baseHeatDoesNotExposeVolume/positive/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/first.yaml
new file mode 100644
index 0000000000..3d3a1949b1
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/first.yaml
@@ -0,0 +1,25 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+ FSB2:
+ type: OS::Neutron::FloatingIP
+ properties:
+ name: { get_param: fsb_name_2 }
+ block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+ flavor: { get_param: fsb2-flavor }
+ availability_zone: { get_param: availability_zone_0 }
+ metadata:
+ VNF_id: { get_param: vnfvfVF_id }
+ vf_module_id: { get_param: vf_module_id }
+ networks:
+ - port: { get_resource: FSB2_Internal1 }
+ - port: { get_resource: FSB2_Internal2 }
+ - port: { get_resource: FSB2_OAM }
+outputs:
+ expose_resource_nove_output:
+ description: the pcrf_server
+ value: { get_resource: FSB2 }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/firstVol.yaml
new file mode 100644
index 0000000000..7e82b2a7e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/firstVol.yaml
@@ -0,0 +1,19 @@
+
+heat_template_version: 2013-05-23
+
+parameters:
+ not_null:
+ type: number
+ label: not_number
+
+
+resources:
+ volume_expose:
+ type: OS::Cinder::Volume
+ properties:
+ not_null: not_null
+outputs:
+ not_expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: volume_expose }
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/negative/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/first.yaml
new file mode 100644
index 0000000000..2fc2a932fe
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/first.yaml
@@ -0,0 +1,37 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+ FSB2_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: Internal1_net_id }
+ FSB2_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: Internal2_net_name }
+ FSB2_OAM:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: Internal3_net_id }
+ FSB2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: fsb_name_2 }
+ block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+ flavor: { get_param: fsb2_flavor_name }
+ availability_zone: { get_param: availability_zone_0 }
+ metadata:
+ VNF_id: { get_param: vnfvfVF_id }
+ vf_module_id: { get_param: vf_module_id }
+ networks:
+ - port: { get_resource: FSB2_Internal1 }
+ - port: { get_resource: FSB2_Internal2 }
+ - port: { get_resource: FSB2_OAM }
+outputs:
+ expose_resource_nove_output:
+ description: the pcrf_server
+ value: { get_resource: FSB2 }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/firstVol.yaml
new file mode 100644
index 0000000000..7e82b2a7e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/firstVol.yaml
@@ -0,0 +1,19 @@
+
+heat_template_version: 2013-05-23
+
+parameters:
+ not_null:
+ type: number
+ label: not_number
+
+
+resources:
+ volume_expose:
+ type: OS::Cinder::Volume
+ properties:
+ not_null: not_null
+outputs:
+ not_expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: volume_expose }
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatFloatingIpResourceType/positive/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/first.yaml
new file mode 100644
index 0000000000..5d6cea4d84
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/first.yaml
@@ -0,0 +1,37 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+ FSB2_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: Internal1_net_id }
+ FSB2_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: Internal2_net_id }
+ FSB2_OAM:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: Internal1_net_name }
+ FSB2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: fsb_name_2 }
+ block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+ flavor: { get_param: fsb2_flavor_name }
+ availability_zone: { get_param: availability_zone_0 }
+ metadata:
+ VNF_id: { get_param: vnfvfVF_id }
+ vf_module_id: { get_param: vf_module_id }
+ networks:
+ - port: { get_resource: FSB2_Internal1 }
+ - port: { get_resource: FSB2_Internal2 }
+ - port: { get_resource: FSB2_OAM }
+outputs:
+ expose_resource_nove_output:
+ description: the pcrf_server
+ value: { get_resource: FSB2 }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/firstVol.yaml
new file mode 100644
index 0000000000..7e82b2a7e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/firstVol.yaml
@@ -0,0 +1,19 @@
+
+heat_template_version: 2013-05-23
+
+parameters:
+ not_null:
+ type: number
+ label: not_number
+
+
+resources:
+ volume_expose:
+ type: OS::Cinder::Volume
+ properties:
+ not_null: not_null
+outputs:
+ not_expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: volume_expose }
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/first.yaml
new file mode 100644
index 0000000000..2c9fd08fb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/first.yaml
@@ -0,0 +1,52 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+ FSB2_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: Internal1_net_id }
+ FSB2_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: Internal2_net_name }
+ FSB2_OAM:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: Internal3_net_id }
+ FSB2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: fsb_name_2 }
+ block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+ flavor: { get_param: fsb2_flavor_name }
+ availability_zone: { get_param: availability_zone_0 }
+ metadata:
+ VNF_id: { get_param: vnfvfVF_id }
+ vf_module_id: { get_param: vf_module_id }
+ networks:
+ - port: { get_resource: FSB2_Internal1 }
+ - port: { get_resource: FSB2_Internal2 }
+ - port: { get_resource: FSB2_OAM }
+
+ FSB3:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: fsb_name_2 }
+ block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+ flavor: { get_param: fsb2_flavor_name }
+ availability_zone: { get_param: availability_zone_0 }
+ metadata:
+ VNF_id: { get_param: vnfvfVF_id }
+ vf_module_id: { get_param: vf_module_id }
+ networks:
+ - port: { get_resource: FSB2_Internal1 }
+ - port: { get_resource: FSB2_Internal2 }
+ - port: { get_resource: FSB2_OAM }
+outputs:
+ expose_resource_nove_output:
+ description: the pcrf_server
+ value: { get_resource: FSB2 }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/firstVol.yaml
new file mode 100644
index 0000000000..7e82b2a7e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/firstVol.yaml
@@ -0,0 +1,19 @@
+
+heat_template_version: 2013-05-23
+
+parameters:
+ not_null:
+ type: number
+ label: not_number
+
+
+resources:
+ volume_expose:
+ type: OS::Cinder::Volume
+ properties:
+ not_null: not_null
+outputs:
+ not_expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: volume_expose }
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/first.yaml
new file mode 100644
index 0000000000..60f8c45630
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/first.yaml
@@ -0,0 +1,58 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+ FSB2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: pcrf_pps_server_name_4 }
+ block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+ flavor: { get_param: fsb2_flavor_name }
+ availability_zone: { get_param: availability_zone_a }
+ metadata:
+ VnF_id: { get_param: vnfvfVF_id }
+ vf_module_id: { get_param: vf_module_id }
+ networks:
+ - port: { get_resource: FSB2_Internal1 }
+ - port: { get_resource: FSB2_Internal2 }
+ - port: { get_resource: FSB2_OAM }
+
+ FSB3:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [pcrf_pps_server_names, 0] }
+ block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+ flavor: { get_param: fsb2_flavor_name }
+ availability_zone: { get_param: availability_zone}
+ metadata:
+ VnF_id: { get_param: vnfvfVF_id }
+ vf_module_id: { get_param: vf_module_id }
+ networks:
+ - port: { get_resource: FSB2_Internal1 }
+ - port: { get_resource: FSB2_Internal2 }
+ - port: { get_resource: FSB2_OAM }
+
+ FSB4:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [pcrf_pps_server_names, 0] }
+ block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+ flavor: { get_param: fsb2_flavor_name }
+ availability_zone: { get_param: availability_zone_blabla}
+ metadata:
+ VnF_id: { get_param: vnfvfVF_id }
+ vf_module_id: { get_param: vf_module_id }
+ networks:
+ - port: { get_resource: FSB2_Internal1 }
+ - port: { get_resource: FSB2_Internal2 }
+ - port: { get_resource: FSB2_OAM }
+outputs:
+ expose_resource_nove_output2:
+ description: the pcrf_server
+ value: { get_resource: FSB2 }
+ expose_resource_nove_output3:
+ description: the pcrf_server
+ value: { get_resource: FSB3 }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/firstVol.yaml
new file mode 100644
index 0000000000..7e82b2a7e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/firstVol.yaml
@@ -0,0 +1,19 @@
+
+heat_template_version: 2013-05-23
+
+parameters:
+ not_null:
+ type: number
+ label: not_number
+
+
+resources:
+ volume_expose:
+ type: OS::Cinder::Volume
+ properties:
+ not_null: not_null
+outputs:
+ not_expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: volume_expose }
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/negative/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/first.yaml
new file mode 100644
index 0000000000..372761514f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/first.yaml
@@ -0,0 +1,43 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+
+ FSB2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: pcrf_pps_server_name_4 }
+ block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+ flavor: { get_param: fsb2_flavor_name }
+ availability_zone: { get_param: availability_zone_0 }
+ metadata:
+ VnF_id: { get_param: vnfvfVF_id }
+ vf_module_id: { get_param: vf_module_id }
+ networks:
+ - port: { get_resource: FSB2_Internal1 }
+ - port: { get_resource: FSB2_Internal2 }
+ - port: { get_resource: FSB2_OAM }
+ FSB3:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [pcrf_pps_server_names, 0] }
+ block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+ flavor: { get_param: fsb2_flavor_name }
+ availability_zone: { get_param: availability_zone_0 }
+ metadata:
+ VnF_id: { get_param: vnfvfVF_id }
+ vf_module_id: { get_param: vf_module_id }
+ networks:
+ - port: { get_resource: FSB2_Internal1 }
+ - port: { get_resource: FSB2_Internal2 }
+ - port: { get_resource: FSB2_OAM }
+outputs:
+ expose_resource_nove_output2:
+ description: the pcrf_server
+ value: { get_resource: FSB2 }
+ expose_resource_nove_output3:
+ description: the pcrf_server
+ value: { get_resource: FSB3 }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/firstVol.yaml
new file mode 100644
index 0000000000..7e82b2a7e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/firstVol.yaml
@@ -0,0 +1,19 @@
+
+heat_template_version: 2013-05-23
+
+parameters:
+ not_null:
+ type: number
+ label: not_number
+
+
+resources:
+ volume_expose:
+ type: OS::Cinder::Volume
+ properties:
+ not_null: not_null
+outputs:
+ not_expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: volume_expose }
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerAvailabilityZoneName/positive/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/first.yaml
new file mode 100644
index 0000000000..58e645e168
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/first.yaml
@@ -0,0 +1,41 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+ FSB2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: fsb_name_2 }
+ block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+ flavor: { get_param: fsb2-flavor }
+ availability_zone: { get_param: availability_zone_0 }
+ metadata:
+ VNF_id: { get_param: vnfvfVF_id }
+ vf_module_id: { get_param: vf_module_id }
+ networks:
+ - port: { get_resource: FSB2_Internal1 }
+ - port: { get_resource: FSB2_Internal2 }
+ - port: { get_resource: FSB2_OAM }
+
+ FSB3:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: fsb_name_2 }
+ block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+ image: { get_param: fsb2-image }
+ availability_zone: { get_param: availability_zone_0 }
+ metadata:
+ VNF_id: { get_param: vnfvfVF_id }
+ vf_module_id: { get_param: vf_module_id }
+ networks:
+ - port: { get_resource: FSB2_Internal1 }
+ - port: { get_resource: FSB2_Internal2 }
+ - port: { get_resource: FSB2_OAM }
+
+outputs:
+ expose_resource_nove_output:
+ description: the pcrf_server
+ value: { get_resource: FSB2 }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/firstVol.yaml
new file mode 100644
index 0000000000..7e82b2a7e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/firstVol.yaml
@@ -0,0 +1,19 @@
+
+heat_template_version: 2013-05-23
+
+parameters:
+ not_null:
+ type: number
+ label: not_number
+
+
+resources:
+ volume_expose:
+ type: OS::Cinder::Volume
+ properties:
+ not_null: not_null
+outputs:
+ not_expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: volume_expose }
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/negative/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/first.yaml
new file mode 100644
index 0000000000..2fc2a932fe
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/first.yaml
@@ -0,0 +1,37 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+ FSB2_Internal1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: Internal1_net_id }
+ FSB2_Internal2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: Internal2_net_name }
+ FSB2_OAM:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: Internal3_net_id }
+ FSB2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: fsb_name_2 }
+ block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+ flavor: { get_param: fsb2_flavor_name }
+ availability_zone: { get_param: availability_zone_0 }
+ metadata:
+ VNF_id: { get_param: vnfvfVF_id }
+ vf_module_id: { get_param: vf_module_id }
+ networks:
+ - port: { get_resource: FSB2_Internal1 }
+ - port: { get_resource: FSB2_Internal2 }
+ - port: { get_resource: FSB2_OAM }
+outputs:
+ expose_resource_nove_output:
+ description: the pcrf_server
+ value: { get_resource: FSB2 }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/firstVol.yaml
new file mode 100644
index 0000000000..7e82b2a7e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/firstVol.yaml
@@ -0,0 +1,19 @@
+
+heat_template_version: 2013-05-23
+
+parameters:
+ not_null:
+ type: number
+ label: not_number
+
+
+resources:
+ volume_expose:
+ type: OS::Cinder::Volume
+ properties:
+ not_null: not_null
+outputs:
+ not_expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: volume_expose }
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerImageAndFlavor/positive/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/first.yaml
new file mode 100644
index 0000000000..d82e1ee2d3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/first.yaml
@@ -0,0 +1,27 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+
+ FSB2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: fsb_name_2 }
+ block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+ flavor: { get_param: fsb2_flavor_name }
+ availability_zone: { get_param: availability_zone_0 }
+ metadata:
+ not_VF_id: { get_param: vnfvfVF_id }
+ vf_module_id: { get_param: vf_module_id }
+ networks:
+ - port: { get_resource: FSB2_Internal1 }
+ - port: { get_resource: FSB2_Internal2 }
+ - port: { get_resource: FSB2_OAM }
+outputs:
+ expose_resource_nove_output_1:
+ description: the pcrf_server
+ value: { get_resource: FSB2 }
+
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/firstVol.yaml
new file mode 100644
index 0000000000..7e82b2a7e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/firstVol.yaml
@@ -0,0 +1,19 @@
+
+heat_template_version: 2013-05-23
+
+parameters:
+ not_null:
+ type: number
+ label: not_number
+
+
+resources:
+ volume_expose:
+ type: OS::Cinder::Volume
+ properties:
+ not_null: not_null
+outputs:
+ not_expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: volume_expose }
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/negative/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/first.yaml
new file mode 100644
index 0000000000..85bb15837b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/first.yaml
@@ -0,0 +1,26 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+
+ FSB2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: fsb_name_2 }
+ block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+ flavor: { get_param: fsb2_flavor_name }
+ availability_zone: { get_param: availability_zone_0 }
+ metadata:
+ VnF_id: { get_param: vnfvfVF_id }
+ vf_module_id: { get_param: vf_module_id }
+ networks:
+ - port: { get_resource: FSB2_Internal1 }
+ - port: { get_resource: FSB2_Internal2 }
+ - port: { get_resource: FSB2_OAM }
+outputs:
+ expose_resource_nove_output:
+ description: the pcrf_server
+ value: { get_resource: FSB2 }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/firstVol.yaml
new file mode 100644
index 0000000000..7e82b2a7e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/firstVol.yaml
@@ -0,0 +1,19 @@
+
+heat_template_version: 2013-05-23
+
+parameters:
+ not_null:
+ type: number
+ label: not_number
+
+
+resources:
+ volume_expose:
+ type: OS::Cinder::Volume
+ properties:
+ not_null: not_null
+outputs:
+ not_expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: volume_expose }
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerMetaDataValidation/positive/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/first.yaml
new file mode 100644
index 0000000000..3a8e71939f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/first.yaml
@@ -0,0 +1,43 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+
+ FSB2:
+ type: OS::Nova::Server
+ properties:
+ name: {get_param: pcrf_pps_server_4}
+ block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+ flavor: { get_param: fsb2_flavor_name }
+ availability_zone: { get_param: availability_zone_0 }
+ metadata:
+ VnF_id: { get_param: vnfvfVF_id }
+ vf_module_id: { get_param: vf_module_id }
+ networks:
+ - port: { get_resource: FSB2_Internal1 }
+ - port: { get_resource: FSB2_Internal2 }
+ - port: { get_resource: FSB2_OAM }
+ FSB3:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [pcrf_pps_server, 0] }
+ block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+ flavor: { get_param: fsb2_flavor_name }
+ availability_zone: { get_param: availability_zone_0 }
+ metadata:
+ VnF_id: { get_param: vnfvfVF_id }
+ vf_module_id: { get_param: vf_module_id }
+ networks:
+ - port: { get_resource: FSB2_Internal1 }
+ - port: { get_resource: FSB2_Internal2 }
+ - port: { get_resource: FSB2_OAM }
+outputs:
+ expose_resource_nove_output2:
+ description: the pcrf_server
+ value: { get_resource: FSB2 }
+ expose_resource_nove_output3:
+ description: the pcrf_server
+ value: { get_resource: FSB3 }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/firstVol.yaml
new file mode 100644
index 0000000000..7e82b2a7e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/firstVol.yaml
@@ -0,0 +1,19 @@
+
+heat_template_version: 2013-05-23
+
+parameters:
+ not_null:
+ type: number
+ label: not_number
+
+
+resources:
+ volume_expose:
+ type: OS::Cinder::Volume
+ properties:
+ not_null: not_null
+outputs:
+ not_expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: volume_expose }
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/negative/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/first.yaml
new file mode 100644
index 0000000000..13fc942865
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/first.yaml
@@ -0,0 +1,57 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+
+ FSB2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: pcrf_pps_server_name_4 }
+ block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+ flavor: { get_param: fsb2_flavor_name }
+ availability_zone: { get_param: availability_zone_0 }
+ metadata:
+ VnF_id: { get_param: vnfvfVF_id }
+ vf_module_id: { get_param: vf_module_id }
+ networks:
+ - port: { get_resource: FSB2_Internal1 }
+ - port: { get_resource: FSB2_Internal2 }
+ - port: { get_resource: FSB2_OAM }
+ FSB3:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [pcrf_pps_server_names, 0] }
+ block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+ flavor: { get_param: fsb2_flavor_name }
+ availability_zone: { get_param: availability_zone_0 }
+ metadata:
+ VnF_id: { get_param: vnfvfVF_id }
+ vf_module_id: { get_param: vf_module_id }
+ networks:
+ - port: { get_resource: FSB2_Internal1 }
+ - port: { get_resource: FSB2_Internal2 }
+ - port: { get_resource: FSB2_OAM }
+ FSB4:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [pcrf_pps_server_names, {get_param: index_num}] }
+ block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+ flavor: { get_param: fsb2_flavor_name }
+ availability_zone: { get_param: availability_zone_0 }
+ metadata:
+ VnF_id: { get_param: vnfvfVF_id }
+ vf_module_id: { get_param: vf_module_id }
+ networks:
+ - port: { get_resource: FSB2_Internal1 }
+ - port: { get_resource: FSB2_Internal2 }
+ - port: { get_resource: FSB2_OAM }
+outputs:
+ expose_resource_nove_output2:
+ description: the pcrf_server
+ value: { get_resource: FSB2 }
+ expose_resource_nove_output3:
+ description: the pcrf_server
+ value: { get_resource: FSB3 }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/firstVol.yaml
new file mode 100644
index 0000000000..7e82b2a7e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/firstVol.yaml
@@ -0,0 +1,19 @@
+
+heat_template_version: 2013-05-23
+
+parameters:
+ not_null:
+ type: number
+ label: not_number
+
+
+resources:
+ volume_expose:
+ type: OS::Cinder::Volume
+ properties:
+ not_null: not_null
+outputs:
+ not_expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: volume_expose }
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatNovaServerNameValidation/positive/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/first.yaml
new file mode 100644
index 0000000000..85a4c58334
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/first.yaml
@@ -0,0 +1,40 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+ port_resource_0:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: Internal1_net_id }
+ fixed_ips:
+ - ip_address: {get_param: pcrf_net_ips}
+ - ip_address: {get_param: pcrf_net_v6_ip_a}
+ port_resource_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: Internal1_net_name }
+ fixed_ips:
+ - ip_address: {get_param: pcrf_net_v6_ips}
+ - ip_address: { "Fn::Select" : [ { get_param: indx }, { get_param: [{ get_param: mvs_mgmt_ip_0 }] } ] }
+ port_resource_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: Internal1_net_fqdn }
+ fixed_ips:
+ - ip_address: {get_param: pcrf_net_ipz}
+ - ip_address: {get_param: pcrf_net_v6_ip_4}
+ - ip_address": {get_param: pcrf_net_v0_ip_3}
+
+outputs:
+ expose_resource_port_output_0:
+ description: the pcrf_server
+ value: { get_resource: port_resource_0 }
+ expose_resource_port_output_1:
+ description: the pcrf_server
+ value: { get_resource: port_resource_1 }
+ expose_resource_port_output_2:
+ description: the pcrf_server
+ value: { get_resource: port_resource_2 }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/firstVol.yaml
new file mode 100644
index 0000000000..7e82b2a7e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/firstVol.yaml
@@ -0,0 +1,19 @@
+
+heat_template_version: 2013-05-23
+
+parameters:
+ not_null:
+ type: number
+ label: not_number
+
+
+resources:
+ volume_expose:
+ type: OS::Cinder::Volume
+ properties:
+ not_null: not_null
+outputs:
+ not_expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: volume_expose }
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/negative/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/first.yaml
new file mode 100644
index 0000000000..7e0aaa373d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/first.yaml
@@ -0,0 +1,39 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+ port_resource_0:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: Internal1_net_id }
+ fixed_ips:
+ - ip_address: {get_param: pcrf_net_ips}
+
+ port_resource_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: Internal1_net_name }
+ fixed_ips:
+ - ip_address: {get_param: pcrf_net_v6_ips}
+
+ port_resource_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: Internal1_net_fqdn }
+ fixed_ips:
+ - ip_address: {get_param: pcrf_net_ip_4}
+ - ip_address: {get_param: pcrf_net_v6_ip_4}
+
+outputs:
+ expose_resource_port_output_0:
+ description: the pcrf_server
+ value: { get_resource: port_resource_0 }
+ expose_resource_port_output_1:
+ description: the pcrf_server
+ value: { get_resource: port_resource_1 }
+ expose_resource_port_output_2:
+ description: the pcrf_server
+ value: { get_resource: port_resource_2 }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/firstVol.yaml
new file mode 100644
index 0000000000..7e82b2a7e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/firstVol.yaml
@@ -0,0 +1,19 @@
+
+heat_template_version: 2013-05-23
+
+parameters:
+ not_null:
+ type: number
+ label: not_number
+
+
+resources:
+ volume_expose:
+ type: OS::Cinder::Volume
+ properties:
+ not_null: not_null
+outputs:
+ not_expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: volume_expose }
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortFixedIpNamingConvention/positive/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/first.yaml
new file mode 100644
index 0000000000..abbf650c8d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/first.yaml
@@ -0,0 +1,28 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+ port_resource:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: not_valid_network_name }
+ port_resource_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: not_valid_net }
+ port_resource_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: not_valid_net_id_error }
+ port_resource_3:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: }
+
+outputs:
+ expose_resource_port_output:
+ description: the pcrf_server
+ value: { get_resource: port_resource }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/firstVol.yaml
new file mode 100644
index 0000000000..7e82b2a7e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/firstVol.yaml
@@ -0,0 +1,19 @@
+
+heat_template_version: 2013-05-23
+
+parameters:
+ not_null:
+ type: number
+ label: not_number
+
+
+resources:
+ volume_expose:
+ type: OS::Cinder::Volume
+ properties:
+ not_null: not_null
+outputs:
+ not_expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: volume_expose }
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/negative/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/first.yaml
new file mode 100644
index 0000000000..c6128e9470
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/first.yaml
@@ -0,0 +1,33 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+ port_resource_0:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: Internal1_net_id }
+resources:
+ port_resource_1:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: Internal1_net_name }
+resources:
+ port_resource_2:
+ type: OS::Neutron::Port
+ properties:
+ network_id: { get_param: Internal1_net_fqdn }
+
+
+outputs:
+ expose_resource_port_output_0:
+ description: the pcrf_server
+ value: { get_resource: port_resource_0 }
+expose_resource_port_output_1:
+ description: the pcrf_server
+ value: { get_resource: port_resource_1 }
+expose_resource_port_output_2:
+ description: the pcrf_server
+ value: { get_resource: port_resource_2 }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/firstVol.yaml
new file mode 100644
index 0000000000..7e82b2a7e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/firstVol.yaml
@@ -0,0 +1,19 @@
+
+heat_template_version: 2013-05-23
+
+parameters:
+ not_null:
+ type: number
+ label: not_number
+
+
+resources:
+ volume_expose:
+ type: OS::Cinder::Volume
+ properties:
+ not_null: not_null
+outputs:
+ not_expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: volume_expose }
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatPortNetworkNamingConvention/positive/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/first.yaml
new file mode 100644
index 0000000000..3173885d7e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/first.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+ volume_expose:
+ type: OS::Cinder::Volume
+
+outputs:
+ not_expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: volume_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/firstVol.yaml
new file mode 100644
index 0000000000..4f0d65a735
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/firstVol.yaml
@@ -0,0 +1,19 @@
+
+heat_template_version: 2013-05-23
+
+parameters:
+ not_null:
+ type: number
+ label: not_number
+
+
+resources:
+ volume_expose:
+ type: OS::Cinder::Volume
+ properties:
+ not_null: not_null
+outputs:
+ not_expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_param: volume_expose }
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/negative/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/MANIFEST.json
new file mode 100644
index 0000000000..76ce6de6e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/first.yaml
new file mode 100644
index 0000000000..63b576edb8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/first.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+ volume_expose:
+ type: OS::Cinder::Volume
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: volume_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/firstVol.yaml
new file mode 100644
index 0000000000..7e82b2a7e6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/firstVol.yaml
@@ -0,0 +1,19 @@
+
+heat_template_version: 2013-05-23
+
+parameters:
+ not_null:
+ type: number
+ label: not_number
+
+
+resources:
+ volume_expose:
+ type: OS::Cinder::Volume
+ properties:
+ not_null: not_null
+outputs:
+ not_expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: volume_expose }
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/heatVolumeExpose/positive/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/MANIFEST.json
new file mode 100644
index 0000000000..a189124e6c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": false,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/first.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/first.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/firstVol.yaml
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/firstVol.yaml
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/second.yaml
new file mode 100644
index 0000000000..bb06b9d60a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/missingBaseHeat/second.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+ network_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/MANIFEST.json
new file mode 100644
index 0000000000..3de70a21df
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/MANIFEST.json
@@ -0,0 +1,27 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "firstVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },
+ {
+ "file": "second.yaml",
+ "type": "HEAT",
+ "isBase": true
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/first.yaml
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/first.yaml
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/firstVol.yaml
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/firstVol.yaml
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/second.yaml
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecompGuideLineValidator/multiBaseHeat/second.yaml
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/availability_zone_name/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/availability_zone_name/expected_output/expected_output.json
new file mode 100644
index 0000000000..e9106a850c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/availability_zone_name/expected_output/expected_output.json
@@ -0,0 +1,38 @@
+{
+ "hot-nimbus-pps_v1.0.yaml": {
+ "errorMessageList": [
+ {
+ "level": "WARNING",
+ "message": "Server Availability Zone not aligned with Guidelines, Resource ID [availability_zone_illegal_name_1]"
+ },
+ {
+ "level": "WARNING",
+ "message": "Server Availability Zone not aligned with Guidelines, Resource ID [availability_zone_illegal_name_2]"
+ }
+ ]
+ },
+ "nested-pps_v1.0.yaml": {
+ "errorMessageList": [
+ {
+ "level": "WARNING",
+ "message": "Missing VF_MODULE_ID resource id [pcrf_server_pps]"
+ },
+ {
+ "level": "WARNING",
+ "message": "Server Name not aligned with Guidelines, Resource ID [pcrf_server_pps]"
+ },
+ {
+ "level": "WARNING",
+ "message": "Fixed_IPS not aligned with Guidelines, Resource ID [pcrf_pps_port_0]"
+ }
+ ]
+ },
+ "MANIFEST.json": {
+ "errorMessageList": [
+ {
+ "level": "WARNING",
+ "message": "Missing Base HEAT. Pay attention that without Base HEAT, there will be no shared resources"
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/availability_zone_name/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/availability_zone_name/input/MANIFEST.json
new file mode 100644
index 0000000000..1e719efb31
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/availability_zone_name/input/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/availability_zone_name/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/availability_zone_name/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..809835d2b8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/availability_zone_name/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,12 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+ mock_param: abskdjska
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/availability_zone_name/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/availability_zone_name/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..1b865e75d5
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/availability_zone_name/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,92 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ default: True
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ availability_zone_1:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+
+resources:
+
+
+ availability_zone_legal_name_1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [pcrf_pps_server_names, 0] }
+ availability_zone: {get_param: availability_zone_1}
+ flavor: { get_param: pcrf_flavor_name }
+ metadata:
+ vnf_id: { get_param: pcrf_vnf_id }
+ vf_module_id: { get_param: pcrf_vnf_module_id }
+
+ availability_zone_legal_name_2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [pcrf_pps_server_names, 0] }
+ availability_zone: {get_resource: availability_zone_1}
+ flavor: { get_param: pcrf_flavor_name }
+ metadata:
+ vnf_id: { get_param: pcrf_vnf_id }
+ vf_module_id: { get_param: pcrf_vnf_module_id }
+
+ availability_zone_illegal_name_1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [pcrf_pps_server_names, 0] }
+ availability_zone: {get_param: availability_zone_name}
+ flavor: { get_param: pcrf_flavor_name }
+ metadata:
+ vnf_id: { get_param: pcrf_vnf_id }
+ vf_module_id: { get_param: pcrf_vnf_module_id }
+
+ availability_zone_illegal_name_2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [pcrf_pps_server_names, 0] }
+ availability_zone: {get_param: availability_zone}
+ flavor: { get_param: pcrf_flavor_name }
+ metadata:
+ vnf_id: { get_param: pcrf_vnf_id }
+ vf_module_id: { get_param: pcrf_vnf_module_id }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/floating_ip_resource_type/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/floating_ip_resource_type/expected_output/expected_output.json
new file mode 100644
index 0000000000..f0dc0d21a1
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/floating_ip_resource_type/expected_output/expected_output.json
@@ -0,0 +1,34 @@
+{
+ "hot-nimbus-pps_v1.0.yaml": {
+ "errorMessageList": [
+ {
+ "level": "WARNING",
+ "message": "OS::Neutron::FloatingIP is in use, Resource ID [floating_ip_type]"
+ }
+ ]
+ },
+ "nested-pps_v1.0.yaml": {
+ "errorMessageList": [
+ {
+ "level": "WARNING",
+ "message": "Missing VF_MODULE_ID resource id [pcrf_server_pps]"
+ },
+ {
+ "level": "WARNING",
+ "message": "Server Name not aligned with Guidelines, Resource ID [pcrf_server_pps]"
+ },
+ {
+ "level": "WARNING",
+ "message": "Fixed_IPS not aligned with Guidelines, Resource ID [pcrf_pps_port_0]"
+ }
+ ]
+ },
+ "MANIFEST.json": {
+ "errorMessageList": [
+ {
+ "level": "WARNING",
+ "message": "Missing Base HEAT. Pay attention that without Base HEAT, there will be no shared resources"
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/floating_ip_resource_type/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/floating_ip_resource_type/input/MANIFEST.json
new file mode 100644
index 0000000000..1e719efb31
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/floating_ip_resource_type/input/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/floating_ip_resource_type/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/floating_ip_resource_type/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..809835d2b8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/floating_ip_resource_type/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,12 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+ mock_param: abskdjska
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/floating_ip_resource_type/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/floating_ip_resource_type/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..05724cf55b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/floating_ip_resource_type/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,71 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ default: True
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ availability_zone_1:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+
+resources:
+ legal_resource_type1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [pcrf_pps_server_names, 0] }
+ availability_zone: {get_param: availability_zone_1}
+ flavor: {get_param: pcrf_flavor_name}
+ metadata:
+ vnf_id: { get_param: pcrf_vnf_id }
+ vf_module_id: { get_param: pcrf_vnf_module_id }
+
+ floating_ip_type:
+ type: OS::Neutron::FloatingIP
+ properties:
+ name: { get_param: [pcrf_pps_server_names, 0] }
+ availability_zone: {get_param: availability_zone_name}
+ metadata:
+ vnf_id: { get_param: pcrf_vnf_id }
+ vf_module_id: { get_param: pcrf_vnf_module_id }
+
+
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/neutron_port_fixed_ip_name/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/neutron_port_fixed_ip_name/expected_output/expected_output.json
new file mode 100644
index 0000000000..7eefd3d36e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/neutron_port_fixed_ip_name/expected_output/expected_output.json
@@ -0,0 +1,42 @@
+{
+ "hot-nimbus-pps_v1.0.yaml": {
+ "errorMessageList": [
+ {
+ "level": "WARNING",
+ "message": "Fixed_IPS not aligned with Guidelines, Resource ID [fixed_ip_illegal_name_1]"
+ },
+ {
+ "level": "WARNING",
+ "message": "Fixed_IPS not aligned with Guidelines, Resource ID [fixed_ip_illegal_name_2]"
+ },
+ {
+ "level": "WARNING",
+ "message": "Fixed_IPS not aligned with Guidelines, Resource ID [fixed_ip_illegal_name_3]"
+ }
+ ]
+ },
+ "nested-pps_v1.0.yaml": {
+ "errorMessageList": [
+ {
+ "level": "WARNING",
+ "message": "Missing VF_MODULE_ID resource id [pcrf_server_pps]"
+ },
+ {
+ "level": "WARNING",
+ "message": "Server Name not aligned with Guidelines, Resource ID [pcrf_server_pps]"
+ },
+ {
+ "level": "WARNING",
+ "message": "Fixed_IPS not aligned with Guidelines, Resource ID [pcrf_pps_port_0]"
+ }
+ ]
+ },
+ "MANIFEST.json": {
+ "errorMessageList": [
+ {
+ "level": "WARNING",
+ "message": "Missing Base HEAT. Pay attention that without Base HEAT, there will be no shared resources"
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/neutron_port_fixed_ip_name/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/neutron_port_fixed_ip_name/input/MANIFEST.json
new file mode 100644
index 0000000000..1e719efb31
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/neutron_port_fixed_ip_name/input/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/neutron_port_fixed_ip_name/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/neutron_port_fixed_ip_name/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..809835d2b8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/neutron_port_fixed_ip_name/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,12 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+ mock_param: abskdjska
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/neutron_port_fixed_ip_name/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/neutron_port_fixed_ip_name/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..749b7144b6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/neutron_port_fixed_ip_name/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,128 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ default: True
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ pcrf_net_ips:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ pcrf_net_v6_ips:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ pcrf_net_ip_4:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ pcrf_net_v6_ip_4:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ pcrf_net_ipz:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ pcrf_net_v0_ip_3:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ pcrf_net_v6_ip_a:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+
+ fixed_ip_legal_name_1:
+ type: OS::Neutron::Port
+ properties:
+ name: {get_param: pcrf_pps_image_name}
+ fixed_ips:
+ - ip_address: {get_param: pcrf_net_ips}
+
+ fixed_ip_legal_name_2:
+ type: OS::Neutron::Port
+ properties:
+ name: {get_param: pcrf_pps_image_name}
+ fixed_ips:
+ - ip_address: {get_param: pcrf_net_v6_ips}
+
+ fixed_ip_legal_name_3:
+ type: OS::Neutron::Port
+ properties:
+ name: {get_param: pcrf_pps_image_name}
+ fixed_ips:
+ - ip_address: {get_param: pcrf_net_ip_4}
+
+ fixed_ip_legal_name_4:
+ type: OS::Neutron::Port
+ properties:
+ name: {get_param: pcrf_pps_image_name}
+ fixed_ips:
+ - ip_address: {get_param: pcrf_net_v6_ip_4}
+
+ fixed_ip_legal_name_5:
+ type: OS::Neutron::Port
+ properties:
+ name: {get_param: pcrf_pps_image_name}
+ fixed_ips:
+ - ip_address: {get_resource: pcrf_net_v6_ip_4}
+
+ fixed_ip_illegal_name_1:
+ type: OS::Neutron::Port
+ properties:
+ name: {get_param: pcrf_pps_image_name}
+ fixed_ips:
+ - ip_address: {get_param: pcrf_net_ipz}
+
+ fixed_ip_illegal_name_2:
+ type: OS::Neutron::Port
+ properties:
+ name: {get_param: pcrf_pps_image_name}
+ fixed_ips:
+ - ip_address": {get_param: pcrf_net_v0_ip_3}
+
+ fixed_ip_illegal_name_3:
+ type: OS::Neutron::Port
+ properties:
+ name: {get_param: pcrf_pps_image_name}
+ fixed_ips:
+ - ip_address: {get_param: pcrf_net_v6_ip_a}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/nova_server_name/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/nova_server_name/expected_output/expected_output.json
new file mode 100644
index 0000000000..ca1f58c1f8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/nova_server_name/expected_output/expected_output.json
@@ -0,0 +1,50 @@
+{
+ "hot-nimbus-pps_v1.0.yaml": {
+ "errorMessageList": [
+ {
+ "level": "WARNING",
+ "message": "Server Name not aligned with Guidelines, Resource ID [nova_server_ilegal_name_1]"
+ },
+ {
+ "level": "WARNING",
+ "message": "Server Name not aligned with Guidelines, Resource ID [nova_server_ilegal_name_2]"
+ },
+ {
+ "level": "WARNING",
+ "message": "Server Name not aligned with Guidelines, Resource ID [nova_server_ilegal_name_3]"
+ },
+ {
+ "level": "WARNING",
+ "message": "Server Name not aligned with Guidelines, Resource ID [nova_server_ilegal_name_4]"
+ },
+ {
+ "level": "WARNING",
+ "message": "Server Name not aligned with Guidelines, Resource ID [nova_server_ilegal_name_5]"
+ }
+ ]
+ },
+ "nested-pps_v1.0.yaml": {
+ "errorMessageList": [
+ {
+ "level": "WARNING",
+ "message": "Missing VF_MODULE_ID resource id [pcrf_server_pps]"
+ },
+ {
+ "level": "WARNING",
+ "message": "Server Name not aligned with Guidelines, Resource ID [pcrf_server_pps]"
+ },
+ {
+ "level": "WARNING",
+ "message": "Fixed_IPS not aligned with Guidelines, Resource ID [pcrf_pps_port_0]"
+ }
+ ]
+ },
+ "MANIFEST.json": {
+ "errorMessageList": [
+ {
+ "level": "WARNING",
+ "message": "Missing Base HEAT. Pay attention that without Base HEAT, there will be no shared resources"
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/nova_server_name/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/nova_server_name/input/MANIFEST.json
new file mode 100644
index 0000000000..1e719efb31
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/nova_server_name/input/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/nova_server_name/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/nova_server_name/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..809835d2b8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/nova_server_name/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,12 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+ mock_param: abskdjska
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/nova_server_name/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/nova_server_name/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..766cbf150f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/ecomp_naming_convention/nova_server_name/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,138 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ default: True
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ pcrf_vnf_module_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ pcrf_flavor:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ pcrf_pps_server_name_4:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+
+resources:
+ nova_server_legal_name_1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [pcrf_pps_server_names, 0] }
+ flavor: { get_param: pcrf_flavor_name }
+ metadata:
+ vnf_id: { get_param: pcrf_vnf_id }
+ vf_module_id: { get_param: pcrf_vnf_module_id }
+
+
+ nova_server_legal_name_2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: pcrf_pps_server_name_4 }
+ flavor: { get_param: pcrf_flavor_name }
+ metadata:
+ vnf_id: { get_param: pcrf_vnf_id }
+ vf_module_id: { get_param: pcrf_vnf_module_id }
+
+ nova_server_legal_name_3:
+ type: OS::Nova::Server
+ properties:
+ name: { get_resource: pcrf_pps_server_name_4 }
+ flavor: { get_param: pcrf_flavor_name }
+ metadata:
+ vnf_id: { get_param: pcrf_vnf_id }
+ vf_module_id: { get_param: pcrf_vnf_module_id }
+
+ nova_server_ilegal_name_1:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: pcrf_pps_server_name_a }
+ flavor: { get_param: pcrf_flavor_name }
+ metadata:
+ vnf_id: { get_param: pcrf_vnf_id }
+ vf_module_id: { get_param: pcrf_vnf_module_id }
+
+ nova_server_ilegal_name_2:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: pcrf_pps_server_nameds_a }
+ flavor: { get_param: pcrf_flavor_name }
+ metadata:
+ vnf_id: { get_param: pcrf_vnf_id }
+ vf_module_id: { get_param: pcrf_vnf_module_id }
+
+ nova_server_ilegal_name_3:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: pcrf_pps_server_name_a }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ metadata:
+ vnf_id: { get_param: pcrf_vnf_id }
+ vf_module_id: { get_param: pcrf_vnf_module_id }
+
+ nova_server_ilegal_name_4:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: pcrf_pps_server_name_a }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ metadata:
+ vnf_id: { get_param: pcrf_vnf_id }
+ vf_module_id: { get_param: pcrf_vnf_module_id }
+
+ nova_server_ilegal_name_5:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: pcrf_pps_server_name_a }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ metadata:
+ vnf_id: { get_param: pcrf_vnf_id }
+ vf_module_id: { get_param: pcrf_vnf_module_id }
+
+ nova_server_ilegal_name_6:
+ type: OS::Nova::Server
+ properties:
+ name: pcrf_pps_server_name_a
+ flavor: { get_param: pcrf_pps_flavor_name }
+ metadata:
+ vnf_id: { get_param: pcrf_vnf_id }
+ vf_module_id: { get_param: pcrf_vnf_module_id }
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/default_value_align_with_type/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/default_value_align_with_type/negative_test/input/MANIFEST.json
new file mode 100644
index 0000000000..1e719efb31
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/default_value_align_with_type/negative_test/input/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/default_value_align_with_type/negative_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/default_value_align_with_type/negative_test/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..8ae6fc021a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/default_value_align_with_type/negative_test/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,11 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name_1: 14
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/default_value_align_with_type/negative_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/default_value_align_with_type/negative_test/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..555f6ae852
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/default_value_align_with_type/negative_test/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,60 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name_1:
+ type: number
+ default: True
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_image_name_2:
+ type:
+ default: True
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_image_name_3:
+ type: number
+ default:
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_pps_001:
+ type: OS::Heat::CloudConfig
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/depends_on_points_to_existing_resource/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/depends_on_points_to_existing_resource/input/MANIFEST.json
new file mode 100644
index 0000000000..a1ec6bc0f7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/depends_on_points_to_existing_resource/input/MANIFEST.json
@@ -0,0 +1,11 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/depends_on_points_to_existing_resource/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/depends_on_points_to_existing_resource/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..35a0efb28d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/depends_on_points_to_existing_resource/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,43 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+
+resources:
+ resource_depends_on_legal_1:
+ type: OS::Heat::CloudConfig
+ depends_on: [resource_1, resource_2]
+
+ resource_depends_on_legal_2:
+ type: OS::Heat::CloudConfig
+ depends_on: resource_1
+
+ resource_depends_on_illegal_1:
+ type: OS::Heat::CloudConfig
+ depends_on: resource_not_exist
+
+ resource_depends_on_illegal_2:
+ type: OS::Heat::CloudConfig
+ depends_on: [resource_1, resource_3]
+
+ resource_depends_on_illegal_3:
+ type: OS::Heat::CloudConfig
+ depends_on:
+
+ resource_1:
+ type: OS::Heat::CloudConfig
+
+ resource_2:
+ type: OS::Heat::CloudConfig
+
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input/MANIFEST.json
new file mode 100644
index 0000000000..1e719efb31
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..809835d2b8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,12 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+ mock_param: abskdjska
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..4605195eaf
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,54 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ pcrf_psm_server_name:
+ type: string
+
+resources:
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_psm_server_name }
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/expected_output/expected_output.json
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/expected_output/expected_output.json
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/MANIFEST.json
new file mode 100644
index 0000000000..fe7d8bdf5a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/MANIFEST.json
@@ -0,0 +1,51 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "nested-pps_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested-psm_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "mount_iso_script.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "cloud-nimbus.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "nimbus-ethernet",
+ "type": "OTHER"
+ },
+ {
+ "file": "nimbus-ethernet-gw",
+ "type": "OTHER"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..340be2b815
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,11 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..05bd6c9318
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,121 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_pps_001:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_002:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 1] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_003:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 2] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_004:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 3] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_005:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 4] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_006:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f24e4763c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,10 @@
+parameters:
+ pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..c2d7b05ead
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,199 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_psm_001:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_002:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 1] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_003:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 2] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_004:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 3] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_005:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 4] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_006:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 5] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_007:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 6] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 6] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_008:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 7] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 7] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_009:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 8] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 8] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_010:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 9] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 9] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_011:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 10] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 10] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_012:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/nested-pps_v1.0.yaml
new file mode 100644
index 0000000000..b7291d69d3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/nested-pps_v1.0.yaml
@@ -0,0 +1,97 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_name:
+ type: string
+ label: PCRF PS server name
+ description: PCRF PS server name
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_pps_server_name }
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_pps:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_pps_server_name }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcrf_pps_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_pps_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/nested-psm_v1.0.yaml
new file mode 100644
index 0000000000..6868728b73
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_content_is_subset_of_heat/positive_test/input/nested-psm_v1.0.yaml
@@ -0,0 +1,97 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_name:
+ type: string
+ label: PCRF SM server name
+ description: PCRF SM server name
+ pcrf_psm_image_name:
+ type: string
+ label: image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_psm_server_name }
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_psm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_psm_server_name }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: psm01_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+ #scheduler_hints: {group: { get_resource: servergroup_nimbus }}
+
+ psm01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }] \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_empty_value/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_empty_value/input/MANIFEST.json
new file mode 100644
index 0000000000..d383ab6c95
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_empty_value/input/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "env_empty_value.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "env_empty_value.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_empty_value/input/env_empty_value.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_empty_value/input/env_empty_value.env
new file mode 100644
index 0000000000..20f9eed60d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_empty_value/input/env_empty_value.env
@@ -0,0 +1,3 @@
+parameters:
+ oam_mgmt_network_id: e1724ea7-553b-470d-a9eb-ed274528a0a1
+ cluster_size:
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_empty_value/input/env_empty_value.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_empty_value/input/env_empty_value.yaml
new file mode 100644
index 0000000000..9d01d63908
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_empty_value/input/env_empty_value.yaml
@@ -0,0 +1,122 @@
+heat_template_version: 2014-10-16
+
+description: create BIG-IP VE instance
+
+parameters:
+
+ # 06-01-2015 added anti-affinity policy
+ lb_server_group:
+ type: string
+ description: Anti-affinity group for lb
+ server_name:
+ type: comma_delimited_list
+ label: BIG-IP instance name
+ description: BIG-IP instance name
+ image_name:
+ type: string
+ label: image name
+ description: the MVM BIG-IP image name
+ flavor_name:
+ type: string
+ label: bigip flavor name
+ description: the flavor name of bigip instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: the availabilityzone name
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ oam_mgmt_network_id:
+ type: string
+ label: oam network name
+ description: mgmt eth0 local mgmt network
+ oam_mgmt_network_ip:
+ type: comma_delimited_list
+ label: oam network ip
+ description: the local ip of mgmt network
+ oam_network_id:
+ type: string
+ label: bigip oam network id
+ description: oam TMM 1.1 network
+ oam_network_ip:
+ type: comma_delimited_list
+ label: oam network ip
+ description: the local ip of oam network
+ oam_network_vip_ip:
+ type: string
+ label: oam network virtual server ip
+ description: oam network virtual server ip
+ dmz_network_id:
+ type: string
+ label: bigip dmz network id
+ description: dmz TMM 1.2 network
+ dmz_network_ip:
+ type: comma_delimited_list
+ label: dmz network ip
+ description: BIGIP dmz network ip
+ dmz_network_vip_ip:
+ type: string
+ label: dmz network virtual server ip
+ description: dmz network virtual server ip
+ core_network_id:
+ type: string
+ label: core network id
+ description: core TMM 1.3 network
+ core_network_ip:
+ type: comma_delimited_list
+ label: core network ip
+ description: core network ip
+ core_network_vip_ip:
+ type: string
+ label: core network virtual server ip
+ description: core network virtual server ip
+ ha_network_f5_id:
+ type: string
+ label: HA network id
+ description: HA TMM 1.4 network
+ ha_local_ip:
+ type: comma_delimited_list
+ label: HA local ip
+ description: HA failover local ip
+ vnf_id:
+ type: string
+ description: Unique ID for this VF instance
+ vf_module_id:
+ type: string
+ description: Unique ID for this VF_MODULE instance
+ cluster_size:
+ type: number
+ description: number of instance of the VF_module
+
+resources:
+ f5_modules:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: { get_param: cluster_size }
+ resource_def:
+ type: vvm_f5_5nic.nested.heat.yaml
+ properties:
+ lb_system_name: { get_param: lb_server_group }
+ server_name: { get_param: server_name }
+ image_name: { get_param: image_name }
+ flavor_name: { get_param: flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ security_group_name: { get_param: security_group_name }
+ oam_mgmt_network_id: { get_param: oam_mgmt_network_id }
+ oam_mgmt_network_ip: { get_param: oam_mgmt_network_ip }
+ oam_network_id: { get_param: oam_network_id }
+ oam_network_ip: { get_param: oam_network_ip }
+ oam_network_vip_ip: { get_param: oam_network_vip_ip }
+ dmz_network_id: { get_param: dmz_network_id }
+ dmz_network_ip: { get_param: dmz_network_ip }
+ dmz_network_vip_ip: { get_param: dmz_network_vip_ip }
+ core_network_id: { get_param: core_network_id }
+ core_network_ip: { get_param: core_network_ip }
+ core_network_vip_ip: { get_param: core_network_vip_ip }
+ ha_network_id: { get_param: ha_network_f5_id }
+ ha_local_ip: { get_param: ha_local_ip }
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ indx: "%index%"
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input/MANIFEST.json
new file mode 100644
index 0000000000..06df1e696d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input/MANIFEST.json
@@ -0,0 +1,35 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "nested-pps_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested-psm_v1.0.yaml",
+ "type": "HEAT"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..089284d177
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,11 @@
+parameters:
+ pcrf_pps_server_names: 1
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..4944424af8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,50 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: number
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_pps_001:
+ type: OS::Heat::CloudConfig
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/expected_output/expected_output.json
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/expected_output/expected_output.json
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/MANIFEST.json
new file mode 100644
index 0000000000..fe7d8bdf5a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/MANIFEST.json
@@ -0,0 +1,51 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "nested-pps_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested-psm_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "mount_iso_script.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "cloud-nimbus.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "nimbus-ethernet",
+ "type": "OTHER"
+ },
+ {
+ "file": "nimbus-ethernet-gw",
+ "type": "OTHER"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..340be2b815
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,11 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..05bd6c9318
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,121 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_pps_001:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_002:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 1] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_003:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 2] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_004:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 3] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_005:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 4] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_006:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f24e4763c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,10 @@
+parameters:
+ pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..c2d7b05ead
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,199 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_psm_001:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_002:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 1] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_003:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 2] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_004:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 3] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_005:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 4] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_006:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 5] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_007:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 6] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 6] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_008:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 7] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 7] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_009:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 8] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 8] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_010:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 9] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 9] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_011:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 10] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 10] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_012:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/nested-pps_v1.0.yaml
new file mode 100644
index 0000000000..b7291d69d3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/nested-pps_v1.0.yaml
@@ -0,0 +1,97 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_name:
+ type: string
+ label: PCRF PS server name
+ description: PCRF PS server name
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_pps_server_name }
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_pps:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_pps_server_name }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcrf_pps_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_pps_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/nested-psm_v1.0.yaml
new file mode 100644
index 0000000000..6868728b73
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/env_parameters_match_defined_types/positive_test/input/nested-psm_v1.0.yaml
@@ -0,0 +1,97 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_name:
+ type: string
+ label: PCRF SM server name
+ description: PCRF SM server name
+ pcrf_psm_image_name:
+ type: string
+ label: image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_psm_server_name }
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_psm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_psm_server_name }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: psm01_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+ #scheduler_hints: {group: { get_resource: servergroup_nimbus }}
+
+ psm01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }] \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/MANIFEST.json
new file mode 100644
index 0000000000..c27fba2205
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/MANIFEST.json
@@ -0,0 +1,21 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "nested-psm_v1.0.yaml",
+ "type": "HEAT"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f24e4763c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,10 @@
+parameters:
+ pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..4a66bf5bf6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,72 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_psm_001:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+
+
+outputs:
+ server_pcrf_psm_001_output:
+ description: the pcrf_server
+ value: { get_attr: [ server_pcrf_psm_001, nested_output ] }
+
+
+ server_pcrf_psm_002_output:
+ description: the pcrf_server
+ value: { get_attr: }
+
+ server_pcrf_psm_003_output:
+ description: the pcrf_server
+ value: { get_attr: []}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/nested-psm_v1.0.yaml
new file mode 100644
index 0000000000..c26a0dd3a8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/negative_test/input/nested-psm_v1.0.yaml
@@ -0,0 +1,103 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_name:
+ type: string
+ label: PCRF SM server name
+ description: PCRF SM server name
+ pcrf_psm_image_name:
+ type: string
+ label: image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_psm_server_name }
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_psm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_psm_server_name }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: psm01_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+ #scheduler_hints: {group: { get_resource: servergroup_nimbus }}
+
+ psm01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
+
+
+outputs:
+ not_in_resource:
+ description: the pcrf_swift_container_1 url
+ value: { get_param: pcrf_psm_server_name } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/expected_output/expected_output.json
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/expected_output/expected_output.json
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/MANIFEST.json
new file mode 100644
index 0000000000..fe7d8bdf5a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/MANIFEST.json
@@ -0,0 +1,51 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "nested-pps_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested-psm_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "mount_iso_script.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "cloud-nimbus.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "nimbus-ethernet",
+ "type": "OTHER"
+ },
+ {
+ "file": "nimbus-ethernet-gw",
+ "type": "OTHER"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..340be2b815
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,11 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..05bd6c9318
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,121 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_pps_001:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_002:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 1] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_003:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 2] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_004:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 3] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_005:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 4] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_006:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f24e4763c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,10 @@
+parameters:
+ pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..4ab762d34b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,204 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_psm_001:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_002:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 1] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_003:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 2] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_004:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 3] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_005:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 4] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_006:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 5] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_007:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 6] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 6] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_008:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 7] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 7] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_009:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 8] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 8] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_010:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 9] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 9] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_011:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 10] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 10] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_012:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+outputs:
+ server_pcrf_psm_001_output:
+ description: the pcrf_server
+ value: { get_attr: [ server_pcrf_psm_001, nested_output ] }
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/nested-pps_v1.0.yaml
new file mode 100644
index 0000000000..b7291d69d3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/nested-pps_v1.0.yaml
@@ -0,0 +1,97 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_name:
+ type: string
+ label: PCRF PS server name
+ description: PCRF PS server name
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_pps_server_name }
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_pps:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_pps_server_name }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcrf_pps_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_pps_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/nested-psm_v1.0.yaml
new file mode 100644
index 0000000000..4b7aac8f44
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_attr_from_nested/positive_test/input/nested-psm_v1.0.yaml
@@ -0,0 +1,103 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_name:
+ type: string
+ label: PCRF SM server name
+ description: PCRF SM server name
+ pcrf_psm_image_name:
+ type: string
+ label: image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_psm_server_name }
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_psm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_psm_server_name }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: psm01_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+ #scheduler_hints: {group: { get_resource: servergroup_nimbus }}
+
+ psm01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
+
+
+outputs:
+ nested_output:
+ description: the pcrf_swift_container_1 url
+ value: { get_param: pcrf_psm_server_name } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input/MANIFEST.json
new file mode 100644
index 0000000000..c27fba2205
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input/MANIFEST.json
@@ -0,0 +1,21 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "nested-psm_v1.0.yaml",
+ "type": "HEAT"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f24e4763c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,10 @@
+parameters:
+ pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..6eb260e380
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,55 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+
+
+ server_pcrf_psm_001:
+ type: OS::Contrail::NetworkIpam
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ pcrf_cps_net_mask: { get_param: }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+ property_pointing_to_not_existing_param: {get_param: not_existing_param_1}
+
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/expected_output/expected_output.json
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/expected_output/expected_output.json
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/MANIFEST.json
new file mode 100644
index 0000000000..fe7d8bdf5a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/MANIFEST.json
@@ -0,0 +1,51 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "nested-pps_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested-psm_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "mount_iso_script.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "cloud-nimbus.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "nimbus-ethernet",
+ "type": "OTHER"
+ },
+ {
+ "file": "nimbus-ethernet-gw",
+ "type": "OTHER"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..340be2b815
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,11 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..05bd6c9318
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,121 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_pps_001:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_002:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 1] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_003:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 2] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_004:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 3] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_005:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 4] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_006:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f24e4763c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,10 @@
+parameters:
+ pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..c2d7b05ead
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,199 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_psm_001:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_002:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 1] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_003:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 2] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_004:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 3] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_005:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 4] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_006:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 5] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_007:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 6] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 6] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_008:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 7] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 7] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_009:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 8] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 8] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_010:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 9] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 9] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_011:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 10] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 10] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_012:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/nested-pps_v1.0.yaml
new file mode 100644
index 0000000000..b7291d69d3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/nested-pps_v1.0.yaml
@@ -0,0 +1,97 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_name:
+ type: string
+ label: PCRF PS server name
+ description: PCRF PS server name
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_pps_server_name }
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_pps:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_pps_server_name }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcrf_pps_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_pps_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/nested-psm_v1.0.yaml
new file mode 100644
index 0000000000..6868728b73
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_param_points_to_existing_parameter/positive_test/input/nested-psm_v1.0.yaml
@@ -0,0 +1,97 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_name:
+ type: string
+ label: PCRF SM server name
+ description: PCRF SM server name
+ pcrf_psm_image_name:
+ type: string
+ label: image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_psm_server_name }
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_psm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_psm_server_name }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: psm01_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+ #scheduler_hints: {group: { get_resource: servergroup_nimbus }}
+
+ psm01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }] \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_resource_value_valid/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_resource_value_valid/negative_test/input/MANIFEST.json
new file mode 100644
index 0000000000..a1ec6bc0f7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_resource_value_valid/negative_test/input/MANIFEST.json
@@ -0,0 +1,11 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_resource_value_valid/negative_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_resource_value_valid/negative_test/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..9a8e58ffe2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/get_resource_value_valid/negative_test/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,31 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ param_1:
+ type: number
+
+ param_2:
+ type: number
+
+
+resources:
+ server_pcrf_pps_006:
+ type: OS::Contrail::NetworkIpam
+ properties:
+ pcrf_pps_server_name: { get_resource: [param_1, param_2] }
+
+
+ server_pcrf_pps_007:
+ type: OS::Contrail::NetworkIpam
+ properties:
+ pcrf_pps_server_name: { get_resource: {get_param: param_1} }
+
+
+ server_pcrf_pps_008:
+ type: OS::Contrail::NetworkIpam
+ properties:
+ pcrf_pps_server_name: { get_resource: }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/invalid_heat_format/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/invalid_heat_format/negative_test/input/MANIFEST.json
new file mode 100644
index 0000000000..5513de2ba2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/invalid_heat_format/negative_test/input/MANIFEST.json
@@ -0,0 +1,11 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/invalid_heat_format/negative_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/invalid_heat_format/negative_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..a5ee917b2c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/invalid_heat_format/negative_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,52 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ num_instances:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+
+ pcrf_pps_image_name:
+ type: string
+ pcrf_pps_flavor_name:
+ type: string
+ availability_zone_0:
+ type: string
+resources:
+ resource_with_resources_group_1:
+ kuku: kuku
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: { get_param: num_instances }
+ resource_def:
+ type: {get_param: pcrf_vnf_id}
+ properties:
+ pcrf_psm_server_name: { get_param: pcrf_pps_server_names }
+ pcrf_psm_image_name: { get_param: pcrf_pps_image_name }
+
+
+
+
+ resource_with_resources_group_2:
+ blabla: blabla
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: { get_param: num_instances }
+ resource_def:
+ type: OS::Nova::Server
+ properties:
+ cloud_zone_id: { get_param: pcrf_pps_server_names }
+ vf_name: { get_param: pcrf_pps_image_name }
+
+
+
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/network_policy_associated_with_attach_policy/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/network_policy_associated_with_attach_policy/input/MANIFEST.json
new file mode 100644
index 0000000000..1e719efb31
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/network_policy_associated_with_attach_policy/input/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/network_policy_associated_with_attach_policy/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/network_policy_associated_with_attach_policy/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..340be2b815
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/network_policy_associated_with_attach_policy/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,11 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/network_policy_associated_with_attach_policy/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/network_policy_associated_with_attach_policy/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..b2b91ec36d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/network_policy_associated_with_attach_policy/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,69 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ used_server_pcrf_policy:
+ type: OS::Contrail::NetworkPolicy
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+
+ not_used_server_pcrf_policy:
+ type: OS::Contrail::NetworkPolicy
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+
+ server_pcrf_network:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+
+ attach_policy_resource:
+ type: OS::Contrail::AttachPolicy
+ properties:
+ network: { get_resource: server_pcrf_network }
+ policy: { get_attr: [used_server_pcrf_policy, fq_name] }
+
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/MANIFEST.json
new file mode 100644
index 0000000000..e789fd7b1d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/MANIFEST.json
@@ -0,0 +1,45 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "nested-psm_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested-points-to-hot-nimbus-psm.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "yaml-point-to-itself.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "mount_iso_script.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "cloud-nimbus.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "nimbus-ethernet",
+ "type": "OTHER"
+ },
+ {
+ "file": "nimbus-ethernet-gw",
+ "type": "OTHER"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f24e4763c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,10 @@
+parameters:
+ pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..49e03e0a16
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,56 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_psm_001:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+
+ server_pcrf_psm_002:
+ type:
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/nested-points-to-hot-nimbus-psm.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/nested-points-to-hot-nimbus-psm.yaml
new file mode 100644
index 0000000000..981c08c011
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/nested-points-to-hot-nimbus-psm.yaml
@@ -0,0 +1,60 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_name:
+ type: string
+ label: PCRF SM server name
+ description: PCRF SM server name
+ pcrf_psm_image_name:
+ type: string
+ label: image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ network:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_psm_001:
+ type: hot-nimbus-psm_v1.0.yaml
+ properties:
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+
+ server_pcrf_psm_002:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/nested-psm_v1.0.yaml
new file mode 100644
index 0000000000..bfc412d715
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/nested-psm_v1.0.yaml
@@ -0,0 +1,47 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_name:
+ type: string
+ label: PCRF SM server name
+ description: PCRF SM server name
+ pcrf_psm_image_name:
+ type: string
+ label: image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ psm01_port_0:
+ type: nested-points-to-hot-nimbus-psm.yaml
+ properties:
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/yaml-point-to-itself.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/yaml-point-to-itself.yaml
new file mode 100644
index 0000000000..ec2a02a5d2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/negative_test/input/yaml-point-to-itself.yaml
@@ -0,0 +1,21 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_name:
+ type: string
+ label: PCRF SM server name
+ description: PCRF SM server name
+ pcrf_psm_image_name:
+ type: string
+ label: image name
+ description: PCRF SM image name
+
+resources:
+
+ resource_points_to_itself:
+ type: yaml-point-to-itself.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_name, 0] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/expected_output/expected_output.json
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/expected_output/expected_output.json
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/MANIFEST.json
new file mode 100644
index 0000000000..fe7d8bdf5a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/MANIFEST.json
@@ -0,0 +1,51 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "nested-pps_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested-psm_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "mount_iso_script.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "cloud-nimbus.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "nimbus-ethernet",
+ "type": "OTHER"
+ },
+ {
+ "file": "nimbus-ethernet-gw",
+ "type": "OTHER"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..340be2b815
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,11 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..05bd6c9318
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,121 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_pps_001:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_002:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 1] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_003:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 2] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_004:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 3] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_005:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 4] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_006:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f24e4763c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,10 @@
+parameters:
+ pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..c2d7b05ead
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,199 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_psm_001:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_002:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 1] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_003:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 2] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_004:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 3] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_005:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 4] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_006:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 5] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_007:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 6] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 6] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_008:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 7] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 7] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_009:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 8] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 8] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_010:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 9] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 9] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_011:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 10] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 10] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_012:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/nested-pps_v1.0.yaml
new file mode 100644
index 0000000000..b7291d69d3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/nested-pps_v1.0.yaml
@@ -0,0 +1,97 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_name:
+ type: string
+ label: PCRF PS server name
+ description: PCRF PS server name
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_pps_server_name }
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_pps:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_pps_server_name }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcrf_pps_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_pps_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/nested-psm_v1.0.yaml
new file mode 100644
index 0000000000..6868728b73
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/no_loops_nesting/positive_test/input/nested-psm_v1.0.yaml
@@ -0,0 +1,97 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_name:
+ type: string
+ label: PCRF SM server name
+ description: PCRF SM server name
+ pcrf_psm_image_name:
+ type: string
+ label: image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_psm_server_name }
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_psm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_psm_server_name }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: psm01_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+ #scheduler_hints: {group: { get_resource: servergroup_nimbus }}
+
+ psm01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }] \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/negative_test/input/MANIFEST.json
new file mode 100644
index 0000000000..dd26e5ac45
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/negative_test/input/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/negative_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/negative_test/input/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f24e4763c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/negative_test/input/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,10 @@
+parameters:
+ pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/negative_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/negative_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..8ef73ded21
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/negative_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,92 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ nova_server_resource_missing_both:
+ type: OS::Nova::Server
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ nova_server_resource_only_image:
+ type: OS::Nova::Server
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }
+ image: { get_param: pcrf_psm_image_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ nova_server_resource_only_flavor:
+ type: OS::Nova::Server
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+
+ nova_server_resource_both_without_get_param:
+ type: OS::Nova::Server
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }
+ flavor: { get_param: }
+ image: { get_param: }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/expected_output/expected_output.json
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/expected_output/expected_output.json
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/MANIFEST.json
new file mode 100644
index 0000000000..fe7d8bdf5a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/MANIFEST.json
@@ -0,0 +1,51 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "nested-pps_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested-psm_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "mount_iso_script.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "cloud-nimbus.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "nimbus-ethernet",
+ "type": "OTHER"
+ },
+ {
+ "file": "nimbus-ethernet-gw",
+ "type": "OTHER"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..340be2b815
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,11 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..05bd6c9318
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,121 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_pps_001:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_002:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 1] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_003:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 2] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_004:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 3] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_005:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 4] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_006:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f24e4763c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,10 @@
+parameters:
+ pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..25a4545311
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,236 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_psm_001:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_002:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 1] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_003:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 2] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_004:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 3] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_005:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 4] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_006:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 5] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_007:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 6] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 6] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_008:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 7] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 7] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_009:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 8] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 8] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_010:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 9] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 9] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_011:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 10] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 10] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_012:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ nova_server_resource:
+ type: OS::Nova::Server
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ nova_server_resource_only_image:
+ type: OS::Nova::Server
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }
+ image: { get_param: pcrf_psm_image_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ nova_server_resource_only_flavor:
+ type: OS::Nova::Server
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/nested-pps_v1.0.yaml
new file mode 100644
index 0000000000..b7291d69d3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/nested-pps_v1.0.yaml
@@ -0,0 +1,97 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_name:
+ type: string
+ label: PCRF PS server name
+ description: PCRF PS server name
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_pps_server_name }
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_pps:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_pps_server_name }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcrf_pps_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_pps_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/nested-psm_v1.0.yaml
new file mode 100644
index 0000000000..6868728b73
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/nova_properties_has_assigned_value/positive_test/input/nested-psm_v1.0.yaml
@@ -0,0 +1,97 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_name:
+ type: string
+ label: PCRF SM server name
+ description: PCRF SM server name
+ pcrf_psm_image_name:
+ type: string
+ label: image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_psm_server_name }
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_psm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_psm_server_name }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: psm01_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+ #scheduler_hints: {group: { get_resource: servergroup_nimbus }}
+
+ psm01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }] \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input/MANIFEST.json
new file mode 100644
index 0000000000..dd26e5ac45
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f24e4763c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,10 @@
+parameters:
+ pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..f7678ed6b7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,95 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ vnf_id:
+ type: string
+
+resources:
+ nova_server_2:
+ type: OS::Nova::Server
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: oam1_int_port }
+ fixed_ip: 10.0.0.0
+ floating_ip: 10.0.0.1
+ network: 100_1000_0011
+ port_extra_properties: {admin_state_up: true , allowed_address_pairs: 10}
+ subnet: 10.0.0.2
+ - port: { get_resource: oam1_mgmt_port }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+
+ nova_server_3:
+ type: OS::Nova::Server
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: oam1_int_port }
+ fixed_ip: 10.0.0.0
+ floating_ip: 10.0.0.1
+ network: 100_1000_0011
+ port_extra_properties: {admin_state_up: true , allowed_address_pairs: 10}
+ subnet: 10.0.0.2
+ metadata:
+ vnf_id: { get_param: vnf_id }
+
+ oam1_int_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: pcrf_psm_server_names}
+ fixed_ips: [{"ip_address": {get_param: [pcrf_psm_image_name, 0]}}]
+ security_groups: [{get_param: pcrf_psm_image_name}]
+ replacement_policy: AUTO
+
+ oam1_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: pcrf_psm_server_names}
+ fixed_ips: [{"ip_address": {get_param: [pcrf_psm_image_name, 0]}}]
+ security_groups: [{get_param: pcrf_psm_image_name}]
+ replacement_policy: AUTO \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/expected_output/expected_output.json
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/expected_output/expected_output.json
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/MANIFEST.json
new file mode 100644
index 0000000000..fe7d8bdf5a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/MANIFEST.json
@@ -0,0 +1,51 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "nested-pps_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested-psm_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "mount_iso_script.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "cloud-nimbus.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "nimbus-ethernet",
+ "type": "OTHER"
+ },
+ {
+ "file": "nimbus-ethernet-gw",
+ "type": "OTHER"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..340be2b815
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,11 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..05bd6c9318
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,121 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_pps_001:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_002:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 1] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_003:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 2] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_004:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 3] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_005:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 4] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_006:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f24e4763c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,10 @@
+parameters:
+ pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..c173fce968
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,233 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ nova_server_1:
+ type: OS::Nova::Server
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: oam1_int_port }
+ fixed_ip: 10.0.0.0
+ floating_ip: 10.0.0.1
+ network: 100_1000_0011
+ port_extra_properties: {admin_state_up: true , allowed_address_pairs: 10}
+ subnet: 10.0.0.2
+ - port: { get_resource: oam1_mgmt_port }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+
+ oam1_int_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: pcrf_psm_server_names}
+ fixed_ips: [{"ip_address": {get_param: [pcrf_psm_image_name, 0]}}]
+ security_groups: [{get_param: pcrf_psm_image_name}]
+ replacement_policy: AUTO
+
+ oam1_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: pcrf_psm_server_names}
+ fixed_ips: [{"ip_address": {get_param: [pcrf_psm_image_name, 0]}}]
+ security_groups: [{get_param: pcrf_psm_image_name}]
+ replacement_policy: AUTO
+
+ server_pcrf_psm_001:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_002:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 1] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_003:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 2] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_004:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 3] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_005:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 4] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_006:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 5] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_007:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 6] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 6] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_008:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 7] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 7] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_009:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 8] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 8] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_010:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 9] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 9] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_011:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 10] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 10] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_012:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/nested-pps_v1.0.yaml
new file mode 100644
index 0000000000..b7291d69d3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/nested-pps_v1.0.yaml
@@ -0,0 +1,97 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_name:
+ type: string
+ label: PCRF PS server name
+ description: PCRF PS server name
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_pps_server_name }
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_pps:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_pps_server_name }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcrf_pps_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_pps_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/nested-psm_v1.0.yaml
new file mode 100644
index 0000000000..6868728b73
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/one_nova_points_to_one_port/positive_test/input/nested-psm_v1.0.yaml
@@ -0,0 +1,97 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_name:
+ type: string
+ label: PCRF SM server name
+ description: PCRF SM server name
+ pcrf_psm_image_name:
+ type: string
+ label: image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_psm_server_name }
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_psm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_psm_server_name }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: psm01_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+ #scheduler_hints: {group: { get_resource: servergroup_nimbus }}
+
+ psm01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }] \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/MANIFEST.json
new file mode 100644
index 0000000000..fe7d8bdf5a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/MANIFEST.json
@@ -0,0 +1,51 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "nested-pps_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested-psm_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "mount_iso_script.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "cloud-nimbus.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "nimbus-ethernet",
+ "type": "OTHER"
+ },
+ {
+ "file": "nimbus-ethernet-gw",
+ "type": "OTHER"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..340be2b815
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,11 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..05bd6c9318
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,121 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_pps_001:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_002:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 1] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_003:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 2] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_004:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 3] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_005:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 4] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_006:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f24e4763c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,10 @@
+parameters:
+ pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..c2d7b05ead
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,199 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_psm_001:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_002:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 1] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_003:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 2] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_004:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 3] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_005:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 4] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_006:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 5] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_007:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 6] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 6] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_008:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 7] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 7] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_009:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 8] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 8] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_010:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 9] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 9] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_011:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 10] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 10] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_012:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/nested-pps_v1.0.yaml
new file mode 100644
index 0000000000..b7291d69d3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/nested-pps_v1.0.yaml
@@ -0,0 +1,97 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_name:
+ type: string
+ label: PCRF PS server name
+ description: PCRF PS server name
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_pps_server_name }
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_pps:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_pps_server_name }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcrf_pps_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_pps_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/nested-psm_v1.0.yaml
new file mode 100644
index 0000000000..6868728b73
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/negative_test/input/nested-psm_v1.0.yaml
@@ -0,0 +1,97 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_name:
+ type: string
+ label: PCRF SM server name
+ description: PCRF SM server name
+ pcrf_psm_image_name:
+ type: string
+ label: image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_psm_server_name }
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_psm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_psm_server_name }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: psm01_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+ #scheduler_hints: {group: { get_resource: servergroup_nimbus }}
+
+ psm01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }] \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/expected_output/expected_output.json
new file mode 100644
index 0000000000..ce04d8c601
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/expected_output/expected_output.json
@@ -0,0 +1,42 @@
+{
+ "name": "multiple_not_nested",
+ "description": "multiple heat files in zip, no nesting",
+ "version": "2013-05-23",
+ "data": [{
+ "file": "cmaui.yml",
+ "type": "HEAT",
+ "data": [{
+ "file": "cmaui.env",
+ "type": "HEAT_ENV"
+ }]
+ },
+ {
+ "file": "eca_oam.yaml",
+ "type": "HEAT",
+ "data": [{
+ "file": "eca_oam.env",
+ "type": "HEAT_ENV"
+ }]
+ },
+ {
+ "file": "eca_oam_nested.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "MMSC_Capacity_Line.yml",
+ "type": "HEAT",
+ "data": [{
+ "file": "MMSC_Capacity_Line_1.env",
+ "type": "HEAT_ENV"
+ }]
+ },
+ {
+ "file": "SG_ECA_MGMT.yaml",
+ "type": "HEAT",
+ "data": [{
+ "file": "sg_eca_mgmt.env",
+ "type": "HEAT_ENV"
+ }]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/MANIFEST.json
new file mode 100644
index 0000000000..fe7d8bdf5a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/MANIFEST.json
@@ -0,0 +1,51 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "nested-pps_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested-psm_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "mount_iso_script.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "cloud-nimbus.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "nimbus-ethernet",
+ "type": "OTHER"
+ },
+ {
+ "file": "nimbus-ethernet-gw",
+ "type": "OTHER"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..340be2b815
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,11 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..05bd6c9318
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,121 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_pps_001:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_002:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 1] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_003:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 2] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_004:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 3] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_005:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 4] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_006:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f24e4763c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,10 @@
+parameters:
+ pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..c2d7b05ead
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,199 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_psm_001:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_002:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 1] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_003:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 2] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_004:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 3] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_005:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 4] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_006:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 5] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_007:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 6] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 6] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_008:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 7] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 7] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_009:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 8] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 8] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_010:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 9] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 9] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_011:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 10] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 10] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_012:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/nested-pps_v1.0.yaml
new file mode 100644
index 0000000000..fc5b6f74c3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/nested-pps_v1.0.yaml
@@ -0,0 +1,99 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_name:
+ type: string
+ label: PCRF PS server name
+ description: PCRF PS server name
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ template: { get_file: cloud-nimbus.sh }
+ params:
+ $vm_name: { get_param: pcrf_pps_server_name }
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: nimbus-ethernet }
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_pps:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_pps_server_name }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcrf_pps_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_pps_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/nested-psm_v1.0.yaml
new file mode 100644
index 0000000000..c86aa34713
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/parameter_default_value/positive_test/input/nested-psm_v1.0.yaml
@@ -0,0 +1,99 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_name:
+ type: string
+ label: PCRF SM server name
+ description: PCRF SM server name
+ pcrf_psm_image_name:
+ type: string
+ label: image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: nimbus-ethernet }
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ template: { get_file: cloud-nimbus.sh }
+ params:
+ $vm_name: { get_param: pcrf_psm_server_name }
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_psm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_psm_server_name }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: psm01_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+ #scheduler_hints: {group: { get_resource: servergroup_nimbus }}
+
+ psm01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }] \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/negative_test/input/MANIFEST.json
new file mode 100644
index 0000000000..dd26e5ac45
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/negative_test/input/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/negative_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/negative_test/input/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f613758633
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/negative_test/input/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,8 @@
+parameters:
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/negative_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/negative_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..82edacf101
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/negative_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,116 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_name:
+ type: string
+ label: PCRF SM server name
+ description: PCRF SM server name
+ pcrf_psm_image_name:
+ type: string
+ label: image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_psm_server_name }
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_psm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_psm_server_name }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: psm01_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+ scheduler_hints: {group_1: { get_resource: pcrf_server_policies_1 }, group_2: { get_resource: pcrf_server_policies_2 }, group_3: { get_resource: pcrf_server_policies_3 }}
+
+ pcrf_server_policies_1:
+ type: OS::Nova::ServerGroup
+ properties:
+ config_drive: "True"
+ policies: [affinity, anti-affinity]
+
+ pcrf_server_policies_2:
+ type: OS::Nova::ServerGroup
+ properties:
+ config_drive: "True"
+ policies:
+
+ pcrf_server_policies_3:
+ type: OS::Nova::ServerGroup
+ properties:
+ config_drive: "True"
+ policies: [affinity, ]
+
+ psm01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/expected_output/expected_output.json
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/expected_output/expected_output.json
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/MANIFEST.json
new file mode 100644
index 0000000000..fe7d8bdf5a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/MANIFEST.json
@@ -0,0 +1,51 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "nested-pps_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested-psm_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "mount_iso_script.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "cloud-nimbus.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "nimbus-ethernet",
+ "type": "OTHER"
+ },
+ {
+ "file": "nimbus-ethernet-gw",
+ "type": "OTHER"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..340be2b815
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,11 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..05bd6c9318
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,121 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_pps_001:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_002:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 1] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_003:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 2] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_004:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 3] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_005:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 4] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_006:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f24e4763c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,10 @@
+parameters:
+ pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..c2d7b05ead
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,199 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_psm_001:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_002:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 1] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_003:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 2] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_004:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 3] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_005:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 4] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_006:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 5] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_007:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 6] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 6] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_008:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 7] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 7] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_009:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 8] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 8] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_010:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 9] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 9] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_011:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 10] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 10] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_012:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/nested-pps_v1.0.yaml
new file mode 100644
index 0000000000..a7966d6d47
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/nested-pps_v1.0.yaml
@@ -0,0 +1,114 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_name:
+ type: string
+ label: PCRF PS server name
+ description: PCRF PS server name
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_pps_server_name }
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_pps:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_pps_server_name }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcrf_pps_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_server_policies:
+ type: OS::Nova::ServerGroup
+ properties:
+ config_drive: "True"
+ policies: [affinity]
+ name: { get_param: pcrf_pps_server_name }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcrf_pps_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_pps_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/nested-psm_v1.0.yaml
new file mode 100644
index 0000000000..681117d275
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/policy_is_affinity_or_anti_affinity/positive_test/input/nested-psm_v1.0.yaml
@@ -0,0 +1,112 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_name:
+ type: string
+ label: PCRF SM server name
+ description: PCRF SM server name
+ pcrf_psm_image_name:
+ type: string
+ label: image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_psm_server_name }
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_psm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_psm_server_name }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: psm01_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+ #scheduler_hints: {group: { get_resource: servergroup_nimbus }}
+
+ psm01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
+
+ pcrf_server_policies:
+ type: OS::Nova::ServerGroup
+ properties:
+ config_drive: "True"
+ policies: [anti-affinity]
+ name: { get_param: pcrf_psm_server_name }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/MANIFEST.json
new file mode 100644
index 0000000000..fe7d8bdf5a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/MANIFEST.json
@@ -0,0 +1,51 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "nested-pps_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested-psm_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "mount_iso_script.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "cloud-nimbus.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "nimbus-ethernet",
+ "type": "OTHER"
+ },
+ {
+ "file": "nimbus-ethernet-gw",
+ "type": "OTHER"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..340be2b815
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,11 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..05bd6c9318
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,121 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_pps_001:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_002:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 1] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_003:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 2] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_004:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 3] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_005:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 4] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_006:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f24e4763c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,10 @@
+parameters:
+ pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..c2d7b05ead
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,199 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_psm_001:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_002:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 1] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_003:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 2] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_004:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 3] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_005:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 4] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_006:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 5] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_007:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 6] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 6] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_008:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 7] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 7] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_009:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 8] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 8] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_010:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 9] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 9] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_011:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 10] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 10] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_012:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/nested-pps_v1.0.yaml
new file mode 100644
index 0000000000..fc5b6f74c3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/nested-pps_v1.0.yaml
@@ -0,0 +1,99 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_name:
+ type: string
+ label: PCRF PS server name
+ description: PCRF PS server name
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ template: { get_file: cloud-nimbus.sh }
+ params:
+ $vm_name: { get_param: pcrf_pps_server_name }
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: nimbus-ethernet }
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_pps:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_pps_server_name }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcrf_pps_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_pps_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/nested-psm_v1.0.yaml
new file mode 100644
index 0000000000..c86aa34713
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/negative_test/input/nested-psm_v1.0.yaml
@@ -0,0 +1,99 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_name:
+ type: string
+ label: PCRF SM server name
+ description: PCRF SM server name
+ pcrf_psm_image_name:
+ type: string
+ label: image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: nimbus-ethernet }
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ template: { get_file: cloud-nimbus.sh }
+ params:
+ $vm_name: { get_param: pcrf_psm_server_name }
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_psm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_psm_server_name }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: psm01_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+ #scheduler_hints: {group: { get_resource: servergroup_nimbus }}
+
+ psm01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }] \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/expected_output/expected_output.json
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/expected_output/expected_output.json
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/MANIFEST.json
new file mode 100644
index 0000000000..fe7d8bdf5a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/MANIFEST.json
@@ -0,0 +1,51 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "nested-pps_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested-psm_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "mount_iso_script.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "cloud-nimbus.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "nimbus-ethernet",
+ "type": "OTHER"
+ },
+ {
+ "file": "nimbus-ethernet-gw",
+ "type": "OTHER"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..340be2b815
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,11 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..05bd6c9318
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,121 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_pps_001:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_002:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 1] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_003:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 2] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_004:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 3] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_005:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 4] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_006:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f24e4763c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,10 @@
+parameters:
+ pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..c2d7b05ead
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,199 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_psm_001:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_002:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 1] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_003:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 2] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_004:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 3] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_005:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 4] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_006:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 5] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_007:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 6] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 6] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_008:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 7] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 7] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_009:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 8] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 8] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_010:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 9] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 9] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_011:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 10] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 10] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_012:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/nested-pps_v1.0.yaml
new file mode 100644
index 0000000000..fc5b6f74c3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/nested-pps_v1.0.yaml
@@ -0,0 +1,99 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_name:
+ type: string
+ label: PCRF PS server name
+ description: PCRF PS server name
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ template: { get_file: cloud-nimbus.sh }
+ params:
+ $vm_name: { get_param: pcrf_pps_server_name }
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: nimbus-ethernet }
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_pps:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_pps_server_name }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcrf_pps_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_pps_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/nested-psm_v1.0.yaml
new file mode 100644
index 0000000000..c86aa34713
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties-match-nested-parameters/positive_test/input/nested-psm_v1.0.yaml
@@ -0,0 +1,99 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_name:
+ type: string
+ label: PCRF SM server name
+ description: PCRF SM server name
+ pcrf_psm_image_name:
+ type: string
+ label: image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: nimbus-ethernet }
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ template: { get_file: cloud-nimbus.sh }
+ params:
+ $vm_name: { get_param: pcrf_psm_server_name }
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_psm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_psm_server_name }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: psm01_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+ #scheduler_hints: {group: { get_resource: servergroup_nimbus }}
+
+ psm01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }] \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/MANIFEST.json
new file mode 100644
index 0000000000..02118a7b23
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/MANIFEST.json
@@ -0,0 +1,21 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "nested-pps_v1.0.yaml",
+ "type": "HEAT"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..340be2b815
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,11 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..5d93b2f4f7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,49 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_pps_001:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ parameter_not_existing_in_nested: {get_param: pcrf_vnf_id}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/nested-pps_v1.0.yaml
new file mode 100644
index 0000000000..0ed9043fc2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/negative_test/input/nested-pps_v1.0.yaml
@@ -0,0 +1,74 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_name:
+ type: string
+ label: PCRF PS server name
+ description: PCRF PS server name
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_pps_server_name }
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/expected_output/expected_output.json
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/expected_output/expected_output.json
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/MANIFEST.json
new file mode 100644
index 0000000000..fe7d8bdf5a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/MANIFEST.json
@@ -0,0 +1,51 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "nested-pps_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested-psm_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "mount_iso_script.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "cloud-nimbus.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "nimbus-ethernet",
+ "type": "OTHER"
+ },
+ {
+ "file": "nimbus-ethernet-gw",
+ "type": "OTHER"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..340be2b815
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,11 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..05bd6c9318
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,121 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_pps_001:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_002:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 1] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_003:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 2] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_004:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 3] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_005:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 4] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_006:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f24e4763c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,10 @@
+parameters:
+ pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..c2d7b05ead
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,199 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_psm_001:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_002:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 1] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_003:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 2] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_004:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 3] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_005:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 4] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_006:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 5] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_007:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 6] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 6] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_008:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 7] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 7] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_009:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 8] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 8] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_010:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 9] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 9] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_011:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 10] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 10] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_012:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/nested-pps_v1.0.yaml
new file mode 100644
index 0000000000..b7291d69d3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/nested-pps_v1.0.yaml
@@ -0,0 +1,97 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_name:
+ type: string
+ label: PCRF PS server name
+ description: PCRF PS server name
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_pps_server_name }
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_pps:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_pps_server_name }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcrf_pps_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_pps_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/nested-psm_v1.0.yaml
new file mode 100644
index 0000000000..6868728b73
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/properties_match_nested_parameters/positive_test/input/nested-psm_v1.0.yaml
@@ -0,0 +1,97 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_name:
+ type: string
+ label: PCRF SM server name
+ description: PCRF SM server name
+ pcrf_psm_image_name:
+ type: string
+ label: image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_psm_server_name }
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_psm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_psm_server_name }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: psm01_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+ #scheduler_hints: {group: { get_resource: servergroup_nimbus }}
+
+ psm01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }] \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/pseudo_parameters/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/pseudo_parameters/input/MANIFEST.json
new file mode 100644
index 0000000000..d038fb2a7e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/pseudo_parameters/input/MANIFEST.json
@@ -0,0 +1,11 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "pseudo_parameters.yml",
+ "type": "HEAT"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/pseudo_parameters/input/pseudo_parameters.yml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/pseudo_parameters/input/pseudo_parameters.yml
new file mode 100644
index 0000000000..8dd378ccbd
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/pseudo_parameters/input/pseudo_parameters.yml
@@ -0,0 +1,61 @@
+heat_template_version: 2013-05-23
+
+description: HOT template for vMME Cinder Volumes
+
+
+parameters:
+
+ volume_type:
+ type: string
+ label: volume type
+ description: volume type SolidFire
+
+ volume_size:
+ type: number
+ label: volume size
+ description: my volume size 320GB
+
+ FSB_1_image:
+ type: string
+ label: MME_FSB1
+ description: MME_FSB1_16ACP03_GA
+
+ FSB_2_image:
+ type: string
+ label: MME_FSB2
+ description: MME_FSB2_16ACP03_GA
+
+resources:
+
+ FSB1_volume:
+ type: OS::Cinder::Volume
+ properties:
+ name:
+ list_join: ['_', [{get_param: 'OS::stack_name'}, 'FSB1_Vol_1']]
+
+ FSB2_volume:
+ type: OS::Cinder::Volume
+ properties:
+ name:
+ list_join: ['_', [{get_param: 'OS::stack_id'}, 'FSB1_Vol_2']]
+
+ FSB3_volume:
+ type: OS::Cinder::Volume
+ properties:
+ name:
+ list_join: ['_', [{get_param: 'OS::project_id'}, 'FSB1_Vol_3']]
+
+
+outputs:
+ FSB1_volume_id:
+ description: ID of Cinder Volume for FSB1
+ value: {get_resource: FSB1_volume}
+
+ FSB2_volume_id:
+ description: ID of Cinder Volume for FSB2
+ value: {get_resource: FSB2_volume}
+
+ FSB3_volume_id:
+ description: ID of Cinder Volume for FSB3
+ value: {get_resource: FSB3_volume}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/negative_test/input/MANIFEST.json
new file mode 100644
index 0000000000..a1ec6bc0f7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/negative_test/input/MANIFEST.json
@@ -0,0 +1,11 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/negative_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/negative_test/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..c4680ab619
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/negative_test/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,99 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_name:
+ type: string
+ label: PCRF PS server name
+ description: PCRF PS server name
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ template: { get_file: }
+ params:
+ $vm_name: { get_param: pcrf_pps_server_name }
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: nimbus-ethernet }
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_pps:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_pps_server_name }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcrf_pps_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_pps_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/expected_output/expected_output.json
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/expected_output/expected_output.json
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/MANIFEST.json
new file mode 100644
index 0000000000..ea7f326c76
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/MANIFEST.json
@@ -0,0 +1,51 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "nested-pps_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested-psm_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "mount_iso_script.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "cloud-nimbus.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "nimbus-ethernet",
+ "type": "OTHER"
+ },
+ {
+ "file": "artifact.sh",
+ "type": "OTHER"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/artifact.sh b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/artifact.sh
new file mode 100644
index 0000000000..fc5b6f74c3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/artifact.sh
@@ -0,0 +1,99 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_name:
+ type: string
+ label: PCRF PS server name
+ description: PCRF PS server name
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ template: { get_file: cloud-nimbus.sh }
+ params:
+ $vm_name: { get_param: pcrf_pps_server_name }
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: nimbus-ethernet }
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_pps:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_pps_server_name }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcrf_pps_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_pps_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/cloud-nimbus.sh b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/cloud-nimbus.sh
new file mode 100644
index 0000000000..fc5b6f74c3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/cloud-nimbus.sh
@@ -0,0 +1,99 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_name:
+ type: string
+ label: PCRF PS server name
+ description: PCRF PS server name
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ template: { get_file: cloud-nimbus.sh }
+ params:
+ $vm_name: { get_param: pcrf_pps_server_name }
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: nimbus-ethernet }
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_pps:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_pps_server_name }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcrf_pps_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_pps_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..340be2b815
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,11 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..05bd6c9318
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,121 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_pps_001:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_002:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 1] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_003:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 2] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_004:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 3] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_005:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 4] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_006:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f24e4763c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,10 @@
+parameters:
+ pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..a591692753
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,212 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ artifact_resource:
+ type: OS::Nova::Server
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ artifact: { get_file: artifact.sh }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_001:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_002:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 1] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_003:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 2] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_004:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 3] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_005:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 4] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_006:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 5] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_007:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 6] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 6] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_008:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 7] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 7] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_009:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 8] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 8] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_010:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 9] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 9] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_011:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 10] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 10] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_012:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/nested-pps_v1.0.yaml
new file mode 100644
index 0000000000..fc5b6f74c3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/nested-pps_v1.0.yaml
@@ -0,0 +1,99 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_name:
+ type: string
+ label: PCRF PS server name
+ description: PCRF PS server name
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ template: { get_file: cloud-nimbus.sh }
+ params:
+ $vm_name: { get_param: pcrf_pps_server_name }
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: nimbus-ethernet }
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_pps:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_pps_server_name }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcrf_pps_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_pps_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/nested-psm_v1.0.yaml
new file mode 100644
index 0000000000..c86aa34713
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/nested-psm_v1.0.yaml
@@ -0,0 +1,99 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_name:
+ type: string
+ label: PCRF SM server name
+ description: PCRF SM server name
+ pcrf_psm_image_name:
+ type: string
+ label: image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: nimbus-ethernet }
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ template: { get_file: cloud-nimbus.sh }
+ params:
+ $vm_name: { get_param: pcrf_psm_server_name }
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_psm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_psm_server_name }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: psm01_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+ #scheduler_hints: {group: { get_resource: servergroup_nimbus }}
+
+ psm01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }] \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/nimbus-ethernet b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/nimbus-ethernet
new file mode 100644
index 0000000000..fc5b6f74c3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/referenced_artifacts_exist/positive_test/input/nimbus-ethernet
@@ -0,0 +1,99 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_name:
+ type: string
+ label: PCRF PS server name
+ description: PCRF PS server name
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ template: { get_file: cloud-nimbus.sh }
+ params:
+ $vm_name: { get_param: pcrf_pps_server_name }
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: nimbus-ethernet }
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_pps:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_pps_server_name }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcrf_pps_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_pps_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input/MANIFEST.json
new file mode 100644
index 0000000000..5513de2ba2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input/MANIFEST.json
@@ -0,0 +1,11 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..14ee7b10d2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,102 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ num_instances:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ pcrf_pps_server_names:
+ type: string
+
+ pcrf_pps_image_name:
+ type: string
+ pcrf_pps_flavor_name:
+ type: string
+ availability_zone_0:
+ type: string
+resources:
+ resource_with_resources_group_1:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: { get_param: num_instances }
+ resource_def:
+ type: {get_param: pcrf_vnf_id}
+ properties:
+ pcrf_psm_server_name: { get_param: pcrf_pps_server_names }
+ pcrf_psm_image_name: { get_param: pcrf_pps_image_name }
+
+
+
+
+ resource_with_resources_group_2:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: { get_param: num_instances }
+ resource_def:
+ type: OS::Nova::Server
+ properties:
+ cloud_zone_id: { get_param: pcrf_pps_server_names }
+ vf_name: { get_param: pcrf_pps_image_name }
+
+
+
+ resource_with_resources_group_3:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: { get_param: num_instances }
+ resource_def:
+ type:
+ properties:
+ cloud_zone_id: { get_param: pcrf_pps_server_names }
+ vf_name: { get_param: pcrf_pps_image_name }
+
+
+ resource_with_resources_group_4:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: { get_param: num_instances }
+ resource_def:
+ type: yamlFile.yaml
+
+
+
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input/yamlFile.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input/yamlFile.yaml
new file mode 100644
index 0000000000..12a838bcf5
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_group_invalid_type/negative_test/input/yamlFile.yaml
@@ -0,0 +1,47 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ num_instances:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ pcrf_pps_server_names:
+ type: string \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/negative_test/input/MANIFEST.json
new file mode 100644
index 0000000000..3a4d09caa9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/negative_test/input/MANIFEST.json
@@ -0,0 +1,15 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested-pps_v1.0.yaml",
+ "type": "HEAT"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/negative_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/negative_test/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..1154c06f4d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/negative_test/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,16 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+resources:
+ server_pcrf_pps_007:
+ type: OS::Contrail::NetworkIpam
+ properties:
+ pcrf_pps_server_name: { get_resource: not_existing_resource }
+
+ server_pcrf_pps_008:
+ type: OS::Contrail::NetworkIpam
+ properties:
+ pcrf_pps_server_name: { get_resource: }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/expected_output/expected_output.json
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/expected_output/expected_output.json
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/MANIFEST.json
new file mode 100644
index 0000000000..fe7d8bdf5a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/MANIFEST.json
@@ -0,0 +1,51 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "nested-pps_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested-psm_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "mount_iso_script.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "cloud-nimbus.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "nimbus-ethernet",
+ "type": "OTHER"
+ },
+ {
+ "file": "nimbus-ethernet-gw",
+ "type": "OTHER"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..340be2b815
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,11 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..05bd6c9318
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,121 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_pps_001:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_002:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 1] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_003:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 2] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_004:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 3] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_005:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 4] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_006:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f24e4763c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,10 @@
+parameters:
+ pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..c2d7b05ead
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,199 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_psm_001:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_002:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 1] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_003:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 2] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_004:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 3] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_005:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 4] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_006:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 5] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_007:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 6] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 6] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_008:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 7] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 7] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_009:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 8] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 8] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_010:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 9] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 9] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_011:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 10] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 10] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_012:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/nested-pps_v1.0.yaml
new file mode 100644
index 0000000000..b7291d69d3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/nested-pps_v1.0.yaml
@@ -0,0 +1,97 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_name:
+ type: string
+ label: PCRF PS server name
+ description: PCRF PS server name
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_pps_server_name }
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_pps:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_pps_server_name }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcrf_pps_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_pps_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/nested-psm_v1.0.yaml
new file mode 100644
index 0000000000..6868728b73
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resource_references_exist_in_heat/positive_test/input/nested-psm_v1.0.yaml
@@ -0,0 +1,97 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_name:
+ type: string
+ label: PCRF SM server name
+ description: PCRF SM server name
+ pcrf_psm_image_name:
+ type: string
+ label: image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_psm_server_name }
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_psm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_psm_server_name }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: psm01_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+ #scheduler_hints: {group: { get_resource: servergroup_nimbus }}
+
+ psm01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }] \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/MANIFEST.json
new file mode 100644
index 0000000000..0c8e740434
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/MANIFEST.json
@@ -0,0 +1,19 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested-pps_v1.0.yaml",
+ "type": "HEAT"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..e3779ed99d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,59 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ num_instances:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_pps_001:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+
+
+ resource_with_resources_group:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: { get_param: num_instances }
+ resource_def:
+ type: nested-not-exist.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: pcrf_pps_server_names }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..dc78b37ca2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,98 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ num_instances:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ pcrf_pps_server_names:
+ type: string
+
+ pcrf_pps_image_name:
+ type: string
+ pcrf_pps_flavor_name:
+ type: string
+ availability_zone_0:
+ type: string
+resources:
+ resource_with_resources_group:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: { get_param: num_instances }
+ resource_def:
+ type: nested-from-resources-group.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: pcrf_pps_server_names }
+ pcrf_psm_image_name: { get_param: pcrf_pps_image_name }
+ property_not_in_nested: { get_param: availabilityzone_name }
+ pcrf_cps_net_name: { get_param: availabilityzone_name }
+ pcrf_cps_net_ip: { get_param: pcrf_vnf_id }
+ pcrf_cps_net_mask: { get_param: pcrf_vnf_id }
+ pcrf_security_group_name: { get_param: pcrf_pps_image_name }
+ pcrf_vnf_id: { get_param: pcrf_pps_flavor_name }
+
+ availabilityzone_name: { get_param: availability_zone_0 }
+
+
+
+ resource_without_resources_group:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: { get_param: num_instances }
+ resource_def:
+ type: OS::Nova::Server
+ properties:
+ cloud_zone_id: { get_param: pcrf_pps_server_names }
+ vf_name: { get_param: pcrf_pps_image_name }
+ vf_instance_num: { get_param: pcrf_pps_image_name }
+ vf_component: { get_param: availabilityzone_name }
+ vm_instance_num: { get_param: availabilityzone_name }
+ vnf_id: { get_param: pcrf_vnf_id }
+ vf_module_id: { get_param: pcrf_vnf_id }
+ bootimage: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ key_name: { get_param: pcrf_cps_net_mask }
+
+ availability_zone_0: { get_param: availability_zone_0 }
+
+
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/nested-from-resources-group.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/nested-from-resources-group.yaml
new file mode 100644
index 0000000000..836ab5c1f8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/nested-from-resources-group.yaml
@@ -0,0 +1,105 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_name:
+ type: string
+ label: PCRF SM server name
+ description: PCRF SM server name
+ pcrf_psm_image_name:
+ type: string
+ label: image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_psm_server_name }
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_psm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_psm_server_name }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: psm01_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+ #scheduler_hints: {group: { get_resource: servergroup_nimbus }}
+
+ psm01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
+
+ psm01_port_1:
+ type: hot-nimbus-pps_v1.0.yaml
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }] \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/nested-pps_v1.0.yaml
new file mode 100644
index 0000000000..bdf957c59e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/nested-pps_v1.0.yaml
@@ -0,0 +1,52 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_name:
+ type: string
+ label: PCRF PS server name
+ description: PCRF PS server name
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ num_instances:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ pcrf_pps_server_names:
+ type: string
+resources:
+ resource_with_resources_group:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: { get_param: num_instances }
+ resource_def:
+ type: nested-from-resources-group.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: pcrf_pps_server_names } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/expected_output/expected_output.json
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/expected_output/expected_output.json
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/MANIFEST.json
new file mode 100644
index 0000000000..fe7d8bdf5a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/MANIFEST.json
@@ -0,0 +1,51 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "nested-pps_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested-psm_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "mount_iso_script.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "cloud-nimbus.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "nimbus-ethernet",
+ "type": "OTHER"
+ },
+ {
+ "file": "nimbus-ethernet-gw",
+ "type": "OTHER"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..a1ea053e07
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,11 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..b12de0def4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,144 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_pps_001:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_002:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 1] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_003:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 2] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_004:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 3] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_005:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 4] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_006:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ nova_server:
+ type: OS::Nova::Server
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+ scheduler_hints: { group_1: { get_resource: BE_Affinity_1 }, group_2: { get_resource: BE_Affinity_2 } }
+
+ BE_Affinity_1:
+ type: OS::Nova::ServerGroup
+ properties:
+ network: { get_param: pcrf_pps_server_names }
+
+ BE_Affinity_2:
+ type: OS::Nova::ServerGroup
+ properties:
+ network: { get_param: pcrf_pps_server_names } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f24e4763c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,10 @@
+parameters:
+ pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..3f91e94d74
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,288 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ num_instances:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_psm_001:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_002:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 1] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_003:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 2] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_004:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 3] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_005:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 4] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_006:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 5] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_007:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 6] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 6] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_008:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 7] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 7] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_009:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 8] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 8] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_010:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 9] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 9] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_011:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 10] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 10] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_012:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ resource_with_resources_group:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: { get_param: num_instances }
+ resource_def:
+ type: nested-from-resources-group.yaml
+ properties:
+ cloud_zone_id: { get_param: cloud_zone_id }
+ vf_name: { get_param: vf_name }
+ vf_instance_num: { get_param: vf_instance_num }
+ vf_component: { get_param: vf_component }
+ vm_instance_num: { get_param: vm_instance_num }
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ bootimage: { get_param: bootimage }
+ flavor: { get_param: flavor }
+ key_name: { get_param: key_name }
+
+ availability_zone_0: { get_param: availability_zone_0 }
+
+ sec_groups: { get_param: sec_groups }
+ data_volume_size: { get_param: data_volume_size }
+ mgmt_net_id: { get_param: mgmt_net_id }
+
+ sas_mgmt_ip_0: { get_param: sas_mgmt_ip_0 }
+
+ indx: "%index%"
+
+
+ resource_without_resources_group:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: { get_param: num_instances }
+ resource_def:
+ type: OS::Nova::Server
+ properties:
+ cloud_zone_id: { get_param: cloud_zone_id }
+ vf_name: { get_param: vf_name }
+ vf_instance_num: { get_param: vf_instance_num }
+ vf_component: { get_param: vf_component }
+ vm_instance_num: { get_param: vm_instance_num }
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ bootimage: { get_param: bootimage }
+ flavor: { get_param: flavor }
+ key_name: { get_param: key_name }
+
+ availability_zone_0: { get_param: availability_zone_0 }
+
+ sec_groups: { get_param: sec_groups }
+ data_volume_size: { get_param: data_volume_size }
+ mgmt_net_id: { get_param: mgmt_net_id }
+
+ sas_mgmt_ip_0: { get_param: sas_mgmt_ip_0 }
+
+ indx: "%index%"
+
+ resource_with_not_existing_resources_group:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: { get_param: num_instances }
+ resource_def:
+ type: nested-from-resources-group.yaml
+ properties:
+ cloud_zone_id: { get_param: cloud_zone_id }
+ vf_name: { get_param: vf_name }
+ vf_instance_num: { get_param: vf_instance_num }
+ vf_component: { get_param: vf_component }
+ vm_instance_num: { get_param: vm_instance_num }
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ bootimage: { get_param: bootimage }
+ flavor: { get_param: flavor }
+ key_name: { get_param: key_name }
+
+ availability_zone_0: { get_param: availability_zone_0 }
+
+ sec_groups: { get_param: sec_groups }
+ data_volume_size: { get_param: data_volume_size }
+ mgmt_net_id: { get_param: mgmt_net_id }
+
+ sas_mgmt_ip_0: { get_param: sas_mgmt_ip_0 }
+
+ indx: "%index%"
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/nested-from-resources-group.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/nested-from-resources-group.yaml
new file mode 100644
index 0000000000..6868728b73
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/nested-from-resources-group.yaml
@@ -0,0 +1,97 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_name:
+ type: string
+ label: PCRF SM server name
+ description: PCRF SM server name
+ pcrf_psm_image_name:
+ type: string
+ label: image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_psm_server_name }
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_psm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_psm_server_name }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: psm01_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+ #scheduler_hints: {group: { get_resource: servergroup_nimbus }}
+
+ psm01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }] \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/nested-pps_v1.0.yaml
new file mode 100644
index 0000000000..b7291d69d3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/nested-pps_v1.0.yaml
@@ -0,0 +1,97 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_name:
+ type: string
+ label: PCRF PS server name
+ description: PCRF PS server name
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_pps_server_name }
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_pps:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_pps_server_name }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcrf_pps_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_pps_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/nested-psm_v1.0.yaml
new file mode 100644
index 0000000000..6868728b73
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/resources_group_with_nested/positive_test/input/nested-psm_v1.0.yaml
@@ -0,0 +1,97 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_name:
+ type: string
+ label: PCRF SM server name
+ description: PCRF SM server name
+ pcrf_psm_image_name:
+ type: string
+ label: image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_psm_server_name }
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_psm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_psm_server_name }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: psm01_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+ #scheduler_hints: {group: { get_resource: servergroup_nimbus }}
+
+ psm01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }] \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_base_file_no_ports/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_base_file_no_ports/input/MANIFEST.json
new file mode 100644
index 0000000000..f487bae31f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_base_file_no_ports/input/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "baseFile.yaml",
+ "type": "HEAT",
+ "isBase": true
+ },
+ {
+ "file": "notBaseFile.yaml",
+ "type": "HEAT",
+ "isBase": false
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_base_file_no_ports/input/baseFile.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_base_file_no_ports/input/baseFile.yaml
new file mode 100644
index 0000000000..9446d6fde0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_base_file_no_ports/input/baseFile.yaml
@@ -0,0 +1,43 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ jsa_net_name:
+ type: string
+ description: network name of jsa log network
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+
+resources:
+ jsa_security_group1:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: ems security group
+ name: {get_param: security_group_name}
+
+
+ jsa_security_group2:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: ems security group
+ name: {get_param: security_group_name}
+
+ jsa_security_group3:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: ems security group
+ name: {get_param: security_group_name}
+
+outputs:
+ shared_security_group_id1:
+ value: {get_resource: jsa_security_group1}
+
+ shared_security_group_id2:
+ value: {get_resource: jsa_security_group2}
+
+ shared_security_group_id3:
+ value: {get_resource: jsa_security_group3} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_base_file_no_ports/input/notBaseFile.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_base_file_no_ports/input/notBaseFile.yaml
new file mode 100644
index 0000000000..7ac05194ac
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_base_file_no_ports/input/notBaseFile.yaml
@@ -0,0 +1,26 @@
+heat_template_version: 2013-05-23
+
+description: >
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+
+parameters:
+ shared_security_group_id1:
+ type: string
+ description: network name of jsa log network
+ shared_security_group_id2:
+ type: string
+ description: network name of jsa log network
+ jsa_net_name:
+ type: string
+ description: network name of jsa log network
+ security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+
+resources:
+ test_nested:
+ type: OS::Contrail::NetworkIpam
+ properties:
+ p1: { get_param: shared_security_group_id1}
+ p2: { get_param: shared_security_group_id2}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_called_by_port/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_called_by_port/input/MANIFEST.json
new file mode 100644
index 0000000000..1e719efb31
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_called_by_port/input/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_called_by_port/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_called_by_port/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..340be2b815
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_called_by_port/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,11 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_called_by_port/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_called_by_port/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..51b9481bfa
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/security_group_called_by_port/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,68 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ used_security_group:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+
+ not_used_security_group:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+
+ server_pcrf_network:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+
+ attach_policy_resource:
+ type: OS::Neutron::Port
+ properties:
+ security_groups: [{ get_resource: used_security_group }]
+
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_group_called_by_nova_server/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_group_called_by_nova_server/input/MANIFEST.json
new file mode 100644
index 0000000000..1e719efb31
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_group_called_by_nova_server/input/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_group_called_by_nova_server/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_group_called_by_nova_server/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..340be2b815
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_group_called_by_nova_server/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,11 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_group_called_by_nova_server/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_group_called_by_nova_server/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..63eea76e2e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_group_called_by_nova_server/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,67 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ image_name:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ used_server_group:
+ type: OS::Nova::ServerGroup
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+
+ not_used_server_group:
+ type: OS::Nova::ServerGroup
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+
+ nova_server:
+ type: OS::Nova::Server
+ properties:
+ scheduler_hints: { group: { get_resource: used_server_group } }
+ image: {get_param: image_name}
+
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/negative_test/input/MANIFEST.json
new file mode 100644
index 0000000000..1e719efb31
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/negative_test/input/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/negative_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/negative_test/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..340be2b815
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/negative_test/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,11 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/negative_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/negative_test/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..1955922940
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/negative_test/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,70 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ nova_server_1:
+ type: OS::Nova::Server
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ scheduler_hints: { group_1: { get_resource: BE_Affinity_1 }, group_2: { get_resource: BE_Affinity_2 } }
+ networks:
+ - port: {get_resource: BE_Affinity_2}
+
+
+ nova_server_2:
+ type: OS::Nova::Server
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ scheduler_hints: { group_1: , group_2: { get_resource: BE_Affinity_2 } }
+
+ BE_Affinity_2:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_pps_server_names }
+
+
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/expected_output/expected_output.json
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/expected_output/expected_output.json
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/MANIFEST.json
new file mode 100644
index 0000000000..fe7d8bdf5a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/MANIFEST.json
@@ -0,0 +1,51 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "nested-pps_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested-psm_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "mount_iso_script.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "cloud-nimbus.sh",
+ "type": "SHELL"
+ },
+ {
+ "file": "nimbus-ethernet",
+ "type": "OTHER"
+ },
+ {
+ "file": "nimbus-ethernet-gw",
+ "type": "OTHER"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..a1ea053e07
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,11 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..b12de0def4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,144 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_pps_001:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_002:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 1] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_003:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 2] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_004:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 3] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_005:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 4] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_006:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ nova_server:
+ type: OS::Nova::Server
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+ scheduler_hints: { group_1: { get_resource: BE_Affinity_1 }, group_2: { get_resource: BE_Affinity_2 } }
+
+ BE_Affinity_1:
+ type: OS::Nova::ServerGroup
+ properties:
+ network: { get_param: pcrf_pps_server_names }
+
+ BE_Affinity_2:
+ type: OS::Nova::ServerGroup
+ properties:
+ network: { get_param: pcrf_pps_server_names } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f24e4763c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,10 @@
+parameters:
+ pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..c2d7b05ead
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,199 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_psm_001:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_002:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 1] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_003:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 2] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_004:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 3] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_005:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 4] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_006:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 5] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_007:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 6] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 6] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_008:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 7] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 7] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_009:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 8] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 8] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_010:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 9] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 9] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_011:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 10] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 10] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_012:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/nested-pps_v1.0.yaml
new file mode 100644
index 0000000000..b7291d69d3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/nested-pps_v1.0.yaml
@@ -0,0 +1,97 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_name:
+ type: string
+ label: PCRF PS server name
+ description: PCRF PS server name
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_pps_server_name }
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_pps:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_pps_server_name }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcrf_pps_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_pps_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/nested-psm_v1.0.yaml
new file mode 100644
index 0000000000..6868728b73
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/server_groups_defined_correctly/positive_test/input/nested-psm_v1.0.yaml
@@ -0,0 +1,97 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_name:
+ type: string
+ label: PCRF SM server name
+ description: PCRF SM server name
+ pcrf_psm_image_name:
+ type: string
+ label: image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ params:
+ $vm_name: { get_param: pcrf_psm_server_name }
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_psm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_psm_server_name }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: psm01_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+ #scheduler_hints: {group: { get_resource: servergroup_nimbus }}
+
+ psm01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }] \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/shared_resources/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/shared_resources/input/MANIFEST.json
new file mode 100644
index 0000000000..1e719efb31
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/shared_resources/input/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/shared_resources/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/shared_resources/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..340be2b815
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/shared_resources/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,11 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/shared_resources/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/shared_resources/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..1114734097
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/shared_resources/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,90 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ used_security_group:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+
+ not_used_security_group:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+
+ shared_security_group:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+
+ shared_server_group:
+ type: OS::Nova::ServerGroup
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+
+ server_pcrf_network:
+ type: OS::Contrail::VirtualNetwork
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+
+ attach_policy_resource:
+ type: OS::Neutron::Port
+ properties:
+ security_groups: [{ get_resource: used_security_group }]
+
+
+outputs:
+ output_shrared_resource_1:
+ description: uuid of the security group
+ value: {get_resource: shared_security_group }
+
+ output_shrared_resource_2:
+ description: uuid of the security group
+ value: {get_resource: shared_server_group }
+
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/MANIFEST.json
new file mode 100644
index 0000000000..06df1e696d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/MANIFEST.json
@@ -0,0 +1,35 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-pps_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "nested-pps_v1.0.yaml",
+ "type": "HEAT"
+ },
+ {
+ "file": "nested-psm_v1.0.yaml",
+ "type": "HEAT"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-pps_v1.0.env
new file mode 100644
index 0000000000..340be2b815
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-pps_v1.0.env
@@ -0,0 +1,11 @@
+parameters:
+ pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006
+ pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_pps_flavor_name: lc.3xlarge
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644
index 0000000000..717b915c68
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-pps_v1.0.yaml
@@ -0,0 +1,125 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_server_names:
+ type: comma_delimited_list
+ label: PCRF PS server names
+ description: PCRF PS server names
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_pps_001:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_002:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 1] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_003:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 2] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_004:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 3] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_005:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 4] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_pps_006:
+ type: nested-pps_v1.0.yaml
+ properties:
+ pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }
+ pcrf_pps_image_name: { get_param: pcrf_pps_image_name }
+ pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f24e4763c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,10 @@
+parameters:
+ pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..de8d6b7658
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,207 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ pcrf_vnf_id:
+ type: number
+ label: PCRF id number
+ description: PCRF id number
+
+resources:
+ server_pcrf_psm_001:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_002:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 1] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_003:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 2] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_004:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 3] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_005:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 4] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_006:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 5] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_007:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 6] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 6] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_008:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 7] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 7] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_009:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 8] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 8] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_010:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 9] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 9] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_011:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 10] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 10] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
+ server_pcrf_psm_012:
+ type: nested-psm_v1.0.yaml
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }
+ pcrf_psm_image_name: { get_param: pcrf_psm_image_name }
+ pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ pcrf_security_group_name: { get_param: pcrf_security_group_name }
+ pcrf_cps_net_name: { get_param: pcrf_cps_net_name }
+ pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }
+ pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }
+ pcrf_vnf_id: {get_param: pcrf_vnf_id}
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/nested-pps_v1.0.yaml
new file mode 100644
index 0000000000..153820b2c2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/nested-pps_v1.0.yaml
@@ -0,0 +1,103 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Policy Server stack
+
+parameters:
+ pcrf_pps_server_name:
+ type: string
+ label: PCRF PS server name
+ description: PCRF PS server name
+ pcrf_pps_image_name:
+ type: string
+ label: PCRF PS image name
+ description: PCRF PS image name
+ pcrf_pps_flavor_name:
+ type: string
+ label: PCRF PS flavor name
+ description: flavor name of PCRF PS instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ template: { get_file: cloud-nimbus.sh }
+ params:
+ $vm_name: { get_param: pcrf_pps_server_name }
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: nimbus-ethernet }
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_pps:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_pps_server_name }
+ image: { get_param: pcrf_pps_image_name }
+ flavor: { get_param: pcrf_pps_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: pcrf_pps_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+
+ pcrf_pps_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }]
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/nested-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/nested-psm_v1.0.yaml
new file mode 100644
index 0000000000..f982cc9195
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/negative_test/input/nested-psm_v1.0.yaml
@@ -0,0 +1,103 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_name:
+ type: string
+ label: PCRF SM server name
+ description: PCRF SM server name
+ pcrf_psm_server_name:
+ type: string
+ label: PCRF SM server name
+ description: PCRF SM server name
+ pcrf_psm_image_name:
+ type: string
+ label: image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ip:
+ type: string
+ label: CPS network ip
+ description: CPS network ip
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ network:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ write_files:
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ permissions: "0644"
+ content:
+ str_replace:
+ template: { get_file: nimbus-ethernet }
+ params:
+ $dev: eth0
+ $ip: { get_param: pcrf_cps_net_ip }
+ $netmask: { get_param: pcrf_cps_net_mask }
+ runcmd:
+ - ifdown eth0 && ifup eth0
+ script_init:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: ungrouped
+ config:
+ str_replace:
+ template: { get_file: cloud-nimbus.sh }
+ params:
+ $vm_name: { get_param: pcrf_psm_server_name }
+ pcrf_server_init:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: { get_resource: network}
+ - config: { get_resource: script_init}
+
+ pcrf_server_psm:
+ type: OS::Nova::Server
+ properties:
+ config_drive: "True"
+ name: { get_param: pcrf_psm_server_name }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availability_zone: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: psm01_port_0}
+ user_data_format: RAW
+ user_data:
+ get_resource: pcrf_server_init
+ metadata:
+ vnf_id: {get_param: pcrf_vnf_id}
+ #scheduler_hints: {group: { get_resource: servergroup_nimbus }}
+
+ psm01_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: pcrf_cps_net_name }
+ fixed_ips:
+ - ip_address: { get_param: pcrf_cps_net_ip }
+ security_groups: [{ get_param: pcrf_security_group_name }] \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/expected_output/expected_output.json
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/expected_output/expected_output.json
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input/MANIFEST.json
new file mode 100644
index 0000000000..dd26e5ac45
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f24e4763c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,10 @@
+parameters:
+ pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..5e940bdd49
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,50 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+
+resources:
+ server_pcrf_psm_001:
+ type: OS::Contrail::NetworkIpam
+
+ server_pcrf_psm_002:
+ type: OS::Contrail::NetworkIpam
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/envInRoot/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/envInRoot/MANIFEST.json
new file mode 100644
index 0000000000..5524f47fa8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/envInRoot/MANIFEST.json
@@ -0,0 +1,22 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "first.yaml",
+ "type": "HEAT",
+ "isBase": true,
+ "data": [
+ {
+ "file": "first.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ },
+ {
+ "file": "second.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/envInRoot/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/envInRoot/first.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/envInRoot/first.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/envInRoot/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/envInRoot/first.yaml
new file mode 100644
index 0000000000..368834e847
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/envInRoot/first.yaml
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+ SecurityGroup_expose:
+ type: OS::Neutron::Net
+
+outputs:
+ not_expose_resource_network_output:
+ description: the pcrf_server
+ value: { get_param: ServerGroup_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/envInRoot/second.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/envInRoot/second.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/envInRoot/second.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/MANIFEST.json
new file mode 100644
index 0000000000..de35dfc0db
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/MANIFEST.json
@@ -0,0 +1,24 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "single.yaml.illegalSuffix",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "single.env.illegalSuffix",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "singleVol.yaml.illegalSuffix",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },{
+ "file": "illegalTypeFile.yaml",
+ "type": "ILLEGAL_TYPE"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/illegalTypeFile.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/illegalTypeFile.yaml
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/illegalTypeFile.yaml
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/single.env.illegalSuffix b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/single.env.illegalSuffix
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/single.env.illegalSuffix
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/single.yaml.illegalSuffix b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/single.yaml.illegalSuffix
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/single.yaml.illegalSuffix
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/singleVol.yaml.illegalSuffix b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/singleVol.yaml.illegalSuffix
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidFileTypeInManifest/singleVol.yaml.illegalSuffix
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidManifest/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidManifest/MANIFEST.json
new file mode 100644
index 0000000000..7b3dd77ed7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidManifest/MANIFEST.json
@@ -0,0 +1,21 @@
+{
+ "name": "inValidTest",
+ "description": "inValid Test",
+ "version": [{"v": "1.0"}],
+ "data": [
+ {
+ "file": "single.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "single.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "singleVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidManifest/single.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidManifest/single.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidManifest/single.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidManifest/single.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidManifest/single.yaml
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidManifest/single.yaml
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidManifest/singleVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidManifest/singleVol.yaml
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/invalidManifest/singleVol.yaml
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/MANIFEST.json
new file mode 100644
index 0000000000..fd2b2c3f6d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/MANIFEST.json
@@ -0,0 +1,22 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "invalidField":"value",
+ "data": [
+ {
+ "file": "single.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "single.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "singleVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/extraFile.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/extraFile.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/extraFile.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/single.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/single.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/single.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/single.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/single.yaml
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/single.yaml
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/singleVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/singleVol.yaml
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifest/singleVol.yaml
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifestAndInZip/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifestAndInZip/MANIFEST.json
new file mode 100644
index 0000000000..60a8efe769
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifestAndInZip/MANIFEST.json
@@ -0,0 +1,21 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "single.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "single.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "singleVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifestAndInZip/extraFile.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifestAndInZip/extraFile.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifestAndInZip/extraFile.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifestAndInZip/single.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifestAndInZip/single.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifestAndInZip/single.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifestAndInZip/single.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifestAndInZip/single.yaml
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInManifestAndInZip/single.yaml
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInZip/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInZip/MANIFEST.json
new file mode 100644
index 0000000000..60a8efe769
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInZip/MANIFEST.json
@@ -0,0 +1,21 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "single.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "single.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "singleVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInZip/single.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInZip/single.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInZip/single.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInZip/single.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInZip/single.yaml
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/missingFileInZip/single.yaml
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/validFiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/validFiles/MANIFEST.json
new file mode 100644
index 0000000000..60a8efe769
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/validFiles/MANIFEST.json
@@ -0,0 +1,21 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "file": "single.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "single.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "singleVol.yaml",
+ "type": "HEAT_VOL"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/validFiles/single.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/validFiles/single.env
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/validFiles/single.env
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/validFiles/single.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/validFiles/single.yaml
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/validFiles/single.yaml
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/validFiles/singleVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/validFiles/singleVol.yaml
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/manifestValidator/validFiles/singleVol.yaml
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/duplicateKey.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/duplicateKey.yaml
new file mode 100644
index 0000000000..418cc59c71
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/duplicateKey.yaml
@@ -0,0 +1,30 @@
+### Heat Template ###
+description: Generated template
+heat_template_version: 2013-05-23
+parameters: {}
+resources:
+ Key_1_unique:
+ properties:
+ admin_state_up: true
+ name: name_notReleventForTest
+ shared: true
+ type: type_notReleventForTest
+ Key_2_not_unique:
+ properties:
+ admin_state_up: true
+ name: name_notReleventForTest
+ shared: true
+ type: type_notReleventForTest
+ Key_2_not_unique:
+ properties:
+ admin_state_up: true
+ name: name_notReleventForTest
+ shared: true
+ type: type_notReleventForTest
+ Key_3_unique:
+ properties:
+ admin_state_up: true
+ name: name_notReleventForTest
+ shared: true
+ type: type_notReleventForTest
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/emptyYaml.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/emptyYaml.yaml
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/emptyYaml.yaml
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalidTabYamlStructure.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalidTabYamlStructure.yaml
new file mode 100644
index 0000000000..9cc18cef35
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalidTabYamlStructure.yaml
@@ -0,0 +1,24 @@
+### Heat Template ###
+description: Generated template
+heat_template_version: 2013-05-23
+parameters: {}
+resources:
+ Key_1_unique:
+ properties:
+ admin_state_up: true
+ name: name_notReleventForTest
+ shared: true
+ type: type_notReleventForTest
+ Key_2_unique:
+ properties:
+ admin_state_up: true
+ name: name_notReleventForTest
+ shared: true
+ type: type_notReleventForTest
+ Key_3_unique:
+ properties:
+ admin_state_up: true
+ name: name_notReleventForTest
+ shared: true
+ type: type_notReleventForTest
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalidYamlStructure.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalidYamlStructure.yaml
new file mode 100644
index 0000000000..65205e01f9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalidYamlStructure.yaml
@@ -0,0 +1,30 @@
+### Heat Template ###
+description: Generated template
+heat_template_version: 2013-05-23
+parameters: {}
+resources:
+ Key_1_unique:
+ properties:
+ admin_state_up: true
+ name: name_notReleventForTest
+ - shared: true
+ type: type_notReleventForTest
+ Key_2_not_unique:
+ properties:
+ admin_state_up: true
+ name: name_notReleventForTest
+ shared: true
+ type: type_notReleventForTest
+ Key_2_not_unique:
+ properties:
+ admin_state_up: true
+ name: name_notReleventForTest
+ shared: true
+ type: type_notReleventForTest
+ Key_3_unique:
+ properties:
+ admin_state_up: true
+ name: name_notReleventForTest
+ shared: true
+ type: type_notReleventForTest
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/MANIFEST.json
new file mode 100644
index 0000000000..a4065d0b68
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/MANIFEST.json
@@ -0,0 +1,39 @@
+{
+ "data": [
+ {
+ "file": "validHeat.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-oam_v1.0.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "hot-nimbus-oam-volumes_v1.0",
+ "type": "HEAT_VOL",
+ "data": [{
+ "file": "hot-nimbus-oam-volumes_v1.0.env",
+ "type": "HEAT_ENV"
+ }]
+ }
+ ]
+ },
+ {
+ "file": "mainValid.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-oam-networks_v1.0",
+ "type": "HEAT_NET"
+ }
+ ]
+ },
+ {
+ "file": "missingHeatFromZip.yaml.yaml",
+ "type": "HEAT"
+ }
+ ],
+ "description": "RXAEmleoRDWLeWVvmXUJxDKCItgjkMEXuKJcUWyVUZrCUiMzZSyHPzhqLcJSIUNBzohsIGXLBIwstuVDEuFtxuLIwWgCCdjprtvzruHIUKdVnCyifJQUJjqSCoKKKyVaWFTFKzHNhTZNlZTYaMKGEpIMXOpIxSyTZZCgVsGkItQelBbFVrmCltTgkuppYMrEfvwqNBLVRSGCucNwliWFZUuXloXBiZaqtodZjyFpqBNqhlpcrARmMpvLiz",
+ "name": "FCTRQGcMevNngRDvECQYfiEXCYbGeAWRHdaGggLUgyOnssHAiU",
+ "version": "2013-05-23"
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/heat_missing_from_manifast.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/heat_missing_from_manifast.yaml
new file mode 100644
index 0000000000..d5608abfb4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/heat_missing_from_manifast.yaml
@@ -0,0 +1,250 @@
+### Heat Template ###
+description: Generated template
+heat_template_version: 2013-05-23
+parameters: {}
+resources:
+ network_0:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ network_1:
+ properties:
+ admin_state_up: true
+ name: NET_169
+ shared: true
+ type: OS::Neutron::Net
+ network_2:
+ properties:
+ admin_state_up: true
+ name: NET_166
+ shared: true
+ type: OS::Neutron::Net
+ network_3:
+ properties:
+ admin_state_up: true
+ name: NET_168
+ shared: true
+ type: OS::Neutron::Net
+ network_4:
+ properties:
+ admin_state_up: true
+ name: NET_169
+ shared: true
+ type: OS::Neutron::Net
+ network_5:
+ properties:
+ admin_state_up: true
+ name: NET_170
+ shared: true
+ type: OS::Neutron::Net
+ network_6:
+ properties:
+ admin_state_up: true
+ name: NET_168
+ shared: true
+ type: OS::Neutron::Net
+ network_7:
+ properties:
+ admin_state_up: true
+ name: NET_170
+ shared: true
+ type: OS::Neutron::Net
+ network_8:
+ properties:
+ admin_state_up: true
+ name: NET_166
+ shared: true
+ type: OS::Neutron::Net
+ network_9:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ security_group_0:
+ properties:
+ description: Default security group
+ name: _default
+ rules:
+ - direction: ingress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ - direction: egress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ type: OS::Neutron::SecurityGroup
+ security_group_1:
+ properties:
+ description: Default security group
+ name: _default
+ rules:
+ - direction: egress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ - direction: ingress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ type: OS::Neutron::SecurityGroup
+ subnet_0:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.254
+ start: 10.147.32.130
+ cidr: 10.147.32.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_167
+ network_id:
+ get_resource: network_9
+ type: OS::Neutron::Subnet
+ subnet_1:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.254
+ start: 10.147.32.130
+ cidr: 10.147.32.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_167
+ network_id:
+ get_resource: network_0
+ type: OS::Neutron::Subnet
+ subnet_2:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.126
+ start: 10.147.32.2
+ cidr: 10.147.32.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_166
+ network_id:
+ get_resource: network_8
+ type: OS::Neutron::Subnet
+ subnet_3:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.126
+ start: 10.147.32.2
+ cidr: 10.147.32.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_166
+ network_id:
+ get_resource: network_2
+ type: OS::Neutron::Subnet
+ subnet_4:
+ properties:
+ allocation_pools:
+ - end: 10.147.34.126
+ start: 10.147.34.2
+ cidr: 10.147.34.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_170
+ network_id:
+ get_resource: network_5
+ type: OS::Neutron::Subnet
+ subnet_5:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.126
+ start: 10.147.33.2
+ cidr: 10.147.33.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_168
+ network_id:
+ get_resource: network_6
+ type: OS::Neutron::Subnet
+ subnet_6:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.126
+ start: 10.147.33.2
+ cidr: 10.147.33.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_168
+ network_id:
+ get_resource: network_3
+ type: OS::Neutron::Subnet
+ subnet_7:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.254
+ start: 10.147.33.130
+ cidr: 10.147.33.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_169
+ network_id:
+ get_resource: network_1
+ type: OS::Neutron::Subnet
+ subnet_8:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.254
+ start: 10.147.33.130
+ cidr: 10.147.33.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_169
+ network_id:
+ get_resource: network_4
+ type: OS::Neutron::Subnet
+ subnet_9:
+ properties:
+ allocation_pools:
+ - end: 10.147.34.126
+ start: 10.147.34.2
+ cidr: 10.147.34.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_170
+ network_id:
+ get_resource: network_7
+ type: OS::Neutron::Subnet
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/mainValid.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/mainValid.yaml
new file mode 100644
index 0000000000..318c8f1283
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/mainValid.yaml
@@ -0,0 +1,250 @@
+### Heat Template ###
+description: Generated template
+heat_template_version: 2013-05-23
+parameters: {}
+resources:
+ network_0:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ network_1:
+ properties:
+ admin_state_up: true
+ name: NET_169
+ shared: true
+ type: OS::Neutron::Net
+ network_2:
+ properties:
+ admin_state_up: true
+ name: NET_166
+ shared: true
+ type: OS::Neutron::Net
+ network_3:
+ properties:
+ admin_state_up: true
+ name: NET_168
+ shared: true
+ type: missingNested.yaml
+ network_4:
+ properties:
+ admin_state_up: true
+ name: { get_file: missing-artifact }
+ shared: true
+ type: OS::Neutron::Net
+ network_5:
+ properties:
+ admin_state_up: true
+ name: NET_170
+ shared: true
+ type: OS::Neutron::Net
+ network_6:
+ properties:
+ admin_state_up: true
+ name: NET_168
+ shared: true
+ type: OS::Neutron::Net
+ network_7:
+ properties:
+ admin_state_up: true
+ name: NET_170
+ shared: true
+ type: OS::Neutron::Net
+ network_8:
+ properties:
+ admin_state_up: true
+ name: NET_166
+ shared: true
+ type: OS::Neutron::Net
+ network_9:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ security_group_0:
+ properties:
+ description: Default security group
+ name: _default
+ rules:
+ - direction: ingress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ - direction: egress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ type: OS::Neutron::SecurityGroup
+ security_group_1:
+ properties:
+ description: Default security group
+ name: _default
+ rules:
+ - direction: egress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ - direction: ingress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ type: OS::Neutron::SecurityGroup
+ subnet_0:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.254
+ start: 10.147.32.130
+ cidr: 10.147.32.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_167
+ network_id:
+ get_resource: network_9
+ type: OS::Neutron::Subnet
+ subnet_1:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.254
+ start: 10.147.32.130
+ cidr: 10.147.32.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_167
+ network_id:
+ get_resource: network_0
+ type: OS::Neutron::Subnet
+ subnet_2:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.126
+ start: 10.147.32.2
+ cidr: 10.147.32.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_166
+ network_id:
+ get_resource: network_8
+ type: OS::Neutron::Subnet
+ subnet_3:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.126
+ start: 10.147.32.2
+ cidr: 10.147.32.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_166
+ network_id:
+ get_resource: network_2
+ type: OS::Neutron::Subnet
+ subnet_4:
+ properties:
+ allocation_pools:
+ - end: 10.147.34.126
+ start: 10.147.34.2
+ cidr: 10.147.34.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_170
+ network_id:
+ get_resource: network_5
+ type: OS::Neutron::Subnet
+ subnet_5:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.126
+ start: 10.147.33.2
+ cidr: 10.147.33.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_168
+ network_id:
+ get_resource: network_6
+ type: OS::Neutron::Subnet
+ subnet_6:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.126
+ start: 10.147.33.2
+ cidr: 10.147.33.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_168
+ network_id:
+ get_resource: network_3
+ type: OS::Neutron::Subnet
+ subnet_7:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.254
+ start: 10.147.33.130
+ cidr: 10.147.33.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_169
+ network_id:
+ get_resource: network_1
+ type: OS::Neutron::Subnet
+ subnet_8:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.254
+ start: 10.147.33.130
+ cidr: 10.147.33.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_169
+ network_id:
+ get_resource: network_4
+ type: OS::Neutron::Subnet
+ subnet_9:
+ properties:
+ allocation_pools:
+ - end: 10.147.34.126
+ start: 10.147.34.2
+ cidr: 10.147.34.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_170
+ network_id:
+ get_resource: network_7
+ type: OS::Neutron::Subnet
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/validHeat.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/validHeat.yaml
new file mode 100644
index 0000000000..d5608abfb4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_duplicate_key/input/validHeat.yaml
@@ -0,0 +1,250 @@
+### Heat Template ###
+description: Generated template
+heat_template_version: 2013-05-23
+parameters: {}
+resources:
+ network_0:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ network_1:
+ properties:
+ admin_state_up: true
+ name: NET_169
+ shared: true
+ type: OS::Neutron::Net
+ network_2:
+ properties:
+ admin_state_up: true
+ name: NET_166
+ shared: true
+ type: OS::Neutron::Net
+ network_3:
+ properties:
+ admin_state_up: true
+ name: NET_168
+ shared: true
+ type: OS::Neutron::Net
+ network_4:
+ properties:
+ admin_state_up: true
+ name: NET_169
+ shared: true
+ type: OS::Neutron::Net
+ network_5:
+ properties:
+ admin_state_up: true
+ name: NET_170
+ shared: true
+ type: OS::Neutron::Net
+ network_6:
+ properties:
+ admin_state_up: true
+ name: NET_168
+ shared: true
+ type: OS::Neutron::Net
+ network_7:
+ properties:
+ admin_state_up: true
+ name: NET_170
+ shared: true
+ type: OS::Neutron::Net
+ network_8:
+ properties:
+ admin_state_up: true
+ name: NET_166
+ shared: true
+ type: OS::Neutron::Net
+ network_9:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ security_group_0:
+ properties:
+ description: Default security group
+ name: _default
+ rules:
+ - direction: ingress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ - direction: egress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ type: OS::Neutron::SecurityGroup
+ security_group_1:
+ properties:
+ description: Default security group
+ name: _default
+ rules:
+ - direction: egress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ - direction: ingress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ type: OS::Neutron::SecurityGroup
+ subnet_0:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.254
+ start: 10.147.32.130
+ cidr: 10.147.32.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_167
+ network_id:
+ get_resource: network_9
+ type: OS::Neutron::Subnet
+ subnet_1:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.254
+ start: 10.147.32.130
+ cidr: 10.147.32.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_167
+ network_id:
+ get_resource: network_0
+ type: OS::Neutron::Subnet
+ subnet_2:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.126
+ start: 10.147.32.2
+ cidr: 10.147.32.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_166
+ network_id:
+ get_resource: network_8
+ type: OS::Neutron::Subnet
+ subnet_3:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.126
+ start: 10.147.32.2
+ cidr: 10.147.32.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_166
+ network_id:
+ get_resource: network_2
+ type: OS::Neutron::Subnet
+ subnet_4:
+ properties:
+ allocation_pools:
+ - end: 10.147.34.126
+ start: 10.147.34.2
+ cidr: 10.147.34.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_170
+ network_id:
+ get_resource: network_5
+ type: OS::Neutron::Subnet
+ subnet_5:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.126
+ start: 10.147.33.2
+ cidr: 10.147.33.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_168
+ network_id:
+ get_resource: network_6
+ type: OS::Neutron::Subnet
+ subnet_6:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.126
+ start: 10.147.33.2
+ cidr: 10.147.33.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_168
+ network_id:
+ get_resource: network_3
+ type: OS::Neutron::Subnet
+ subnet_7:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.254
+ start: 10.147.33.130
+ cidr: 10.147.33.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_169
+ network_id:
+ get_resource: network_1
+ type: OS::Neutron::Subnet
+ subnet_8:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.254
+ start: 10.147.33.130
+ cidr: 10.147.33.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_169
+ network_id:
+ get_resource: network_4
+ type: OS::Neutron::Subnet
+ subnet_9:
+ properties:
+ allocation_pools:
+ - end: 10.147.34.126
+ start: 10.147.34.2
+ cidr: 10.147.34.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_170
+ network_id:
+ get_resource: network_7
+ type: OS::Neutron::Subnet
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/expected_output/expected_output.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/expected_output/expected_output.json
new file mode 100644
index 0000000000..dedbeaf5db
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/expected_output/expected_output.json
@@ -0,0 +1,46 @@
+{
+ "invalid_duplicateKey.yaml": {
+ "errorMessageList": [
+ {
+ "level": "ERROR",
+ "message": "Can\u0027t construct a java object for tag:yaml.org,2002:java.util.Map; exception\u003dwhile parsing MappingNode\n in \u0027string\u0027, line 6, column 3:\n network_0:\n ^\nduplicate key: network_0\n in \u0027string\u0027, line 26, column 1:\n \n ^\n\n in \u0027string\u0027, line 2, column 1:\n description: Generated template\n ^\n"
+ }
+ ]
+ },
+ "invalid_empty.yml": {
+ "errorMessageList": [
+ {
+ "level": "ERROR",
+ "message": "File:invalid_empty.yml is empty."
+ }
+ ]
+ },
+ "MANIFEST.json": {
+ "errorMessageList": []
+ },
+ "invalid_yamlInXMLFormat.yaml": {
+ "errorMessageList": [
+ {
+ "level": "ERROR",
+ "message": "Can\u0027t construct a java object for tag:yaml.org,2002:java.util.Map; exception\u003dNo single argument constructor found for interface java.util.Map\n in \u0027string\u0027, line 1, column 1:\n \u003cstart\u003e\n ^\n"
+ }
+ ]
+ },
+ "expected_output.json": {
+ "errorMessageList": []
+ },
+ "invalid_additionalSpaceBeforeProperty.yaml": {
+ "errorMessageList": [
+ {
+ "level": "ERROR",
+ "message": "while parsing a block mapping\n in \u0027string\u0027, line 7, column 5:\n properties:\n ^\nexpected \u003cblock end\u003e, but found BlockMappingStart\n in \u0027string\u0027, line 9, column 7:\n name: NET_167\n ^\n"
+ }
+ ]
+ },
+ "validHeat.yaml": {
+ "errorMessageList": []
+ },
+ "heat_missing_from_manifast.yaml": {
+ "errorMessageList": []
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/MANIFEST.json
new file mode 100644
index 0000000000..a4065d0b68
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/MANIFEST.json
@@ -0,0 +1,39 @@
+{
+ "data": [
+ {
+ "file": "validHeat.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-oam_v1.0.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "hot-nimbus-oam-volumes_v1.0",
+ "type": "HEAT_VOL",
+ "data": [{
+ "file": "hot-nimbus-oam-volumes_v1.0.env",
+ "type": "HEAT_ENV"
+ }]
+ }
+ ]
+ },
+ {
+ "file": "mainValid.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-oam-networks_v1.0",
+ "type": "HEAT_NET"
+ }
+ ]
+ },
+ {
+ "file": "missingHeatFromZip.yaml.yaml",
+ "type": "HEAT"
+ }
+ ],
+ "description": "RXAEmleoRDWLeWVvmXUJxDKCItgjkMEXuKJcUWyVUZrCUiMzZSyHPzhqLcJSIUNBzohsIGXLBIwstuVDEuFtxuLIwWgCCdjprtvzruHIUKdVnCyifJQUJjqSCoKKKyVaWFTFKzHNhTZNlZTYaMKGEpIMXOpIxSyTZZCgVsGkItQelBbFVrmCltTgkuppYMrEfvwqNBLVRSGCucNwliWFZUuXloXBiZaqtodZjyFpqBNqhlpcrARmMpvLiz",
+ "name": "FCTRQGcMevNngRDvECQYfiEXCYbGeAWRHdaGggLUgyOnssHAiU",
+ "version": "2013-05-23"
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/heat_missing_from_manifast.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/heat_missing_from_manifast.yaml
new file mode 100644
index 0000000000..d5608abfb4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/heat_missing_from_manifast.yaml
@@ -0,0 +1,250 @@
+### Heat Template ###
+description: Generated template
+heat_template_version: 2013-05-23
+parameters: {}
+resources:
+ network_0:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ network_1:
+ properties:
+ admin_state_up: true
+ name: NET_169
+ shared: true
+ type: OS::Neutron::Net
+ network_2:
+ properties:
+ admin_state_up: true
+ name: NET_166
+ shared: true
+ type: OS::Neutron::Net
+ network_3:
+ properties:
+ admin_state_up: true
+ name: NET_168
+ shared: true
+ type: OS::Neutron::Net
+ network_4:
+ properties:
+ admin_state_up: true
+ name: NET_169
+ shared: true
+ type: OS::Neutron::Net
+ network_5:
+ properties:
+ admin_state_up: true
+ name: NET_170
+ shared: true
+ type: OS::Neutron::Net
+ network_6:
+ properties:
+ admin_state_up: true
+ name: NET_168
+ shared: true
+ type: OS::Neutron::Net
+ network_7:
+ properties:
+ admin_state_up: true
+ name: NET_170
+ shared: true
+ type: OS::Neutron::Net
+ network_8:
+ properties:
+ admin_state_up: true
+ name: NET_166
+ shared: true
+ type: OS::Neutron::Net
+ network_9:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ security_group_0:
+ properties:
+ description: Default security group
+ name: _default
+ rules:
+ - direction: ingress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ - direction: egress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ type: OS::Neutron::SecurityGroup
+ security_group_1:
+ properties:
+ description: Default security group
+ name: _default
+ rules:
+ - direction: egress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ - direction: ingress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ type: OS::Neutron::SecurityGroup
+ subnet_0:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.254
+ start: 10.147.32.130
+ cidr: 10.147.32.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_167
+ network_id:
+ get_resource: network_9
+ type: OS::Neutron::Subnet
+ subnet_1:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.254
+ start: 10.147.32.130
+ cidr: 10.147.32.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_167
+ network_id:
+ get_resource: network_0
+ type: OS::Neutron::Subnet
+ subnet_2:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.126
+ start: 10.147.32.2
+ cidr: 10.147.32.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_166
+ network_id:
+ get_resource: network_8
+ type: OS::Neutron::Subnet
+ subnet_3:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.126
+ start: 10.147.32.2
+ cidr: 10.147.32.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_166
+ network_id:
+ get_resource: network_2
+ type: OS::Neutron::Subnet
+ subnet_4:
+ properties:
+ allocation_pools:
+ - end: 10.147.34.126
+ start: 10.147.34.2
+ cidr: 10.147.34.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_170
+ network_id:
+ get_resource: network_5
+ type: OS::Neutron::Subnet
+ subnet_5:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.126
+ start: 10.147.33.2
+ cidr: 10.147.33.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_168
+ network_id:
+ get_resource: network_6
+ type: OS::Neutron::Subnet
+ subnet_6:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.126
+ start: 10.147.33.2
+ cidr: 10.147.33.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_168
+ network_id:
+ get_resource: network_3
+ type: OS::Neutron::Subnet
+ subnet_7:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.254
+ start: 10.147.33.130
+ cidr: 10.147.33.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_169
+ network_id:
+ get_resource: network_1
+ type: OS::Neutron::Subnet
+ subnet_8:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.254
+ start: 10.147.33.130
+ cidr: 10.147.33.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_169
+ network_id:
+ get_resource: network_4
+ type: OS::Neutron::Subnet
+ subnet_9:
+ properties:
+ allocation_pools:
+ - end: 10.147.34.126
+ start: 10.147.34.2
+ cidr: 10.147.34.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_170
+ network_id:
+ get_resource: network_7
+ type: OS::Neutron::Subnet
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalidYamlTab.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalidYamlTab.yaml
new file mode 100644
index 0000000000..042f301507
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalidYamlTab.yaml
@@ -0,0 +1,250 @@
+### Heat Template ###
+description: Generated template
+heat_template_version: 2013-05-23
+parameters: {}
+resources:
+ network_0:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ network_1:
+ properties:
+ admin_state_up: true
+ name: NET_169
+ shared: true
+ type: OS::Neutron::Net
+ network_2:
+ properties:
+ admin_state_up: true
+ name: NET_166
+ shared: true
+ type: OS::Neutron::Net
+ network_3:
+ properties:
+ admin_state_up: true
+ name: NET_168
+ shared: true
+ type: OS::Neutron::Net
+ network_4:
+ properties:
+ admin_state_up: true
+ name: NET_169
+ shared: true
+ type: OS::Neutron::Net
+ network_5:
+ properties:
+ admin_state_up: true
+ name: NET_170
+ shared: true
+ type: OS::Neutron::Net
+ network_6:
+ properties:
+ admin_state_up: true
+ name: NET_168
+ shared: true
+ type: OS::Neutron::Net
+ network_7:
+ properties:
+ admin_state_up: true
+ name: NET_170
+ shared: true
+ type: OS::Neutron::Net
+ network_8:
+ properties:
+ admin_state_up: true
+ name: NET_166
+ shared: true
+ type: OS::Neutron::Net
+ network_9:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ security_group_0:
+ properties:
+ description: Default security group
+ name: _default
+ rules:
+ - direction: ingress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ - direction: egress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ type: OS::Neutron::SecurityGroup
+ security_group_1:
+ properties:
+ description: Default security group
+ name: _default
+ rules:
+ - direction: egress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ - direction: ingress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ type: OS::Neutron::SecurityGroup
+ subnet_0:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.254
+ start: 10.147.32.130
+ cidr: 10.147.32.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_167
+ network_id:
+ get_resource: network_9
+ type: OS::Neutron::Subnet
+ subnet_1:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.254
+ start: 10.147.32.130
+ cidr: 10.147.32.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_167
+ network_id:
+ get_resource: network_0
+ type: OS::Neutron::Subnet
+ subnet_2:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.126
+ start: 10.147.32.2
+ cidr: 10.147.32.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_166
+ network_id:
+ get_resource: network_8
+ type: OS::Neutron::Subnet
+ subnet_3:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.126
+ start: 10.147.32.2
+ cidr: 10.147.32.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_166
+ network_id:
+ get_resource: network_2
+ type: OS::Neutron::Subnet
+ subnet_4:
+ properties:
+ allocation_pools:
+ - end: 10.147.34.126
+ start: 10.147.34.2
+ cidr: 10.147.34.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_170
+ network_id:
+ get_resource: network_5
+ type: OS::Neutron::Subnet
+ subnet_5:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.126
+ start: 10.147.33.2
+ cidr: 10.147.33.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_168
+ network_id:
+ get_resource: network_6
+ type: OS::Neutron::Subnet
+ subnet_6:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.126
+ start: 10.147.33.2
+ cidr: 10.147.33.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_168
+ network_id:
+ get_resource: network_3
+ type: OS::Neutron::Subnet
+ subnet_7:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.254
+ start: 10.147.33.130
+ cidr: 10.147.33.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_169
+ network_id:
+ get_resource: network_1
+ type: OS::Neutron::Subnet
+ subnet_8:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.254
+ start: 10.147.33.130
+ cidr: 10.147.33.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_169
+ network_id:
+ get_resource: network_4
+ type: OS::Neutron::Subnet
+ subnet_9:
+ properties:
+ allocation_pools:
+ - end: 10.147.34.126
+ start: 10.147.34.2
+ cidr: 10.147.34.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_170
+ network_id:
+ get_resource: network_7
+ type: OS::Neutron::Subnet
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_additionalSpaceBeforeProperty.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_additionalSpaceBeforeProperty.yaml
new file mode 100644
index 0000000000..b47d7d32f4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_additionalSpaceBeforeProperty.yaml
@@ -0,0 +1,250 @@
+### Heat Template ###
+description: Generated template
+heat_template_version: 2013-05-23
+parameters: {}
+resources:
+ network_0:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ network_1:
+ properties:
+ admin_state_up: true
+ name: NET_169
+ shared: true
+ type: OS::Neutron::Net
+ network_2:
+ properties:
+ admin_state_up: true
+ name: NET_166
+ shared: true
+ type: OS::Neutron::Net
+ network_3:
+ properties:
+ admin_state_up: true
+ name: NET_168
+ shared: true
+ type: missingNested.yaml
+ network_4:
+ properties:
+ admin_state_up: true
+ name: { get_file: missing-artifact }
+ shared: true
+ type: OS::Neutron::Net
+ network_5:
+ properties:
+ admin_state_up: true
+ name: NET_170
+ shared: true
+ type: OS::Neutron::Net
+ network_6:
+ properties:
+ admin_state_up: true
+ name: NET_168
+ shared: true
+ type: OS::Neutron::Net
+ network_7:
+ properties:
+ admin_state_up: true
+ name: NET_170
+ shared: true
+ type: OS::Neutron::Net
+ network_8:
+ properties:
+ admin_state_up: true
+ name: NET_166
+ shared: true
+ type: OS::Neutron::Net
+ network_9:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ security_group_0:
+ properties:
+ description: Default security group
+ name: _default
+ rules:
+ - direction: ingress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ - direction: egress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ type: OS::Neutron::SecurityGroup
+ security_group_1:
+ properties:
+ description: Default security group
+ name: _default
+ rules:
+ - direction: egress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ - direction: ingress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ type: OS::Neutron::SecurityGroup
+ subnet_0:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.254
+ start: 10.147.32.130
+ cidr: 10.147.32.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_167
+ network_id:
+ get_resource: network_9
+ type: OS::Neutron::Subnet
+ subnet_1:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.254
+ start: 10.147.32.130
+ cidr: 10.147.32.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_167
+ network_id:
+ get_resource: network_0
+ type: OS::Neutron::Subnet
+ subnet_2:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.126
+ start: 10.147.32.2
+ cidr: 10.147.32.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_166
+ network_id:
+ get_resource: network_8
+ type: OS::Neutron::Subnet
+ subnet_3:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.126
+ start: 10.147.32.2
+ cidr: 10.147.32.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_166
+ network_id:
+ get_resource: network_2
+ type: OS::Neutron::Subnet
+ subnet_4:
+ properties:
+ allocation_pools:
+ - end: 10.147.34.126
+ start: 10.147.34.2
+ cidr: 10.147.34.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_170
+ network_id:
+ get_resource: network_5
+ type: OS::Neutron::Subnet
+ subnet_5:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.126
+ start: 10.147.33.2
+ cidr: 10.147.33.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_168
+ network_id:
+ get_resource: network_6
+ type: OS::Neutron::Subnet
+ subnet_6:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.126
+ start: 10.147.33.2
+ cidr: 10.147.33.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_168
+ network_id:
+ get_resource: network_3
+ type: OS::Neutron::Subnet
+ subnet_7:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.254
+ start: 10.147.33.130
+ cidr: 10.147.33.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_169
+ network_id:
+ get_resource: network_1
+ type: OS::Neutron::Subnet
+ subnet_8:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.254
+ start: 10.147.33.130
+ cidr: 10.147.33.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_169
+ network_id:
+ get_resource: network_4
+ type: OS::Neutron::Subnet
+ subnet_9:
+ properties:
+ allocation_pools:
+ - end: 10.147.34.126
+ start: 10.147.34.2
+ cidr: 10.147.34.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_170
+ network_id:
+ get_resource: network_7
+ type: OS::Neutron::Subnet
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_duplicateKey.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_duplicateKey.yaml
new file mode 100644
index 0000000000..2dc0c63941
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_duplicateKey.yaml
@@ -0,0 +1,25 @@
+### Heat Template ###
+description: Generated template
+heat_template_version: 2013-05-23
+parameters: {}
+resources:
+ network_0:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ network_0:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ network_1:
+ properties:
+ admin_state_up: true
+ name: NET_169
+ shared: true
+ type: OS::Neutron::Net
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_empty.yml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_empty.yml
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_empty.yml
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_yamlInXMLFormat.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_yamlInXMLFormat.yaml
new file mode 100644
index 0000000000..54626a9d62
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/invalid_yamlInXMLFormat.yaml
@@ -0,0 +1,4 @@
+<start>
+ <additional>dfdf
+ </additional>
+</start> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/validHeat.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/validHeat.yaml
new file mode 100644
index 0000000000..d5608abfb4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/invalid_valid_yaml_structure/input/validHeat.yaml
@@ -0,0 +1,250 @@
+### Heat Template ###
+description: Generated template
+heat_template_version: 2013-05-23
+parameters: {}
+resources:
+ network_0:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ network_1:
+ properties:
+ admin_state_up: true
+ name: NET_169
+ shared: true
+ type: OS::Neutron::Net
+ network_2:
+ properties:
+ admin_state_up: true
+ name: NET_166
+ shared: true
+ type: OS::Neutron::Net
+ network_3:
+ properties:
+ admin_state_up: true
+ name: NET_168
+ shared: true
+ type: OS::Neutron::Net
+ network_4:
+ properties:
+ admin_state_up: true
+ name: NET_169
+ shared: true
+ type: OS::Neutron::Net
+ network_5:
+ properties:
+ admin_state_up: true
+ name: NET_170
+ shared: true
+ type: OS::Neutron::Net
+ network_6:
+ properties:
+ admin_state_up: true
+ name: NET_168
+ shared: true
+ type: OS::Neutron::Net
+ network_7:
+ properties:
+ admin_state_up: true
+ name: NET_170
+ shared: true
+ type: OS::Neutron::Net
+ network_8:
+ properties:
+ admin_state_up: true
+ name: NET_166
+ shared: true
+ type: OS::Neutron::Net
+ network_9:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ security_group_0:
+ properties:
+ description: Default security group
+ name: _default
+ rules:
+ - direction: ingress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ - direction: egress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ type: OS::Neutron::SecurityGroup
+ security_group_1:
+ properties:
+ description: Default security group
+ name: _default
+ rules:
+ - direction: egress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ - direction: ingress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ type: OS::Neutron::SecurityGroup
+ subnet_0:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.254
+ start: 10.147.32.130
+ cidr: 10.147.32.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_167
+ network_id:
+ get_resource: network_9
+ type: OS::Neutron::Subnet
+ subnet_1:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.254
+ start: 10.147.32.130
+ cidr: 10.147.32.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_167
+ network_id:
+ get_resource: network_0
+ type: OS::Neutron::Subnet
+ subnet_2:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.126
+ start: 10.147.32.2
+ cidr: 10.147.32.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_166
+ network_id:
+ get_resource: network_8
+ type: OS::Neutron::Subnet
+ subnet_3:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.126
+ start: 10.147.32.2
+ cidr: 10.147.32.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_166
+ network_id:
+ get_resource: network_2
+ type: OS::Neutron::Subnet
+ subnet_4:
+ properties:
+ allocation_pools:
+ - end: 10.147.34.126
+ start: 10.147.34.2
+ cidr: 10.147.34.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_170
+ network_id:
+ get_resource: network_5
+ type: OS::Neutron::Subnet
+ subnet_5:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.126
+ start: 10.147.33.2
+ cidr: 10.147.33.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_168
+ network_id:
+ get_resource: network_6
+ type: OS::Neutron::Subnet
+ subnet_6:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.126
+ start: 10.147.33.2
+ cidr: 10.147.33.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_168
+ network_id:
+ get_resource: network_3
+ type: OS::Neutron::Subnet
+ subnet_7:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.254
+ start: 10.147.33.130
+ cidr: 10.147.33.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_169
+ network_id:
+ get_resource: network_1
+ type: OS::Neutron::Subnet
+ subnet_8:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.254
+ start: 10.147.33.130
+ cidr: 10.147.33.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_169
+ network_id:
+ get_resource: network_4
+ type: OS::Neutron::Subnet
+ subnet_9:
+ properties:
+ allocation_pools:
+ - end: 10.147.34.126
+ start: 10.147.34.2
+ cidr: 10.147.34.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_170
+ network_id:
+ get_resource: network_7
+ type: OS::Neutron::Subnet
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/valid_yaml/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/valid_yaml/input/MANIFEST.json
new file mode 100644
index 0000000000..a4065d0b68
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/valid_yaml/input/MANIFEST.json
@@ -0,0 +1,39 @@
+{
+ "data": [
+ {
+ "file": "validHeat.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-oam_v1.0.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "hot-nimbus-oam-volumes_v1.0",
+ "type": "HEAT_VOL",
+ "data": [{
+ "file": "hot-nimbus-oam-volumes_v1.0.env",
+ "type": "HEAT_ENV"
+ }]
+ }
+ ]
+ },
+ {
+ "file": "mainValid.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-oam-networks_v1.0",
+ "type": "HEAT_NET"
+ }
+ ]
+ },
+ {
+ "file": "missingHeatFromZip.yaml.yaml",
+ "type": "HEAT"
+ }
+ ],
+ "description": "RXAEmleoRDWLeWVvmXUJxDKCItgjkMEXuKJcUWyVUZrCUiMzZSyHPzhqLcJSIUNBzohsIGXLBIwstuVDEuFtxuLIwWgCCdjprtvzruHIUKdVnCyifJQUJjqSCoKKKyVaWFTFKzHNhTZNlZTYaMKGEpIMXOpIxSyTZZCgVsGkItQelBbFVrmCltTgkuppYMrEfvwqNBLVRSGCucNwliWFZUuXloXBiZaqtodZjyFpqBNqhlpcrARmMpvLiz",
+ "name": "FCTRQGcMevNngRDvECQYfiEXCYbGeAWRHdaGggLUgyOnssHAiU",
+ "version": "2013-05-23"
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/valid_yaml/input/heat_missing_from_manifast.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/valid_yaml/input/heat_missing_from_manifast.yaml
new file mode 100644
index 0000000000..d5608abfb4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/valid_yaml/input/heat_missing_from_manifast.yaml
@@ -0,0 +1,250 @@
+### Heat Template ###
+description: Generated template
+heat_template_version: 2013-05-23
+parameters: {}
+resources:
+ network_0:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ network_1:
+ properties:
+ admin_state_up: true
+ name: NET_169
+ shared: true
+ type: OS::Neutron::Net
+ network_2:
+ properties:
+ admin_state_up: true
+ name: NET_166
+ shared: true
+ type: OS::Neutron::Net
+ network_3:
+ properties:
+ admin_state_up: true
+ name: NET_168
+ shared: true
+ type: OS::Neutron::Net
+ network_4:
+ properties:
+ admin_state_up: true
+ name: NET_169
+ shared: true
+ type: OS::Neutron::Net
+ network_5:
+ properties:
+ admin_state_up: true
+ name: NET_170
+ shared: true
+ type: OS::Neutron::Net
+ network_6:
+ properties:
+ admin_state_up: true
+ name: NET_168
+ shared: true
+ type: OS::Neutron::Net
+ network_7:
+ properties:
+ admin_state_up: true
+ name: NET_170
+ shared: true
+ type: OS::Neutron::Net
+ network_8:
+ properties:
+ admin_state_up: true
+ name: NET_166
+ shared: true
+ type: OS::Neutron::Net
+ network_9:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ security_group_0:
+ properties:
+ description: Default security group
+ name: _default
+ rules:
+ - direction: ingress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ - direction: egress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ type: OS::Neutron::SecurityGroup
+ security_group_1:
+ properties:
+ description: Default security group
+ name: _default
+ rules:
+ - direction: egress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ - direction: ingress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ type: OS::Neutron::SecurityGroup
+ subnet_0:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.254
+ start: 10.147.32.130
+ cidr: 10.147.32.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_167
+ network_id:
+ get_resource: network_9
+ type: OS::Neutron::Subnet
+ subnet_1:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.254
+ start: 10.147.32.130
+ cidr: 10.147.32.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_167
+ network_id:
+ get_resource: network_0
+ type: OS::Neutron::Subnet
+ subnet_2:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.126
+ start: 10.147.32.2
+ cidr: 10.147.32.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_166
+ network_id:
+ get_resource: network_8
+ type: OS::Neutron::Subnet
+ subnet_3:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.126
+ start: 10.147.32.2
+ cidr: 10.147.32.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_166
+ network_id:
+ get_resource: network_2
+ type: OS::Neutron::Subnet
+ subnet_4:
+ properties:
+ allocation_pools:
+ - end: 10.147.34.126
+ start: 10.147.34.2
+ cidr: 10.147.34.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_170
+ network_id:
+ get_resource: network_5
+ type: OS::Neutron::Subnet
+ subnet_5:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.126
+ start: 10.147.33.2
+ cidr: 10.147.33.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_168
+ network_id:
+ get_resource: network_6
+ type: OS::Neutron::Subnet
+ subnet_6:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.126
+ start: 10.147.33.2
+ cidr: 10.147.33.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_168
+ network_id:
+ get_resource: network_3
+ type: OS::Neutron::Subnet
+ subnet_7:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.254
+ start: 10.147.33.130
+ cidr: 10.147.33.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_169
+ network_id:
+ get_resource: network_1
+ type: OS::Neutron::Subnet
+ subnet_8:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.254
+ start: 10.147.33.130
+ cidr: 10.147.33.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_169
+ network_id:
+ get_resource: network_4
+ type: OS::Neutron::Subnet
+ subnet_9:
+ properties:
+ allocation_pools:
+ - end: 10.147.34.126
+ start: 10.147.34.2
+ cidr: 10.147.34.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_170
+ network_id:
+ get_resource: network_7
+ type: OS::Neutron::Subnet
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/valid_yaml/input/mainValid.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/valid_yaml/input/mainValid.yaml
new file mode 100644
index 0000000000..318c8f1283
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/valid_yaml/input/mainValid.yaml
@@ -0,0 +1,250 @@
+### Heat Template ###
+description: Generated template
+heat_template_version: 2013-05-23
+parameters: {}
+resources:
+ network_0:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ network_1:
+ properties:
+ admin_state_up: true
+ name: NET_169
+ shared: true
+ type: OS::Neutron::Net
+ network_2:
+ properties:
+ admin_state_up: true
+ name: NET_166
+ shared: true
+ type: OS::Neutron::Net
+ network_3:
+ properties:
+ admin_state_up: true
+ name: NET_168
+ shared: true
+ type: missingNested.yaml
+ network_4:
+ properties:
+ admin_state_up: true
+ name: { get_file: missing-artifact }
+ shared: true
+ type: OS::Neutron::Net
+ network_5:
+ properties:
+ admin_state_up: true
+ name: NET_170
+ shared: true
+ type: OS::Neutron::Net
+ network_6:
+ properties:
+ admin_state_up: true
+ name: NET_168
+ shared: true
+ type: OS::Neutron::Net
+ network_7:
+ properties:
+ admin_state_up: true
+ name: NET_170
+ shared: true
+ type: OS::Neutron::Net
+ network_8:
+ properties:
+ admin_state_up: true
+ name: NET_166
+ shared: true
+ type: OS::Neutron::Net
+ network_9:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ security_group_0:
+ properties:
+ description: Default security group
+ name: _default
+ rules:
+ - direction: ingress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ - direction: egress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ type: OS::Neutron::SecurityGroup
+ security_group_1:
+ properties:
+ description: Default security group
+ name: _default
+ rules:
+ - direction: egress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ - direction: ingress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ type: OS::Neutron::SecurityGroup
+ subnet_0:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.254
+ start: 10.147.32.130
+ cidr: 10.147.32.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_167
+ network_id:
+ get_resource: network_9
+ type: OS::Neutron::Subnet
+ subnet_1:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.254
+ start: 10.147.32.130
+ cidr: 10.147.32.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_167
+ network_id:
+ get_resource: network_0
+ type: OS::Neutron::Subnet
+ subnet_2:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.126
+ start: 10.147.32.2
+ cidr: 10.147.32.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_166
+ network_id:
+ get_resource: network_8
+ type: OS::Neutron::Subnet
+ subnet_3:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.126
+ start: 10.147.32.2
+ cidr: 10.147.32.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_166
+ network_id:
+ get_resource: network_2
+ type: OS::Neutron::Subnet
+ subnet_4:
+ properties:
+ allocation_pools:
+ - end: 10.147.34.126
+ start: 10.147.34.2
+ cidr: 10.147.34.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_170
+ network_id:
+ get_resource: network_5
+ type: OS::Neutron::Subnet
+ subnet_5:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.126
+ start: 10.147.33.2
+ cidr: 10.147.33.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_168
+ network_id:
+ get_resource: network_6
+ type: OS::Neutron::Subnet
+ subnet_6:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.126
+ start: 10.147.33.2
+ cidr: 10.147.33.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_168
+ network_id:
+ get_resource: network_3
+ type: OS::Neutron::Subnet
+ subnet_7:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.254
+ start: 10.147.33.130
+ cidr: 10.147.33.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_169
+ network_id:
+ get_resource: network_1
+ type: OS::Neutron::Subnet
+ subnet_8:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.254
+ start: 10.147.33.130
+ cidr: 10.147.33.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_169
+ network_id:
+ get_resource: network_4
+ type: OS::Neutron::Subnet
+ subnet_9:
+ properties:
+ allocation_pools:
+ - end: 10.147.34.126
+ start: 10.147.34.2
+ cidr: 10.147.34.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_170
+ network_id:
+ get_resource: network_7
+ type: OS::Neutron::Subnet
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/valid_yaml/input/validHeat.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/valid_yaml/input/validHeat.yaml
new file mode 100644
index 0000000000..d5608abfb4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/openecomp/org/validation/validators/yaml_validator/valid_yaml/input/validHeat.yaml
@@ -0,0 +1,250 @@
+### Heat Template ###
+description: Generated template
+heat_template_version: 2013-05-23
+parameters: {}
+resources:
+ network_0:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ network_1:
+ properties:
+ admin_state_up: true
+ name: NET_169
+ shared: true
+ type: OS::Neutron::Net
+ network_2:
+ properties:
+ admin_state_up: true
+ name: NET_166
+ shared: true
+ type: OS::Neutron::Net
+ network_3:
+ properties:
+ admin_state_up: true
+ name: NET_168
+ shared: true
+ type: OS::Neutron::Net
+ network_4:
+ properties:
+ admin_state_up: true
+ name: NET_169
+ shared: true
+ type: OS::Neutron::Net
+ network_5:
+ properties:
+ admin_state_up: true
+ name: NET_170
+ shared: true
+ type: OS::Neutron::Net
+ network_6:
+ properties:
+ admin_state_up: true
+ name: NET_168
+ shared: true
+ type: OS::Neutron::Net
+ network_7:
+ properties:
+ admin_state_up: true
+ name: NET_170
+ shared: true
+ type: OS::Neutron::Net
+ network_8:
+ properties:
+ admin_state_up: true
+ name: NET_166
+ shared: true
+ type: OS::Neutron::Net
+ network_9:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ security_group_0:
+ properties:
+ description: Default security group
+ name: _default
+ rules:
+ - direction: ingress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ - direction: egress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ type: OS::Neutron::SecurityGroup
+ security_group_1:
+ properties:
+ description: Default security group
+ name: _default
+ rules:
+ - direction: egress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ - direction: ingress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ type: OS::Neutron::SecurityGroup
+ subnet_0:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.254
+ start: 10.147.32.130
+ cidr: 10.147.32.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_167
+ network_id:
+ get_resource: network_9
+ type: OS::Neutron::Subnet
+ subnet_1:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.254
+ start: 10.147.32.130
+ cidr: 10.147.32.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_167
+ network_id:
+ get_resource: network_0
+ type: OS::Neutron::Subnet
+ subnet_2:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.126
+ start: 10.147.32.2
+ cidr: 10.147.32.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_166
+ network_id:
+ get_resource: network_8
+ type: OS::Neutron::Subnet
+ subnet_3:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.126
+ start: 10.147.32.2
+ cidr: 10.147.32.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_166
+ network_id:
+ get_resource: network_2
+ type: OS::Neutron::Subnet
+ subnet_4:
+ properties:
+ allocation_pools:
+ - end: 10.147.34.126
+ start: 10.147.34.2
+ cidr: 10.147.34.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_170
+ network_id:
+ get_resource: network_5
+ type: OS::Neutron::Subnet
+ subnet_5:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.126
+ start: 10.147.33.2
+ cidr: 10.147.33.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_168
+ network_id:
+ get_resource: network_6
+ type: OS::Neutron::Subnet
+ subnet_6:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.126
+ start: 10.147.33.2
+ cidr: 10.147.33.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_168
+ network_id:
+ get_resource: network_3
+ type: OS::Neutron::Subnet
+ subnet_7:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.254
+ start: 10.147.33.130
+ cidr: 10.147.33.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_169
+ network_id:
+ get_resource: network_1
+ type: OS::Neutron::Subnet
+ subnet_8:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.254
+ start: 10.147.33.130
+ cidr: 10.147.33.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_169
+ network_id:
+ get_resource: network_4
+ type: OS::Neutron::Subnet
+ subnet_9:
+ properties:
+ allocation_pools:
+ - end: 10.147.34.126
+ start: 10.147.34.2
+ cidr: 10.147.34.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_170
+ network_id:
+ get_resource: network_7
+ type: OS::Neutron::Subnet
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/input/MANIFEST.json
new file mode 100644
index 0000000000..a4065d0b68
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/input/MANIFEST.json
@@ -0,0 +1,39 @@
+{
+ "data": [
+ {
+ "file": "validHeat.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-oam_v1.0.env",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "hot-nimbus-oam-volumes_v1.0",
+ "type": "HEAT_VOL",
+ "data": [{
+ "file": "hot-nimbus-oam-volumes_v1.0.env",
+ "type": "HEAT_ENV"
+ }]
+ }
+ ]
+ },
+ {
+ "file": "mainValid.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-oam-networks_v1.0",
+ "type": "HEAT_NET"
+ }
+ ]
+ },
+ {
+ "file": "missingHeatFromZip.yaml.yaml",
+ "type": "HEAT"
+ }
+ ],
+ "description": "RXAEmleoRDWLeWVvmXUJxDKCItgjkMEXuKJcUWyVUZrCUiMzZSyHPzhqLcJSIUNBzohsIGXLBIwstuVDEuFtxuLIwWgCCdjprtvzruHIUKdVnCyifJQUJjqSCoKKKyVaWFTFKzHNhTZNlZTYaMKGEpIMXOpIxSyTZZCgVsGkItQelBbFVrmCltTgkuppYMrEfvwqNBLVRSGCucNwliWFZUuXloXBiZaqtodZjyFpqBNqhlpcrARmMpvLiz",
+ "name": "FCTRQGcMevNngRDvECQYfiEXCYbGeAWRHdaGggLUgyOnssHAiU",
+ "version": "2013-05-23"
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/input/heat_missing_from_manifast.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/input/heat_missing_from_manifast.yaml
new file mode 100644
index 0000000000..d5608abfb4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/input/heat_missing_from_manifast.yaml
@@ -0,0 +1,250 @@
+### Heat Template ###
+description: Generated template
+heat_template_version: 2013-05-23
+parameters: {}
+resources:
+ network_0:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ network_1:
+ properties:
+ admin_state_up: true
+ name: NET_169
+ shared: true
+ type: OS::Neutron::Net
+ network_2:
+ properties:
+ admin_state_up: true
+ name: NET_166
+ shared: true
+ type: OS::Neutron::Net
+ network_3:
+ properties:
+ admin_state_up: true
+ name: NET_168
+ shared: true
+ type: OS::Neutron::Net
+ network_4:
+ properties:
+ admin_state_up: true
+ name: NET_169
+ shared: true
+ type: OS::Neutron::Net
+ network_5:
+ properties:
+ admin_state_up: true
+ name: NET_170
+ shared: true
+ type: OS::Neutron::Net
+ network_6:
+ properties:
+ admin_state_up: true
+ name: NET_168
+ shared: true
+ type: OS::Neutron::Net
+ network_7:
+ properties:
+ admin_state_up: true
+ name: NET_170
+ shared: true
+ type: OS::Neutron::Net
+ network_8:
+ properties:
+ admin_state_up: true
+ name: NET_166
+ shared: true
+ type: OS::Neutron::Net
+ network_9:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ security_group_0:
+ properties:
+ description: Default security group
+ name: _default
+ rules:
+ - direction: ingress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ - direction: egress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ type: OS::Neutron::SecurityGroup
+ security_group_1:
+ properties:
+ description: Default security group
+ name: _default
+ rules:
+ - direction: egress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ - direction: ingress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ type: OS::Neutron::SecurityGroup
+ subnet_0:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.254
+ start: 10.147.32.130
+ cidr: 10.147.32.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_167
+ network_id:
+ get_resource: network_9
+ type: OS::Neutron::Subnet
+ subnet_1:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.254
+ start: 10.147.32.130
+ cidr: 10.147.32.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_167
+ network_id:
+ get_resource: network_0
+ type: OS::Neutron::Subnet
+ subnet_2:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.126
+ start: 10.147.32.2
+ cidr: 10.147.32.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_166
+ network_id:
+ get_resource: network_8
+ type: OS::Neutron::Subnet
+ subnet_3:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.126
+ start: 10.147.32.2
+ cidr: 10.147.32.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_166
+ network_id:
+ get_resource: network_2
+ type: OS::Neutron::Subnet
+ subnet_4:
+ properties:
+ allocation_pools:
+ - end: 10.147.34.126
+ start: 10.147.34.2
+ cidr: 10.147.34.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_170
+ network_id:
+ get_resource: network_5
+ type: OS::Neutron::Subnet
+ subnet_5:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.126
+ start: 10.147.33.2
+ cidr: 10.147.33.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_168
+ network_id:
+ get_resource: network_6
+ type: OS::Neutron::Subnet
+ subnet_6:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.126
+ start: 10.147.33.2
+ cidr: 10.147.33.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_168
+ network_id:
+ get_resource: network_3
+ type: OS::Neutron::Subnet
+ subnet_7:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.254
+ start: 10.147.33.130
+ cidr: 10.147.33.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_169
+ network_id:
+ get_resource: network_1
+ type: OS::Neutron::Subnet
+ subnet_8:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.254
+ start: 10.147.33.130
+ cidr: 10.147.33.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_169
+ network_id:
+ get_resource: network_4
+ type: OS::Neutron::Subnet
+ subnet_9:
+ properties:
+ allocation_pools:
+ - end: 10.147.34.126
+ start: 10.147.34.2
+ cidr: 10.147.34.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_170
+ network_id:
+ get_resource: network_7
+ type: OS::Neutron::Subnet
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/input/mainValid.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/input/mainValid.yaml
new file mode 100644
index 0000000000..318c8f1283
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/input/mainValid.yaml
@@ -0,0 +1,250 @@
+### Heat Template ###
+description: Generated template
+heat_template_version: 2013-05-23
+parameters: {}
+resources:
+ network_0:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ network_1:
+ properties:
+ admin_state_up: true
+ name: NET_169
+ shared: true
+ type: OS::Neutron::Net
+ network_2:
+ properties:
+ admin_state_up: true
+ name: NET_166
+ shared: true
+ type: OS::Neutron::Net
+ network_3:
+ properties:
+ admin_state_up: true
+ name: NET_168
+ shared: true
+ type: missingNested.yaml
+ network_4:
+ properties:
+ admin_state_up: true
+ name: { get_file: missing-artifact }
+ shared: true
+ type: OS::Neutron::Net
+ network_5:
+ properties:
+ admin_state_up: true
+ name: NET_170
+ shared: true
+ type: OS::Neutron::Net
+ network_6:
+ properties:
+ admin_state_up: true
+ name: NET_168
+ shared: true
+ type: OS::Neutron::Net
+ network_7:
+ properties:
+ admin_state_up: true
+ name: NET_170
+ shared: true
+ type: OS::Neutron::Net
+ network_8:
+ properties:
+ admin_state_up: true
+ name: NET_166
+ shared: true
+ type: OS::Neutron::Net
+ network_9:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ security_group_0:
+ properties:
+ description: Default security group
+ name: _default
+ rules:
+ - direction: ingress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ - direction: egress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ type: OS::Neutron::SecurityGroup
+ security_group_1:
+ properties:
+ description: Default security group
+ name: _default
+ rules:
+ - direction: egress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ - direction: ingress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ type: OS::Neutron::SecurityGroup
+ subnet_0:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.254
+ start: 10.147.32.130
+ cidr: 10.147.32.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_167
+ network_id:
+ get_resource: network_9
+ type: OS::Neutron::Subnet
+ subnet_1:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.254
+ start: 10.147.32.130
+ cidr: 10.147.32.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_167
+ network_id:
+ get_resource: network_0
+ type: OS::Neutron::Subnet
+ subnet_2:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.126
+ start: 10.147.32.2
+ cidr: 10.147.32.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_166
+ network_id:
+ get_resource: network_8
+ type: OS::Neutron::Subnet
+ subnet_3:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.126
+ start: 10.147.32.2
+ cidr: 10.147.32.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_166
+ network_id:
+ get_resource: network_2
+ type: OS::Neutron::Subnet
+ subnet_4:
+ properties:
+ allocation_pools:
+ - end: 10.147.34.126
+ start: 10.147.34.2
+ cidr: 10.147.34.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_170
+ network_id:
+ get_resource: network_5
+ type: OS::Neutron::Subnet
+ subnet_5:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.126
+ start: 10.147.33.2
+ cidr: 10.147.33.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_168
+ network_id:
+ get_resource: network_6
+ type: OS::Neutron::Subnet
+ subnet_6:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.126
+ start: 10.147.33.2
+ cidr: 10.147.33.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_168
+ network_id:
+ get_resource: network_3
+ type: OS::Neutron::Subnet
+ subnet_7:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.254
+ start: 10.147.33.130
+ cidr: 10.147.33.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_169
+ network_id:
+ get_resource: network_1
+ type: OS::Neutron::Subnet
+ subnet_8:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.254
+ start: 10.147.33.130
+ cidr: 10.147.33.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_169
+ network_id:
+ get_resource: network_4
+ type: OS::Neutron::Subnet
+ subnet_9:
+ properties:
+ allocation_pools:
+ - end: 10.147.34.126
+ start: 10.147.34.2
+ cidr: 10.147.34.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_170
+ network_id:
+ get_resource: network_7
+ type: OS::Neutron::Subnet
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/input/validHeat.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/input/validHeat.yaml
new file mode 100644
index 0000000000..d5608abfb4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/yaml_validator/input/validHeat.yaml
@@ -0,0 +1,250 @@
+### Heat Template ###
+description: Generated template
+heat_template_version: 2013-05-23
+parameters: {}
+resources:
+ network_0:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ network_1:
+ properties:
+ admin_state_up: true
+ name: NET_169
+ shared: true
+ type: OS::Neutron::Net
+ network_2:
+ properties:
+ admin_state_up: true
+ name: NET_166
+ shared: true
+ type: OS::Neutron::Net
+ network_3:
+ properties:
+ admin_state_up: true
+ name: NET_168
+ shared: true
+ type: OS::Neutron::Net
+ network_4:
+ properties:
+ admin_state_up: true
+ name: NET_169
+ shared: true
+ type: OS::Neutron::Net
+ network_5:
+ properties:
+ admin_state_up: true
+ name: NET_170
+ shared: true
+ type: OS::Neutron::Net
+ network_6:
+ properties:
+ admin_state_up: true
+ name: NET_168
+ shared: true
+ type: OS::Neutron::Net
+ network_7:
+ properties:
+ admin_state_up: true
+ name: NET_170
+ shared: true
+ type: OS::Neutron::Net
+ network_8:
+ properties:
+ admin_state_up: true
+ name: NET_166
+ shared: true
+ type: OS::Neutron::Net
+ network_9:
+ properties:
+ admin_state_up: true
+ name: NET_167
+ shared: true
+ type: OS::Neutron::Net
+ security_group_0:
+ properties:
+ description: Default security group
+ name: _default
+ rules:
+ - direction: ingress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ - direction: egress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ type: OS::Neutron::SecurityGroup
+ security_group_1:
+ properties:
+ description: Default security group
+ name: _default
+ rules:
+ - direction: egress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ - direction: ingress
+ ethertype: IPv4
+ remote_ip_prefix: 0.0.0.0/0
+ type: OS::Neutron::SecurityGroup
+ subnet_0:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.254
+ start: 10.147.32.130
+ cidr: 10.147.32.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_167
+ network_id:
+ get_resource: network_9
+ type: OS::Neutron::Subnet
+ subnet_1:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.254
+ start: 10.147.32.130
+ cidr: 10.147.32.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_167
+ network_id:
+ get_resource: network_0
+ type: OS::Neutron::Subnet
+ subnet_2:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.126
+ start: 10.147.32.2
+ cidr: 10.147.32.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_166
+ network_id:
+ get_resource: network_8
+ type: OS::Neutron::Subnet
+ subnet_3:
+ properties:
+ allocation_pools:
+ - end: 10.147.32.126
+ start: 10.147.32.2
+ cidr: 10.147.32.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_166
+ network_id:
+ get_resource: network_2
+ type: OS::Neutron::Subnet
+ subnet_4:
+ properties:
+ allocation_pools:
+ - end: 10.147.34.126
+ start: 10.147.34.2
+ cidr: 10.147.34.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_170
+ network_id:
+ get_resource: network_5
+ type: OS::Neutron::Subnet
+ subnet_5:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.126
+ start: 10.147.33.2
+ cidr: 10.147.33.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_168
+ network_id:
+ get_resource: network_6
+ type: OS::Neutron::Subnet
+ subnet_6:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.126
+ start: 10.147.33.2
+ cidr: 10.147.33.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_168
+ network_id:
+ get_resource: network_3
+ type: OS::Neutron::Subnet
+ subnet_7:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.254
+ start: 10.147.33.130
+ cidr: 10.147.33.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_169
+ network_id:
+ get_resource: network_1
+ type: OS::Neutron::Subnet
+ subnet_8:
+ properties:
+ allocation_pools:
+ - end: 10.147.33.254
+ start: 10.147.33.130
+ cidr: 10.147.33.128/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_169
+ network_id:
+ get_resource: network_4
+ type: OS::Neutron::Subnet
+ subnet_9:
+ properties:
+ allocation_pools:
+ - end: 10.147.34.126
+ start: 10.147.34.2
+ cidr: 10.147.34.0/25
+ dns_nameservers:
+ - 10.147.4.18
+ - 10.247.5.11
+ enable_dhcp: true
+ host_routes: []
+ ip_version: 4
+ name: NET_170
+ network_id:
+ get_resource: network_7
+ type: OS::Neutron::Subnet
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/pom.xml b/openecomp-be/lib/openecomp-sdc-validation-lib/pom.xml
new file mode 100644
index 0000000000..a132a618a8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/pom.xml
@@ -0,0 +1,38 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <groupId>org.openecomp.sdc</groupId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <name>openecomp-sdc-validation-lib</name>
+ <artifactId>openecomp-sdc-validation-lib</artifactId>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>openecomp-sdc-validation-api</module>
+ <module>openecomp-sdc-validation-core</module>
+ <module>openecomp-sdc-validation-impl</module>
+ </modules>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-validation-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-validation-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <!--dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-validation-impl</artifactId>
+ <version>${project.version}</version>
+ </dependency-->
+ </dependencies>
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/pom.xml b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/pom.xml
new file mode 100644
index 0000000000..1cb542eba5
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/pom.xml
@@ -0,0 +1,57 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../..</relativePath>
+ </parent>
+
+ <name>openecomp-sdc-vendor-license-api</name>
+ <artifactId>openecomp-sdc-vendor-license-api</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-facade-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-versioning-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-nosqldb-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>javax.el-api</artifactId>
+ <version>${javax.el-api.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.web</groupId>
+ <artifactId>javax.el</artifactId>
+ <version>2.2.4</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-annotations</artifactId>
+ <version>2.7.4</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.dataformat</groupId>
+ <artifactId>jackson-dataformat-xml</artifactId>
+ <version>2.7.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>woodstox-core-asl</artifactId>
+ <version>4.4.1</version>
+ </dependency>
+ </dependencies>
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/HealingServiceFactory.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/HealingServiceFactory.java
new file mode 100644
index 0000000000..19d664247b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/HealingServiceFactory.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+import org.openecomp.sdc.vendorlicense.healing.HealingService;
+
+public abstract class HealingServiceFactory extends AbstractComponentFactory<HealingService> {
+
+ public static HealingServiceFactory getInstance() {
+ return AbstractFactory.getInstance(HealingServiceFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/VendorLicenseArtifactServiceFactory.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/VendorLicenseArtifactServiceFactory.java
new file mode 100644
index 0000000000..0ce7484aa7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/VendorLicenseArtifactServiceFactory.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+import org.openecomp.sdc.vendorlicense.licenseartifacts.VendorLicenseArtifactsService;
+
+public abstract class VendorLicenseArtifactServiceFactory
+ extends AbstractComponentFactory<VendorLicenseArtifactsService> {
+
+ public static VendorLicenseArtifactServiceFactory getInstance() {
+ return AbstractFactory.getInstance(VendorLicenseArtifactServiceFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/VendorLicenseConstants.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/VendorLicenseConstants.java
new file mode 100644
index 0000000000..2a1930d626
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/VendorLicenseConstants.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense;
+
+import java.io.File;
+
+public final class VendorLicenseConstants {
+ public static final String VENDOR_LICENSE_MODEL_VERSIONABLE_TYPE = "VendorLicenseModel";
+
+ public static final String EXTERNAL_ARTIFACTS_DIR = "Artifacts";
+ //todo change when separating external from internal artifacts
+ public static final String VNF_ARTIFACT_NAME_WITH_PATH =
+ EXTERNAL_ARTIFACTS_DIR + File.separator + "vf-license-model.xml";
+ public static final String VENDOR_LICENSE_MODEL_ARTIFACT_NAME_WITH_PATH =
+ EXTERNAL_ARTIFACTS_DIR + File.separator + "vendor-license-model.xml";
+ public static final String VENDOR_LICENSE_MODEL_ARTIFACT_REGEX_REMOVE = " xmlns=\"\"";
+
+ public final class UniqueValues {
+ public static final String VENDOR_NAME = "Vendor name";
+ public static final String LICENSE_AGREEMENT_NAME = "License Agreement name";
+ public static final String FEATURE_GROUP_NAME = "Feature Group name";
+ public static final String ENTITLEMENT_POOL_NAME = "Entitlement Pool name";
+ public static final String LICENSE_KEY_GROUP_NAME = "License Key Group name";
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/EntitlementPoolDao.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/EntitlementPoolDao.java
new file mode 100644
index 0000000000..c507e6946a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/EntitlementPoolDao.java
@@ -0,0 +1,38 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao;
+
+import org.openecomp.core.dao.BaseDao;
+import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
+import org.openecomp.sdc.versioning.dao.VersionableDao;
+
+public interface EntitlementPoolDao extends VersionableDao, BaseDao<EntitlementPoolEntity> {
+
+ long count(EntitlementPoolEntity entitlementPool);
+
+ void deleteAll(EntitlementPoolEntity entitlementPool);
+
+ void addReferencingFeatureGroup(EntitlementPoolEntity entitlementPool,
+ String referencingFeatureGroupId);
+
+ void removeReferencingFeatureGroup(EntitlementPoolEntity entitlementPool,
+ String referencingFeatureGroupId);
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/EntitlementPoolDaoFactory.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/EntitlementPoolDaoFactory.java
new file mode 100644
index 0000000000..e5bfcfa1cb
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/EntitlementPoolDaoFactory.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class EntitlementPoolDaoFactory
+ extends AbstractComponentFactory<EntitlementPoolDao> {
+ public static EntitlementPoolDaoFactory getInstance() {
+ return AbstractFactory.getInstance(EntitlementPoolDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/FeatureGroupDao.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/FeatureGroupDao.java
new file mode 100644
index 0000000000..a5db802861
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/FeatureGroupDao.java
@@ -0,0 +1,47 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao;
+
+import org.openecomp.core.dao.BaseDao;
+import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity;
+import org.openecomp.sdc.versioning.dao.VersionableDao;
+
+import java.util.Set;
+
+public interface FeatureGroupDao extends VersionableDao, BaseDao<FeatureGroupEntity> {
+
+ long count(FeatureGroupEntity featureGroup);
+
+ void deleteAll(FeatureGroupEntity featureGroup);
+
+ void updateFeatureGroup(FeatureGroupEntity entity, Set<String> addedEntitlementPools,
+ Set<String> removedEntitlementPools, Set<String> addedLicenseKeyGroups,
+ Set<String> removedLicenseKeyGroups);
+
+ void addReferencingLicenseAgreement(FeatureGroupEntity featureGroup, String licenseAgreementId);
+
+ void removeReferencingLicenseAgreement(FeatureGroupEntity featureGroup,
+ String licenseAgreementId);
+
+ void removeEntitlementPool(FeatureGroupEntity featureGroup, String entitlementPoolId);
+
+ void removeLicenseKeyGroup(FeatureGroupEntity featureGroup, String licenseKeyGroupId);
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/FeatureGroupDaoFactory.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/FeatureGroupDaoFactory.java
new file mode 100644
index 0000000000..58832e12ae
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/FeatureGroupDaoFactory.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+
+public abstract class FeatureGroupDaoFactory extends AbstractComponentFactory<FeatureGroupDao> {
+ public static FeatureGroupDaoFactory getInstance() {
+ return AbstractFactory.getInstance(FeatureGroupDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/LicenseAgreementDao.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/LicenseAgreementDao.java
new file mode 100644
index 0000000000..df5e972422
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/LicenseAgreementDao.java
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao;
+
+import org.openecomp.core.dao.BaseDao;
+import org.openecomp.sdc.vendorlicense.dao.types.LicenseAgreementEntity;
+import org.openecomp.sdc.versioning.dao.VersionableDao;
+
+import java.util.Set;
+
+public interface LicenseAgreementDao extends VersionableDao, BaseDao<LicenseAgreementEntity> {
+
+ long count(LicenseAgreementEntity entity);
+
+ void deleteAll(LicenseAgreementEntity entity);
+
+ void removeFeatureGroup(LicenseAgreementEntity licenseAgreement, String featureGroupId);
+
+ void updateColumnsAndDeltaFeatureGroupIds(LicenseAgreementEntity licenseAgreement,
+ Set<String> addedFeatureGroupIds,
+ Set<String> removedFeatureGroupIds);
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/LicenseAgreementDaoFactory.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/LicenseAgreementDaoFactory.java
new file mode 100644
index 0000000000..54c7b7bfea
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/LicenseAgreementDaoFactory.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class LicenseAgreementDaoFactory
+ extends AbstractComponentFactory<LicenseAgreementDao> {
+ public static LicenseAgreementDaoFactory getInstance() {
+ return AbstractFactory.getInstance(LicenseAgreementDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/LicenseKeyGroupDao.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/LicenseKeyGroupDao.java
new file mode 100644
index 0000000000..43e380d9b9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/LicenseKeyGroupDao.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao;
+
+import org.openecomp.core.dao.BaseDao;
+import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyGroupEntity;
+import org.openecomp.sdc.versioning.dao.VersionableDao;
+
+public interface LicenseKeyGroupDao extends VersionableDao, BaseDao<LicenseKeyGroupEntity> {
+
+ void deleteAll(LicenseKeyGroupEntity licenseKeyGroup);
+
+ void addReferencingFeatureGroup(LicenseKeyGroupEntity licenseKeyGroup, String featureGroupId);
+
+ void removeReferencingFeatureGroup(LicenseKeyGroupEntity licenseKeyGroup, String featureGroupId);
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/LicenseKeyGroupDaoFactory.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/LicenseKeyGroupDaoFactory.java
new file mode 100644
index 0000000000..1f887390db
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/LicenseKeyGroupDaoFactory.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class LicenseKeyGroupDaoFactory
+ extends AbstractComponentFactory<LicenseKeyGroupDao> {
+
+ public static LicenseKeyGroupDaoFactory getInstance() {
+ return AbstractFactory.getInstance(LicenseKeyGroupDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/VendorLicenseModelDao.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/VendorLicenseModelDao.java
new file mode 100644
index 0000000000..b8e39bc496
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/VendorLicenseModelDao.java
@@ -0,0 +1,29 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao;
+
+import org.openecomp.core.dao.BaseDao;
+import org.openecomp.sdc.vendorlicense.dao.types.VendorLicenseModelEntity;
+import org.openecomp.sdc.versioning.dao.VersionableDao;
+
+public interface VendorLicenseModelDao extends VersionableDao, BaseDao<VendorLicenseModelEntity> {
+// void updateLastModificationTime(VendorLicenseModelEntity vendorLicenseModel);
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/VendorLicenseModelDaoFactory.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/VendorLicenseModelDaoFactory.java
new file mode 100644
index 0000000000..b6d13a9027
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/VendorLicenseModelDaoFactory.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class VendorLicenseModelDaoFactory
+ extends AbstractComponentFactory<VendorLicenseModelDao> {
+
+ public static VendorLicenseModelDaoFactory getInstance() {
+ return AbstractFactory.getInstance(VendorLicenseModelDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/AggregationFunction.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/AggregationFunction.java
new file mode 100644
index 0000000000..9a5af213c4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/AggregationFunction.java
@@ -0,0 +1,27 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.types;
+
+public enum AggregationFunction {
+ Peak,
+ Average,
+ Other
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/ChoiceOrOther.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/ChoiceOrOther.java
new file mode 100644
index 0000000000..ca7a09b0df
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/ChoiceOrOther.java
@@ -0,0 +1,154 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.types;
+
+import com.datastax.driver.mapping.annotations.Transient;
+import com.datastax.driver.mapping.annotations.UDT;
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+import org.openecomp.sdc.common.errors.ErrorCode;
+
+@UDT(keyspace = "dox", name = "choice_or_other")
+public class ChoiceOrOther<E extends Enum<E>> {
+
+ public static final String CHOICE_OR_OTHER_INVALID_ENUM_ERR_ID =
+ "MULTI_CHOICE_OR_OTHER_INVALID_ENUM_ERR_ID";
+ public static final String CHOICE_OR_OTHER_INVALID_ENUM_MSG =
+ "Enum used as part of ChoiceOrOther type must contain the value 'Other'";
+ public static final String OTHER_ENUM_VALUE = "Other";
+
+ @Transient
+ private E choice;
+
+ @Transient
+ private String other;
+
+ private String result;
+
+ public ChoiceOrOther() {
+ }
+
+ /**
+ * Instantiates a new Choice or other.
+ *
+ * @param choice the choice
+ * @param other the other
+ */
+ public ChoiceOrOther(E choice, String other) {
+ this.choice = choice;
+ this.other = other;
+ result = resolveResult();
+ }
+
+ public E getChoice() {
+ return choice;
+ }
+
+ public void setChoice(E choice) {
+
+ this.choice = choice;
+ }
+
+ public String getOther() {
+ return other;
+ }
+
+ public void setOther(String other) {
+ this.other = other;
+ }
+
+ public String getResult() {
+ return result;
+ }
+
+ /**
+ * Sets result.
+ *
+ * @param result the result
+ */
+ public void setResult(String result) {
+ if (choice != null) {
+ if (result == null) {
+ this.result = resolveResult();
+ }
+ } else {
+ this.result = result;
+ }
+ }
+
+ private String resolveResult() {
+ return OTHER_ENUM_VALUE.equals(choice.name()) ? other : choice.name();
+ }
+
+ /**
+ * Resolve enum.
+ *
+ * @param enumClass the enum class
+ */
+ public void resolveEnum(Class<E> enumClass) {
+ if (choice != null || result == null) {
+ return;
+ }
+
+ try {
+ choice = E.valueOf(enumClass, result);
+ } catch (IllegalArgumentException e0) {
+ try {
+ choice = E.valueOf(enumClass, OTHER_ENUM_VALUE);
+ } catch (IllegalArgumentException ex) {
+ throw new CoreException(new ErrorCode.ErrorCodeBuilder()
+ .withId(CHOICE_OR_OTHER_INVALID_ENUM_ERR_ID)
+ .withMessage(CHOICE_OR_OTHER_INVALID_ENUM_MSG)
+ .withCategory(ErrorCategory.APPLICATION).build());
+ }
+ other = result;
+ }
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null || getClass() != obj.getClass()) {
+ return false;
+ }
+
+ ChoiceOrOther<?> that = (ChoiceOrOther<?>) obj;
+
+ if (choice != null ? !choice.equals(that.choice) : that.choice != null) {
+ return false;
+ }
+ if (other != null ? !other.equals(that.other) : that.other != null) {
+ return false;
+ }
+ return result != null ? result.equals(that.result) : that.result == null;
+
+ }
+
+ @Override
+ public int hashCode() {
+ int result1 = choice != null ? choice.hashCode() : 0;
+ result1 = 31 * result1 + (other != null ? other.hashCode() : 0);
+ result1 = 31 * result1 + (result != null ? result.hashCode() : 0);
+ return result1;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementMetric.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementMetric.java
new file mode 100644
index 0000000000..42cc231273
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementMetric.java
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.types;
+
+public enum EntitlementMetric {
+ Software_Instances_Count,
+ Core,
+ CPU,
+ Trunks,
+ User,
+ Subscribers,
+ Tenants,
+ Tokens,
+ Seats,
+ Units_TB,
+ Units_MB,
+ Units_GB,
+ Other
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementPoolEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementPoolEntity.java
new file mode 100644
index 0000000000..8964458181
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementPoolEntity.java
@@ -0,0 +1,370 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.types;
+
+import com.datastax.driver.mapping.annotations.ClusteringColumn;
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Enumerated;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+import org.openecomp.sdc.vendorlicense.dao.types.xml.AggregationFunctionForXml;
+import org.openecomp.sdc.vendorlicense.dao.types.xml.EntitlementMetricForXml;
+import org.openecomp.sdc.vendorlicense.dao.types.xml.EntitlementTimeForXml;
+import org.openecomp.sdc.vendorlicense.dao.types.xml.ThresholdForXml;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
+
+import java.util.HashSet;
+import java.util.Objects;
+import java.util.Set;
+
+@Table(keyspace = "dox", name = "entitlement_pool")
+public class EntitlementPoolEntity implements VersionableEntity {
+ private static final String ENTITY_TYPE = "Entitlement Pool";
+
+ @PartitionKey
+ @Column(name = "vlm_id")
+ private String vendorLicenseModelId;
+
+ @PartitionKey(value = 1)
+ @Frozen
+ private Version version;
+
+ @ClusteringColumn
+ @Column(name = "ep_id")
+ private String id;
+ private String name;
+ private String description;
+
+
+ @Column(name = "threshold")
+ private int thresholdValue;
+
+ @Column(name = "threshold_unit")
+ @Enumerated
+ private ThresholdUnit thresholdUnit;
+
+ @Column(name = "entitlement_metric")
+ @Frozen
+ private ChoiceOrOther<EntitlementMetric> entitlementMetric;
+ private String increments;
+
+ @Column(name = "aggregation_func")
+ @Frozen
+ private ChoiceOrOther<AggregationFunction> aggregationFunction;
+
+ @Column(name = "operational_scope")
+ @Frozen
+ private MultiChoiceOrOther<OperationalScope> operationalScope;
+
+ @Frozen
+ private ChoiceOrOther<EntitlementTime> time;
+
+ @Column(name = "manufacturer_ref_num")
+ private String manufacturerReferenceNumber;
+
+ @Column(name = "ref_fg_ids")
+ private Set<String> referencingFeatureGroups = new HashSet<>();
+
+ @Column(name = "version_uuid")
+ private String versionUuId;
+
+ public EntitlementPoolEntity() {
+ }
+
+ /**
+ * Instantiates a new Entitlement pool entity.
+ *
+ * @param vlmId the vlm id
+ * @param version the version
+ * @param id the id
+ */
+ public EntitlementPoolEntity(String vlmId, Version version, String id) {
+ this.vendorLicenseModelId = vlmId;
+ this.version = version;
+ this.id = id;
+ }
+
+ @Override
+ public String getEntityType() {
+ return ENTITY_TYPE;
+ }
+
+ @Override
+ public String getFirstClassCitizenId() {
+ return getVendorLicenseModelId();
+ }
+
+ public String getVendorLicenseModelId() {
+ return vendorLicenseModelId;
+ }
+
+ public void setVendorLicenseModelId(String vendorLicenseModelId) {
+ this.vendorLicenseModelId = vendorLicenseModelId;
+ }
+
+ @Override
+ public String getId() {
+ return id;
+ }
+
+ @Override
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @Override
+ public Version getVersion() {
+ return version;
+ }
+
+ @Override
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+
+ public Set<String> getReferencingFeatureGroups() {
+ return referencingFeatureGroups;
+ }
+
+ public void setReferencingFeatureGroups(Set<String> referencingFeatureGroups) {
+ this.referencingFeatureGroups = referencingFeatureGroups;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public int getThresholdValue() {
+ return thresholdValue;
+ }
+
+ public void setThresholdValue(int thresholdValue) {
+ this.thresholdValue = thresholdValue;
+ }
+
+ public ThresholdUnit getThresholdUnit() {
+ return thresholdUnit;
+ }
+
+ public void setThresholdUnit(ThresholdUnit thresholdUnits) {
+ this.thresholdUnit = thresholdUnits;
+ }
+
+ public ChoiceOrOther<EntitlementMetric> getEntitlementMetric() {
+ return entitlementMetric;
+ }
+
+ public void setEntitlementMetric(ChoiceOrOther<EntitlementMetric> entitlementMetric) {
+ entitlementMetric.resolveEnum(EntitlementMetric.class);
+ this.entitlementMetric = entitlementMetric;
+ }
+
+ public String getIncrements() {
+ return increments;
+ }
+
+ public void setIncrements(String increments) {
+ this.increments = increments;
+ }
+
+ public ChoiceOrOther<AggregationFunction> getAggregationFunction() {
+ return aggregationFunction;
+ }
+
+ public void setAggregationFunction(ChoiceOrOther<AggregationFunction> aggregationFunction) {
+ aggregationFunction.resolveEnum(AggregationFunction.class);
+ this.aggregationFunction = aggregationFunction;
+ }
+
+ public MultiChoiceOrOther<OperationalScope> getOperationalScope() {
+ return operationalScope;
+ }
+
+ public void setOperationalScope(MultiChoiceOrOther<OperationalScope> operationalScope) {
+ operationalScope.resolveEnum(OperationalScope.class);
+ this.operationalScope = operationalScope;
+ }
+
+ public ChoiceOrOther<EntitlementTime> getTime() {
+ return time;
+ }
+
+ public void setTime(ChoiceOrOther<EntitlementTime> time) {
+ time.resolveEnum(EntitlementTime.class);
+ this.time = time;
+ }
+
+ public String getManufacturerReferenceNumber() {
+ return manufacturerReferenceNumber;
+ }
+
+ public void setManufacturerReferenceNumber(String manufacturerReferenceNumber) {
+ this.manufacturerReferenceNumber = manufacturerReferenceNumber;
+ }
+
+
+ /**
+ * Gets threshold for artifact.
+ *
+ * @return the threshold for artifact
+ */
+ //util methods for XML
+ public ThresholdForXml getThresholdForArtifact() {
+ ThresholdForXml threshold = new ThresholdForXml();
+ threshold.setUnit(getThresholdUnit() == null ? null : getThresholdUnit().name());
+ threshold.setValue(getThresholdValue());
+ return threshold;
+ }
+
+ /**
+ * Gets entitlement metric for artifact.
+ *
+ * @return the entitlement metric for artifact
+ */
+ public EntitlementMetricForXml getEntitlementMetricForArtifact() {
+ EntitlementMetricForXml metric = new EntitlementMetricForXml();
+ if (entitlementMetric != null) {
+ metric.setValue(entitlementMetric.getResult());
+ } else {
+ metric.setValue(null);
+ }
+ return metric;
+ }
+
+ /**
+ * Gets time for artifact.
+ *
+ * @return the time for artifact
+ */
+ public EntitlementTimeForXml getTimeForArtifact() {
+ EntitlementTimeForXml timeForXml = new EntitlementTimeForXml();
+ if (time != null) {
+ timeForXml.setValue(time.getResult());
+ }
+
+ return timeForXml;
+ }
+
+
+ @Override
+ public String toString() {
+ return "EntitlementPoolEntity{"
+ + "vendorLicenseModelId='" + vendorLicenseModelId + '\''
+ + ", version=" + version
+ + ", id='" + id + '\''
+ + ", name='" + name + '\''
+ + ", description='" + description + '\''
+ + ", thresholdValue=" + thresholdValue
+ + ", thresholdUnit='" + thresholdUnit + '\''
+ + ", entitlementMetric=" + entitlementMetric
+ + ", increments='" + increments + '\''
+ + ", aggregationFunction=" + aggregationFunction
+ + ", operationalScope=" + operationalScope
+ + ", time=" + time
+ + ", manufacturerReferenceNumber='" + manufacturerReferenceNumber + '\''
+ + ", referencingFeatureGroups=" + referencingFeatureGroups
+ + ", version_uuid=" + versionUuId
+ + '}';
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null || getClass() != obj.getClass()) {
+ return false;
+ }
+ EntitlementPoolEntity that = (EntitlementPoolEntity) obj;
+ return Float.compare(that.thresholdValue, thresholdValue) == 0
+ && Objects.equals(vendorLicenseModelId, that.vendorLicenseModelId)
+ && Objects.equals(version, that.version)
+ && Objects.equals(id, that.id)
+ && Objects.equals(name, that.name)
+ && Objects.equals(description, that.description)
+ && Objects.equals(thresholdUnit, that.thresholdUnit)
+ && Objects.equals(entitlementMetric, that.entitlementMetric)
+ && Objects.equals(increments, that.increments)
+ && Objects.equals(aggregationFunction, that.aggregationFunction)
+ && Objects.equals(operationalScope, that.operationalScope)
+ && Objects.equals(time, that.time)
+ && Objects.equals(manufacturerReferenceNumber, that.manufacturerReferenceNumber)
+ && Objects.equals(referencingFeatureGroups, that.referencingFeatureGroups);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects
+ .hash(vendorLicenseModelId, version, id, name, description, thresholdValue, thresholdUnit,
+ entitlementMetric, increments, aggregationFunction, operationalScope, time,
+ manufacturerReferenceNumber, referencingFeatureGroups);
+ }
+
+ /**
+ * Gets aggregation function for artifact.
+ *
+ * @return the aggregation function for artifact
+ */
+ public AggregationFunctionForXml getAggregationFunctionForArtifact() {
+ AggregationFunctionForXml aggregationFunctionForXml = new AggregationFunctionForXml();
+ if (entitlementMetric != null) {
+ aggregationFunctionForXml.setValue(aggregationFunction.getResult());
+ } else {
+ aggregationFunctionForXml.setValue(null);
+ }
+ return aggregationFunctionForXml;
+ }
+
+ /**
+ * Gets operational scope for artifact.
+ *
+ * @return the operational scope for artifact
+ */
+ public Set<String> getOperationalScopeForArtifact() {
+ if (operationalScope != null) {
+ return operationalScope.getResults();
+ } else {
+ return null;
+ }
+ }
+
+ public String getVersionUuId() {
+ return versionUuId;
+ }
+
+ public void setVersionUuId(String uuId) {
+ versionUuId = uuId;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementTime.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementTime.java
new file mode 100644
index 0000000000..5005075122
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementTime.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.types;
+
+public enum EntitlementTime { //TODO MetricTime ? ask Segev...
+ Hour,
+ Day,
+ Month,
+ Quarter,
+ Year,
+ Other
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/FeatureGroupEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/FeatureGroupEntity.java
new file mode 100644
index 0000000000..de5bd2e1c5
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/FeatureGroupEntity.java
@@ -0,0 +1,203 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.types;
+
+import com.datastax.driver.mapping.annotations.ClusteringColumn;
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
+
+
+import java.util.HashSet;
+import java.util.Objects;
+import java.util.Set;
+
+@Table(name = "feature_group", keyspace = "dox")
+public class FeatureGroupEntity implements VersionableEntity {
+ private static final String ENTITY_TYPE = "Feature Group";
+
+ @PartitionKey
+ @Column(name = "vlm_id")
+ private String vendorLicenseModelId;
+ @PartitionKey(value = 1)
+ @Frozen
+ private Version version;
+ @ClusteringColumn
+ @Column(name = "fg_id")
+ private String id;
+ private String name;
+ private String description;
+ @Column(name = "part_num")
+ private String partNumber;
+ @Column(name = "lkg_ids")
+ private Set<String> licenseKeyGroupIds = new HashSet<>();
+ @Column(name = "ep_ids")
+ private Set<String> entitlementPoolIds = new HashSet<>();
+ @Column(name = "ref_la_ids")
+ private Set<String> referencingLicenseAgreements = new HashSet<>();
+
+ public FeatureGroupEntity() {
+ }
+
+ /**
+ * Instantiates a new Feature group entity.
+ *
+ * @param vendorLicenseModelId the vendor license model id
+ * @param version the version
+ * @param id the id
+ */
+ public FeatureGroupEntity(String vendorLicenseModelId, Version version, String id) {
+ this.vendorLicenseModelId = vendorLicenseModelId;
+ this.version = version;
+ this.id = id;
+ }
+
+ @Override
+ public String getEntityType() {
+ return ENTITY_TYPE;
+ }
+
+ @Override
+ public String getFirstClassCitizenId() {
+ return getVendorLicenseModelId();
+ }
+
+ public String getVendorLicenseModelId() {
+ return vendorLicenseModelId;
+ }
+
+ public void setVendorLicenseModelId(String vendorLicenseModelId) {
+ this.vendorLicenseModelId = vendorLicenseModelId;
+ }
+
+ @Override
+ public Version getVersion() {
+ return version;
+ }
+
+ @Override
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+
+ @Override
+ public String getId() {
+ return id;
+ }
+
+ @Override
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getPartNumber() {
+ return partNumber;
+ }
+
+ public void setPartNumber(String partNumber) {
+ this.partNumber = partNumber;
+ }
+
+ public Set<String> getLicenseKeyGroupIds() {
+ return licenseKeyGroupIds;
+ }
+
+ public void setLicenseKeyGroupIds(Set<String> licenseKeyGroupIds) {
+ this.licenseKeyGroupIds = licenseKeyGroupIds;
+ }
+
+ public Set<String> getEntitlementPoolIds() {
+ return entitlementPoolIds;
+ }
+
+ public void setEntitlementPoolIds(Set<String> entitlementPoolIds) {
+ this.entitlementPoolIds = entitlementPoolIds;
+ }
+
+ public Set<String> getReferencingLicenseAgreements() {
+ return referencingLicenseAgreements;
+ }
+
+ public void setReferencingLicenseAgreements(Set<String> referencingLicenseAgreements) {
+ this.referencingLicenseAgreements = referencingLicenseAgreements;
+ }
+
+ @Override
+ public String toString() {
+ return "FeatureGroupEntity{"
+ + "vendorLicenseModelId='" + vendorLicenseModelId + '\''
+ + ", version=" + version
+ + ", id='" + id + '\''
+ + ", name='" + name + '\''
+ + ", description='" + description + '\''
+ + ", partNumber='" + partNumber + '\''
+ + ", licenseKeyGroupIds=" + licenseKeyGroupIds
+ + ", entitlementPoolIds=" + entitlementPoolIds
+ + ", referencingLicenseAgreements=" + referencingLicenseAgreements
+ + '}';
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null || getClass() != obj.getClass()) {
+ return false;
+ }
+ FeatureGroupEntity that = (FeatureGroupEntity) obj;
+ return Objects.equals(vendorLicenseModelId, that.vendorLicenseModelId)
+ && Objects.equals(version, that.version)
+ && Objects.equals(id, that.id)
+ && Objects.equals(name, that.name)
+ && Objects.equals(description, that.description)
+ && Objects.equals(partNumber, that.partNumber)
+ && Objects.equals(licenseKeyGroupIds, that.licenseKeyGroupIds)
+ && Objects.equals(entitlementPoolIds, that.entitlementPoolIds)
+ && Objects.equals(referencingLicenseAgreements, that.referencingLicenseAgreements);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects
+ .hash(vendorLicenseModelId, version, id, name, description, partNumber, licenseKeyGroupIds,
+ entitlementPoolIds, referencingLicenseAgreements);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/FeatureGroupModel.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/FeatureGroupModel.java
new file mode 100644
index 0000000000..78e081760c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/FeatureGroupModel.java
@@ -0,0 +1,75 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.types;
+
+import java.util.HashSet;
+import java.util.Set;
+
+public class FeatureGroupModel {
+ private FeatureGroupEntity featureGroup;
+ private Set<EntitlementPoolEntity> entitlementPools = new HashSet<>();
+
+ private Set<LicenseKeyGroupEntity> licenseKeyGroups = new HashSet<>();
+
+ public FeatureGroupEntity getFeatureGroup() {
+ return featureGroup;
+ }
+
+ public void setFeatureGroup(FeatureGroupEntity featureGroup) {
+ this.featureGroup = featureGroup;
+ }
+
+ public Set<EntitlementPoolEntity> getEntitlementPools() {
+ return entitlementPools;
+ }
+
+ public Set<LicenseKeyGroupEntity> getLicenseKeyGroups() {
+ return licenseKeyGroups;
+ }
+
+ public void setEntitlementPools(Set<EntitlementPoolEntity> entitlementPools) {
+ this.entitlementPools = entitlementPools;
+ }
+
+ public void setLicenseKeyGroups(Set<LicenseKeyGroupEntity> licenseKeyGroups) {
+ this.licenseKeyGroups = licenseKeyGroups;
+ }
+
+ //for XML Artifact
+ public String getEntityName() {
+ return featureGroup.getName();
+ }
+
+ public String getEntityDesc() {
+ return featureGroup.getDescription();
+ }
+
+ public String getEntityId() {
+ return featureGroup.getId();
+ }
+
+ public String getEntityPartNumber() {
+ return featureGroup.getPartNumber();
+ }
+
+
+}
+
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseAgreementEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseAgreementEntity.java
new file mode 100644
index 0000000000..a6e46bf44c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseAgreementEntity.java
@@ -0,0 +1,182 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.types;
+
+import com.datastax.driver.mapping.annotations.ClusteringColumn;
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
+
+import java.util.HashSet;
+import java.util.Objects;
+import java.util.Set;
+
+@Table(keyspace = "dox", name = "license_agreement")
+public class LicenseAgreementEntity implements VersionableEntity {
+ public static final String ENTITY_TYPE = "License Agreement";
+
+ @PartitionKey(value = 0)
+ @Column(name = "vlm_id")
+ private String vendorLicenseModelId;
+
+ @PartitionKey(value = 1)
+ @Frozen
+ private Version version;
+
+ @ClusteringColumn
+ @Column(name = "la_id")
+ private String id;
+ private String name;
+ private String description;
+
+ @Column(name = "lic_term")
+ @Frozen
+ private ChoiceOrOther<LicenseTerm> licenseTerm;
+
+ @Column(name = "req_const")
+ private String requirementsAndConstrains;
+
+ @Column(name = "fg_ids")
+ private Set<String> featureGroupIds = new HashSet<>();
+
+ public LicenseAgreementEntity() {
+ }
+
+ /**
+ * Instantiates a new License agreement entity.
+ *
+ * @param vlmId the vlm id
+ * @param version the version
+ * @param id the id
+ */
+ public LicenseAgreementEntity(String vlmId, Version version, String id) {
+ this.vendorLicenseModelId = vlmId;
+ this.id = id;
+ this.version = version;
+ }
+
+ @Override
+ public String getEntityType() {
+ return ENTITY_TYPE;
+ }
+
+ @Override
+ public String getFirstClassCitizenId() {
+ return getVendorLicenseModelId();
+ }
+
+ public String getVendorLicenseModelId() {
+ return vendorLicenseModelId;
+ }
+
+ public void setVendorLicenseModelId(String vendorLicenseModelId) {
+ this.vendorLicenseModelId = vendorLicenseModelId;
+ }
+
+ @Override
+ public Version getVersion() {
+ return version;
+ }
+
+ @Override
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+
+ @Override
+ public String getId() {
+ return id;
+ }
+
+ @Override
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public ChoiceOrOther<LicenseTerm> getLicenseTerm() {
+ return licenseTerm;
+ }
+
+ public void setLicenseTerm(ChoiceOrOther<LicenseTerm> licenseTerm) {
+ licenseTerm.resolveEnum(LicenseTerm.class);
+ this.licenseTerm = licenseTerm;
+ }
+
+ public String getRequirementsAndConstrains() {
+ return requirementsAndConstrains;
+ }
+
+ public void setRequirementsAndConstrains(String requirementsAndConstrains) {
+ this.requirementsAndConstrains = requirementsAndConstrains;
+ }
+
+ public Set<String> getFeatureGroupIds() {
+ return featureGroupIds;
+ }
+
+ public void setFeatureGroupIds(Set<String> featureGroupIds) {
+ this.featureGroupIds = featureGroupIds;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null || getClass() != obj.getClass()) {
+ return false;
+ }
+ LicenseAgreementEntity that = (LicenseAgreementEntity) obj;
+ return Objects.equals(vendorLicenseModelId, that.vendorLicenseModelId)
+ && Objects.equals(version, that.version)
+ && Objects.equals(id, that.id)
+ && Objects.equals(name, that.name)
+ && Objects.equals(description, that.description)
+ && Objects.equals(licenseTerm, that.licenseTerm)
+ && Objects.equals(requirementsAndConstrains, that.requirementsAndConstrains)
+ && Objects.equals(featureGroupIds, that.featureGroupIds);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(vendorLicenseModelId, version, id, name, description, licenseTerm,
+ requirementsAndConstrains, featureGroupIds);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseAgreementModel.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseAgreementModel.java
new file mode 100644
index 0000000000..1e65f70cc0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseAgreementModel.java
@@ -0,0 +1,45 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.types;
+
+import java.util.HashSet;
+import java.util.Set;
+
+public class LicenseAgreementModel {
+ private LicenseAgreementEntity licenseAgreement;
+ private Set<FeatureGroupEntity> featureGroups = new HashSet<>();
+
+ public LicenseAgreementEntity getLicenseAgreement() {
+ return licenseAgreement;
+ }
+
+ public void setLicenseAgreement(LicenseAgreementEntity licenseAgreement) {
+ this.licenseAgreement = licenseAgreement;
+ }
+
+ public Set<FeatureGroupEntity> getFeatureGroups() {
+ return featureGroups;
+ }
+
+ public void setFeatureGroups(Set<FeatureGroupEntity> featureGroups) {
+ this.featureGroups = featureGroups;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseKeyGroupEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseKeyGroupEntity.java
new file mode 100644
index 0000000000..2a7e936cb3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseKeyGroupEntity.java
@@ -0,0 +1,231 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.types;
+
+import com.datastax.driver.mapping.annotations.ClusteringColumn;
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Enumerated;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+import org.openecomp.sdc.vendorlicense.dao.types.xml.LicenseKeyTypeForXml;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
+
+
+import java.util.HashSet;
+import java.util.Objects;
+import java.util.Set;
+
+@Table(keyspace = "dox", name = "license_key_group")
+public class LicenseKeyGroupEntity implements VersionableEntity {
+ private static final String ENTITY_TYPE = "License Key Group";
+
+ @PartitionKey
+ @Column(name = "vlm_id")
+ private String vendorLicenseModelId;
+ @PartitionKey(value = 1)
+ @Frozen
+ private Version version;
+ @ClusteringColumn
+ @Column(name = "lkg_id")
+ private String id;
+ private String name;
+ private String description;
+ @Enumerated
+ private LicenseKeyType type;
+ @Column(name = "operational_scope")
+ @Frozen
+ private MultiChoiceOrOther<OperationalScope> operationalScope;
+ @Column(name = "ref_fg_ids")
+ private Set<String> referencingFeatureGroups = new HashSet<>();
+ @Column(name = "version_uuid")
+ private String versionUuId;
+
+
+ public LicenseKeyGroupEntity() {
+ }
+
+ /**
+ * Instantiates a new License key group entity.
+ *
+ * @param vendorLicenseModelId the vendor license model id
+ * @param version the version
+ * @param id the id
+ */
+ public LicenseKeyGroupEntity(String vendorLicenseModelId, Version version, String id) {
+ this.vendorLicenseModelId = vendorLicenseModelId;
+ this.version = version;
+ this.id = id;
+ }
+
+ @Override
+ public String getEntityType() {
+ return ENTITY_TYPE;
+ }
+
+ @Override
+ public String getFirstClassCitizenId() {
+ return getVendorLicenseModelId();
+ }
+
+ public String getVendorLicenseModelId() {
+ return vendorLicenseModelId;
+ }
+
+ public void setVendorLicenseModelId(String vendorLicenseModelId) {
+ this.vendorLicenseModelId = vendorLicenseModelId;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public Version getVersion() {
+ return version;
+ }
+
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public LicenseKeyType getType() {
+ return type;
+ }
+
+ public void setType(LicenseKeyType type) {
+ this.type = type;
+ }
+
+ public MultiChoiceOrOther<OperationalScope> getOperationalScope() {
+ return operationalScope;
+ }
+
+ public void setOperationalScope(MultiChoiceOrOther<OperationalScope> operationalScope) {
+ operationalScope.resolveEnum(OperationalScope.class);
+ this.operationalScope = operationalScope;
+ }
+
+ public Set<String> getReferencingFeatureGroups() {
+ return referencingFeatureGroups;
+ }
+
+ public void setReferencingFeatureGroups(Set<String> referencingFeatureGroups) {
+ this.referencingFeatureGroups = referencingFeatureGroups;
+ }
+
+ @Override
+ public String toString() {
+ return "LicenseKeyGroupEntity{" + "vendorLicenseModelId='" + vendorLicenseModelId + '\''
+ + ", version=" + version
+ + ", id='" + id + '\''
+ + ", name='" + name + '\''
+ + ", description='" + description + '\''
+ + ", type=" + type
+ + ", operationalScope=" + operationalScope
+ + ", referencingFeatureGroups=" + referencingFeatureGroups
+ + ", versionUuId='" + versionUuId + '\''
+ + '}';
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null || getClass() != obj.getClass()) {
+ return false;
+ }
+ LicenseKeyGroupEntity that = (LicenseKeyGroupEntity) obj;
+ return Objects.equals(vendorLicenseModelId, that.vendorLicenseModelId)
+ && Objects.equals(version, that.version)
+ && Objects.equals(id, that.id)
+ && Objects.equals(name, that.name)
+ && Objects.equals(description, that.description)
+ && type == that.type
+ && Objects.equals(operationalScope, that.operationalScope)
+ && Objects.equals(referencingFeatureGroups, that.referencingFeatureGroups);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects
+ .hash(vendorLicenseModelId, version, id, name, description, type, operationalScope,
+ referencingFeatureGroups);
+ }
+
+ /**
+ * Gets operational scope for artifact.
+ *
+ * @return the operational scope for artifact
+ */
+ public Set<String> getOperationalScopeForArtifact() {
+ if (operationalScope != null) {
+ return operationalScope.getResults();
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Gets type for artifact.
+ *
+ * @return the type for artifact
+ */
+ public LicenseKeyTypeForXml getTypeForArtifact() {
+ LicenseKeyTypeForXml typeXml = new LicenseKeyTypeForXml();
+ if (type != null) {
+ typeXml.setValue(type.toString());
+ } else {
+ typeXml.setValue(null);
+ }
+ return typeXml;
+ }
+
+
+ public String getVersionUuId() {
+ return versionUuId;
+ }
+
+ public void setVersionUuId(String uuId) {
+ versionUuId = uuId;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseKeyType.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseKeyType.java
new file mode 100644
index 0000000000..3ba913de31
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseKeyType.java
@@ -0,0 +1,27 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.types;
+
+public enum LicenseKeyType {
+ Universal,
+ Unique,
+ One_Time
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseTerm.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseTerm.java
new file mode 100644
index 0000000000..729a985473
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseTerm.java
@@ -0,0 +1,28 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.types;
+
+public enum LicenseTerm {
+ Fixed_Term,
+ Perpetual,
+ Unlimited,
+ Other
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/MultiChoiceOrOther.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/MultiChoiceOrOther.java
new file mode 100644
index 0000000000..df9d6887ce
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/MultiChoiceOrOther.java
@@ -0,0 +1,172 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.types;
+
+import com.datastax.driver.mapping.annotations.Transient;
+import com.datastax.driver.mapping.annotations.UDT;
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+import org.openecomp.sdc.common.errors.ErrorCode;
+
+import java.util.HashSet;
+import java.util.Set;
+
+@UDT(keyspace = "dox", name = "multi_choice_or_other")
+public class MultiChoiceOrOther<E extends Enum<E>> {
+ public static final String MULTI_CHOICE_OR_OTHER_INVALID_ENUM_ERR_ID =
+ "MULTI_CHOICE_OR_OTHER_INVALID_ENUM_ERR_ID";
+ public static final String MULTI_CHOICE_OR_OTHER_INVALID_ENUM_MSG =
+ "Enum used as part of MultiChoiceOrOther type must contain the value 'Other'";
+ public static final String OTHER_ENUM_VALUE = "Other";
+
+ @Transient
+ private Set<E> choices;
+ @Transient
+ private String other;
+
+
+ private Set<String> results;
+
+ public MultiChoiceOrOther() {
+ }
+
+ /**
+ * Instantiates a new Multi choice or other.
+ *
+ * @param choices the choices
+ * @param other the other
+ */
+ public MultiChoiceOrOther(Set<E> choices, String other) {
+ this.choices = choices;
+ this.other = other;
+ results = resolveResult();
+ }
+
+ public Set<E> getChoices() {
+ return choices;
+ }
+
+ public void setChoices(Set<E> choices) {
+ this.choices = choices;
+ }
+
+ public String getOther() {
+ return other;
+ }
+
+ public void setOther(String other) {
+ this.other = other;
+ }
+
+ public Set<String> getResults() {
+ return results;
+ }
+
+ /**
+ * Sets results.
+ *
+ * @param results the results
+ */
+ public void setResults(Set<String> results) {
+ if (choices != null) {
+ if (results == null) {
+ this.results = resolveResult();
+ }
+ } else {
+ this.results = results;
+ }
+ }
+
+ private Set<String> resolveResult() {
+ results = new HashSet<>();
+ if (choices.size() == 1 && OTHER_ENUM_VALUE.equals(choices.iterator().next().name())) {
+ results.add(other);
+ } else {
+ for (E choice : choices) {
+ results.add(choice.name());
+ }
+ }
+
+ return results;
+ }
+
+ /**
+ * Resolve enum.
+ *
+ * @param enumClass the enum class
+ */
+ public void resolveEnum(Class<E> enumClass) {
+ if (choices != null || results == null || results.size() == 0) {
+ return;
+ }
+
+ choices = new HashSet<>();
+ if (results.size() > 1) {
+ for (String result : results) {
+ choices.add(E.valueOf(enumClass, result));
+ }
+ } else {
+ String result = results.iterator().next();
+ try {
+ choices.add(E.valueOf(enumClass, result));
+ } catch (IllegalArgumentException illegalArgumentException) {
+ try {
+ choices.add(E.valueOf(enumClass, OTHER_ENUM_VALUE));
+ } catch (IllegalArgumentException ex) {
+ throw new CoreException(new ErrorCode.ErrorCodeBuilder()
+ .withId(MULTI_CHOICE_OR_OTHER_INVALID_ENUM_ERR_ID)
+ .withMessage(MULTI_CHOICE_OR_OTHER_INVALID_ENUM_MSG)
+ .withCategory(ErrorCategory.APPLICATION).build());
+ }
+ other = result;
+ }
+ }
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null || getClass() != obj.getClass()) {
+ return false;
+ }
+
+ MultiChoiceOrOther<?> that = (MultiChoiceOrOther<?>) obj;
+
+ if (choices != null ? !choices.equals(that.choices) : that.choices != null) {
+ return false;
+ }
+ if (other != null ? !other.equals(that.other) : that.other != null) {
+ return false;
+ }
+ return results != null ? results.equals(that.results) : that.results == null;
+
+ }
+
+ @Override
+ public int hashCode() {
+ int result = choices != null ? choices.hashCode() : 0;
+ result = 31 * result + (other != null ? other.hashCode() : 0);
+ result = 31 * result + (results != null ? results.hashCode() : 0);
+ return result;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/OperationalScope.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/OperationalScope.java
new file mode 100644
index 0000000000..ed9497d30b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/OperationalScope.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.types;
+
+public enum OperationalScope {
+ Network_Wide,
+ Availability_Zone,
+ Data_Center,
+ Tenant,
+ VM,
+ CPU,
+ Core,
+ Other
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/ThresholdUnit.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/ThresholdUnit.java
new file mode 100644
index 0000000000..bd0fa41073
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/ThresholdUnit.java
@@ -0,0 +1,26 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.types;
+
+public enum ThresholdUnit {
+ Absolute,
+ Percentage
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/VendorLicenseModelEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/VendorLicenseModelEntity.java
new file mode 100644
index 0000000000..ea93b1ab4f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/VendorLicenseModelEntity.java
@@ -0,0 +1,153 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.types;
+
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Computed;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
+
+import java.util.Objects;
+
+@Table(keyspace = "dox", name = "vendor_license_model")
+public class VendorLicenseModelEntity implements VersionableEntity {
+ public static final String ENTITY_TYPE = "Vendor License Model";
+
+ @PartitionKey
+ @Column(name = "vlm_id")
+ private String id;
+
+ @PartitionKey(value = 1)
+ @Frozen
+ private Version version;
+
+ // @Column(name = "last_modification_time")
+ // private Date lastModificationTime;
+
+ @Column(name = "vendor_name")
+ private String vendorName;
+ private String description;
+ @Column(name = "icon")
+ private String iconRef;
+
+ @Computed("writetime(vendor_name)")
+ private Long writetimeMicroSeconds;
+
+ public VendorLicenseModelEntity() {
+ }
+
+ public VendorLicenseModelEntity(String id, Version version) {
+ this.id = id;
+ this.version = version;
+ }
+
+ @Override
+ public String getEntityType() {
+ return ENTITY_TYPE;
+ }
+
+ @Override
+ public String getFirstClassCitizenId() {
+ return getId();
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @Override
+ public Version getVersion() {
+ return version;
+ }
+
+ @Override
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+
+ public String getVendorName() {
+ return vendorName;
+ }
+
+ public void setVendorName(String vendorName) {
+ this.vendorName = vendorName;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getIconRef() {
+ return iconRef;
+ }
+
+ public void setIconRef(String iconRef) {
+ this.iconRef = iconRef;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null || getClass() != obj.getClass()) {
+ return false;
+ }
+ VendorLicenseModelEntity that = (VendorLicenseModelEntity) obj;
+ return Objects.equals(id, that.id)
+ && Objects.equals(version, that.version)
+ && Objects.equals(vendorName, that.vendorName)
+ && Objects.equals(description, that.description)
+ && Objects.equals(iconRef, that.iconRef);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, version, vendorName, description, iconRef);
+ }
+
+ // public Date getLastModificationTime() {
+ // return lastModificationTime;
+ // }
+ //
+ // public void setLastModificationTime(Date lastModificationTime) {
+ // this.lastModificationTime = lastModificationTime;
+ // }
+
+ public Long getWritetimeMicroSeconds() {
+ return writetimeMicroSeconds;
+ }
+
+ public void setWritetimeMicroSeconds(Long writetimeMicroSeconds) {
+ this.writetimeMicroSeconds = writetimeMicroSeconds;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/xml/AggregationFunctionForXml.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/xml/AggregationFunctionForXml.java
new file mode 100644
index 0000000000..e2a6be6b9e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/xml/AggregationFunctionForXml.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.types.xml;
+
+public class AggregationFunctionForXml {
+ private String value;
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/xml/EntitlementMetricForXml.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/xml/EntitlementMetricForXml.java
new file mode 100644
index 0000000000..8a449446ec
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/xml/EntitlementMetricForXml.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.types.xml;
+
+public class EntitlementMetricForXml {
+ private String value;
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/xml/EntitlementTimeForXml.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/xml/EntitlementTimeForXml.java
new file mode 100644
index 0000000000..c78a2d6d91
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/xml/EntitlementTimeForXml.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.types.xml;
+
+public class EntitlementTimeForXml {
+ private String value;
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/xml/LicenseKeyTypeForXml.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/xml/LicenseKeyTypeForXml.java
new file mode 100644
index 0000000000..c8c0d3067e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/xml/LicenseKeyTypeForXml.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.types.xml;
+
+public class LicenseKeyTypeForXml {
+ private String value;
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/xml/ThresholdForXml.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/xml/ThresholdForXml.java
new file mode 100644
index 0000000000..11627160ad
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/xml/ThresholdForXml.java
@@ -0,0 +1,42 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.types.xml;
+
+public class ThresholdForXml {
+ String unit;
+ int value;
+
+ public String getUnit() {
+ return unit;
+ }
+
+ public void setUnit(String unit) {
+ this.unit = unit;
+ }
+
+ public int getValue() {
+ return value;
+ }
+
+ public void setValue(int value) {
+ this.value = value;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/errors/JsonErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/errors/JsonErrorBuilder.java
new file mode 100644
index 0000000000..a11092bbe3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/errors/JsonErrorBuilder.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.errors;
+
+import org.openecomp.sdc.common.errors.ErrorCategory;
+import org.openecomp.sdc.common.errors.ErrorCode;
+
+public class JsonErrorBuilder {
+
+ private static final String JSON_ERROR_OCCURED_DURING_ARTIFACT_GENERATION_ERR_ID =
+ "JSON_ERROR_OCCURED_DURING_ARTIFACT_GENERATION_ERR_ID";
+ private static final String JSON_ERROR_OCCURED_DURING_ARTIFACT_GENERATION_ERR_ID_MSG =
+ "Json error occured during artifact generation:%s.";
+
+ private final ErrorCode.ErrorCodeBuilder builder = new ErrorCode.ErrorCodeBuilder();
+
+ /**
+ * Instantiates a new Json error builder.
+ *
+ * @param exceptionMessage the exception message
+ */
+ public JsonErrorBuilder(String exceptionMessage) {
+ builder.withId(JSON_ERROR_OCCURED_DURING_ARTIFACT_GENERATION_ERR_ID);
+ builder.withCategory(ErrorCategory.APPLICATION);
+ builder.withMessage(
+ String.format(JSON_ERROR_OCCURED_DURING_ARTIFACT_GENERATION_ERR_ID_MSG, exceptionMessage));
+ }
+
+ public ErrorCode build() {
+ return builder.build();
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/errors/LicensingDataInvalidErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/errors/LicensingDataInvalidErrorBuilder.java
new file mode 100644
index 0000000000..dfc9a93751
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/errors/LicensingDataInvalidErrorBuilder.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.errors;
+
+import org.openecomp.core.utilities.CommonMethods;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+import org.openecomp.sdc.common.errors.ErrorCode;
+
+import java.util.List;
+
+public class LicensingDataInvalidErrorBuilder {
+ private static final String LICENSING_DATA_INVALID_MSG = "Invalid licensing data: %s";
+ private final ErrorCode.ErrorCodeBuilder builder = new ErrorCode.ErrorCodeBuilder();
+
+ /**
+ * Instantiates a new Licensing data invalid error builder.
+ *
+ * @param licensingDataErrors the licensing data errors
+ */
+ public LicensingDataInvalidErrorBuilder(List<String> licensingDataErrors) {
+ builder.withId(VendorLicenseErrorCodes.LICENSING_DATA_INVALID);
+ builder.withCategory(ErrorCategory.APPLICATION);
+ builder.withMessage(String.format(LICENSING_DATA_INVALID_MSG,
+ CommonMethods.listToSeparatedString(licensingDataErrors, ',')));
+ }
+
+ public ErrorCode build() {
+ return builder.build();
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/errors/SubmitUncompletedLicenseModelErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/errors/SubmitUncompletedLicenseModelErrorBuilder.java
new file mode 100644
index 0000000000..0a00cff8ea
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/errors/SubmitUncompletedLicenseModelErrorBuilder.java
@@ -0,0 +1,50 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.errors;
+
+import org.openecomp.sdc.common.errors.ErrorCategory;
+import org.openecomp.sdc.common.errors.ErrorCode;
+
+public class SubmitUncompletedLicenseModelErrorBuilder {
+
+ private static final String SUBMIT_UNCOMPLETED_LICENSE_MODEL_MSG =
+ "Uncompleted vendor license model %s cannot be submitted. "
+ + "It must contain license_agreement(s) that all feature groups "
+ + "contain at least one entitlement pool.";
+ private final ErrorCode.ErrorCodeBuilder builder = new ErrorCode.ErrorCodeBuilder();
+
+ /**
+ * Instantiates a new Submit uncompleted license model error builder.
+ *
+ * @param vlmId the vlm id
+ */
+ public SubmitUncompletedLicenseModelErrorBuilder(String vlmId) {
+ builder.withId(VendorLicenseErrorCodes.SUBMIT_UNCOMPLETED_LICENSE_MODEL);
+ builder.withCategory(ErrorCategory.APPLICATION);
+ builder.withMessage(String.format(SUBMIT_UNCOMPLETED_LICENSE_MODEL_MSG, vlmId));
+ }
+
+ public ErrorCode build() {
+ return builder.build();
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/errors/VendorLicenseErrorCodes.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/errors/VendorLicenseErrorCodes.java
new file mode 100644
index 0000000000..4cd7a5bc1b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/errors/VendorLicenseErrorCodes.java
@@ -0,0 +1,28 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.errors;
+
+public class VendorLicenseErrorCodes {
+
+ public static final String VENDOR_LICENSE_MODEL_NOT_FOUND = "VENDOR_LICENSE_MODEL_NOT_FOUND";
+ public static final String SUBMIT_UNCOMPLETED_LICENSE_MODEL = "SUBMIT_UNCOMPLETED_LICENSE_MODEL";
+ public static final String LICENSING_DATA_INVALID = "LICENSING_DATA_INVALID";
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/errors/VendorLicenseModelNotFoundErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/errors/VendorLicenseModelNotFoundErrorBuilder.java
new file mode 100644
index 0000000000..d2dc1d6f00
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/errors/VendorLicenseModelNotFoundErrorBuilder.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.errors;
+
+import org.openecomp.sdc.common.errors.ErrorCategory;
+import org.openecomp.sdc.common.errors.ErrorCode;
+
+public class VendorLicenseModelNotFoundErrorBuilder {
+
+ private static final String VENDOR_LICENSE_MODEL_NOT_FOUND_MSG =
+ "Vendor license model with id %s not found.";
+ private final ErrorCode.ErrorCodeBuilder builder = new ErrorCode.ErrorCodeBuilder();
+
+ /**
+ * Instantiates a new Vendor license model not found error builder.
+ *
+ * @param vendorLicenseModelId the vendor license model id
+ */
+ public VendorLicenseModelNotFoundErrorBuilder(String vendorLicenseModelId) {
+ builder.withId(VendorLicenseErrorCodes.VENDOR_LICENSE_MODEL_NOT_FOUND);
+ builder.withCategory(ErrorCategory.APPLICATION);
+ builder.withMessage(String.format(VENDOR_LICENSE_MODEL_NOT_FOUND_MSG, vendorLicenseModelId));
+ }
+
+ public ErrorCode build() {
+ return builder.build();
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/facade/VendorLicenseFacade.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/facade/VendorLicenseFacade.java
new file mode 100644
index 0000000000..e36852d25f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/facade/VendorLicenseFacade.java
@@ -0,0 +1,89 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.facade;
+
+import org.openecomp.sdc.common.errors.ErrorCode;
+import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
+import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity;
+import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupModel;
+import org.openecomp.sdc.vendorlicense.dao.types.LicenseAgreementEntity;
+import org.openecomp.sdc.vendorlicense.dao.types.LicenseAgreementModel;
+import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyGroupEntity;
+import org.openecomp.sdc.vendorlicense.dao.types.VendorLicenseModelEntity;
+import org.openecomp.sdc.vendorlicense.types.VersionedVendorLicenseModel;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.types.VersionInfo;
+import org.openecomp.sdc.versioning.types.VersionableEntityAction;
+
+import java.util.Collection;
+
+public interface VendorLicenseFacade {
+
+ void checkin(String vendorLicenseModelId, String user);
+
+ void submit(String vendorLicenseModelId, String user);
+
+ FeatureGroupEntity getFeatureGroup(FeatureGroupEntity featureGroup, String user);
+
+ FeatureGroupModel getFeatureGroupModel(FeatureGroupEntity featureGroup, String user);
+
+ LicenseAgreementEntity getLicenseAgreement(String vlmId, Version version,
+ String licenseAgreementId, String user);
+
+ LicenseAgreementModel getLicenseAgreementModel(String vlmId, Version version,
+ String licenseAgreementId, String user);
+
+ EntitlementPoolEntity createEntitlementPool(EntitlementPoolEntity entitlementPool, String user);
+
+ LicenseKeyGroupEntity createLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup, String user);
+
+ void updateEntitlementPool(EntitlementPoolEntity entitlementPool, String user);
+
+ Collection<LicenseKeyGroupEntity> listLicenseKeyGroups(String vlmId, Version version,
+ String user);
+
+ Collection<EntitlementPoolEntity> listEntitlementPools(String vlmId, Version version,
+ String user);
+
+ void updateLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup, String user);
+
+
+ VersionedVendorLicenseModel getVendorLicenseModel(String vlmId, Version version, String user);
+
+ VendorLicenseModelEntity createVendorLicenseModel(
+ VendorLicenseModelEntity vendorLicenseModelEntity, String user);
+
+
+ LicenseAgreementEntity createLicenseAgreement(LicenseAgreementEntity licenseAgreement,
+ String user);
+
+ FeatureGroupEntity createFeatureGroup(FeatureGroupEntity featureGroup, String user);
+
+
+ Collection<ErrorCode> validateLicensingData(String vlmId, Version vlmVersion,
+ String licenseAgreementId,
+ Collection<String> featureGroupIds);
+
+ VersionInfo getVersionInfo(String vendorLicenseModelId, VersionableEntityAction action,
+ String user);
+
+ void updateVlmLastModificationTime(String vendorLicenseModelId, Version version);
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/facade/VendorLicenseFacadeFactory.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/facade/VendorLicenseFacadeFactory.java
new file mode 100644
index 0000000000..540cc5ba66
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/facade/VendorLicenseFacadeFactory.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.facade;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class VendorLicenseFacadeFactory
+ extends AbstractComponentFactory<VendorLicenseFacade> {
+
+ public static VendorLicenseFacadeFactory getInstance() {
+ return AbstractFactory.getInstance(VendorLicenseFacadeFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/healing/HealingService.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/healing/HealingService.java
new file mode 100644
index 0000000000..027cb1e5be
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/healing/HealingService.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.healing;
+
+import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
+
+public interface HealingService {
+
+ // VersionableEntity heal(VersionableEntity toHeal, String user);
+ VersionableEntity heal(VersionableEntity toHeal, String user);
+}
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/VendorLicenseArtifactsService.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/VendorLicenseArtifactsService.java
new file mode 100644
index 0000000000..c0610a99cd
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/VendorLicenseArtifactsService.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.licenseartifacts;
+
+import org.openecomp.core.utilities.file.FileContentHandler;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.util.List;
+
+public interface VendorLicenseArtifactsService {
+
+ FileContentHandler createLicenseArtifacts(String vspId, String vlmId, Version vlmVersion,
+ List<String> featureGroups, String user);
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/types/VersionedVendorLicenseModel.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/types/VersionedVendorLicenseModel.java
new file mode 100644
index 0000000000..deb321f14e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/types/VersionedVendorLicenseModel.java
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.types;
+
+import org.openecomp.sdc.vendorlicense.dao.types.VendorLicenseModelEntity;
+import org.openecomp.sdc.versioning.types.VersionInfo;
+
+public class VersionedVendorLicenseModel {
+ private VendorLicenseModelEntity vendorLicenseModel;
+ private VersionInfo versionInfo;
+
+ public VersionedVendorLicenseModel() {
+ }
+
+ public VersionedVendorLicenseModel(VendorLicenseModelEntity vendorLicenseModel,
+ VersionInfo versionInfo) {
+ this.vendorLicenseModel = vendorLicenseModel;
+ this.versionInfo = versionInfo;
+ }
+
+ public VendorLicenseModelEntity getVendorLicenseModel() {
+ return vendorLicenseModel;
+ }
+
+ public void setVendorLicenseModel(VendorLicenseModelEntity vendorLicenseModel) {
+ this.vendorLicenseModel = vendorLicenseModel;
+ }
+
+ public VersionInfo getVersionInfo() {
+ return versionInfo;
+ }
+
+ public void setVersionInfo(VersionInfo versionInfo) {
+ this.versionInfo = versionInfo;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/resources/factoryConfiguration.json b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/resources/factoryConfiguration.json
new file mode 100644
index 0000000000..7f59b42103
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/resources/factoryConfiguration.json
@@ -0,0 +1,11 @@
+{
+ "org.openecomp.sdc.vendorlicense.VendorLicenseArtifactServiceFactory": "org.openecomp.sdc.vendorlicense.VendorLicenseArtifactServiceFactoryImpl",
+ "org.openecomp.sdc.vendorlicense.HealingServiceFactory": "org.openecomp.sdc.vendorlicense.SimpleHealingServiceServiceFactoryImpl",
+ "org.openecomp.sdc.vendorlicense.facade.VendorLicenseFacadeFactory": "org.openecomp.sdc.vendorlicense.facade.impl.VendorLicenseFacadeFactoryImpl",
+ "org.openecomp.sdc.vendorlicense.dao.VendorLicenseModelDaoFactory": "org.openecomp.sdc.vendorlicense.dao.impl.VendorLicenseModelDaoFactoryImpl",
+ "org.openecomp.sdc.vendorlicense.dao.LicenseAgreementDaoFactory": "org.openecomp.sdc.vendorlicense.dao.impl.LicenseAgreementDaoFactoryImpl",
+ "org.openecomp.sdc.vendorlicense.dao.FeatureGroupDaoFactory": "org.openecomp.sdc.vendorlicense.dao.impl.FeatureGroupDaoFactoryImpl",
+ "org.openecomp.sdc.vendorlicense.dao.LicenseKeyGroupDaoFactory": "org.openecomp.sdc.vendorlicense.dao.impl.LicenseKeyGroupDaoFactoryImpl",
+ "org.openecomp.sdc.vendorlicense.dao.EntitlementPoolDaoFactory": "org.openecomp.sdc.vendorlicense.dao.impl.EntitlementPoolDaoFactoryImpl"
+
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/pom.xml b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/pom.xml
new file mode 100644
index 0000000000..7b66b2a505
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/pom.xml
@@ -0,0 +1,48 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>openecomp-sdc-vendor-license-core</name>
+ <artifactId>openecomp-sdc-vendor-license-core</artifactId>
+
+ <parent>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../..</relativePath>
+ </parent>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-vendor-license-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <scope>test</scope>
+ <version>1.10.19</version>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <scope>test</scope>
+ <version>6.8.5</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>snakeyaml</artifactId>
+ <groupId>org.yaml</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ <version>RELEASE</version>
+ </dependency>
+ </dependencies>
+
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/SimpleHealingServiceServiceFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/SimpleHealingServiceServiceFactoryImpl.java
new file mode 100644
index 0000000000..79973bb888
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/SimpleHealingServiceServiceFactoryImpl.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense;
+
+import org.openecomp.sdc.vendorlicense.healing.HealingService;
+import org.openecomp.sdc.vendorlicense.healing.impl.SimpleHealingServiceImpl;
+
+public class SimpleHealingServiceServiceFactoryImpl extends HealingServiceFactory {
+ private static HealingService INSTANCE = new SimpleHealingServiceImpl();
+
+ @Override
+ public HealingService createInterface() {
+ return INSTANCE;
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/VendorLicenseArtifactServiceFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/VendorLicenseArtifactServiceFactoryImpl.java
new file mode 100644
index 0000000000..582b0e2094
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/VendorLicenseArtifactServiceFactoryImpl.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense;
+
+import org.openecomp.sdc.vendorlicense.licenseartifacts.VendorLicenseArtifactsService;
+import org.openecomp.sdc.vendorlicense.licenseartifacts.impl.VendorLicenseArtifactsServiceImpl;
+
+public class VendorLicenseArtifactServiceFactoryImpl extends VendorLicenseArtifactServiceFactory {
+ private static VendorLicenseArtifactsService INSTANCE = new VendorLicenseArtifactsServiceImpl();
+
+ @Override
+ public VendorLicenseArtifactsService createInterface() {
+ return INSTANCE;
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/EntitlementPoolCassandraDaoImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/EntitlementPoolCassandraDaoImpl.java
new file mode 100644
index 0000000000..1722f8f8de
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/EntitlementPoolCassandraDaoImpl.java
@@ -0,0 +1,148 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.impl;
+
+import com.datastax.driver.core.ResultSet;
+import com.datastax.driver.core.UDTValue;
+import com.datastax.driver.mapping.Mapper;
+import com.datastax.driver.mapping.Result;
+import com.datastax.driver.mapping.UDTMapper;
+import com.datastax.driver.mapping.annotations.Accessor;
+import com.datastax.driver.mapping.annotations.Query;
+import org.openecomp.core.dao.impl.CassandraBaseDao;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import org.openecomp.core.utilities.CommonMethods;
+import org.openecomp.sdc.vendorlicense.VendorLicenseConstants;
+import org.openecomp.sdc.vendorlicense.dao.EntitlementPoolDao;
+import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
+import org.openecomp.sdc.versioning.VersioningManagerFactory;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.types.UniqueValueMetadata;
+import org.openecomp.sdc.versioning.types.VersionableEntityMetadata;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Set;
+
+public class EntitlementPoolCassandraDaoImpl extends CassandraBaseDao<EntitlementPoolEntity>
+ implements EntitlementPoolDao {
+
+ private static NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static Mapper<EntitlementPoolEntity> mapper =
+ noSqlDb.getMappingManager().mapper(EntitlementPoolEntity.class);
+ private static EntitlementPoolAccessor accessor =
+ noSqlDb.getMappingManager().createAccessor(EntitlementPoolAccessor.class);
+ private static UDTMapper<Version> versionMapper =
+ noSqlDb.getMappingManager().udtMapper(Version.class);
+
+ @Override
+ public void registerVersioning(String versionableEntityType) {
+ VersionableEntityMetadata metadata = new VersionableEntityMetadata(
+ mapper.getTableMetadata().getName(),
+ mapper.getTableMetadata().getPartitionKey().get(0).getName(),
+ mapper.getTableMetadata().getPartitionKey().get(1).getName());
+
+ metadata.setUniqueValuesMetadata(Collections.singletonList(
+ new UniqueValueMetadata(VendorLicenseConstants.UniqueValues.ENTITLEMENT_POOL_NAME,
+ Arrays.asList(mapper.getTableMetadata().getPartitionKey().get(0).getName(),
+ mapper.getTableMetadata().getPartitionKey().get(1).getName(), "name"))));
+
+ VersioningManagerFactory.getInstance().createInterface()
+ .register(versionableEntityType, metadata);
+ }
+
+ @Override
+ protected Mapper<EntitlementPoolEntity> getMapper() {
+ return mapper;
+ }
+
+ @Override
+ protected Object[] getKeys(EntitlementPoolEntity entity) {
+ return new Object[]{entity.getVendorLicenseModelId(), versionMapper.toUDT(entity.getVersion()),
+ entity.getId()};
+ }
+
+ @Override
+ public Collection<EntitlementPoolEntity> list(EntitlementPoolEntity entity) {
+ return accessor.listByVlmVersion(entity.getVendorLicenseModelId(),
+ versionMapper.toUDT(entity.getVersion())).all();
+ }
+
+ @Override
+ public long count(EntitlementPoolEntity entity) {
+ return accessor.countByVlmVersion(entity.getVendorLicenseModelId(),
+ versionMapper.toUDT(entity.getVersion())).one().getLong("count");
+ }
+
+ @Override
+ public void deleteAll(EntitlementPoolEntity entity) {
+ accessor.deleteByVlmVersion(entity.getVendorLicenseModelId(),
+ versionMapper.toUDT(entity.getVersion())).all();
+ }
+
+ @Override
+ public void addReferencingFeatureGroup(EntitlementPoolEntity entity,
+ String referencingFeatureGroupId) {
+ accessor
+ .addReferencingFeatureGroups(CommonMethods.toSingleElementSet(referencingFeatureGroupId),
+ entity.getVendorLicenseModelId(), versionMapper.toUDT(entity.getVersion()),
+ entity.getId());
+ }
+
+ @Override
+ public void removeReferencingFeatureGroup(EntitlementPoolEntity entity,
+ String referencingFeatureGroupId) {
+ accessor
+ .removeReferencingFeatureGroups(CommonMethods.toSingleElementSet(referencingFeatureGroupId),
+ entity.getVendorLicenseModelId(), versionMapper.toUDT(entity.getVersion()),
+ entity.getId());
+ }
+
+ @Accessor
+ interface EntitlementPoolAccessor {
+
+ @Query("select * from entitlement_pool where vlm_id=? AND version=?")
+ Result<EntitlementPoolEntity> listByVlmVersion(String vendorLicenseModelId,
+ UDTValue vendorLicenseModelVersion);
+
+ @Query("delete from entitlement_pool where vlm_id=? AND version=?")
+ ResultSet deleteByVlmVersion(String vendorLicenseModelId, UDTValue vendorLicenseModelVersion);
+
+ @Query("select count(1) from entitlement_pool where vlm_id=? AND version=?")
+ ResultSet countByVlmVersion(String vendorLicenseModelId, UDTValue vendorLicenseModelVersion);
+
+ @Query(
+ "UPDATE entitlement_pool SET ref_fg_ids = ref_fg_ids + ? WHERE vlm_id=? AND version=? "
+ + "AND ep_id=?")
+ ResultSet addReferencingFeatureGroups(Set<String> referencingFeatureGroups,
+ String vendorLicenseModelId,
+ UDTValue vendorLicenseModelVersion, String id);
+
+ @Query(
+ "UPDATE entitlement_pool SET ref_fg_ids = ref_fg_ids - ? WHERE vlm_id=? AND version=? "
+ + "AND ep_id=?")
+ ResultSet removeReferencingFeatureGroups(Set<String> referencingFeatureGroups,
+ String vendorLicenseModelId,
+ UDTValue vendorLicenseModelVersion, String id);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/EntitlementPoolDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/EntitlementPoolDaoFactoryImpl.java
new file mode 100644
index 0000000000..c1046f79cd
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/EntitlementPoolDaoFactoryImpl.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.impl;
+
+import org.openecomp.sdc.vendorlicense.dao.EntitlementPoolDao;
+import org.openecomp.sdc.vendorlicense.dao.EntitlementPoolDaoFactory;
+
+public class EntitlementPoolDaoFactoryImpl extends EntitlementPoolDaoFactory {
+ private static EntitlementPoolDao INSTANCE = new EntitlementPoolCassandraDaoImpl();
+
+ @Override
+ public EntitlementPoolDao createInterface() {
+ return INSTANCE;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/FeatureGroupCassandraDaoImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/FeatureGroupCassandraDaoImpl.java
new file mode 100644
index 0000000000..86957a02c7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/FeatureGroupCassandraDaoImpl.java
@@ -0,0 +1,206 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.impl;
+
+import com.datastax.driver.core.ResultSet;
+import com.datastax.driver.core.UDTValue;
+import com.datastax.driver.mapping.Mapper;
+import com.datastax.driver.mapping.Result;
+import com.datastax.driver.mapping.UDTMapper;
+import com.datastax.driver.mapping.annotations.Accessor;
+import com.datastax.driver.mapping.annotations.Query;
+import org.openecomp.core.dao.impl.CassandraBaseDao;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import org.openecomp.core.utilities.CommonMethods;
+import org.openecomp.sdc.vendorlicense.VendorLicenseConstants;
+import org.openecomp.sdc.vendorlicense.dao.FeatureGroupDao;
+import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity;
+import org.openecomp.sdc.versioning.VersioningManagerFactory;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.types.UniqueValueMetadata;
+import org.openecomp.sdc.versioning.types.VersionableEntityMetadata;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+
+public class FeatureGroupCassandraDaoImpl extends CassandraBaseDao<FeatureGroupEntity>
+ implements FeatureGroupDao {
+
+ private static NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static Mapper<FeatureGroupEntity> mapper =
+ noSqlDb.getMappingManager().mapper(FeatureGroupEntity.class);
+ private static FeatureGroupAccessor accessor =
+ noSqlDb.getMappingManager().createAccessor(FeatureGroupAccessor.class);
+ private static UDTMapper<Version> versionMapper =
+ noSqlDb.getMappingManager().udtMapper(Version.class);
+
+ private static Set<String> emptyIfNull(Set<String> set) {
+ return set == null ? new HashSet<>() : set;
+ }
+
+ @Override
+ public void registerVersioning(String versionableEntityType) {
+ VersionableEntityMetadata metadata = new VersionableEntityMetadata(
+ mapper.getTableMetadata().getName(),
+ mapper.getTableMetadata().getPartitionKey().get(0).getName(),
+ mapper.getTableMetadata().getPartitionKey().get(1).getName());
+
+ metadata.setUniqueValuesMetadata(Collections.singletonList(
+ new UniqueValueMetadata(VendorLicenseConstants.UniqueValues.FEATURE_GROUP_NAME,
+ Arrays.asList(mapper.getTableMetadata().getPartitionKey().get(0).getName(),
+ mapper.getTableMetadata().getPartitionKey().get(1).getName(), "name"))));
+
+ VersioningManagerFactory.getInstance().createInterface()
+ .register(versionableEntityType, metadata);
+ }
+
+ @Override
+ protected Mapper<FeatureGroupEntity> getMapper() {
+ return mapper;
+ }
+
+ @Override
+ protected Object[] getKeys(FeatureGroupEntity entity) {
+ return new Object[]{entity.getVendorLicenseModelId(), versionMapper.toUDT(entity.getVersion()),
+ entity.getId()};
+ }
+
+ @Override
+ public long count(FeatureGroupEntity entity) {
+ return accessor.countByVlmVersion(entity.getVendorLicenseModelId(),
+ versionMapper.toUDT(entity.getVersion())).one().getLong("count");
+ }
+
+ @Override
+ public void updateFeatureGroup(FeatureGroupEntity entity,
+ Set<String> addedEntitlementPools,
+ Set<String> removedEntitlementPools,
+ Set<String> addedLicenseKeyGroups,
+ Set<String> removedLicenseKeyGroups) {
+ accessor.updateColumnsAndDeltaFeatureGroupIds(
+ entity.getName(),
+ entity.getDescription(),
+ entity.getPartNumber(),
+ emptyIfNull(addedEntitlementPools),
+ emptyIfNull(removedEntitlementPools),
+ emptyIfNull(addedLicenseKeyGroups),
+ emptyIfNull(removedLicenseKeyGroups),
+ entity.getVendorLicenseModelId(),
+ versionMapper.toUDT(entity.getVersion()),
+ entity.getId()
+ );
+ }
+
+ @Override
+ public Collection<FeatureGroupEntity> list(FeatureGroupEntity entity) {
+ return accessor.listByVlmVersion(entity.getVendorLicenseModelId(),
+ versionMapper.toUDT(entity.getVersion())).all();
+ }
+
+ @Override
+ public void deleteAll(FeatureGroupEntity entity) {
+ accessor.deleteByVlmVersion(entity.getVendorLicenseModelId(),
+ versionMapper.toUDT(entity.getVersion())).all();
+ }
+
+ @Override
+ public void addReferencingLicenseAgreement(FeatureGroupEntity entity, String licenseAgreementId) {
+ accessor.addReferencingLicenseAgreements(CommonMethods.toSingleElementSet(licenseAgreementId),
+ entity.getVendorLicenseModelId(), versionMapper.toUDT(entity.getVersion()), entity.getId());
+ }
+
+ @Override
+ public void removeReferencingLicenseAgreement(FeatureGroupEntity entity,
+ String licenseAgreementId) {
+ accessor
+ .removeReferencingLicenseAgreements(CommonMethods.toSingleElementSet(licenseAgreementId),
+ entity.getVendorLicenseModelId(), versionMapper.toUDT(entity.getVersion()),
+ entity.getId());
+ }
+
+ @Override
+ public void removeEntitlementPool(FeatureGroupEntity entity, String entitlementPoolId) {
+ accessor.removeEntitlementPools(CommonMethods.toSingleElementSet(entitlementPoolId),
+ entity.getVendorLicenseModelId(), versionMapper.toUDT(entity.getVersion()), entity.getId());
+ }
+
+ @Override
+ public void removeLicenseKeyGroup(FeatureGroupEntity entity, String licenseKeyGroupId) {
+ accessor.removeLicenseKeyGroup(CommonMethods.toSingleElementSet(licenseKeyGroupId),
+ entity.getVendorLicenseModelId(), versionMapper.toUDT(entity.getVersion()), entity.getId());
+ }
+
+ @Accessor
+ interface FeatureGroupAccessor {
+
+ @Query("select * from feature_group where vlm_id=? AND version=?")
+ Result<FeatureGroupEntity> listByVlmVersion(String vendorLicenseModelId, UDTValue version);
+
+ @Query("select count(1) from feature_group where vlm_id=? AND version=?")
+ ResultSet countByVlmVersion(String vendorLicenseModelId, UDTValue vendorLicenseModelVersion);
+
+ @Query("delete from feature_group where vlm_id=? AND version=?")
+ ResultSet deleteByVlmVersion(String vendorLicenseModelId, UDTValue vendorLicenseModelVersion);
+
+ @Query(
+ "update feature_group set name=?,description=?, part_num=?, ep_ids=ep_ids+ ?,"
+ + "ep_ids=ep_ids-?, lkg_ids=lkg_ids+?,lkg_ids=lkg_ids-? WHERE "
+ + "vlm_id=? AND version=? AND fg_id=?")
+ ResultSet updateColumnsAndDeltaFeatureGroupIds(String name, String description,
+ String partNumber,
+ Set<String> addedEntitlementPools,
+ Set<String> removedEntitlementPools,
+ Set<String> addedLicenseKeyGroups,
+ Set<String> removedLicenseKeyGroups,
+ String vendorLicenseModelId, UDTValue version,
+ String id);
+
+ @Query(
+ "UPDATE feature_group SET ref_la_ids = ref_la_ids "
+ + "+ ? WHERE vlm_id=? AND version=? AND fg_id=?")
+ ResultSet addReferencingLicenseAgreements(Set<String> licenseAgreementIds,
+ String vendorLicenseModelId, UDTValue version,
+ String id);
+
+ @Query(
+ "UPDATE feature_group SET ref_la_ids = ref_la_ids - ? "
+ + "WHERE vlm_id=? AND version=? AND fg_id=?")
+ ResultSet removeReferencingLicenseAgreements(Set<String> licenseAgreementIds,
+ String vendorLicenseModelId, UDTValue version,
+ String id);
+
+ @Query("UPDATE feature_group SET ep_ids = ep_ids - ? WHERE vlm_id=? AND version=? AND fg_id=?")
+ ResultSet removeEntitlementPools(Set<String> entitlementPoolIds, String vendorLicenseModelId,
+ UDTValue version, String id);
+
+ @Query(
+ "UPDATE feature_group SET lkg_ids = lkg_ids - ? WHERE vlm_id=? AND version=? AND fg_id=?")
+ ResultSet removeLicenseKeyGroup(Set<String> licenseKeyGroupIds, String vendorLicenseModelId,
+ UDTValue version, String id);
+
+ }
+}
+
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/FeatureGroupDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/FeatureGroupDaoFactoryImpl.java
new file mode 100644
index 0000000000..941b2b5ecc
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/FeatureGroupDaoFactoryImpl.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.impl;
+
+import org.openecomp.sdc.vendorlicense.dao.FeatureGroupDao;
+import org.openecomp.sdc.vendorlicense.dao.FeatureGroupDaoFactory;
+
+public class FeatureGroupDaoFactoryImpl extends FeatureGroupDaoFactory {
+ private static FeatureGroupDao INSTANCE = new FeatureGroupCassandraDaoImpl();
+
+ @Override
+ public FeatureGroupDao createInterface() {
+ return INSTANCE;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/LicenseAgreementCassandraDaoImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/LicenseAgreementCassandraDaoImpl.java
new file mode 100644
index 0000000000..6a7cc2aa60
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/LicenseAgreementCassandraDaoImpl.java
@@ -0,0 +1,160 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.impl;
+
+import com.datastax.driver.core.ResultSet;
+import com.datastax.driver.core.UDTValue;
+import com.datastax.driver.mapping.Mapper;
+import com.datastax.driver.mapping.Result;
+import com.datastax.driver.mapping.UDTMapper;
+import com.datastax.driver.mapping.annotations.Accessor;
+import com.datastax.driver.mapping.annotations.Query;
+import org.openecomp.core.dao.impl.CassandraBaseDao;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import org.openecomp.core.utilities.CommonMethods;
+import org.openecomp.sdc.vendorlicense.VendorLicenseConstants;
+import org.openecomp.sdc.vendorlicense.dao.LicenseAgreementDao;
+import org.openecomp.sdc.vendorlicense.dao.types.ChoiceOrOther;
+import org.openecomp.sdc.vendorlicense.dao.types.LicenseAgreementEntity;
+import org.openecomp.sdc.versioning.VersioningManagerFactory;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.types.UniqueValueMetadata;
+import org.openecomp.sdc.versioning.types.VersionableEntityMetadata;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+public class LicenseAgreementCassandraDaoImpl extends CassandraBaseDao<LicenseAgreementEntity>
+ implements LicenseAgreementDao {
+ private static NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static Mapper<LicenseAgreementEntity> mapper =
+ noSqlDb.getMappingManager().mapper(LicenseAgreementEntity.class);
+ private static LicenseAgreementAccessor accessor =
+ noSqlDb.getMappingManager().createAccessor(LicenseAgreementAccessor.class);
+ private static UDTMapper<ChoiceOrOther> choiceOrOtherMapper =
+ noSqlDb.getMappingManager().udtMapper(ChoiceOrOther.class);
+ private static UDTMapper<Version> versionMapper =
+ noSqlDb.getMappingManager().udtMapper(Version.class);
+
+ private static Set<String> emptyIfNull(Set<String> set) {
+ return set == null ? new HashSet<>() : set;
+ }
+
+ @Override
+ public void registerVersioning(String versionableEntityType) {
+ VersionableEntityMetadata metadata = new VersionableEntityMetadata(
+ mapper.getTableMetadata().getName(),
+ mapper.getTableMetadata().getPartitionKey().get(0).getName(),
+ mapper.getTableMetadata().getPartitionKey().get(1).getName());
+
+ metadata.setUniqueValuesMetadata(Collections.singletonList(
+ new UniqueValueMetadata(VendorLicenseConstants.UniqueValues.LICENSE_AGREEMENT_NAME,
+ Arrays.asList(mapper.getTableMetadata().getPartitionKey().get(0).getName(),
+ mapper.getTableMetadata().getPartitionKey().get(1).getName(), "name"))));
+
+ VersioningManagerFactory.getInstance().createInterface()
+ .register(versionableEntityType, metadata);
+ }
+
+ @Override
+ protected Mapper<LicenseAgreementEntity> getMapper() {
+ return mapper;
+ }
+
+ @Override
+ protected Object[] getKeys(LicenseAgreementEntity entity) {
+ return new Object[]{entity.getVendorLicenseModelId(), versionMapper.toUDT(entity.getVersion()),
+ entity.getId()};
+ }
+
+ @Override
+ public Collection<LicenseAgreementEntity> list(LicenseAgreementEntity entity) {
+ return accessor.listByVlmVersion(entity.getVendorLicenseModelId(),
+ versionMapper.toUDT(entity.getVersion())).all();
+ }
+
+ @Override
+ public long count(LicenseAgreementEntity entity) {
+ return accessor.countByVlmVersion(entity.getVendorLicenseModelId(),
+ versionMapper.toUDT(entity.getVersion())).one().getLong("count");
+ }
+
+ @Override
+ public void deleteAll(LicenseAgreementEntity entity) {
+ accessor.deleteByVlmVersion(entity.getVendorLicenseModelId(),
+ versionMapper.toUDT(entity.getVersion())).all();
+ }
+
+ @Override
+ public void removeFeatureGroup(LicenseAgreementEntity licenseAgreement, String featureGroupId) {
+ accessor.removeFeatureGroup(CommonMethods.toSingleElementSet(featureGroupId),
+ licenseAgreement.getVendorLicenseModelId(),
+ versionMapper.toUDT(licenseAgreement.getVersion()), licenseAgreement.getId());
+ }
+
+ @Override
+ public void updateColumnsAndDeltaFeatureGroupIds(LicenseAgreementEntity licenseAgreement,
+ Set<String> addedFeatureGroupIds,
+ Set<String> removedFeatureGroupIds) {
+ accessor.updateColumnsAndDeltaFeatureGroupIds(licenseAgreement.getName(),
+ licenseAgreement.getDescription(),
+ licenseAgreement.getLicenseTerm() == null ? null
+ : choiceOrOtherMapper.toUDT(licenseAgreement.getLicenseTerm()),
+ licenseAgreement.getRequirementsAndConstrains(),
+ emptyIfNull(addedFeatureGroupIds),
+ emptyIfNull(removedFeatureGroupIds),
+ licenseAgreement.getVendorLicenseModelId(),
+ versionMapper.toUDT(licenseAgreement.getVersion()),
+ licenseAgreement.getId());
+
+ }
+
+ @Accessor
+ interface LicenseAgreementAccessor {
+
+ @Query("SELECT * FROM license_agreement WHERE vlm_id=? and version=?")
+ Result<LicenseAgreementEntity> listByVlmVersion(String vendorLicenseModelId, UDTValue version);
+
+ @Query("select count(1) from license_agreement where vlm_id=? AND version=?")
+ ResultSet countByVlmVersion(String vendorLicenseModelId, UDTValue vendorLicenseModelVersion);
+
+ @Query("delete from license_agreement where vlm_id=? AND version=?")
+ ResultSet deleteByVlmVersion(String vendorLicenseModelId, UDTValue vendorLicenseModelVersion);
+
+ @Query(
+ "UPDATE license_agreement SET name=?, description=?, lic_term=?, req_const=?, "
+ + "fg_ids=fg_ids+?, fg_ids=fg_ids-? WHERE vlm_id=? AND version=? AND la_id=?")
+ ResultSet updateColumnsAndDeltaFeatureGroupIds(String name, String description,
+ UDTValue licenseTerm, String reqAndConst,
+ Set<String> addedFeatureGroupIds,
+ Set<String> removedFeatureGroupIds,
+ String vendorLicenseModelId, UDTValue version,
+ String id);
+
+ @Query("UPDATE license_agreement SET fg_ids=fg_ids-? WHERE vlm_id=? AND version=? AND la_id=?")
+ ResultSet removeFeatureGroup(Set<String> featureGroupIds, String vendorLicenseModelId,
+ UDTValue version, String id);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/LicenseAgreementDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/LicenseAgreementDaoFactoryImpl.java
new file mode 100644
index 0000000000..d92e2562e9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/LicenseAgreementDaoFactoryImpl.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.impl;
+
+import org.openecomp.sdc.vendorlicense.dao.LicenseAgreementDao;
+import org.openecomp.sdc.vendorlicense.dao.LicenseAgreementDaoFactory;
+
+public class LicenseAgreementDaoFactoryImpl extends LicenseAgreementDaoFactory {
+ private static LicenseAgreementDao INSTANCE = new LicenseAgreementCassandraDaoImpl();
+
+ @Override
+ public LicenseAgreementDao createInterface() {
+ return INSTANCE;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/LicenseKeyGroupCassandraDaoImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/LicenseKeyGroupCassandraDaoImpl.java
new file mode 100644
index 0000000000..c6952c8d03
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/LicenseKeyGroupCassandraDaoImpl.java
@@ -0,0 +1,130 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.impl;
+
+import com.datastax.driver.core.ResultSet;
+import com.datastax.driver.core.UDTValue;
+import com.datastax.driver.mapping.Mapper;
+import com.datastax.driver.mapping.Result;
+import com.datastax.driver.mapping.UDTMapper;
+import com.datastax.driver.mapping.annotations.Accessor;
+import com.datastax.driver.mapping.annotations.Query;
+import org.openecomp.core.dao.impl.CassandraBaseDao;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import org.openecomp.core.utilities.CommonMethods;
+import org.openecomp.sdc.vendorlicense.VendorLicenseConstants;
+import org.openecomp.sdc.vendorlicense.dao.LicenseKeyGroupDao;
+import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyGroupEntity;
+import org.openecomp.sdc.versioning.VersioningManagerFactory;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.types.UniqueValueMetadata;
+import org.openecomp.sdc.versioning.types.VersionableEntityMetadata;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Set;
+
+
+public class LicenseKeyGroupCassandraDaoImpl extends CassandraBaseDao<LicenseKeyGroupEntity>
+ implements LicenseKeyGroupDao {
+ private static NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static Mapper<LicenseKeyGroupEntity> mapper =
+ noSqlDb.getMappingManager().mapper(LicenseKeyGroupEntity.class);
+ private static LicenseKeyGroupAccessor accessor =
+ noSqlDb.getMappingManager().createAccessor(LicenseKeyGroupAccessor.class);
+ private static UDTMapper<Version> versionMapper =
+ noSqlDb.getMappingManager().udtMapper(Version.class);
+
+ @Override
+ public void registerVersioning(String versionableEntityType) {
+ VersionableEntityMetadata metadata = new VersionableEntityMetadata(
+ mapper.getTableMetadata().getName(),
+ mapper.getTableMetadata().getPartitionKey().get(0).getName(),
+ mapper.getTableMetadata().getPartitionKey().get(1).getName());
+
+ metadata.setUniqueValuesMetadata(Collections.singletonList(
+ new UniqueValueMetadata(VendorLicenseConstants.UniqueValues.LICENSE_KEY_GROUP_NAME,
+ Arrays.asList(mapper.getTableMetadata().getPartitionKey().get(0).getName(),
+ mapper.getTableMetadata().getPartitionKey().get(1).getName(), "name"))));
+
+ VersioningManagerFactory.getInstance().createInterface()
+ .register(versionableEntityType, metadata);
+ }
+
+ @Override
+ protected Mapper<LicenseKeyGroupEntity> getMapper() {
+ return mapper;
+ }
+
+ @Override
+ protected Object[] getKeys(LicenseKeyGroupEntity entity) {
+ return new Object[]{entity.getVendorLicenseModelId(), versionMapper.toUDT(entity.getVersion()),
+ entity.getId()};
+ }
+
+ @Override
+ public Collection<LicenseKeyGroupEntity> list(LicenseKeyGroupEntity entity) {
+ return accessor.listByVlmVersion(entity.getVendorLicenseModelId(),
+ versionMapper.toUDT(entity.getVersion())).all();
+ }
+
+ @Override
+ public void deleteAll(LicenseKeyGroupEntity entity) {
+ accessor.deleteByVlmVersion(entity.getVendorLicenseModelId(),
+ versionMapper.toUDT(entity.getVersion())).all();
+ }
+
+ @Override
+ public void addReferencingFeatureGroup(LicenseKeyGroupEntity entity, String featureGroupId) {
+ accessor.addReferencingFeatureGroups(CommonMethods.toSingleElementSet(featureGroupId),
+ entity.getVendorLicenseModelId(), versionMapper.toUDT(entity.getVersion()), entity.getId());
+ }
+
+ @Override
+ public void removeReferencingFeatureGroup(LicenseKeyGroupEntity entity, String featureGroupId) {
+ accessor.removeReferencingFeatureGroups(CommonMethods.toSingleElementSet(featureGroupId),
+ entity.getVendorLicenseModelId(), versionMapper.toUDT(entity.getVersion()), entity.getId());
+ }
+
+ @Accessor
+ interface LicenseKeyGroupAccessor {
+ @Query("select * from license_key_group where vlm_id=? and version=?")
+ Result<LicenseKeyGroupEntity> listByVlmVersion(String vendorLicenseModelId, UDTValue version);
+
+ @Query("delete from license_key_group where vlm_id=? and version=?")
+ Result<LicenseKeyGroupEntity> deleteByVlmVersion(String vendorLicenseModelId, UDTValue version);
+
+ @Query(
+ "UPDATE license_key_group SET ref_fg_ids = ref_fg_ids + ? WHERE vlm_id=? AND version=?"
+ + " AND lkg_id=?")
+ ResultSet addReferencingFeatureGroups(Set<String> referencingFeatureGroups,
+ String vendorLicenseModelId, UDTValue version, String id);
+
+ @Query(
+ "UPDATE license_key_group SET ref_fg_ids = ref_fg_ids - ? WHERE vlm_id=? AND version=? "
+ + "AND lkg_id=?")
+ ResultSet removeReferencingFeatureGroups(Set<String> referencingFeatureGroups,
+ String vendorLicenseModelId, UDTValue version,
+ String id);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/LicenseKeyGroupDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/LicenseKeyGroupDaoFactoryImpl.java
new file mode 100644
index 0000000000..16d1fd2a3e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/LicenseKeyGroupDaoFactoryImpl.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.impl;
+
+import org.openecomp.sdc.vendorlicense.dao.LicenseKeyGroupDao;
+import org.openecomp.sdc.vendorlicense.dao.LicenseKeyGroupDaoFactory;
+
+public class LicenseKeyGroupDaoFactoryImpl extends LicenseKeyGroupDaoFactory {
+ private static LicenseKeyGroupDao INSTANCE = new LicenseKeyGroupCassandraDaoImpl();
+
+ @Override
+ public LicenseKeyGroupDao createInterface() {
+ return INSTANCE;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/VendorLicenseModelCassandraDaoImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/VendorLicenseModelCassandraDaoImpl.java
new file mode 100644
index 0000000000..4d08d98bd7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/VendorLicenseModelCassandraDaoImpl.java
@@ -0,0 +1,91 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.impl;
+
+import com.datastax.driver.mapping.Mapper;
+import com.datastax.driver.mapping.Result;
+import com.datastax.driver.mapping.UDTMapper;
+import com.datastax.driver.mapping.annotations.Accessor;
+import com.datastax.driver.mapping.annotations.Query;
+import org.openecomp.core.dao.impl.CassandraBaseDao;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import org.openecomp.sdc.vendorlicense.dao.VendorLicenseModelDao;
+import org.openecomp.sdc.vendorlicense.dao.types.VendorLicenseModelEntity;
+import org.openecomp.sdc.versioning.VersioningManagerFactory;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.types.VersionableEntityMetadata;
+
+import java.util.Collection;
+
+public class VendorLicenseModelCassandraDaoImpl extends CassandraBaseDao<VendorLicenseModelEntity>
+ implements VendorLicenseModelDao {
+
+ private static NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static Mapper<VendorLicenseModelEntity> mapper =
+ noSqlDb.getMappingManager().mapper(VendorLicenseModelEntity.class);
+ private static VendorLicenseModelAccessor accessor =
+ noSqlDb.getMappingManager().createAccessor(VendorLicenseModelAccessor.class);
+ private static UDTMapper<Version> versionMapper =
+ noSqlDb.getMappingManager().udtMapper(Version.class);
+
+ @Override
+ public void registerVersioning(String versionableEntityType) {
+ VersioningManagerFactory.getInstance().createInterface()
+ .register(versionableEntityType, new VersionableEntityMetadata(
+ mapper.getTableMetadata().getName(),
+ mapper.getTableMetadata().getPartitionKey().get(0).getName(),
+ mapper.getTableMetadata().getPartitionKey().get(1).getName()));
+ }
+
+ @Override
+ protected Mapper<VendorLicenseModelEntity> getMapper() {
+ return mapper;
+ }
+
+ @Override
+ protected Object[] getKeys(VendorLicenseModelEntity entity) {
+ return new Object[]{entity.getId(), versionMapper.toUDT(entity.getVersion())};
+ }
+
+ @Override
+ public Collection<VendorLicenseModelEntity> list(VendorLicenseModelEntity vendorLicenseModel) {
+ return accessor.getAll().all();
+ }
+
+ // @Override
+ // public void updateLastModificationTime(VendorLicenseModelEntity vendorLicenseModel){
+ // accessor.updateLastModificationTime(vendorLicenseModel.getLastModificationTime(),
+ // vendorLicenseModel.getId(), versionMapper.toUDT(vendorLicenseModel.getVersion()));
+ // }
+
+ @Accessor
+ interface VendorLicenseModelAccessor {
+
+ @Query("SELECT * FROM vendor_license_model")
+ Result<VendorLicenseModelEntity> getAll();
+
+ // @Query("UPDATE vendor_license_model set last_modification_time
+ // = ? where vlm_id = ? and version = ?")
+ // ResultSet updateLastModificationTime(Date lastModificationTime,
+ // String vlmId, UDTValue version);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/VendorLicenseModelDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/VendorLicenseModelDaoFactoryImpl.java
new file mode 100644
index 0000000000..d218ca4907
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/VendorLicenseModelDaoFactoryImpl.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.dao.impl;
+
+import org.openecomp.sdc.vendorlicense.dao.VendorLicenseModelDao;
+import org.openecomp.sdc.vendorlicense.dao.VendorLicenseModelDaoFactory;
+
+public class VendorLicenseModelDaoFactoryImpl extends VendorLicenseModelDaoFactory {
+
+ private static VendorLicenseModelDao INSTANCE = new VendorLicenseModelCassandraDaoImpl();
+
+ @Override
+ public VendorLicenseModelDao createInterface() {
+ return INSTANCE;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/facade/impl/VendorLicenseFacadeFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/facade/impl/VendorLicenseFacadeFactoryImpl.java
new file mode 100644
index 0000000000..3cf6d0b806
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/facade/impl/VendorLicenseFacadeFactoryImpl.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.facade.impl;
+
+import org.openecomp.sdc.vendorlicense.facade.VendorLicenseFacade;
+import org.openecomp.sdc.vendorlicense.facade.VendorLicenseFacadeFactory;
+
+public class VendorLicenseFacadeFactoryImpl extends VendorLicenseFacadeFactory {
+ private static VendorLicenseFacade INSTANCE = new VendorLicenseFacadeImpl();
+
+ @Override
+ public VendorLicenseFacade createInterface() {
+ return INSTANCE;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/facade/impl/VendorLicenseFacadeImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/facade/impl/VendorLicenseFacadeImpl.java
new file mode 100644
index 0000000000..678a53583c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/facade/impl/VendorLicenseFacadeImpl.java
@@ -0,0 +1,478 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.facade.impl;
+
+import org.openecomp.core.util.UniqueValueUtil;
+import org.openecomp.core.utilities.CommonMethods;
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.common.errors.ErrorCode;
+import org.openecomp.sdc.vendorlicense.VendorLicenseConstants;
+import org.openecomp.sdc.vendorlicense.dao.EntitlementPoolDao;
+import org.openecomp.sdc.vendorlicense.dao.EntitlementPoolDaoFactory;
+import org.openecomp.sdc.vendorlicense.dao.FeatureGroupDao;
+import org.openecomp.sdc.vendorlicense.dao.FeatureGroupDaoFactory;
+import org.openecomp.sdc.vendorlicense.dao.LicenseAgreementDao;
+import org.openecomp.sdc.vendorlicense.dao.LicenseAgreementDaoFactory;
+import org.openecomp.sdc.vendorlicense.dao.LicenseKeyGroupDao;
+import org.openecomp.sdc.vendorlicense.dao.LicenseKeyGroupDaoFactory;
+import org.openecomp.sdc.vendorlicense.dao.VendorLicenseModelDao;
+import org.openecomp.sdc.vendorlicense.dao.VendorLicenseModelDaoFactory;
+import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
+import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity;
+import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupModel;
+import org.openecomp.sdc.vendorlicense.dao.types.LicenseAgreementEntity;
+import org.openecomp.sdc.vendorlicense.dao.types.LicenseAgreementModel;
+import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyGroupEntity;
+import org.openecomp.sdc.vendorlicense.dao.types.VendorLicenseModelEntity;
+import org.openecomp.sdc.vendorlicense.errors.SubmitUncompletedLicenseModelErrorBuilder;
+import org.openecomp.sdc.vendorlicense.errors.VendorLicenseModelNotFoundErrorBuilder;
+import org.openecomp.sdc.vendorlicense.facade.VendorLicenseFacade;
+import org.openecomp.sdc.vendorlicense.types.VersionedVendorLicenseModel;
+import org.openecomp.sdc.versioning.VersioningManager;
+import org.openecomp.sdc.versioning.VersioningManagerFactory;
+import org.openecomp.sdc.versioning.VersioningUtil;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.errors.RequestedVersionInvalidErrorBuilder;
+import org.openecomp.sdc.versioning.errors.VersionableSubEntityNotFoundErrorBuilder;
+import org.openecomp.sdc.versioning.types.VersionInfo;
+import org.openecomp.sdc.versioning.types.VersionableEntityAction;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+
+public class VendorLicenseFacadeImpl
+ implements VendorLicenseFacade {
+
+
+ private static final VersioningManager versioningManager =
+ VersioningManagerFactory.getInstance().createInterface();
+
+ private static final VendorLicenseModelDao vendorLicenseModelDao =
+ VendorLicenseModelDaoFactory.getInstance().createInterface();
+ private static final LicenseAgreementDao licenseAgreementDao =
+ LicenseAgreementDaoFactory.getInstance().createInterface();
+ private static final FeatureGroupDao featureGroupDao =
+ FeatureGroupDaoFactory.getInstance().createInterface();
+ private static final EntitlementPoolDao entitlementPoolDao =
+ EntitlementPoolDaoFactory.getInstance().createInterface();
+ private static final LicenseKeyGroupDao licenseKeyGroupDao =
+ LicenseKeyGroupDaoFactory.getInstance().createInterface();
+
+ /**
+ * Instantiates a new Vendor license facade.
+ */
+ public VendorLicenseFacadeImpl() {
+ vendorLicenseModelDao
+ .registerVersioning(VendorLicenseConstants.VENDOR_LICENSE_MODEL_VERSIONABLE_TYPE);
+ licenseAgreementDao
+ .registerVersioning(VendorLicenseConstants.VENDOR_LICENSE_MODEL_VERSIONABLE_TYPE);
+ featureGroupDao
+ .registerVersioning(VendorLicenseConstants.VENDOR_LICENSE_MODEL_VERSIONABLE_TYPE);
+ entitlementPoolDao
+ .registerVersioning(VendorLicenseConstants.VENDOR_LICENSE_MODEL_VERSIONABLE_TYPE);
+ licenseKeyGroupDao
+ .registerVersioning(VendorLicenseConstants.VENDOR_LICENSE_MODEL_VERSIONABLE_TYPE);
+ }
+
+ @Override
+ public void checkin(String vendorLicenseModelId, String user) {
+ Version newVersion = versioningManager
+ .checkin(VendorLicenseConstants
+ .VENDOR_LICENSE_MODEL_VERSIONABLE_TYPE,
+ vendorLicenseModelId, user, null);
+ updateVlmLastModificationTime(vendorLicenseModelId, newVersion);
+ }
+
+ @Override
+ public void submit(String vendorLicenseModelId, String user) {
+ validateCompletedVendorLicenseModel(vendorLicenseModelId, user);
+ Version newVersion = versioningManager
+ .submit(VendorLicenseConstants
+ .VENDOR_LICENSE_MODEL_VERSIONABLE_TYPE,
+ vendorLicenseModelId, user, null);
+ updateVlmLastModificationTime(vendorLicenseModelId, newVersion);
+ }
+
+ @Override
+ public FeatureGroupEntity getFeatureGroup(FeatureGroupEntity featureGroup, String user) {
+ Version version = VersioningUtil.resolveVersion(featureGroup.getVersion(),
+ getVersionInfo(featureGroup.getVendorLicenseModelId(), VersionableEntityAction.Read, user));
+ featureGroup.setVersion(version);
+ return getFeatureGroup(featureGroup);
+ }
+
+ private FeatureGroupEntity getFeatureGroup(FeatureGroupEntity featureGroup) {
+ FeatureGroupEntity retrieved = featureGroupDao.get(featureGroup);
+ VersioningUtil
+ .validateEntityExistence(retrieved, featureGroup, VendorLicenseModelEntity.ENTITY_TYPE);
+ return retrieved;
+ }
+
+ @Override
+ public FeatureGroupModel getFeatureGroupModel(FeatureGroupEntity featureGroup, String user) {
+ FeatureGroupEntity retrieved = getFeatureGroup(featureGroup, user);
+
+ FeatureGroupModel featureGroupModel = new FeatureGroupModel();
+ featureGroupModel.setFeatureGroup(retrieved);
+
+ for (String licenseKeyGroupId : retrieved.getLicenseKeyGroupIds()) {
+ featureGroupModel.getLicenseKeyGroups().add(licenseKeyGroupDao.get(
+ new LicenseKeyGroupEntity(retrieved.getVendorLicenseModelId(), retrieved.getVersion(),
+ licenseKeyGroupId)));
+ }
+ for (String entitlementPoolId : retrieved.getEntitlementPoolIds()) {
+ featureGroupModel.getEntitlementPools().add(entitlementPoolDao.get(
+ new EntitlementPoolEntity(retrieved.getVendorLicenseModelId(), retrieved.getVersion(),
+ entitlementPoolId)));
+ }
+
+ return featureGroupModel;
+ }
+
+ @Override
+ public LicenseAgreementEntity getLicenseAgreement(String vlmId, Version version,
+ String licenseAgreementId, String user) {
+ return getLicenseAgreement(vlmId, licenseAgreementId, VersioningUtil
+ .resolveVersion(version, getVersionInfo(vlmId, VersionableEntityAction.Read, user)));
+ }
+
+ private LicenseAgreementEntity getLicenseAgreement(String vlmId, String licenseAgreementId,
+ Version version) {
+ LicenseAgreementEntity input = new LicenseAgreementEntity(vlmId, version, licenseAgreementId);
+ LicenseAgreementEntity retrieved = licenseAgreementDao.get(input);
+ VersioningUtil.validateEntityExistence(retrieved, input, VendorLicenseModelEntity.ENTITY_TYPE);
+ return retrieved;
+ }
+
+ @Override
+ public LicenseAgreementModel getLicenseAgreementModel(String vlmId, Version version,
+ String licenseAgreementId, String user) {
+ LicenseAgreementEntity retrieved =
+ getLicenseAgreement(vlmId, version, licenseAgreementId, user);
+
+ LicenseAgreementModel licenseAgreementModel = new LicenseAgreementModel();
+ licenseAgreementModel.setLicenseAgreement(retrieved);
+
+ for (String featureGroupId : retrieved.getFeatureGroupIds()) {
+ licenseAgreementModel.getFeatureGroups().add(featureGroupDao
+ .get(new FeatureGroupEntity(vlmId, retrieved.getVersion(), featureGroupId)));
+ }
+
+ return licenseAgreementModel;
+ }
+
+ @Override
+ public EntitlementPoolEntity createEntitlementPool(EntitlementPoolEntity entitlementPool,
+ String user) {
+ entitlementPool.setVersion(
+ getVersionInfo(entitlementPool.getVendorLicenseModelId(), VersionableEntityAction.Write,
+ user).getActiveVersion());
+ entitlementPool.setId(CommonMethods.nextUuId());
+ entitlementPool.setVersionUuId(CommonMethods.nextUuId());
+ UniqueValueUtil.createUniqueValue(VendorLicenseConstants.UniqueValues.ENTITLEMENT_POOL_NAME,
+ entitlementPool.getVendorLicenseModelId(), entitlementPool.getVersion().toString(),
+ entitlementPool.getName());
+ entitlementPoolDao.create(entitlementPool);
+ updateVlmLastModificationTime(entitlementPool.getVendorLicenseModelId(),
+ entitlementPool.getVersion());
+ return entitlementPool;
+ }
+
+ @Override
+ public LicenseKeyGroupEntity createLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup,
+ String user) {
+ licenseKeyGroup.setVersion(
+ getVersionInfo(licenseKeyGroup.getVendorLicenseModelId(), VersionableEntityAction.Write,
+ user).getActiveVersion());
+ licenseKeyGroup.setId(CommonMethods.nextUuId());
+ licenseKeyGroup.setVersionUuId(CommonMethods.nextUuId());
+ UniqueValueUtil.createUniqueValue(VendorLicenseConstants.UniqueValues.LICENSE_KEY_GROUP_NAME,
+ licenseKeyGroup.getVendorLicenseModelId(), licenseKeyGroup.getVersion().toString(),
+ licenseKeyGroup.getName());
+ licenseKeyGroupDao.create(licenseKeyGroup);
+ updateVlmLastModificationTime(licenseKeyGroup.getVendorLicenseModelId(),
+ licenseKeyGroup.getVersion());
+ return licenseKeyGroup;
+ }
+
+ @Override
+ public void updateEntitlementPool(EntitlementPoolEntity entitlementPool, String user) {
+ entitlementPool.setVersion(
+ getVersionInfo(entitlementPool.getVendorLicenseModelId(), VersionableEntityAction.Write,
+ user).getActiveVersion());
+ EntitlementPoolEntity retrieved = entitlementPoolDao.get(entitlementPool);
+ VersioningUtil
+ .validateEntityExistence(retrieved, entitlementPool, VendorLicenseModelEntity.ENTITY_TYPE);
+
+ UniqueValueUtil.updateUniqueValue(VendorLicenseConstants.UniqueValues.ENTITLEMENT_POOL_NAME,
+ retrieved.getName(), entitlementPool.getName(), entitlementPool.getVendorLicenseModelId(),
+ entitlementPool.getVersion().toString());
+ entitlementPool.setVersionUuId(CommonMethods.nextUuId());
+ entitlementPoolDao.update(entitlementPool);
+
+ updateVlmLastModificationTime(entitlementPool.getVendorLicenseModelId(),
+ entitlementPool.getVersion());
+
+ }
+
+ @Override
+ public Collection<LicenseKeyGroupEntity> listLicenseKeyGroups(String vlmId, Version version,
+ String user) {
+ return licenseKeyGroupDao.list(new LicenseKeyGroupEntity(vlmId, VersioningUtil
+ .resolveVersion(version, getVersionInfo(vlmId, VersionableEntityAction.Read, user)), null));
+ }
+
+ @Override
+ public Collection<EntitlementPoolEntity> listEntitlementPools(String vlmId, Version version,
+ String user) {
+ return entitlementPoolDao.list(new EntitlementPoolEntity(vlmId, VersioningUtil
+ .resolveVersion(version, getVersionInfo(vlmId, VersionableEntityAction.Read, user)), null));
+ }
+
+ @Override
+ public void updateLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup, String user) {
+ licenseKeyGroup.setVersion(
+ getVersionInfo(licenseKeyGroup.getVendorLicenseModelId(), VersionableEntityAction.Write,
+ user).getActiveVersion());
+ LicenseKeyGroupEntity retrieved = licenseKeyGroupDao.get(licenseKeyGroup);
+ licenseKeyGroup.setVersionUuId((CommonMethods.nextUuId()));
+ VersioningUtil
+ .validateEntityExistence(retrieved, licenseKeyGroup, VendorLicenseModelEntity.ENTITY_TYPE);
+ UniqueValueUtil.updateUniqueValue(VendorLicenseConstants.UniqueValues.LICENSE_KEY_GROUP_NAME,
+ retrieved.getName(), licenseKeyGroup.getName(), licenseKeyGroup.getVendorLicenseModelId(),
+ licenseKeyGroup.getVersion().toString());
+ licenseKeyGroupDao.update(licenseKeyGroup);
+
+ updateVlmLastModificationTime(licenseKeyGroup.getVendorLicenseModelId(),
+ licenseKeyGroup.getVersion());
+ }
+
+
+ @Override
+ public VersionInfo getVersionInfo(String vendorLicenseModelId, VersionableEntityAction action,
+ String user) {
+ return versioningManager
+ .getEntityVersionInfo(VendorLicenseConstants
+ .VENDOR_LICENSE_MODEL_VERSIONABLE_TYPE,
+ vendorLicenseModelId, user,
+ action);
+ }
+
+ @Override
+ public VersionedVendorLicenseModel getVendorLicenseModel(String vlmId, Version version,
+ String user) {
+ VersionInfo versionInfo = getVersionInfo(vlmId, VersionableEntityAction.Read, user);
+
+ VendorLicenseModelEntity vendorLicenseModel = vendorLicenseModelDao.get(
+ new VendorLicenseModelEntity(vlmId, VersioningUtil.resolveVersion(version, versionInfo)));
+ if (vendorLicenseModel == null) {
+ throw new CoreException(new VendorLicenseModelNotFoundErrorBuilder(vlmId).build());
+ }
+
+ return new VersionedVendorLicenseModel(vendorLicenseModel, versionInfo);
+ }
+
+ @Override
+ public VendorLicenseModelEntity createVendorLicenseModel(
+ VendorLicenseModelEntity vendorLicenseModelEntity, String user) {
+ UniqueValueUtil.validateUniqueValue(VendorLicenseConstants.UniqueValues.VENDOR_NAME,
+ vendorLicenseModelEntity.getVendorName());
+ vendorLicenseModelEntity.setId(CommonMethods.nextUuId());
+
+ Version version = versioningManager
+ .create(VendorLicenseConstants
+ .VENDOR_LICENSE_MODEL_VERSIONABLE_TYPE,
+ vendorLicenseModelEntity.getId(), user);
+ vendorLicenseModelEntity.setVersion(version);
+
+ // vendorLicenseModelEntity.setLastModificationTime(new Date());
+
+ vendorLicenseModelDao.create(vendorLicenseModelEntity);
+ UniqueValueUtil.createUniqueValue(VendorLicenseConstants.UniqueValues.VENDOR_NAME,
+ vendorLicenseModelEntity.getVendorName());
+
+ return vendorLicenseModelEntity;
+ }
+
+ @Override
+ public LicenseAgreementEntity createLicenseAgreement(LicenseAgreementEntity licenseAgreement,
+ String user) {
+ Version activeVersion =
+ getVersionInfo(licenseAgreement.getVendorLicenseModelId(), VersionableEntityAction.Write,
+ user).getActiveVersion();
+ licenseAgreement.setVersion(activeVersion);
+ licenseAgreement.setId(CommonMethods.nextUuId());
+ VersioningUtil.validateEntitiesExistence(licenseAgreement.getFeatureGroupIds(),
+ new FeatureGroupEntity(licenseAgreement.getVendorLicenseModelId(), activeVersion, null),
+ featureGroupDao, VendorLicenseModelEntity.ENTITY_TYPE);
+ UniqueValueUtil.validateUniqueValue(VendorLicenseConstants.UniqueValues.LICENSE_AGREEMENT_NAME,
+ licenseAgreement.getVendorLicenseModelId(), licenseAgreement.getVersion().toString(),
+ licenseAgreement.getName());
+
+ if (licenseAgreement.getFeatureGroupIds() != null) {
+ for (String addedFgId : licenseAgreement.getFeatureGroupIds()) {
+ featureGroupDao.addReferencingLicenseAgreement(
+ new FeatureGroupEntity(licenseAgreement.getVendorLicenseModelId(), activeVersion,
+ addedFgId), licenseAgreement.getId());
+ }
+ }
+
+ licenseAgreementDao.create(licenseAgreement);
+ UniqueValueUtil.createUniqueValue(VendorLicenseConstants.UniqueValues.LICENSE_AGREEMENT_NAME,
+ licenseAgreement.getVendorLicenseModelId(), licenseAgreement.getVersion().toString(),
+ licenseAgreement.getName());
+
+ updateVlmLastModificationTime(licenseAgreement.getVendorLicenseModelId(),
+ licenseAgreement.getVersion());
+
+ return licenseAgreement;
+ }
+
+ @Override
+ public FeatureGroupEntity createFeatureGroup(FeatureGroupEntity featureGroup, String user) {
+ Version activeVersion =
+ getVersionInfo(featureGroup.getVendorLicenseModelId(), VersionableEntityAction.Write, user)
+ .getActiveVersion();
+ featureGroup.setId(CommonMethods.nextUuId());
+ featureGroup.setVersion(activeVersion);
+ VersioningUtil.validateEntitiesExistence(featureGroup.getLicenseKeyGroupIds(),
+ new LicenseKeyGroupEntity(featureGroup.getVendorLicenseModelId(), activeVersion, null),
+ licenseKeyGroupDao, VendorLicenseModelEntity.ENTITY_TYPE);
+ VersioningUtil.validateEntitiesExistence(featureGroup.getEntitlementPoolIds(),
+ new EntitlementPoolEntity(featureGroup.getVendorLicenseModelId(), activeVersion, null),
+ entitlementPoolDao, VendorLicenseModelEntity.ENTITY_TYPE);
+ UniqueValueUtil.validateUniqueValue(VendorLicenseConstants.UniqueValues.FEATURE_GROUP_NAME,
+ featureGroup.getVendorLicenseModelId(), featureGroup.getVersion().toString(),
+ featureGroup.getName());
+
+ if (featureGroup.getLicenseKeyGroupIds() != null) {
+ for (String addedLkgId : featureGroup.getLicenseKeyGroupIds()) {
+ licenseKeyGroupDao.addReferencingFeatureGroup(
+ new LicenseKeyGroupEntity(featureGroup.getVendorLicenseModelId(), activeVersion,
+ addedLkgId), featureGroup.getId());
+ }
+ }
+
+ if (featureGroup.getEntitlementPoolIds() != null) {
+ for (String addedEpId : featureGroup.getEntitlementPoolIds()) {
+ entitlementPoolDao.addReferencingFeatureGroup(
+ new EntitlementPoolEntity(featureGroup.getVendorLicenseModelId(), activeVersion,
+ addedEpId), featureGroup.getId());
+ }
+ }
+
+ featureGroupDao.create(featureGroup);
+ UniqueValueUtil.createUniqueValue(VendorLicenseConstants.UniqueValues.FEATURE_GROUP_NAME,
+ featureGroup.getVendorLicenseModelId(), featureGroup.getVersion().toString(),
+ featureGroup.getName());
+
+ updateVlmLastModificationTime(featureGroup.getVendorLicenseModelId(),
+ featureGroup.getVersion());
+
+ return featureGroup;
+ }
+
+
+ @Override
+ public Collection<ErrorCode> validateLicensingData(String vlmId, Version version,
+ String licenseAgreementId,
+ Collection<String> featureGroupIds) {
+ try {
+ VersionInfo versionInfo = getVersionInfo(vlmId, VersionableEntityAction.Read, "");
+ if (version == null || !version.isFinal()
+ || !versionInfo.getViewableVersions().contains(version)) {
+ return Collections.singletonList(new RequestedVersionInvalidErrorBuilder().build());
+ }
+ } catch (CoreException coreException) {
+ return Collections.singletonList(coreException.code());
+ }
+
+ List<ErrorCode> errorMessages = new ArrayList<>();
+
+ try {
+ getLicenseAgreement(vlmId, licenseAgreementId, version);
+ } catch (CoreException coreException) {
+ errorMessages.add(coreException.code());
+ }
+
+ for (String featureGroupId : featureGroupIds) {
+ try {
+ FeatureGroupEntity featureGroup =
+ getFeatureGroup(new FeatureGroupEntity(vlmId, version, featureGroupId));
+ if (!featureGroup.getReferencingLicenseAgreements().contains(licenseAgreementId)) {
+ errorMessages.add(new VersionableSubEntityNotFoundErrorBuilder(
+ featureGroup.getEntityType(),
+ featureGroupId,
+ LicenseAgreementEntity.ENTITY_TYPE,
+ licenseAgreementId,
+ version).build());
+ }
+ } catch (CoreException coreException) {
+ errorMessages.add(coreException.code());
+ }
+ }
+
+ return errorMessages;
+ }
+
+ @Override
+ public void updateVlmLastModificationTime(String vendorLicenseModelId, Version version) {
+ VendorLicenseModelEntity retrieved =
+ vendorLicenseModelDao.get(new VendorLicenseModelEntity(vendorLicenseModelId, version));
+ vendorLicenseModelDao.update(retrieved);
+ // entity.setLastModificationTime(new Date());
+ //
+ // vendorLicenseModelDao.updateLastModificationTime(entity);
+ }
+
+ private void validateCompletedVendorLicenseModel(String vendorLicenseModelId, String user) {
+ Version activeVersion =
+ getVersionInfo(vendorLicenseModelId, VersionableEntityAction.Read, user).getActiveVersion();
+ Collection<LicenseAgreementEntity> licenseAgreements = licenseAgreementDao
+ .list(new LicenseAgreementEntity(vendorLicenseModelId, activeVersion, null));
+
+ if (licenseAgreements == null || licenseAgreements.isEmpty()) {
+ throw new CoreException(
+ new SubmitUncompletedLicenseModelErrorBuilder(vendorLicenseModelId).build());
+ }
+
+ for (LicenseAgreementEntity licenseAgreement : licenseAgreements) {
+ if (licenseAgreement.getFeatureGroupIds() == null
+ || licenseAgreement.getFeatureGroupIds().isEmpty()) {
+ throw new CoreException(
+ new SubmitUncompletedLicenseModelErrorBuilder(vendorLicenseModelId).build());
+ }
+ }
+
+ Collection<FeatureGroupEntity> featureGroupEntities = featureGroupDao
+ .list(new FeatureGroupEntity(vendorLicenseModelId, activeVersion, null));
+ for (FeatureGroupEntity featureGroupEntity : featureGroupEntities) {
+ if (featureGroupEntity.getEntitlementPoolIds() == null
+ || featureGroupEntity.getEntitlementPoolIds().isEmpty()) {
+ throw new CoreException(
+ new SubmitUncompletedLicenseModelErrorBuilder(vendorLicenseModelId).build());
+ }
+ }
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/healing/impl/SimpleHealingServiceImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/healing/impl/SimpleHealingServiceImpl.java
new file mode 100644
index 0000000000..8f8f34e471
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/healing/impl/SimpleHealingServiceImpl.java
@@ -0,0 +1,63 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.healing.impl;
+
+import org.openecomp.sdc.vendorlicense.dao.EntitlementPoolDao;
+import org.openecomp.sdc.vendorlicense.dao.EntitlementPoolDaoFactory;
+import org.openecomp.sdc.vendorlicense.dao.LicenseKeyGroupDao;
+import org.openecomp.sdc.vendorlicense.dao.LicenseKeyGroupDaoFactory;
+import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
+import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyGroupEntity;
+import org.openecomp.sdc.vendorlicense.healing.HealingService;
+import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
+
+public class SimpleHealingServiceImpl implements HealingService {
+ private static final EntitlementPoolDao entitlementPoolDao =
+ EntitlementPoolDaoFactory.getInstance().createInterface();
+ private static final LicenseKeyGroupDao licenseKeyGroupDao =
+ LicenseKeyGroupDaoFactory.getInstance().createInterface();
+
+ @Override
+ public VersionableEntity heal(VersionableEntity toHeal, String user) {
+ return handleMissingVersionId(toHeal, user);
+ }
+
+ private VersionableEntity handleMissingVersionId(VersionableEntity toHeal, String user) {
+ if (toHeal.getVersionUuId() != null) {
+ return toHeal;
+ }
+
+
+ if (toHeal instanceof EntitlementPoolEntity) {
+ toHeal.setVersionUuId(toHeal.getId());
+ entitlementPoolDao.update((EntitlementPoolEntity) toHeal);
+ } else if (toHeal instanceof LicenseKeyGroupEntity) {
+ toHeal.setVersionUuId(toHeal.getId());
+ licenseKeyGroupDao.update((LicenseKeyGroupEntity) toHeal);
+ } else {
+ throw new UnsupportedOperationException(
+ "Unsupported operation for 1610 release/1607->1610 migration.");
+ //todo maybe errorbuilder?
+ }
+ return toHeal;
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/VendorLicenseArtifactsServiceImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/VendorLicenseArtifactsServiceImpl.java
new file mode 100644
index 0000000000..2f11b75a98
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/VendorLicenseArtifactsServiceImpl.java
@@ -0,0 +1,200 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.licenseartifacts.impl;
+
+import org.apache.commons.collections4.MultiValuedMap;
+import org.apache.commons.collections4.multimap.ArrayListValuedHashMap;
+import org.openecomp.core.utilities.file.FileContentHandler;
+import org.openecomp.sdc.vendorlicense.HealingServiceFactory;
+import org.openecomp.sdc.vendorlicense.VendorLicenseConstants;
+import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
+import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity;
+import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupModel;
+import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyGroupEntity;
+import org.openecomp.sdc.vendorlicense.facade.VendorLicenseFacade;
+import org.openecomp.sdc.vendorlicense.facade.VendorLicenseFacadeFactory;
+import org.openecomp.sdc.vendorlicense.healing.HealingService;
+import org.openecomp.sdc.vendorlicense.licenseartifacts.VendorLicenseArtifactsService;
+import org.openecomp.sdc.vendorlicense.licenseartifacts.impl.types.VendorLicenseArtifact;
+import org.openecomp.sdc.vendorlicense.licenseartifacts.impl.types.VnfLicenseArtifact;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
+import org.openecomp.sdc.versioning.types.VersionInfo;
+import org.openecomp.sdc.versioning.types.VersionableEntityAction;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+public class VendorLicenseArtifactsServiceImpl implements VendorLicenseArtifactsService {
+
+ private static final VendorLicenseFacade vendorLicenseFacade = VendorLicenseFacadeFactory
+ .getInstance().createInterface();
+ private static final HealingService healingService = HealingServiceFactory
+ .getInstance().createInterface();
+
+ /**
+ * Create License Artifacts.
+ *
+ * @param vspId the vsp id
+ * @param vlmId the vlm id
+ * @param vlmVersion the vlm version
+ * @param featureGroups the feature groups
+ * @param user the user
+ * @return FileContentHandler
+ */
+ public FileContentHandler createLicenseArtifacts(String vspId, String vlmId,
+ Version vlmVersion,
+ List<String> featureGroups, String user) {
+ FileContentHandler artifacts = new FileContentHandler();
+ String vendorName = getVendorName(vlmId, user);
+
+ artifacts.addFile(VendorLicenseConstants.VNF_ARTIFACT_NAME_WITH_PATH,
+ createVnfArtifact(vspId, vlmId, vlmVersion, vendorName, featureGroups, user));
+ artifacts.addFile(VendorLicenseConstants.VENDOR_LICENSE_MODEL_ARTIFACT_NAME_WITH_PATH,
+ createVendorLicenseArtifact(vlmId, vendorName, user));
+
+ return artifacts;
+ }
+
+ static byte[] createVnfArtifact(
+ String vspId, String vlmId, Version vlmVersion,
+ String vendorName, List<String> featureGroups,
+ String user) {
+ VnfLicenseArtifact artifact = new VnfLicenseArtifact();
+
+ artifact.setVspId(vspId);
+ artifact.setVendorName(vendorName);
+ for (String featureGroupId : featureGroups) {
+ FeatureGroupModel featureGroupModel =
+ vendorLicenseFacade.getFeatureGroupModel(new FeatureGroupEntity(
+ vlmId, vlmVersion, featureGroupId), user);
+ Set<EntitlementPoolEntity> entitlementPoolEntities = featureGroupModel.getEntitlementPools();
+ Set<LicenseKeyGroupEntity> licenseKeyGroupEntities = featureGroupModel.getLicenseKeyGroups();
+
+ featureGroupModel.setEntitlementPools(
+ entitlementPoolEntities.stream()
+ .map(entitlementPoolEntity -> (EntitlementPoolEntity) healingService
+ .heal(entitlementPoolEntity, user))
+ .collect(Collectors.toSet()));
+ featureGroupModel.setLicenseKeyGroups(
+ licenseKeyGroupEntities.stream()
+ .map(licenseKeyGroupEntity -> (LicenseKeyGroupEntity) healingService
+ .heal(licenseKeyGroupEntity, user))
+ .collect(Collectors.toSet()));
+ artifact.getFeatureGroups().add(featureGroupModel);
+ }
+
+ return artifact.toXml().getBytes();
+ }
+
+
+ static byte[] createVendorLicenseArtifact(String vlmId, String vendorName, String user) {
+ VendorLicenseArtifact vendorLicenseArtifact = new VendorLicenseArtifact();
+ vendorLicenseArtifact.setVendorName(vendorName);
+ Set<EntitlementPoolEntity> entitlementPoolEntities = new HashSet<>();
+ Set<LicenseKeyGroupEntity> licenseKeyGroupEntities = new HashSet<>();
+
+ List<Version> finalVersions = getFinalVersionsForVlm(vlmId);
+ for (Version finalVersion : finalVersions) {
+ entitlementPoolEntities.addAll(
+ vendorLicenseFacade.listEntitlementPools(vlmId, finalVersion, user));
+ licenseKeyGroupEntities.addAll(
+ vendorLicenseFacade.listLicenseKeyGroups(vlmId, finalVersion, user));
+ }
+
+
+ entitlementPoolEntities = healEPs(user, filterChangedEntities(entitlementPoolEntities));
+ licenseKeyGroupEntities = healLkgs(user, filterChangedEntities(licenseKeyGroupEntities));
+
+ vendorLicenseArtifact.setEntitlementPoolEntities(entitlementPoolEntities);
+ vendorLicenseArtifact.setLicenseKeyGroupEntities(licenseKeyGroupEntities);
+ return vendorLicenseArtifact.toXml().getBytes();
+ }
+
+ private static List<VersionableEntity> filterChangedEntities(
+ Collection<? extends VersionableEntity> versionableEntities) {
+ MultiValuedMap<String, VersionableEntity> entitiesById = mapById(versionableEntities);
+ Map<String, VersionableEntity> entitiesByVersionUuId = new HashMap<>();
+ List<VersionableEntity> changedOnly = new ArrayList<>();
+
+ for (String epId : entitiesById.keySet()) {
+ Collection<VersionableEntity> versionableEntitiesForId = entitiesById.get(epId);
+ for (VersionableEntity ep : versionableEntitiesForId) {
+ entitiesByVersionUuId.put(ep.getVersionUuId(), ep);
+ }
+ }
+
+ changedOnly.addAll(entitiesByVersionUuId.values());
+
+ return changedOnly;
+ }
+
+ private static MultiValuedMap<String, VersionableEntity> mapById(
+ Collection<? extends VersionableEntity> versionableEntities) {
+ MultiValuedMap<String, VersionableEntity> mappedById = new ArrayListValuedHashMap<>();
+ for (VersionableEntity ve : versionableEntities) {
+ mappedById.put(ve.getId(), ve);
+ }
+ return mappedById;
+ }
+
+
+ private static Set<LicenseKeyGroupEntity> healLkgs(
+ String user, Collection<? extends VersionableEntity> licenseKeyGroupEntities) {
+ Set<LicenseKeyGroupEntity> healed = new HashSet<>();
+ for (VersionableEntity licenseKeyGroupEntity : licenseKeyGroupEntities) {
+ healed.add((LicenseKeyGroupEntity) healingService.heal(licenseKeyGroupEntity, user));
+ }
+
+ return healed;
+ }
+
+ private static Set<EntitlementPoolEntity> healEPs(
+ String user, Collection<? extends VersionableEntity> entitlementPoolEntities) {
+ Set<EntitlementPoolEntity> healed = new HashSet<>();
+ for (VersionableEntity entitlementPoolEntity : entitlementPoolEntities) {
+ healed.add((EntitlementPoolEntity) healingService.heal(entitlementPoolEntity, user));
+ }
+
+ return healed;
+ }
+
+ private static List<Version> getFinalVersionsForVlm(String vlmId) {
+ VersionInfo versionInfo = vendorLicenseFacade
+ .getVersionInfo(vlmId, VersionableEntityAction.Read, "");
+ return versionInfo.getFinalVersions();
+
+ }
+
+
+ private static String getVendorName(String vendorLicenseModelId, String user) {
+ return vendorLicenseFacade
+ .getVendorLicenseModel(vendorLicenseModelId, null, user)
+ .getVendorLicenseModel().getVendorName();
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/FeatureGroupForArtifact.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/FeatureGroupForArtifact.java
new file mode 100644
index 0000000000..6dddb9ac69
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/FeatureGroupForArtifact.java
@@ -0,0 +1,60 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.licenseartifacts.impl.types;
+
+import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
+import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyGroupEntity;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+public class FeatureGroupForArtifact {
+ Collection<EntitlementPoolEntity> entitlementPoolEntities = new ArrayList<>();
+ Collection<LicenseKeyGroupEntity> licenseKeyGroupEntities = new ArrayList<>();
+ private String name;
+ private String description;
+ private String partNumber;
+ private String id;
+
+ public String getName() {
+ return name;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public String getPartNumber() {
+ return partNumber;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public Collection<EntitlementPoolEntity> getEntitlementPoolEntities() {
+ return entitlementPoolEntities;
+ }
+
+ public Collection<LicenseKeyGroupEntity> getLicenseKeyGroupEntities() {
+ return licenseKeyGroupEntities;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/VendorLicenseArtifact.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/VendorLicenseArtifact.java
new file mode 100644
index 0000000000..589b7fa668
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/VendorLicenseArtifact.java
@@ -0,0 +1,80 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.licenseartifacts.impl.types;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
+import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
+import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyGroupEntity;
+import org.openecomp.sdc.vendorlicense.licenseartifacts.impl.types.mixins.MixinEntitlementPoolEntityForVendorLicenseArtifact;
+import org.openecomp.sdc.vendorlicense.licenseartifacts.impl.types.mixins.MixinLicenseKeyGroupEntityForVendorLicenseArtifact;
+
+import java.util.Collection;
+
+@JacksonXmlRootElement(localName = "vendor-license-model",
+ namespace = "http://xmlns.openecomp.org/asdc/license-model/1.0")
+public class VendorLicenseArtifact extends XmlArtifact {
+ @JsonProperty(value = "vendor-name")
+ String vendorName;
+
+ Collection<EntitlementPoolEntity> entitlementPoolEntities;
+ Collection<LicenseKeyGroupEntity> licenseKeyGroupEntities;
+
+ public String getVendorName() {
+ return vendorName;
+ }
+
+ public void setVendorName(String vendorName) {
+ this.vendorName = vendorName;
+ }
+
+ @JacksonXmlProperty(isAttribute = false, localName = "entitlement-pool")
+ @JacksonXmlElementWrapper(localName = "entitlement-pool-list")
+ public Collection<EntitlementPoolEntity> getEntitlementPoolEntities() {
+ return entitlementPoolEntities;
+ }
+
+ public void setEntitlementPoolEntities(
+ Collection<EntitlementPoolEntity> entitlementPoolEntities) {
+ this.entitlementPoolEntities = entitlementPoolEntities;
+ }
+
+ @JacksonXmlProperty(isAttribute = false, localName = "license-key-group")
+ @JacksonXmlElementWrapper(localName = "license-key-group-list")
+ public Collection<LicenseKeyGroupEntity> getLicenseKeyGroupEntities() {
+ return licenseKeyGroupEntities;
+ }
+
+ public void setLicenseKeyGroupEntities(
+ Collection<LicenseKeyGroupEntity> licenseKeyGroupEntities) {
+ this.licenseKeyGroupEntities = licenseKeyGroupEntities;
+ }
+
+ @Override
+ void initMapper() {
+ xmlMapper.addMixIn(EntitlementPoolEntity.class,
+ MixinEntitlementPoolEntityForVendorLicenseArtifact.class);
+ xmlMapper.addMixIn(LicenseKeyGroupEntity.class,
+ MixinLicenseKeyGroupEntityForVendorLicenseArtifact.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/VnfLicenseArtifact.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/VnfLicenseArtifact.java
new file mode 100644
index 0000000000..1f8607765a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/VnfLicenseArtifact.java
@@ -0,0 +1,97 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.licenseartifacts.impl.types;
+
+import com.ctc.wstx.api.WstxInputProperties;
+import com.ctc.wstx.stax.WstxInputFactory;
+import com.ctc.wstx.stax.WstxOutputFactory;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.dataformat.xml.XmlFactory;
+import com.fasterxml.jackson.dataformat.xml.XmlMapper;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
+import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
+import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupModel;
+import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyGroupEntity;
+import org.openecomp.sdc.vendorlicense.licenseartifacts.impl.types.mixins.MixinEntitlementPoolEntityForVnfArtifact;
+import org.openecomp.sdc.vendorlicense.licenseartifacts.impl.types.mixins.MixinFeatureGroupModel;
+import org.openecomp.sdc.vendorlicense.licenseartifacts.impl.types.mixins.MixinLicenseKeyGroupEntityForVnfArtifact;
+
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+@JacksonXmlRootElement(localName = "vf-license-model",
+ namespace = "http://xmlns.openecomp.org/asdc/license-model/1.0")
+public class VnfLicenseArtifact extends XmlArtifact {
+ @JsonProperty(value = "vendor-name")
+ String vendorName;
+ @JsonProperty(value = "vf-id")
+ String vspId;
+ List<FeatureGroupModel> featureGroups = new ArrayList<>();
+
+ public String getVspId() {
+ return vspId;
+ }
+
+ public void setVspId(String vspId) {
+ this.vspId = vspId;
+ }
+
+ public String getVendorName() {
+ return vendorName;
+ }
+
+ public void setVendorName(String vendorName) {
+ this.vendorName = vendorName;
+ }
+
+ @JacksonXmlProperty(isAttribute = false, localName = "feature-group")
+ @JacksonXmlElementWrapper(localName = "feature-group-list")
+ public List<FeatureGroupModel> getFeatureGroups() {
+ return featureGroups;
+ }
+
+ public void setFeatureGroups(List<FeatureGroupModel> featureGroups) {
+ this.featureGroups = featureGroups;
+ }
+
+ void initMapper() {
+ WstxOutputFactory wstxOutputFactory = new WstxOutputFactory() {
+ @Override
+ public XMLStreamWriter createXMLStreamWriter(Writer writer) throws XMLStreamException {
+ mConfig.setProperty(WstxInputProperties.P_RETURN_NULL_FOR_DEFAULT_NAMESPACE, true);
+ return super.createXMLStreamWriter(writer);
+ }
+ };
+ XmlFactory factory = new XmlFactory(new WstxInputFactory(), wstxOutputFactory);
+
+ xmlMapper = new XmlMapper(factory);
+
+
+ xmlMapper.addMixIn(EntitlementPoolEntity.class, MixinEntitlementPoolEntityForVnfArtifact.class);
+ xmlMapper.addMixIn(LicenseKeyGroupEntity.class, MixinLicenseKeyGroupEntityForVnfArtifact.class);
+ xmlMapper.addMixIn(FeatureGroupModel.class, MixinFeatureGroupModel.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/XmlArtifact.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/XmlArtifact.java
new file mode 100644
index 0000000000..78d5e22412
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/XmlArtifact.java
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.licenseartifacts.impl.types;
+
+import com.fasterxml.jackson.dataformat.xml.XmlMapper;
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.vendorlicense.VendorLicenseConstants;
+import org.openecomp.sdc.vendorlicense.errors.JsonErrorBuilder;
+
+public abstract class XmlArtifact {
+
+ XmlMapper xmlMapper = new XmlMapper();
+
+ abstract void initMapper();
+
+ /**
+ * To xml string.
+ *
+ * @return the string
+ */
+ public String toXml() {
+ initMapper();
+ String xml = "";
+
+ try {
+ xml = xmlMapper.writeValueAsString(this);
+ } catch (com.fasterxml.jackson.core.JsonProcessingException jsonProcessingException) {
+ throw new CoreException(new JsonErrorBuilder(jsonProcessingException.getMessage()).build());
+
+ }
+
+ return xml.replaceAll(VendorLicenseConstants.VENDOR_LICENSE_MODEL_ARTIFACT_REGEX_REMOVE, "");
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/mixins/MixinEntitlementPoolEntityForVendorLicenseArtifact.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/mixins/MixinEntitlementPoolEntityForVendorLicenseArtifact.java
new file mode 100644
index 0000000000..1458fa80a7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/mixins/MixinEntitlementPoolEntityForVendorLicenseArtifact.java
@@ -0,0 +1,100 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.licenseartifacts.impl.types.mixins;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import org.openecomp.sdc.vendorlicense.dao.types.AggregationFunction;
+import org.openecomp.sdc.vendorlicense.dao.types.ChoiceOrOther;
+import org.openecomp.sdc.vendorlicense.dao.types.EntitlementMetric;
+import org.openecomp.sdc.vendorlicense.dao.types.EntitlementTime;
+import org.openecomp.sdc.vendorlicense.dao.types.OperationalScope;
+import org.openecomp.sdc.vendorlicense.dao.types.xml.AggregationFunctionForXml;
+import org.openecomp.sdc.vendorlicense.dao.types.xml.EntitlementMetricForXml;
+import org.openecomp.sdc.vendorlicense.dao.types.xml.EntitlementTimeForXml;
+import org.openecomp.sdc.vendorlicense.dao.types.xml.ThresholdForXml;
+
+import java.util.Set;
+
+public abstract class MixinEntitlementPoolEntityForVendorLicenseArtifact {
+ @JsonProperty(value = "threshold-value")
+ abstract ThresholdForXml getThresholdForArtifact();
+
+ @JsonProperty(value = "entitlement-pool-uuid")
+ abstract String getVersionUuId();
+
+ @JsonProperty(value = "manufacturer-reference-number")
+ abstract String getManufacturerReferenceNumber();
+
+ @JsonIgnore
+ abstract Set<String> getReferencingFeatureGroups();
+
+ @JsonIgnore
+ abstract String getFirstClassCitizenId();
+
+ @JsonIgnore
+ abstract String getId();
+
+ @JsonIgnore
+ abstract String getVersion();
+
+ @JsonIgnore
+ abstract String getVendorLicenseModelId();
+
+ @JsonIgnore
+ abstract String getThresholdUnit();
+
+ @JsonIgnore
+ abstract float getThresholdValue();
+
+ @JsonIgnore
+ abstract ChoiceOrOther<EntitlementMetric> getEntitlementMetric();
+
+ @JsonIgnore
+ abstract ChoiceOrOther<EntitlementTime> getTime();
+
+ @JsonIgnore
+ abstract ChoiceOrOther<AggregationFunction> getAggregationFunction();
+
+ @JsonIgnore
+ abstract String getEntityType();
+
+ @JacksonXmlProperty(isAttribute = false, localName = "value")
+ @JacksonXmlElementWrapper(localName = "operational-scope")
+ abstract String getOperationalScopeForArtifact();
+
+ @JsonIgnore
+ abstract ChoiceOrOther<OperationalScope> getOperationalScope();
+
+
+ @JsonProperty(value = "entitlement-metric")
+ abstract EntitlementMetricForXml getEntitlementMetricForArtifact();
+
+ @JsonProperty(value = "time")
+ abstract EntitlementTimeForXml getTimeForArtifact();
+
+
+ @JsonProperty(value = "aggregation-function")
+ abstract AggregationFunctionForXml getAggregationFunctionForArtifact();
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/mixins/MixinEntitlementPoolEntityForVnfArtifact.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/mixins/MixinEntitlementPoolEntityForVnfArtifact.java
new file mode 100644
index 0000000000..c4f2b4d4bd
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/mixins/MixinEntitlementPoolEntityForVnfArtifact.java
@@ -0,0 +1,100 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.licenseartifacts.impl.types.mixins;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import org.openecomp.sdc.vendorlicense.dao.types.AggregationFunction;
+import org.openecomp.sdc.vendorlicense.dao.types.ChoiceOrOther;
+import org.openecomp.sdc.vendorlicense.dao.types.EntitlementMetric;
+import org.openecomp.sdc.vendorlicense.dao.types.EntitlementTime;
+import org.openecomp.sdc.vendorlicense.dao.types.OperationalScope;
+import org.openecomp.sdc.vendorlicense.dao.types.xml.AggregationFunctionForXml;
+import org.openecomp.sdc.vendorlicense.dao.types.xml.EntitlementMetricForXml;
+import org.openecomp.sdc.vendorlicense.dao.types.xml.EntitlementTimeForXml;
+import org.openecomp.sdc.vendorlicense.dao.types.xml.ThresholdForXml;
+
+import java.util.Set;
+
+public abstract class MixinEntitlementPoolEntityForVnfArtifact {
+ @JsonProperty(value = "threshold-value")
+ abstract ThresholdForXml getThresholdForArtifact();
+
+ @JsonIgnore
+ abstract String getId();
+
+ @JsonProperty(value = "manufacturer-reference-number")
+ abstract String getManufacturerReferenceNumber();
+
+ @JsonIgnore
+ abstract Set<String> getReferencingFeatureGroups();
+
+ @JsonIgnore
+ abstract String getFirstClassCitizenId();
+
+ @JsonProperty(value = "entitlement-pool-uuid")
+ abstract String getVersionUuId();
+
+ @JsonIgnore
+ abstract String getVersion();
+
+ @JsonIgnore
+ abstract String getVendorLicenseModelId();
+
+ @JsonIgnore
+ abstract String getThresholdUnit();
+
+ @JsonIgnore
+ abstract float getThresholdValue();
+
+ @JsonIgnore
+ abstract ChoiceOrOther<EntitlementMetric> getEntitlementMetric();
+
+ @JsonIgnore
+ abstract ChoiceOrOther<EntitlementTime> getTime();
+
+ @JsonIgnore
+ abstract ChoiceOrOther<AggregationFunction> getAggregationFunction();
+
+ @JsonIgnore
+ abstract String getEntityType();
+
+ @JacksonXmlProperty(isAttribute = false, localName = "value")
+ @JacksonXmlElementWrapper(localName = "operational-scope")
+ abstract String getOperationalScopeForArtifact();
+
+ @JsonIgnore
+ abstract ChoiceOrOther<OperationalScope> getOperationalScope();
+
+
+ @JsonProperty(value = "entitlement-metric")
+ abstract EntitlementMetricForXml getEntitlementMetricForArtifact();
+
+ @JsonProperty(value = "time")
+ abstract EntitlementTimeForXml getTimeForArtifact();
+
+
+ @JsonProperty(value = "aggregation-function")
+ abstract AggregationFunctionForXml getAggregationFunctionForArtifact();
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/mixins/MixinFeatureGroupEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/mixins/MixinFeatureGroupEntity.java
new file mode 100644
index 0000000000..be6bd61357
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/mixins/MixinFeatureGroupEntity.java
@@ -0,0 +1,62 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.licenseartifacts.impl.types.mixins;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.util.Set;
+
+public abstract class MixinFeatureGroupEntity {
+
+ @JsonIgnore
+ abstract String getVendorLicenseModelId();
+
+ @JsonIgnore
+ abstract String getEntityType();
+
+
+ @JsonIgnore
+ abstract Version getVersion();
+
+ @JsonIgnore
+ abstract String getId();
+
+ @JsonIgnore
+ abstract String getName();
+
+ @JsonIgnore
+ abstract String getDescription();
+
+ @JsonIgnore
+ abstract String getPartNumber();
+
+ @JsonIgnore
+ abstract Set<String> getLicenseKeyGroupIds();
+
+ @JsonIgnore
+ abstract Set<String> getEntitlementPoolIds();
+
+
+ @JsonIgnore
+ abstract Set<String> getReferencingLicenseAgreements();
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/mixins/MixinFeatureGroupModel.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/mixins/MixinFeatureGroupModel.java
new file mode 100644
index 0000000000..1e76a74f4c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/mixins/MixinFeatureGroupModel.java
@@ -0,0 +1,61 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.licenseartifacts.impl.types.mixins;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
+import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity;
+import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyGroupEntity;
+
+import java.util.Set;
+
+public abstract class MixinFeatureGroupModel {
+ @JacksonXmlProperty(isAttribute = false, localName = "entitlement-pool")
+ @JacksonXmlElementWrapper(localName = "entitlement-pool-list")
+ abstract Set<EntitlementPoolEntity> getEntitlementPools();
+
+ @JacksonXmlProperty(isAttribute = false, localName = "license-key-group")
+ @JacksonXmlElementWrapper(localName = "license-key-group-list")
+ abstract Set<LicenseKeyGroupEntity> getLicenseKeyGroups();
+
+ @JacksonXmlProperty(isAttribute = false, localName = "internal-part-number")
+ abstract String getEntityPartNumber();
+
+ @JacksonXmlProperty(isAttribute = false, localName = "feature-group-uuid")
+ abstract String getEntityId();
+
+ @JacksonXmlProperty(isAttribute = false, localName = "description")
+ abstract String getEntityDesc();
+
+ @JacksonXmlProperty(isAttribute = false, localName = "name")
+ abstract String getEntityName();
+
+
+ @JsonIgnore
+ abstract FeatureGroupEntity getFeatureGroup();
+
+ @JsonIgnore
+ abstract String getEntityType();
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/mixins/MixinLicenseKeyGroupEntityForVendorLicenseArtifact.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/mixins/MixinLicenseKeyGroupEntityForVendorLicenseArtifact.java
new file mode 100644
index 0000000000..ed3083afe3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/mixins/MixinLicenseKeyGroupEntityForVendorLicenseArtifact.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.licenseartifacts.impl.types.mixins;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import org.openecomp.sdc.vendorlicense.dao.types.ChoiceOrOther;
+import org.openecomp.sdc.vendorlicense.dao.types.OperationalScope;
+import org.openecomp.sdc.vendorlicense.dao.types.xml.LicenseKeyTypeForXml;
+
+import java.util.Set;
+
+public abstract class MixinLicenseKeyGroupEntityForVendorLicenseArtifact {
+ @JsonProperty(value = "license-key-group-uuid")
+ abstract String getVersionUuId();
+
+ @JsonIgnore
+ abstract Set<String> getReferencingFeatureGroups();
+
+ @JsonIgnore
+ abstract String getVersion();
+
+ @JsonIgnore
+ abstract String getVendorLicenseModelId();
+
+
+ @JsonIgnore
+ abstract String getEntityType();
+
+ @JsonIgnore
+ abstract String getFirstClassCitizenId();
+
+ @JsonIgnore
+ abstract String getId();
+
+
+ @JsonIgnore
+ abstract ChoiceOrOther<OperationalScope> getOperationalScope();
+
+ @JacksonXmlProperty(isAttribute = false, localName = "value")
+ @JacksonXmlElementWrapper(localName = "operational-scope")
+ abstract String getOperationalScopeForArtifact();
+
+
+ @JsonIgnore
+ abstract LicenseKeyTypeForXml getTypeForArtifact();
+
+ @JsonIgnore
+ abstract String getVersionableId();
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/mixins/MixinLicenseKeyGroupEntityForVnfArtifact.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/mixins/MixinLicenseKeyGroupEntityForVnfArtifact.java
new file mode 100644
index 0000000000..6281c44830
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/types/mixins/MixinLicenseKeyGroupEntityForVnfArtifact.java
@@ -0,0 +1,74 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorlicense.licenseartifacts.impl.types.mixins;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import org.openecomp.sdc.vendorlicense.dao.types.ChoiceOrOther;
+import org.openecomp.sdc.vendorlicense.dao.types.OperationalScope;
+import org.openecomp.sdc.vendorlicense.dao.types.xml.LicenseKeyTypeForXml;
+
+import java.util.Set;
+
+public abstract class MixinLicenseKeyGroupEntityForVnfArtifact {
+ @JsonIgnore
+ abstract String getId();
+
+ @JsonIgnore
+ abstract Set<String> getReferencingFeatureGroups();
+
+ @JsonIgnore
+ abstract String getVersion();
+
+ @JsonIgnore
+ abstract String getVendorLicenseModelId();
+
+
+ @JsonIgnore
+ abstract String getEntityType();
+
+ @JsonProperty(value = "license-key-group-uuid")
+ abstract String getVersionUuId();
+
+ @JsonIgnore
+ abstract String getFirstClassCitizenId();
+
+
+
+ @JsonIgnore
+ abstract ChoiceOrOther<OperationalScope> getOperationalScope();
+
+ @JacksonXmlProperty(isAttribute = false, localName = "value")
+ @JacksonXmlElementWrapper(localName = "operational-scope")
+ abstract String getOperationalScopeForArtifact();
+
+
+ @JsonIgnore
+ abstract LicenseKeyTypeForXml getTypeForArtifact();
+
+ @JsonIgnore
+ abstract String getVersionableId();
+
+
+}
+
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/pom.xml b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/pom.xml
new file mode 100644
index 0000000000..5b1cef8ef7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/pom.xml
@@ -0,0 +1,24 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <groupId>org.openecomp.sdc</groupId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <name>openecomp-sdc-vendor-license-lib</name>
+ <artifactId>openecomp-sdc-vendor-license-lib</artifactId>
+
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>openecomp-sdc-vendor-license-api</module>
+ <module>openecomp-sdc-vendor-license-core</module>
+ </modules>
+
+ <dependencies>
+
+ </dependencies>
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/pom.xml b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/pom.xml
new file mode 100644
index 0000000000..100e85536d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/pom.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-vendor-software-product-lib</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>openecomp-sdc-vendor-software-product-api</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.google.code.gson</groupId>
+ <artifactId>gson</artifactId>
+ <version>2.3.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-core-lib</artifactId>
+ <type>pom</type>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-facade-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-nosqldb-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-versioning-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-translator-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-enrichment-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-model-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+
+
+
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/VendorSoftwareProductConstants.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/VendorSoftwareProductConstants.java
new file mode 100644
index 0000000000..860ef5fd41
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/VendorSoftwareProductConstants.java
@@ -0,0 +1,38 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct;
+
+public final class VendorSoftwareProductConstants {
+ public static final String VENDOR_SOFTWARE_PRODUCT_VERSIONABLE_TYPE = "VendorSoftwareProduct";
+ public static final String GENERAL_COMPONENT_ID = "General";
+ public static final String VSP_PACKAGE_ZIP = "VSPPackage.zip";
+ public static final String CSAR = "CSAR";
+ public static final String UPLOAD_RAW_DATA = "UPLOAD_RAW_DATA";
+
+ public final class UniqueValues {
+ public static final String VENDOR_SOFTWARE_PRODUCT_NAME = "Vendor Software Product name";
+ public static final String PROCESS_NAME = "Process name";
+ public static final String NETWORK_NAME = "Network name";
+ public static final String COMPONENT_NAME = "ComponentData name";
+ public static final String NIC_NAME = "NIC name";
+ //public static final String COMPONENT_ARTIFACT_NAME = "ComponentArtifact name";
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ComponentArtifactDao.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ComponentArtifactDao.java
new file mode 100644
index 0000000000..d43c9687c2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ComponentArtifactDao.java
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentArtifactEntity;
+import org.openecomp.sdc.versioning.dao.VersionableDao;
+
+import java.util.Collection;
+
+public interface ComponentArtifactDao extends VersionableDao {
+
+ ComponentArtifactEntity getArtifactByType(ComponentArtifactEntity entity);
+
+ void update(ComponentArtifactEntity entity);
+
+ void delete(ComponentArtifactEntity entity);
+
+ Collection<ComponentArtifactEntity> getArtifactNamesAndTypesForComponent(
+ ComponentArtifactEntity entity);
+
+ void deleteAll(ComponentArtifactEntity entity);
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ComponentArtifactDaoFactory.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ComponentArtifactDaoFactory.java
new file mode 100644
index 0000000000..56a0ec65af
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ComponentArtifactDaoFactory.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class ComponentArtifactDaoFactory
+ extends AbstractComponentFactory<ComponentArtifactDao> {
+
+ public static ComponentArtifactDaoFactory getInstance() {
+ return AbstractFactory.getInstance(ComponentArtifactDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ComponentDao.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ComponentDao.java
new file mode 100644
index 0000000000..ca795b4929
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ComponentDao.java
@@ -0,0 +1,38 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+import org.openecomp.core.dao.BaseDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentEntity;
+import org.openecomp.sdc.versioning.dao.VersionableDao;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.util.Collection;
+
+public interface ComponentDao extends VersionableDao, BaseDao<ComponentEntity> {
+
+ void updateQuestionnaireData(String vspId, Version version, String componentId,
+ String questionnaireData);
+
+ Collection<ComponentEntity> listQuestionnaires(String vspId, Version version);
+
+ void deleteAll(String vspId, Version version);
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ComponentDaoFactory.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ComponentDaoFactory.java
new file mode 100644
index 0000000000..e1cf30bfb1
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ComponentDaoFactory.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class ComponentDaoFactory extends AbstractComponentFactory<ComponentDao> {
+
+ public static ComponentDaoFactory getInstance() {
+ return AbstractFactory.getInstance(ComponentDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/NetworkDao.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/NetworkDao.java
new file mode 100644
index 0000000000..199e65fd83
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/NetworkDao.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+import org.openecomp.core.dao.BaseDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NetworkEntity;
+import org.openecomp.sdc.versioning.dao.VersionableDao;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+public interface NetworkDao extends VersionableDao, BaseDao<NetworkEntity> {
+
+ void updateQuestionnaireData(String vspId, Version version, String id, String questionnaireData);
+
+ void deleteAll(String vspId, Version version);
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/NetworkDaoFactory.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/NetworkDaoFactory.java
new file mode 100644
index 0000000000..8db3d605e4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/NetworkDaoFactory.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class NetworkDaoFactory extends AbstractComponentFactory<NetworkDao> {
+
+ public static NetworkDaoFactory getInstance() {
+ return AbstractFactory.getInstance(NetworkDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/NicDao.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/NicDao.java
new file mode 100644
index 0000000000..bbfa8bf8c0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/NicDao.java
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+import org.openecomp.core.dao.BaseDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NicEntity;
+import org.openecomp.sdc.versioning.dao.VersionableDao;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.util.Collection;
+
+public interface NicDao extends VersionableDao, BaseDao<NicEntity> {
+
+ void updateQuestionnaireData(String vspId, Version version, String componentId, String nicId,
+ String questionnaireData);
+
+ Collection<NicEntity> listByVsp(String vspId, Version version);
+
+ void deleteByComponentId(String vspId, Version version, String componentId);
+
+ void deleteByVspId(String vspId, Version version);
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/NicDaoFactory.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/NicDaoFactory.java
new file mode 100644
index 0000000000..b61ad6a3ca
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/NicDaoFactory.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class NicDaoFactory extends AbstractComponentFactory<NicDao> {
+
+ public static NicDaoFactory getInstance() {
+ return AbstractFactory.getInstance(NicDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/PackageInfoDao.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/PackageInfoDao.java
new file mode 100644
index 0000000000..a22c725b6f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/PackageInfoDao.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+import org.openecomp.core.dao.BaseDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.PackageInfo;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.util.List;
+
+public interface PackageInfoDao extends BaseDao<PackageInfo> {
+ List<PackageInfo> listByCategory(String category, String subCategory);
+
+ void deleteRowTranslateContent(String vspId, Version version);
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/PackageInfoDaoFactory.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/PackageInfoDaoFactory.java
new file mode 100644
index 0000000000..a8e3d6563d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/PackageInfoDaoFactory.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class PackageInfoDaoFactory extends AbstractComponentFactory<PackageInfoDao> {
+
+ public static PackageInfoDaoFactory getInstance() {
+ return AbstractFactory.getInstance(PackageInfoDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ProcessArtifactDao.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ProcessArtifactDao.java
new file mode 100644
index 0000000000..5b562368b5
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ProcessArtifactDao.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessArtifactEntity;
+
+public interface ProcessArtifactDao {
+
+ void update(ProcessArtifactEntity entity);
+
+ ProcessArtifactEntity get(ProcessArtifactEntity entity);
+
+ void delete(ProcessArtifactEntity entity);
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ProcessArtifactDaoFactory.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ProcessArtifactDaoFactory.java
new file mode 100644
index 0000000000..534777c701
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ProcessArtifactDaoFactory.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class ProcessArtifactDaoFactory
+ extends AbstractComponentFactory<ProcessArtifactDao> {
+
+ public static ProcessArtifactDaoFactory getInstance() {
+ return AbstractFactory.getInstance(ProcessArtifactDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ProcessDao.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ProcessDao.java
new file mode 100644
index 0000000000..8aa3400d24
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ProcessDao.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+import org.openecomp.core.dao.BaseDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessEntity;
+import org.openecomp.sdc.versioning.dao.VersionableDao;
+
+public interface ProcessDao extends VersionableDao, BaseDao<ProcessEntity> {
+
+ void deleteAll(ProcessEntity entity);
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ProcessDaoFactory.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ProcessDaoFactory.java
new file mode 100644
index 0000000000..f661a0ccda
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ProcessDaoFactory.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class ProcessDaoFactory extends AbstractComponentFactory<ProcessDao> {
+
+ public static ProcessDaoFactory getInstance() {
+ return AbstractFactory.getInstance(ProcessDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/UploadDataDao.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/UploadDataDao.java
new file mode 100644
index 0000000000..cdc3a770db
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/UploadDataDao.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+import org.openecomp.core.dao.BaseDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.UploadDataEntity;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.nio.ByteBuffer;
+
+public interface UploadDataDao extends BaseDao<UploadDataEntity> {
+
+ void deleteContentDataAndValidationData(String vspId, Version version);
+
+ ByteBuffer getContentData(String vspId, Version version);
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/UploadDataDaoFactory.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/UploadDataDaoFactory.java
new file mode 100644
index 0000000000..9654551f8f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/UploadDataDaoFactory.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class UploadDataDaoFactory extends AbstractComponentFactory<UploadDataDao> {
+
+ public static UploadDataDaoFactory getInstance() {
+ return AbstractFactory.getInstance(UploadDataDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/VendorSoftwareProductDao.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/VendorSoftwareProductDao.java
new file mode 100644
index 0000000000..d8de3c6bd4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/VendorSoftwareProductDao.java
@@ -0,0 +1,140 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NetworkEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NicEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.PackageInfo;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessArtifactEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.UploadDataEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspQuestionnaireEntity;
+import org.openecomp.sdc.versioning.dao.VersionableDao;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.nio.ByteBuffer;
+import java.util.Collection;
+import java.util.List;
+
+public interface VendorSoftwareProductDao extends VersionableDao {
+
+ void createVendorSoftwareProductInfo(VspDetails vspDetails);
+
+ Collection<VspDetails> listVendorSoftwareProductsInfo();
+
+ VspDetails getVendorSoftwareProductInfo(VspDetails vspDetails);
+
+ void updateVendorSoftwareProductInfo(VspDetails vspDetails);
+
+ void deleteVendorSoftwareProductInfo(VspDetails vspDetails);
+
+
+ void updateUploadData(UploadDataEntity uploadData);
+
+ UploadDataEntity getUploadData(UploadDataEntity uploadData);
+
+ ByteBuffer getContentData(UploadDataEntity uploadDataEntity);
+
+
+ List<PackageInfo> listPackages(String category, String subCategory);
+
+ void insertPackageDetails(PackageInfo packageInfo);
+
+ PackageInfo getPackageInfo(PackageInfo packageInfo);
+
+ void deletePackageInfo(PackageInfo packageInfo);
+
+
+ Collection<NetworkEntity> listNetworks(String vspId, Version version);
+
+ void createNetwork(NetworkEntity network);
+
+ void updateNetwork(NetworkEntity network);
+
+ NetworkEntity getNetwork(String vspId, Version version, String networkId);
+
+ void deleteNetwork(String vspId, Version version);
+
+
+ Collection<ComponentEntity> listComponents(String vspId, Version version);
+
+ void createComponent(ComponentEntity component);
+
+ void updateComponent(ComponentEntity component);
+
+ ComponentEntity getComponent(String vspId, Version version, String componentId);
+
+ Collection<ComponentEntity> listComponentsQuestionnaire(String vspId, Version version);
+
+ void updateComponentQuestionnaire(String vspId, Version version, String componentId,
+ String questionnaireData);
+
+ void deleteComponent(String vspId, Version version);
+
+
+ Collection<ProcessEntity> listProcesses(String vspId, Version version, String componentId);
+
+ void deleteProcesses(String vspId, Version version, String componentId);
+
+ ProcessEntity getProcess(String vspId, Version version, String componentId, String processId);
+
+ void createProcess(ProcessEntity processEntity);
+
+ void updateProcess(ProcessEntity processEntity);
+
+ void deleteProcess(String vspId, Version version, String componentId, String processId);
+
+
+ void uploadProcessArtifact(String vspId, Version version, String componentId, String processId,
+ byte[] artifact, String artifactFileName);
+
+ ProcessArtifactEntity getProcessArtifact(String vspId, Version version, String componentId,
+ String processId);
+
+ void deleteProcessArtifact(String vspId, Version version, String componentId, String processId);
+
+
+ VspQuestionnaireEntity getQuestionnaire(String vspId, Version version);
+
+ void updateQuestionnaire(String vspId, Version version, String questionnaireData);
+
+
+ Collection<NicEntity> listNics(String vspId, Version version, String componentId);
+
+ void createNic(NicEntity nic);
+
+ void updateNic(NicEntity nicEntity);
+
+ NicEntity getNic(String vspId, Version version, String componentId, String nicId);
+
+ void updateNicQuestionnaire(String vspId, Version version, String componentId, String nicId,
+ String questionnaireData);
+
+ Collection<NicEntity> listNicsByVsp(String vspId, Version version);
+
+ void deleteNic(String vspId, Version version, String componentId);
+
+ void deleteUploadData(String vspId, Version version);
+
+ void updateVspLatestModificationTime(String vspId, Version version);
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/VendorSoftwareProductDaoFactory.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/VendorSoftwareProductDaoFactory.java
new file mode 100644
index 0000000000..33aaa8e1ad
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/VendorSoftwareProductDaoFactory.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class VendorSoftwareProductDaoFactory
+ extends AbstractComponentFactory<VendorSoftwareProductDao> {
+
+
+ public static VendorSoftwareProductDaoFactory getInstance() {
+ return AbstractFactory.getInstance(VendorSoftwareProductDaoFactory.class);
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/VendorSoftwareProductInfoDao.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/VendorSoftwareProductInfoDao.java
new file mode 100644
index 0000000000..74a3f69e6c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/VendorSoftwareProductInfoDao.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+import org.openecomp.core.dao.BaseDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails;
+import org.openecomp.sdc.versioning.dao.VersionableDao;
+
+public interface VendorSoftwareProductInfoDao extends VersionableDao, BaseDao<VspDetails> {
+
+// void updateLastModificationTime(VspDetails entity);
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/VendorSoftwareProductInfoDaoFactory.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/VendorSoftwareProductInfoDaoFactory.java
new file mode 100644
index 0000000000..570ddc496e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/VendorSoftwareProductInfoDaoFactory.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class VendorSoftwareProductInfoDaoFactory
+ extends AbstractComponentFactory<VendorSoftwareProductInfoDao> {
+
+ public static VendorSoftwareProductInfoDaoFactory getInstance() {
+ return AbstractFactory.getInstance(VendorSoftwareProductInfoDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/VspQuestionnaireDao.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/VspQuestionnaireDao.java
new file mode 100644
index 0000000000..4658f71d2a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/VspQuestionnaireDao.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspQuestionnaireEntity;
+import org.openecomp.sdc.versioning.dao.VersionableDao;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+public interface VspQuestionnaireDao extends VersionableDao {
+
+ VspQuestionnaireEntity get(VspQuestionnaireEntity entity);
+
+ void updateQuestionnaireData(String id, Version version, String questionnaireData);
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/VspQuestionnaireDaoFactory.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/VspQuestionnaireDaoFactory.java
new file mode 100644
index 0000000000..afc3dc9649
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/VspQuestionnaireDaoFactory.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class VspQuestionnaireDaoFactory
+ extends AbstractComponentFactory<VspQuestionnaireDao> {
+
+ public static VspQuestionnaireDaoFactory getInstance() {
+ return AbstractFactory.getInstance(VspQuestionnaireDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/Action.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/Action.java
new file mode 100644
index 0000000000..3e82053574
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/Action.java
@@ -0,0 +1,27 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
+
+public enum Action {
+ CREATE_PACKAGE,
+ CHECK_IN,
+ CHECK_OUT
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ComponentArtifactEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ComponentArtifactEntity.java
new file mode 100644
index 0000000000..3636a591d4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ComponentArtifactEntity.java
@@ -0,0 +1,140 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
+
+import com.datastax.driver.mapping.annotations.ClusteringColumn;
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+import org.openecomp.core.enrichment.types.ComponentArtifactType;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
+
+import java.nio.ByteBuffer;
+
+@Table(keyspace = "dox", name = "vsp_component_artifact")
+public class ComponentArtifactEntity implements VersionableEntity {
+ public static final String ENTITY_TYPE = "Vendor Software Product Component Artifact";
+ @PartitionKey
+ @Column(name = "vsp_id")
+ private String vspId;
+ @PartitionKey(value = 1)
+ @Frozen
+ private Version version;
+ @ClusteringColumn
+ @Column(name = "component_id")
+ private String componentId;
+ @ClusteringColumn(value = 1)
+ @Column(name = "artifact_type")
+ private ComponentArtifactType type;
+ @ClusteringColumn(value = 2)
+ @Column(name = "artifact_id")
+ private String id;
+ @Column(name = "name")
+ private String artifactName;
+ private ByteBuffer artifact;
+
+ public ComponentArtifactEntity() {
+
+ }
+
+ /**
+ * Instantiates a new Component artifact entity.
+ *
+ * @param vspId the vsp id
+ * @param version the version
+ * @param componentId the component id
+ * @param id the id
+ */
+ public ComponentArtifactEntity(String vspId, Version version, String componentId, String id) {
+ this.vspId = vspId;
+ this.version = version;
+ this.componentId = componentId;
+ this.id = id;
+ }
+
+ public String getVspId() {
+ return vspId;
+ }
+
+ public void setVspId(String vspId) {
+ this.vspId = vspId;
+ }
+
+ public Version getVersion() {
+ return version;
+ }
+
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+
+ public String getComponentId() {
+ return componentId;
+ }
+
+ public void setComponentId(String componentId) {
+ this.componentId = componentId;
+ }
+
+ @Override
+ public String getEntityType() {
+ return ENTITY_TYPE;
+ }
+
+ @Override
+ public String getFirstClassCitizenId() {
+ return getVspId();
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getArtifactName() {
+ return artifactName;
+ }
+
+ public void setArtifactName(String artifactName) {
+ this.artifactName = artifactName;
+ }
+
+ public ByteBuffer getArtifact() {
+ return artifact;
+ }
+
+ public void setArtifact(ByteBuffer artifact) {
+ this.artifact = artifact;
+ }
+
+ public ComponentArtifactType getType() {
+ return type;
+ }
+
+ public void setType(ComponentArtifactType type) {
+ this.type = type;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ComponentEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ComponentEntity.java
new file mode 100644
index 0000000000..a74ba04ec4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ComponentEntity.java
@@ -0,0 +1,199 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
+
+import com.datastax.driver.mapping.annotations.ClusteringColumn;
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+import com.datastax.driver.mapping.annotations.Transient;
+import org.openecomp.core.utilities.json.JsonUtil;
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.ComponentData;
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionEntityId;
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionEntityType;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+@Table(keyspace = "dox", name = "vsp_component")
+public class ComponentEntity implements CompositionEntity {
+ private static final String ENTITY_TYPE = "Vendor Software Product ComponentData";
+
+ @PartitionKey
+ @Column(name = "vsp_id")
+ private String vspId;
+ @PartitionKey(value = 1)
+ @Frozen
+ private Version version;
+ @ClusteringColumn
+ @Column(name = "component_id")
+ private String id;
+ @Column(name = "composition_data")
+ private String compositionData;
+ @Column(name = "questionnaire_data")
+ private String questionnaireData;
+ @Transient
+ private List<NicEntity> nics = new ArrayList<>();
+
+ public ComponentEntity() {
+
+ }
+
+ /**
+ * Instantiates a new Component entity.
+ *
+ * @param vspId the vsp id
+ * @param version the version
+ * @param id the id
+ */
+ public ComponentEntity(String vspId, Version version, String id) {
+ this.vspId = vspId;
+ this.version = version;
+ this.id = id;
+ }
+
+ @Override
+ public CompositionEntityType getType() {
+ return CompositionEntityType.component;
+ }
+
+ @Override
+ public CompositionEntityId getCompositionEntityId() {
+ return new CompositionEntityId(getId(), new CompositionEntityId(getVspId(), null));
+ }
+
+ public String getVspId() {
+ return vspId;
+ }
+
+ public void setVspId(String vspId) {
+ this.vspId = vspId;
+ }
+
+ @Override
+ public Version getVersion() {
+ return version;
+ }
+
+ @Override
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+
+ @Override
+ public String getEntityType() {
+ return ENTITY_TYPE;
+ }
+
+ @Override
+ public String getFirstClassCitizenId() {
+ return getVspId();
+ }
+
+ @Override
+ public String getId() {
+ return id;
+ }
+
+ @Override
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @Override
+ public String getCompositionData() {
+ return compositionData;
+ }
+
+ @Override
+ public void setCompositionData(String compositionData) {
+ this.compositionData = compositionData;
+ }
+
+ public ComponentData getComponentCompositionData() {
+ return compositionData == null ? null
+ : JsonUtil.json2Object(compositionData, ComponentData.class);
+ }
+
+ public void setComponentCompositionData(ComponentData component) {
+ this.compositionData = component == null ? null : JsonUtil.object2Json(component);
+ }
+
+ @Override
+ public String getQuestionnaireData() {
+ return questionnaireData;
+ }
+
+ @Override
+ public void setQuestionnaireData(String questionnaireData) {
+ this.questionnaireData = questionnaireData;
+ }
+
+ public List<NicEntity> getNics() {
+ return nics;
+ }
+
+ public void setNics(List<NicEntity> nics) {
+ this.nics = nics;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null || getClass() != obj.getClass()) {
+ return false;
+ }
+
+ ComponentEntity that = (ComponentEntity) obj;
+
+ if (vspId != null ? !vspId.equals(that.vspId) : that.vspId != null) {
+ return false;
+ }
+ if (version != null ? !version.equals(that.version) : that.version != null) {
+ return false;
+ }
+ if (id != null ? !id.equals(that.id) : that.id != null) {
+ return false;
+ }
+ if (compositionData != null ? !compositionData.equals(that.compositionData)
+ : that.compositionData != null) {
+ return false;
+ }
+ return questionnaireData != null ? questionnaireData.equals(that.questionnaireData)
+ : that.questionnaireData == null;
+
+ }
+
+ @Override
+ public int hashCode() {
+ int result = vspId != null ? vspId.hashCode() : 0;
+ result = 31 * result + (version != null ? version.hashCode() : 0);
+ result = 31 * result + (id != null ? id.hashCode() : 0);
+ result = 31 * result + (compositionData != null ? compositionData.hashCode() : 0);
+ result = 31 * result + (questionnaireData != null ? questionnaireData.hashCode() : 0);
+ return result;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/CompositionEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/CompositionEntity.java
new file mode 100644
index 0000000000..b3e8eef3f2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/CompositionEntity.java
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
+
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionEntityId;
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionEntityType;
+import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
+
+public interface CompositionEntity extends VersionableEntity {
+
+ CompositionEntityType getType();
+
+ CompositionEntityId getCompositionEntityId();
+
+ String getCompositionData();
+
+ void setCompositionData(String compositionData);
+
+ String getQuestionnaireData();
+
+ void setQuestionnaireData(String questionnaireData);
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/NetworkEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/NetworkEntity.java
new file mode 100644
index 0000000000..1599e4a88c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/NetworkEntity.java
@@ -0,0 +1,183 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
+
+import com.datastax.driver.mapping.annotations.ClusteringColumn;
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+import org.openecomp.core.utilities.json.JsonUtil;
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionEntityId;
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionEntityType;
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.Network;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+@Table(keyspace = "dox", name = "vsp_network")
+public class NetworkEntity implements CompositionEntity {
+ private static final String ENTITY_TYPE = "Vendor Software Product Network";
+
+ @PartitionKey
+ @Column(name = "vsp_id")
+ private String vspId;
+ @PartitionKey(value = 1)
+ @Frozen
+ private Version version;
+ @ClusteringColumn
+ @Column(name = "network_id")
+ private String id;
+ @Column(name = "composition_data")
+ private String compositionData;
+ @Column(name = "questionnaire_data")
+ private String questionnaireData;
+
+ public NetworkEntity() {
+
+ }
+
+ /**
+ * Instantiates a new Network entity.
+ *
+ * @param vspId the vsp id
+ * @param version the version
+ * @param id the id
+ */
+ public NetworkEntity(String vspId, Version version, String id) {
+ this.vspId = vspId;
+ this.version = version;
+ this.id = id;
+ }
+
+ @Override
+ public CompositionEntityType getType() {
+ return CompositionEntityType.network;
+ }
+
+ @Override
+ public CompositionEntityId getCompositionEntityId() {
+ return new CompositionEntityId(getId(), new CompositionEntityId(getVspId(), null));
+ }
+
+ public String getVspId() {
+ return vspId;
+ }
+
+ public void setVspId(String vspId) {
+ this.vspId = vspId;
+ }
+
+ @Override
+ public Version getVersion() {
+ return version;
+ }
+
+ @Override
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+
+ @Override
+ public String getEntityType() {
+ return ENTITY_TYPE;
+ }
+
+ @Override
+ public String getFirstClassCitizenId() {
+ return getVspId();
+ }
+
+ @Override
+ public String getId() {
+ return id;
+ }
+
+ @Override
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @Override
+ public String getCompositionData() {
+ return compositionData;
+ }
+
+ @Override
+ public void setCompositionData(String compositionData) {
+ this.compositionData = compositionData;
+ }
+
+ public Network getNetworkCompositionData() {
+ return compositionData == null ? null : JsonUtil.json2Object(compositionData, Network.class);
+ }
+
+ public void setNetworkCompositionData(Network network) {
+ this.compositionData = network == null ? null : JsonUtil.object2Json(network);
+ }
+
+ @Override
+ public String getQuestionnaireData() {
+ return questionnaireData;
+ }
+
+ @Override
+ public void setQuestionnaireData(String questionnaireData) {
+ this.questionnaireData = questionnaireData;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null || getClass() != obj.getClass()) {
+ return false;
+ }
+
+ NetworkEntity that = (NetworkEntity) obj;
+
+ if (vspId != null ? !vspId.equals(that.vspId) : that.vspId != null) {
+ return false;
+ }
+ if (version != null ? !version.equals(that.version) : that.version != null) {
+ return false;
+ }
+ if (id != null ? !id.equals(that.id) : that.id != null) {
+ return false;
+ }
+ if (compositionData != null ? !compositionData.equals(that.compositionData)
+ : that.compositionData != null) {
+ return false;
+ }
+ return questionnaireData != null ? questionnaireData.equals(that.questionnaireData)
+ : that.questionnaireData == null;
+
+ }
+
+ @Override
+ public int hashCode() {
+ int result = vspId != null ? vspId.hashCode() : 0;
+ result = 31 * result + (version != null ? version.hashCode() : 0);
+ result = 31 * result + (id != null ? id.hashCode() : 0);
+ result = 31 * result + (compositionData != null ? compositionData.hashCode() : 0);
+ result = 31 * result + (questionnaireData != null ? questionnaireData.hashCode() : 0);
+ return result;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/NicEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/NicEntity.java
new file mode 100644
index 0000000000..33042a128a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/NicEntity.java
@@ -0,0 +1,203 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
+
+import com.datastax.driver.mapping.annotations.ClusteringColumn;
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+import org.openecomp.core.utilities.json.JsonUtil;
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionEntityId;
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionEntityType;
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.Nic;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+
+@Table(keyspace = "dox", name = "vsp_component_nic")
+public class NicEntity implements CompositionEntity {
+ private static final String ENTITY_TYPE = "Vendor Software Product ComponentData NIC";
+
+ @PartitionKey
+ @Column(name = "vsp_id")
+ private String vspId;
+ @PartitionKey(value = 1)
+ @Frozen
+ private Version version;
+ @ClusteringColumn
+ @Column(name = "component_id")
+ private String componentId;
+ @ClusteringColumn(value = 1)
+ @Column(name = "nic_id")
+ private String id;
+ @Column(name = "composition_data")
+ private String compositionData;
+ @Column(name = "questionnaire_data")
+ private String questionnaireData;
+
+ public NicEntity() {
+
+ }
+
+ /**
+ * Instantiates a new Nic entity.
+ *
+ * @param vspId the vsp id
+ * @param version the version
+ * @param componentId the component id
+ * @param id the id
+ */
+ public NicEntity(String vspId, Version version, String componentId, String id) {
+ this.vspId = vspId;
+ this.version = version;
+ this.componentId = componentId;
+ this.id = id;
+ }
+
+ @Override
+ public CompositionEntityType getType() {
+ return CompositionEntityType.nic;
+ }
+
+ @Override
+ public CompositionEntityId getCompositionEntityId() {
+ return new CompositionEntityId(getId(),
+ new CompositionEntityId(getComponentId(), new CompositionEntityId(getVspId(), null)));
+ }
+
+ public String getVspId() {
+ return vspId;
+ }
+
+ public void setVspId(String vspId) {
+ this.vspId = vspId;
+ }
+
+ @Override
+ public Version getVersion() {
+ return version;
+ }
+
+ @Override
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+
+ @Override
+ public String getEntityType() {
+ return ENTITY_TYPE;
+ }
+
+ @Override
+ public String getFirstClassCitizenId() {
+ return getVspId();
+ }
+
+ public String getComponentId() {
+ return componentId;
+ }
+
+ public void setComponentId(String componentId) {
+ this.componentId = componentId;
+ }
+
+ @Override
+ public String getId() {
+ return id;
+ }
+
+ @Override
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @Override
+ public String getCompositionData() {
+ return compositionData;
+ }
+
+ @Override
+ public void setCompositionData(String compositionData) {
+ this.compositionData = compositionData;
+ }
+
+ public Nic getNicCompositionData() {
+ return compositionData == null ? null : JsonUtil.json2Object(compositionData, Nic.class);
+ }
+
+ public void setNicCompositionData(Nic nic) {
+ this.compositionData = nic == null ? null : JsonUtil.object2Json(nic);
+ }
+
+ @Override
+ public String getQuestionnaireData() {
+ return questionnaireData;
+ }
+
+ @Override
+ public void setQuestionnaireData(String questionnaireData) {
+ this.questionnaireData = questionnaireData;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null || getClass() != obj.getClass()) {
+ return false;
+ }
+
+ NicEntity nicEntity = (NicEntity) obj;
+
+ if (vspId != null ? !vspId.equals(nicEntity.vspId) : nicEntity.vspId != null) {
+ return false;
+ }
+ if (version != null ? !version.equals(nicEntity.version) : nicEntity.version != null) {
+ return false;
+ }
+ if (componentId != null ? !componentId.equals(nicEntity.componentId)
+ : nicEntity.componentId != null) {
+ return false;
+ }
+ if (id != null ? !id.equals(nicEntity.id) : nicEntity.id != null) {
+ return false;
+ }
+ if (compositionData != null ? !compositionData.equals(nicEntity.compositionData)
+ : nicEntity.compositionData != null) {
+ return false;
+ }
+ return questionnaireData != null ? questionnaireData.equals(nicEntity.questionnaireData)
+ : nicEntity.questionnaireData == null;
+
+ }
+
+ @Override
+ public int hashCode() {
+ int result = vspId != null ? vspId.hashCode() : 0;
+ result = 31 * result + (version != null ? version.hashCode() : 0);
+ result = 31 * result + (componentId != null ? componentId.hashCode() : 0);
+ result = 31 * result + (id != null ? id.hashCode() : 0);
+ result = 31 * result + (compositionData != null ? compositionData.hashCode() : 0);
+ result = 31 * result + (questionnaireData != null ? questionnaireData.hashCode() : 0);
+ return result;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/PackageInfo.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/PackageInfo.java
new file mode 100644
index 0000000000..03f26cb57d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/PackageInfo.java
@@ -0,0 +1,176 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
+
+
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.nio.ByteBuffer;
+
+@Table(keyspace = "dox", name = "package_details")
+public class PackageInfo {
+
+
+ @PartitionKey
+ @Column(name = "vsp_id")
+ private String vspId;
+
+ @PartitionKey(value = 1)
+ @Frozen
+ private Version version;
+
+ @Column(name = "display_name")
+ private String displayName;
+
+ @Column(name = "vsp_name")
+ private String vspName;
+
+ @Column(name = "vsp_description")
+ private String vspDescription;
+
+ @Column(name = "vendor_name")
+ private String vendorName;
+
+ private String category;
+
+ @Column(name = "sub_category")
+ private String subCategory;
+
+ @Column(name = "vendor_release")
+ private String vendorRelease;
+
+ @Column(name = "package_checksum")
+ private String packageChecksum;
+
+ @Column(name = "package_type")
+ private String packageType;
+
+ @Column(name = "translate_content")
+ private ByteBuffer translatedFile;
+
+ public PackageInfo() {
+ }
+
+ public PackageInfo(String packageId, Version version) {
+ this.vspId = packageId;
+ this.version = version;
+ }
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+ public void setDisplayName(String displayName) {
+ this.displayName = displayName;
+ }
+
+ public String getVspDescription() {
+ return vspDescription;
+ }
+
+ public void setVspDescription(String vspDescription) {
+ this.vspDescription = vspDescription;
+ }
+
+ public Version getVersion() {
+ return version;
+ }
+
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+
+ public String getVspId() {
+ return vspId;
+ }
+
+ public void setVspId(String vspId) {
+ this.vspId = vspId;
+ }
+
+ public String getCategory() {
+ return category;
+ }
+
+ public void setCategory(String category) {
+ this.category = category;
+ }
+
+ public String getSubCategory() {
+ return subCategory;
+ }
+
+ public void setSubCategory(String subCategory) {
+ this.subCategory = subCategory;
+ }
+
+ public String getVendorName() {
+ return vendorName;
+ }
+
+ public void setVendorName(String vendorName) {
+ this.vendorName = vendorName;
+ }
+
+ public String getVendorRelease() {
+ return vendorRelease;
+ }
+
+ public void setVendorRelease(String vendorRelease) {
+ this.vendorRelease = vendorRelease;
+ }
+
+ public String getPackageChecksum() {
+ return packageChecksum;
+ }
+
+ public void setPackageChecksum(String packageChecksum) {
+ this.packageChecksum = packageChecksum;
+ }
+
+ public String getPackageType() {
+ return packageType;
+ }
+
+ public void setPackageType(String packageType) {
+ this.packageType = packageType;
+ }
+
+ public ByteBuffer getTranslatedFile() {
+ return translatedFile;
+ }
+
+ public void setTranslatedFile(ByteBuffer translatedFile) {
+ this.translatedFile = translatedFile;
+ }
+
+ public String getVspName() {
+ return vspName;
+ }
+
+ public void setVspName(String vendorName) {
+ this.vspName = vendorName;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ProcessArtifactEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ProcessArtifactEntity.java
new file mode 100644
index 0000000000..89e6de1e87
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ProcessArtifactEntity.java
@@ -0,0 +1,128 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
+
+import com.datastax.driver.mapping.annotations.ClusteringColumn;
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
+
+import java.nio.ByteBuffer;
+
+@Table(keyspace = "dox", name = "vsp_process")
+public class ProcessArtifactEntity implements VersionableEntity {
+ public static final String ENTITY_TYPE = "Vendor Software Product Process artifact";
+ @PartitionKey
+ @Column(name = "vsp_id")
+ private String vspId;
+ @PartitionKey(value = 1)
+ @Frozen
+ private Version version;
+ @ClusteringColumn
+ @Column(name = "component_id")
+ private String componentId;
+ @ClusteringColumn(value = 1)
+ @Column(name = "process_id")
+ private String id;
+ @Column(name = "artifact_name")
+ private String artifactName;
+ private ByteBuffer artifact;
+
+ public ProcessArtifactEntity() {
+
+ }
+
+ /**
+ * Instantiates a new Process artifact entity.
+ *
+ * @param vspId the vsp id
+ * @param version the version
+ * @param componentId the component id
+ * @param id the id
+ */
+ public ProcessArtifactEntity(String vspId, Version version, String componentId, String id) {
+ this.vspId = vspId;
+ this.version = version;
+ this.componentId = componentId;
+ this.id = id;
+ }
+
+ public String getVspId() {
+ return vspId;
+ }
+
+ public void setVspId(String vspId) {
+ this.vspId = vspId;
+ }
+
+ public Version getVersion() {
+ return version;
+ }
+
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+
+ public String getComponentId() {
+ return componentId;
+ }
+
+ public void setComponentId(String componentId) {
+ this.componentId = componentId;
+ }
+
+ @Override
+ public String getEntityType() {
+ return ENTITY_TYPE;
+ }
+
+ @Override
+ public String getFirstClassCitizenId() {
+ return getVspId();
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getArtifactName() {
+ return artifactName;
+ }
+
+ public void setArtifactName(String artifactName) {
+ this.artifactName = artifactName;
+ }
+
+ public ByteBuffer getArtifact() {
+ return artifact;
+ }
+
+ public void setArtifact(ByteBuffer artifact) {
+ this.artifact = artifact;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ProcessEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ProcessEntity.java
new file mode 100644
index 0000000000..d407540194
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/ProcessEntity.java
@@ -0,0 +1,179 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
+
+import com.datastax.driver.mapping.annotations.ClusteringColumn;
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
+
+@Table(keyspace = "dox", name = "vsp_process")
+public class ProcessEntity implements VersionableEntity {
+ public static final String ENTITY_TYPE = "Vendor Software Product Process";
+ @PartitionKey
+ @Column(name = "vsp_id")
+ private String vspId;
+ @PartitionKey(value = 1)
+ @Frozen
+ private Version version;
+ @ClusteringColumn
+ @Column(name = "component_id")
+ private String componentId;
+ @ClusteringColumn(value = 1)
+ @Column(name = "process_id")
+ private String id;
+ private String name;
+ private String description;
+ @Column(name = "artifact_name")
+ private String artifactName;
+
+ public ProcessEntity() {
+
+ }
+
+ /**
+ * Instantiates a new Process entity.
+ *
+ * @param vspId the vsp id
+ * @param version the version
+ * @param componentId the component id
+ * @param id the id
+ */
+ public ProcessEntity(String vspId, Version version, String componentId, String id) {
+ this.vspId = vspId;
+ this.version = version;
+ this.componentId = componentId;
+ this.id = id;
+ }
+
+ public String getVspId() {
+ return vspId;
+ }
+
+ public void setVspId(String vspId) {
+ this.vspId = vspId;
+ }
+
+ public Version getVersion() {
+ return version;
+ }
+
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+
+ public String getComponentId() {
+ return componentId;
+ }
+
+ public void setComponentId(String componentId) {
+ this.componentId = componentId;
+ }
+
+ @Override
+ public String getEntityType() {
+ return ENTITY_TYPE;
+ }
+
+ @Override
+ public String getFirstClassCitizenId() {
+ return getVspId();
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getArtifactName() {
+ return artifactName;
+ }
+
+ public void setArtifactName(String artifactName) {
+ this.artifactName = artifactName;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null || getClass() != obj.getClass()) {
+ return false;
+ }
+
+ ProcessEntity that = (ProcessEntity) obj;
+
+ if (vspId != null ? !vspId.equals(that.vspId) : that.vspId != null) {
+ return false;
+ }
+ if (version != null ? !version.equals(that.version) : that.version != null) {
+ return false;
+ }
+ if (componentId != null ? !componentId.equals(that.componentId) : that.componentId != null) {
+ return false;
+ }
+ if (id != null ? !id.equals(that.id) : that.id != null) {
+ return false;
+ }
+ if (name != null ? !name.equals(that.name) : that.name != null) {
+ return false;
+ }
+ return description != null ? description.equals(that.description) : that.description == null
+ &&
+ (artifactName != null ? artifactName.equals(that.artifactName) : that.artifactName == null);
+
+ }
+
+ @Override
+ public int hashCode() {
+ int result = vspId != null ? vspId.hashCode() : 0;
+ result = 31 * result + (version != null ? version.hashCode() : 0);
+ result = 31 * result + (componentId != null ? componentId.hashCode() : 0);
+ result = 31 * result + (id != null ? id.hashCode() : 0);
+ result = 31 * result + (name != null ? name.hashCode() : 0);
+ result = 31 * result + (description != null ? description.hashCode() : 0);
+ result = 31 * result + (artifactName != null ? artifactName.hashCode() : 0);
+ return result;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/TranslatedFileData.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/TranslatedFileData.java
new file mode 100644
index 0000000000..c6f197a4cf
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/TranslatedFileData.java
@@ -0,0 +1,97 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
+
+public class TranslatedFileData {
+
+ private String displayName;
+ private String version;
+ private String category;
+ private String subcategory;
+ private String vandorName;
+ private String vendorRelease;
+ private String packageChecksum;
+ private String packageType;
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+ public void setDisplayName(String displayName) {
+ this.displayName = displayName;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public String getCategory() {
+ return category;
+ }
+
+ public void setCategory(String category) {
+ this.category = category;
+ }
+
+ public String getSubcategory() {
+ return subcategory;
+ }
+
+ public void setSubcategory(String subcategory) {
+ this.subcategory = subcategory;
+ }
+
+ public String getVandorName() {
+ return vandorName;
+ }
+
+ public void setVandorName(String vandorName) {
+ this.vandorName = vandorName;
+ }
+
+ public String getVendorRelease() {
+ return vendorRelease;
+ }
+
+ public void setVendorRelease(String vendorRelease) {
+ this.vendorRelease = vendorRelease;
+ }
+
+ public String getPackageChecksum() {
+ return packageChecksum;
+ }
+
+ public void setPackageChecksum(String packageChecksum) {
+ this.packageChecksum = packageChecksum;
+ }
+
+ public String getPackageType() {
+ return packageType;
+ }
+
+ public void setPackageType(String packageType) {
+ this.packageType = packageType;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/UploadDataEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/UploadDataEntity.java
new file mode 100644
index 0000000000..a70b2cd6c8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/UploadDataEntity.java
@@ -0,0 +1,135 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
+
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+import org.openecomp.core.utilities.json.JsonUtil;
+import org.openecomp.sdc.heat.datatypes.structure.ValidationStructureList;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
+
+import java.nio.ByteBuffer;
+
+@Table(keyspace = "dox", name = "vsp_information")
+public class UploadDataEntity implements VersionableEntity {
+ private static final String ENTITY_TYPE = "Vendor Software Product Upload data";
+
+ @PartitionKey
+ @Column(name = "vsp_id")
+ private String id;
+
+ @PartitionKey(value = 1)
+ @Frozen
+ private Version version;
+
+ @Column(name = "package_name")
+ private String packageName;
+
+ @Column(name = "package_version")
+ private String packageVersion;
+
+ @Column(name = "validation_data")
+ private String validationData;
+
+ @Column(name = "content_data")
+ private ByteBuffer contentData;
+
+ public UploadDataEntity() {
+ }
+
+ public UploadDataEntity(String id, Version version) {
+ this.id = id;
+ this.version = version;
+ }
+
+ @Override
+ public String getEntityType() {
+ return ENTITY_TYPE;
+ }
+
+ @Override
+ public String getFirstClassCitizenId() {
+ return getId();
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @Override
+ public Version getVersion() {
+ return version;
+ }
+
+ @Override
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+
+ public String getPackageName() {
+ return packageName;
+ }
+
+ public void setPackageName(String packageName) {
+ this.packageName = packageName;
+ }
+
+ public String getPackageVersion() {
+ return packageVersion;
+ }
+
+ public void setPackageVersion(String packageVersion) {
+ this.packageVersion = packageVersion;
+ }
+
+ public String getValidationData() {
+ return validationData;
+ }
+
+ public void setValidationData(String validationData) {
+ this.validationData = validationData;
+ }
+
+ public ValidationStructureList getValidationDataStructure() {
+ return validationData == null ? null
+ : JsonUtil.json2Object(validationData, ValidationStructureList.class);
+ }
+
+ public void setValidationDataStructure(ValidationStructureList validationData) {
+ this.validationData = validationData == null ? null
+ : JsonUtil.object2Json(validationData);
+ }
+
+ public ByteBuffer getContentData() {
+ return contentData;
+ }
+
+ public void setContentData(ByteBuffer contentData) {
+ this.contentData = contentData;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/VspDetails.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/VspDetails.java
new file mode 100644
index 0000000000..3423ba36b3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/VspDetails.java
@@ -0,0 +1,242 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
+
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Computed;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+import org.openecomp.core.utilities.json.JsonUtil;
+import org.openecomp.sdc.heat.datatypes.structure.ValidationStructureList;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
+
+import java.util.List;
+
+@Table(keyspace = "dox", name = "vsp_information")
+public class VspDetails implements VersionableEntity {
+ public static final String ENTITY_TYPE = "Vendor Software Product";
+
+ @PartitionKey
+ @Column(name = "vsp_id")
+ private String id;
+
+ @PartitionKey(value = 1)
+ @Frozen
+ private Version version;
+
+ private String name;
+ private String description;
+
+ private String category;
+
+ @Column(name = "sub_category")
+ private String subCategory;
+
+ private String icon;
+
+ @Column(name = "vendor_name")
+ private String vendorName;
+
+ @Column(name = "vendor_id")
+ private String vendorId;
+
+ @Column(name = "vlm_version")
+ @Frozen
+ private Version vlmVersion;
+
+ @Column(name = "license_agreement")
+ private String licenseAgreement;
+
+ @Column(name = "feature_groups")
+ private List<String> featureGroups;
+
+ @Column(name = "package_name")
+ private String packageName;
+
+ @Column(name = "package_version")
+ private String packageVersion;
+
+ @Column(name = "validation_data")
+ private String validationData;
+
+ @Computed("writetime(name)")
+ private Long writetimeMicroSeconds;
+
+ public VspDetails() {
+ }
+
+ public VspDetails(String id, Version version) {
+ this.id = id;
+ this.version = version;
+ }
+
+ @Override
+ public String getEntityType() {
+ return ENTITY_TYPE;
+ }
+
+ @Override
+ public String getFirstClassCitizenId() {
+ return getId();
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @Override
+ public Version getVersion() {
+ return version;
+ }
+
+ @Override
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getCategory() {
+ return category;
+ }
+
+ public void setCategory(String category) {
+ this.category = category;
+ }
+
+ public String getSubCategory() {
+ return subCategory;
+ }
+
+ public void setSubCategory(String subCategory) {
+ this.subCategory = subCategory;
+ }
+
+ public String getIcon() {
+ return icon;
+ }
+
+ public void setIcon(String icon) {
+ this.icon = icon;
+ }
+
+ public String getVendorName() {
+ return vendorName;
+ }
+
+ public void setVendorName(String vendorName) {
+ this.vendorName = vendorName;
+ }
+
+ public String getVendorId() {
+ return vendorId;
+ }
+
+ public void setVendorId(String vendorId) {
+ this.vendorId = vendorId;
+ }
+
+ public Version getVlmVersion() {
+ return vlmVersion;
+ }
+
+ public void setVlmVersion(Version vlmVersion) {
+ this.vlmVersion = vlmVersion;
+ }
+
+ public String getLicenseAgreement() {
+ return licenseAgreement;
+ }
+
+ public void setLicenseAgreement(String licenseAgreement) {
+ this.licenseAgreement = licenseAgreement;
+ }
+
+ public List<String> getFeatureGroups() {
+ return featureGroups;
+ }
+
+ public void setFeatureGroups(List<String> featureGroups) {
+ this.featureGroups = featureGroups;
+ }
+
+ public String getPackageName() {
+ return packageName;
+ }
+
+ public void setPackageName(String packageName) {
+ this.packageName = packageName;
+ }
+
+ public String getPackageVersion() {
+ return packageVersion;
+ }
+
+ public void setPackageVersion(String packageVersion) {
+ this.packageVersion = packageVersion;
+ }
+
+ public String getValidationData() {
+ return validationData;
+ }
+
+ public void setValidationData(String validationData) {
+ this.validationData = validationData;
+ }
+
+ public ValidationStructureList getValidationDataStructure() {
+ return validationData == null ? null
+ : JsonUtil.json2Object(validationData, ValidationStructureList.class);
+ }
+
+ public void setValidationDataStructure(ValidationStructureList validationData) {
+ this.validationData = validationData == null ? null
+ : JsonUtil.object2Json(validationData);
+ }
+
+ public Long getWritetimeMicroSeconds() {
+ return this.writetimeMicroSeconds;
+ }
+
+ public void setWritetimeMicroSeconds(Long writetimeMicroSeconds) {
+ this.writetimeMicroSeconds = writetimeMicroSeconds;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/VspQuestionnaireEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/VspQuestionnaireEntity.java
new file mode 100644
index 0000000000..42fbecfe01
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/type/VspQuestionnaireEntity.java
@@ -0,0 +1,111 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
+
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionEntityId;
+import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionEntityType;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+@Table(keyspace = "dox", name = "vsp_information")
+public class VspQuestionnaireEntity implements CompositionEntity {
+ private static final String ENTITY_TYPE = "Vendor Software Product";
+
+ @PartitionKey
+ @Column(name = "vsp_id")
+ private String id;
+ @PartitionKey(value = 1)
+ @Frozen
+ private Version version;
+ @Column(name = "questionnaire_data")
+ private String questionnaireData;
+
+ public VspQuestionnaireEntity() {
+
+ }
+
+ public VspQuestionnaireEntity(String vspId, Version version) {
+ this.id = vspId;
+ this.version = version;
+ }
+
+ @Override
+ public String getId() {
+ return id;
+ }
+
+ @Override
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @Override
+ public Version getVersion() {
+ return version;
+ }
+
+ @Override
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+
+ @Override
+ public String getEntityType() {
+ return ENTITY_TYPE;
+ }
+
+ @Override
+ public String getFirstClassCitizenId() {
+ return getId();
+ }
+
+ @Override
+ public CompositionEntityType getType() {
+ return CompositionEntityType.vsp;
+ }
+
+ @Override
+ public CompositionEntityId getCompositionEntityId() {
+ return new CompositionEntityId(getId(), null);
+ }
+
+ @Override
+ public String getCompositionData() {
+ return null; //none
+ }
+
+ @Override
+ public void setCompositionData(String compositionData) {
+ //none
+ }
+
+ public String getQuestionnaireData() {
+ return questionnaireData;
+ }
+
+ public void setQuestionnaireData(String questionnaireData) {
+ this.questionnaireData = questionnaireData;
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/Component.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/Component.java
new file mode 100644
index 0000000000..b112ee2216
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/Component.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.types.composition;
+
+import java.util.List;
+
+public class Component {
+ private ComponentData data;
+ private List<Nic> nics;
+
+ public ComponentData getData() {
+ return data;
+ }
+
+ public void setData(ComponentData data) {
+ this.data = data;
+ }
+
+ public List<Nic> getNics() {
+ return nics;
+ }
+
+ public void setNics(List<Nic> nics) {
+ this.nics = nics;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/ComponentData.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/ComponentData.java
new file mode 100644
index 0000000000..0b3096c686
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/ComponentData.java
@@ -0,0 +1,80 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.types.composition;
+
+public class ComponentData implements CompositionDataEntity {
+ private String name;
+ private String description;
+ private String displayName;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+ public void setDisplayName(String displayName) {
+ this.displayName = displayName;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (!(obj instanceof ComponentData)) {
+ return false;
+ }
+
+ ComponentData that = (ComponentData) obj;
+
+ if (!name.equals(that.name)) {
+ return false;
+ }
+ if (description != null ? !description.equals(that.description) : that.description != null) {
+ return false;
+ }
+ return displayName != null ? displayName.equals(that.displayName) : that.displayName == null;
+
+ }
+
+ @Override
+ public int hashCode() {
+ int result = name.hashCode();
+ result = 31 * result + (description != null ? description.hashCode() : 0);
+ result = 31 * result + (displayName != null ? displayName.hashCode() : 0);
+ return result;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/CompositionData.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/CompositionData.java
new file mode 100644
index 0000000000..30e11cde60
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/CompositionData.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.types.composition;
+
+import java.util.List;
+
+public class CompositionData {
+ private List<Network> networks;
+ private List<Component> components;
+
+ public List<Network> getNetworks() {
+ return networks;
+ }
+
+ public void setNetworks(List<Network> networks) {
+ this.networks = networks;
+ }
+
+ public List<Component> getComponents() {
+ return components;
+ }
+
+ public void setComponents(List<Component> components) {
+ this.components = components;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/CompositionDataEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/CompositionDataEntity.java
new file mode 100644
index 0000000000..9c09b0ded4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/CompositionDataEntity.java
@@ -0,0 +1,24 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.types.composition;
+
+public interface CompositionDataEntity {
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/CompositionEntityId.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/CompositionEntityId.java
new file mode 100644
index 0000000000..af1123b2e8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/CompositionEntityId.java
@@ -0,0 +1,64 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.types.composition;
+
+public class CompositionEntityId {
+ private String id;
+ private CompositionEntityId parentId;
+
+ public CompositionEntityId(String id, CompositionEntityId parentId) {
+ this.id = id;
+ this.parentId = parentId;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public CompositionEntityId getParentId() {
+ return parentId;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null || getClass() != obj.getClass()) {
+ return false;
+ }
+
+ CompositionEntityId that = (CompositionEntityId) obj;
+
+ if (id != null ? !id.equals(that.id) : that.id != null) {
+ return false;
+ }
+ return parentId != null ? parentId.equals(that.parentId) : that.parentId == null;
+
+ }
+
+ @Override
+ public int hashCode() {
+ int result = id != null ? id.hashCode() : 0;
+ result = 31 * result + (parentId != null ? parentId.hashCode() : 0);
+ return result;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/CompositionEntityType.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/CompositionEntityType.java
new file mode 100644
index 0000000000..f762aeb341
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/CompositionEntityType.java
@@ -0,0 +1,28 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.types.composition;
+
+public enum CompositionEntityType {
+ vsp,
+ network,
+ component,
+ nic
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/Network.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/Network.java
new file mode 100644
index 0000000000..2f9eb4e69c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/Network.java
@@ -0,0 +1,67 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.types.composition;
+
+public class Network implements CompositionDataEntity {
+ private String name;
+ private boolean dhcp;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public boolean isDhcp() {
+ return dhcp;
+ }
+
+ public void setDhcp(boolean dhcp) {
+ this.dhcp = dhcp;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null || getClass() != obj.getClass()) {
+ return false;
+ }
+
+ Network network = (Network) obj;
+
+ if (dhcp != network.dhcp) {
+ return false;
+ }
+ return name != null ? name.equals(network.name) : network.name == null;
+
+ }
+
+ @Override
+ public int hashCode() {
+ int result = name != null ? name.hashCode() : 0;
+ result = 31 * result + (dhcp ? 1 : 0);
+ return result;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/NetworkType.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/NetworkType.java
new file mode 100644
index 0000000000..d90135a205
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/NetworkType.java
@@ -0,0 +1,26 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.types.composition;
+
+public enum NetworkType {
+ Internal,
+ External
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/Nic.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/Nic.java
new file mode 100644
index 0000000000..e44a731824
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/composition/Nic.java
@@ -0,0 +1,102 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.types.composition;
+
+public class Nic implements CompositionDataEntity {
+ private String name;
+ private String description;
+ private String networkId;
+ private String networkName;
+ private NetworkType networkType;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getNetworkId() {
+ return networkId;
+ }
+
+ public void setNetworkId(String networkId) {
+ this.networkId = networkId;
+ }
+
+ public String getNetworkName() {
+ return networkName;
+ }
+
+ public void setNetworkName(String networkName) {
+ this.networkName = networkName;
+ }
+
+ public NetworkType getNetworkType() {
+ return networkType;
+ }
+
+ public void setNetworkType(NetworkType networkType) {
+ this.networkType = networkType;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null || getClass() != obj.getClass()) {
+ return false;
+ }
+
+ Nic nic = (Nic) obj;
+
+ if (name != null ? !name.equals(nic.name) : nic.name != null) {
+ return false;
+ }
+ if (description != null ? !description.equals(nic.description) : nic.description != null) {
+ return false;
+ }
+ if (networkId != null ? !networkId.equals(nic.networkId) : nic.networkId != null) {
+ return false;
+ }
+ return networkType == nic.networkType;
+
+ }
+
+ @Override
+ public int hashCode() {
+ int result = name != null ? name.hashCode() : 0;
+ result = 31 * result + (description != null ? description.hashCode() : 0);
+ result = 31 * result + (networkId != null ? networkId.hashCode() : 0);
+ result = 31 * result + (networkType != null ? networkType.hashCode() : 0);
+ return result;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/resources/factoryConfiguration.json b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/resources/factoryConfiguration.json
new file mode 100644
index 0000000000..86b2f857cf
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/resources/factoryConfiguration.json
@@ -0,0 +1,14 @@
+{
+ "org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductDaoFactory": "org.openecomp.sdc.vendorsoftwareproduct.dao.impl.VendorSoftwareProductDaoFactoryImpl",
+ "org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductInfoDaoFactory": "org.openecomp.sdc.vendorsoftwareproduct.dao.impl.VendorSoftwareProductInfoDaoFactoryImpl",
+ "org.openecomp.sdc.vendorsoftwareproduct.dao.UploadDataDaoFactory": "org.openecomp.sdc.vendorsoftwareproduct.dao.impl.UploadDataDaoFactoryImpl",
+ "org.openecomp.sdc.vendorsoftwareproduct.dao.PackageInfoDaoFactory": "org.openecomp.sdc.vendorsoftwareproduct.dao.impl.PackageInfoDaoFactoryImpl",
+ "org.openecomp.sdc.vendorsoftwareproduct.dao.NetworkDaoFactory": "org.openecomp.sdc.vendorsoftwareproduct.dao.impl.NetworkDaoFactoryImpl",
+ "org.openecomp.sdc.vendorsoftwareproduct.dao.ComponentDaoFactory": "org.openecomp.sdc.vendorsoftwareproduct.dao.impl.ComponentDaoFactoryImpl",
+ "org.openecomp.sdc.vendorsoftwareproduct.dao.ComponentArtifactDaoFactory": "org.openecomp.sdc.vendorsoftwareproduct.dao.impl.ComponentArtifactDaoFactoryImpl",
+ "org.openecomp.sdc.vendorsoftwareproduct.dao.NicDaoFactory": "org.openecomp.sdc.vendorsoftwareproduct.dao.impl.NicDaoFactoryImpl",
+ "org.openecomp.sdc.vendorsoftwareproduct.dao.VspQuestionnaireDaoFactory": "org.openecomp.sdc.vendorsoftwareproduct.dao.impl.VspQuestionnaireDaoFactoryImpl",
+ "org.openecomp.sdc.vendorsoftwareproduct.dao.ProcessDaoFactory": "org.openecomp.sdc.vendorsoftwareproduct.dao.impl.ProcessDaoFactoryImpl",
+ "org.openecomp.sdc.vendorsoftwareproduct.dao.ProcessArtifactDaoFactory": "org.openecomp.sdc.vendorsoftwareproduct.dao.impl.ProcessArtifactDaoFactoryImpl"
+
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/pom.xml b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/pom.xml
new file mode 100644
index 0000000000..c732472152
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/pom.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-vendor-software-product-lib</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>openecomp-sdc-vendor-software-product-core</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.google.code.gson</groupId>
+ <artifactId>gson</artifactId>
+ <version>2.3.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.yaml</groupId>
+ <artifactId>snakeyaml</artifactId>
+ <version>1.14</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-enrichment-impl</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-vendor-software-product-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-nosqldb-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.freemarker</groupId>
+ <artifactId>freemarker</artifactId>
+ <version>2.3.23</version>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>${testng.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-config-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-model-impl</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project> \ No newline at end of file
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/dao/impl/ComponentArtifactDaoCassandraImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/ComponentArtifactDaoCassandraImpl.java
new file mode 100644
index 0000000000..2525537cef
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/ComponentArtifactDaoCassandraImpl.java
@@ -0,0 +1,159 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.impl;
+
+import com.datastax.driver.core.ResultSet;
+import com.datastax.driver.core.UDTValue;
+import com.datastax.driver.mapping.Mapper;
+import com.datastax.driver.mapping.Result;
+import com.datastax.driver.mapping.UDTMapper;
+import com.datastax.driver.mapping.annotations.Accessor;
+import com.datastax.driver.mapping.annotations.Query;
+import org.openecomp.core.dao.impl.CassandraBaseDao;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.ComponentArtifactDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentArtifactEntity;
+import org.openecomp.sdc.versioning.VersioningManagerFactory;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.types.VersionableEntityMetadata;
+
+
+import java.nio.ByteBuffer;
+import java.util.Collection;
+
+public class ComponentArtifactDaoCassandraImpl extends CassandraBaseDao<ComponentArtifactEntity>
+ implements ComponentArtifactDao {
+
+ private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static final ComponentArtifactAccessor accessor =
+ noSqlDb.getMappingManager().createAccessor(ComponentArtifactAccessor.class);
+ private static final Mapper<ComponentArtifactEntity> mapper =
+ noSqlDb.getMappingManager().mapper(ComponentArtifactEntity.class);
+ private static final UDTMapper<Version> versionMapper =
+ noSqlDb.getMappingManager().udtMapper(Version.class);
+
+
+ @Override
+ public void registerVersioning(String versionableEntityType) {
+ VersionableEntityMetadata metadata = new VersionableEntityMetadata(
+ mapper.getTableMetadata().getName(),
+ mapper.getTableMetadata().getPartitionKey().get(0).getName(),
+ mapper.getTableMetadata().getPartitionKey().get(1).getName());
+
+ // metadata.setUniqueValuesMetadata(Collections.singletonList(new UniqueValueMetadata
+ // (VendorSoftwareProductConstants.UniqueValues.COMPONENT_ARTIFACT_NAME,
+ // Arrays.asList(mapper.getTableMetadata().getPartitionKey().get(0).getName(), mapper
+ // .getTableMetadata().getPartitionKey().get(1).getName(), "name"))));
+
+ VersioningManagerFactory.getInstance().createInterface()
+ .register(versionableEntityType, metadata);
+ }
+
+ @Override
+ public ComponentArtifactEntity getArtifactByType(ComponentArtifactEntity entity) {
+ return accessor.listByType(entity.getVspId(), versionMapper.toUDT(entity.getVersion()),
+ entity.getComponentId(), entity.getType().toString()).one();
+ }
+
+ @Override
+ protected Mapper<ComponentArtifactEntity> getMapper() {
+ return mapper;
+ }
+
+ @Override
+ protected Object[] getKeys(ComponentArtifactEntity entity) {
+ return new Object[]{entity.getVspId(), versionMapper.toUDT(entity.getVersion()),
+ entity.getComponentId(), entity.getType().toString(), entity.getId()};
+ }
+
+ @Override
+ public Collection<ComponentArtifactEntity> list(ComponentArtifactEntity entity) {
+ return accessor.listByType(entity.getVspId(), versionMapper.toUDT(entity.getVersion()),
+ entity.getComponentId(), entity.getType().toString()).all();
+ }
+
+ @Override
+ public void update(ComponentArtifactEntity entity) {
+ accessor.update(entity.getVspId(), versionMapper.toUDT(entity.getVersion()),
+ entity.getComponentId(), entity.getId(), entity.getArtifactName(), entity.getArtifact(),
+ entity.getType().toString());
+
+ }
+
+ @Override
+ public void delete(ComponentArtifactEntity entity) {
+ accessor.delete(entity.getVspId(), versionMapper.toUDT(entity.getVersion()),
+ entity.getComponentId(), entity.getType().toString());
+ }
+
+ @Override
+ public Collection<ComponentArtifactEntity> getArtifactNamesAndTypesForComponent(
+ ComponentArtifactEntity entity) {
+ return accessor.getArtifactNamesAndTypesForComponent(entity.getVspId(),
+ versionMapper.toUDT(entity.getVersion()), entity.getComponentId()).all();
+ }
+
+ @Override
+ public void deleteAll(ComponentArtifactEntity entity) {
+ accessor.deleteAll(entity.getVspId(), versionMapper.toUDT(entity.getVersion()));
+ }
+
+
+ @Accessor
+ interface ComponentArtifactAccessor {
+
+ @Query(
+ "insert into vsp_component_artifact (vsp_id, version, component_id, artifact_id, name, "
+ + "artifact, artifact_type) values (?,?,?,?,?,?,?)")
+ ResultSet update(String vspId, UDTValue version, String componentId, String id,
+ String artifactName, ByteBuffer artifact, String type);
+
+ @Query(
+ "select vsp_id, version, component_id, artifact_type, artifact_id, name, artifact from "
+ + "vsp_component_artifact where vsp_id=? and version=? and component_id=? and "
+ + "artifact_type =?")
+ Result<ComponentArtifactEntity> listByType(String vspId, UDTValue version, String componentId,
+ String type);
+
+ @Query(
+ "delete name, artifact from vsp_component_artifact where vsp_id=? and version=? and "
+ + "component_id=? and artifact_type=? and artifact_id=?")
+ ResultSet delete(String vspId, UDTValue version, String componentId, String type,
+ String artifactId);
+
+ @Query(
+ "delete from vsp_component_artifact where vsp_id=? and version=? and component_id=? "
+ + "and artifact_type=?")
+ ResultSet delete(String vspId, UDTValue version, String componentId, String artifactType);
+
+ @Query("delete from vsp_component_artifact where vsp_id=? and version=?")
+ ResultSet deleteAll(String vspId, UDTValue version);
+
+ @Query(
+ "select name, artifact_type from vsp_component_artifact where vsp_id=? and version=? "
+ + "and component_id=?")
+ Result<ComponentArtifactEntity> getArtifactNamesAndTypesForComponent(String vspId,
+ UDTValue version,
+ String componentId);
+
+ }
+}
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/dao/impl/ComponentArtifactDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/ComponentArtifactDaoFactoryImpl.java
new file mode 100644
index 0000000000..07a9f104f4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/ComponentArtifactDaoFactoryImpl.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.impl;
+
+import org.openecomp.sdc.vendorsoftwareproduct.dao.ComponentArtifactDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.ComponentArtifactDaoFactory;
+
+public class ComponentArtifactDaoFactoryImpl extends ComponentArtifactDaoFactory {
+ private static final ComponentArtifactDao INSTANCE = new ComponentArtifactDaoCassandraImpl();
+
+ @Override
+ public ComponentArtifactDao createInterface() {
+ return INSTANCE;
+ }
+}
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/dao/impl/ComponentDaoCassandraImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/ComponentDaoCassandraImpl.java
new file mode 100644
index 0000000000..85372380c0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/ComponentDaoCassandraImpl.java
@@ -0,0 +1,139 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.impl;
+
+import com.datastax.driver.core.ResultSet;
+import com.datastax.driver.core.UDTValue;
+import com.datastax.driver.mapping.Mapper;
+import com.datastax.driver.mapping.Result;
+import com.datastax.driver.mapping.UDTMapper;
+import com.datastax.driver.mapping.annotations.Accessor;
+import com.datastax.driver.mapping.annotations.Query;
+import org.openecomp.core.dao.impl.CassandraBaseDao;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import org.openecomp.sdc.vendorsoftwareproduct.VendorSoftwareProductConstants;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.ComponentDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentEntity;
+import org.openecomp.sdc.versioning.VersioningManagerFactory;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.types.UniqueValueMetadata;
+import org.openecomp.sdc.versioning.types.VersionableEntityMetadata;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+
+public class ComponentDaoCassandraImpl extends CassandraBaseDao<ComponentEntity>
+ implements ComponentDao {
+
+ private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static final Mapper<ComponentEntity> mapper =
+ noSqlDb.getMappingManager().mapper(ComponentEntity.class);
+ private static final ComponentAccessor accessor =
+ noSqlDb.getMappingManager().createAccessor(ComponentAccessor.class);
+ private static final UDTMapper<Version> versionMapper =
+ noSqlDb.getMappingManager().udtMapper(Version.class);
+
+ @Override
+ public void registerVersioning(String versionableEntityType) {
+ VersionableEntityMetadata metadata = new VersionableEntityMetadata(
+ mapper.getTableMetadata().getName(),
+ mapper.getTableMetadata().getPartitionKey().get(0).getName(),
+ mapper.getTableMetadata().getPartitionKey().get(1).getName());
+
+
+ metadata.setUniqueValuesMetadata(Collections.singletonList(
+ new UniqueValueMetadata(VendorSoftwareProductConstants.UniqueValues.COMPONENT_NAME,
+ Arrays.asList(mapper.getTableMetadata().getPartitionKey().get(0).getName(),
+ mapper.getTableMetadata().getPartitionKey().get(1).getName(), "name"))));
+
+ VersioningManagerFactory.getInstance().createInterface()
+ .register(versionableEntityType, metadata);
+ }
+
+ @Override
+ protected Mapper<ComponentEntity> getMapper() {
+ return mapper;
+ }
+
+ @Override
+ protected Object[] getKeys(ComponentEntity entity) {
+ return new Object[]{entity.getVspId(), versionMapper.toUDT(entity.getVersion()),
+ entity.getId()};
+ }
+
+ @Override
+ public void update(ComponentEntity entity) {
+ accessor.updateCompositionData(entity.getVspId(), versionMapper.toUDT(entity.getVersion()),
+ entity.getId(), entity.getCompositionData());
+ }
+
+ @Override
+ public Collection<ComponentEntity> list(ComponentEntity entity) {
+ return accessor.list(entity.getVspId(), versionMapper.toUDT(entity.getVersion())).all();
+ }
+
+ @Override
+ public void updateQuestionnaireData(String vspId, Version version, String id,
+ String questionnaireData) {
+ accessor.updateQuestionnaireData(questionnaireData, vspId, versionMapper.toUDT(version), id);
+ }
+
+ @Override
+ public Collection<ComponentEntity> listQuestionnaires(String vspId, Version version) {
+ return accessor.listQuestionnaires(vspId, versionMapper.toUDT(version)).all();
+ }
+
+ @Override
+ public void deleteAll(String vspId, Version version) {
+ accessor.deleteAll(vspId, version);
+ }
+
+ @Accessor
+ interface ComponentAccessor {
+
+ @Query(
+ "select vsp_id, version, component_id, composition_data from vsp_component "
+ + "where vsp_id=? and version=?")
+ Result<ComponentEntity> list(String vspId, UDTValue version);
+
+ @Query(
+ "select vsp_id, version, component_id, questionnaire_data from vsp_component "
+ + "where vsp_id=? and version=?")
+ Result<ComponentEntity> listQuestionnaires(String vspId, UDTValue version);
+
+ @Query(
+ "insert into vsp_component (vsp_id, version, component_id, composition_data) "
+ + "values (?,?,?,?)")
+ ResultSet updateCompositionData(String vspId, UDTValue version, String id,
+ String compositionData);
+
+ @Query(
+ "update vsp_component set questionnaire_data=? where vsp_id=? and version=? "
+ + "and component_id=?")
+ ResultSet updateQuestionnaireData(String questionnaireData, String vspId, UDTValue version,
+ String id);
+
+ @Query("delete from vsp_component where vsp_id=? and version=?")
+ ResultSet deleteAll(String vspId, Version version);
+ }
+}
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/dao/impl/ComponentDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/ComponentDaoFactoryImpl.java
new file mode 100644
index 0000000000..1e57242ce1
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/ComponentDaoFactoryImpl.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.impl;
+
+import org.openecomp.sdc.vendorsoftwareproduct.dao.ComponentDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.ComponentDaoFactory;
+
+public class ComponentDaoFactoryImpl extends ComponentDaoFactory {
+ private static final ComponentDao INSTANCE = new ComponentDaoCassandraImpl();
+
+ @Override
+ public ComponentDao createInterface() {
+ return INSTANCE;
+ }
+}
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/dao/impl/NetworkDaoCassandraImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/NetworkDaoCassandraImpl.java
new file mode 100644
index 0000000000..f7b8f30f0a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/NetworkDaoCassandraImpl.java
@@ -0,0 +1,127 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.impl;
+
+import com.datastax.driver.core.ResultSet;
+import com.datastax.driver.core.UDTValue;
+import com.datastax.driver.mapping.Mapper;
+import com.datastax.driver.mapping.Result;
+import com.datastax.driver.mapping.UDTMapper;
+import com.datastax.driver.mapping.annotations.Accessor;
+import com.datastax.driver.mapping.annotations.Query;
+import org.openecomp.core.dao.impl.CassandraBaseDao;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import org.openecomp.sdc.vendorsoftwareproduct.VendorSoftwareProductConstants;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.NetworkDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NetworkEntity;
+import org.openecomp.sdc.versioning.VersioningManagerFactory;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.types.UniqueValueMetadata;
+import org.openecomp.sdc.versioning.types.VersionableEntityMetadata;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+
+public class NetworkDaoCassandraImpl extends CassandraBaseDao<NetworkEntity> implements NetworkDao {
+
+ private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static final Mapper<NetworkEntity> mapper =
+ noSqlDb.getMappingManager().mapper(NetworkEntity.class);
+ private static final NetworkAccessor accessor =
+ noSqlDb.getMappingManager().createAccessor(NetworkAccessor.class);
+ private static final UDTMapper<Version> versionMapper =
+ noSqlDb.getMappingManager().udtMapper(Version.class);
+
+ @Override
+ public void registerVersioning(String versionableEntityType) {
+ VersionableEntityMetadata metadata = new VersionableEntityMetadata(
+ mapper.getTableMetadata().getName(),
+ mapper.getTableMetadata().getPartitionKey().get(0).getName(),
+ mapper.getTableMetadata().getPartitionKey().get(1).getName());
+
+
+ metadata.setUniqueValuesMetadata(Collections.singletonList(
+ new UniqueValueMetadata(VendorSoftwareProductConstants.UniqueValues.NETWORK_NAME,
+ Arrays.asList(mapper.getTableMetadata().getPartitionKey().get(0).getName(),
+ mapper.getTableMetadata().getPartitionKey().get(1).getName(), "name"))));
+
+ VersioningManagerFactory.getInstance().createInterface()
+ .register(versionableEntityType, metadata);
+ }
+
+ @Override
+ protected Mapper<NetworkEntity> getMapper() {
+ return mapper;
+ }
+
+ @Override
+ protected Object[] getKeys(NetworkEntity entity) {
+ return new Object[]{entity.getVspId(), versionMapper.toUDT(entity.getVersion()),
+ entity.getId()};
+ }
+
+ @Override
+ public void update(NetworkEntity entity) {
+ accessor.updateCompositionData(entity.getVspId(), versionMapper.toUDT(entity.getVersion()),
+ entity.getId(), entity.getCompositionData());
+ }
+
+ @Override
+ public void updateQuestionnaireData(String vspId, Version version, String id,
+ String questionnaireData) {
+ accessor.updateQuestionnaireData(questionnaireData, vspId, versionMapper.toUDT(version), id);
+ }
+
+ @Override
+ public Collection<NetworkEntity> list(NetworkEntity entity) {
+ return accessor.list(entity.getVspId(), versionMapper.toUDT(entity.getVersion())).all();
+ }
+
+ @Override
+ public void deleteAll(String vspId, Version version) {
+ accessor.deleteAll(vspId, version);
+ }
+
+ @Accessor
+ interface NetworkAccessor {
+
+ @Query(
+ "select vsp_id, version, network_id, composition_data from vsp_network where vsp_id=? "
+ + "and version=?")
+ Result<NetworkEntity> list(String vspId, UDTValue version);
+
+ @Query(
+ "insert into vsp_network (vsp_id, version, network_id, composition_data) values (?,?,?,?)")
+ ResultSet updateCompositionData(String vspId, UDTValue version, String id,
+ String compositionData);
+
+ @Query(
+ "update vsp_network set questionnaire_data=? where vsp_id=? and version=? and network_id=?")
+ ResultSet updateQuestionnaireData(String questionnaireData, String vspId, UDTValue version,
+ String id);
+
+ @Query("delete from vsp_network where vsp_id=? and version=?")
+ ResultSet deleteAll(String vspId, Version version);
+
+ }
+}
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/dao/impl/NetworkDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/NetworkDaoFactoryImpl.java
new file mode 100644
index 0000000000..b4360996df
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/NetworkDaoFactoryImpl.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.impl;
+
+import org.openecomp.sdc.vendorsoftwareproduct.dao.NetworkDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.NetworkDaoFactory;
+
+public class NetworkDaoFactoryImpl extends NetworkDaoFactory {
+ private static final NetworkDao INSTANCE = new NetworkDaoCassandraImpl();
+
+ @Override
+ public NetworkDao createInterface() {
+ return INSTANCE;
+ }
+}
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/dao/impl/NicDaoCassandraImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/NicDaoCassandraImpl.java
new file mode 100644
index 0000000000..e7e1eed8e0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/NicDaoCassandraImpl.java
@@ -0,0 +1,148 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.impl;
+
+import com.datastax.driver.core.ResultSet;
+import com.datastax.driver.core.UDTValue;
+import com.datastax.driver.mapping.Mapper;
+import com.datastax.driver.mapping.Result;
+import com.datastax.driver.mapping.UDTMapper;
+import com.datastax.driver.mapping.annotations.Accessor;
+import com.datastax.driver.mapping.annotations.Query;
+import org.openecomp.core.dao.impl.CassandraBaseDao;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import org.openecomp.sdc.vendorsoftwareproduct.VendorSoftwareProductConstants;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.NicDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NicEntity;
+import org.openecomp.sdc.versioning.VersioningManagerFactory;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.types.UniqueValueMetadata;
+import org.openecomp.sdc.versioning.types.VersionableEntityMetadata;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+
+public class NicDaoCassandraImpl extends CassandraBaseDao<NicEntity> implements NicDao {
+
+ private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static final Mapper<NicEntity> mapper =
+ noSqlDb.getMappingManager().mapper(NicEntity.class);
+ private static final NicAccessor accessor =
+ noSqlDb.getMappingManager().createAccessor(NicAccessor.class);
+ private static final UDTMapper<Version> versionMapper =
+ noSqlDb.getMappingManager().udtMapper(Version.class);
+
+ @Override
+ public void registerVersioning(String versionableEntityType) {
+ VersionableEntityMetadata metadata = new VersionableEntityMetadata(
+ mapper.getTableMetadata().getName(),
+ mapper.getTableMetadata().getPartitionKey().get(0).getName(),
+ mapper.getTableMetadata().getPartitionKey().get(1).getName());
+
+
+ metadata.setUniqueValuesMetadata(Collections
+ .singletonList(new UniqueValueMetadata(VendorSoftwareProductConstants.UniqueValues.NIC_NAME,
+ Arrays.asList("vsp_id", "version", "component_id", "name"))));
+
+ VersioningManagerFactory.getInstance().createInterface()
+ .register(versionableEntityType, metadata);
+ }
+
+ @Override
+ protected Mapper<NicEntity> getMapper() {
+ return mapper;
+ }
+
+ @Override
+ protected Object[] getKeys(NicEntity entity) {
+ return new Object[]{entity.getVspId(), versionMapper.toUDT(entity.getVersion()),
+ entity.getComponentId(), entity.getId()};
+ }
+
+ @Override
+ public void create(NicEntity entity) {
+ super.create(entity);
+ }
+
+ @Override
+ public void update(NicEntity entity) {
+ accessor.updateCompositionData(entity.getVspId(), versionMapper.toUDT(entity.getVersion()),
+ entity.getComponentId(), entity.getId(), entity.getCompositionData());
+ }
+
+ @Override
+ public void updateQuestionnaireData(String vspId, Version version, String id, String componentId,
+ String questionnaireData) {
+ accessor.updateQuestionnaireData(questionnaireData, vspId, versionMapper.toUDT(version), id,
+ componentId);
+ }
+
+ @Override
+ public Collection<NicEntity> listByVsp(String vspId, Version version) {
+ return accessor.listByVspId(vspId, versionMapper.toUDT(version)).all();
+ }
+
+ @Override
+ public Collection<NicEntity> list(NicEntity entity) {
+ return accessor.listByComponentId(entity.getVspId(), versionMapper.toUDT(entity.getVersion()),
+ entity.getComponentId()).all();
+ }
+
+ public void deleteByComponentId(String vspId, Version version, String componentId) {
+ accessor.deleteByComponentId(vspId, version, componentId);
+ }
+
+ public void deleteByVspId(String vspId, Version version) {
+ accessor.deleteByVspId(vspId, versionMapper.toUDT(version));
+ }
+
+ @Accessor
+ interface NicAccessor {
+
+ @Query(
+ "select vsp_id, version, component_id, nic_id, composition_data "
+ + "from vsp_component_nic where vsp_id=? and version=? and component_id=?")
+ Result<NicEntity> listByComponentId(String vspId, UDTValue version, String componentId);
+
+ @Query("select * from vsp_component_nic where vsp_id=? and version=?")
+ Result<NicEntity> listByVspId(String vspId, UDTValue version);
+
+ @Query(
+ "insert into vsp_component_nic (vsp_id, version, component_id, nic_id, composition_data) "
+ + "values (?,?,?,?,?)")
+ ResultSet updateCompositionData(String vspId, UDTValue version, String componentId, String id,
+ String compositionData);
+
+ @Query(
+ "update vsp_component_nic set questionnaire_data=? where vsp_id=? and version=? "
+ + "and component_id=? and nic_id=?")
+ ResultSet updateQuestionnaireData(String questionnaireData, String vspId, UDTValue version,
+ String componentId, String id);
+
+ @Query("delete from vsp_component_nic where vsp_id=? and version=? and component_id=?")
+ ResultSet deleteByComponentId(String vspId, Version version, String componentId);
+
+ @Query("delete from vsp_component_nic where vsp_id=? and version=?")
+ ResultSet deleteByVspId(String vspId, UDTValue version);
+ }
+}
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/dao/impl/NicDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/NicDaoFactoryImpl.java
new file mode 100644
index 0000000000..f4dd8d5a71
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/NicDaoFactoryImpl.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.impl;
+
+import org.openecomp.sdc.vendorsoftwareproduct.dao.NicDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.NicDaoFactory;
+
+public class NicDaoFactoryImpl extends NicDaoFactory {
+ private static final NicDao INSTANCE = new NicDaoCassandraImpl();
+
+ @Override
+ public NicDao createInterface() {
+ return INSTANCE;
+ }
+}
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/dao/impl/PackageInfoDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/PackageInfoDaoFactoryImpl.java
new file mode 100644
index 0000000000..8b9bedcd3a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/PackageInfoDaoFactoryImpl.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.impl;
+
+import org.openecomp.sdc.vendorsoftwareproduct.dao.PackageInfoDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.PackageInfoDaoFactory;
+
+public class PackageInfoDaoFactoryImpl extends PackageInfoDaoFactory {
+ private static final PackageInfoDao INSTANCE = new PackageInfoDaoImpl();
+
+ @Override
+ public PackageInfoDao createInterface() {
+ return INSTANCE;
+ }
+}
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/dao/impl/PackageInfoDaoImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/PackageInfoDaoImpl.java
new file mode 100644
index 0000000000..9b7b81fe52
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/PackageInfoDaoImpl.java
@@ -0,0 +1,103 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.impl;
+
+import com.datastax.driver.mapping.Mapper;
+import com.datastax.driver.mapping.Result;
+import com.datastax.driver.mapping.UDTMapper;
+import com.datastax.driver.mapping.annotations.Accessor;
+import com.datastax.driver.mapping.annotations.Query;
+import org.openecomp.core.dao.impl.CassandraBaseDao;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.PackageInfoDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.PackageInfo;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+public class PackageInfoDaoImpl extends CassandraBaseDao<PackageInfo> implements PackageInfoDao {
+
+ private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static final Mapper<PackageInfo> mapper =
+ noSqlDb.getMappingManager().mapper(PackageInfo.class);
+ private static final PackageInfoAccessor accessor =
+ noSqlDb.getMappingManager().createAccessor(PackageInfoAccessor.class);
+ private static final UDTMapper<Version> versionMapper =
+ noSqlDb.getMappingManager().udtMapper(Version.class);
+
+ @Override
+ protected Mapper<PackageInfo> getMapper() {
+ return mapper;
+ }
+
+ @Override
+ protected Object[] getKeys(PackageInfo entity) {
+ return new Object[]{entity.getVspId(), versionMapper.toUDT(entity.getVersion())};
+ }
+
+ @Override
+ public Collection<PackageInfo> list(PackageInfo entity) {
+ return accessor.listInfo().all();
+ }
+
+ @Override
+ public List<PackageInfo> listByCategory(String category, String subCategory) {
+ Result<PackageInfo> packages = accessor.listInfo();
+
+ List<PackageInfo> filteredPackages = new ArrayList<>();
+ for (PackageInfo packageInfo : packages) {
+ if (category != null) {
+ if (category.equals(packageInfo.getCategory())) {
+ filteredPackages.add(packageInfo);
+ }
+ } else if (subCategory != null) {
+ if (subCategory.equals(packageInfo.getSubCategory())) {
+ filteredPackages.add(packageInfo);
+ }
+ } else {
+ filteredPackages.add(packageInfo);
+ }
+ }
+
+ return filteredPackages;
+ }
+
+ @Override
+ public void deleteRowTranslateContent(String vspId, Version version) {
+ accessor.deleteRowTranslateContent(vspId, version);
+ }
+
+ @Accessor
+ interface PackageInfoAccessor {
+
+ @Query(
+ "SELECT vsp_id,version,display_name,vsp_name,vsp_description,vendor_name,category,"
+ + "sub_category,vendor_release,package_checksum,package_type FROM package_details")
+ Result<PackageInfo> listInfo();
+
+ @Query("DELETE TRANSLATE_CONTENT FROM package_details WHERE vsp_id=? and version=?")
+ Result<PackageInfo> deleteRowTranslateContent(String vspId, Version version);
+
+ }
+}
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/dao/impl/ProcessArtifactDaoCassandraImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/ProcessArtifactDaoCassandraImpl.java
new file mode 100644
index 0000000000..0e9fd90a13
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/ProcessArtifactDaoCassandraImpl.java
@@ -0,0 +1,82 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.impl;
+
+import com.datastax.driver.core.ResultSet;
+import com.datastax.driver.core.UDTValue;
+import com.datastax.driver.mapping.UDTMapper;
+import com.datastax.driver.mapping.annotations.Accessor;
+import com.datastax.driver.mapping.annotations.Query;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.ProcessArtifactDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessArtifactEntity;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.nio.ByteBuffer;
+
+public class ProcessArtifactDaoCassandraImpl implements ProcessArtifactDao {
+
+ private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static final ProcessArtifactAccessor accessor =
+ noSqlDb.getMappingManager().createAccessor(ProcessArtifactAccessor.class);
+ private static final UDTMapper<Version> versionMapper =
+ noSqlDb.getMappingManager().udtMapper(Version.class);
+
+ @Override
+ public void update(ProcessArtifactEntity entity) {
+ accessor.update(entity.getVspId(), versionMapper.toUDT(entity.getVersion()),
+ entity.getComponentId(), entity.getId(), entity.getArtifactName(), entity.getArtifact());
+ }
+
+ @Override
+ public ProcessArtifactEntity get(ProcessArtifactEntity entity) {
+ return accessor
+ .get(entity.getVspId(), versionMapper.toUDT(entity.getVersion()), entity.getComponentId(),
+ entity.getId());
+ }
+
+ @Override
+ public void delete(ProcessArtifactEntity entity) {
+ accessor.delete(entity.getVspId(), versionMapper.toUDT(entity.getVersion()),
+ entity.getComponentId(), entity.getId());
+ }
+
+ @Accessor
+ interface ProcessArtifactAccessor {
+
+ @Query(
+ "insert into vsp_process (vsp_id, version, component_id, process_id, artifact_name,"
+ + " artifact) values (?,?,?,?,?,?)")
+ ResultSet update(String vspId, UDTValue version, String componentId, String id,
+ String artifactName, ByteBuffer artifact);
+
+ @Query(
+ "select vsp_id, version, component_id, process_id, artifact_name, artifact "
+ + "from vsp_process where vsp_id=? and version=? and component_id=? and process_id=?")
+ ProcessArtifactEntity get(String vspId, UDTValue version, String componentId, String id);
+
+ @Query(
+ "delete artifact_name, artifact from vsp_process where vsp_id=? and version=? and"
+ + " component_id=? and process_id=?")
+ ResultSet delete(String vspId, UDTValue version, String componentId, String id);
+ }
+}
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/dao/impl/ProcessArtifactDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/ProcessArtifactDaoFactoryImpl.java
new file mode 100644
index 0000000000..2a5d9013bd
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/ProcessArtifactDaoFactoryImpl.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.impl;
+
+import org.openecomp.sdc.vendorsoftwareproduct.dao.ProcessArtifactDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.ProcessArtifactDaoFactory;
+
+public class ProcessArtifactDaoFactoryImpl extends ProcessArtifactDaoFactory {
+ private static final ProcessArtifactDao INSTANCE = new ProcessArtifactDaoCassandraImpl();
+
+ @Override
+ public ProcessArtifactDao createInterface() {
+ return INSTANCE;
+ }
+}
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/dao/impl/ProcessDaoCassandraImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/ProcessDaoCassandraImpl.java
new file mode 100644
index 0000000000..b8900eb5d3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/ProcessDaoCassandraImpl.java
@@ -0,0 +1,139 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.impl;
+
+import com.datastax.driver.core.ResultSet;
+import com.datastax.driver.core.UDTValue;
+import com.datastax.driver.mapping.Mapper;
+import com.datastax.driver.mapping.Result;
+import com.datastax.driver.mapping.UDTMapper;
+import com.datastax.driver.mapping.annotations.Accessor;
+import com.datastax.driver.mapping.annotations.Query;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import org.openecomp.sdc.vendorsoftwareproduct.VendorSoftwareProductConstants;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.ProcessDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessEntity;
+import org.openecomp.sdc.versioning.VersioningManagerFactory;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.types.UniqueValueMetadata;
+import org.openecomp.sdc.versioning.types.VersionableEntityMetadata;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+
+public class ProcessDaoCassandraImpl implements ProcessDao {
+
+ private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static final Mapper<ProcessEntity> mapper =
+ noSqlDb.getMappingManager().mapper(ProcessEntity.class);
+ private static final ProcessAccessor accessor =
+ noSqlDb.getMappingManager().createAccessor(ProcessAccessor.class);
+ private static final UDTMapper<Version> versionMapper =
+ noSqlDb.getMappingManager().udtMapper(Version.class);
+
+ @Override
+ public void registerVersioning(String versionableEntityType) {
+ VersionableEntityMetadata metadata = new VersionableEntityMetadata(
+ mapper.getTableMetadata().getName(),
+ mapper.getTableMetadata().getPartitionKey().get(0).getName(),
+ mapper.getTableMetadata().getPartitionKey().get(1).getName());
+
+ metadata.setUniqueValuesMetadata(Collections.singletonList(
+ new UniqueValueMetadata(VendorSoftwareProductConstants.UniqueValues.PROCESS_NAME,
+ Arrays.asList("vsp_id", "version", "component_id", "name"))));
+
+ VersioningManagerFactory.getInstance().createInterface()
+ .register(versionableEntityType, metadata);
+ }
+
+ @Override
+ public Collection<ProcessEntity> list(ProcessEntity entity) {
+ return accessor
+ .list(entity.getVspId(), versionMapper.toUDT(entity.getVersion()), entity.getComponentId())
+ .all();
+ }
+
+ @Override
+ public void create(ProcessEntity entity) {
+ accessor.update(entity.getVspId(), versionMapper.toUDT(entity.getVersion()),
+ entity.getComponentId(), entity.getId(), entity.getName(), entity.getDescription());
+ }
+
+ @Override
+ public void update(ProcessEntity entity) {
+ accessor.update(entity.getVspId(), versionMapper.toUDT(entity.getVersion()),
+ entity.getComponentId(), entity.getId(), entity.getName(), entity.getDescription());
+ }
+
+ @Override
+ public ProcessEntity get(ProcessEntity entity) {
+ return accessor
+ .get(entity.getVspId(), versionMapper.toUDT(entity.getVersion()), entity.getComponentId(),
+ entity.getId());
+ }
+
+ @Override
+ public void delete(ProcessEntity entity) {
+ if (entity.getId() == null) {
+ accessor.deleteAll(entity.getVspId(), versionMapper.toUDT(entity.getVersion()),
+ entity.getComponentId());
+ } else {
+ accessor.delete(entity.getVspId(), versionMapper.toUDT(entity.getVersion()),
+ entity.getComponentId(), entity.getId());
+ }
+ }
+
+ public void deleteAll(ProcessEntity entity) {
+ accessor.deleteAll(entity.getVspId(), versionMapper.toUDT(entity.getVersion()));
+ }
+
+ @Accessor
+ interface ProcessAccessor {
+
+ @Query(
+ "insert into vsp_process (vsp_id, version, component_id, process_id, name, description) "
+ + "values (?,?,?,?,?,?)")
+ ResultSet update(String vspId, UDTValue version, String componentId, String id, String name,
+ String description);
+
+ @Query(
+ "select vsp_id, version, component_id, process_id, name, description, artifact_name "
+ + "from vsp_process where vsp_id=? and version=? and component_id=? and process_id=?")
+ ProcessEntity get(String vspId, UDTValue version, String componentId, String id);
+
+ @Query(
+ "select vsp_id, version, component_id, process_id, name, description, artifact_name "
+ + "from vsp_process where vsp_id=? and version=? and component_id=?")
+ Result<ProcessEntity> list(String vspId, UDTValue version, String componentId);
+
+ @Query(
+ "delete from vsp_process where vsp_id=? and version=? and component_id=? and process_id=?")
+ ResultSet delete(String vspId, UDTValue version, String componentId, String id);
+
+ @Query("delete from vsp_process where vsp_id=? and version=? and component_id=?")
+ ResultSet deleteAll(String vspId, UDTValue version, String componentId);
+
+ @Query("delete from vsp_process where vsp_id=? and version=?")
+ ResultSet deleteAll(String vspId, UDTValue version);
+ }
+}
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/dao/impl/ProcessDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/ProcessDaoFactoryImpl.java
new file mode 100644
index 0000000000..4c981d8448
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/ProcessDaoFactoryImpl.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.impl;
+
+import org.openecomp.sdc.vendorsoftwareproduct.dao.ProcessDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.ProcessDaoFactory;
+
+public class ProcessDaoFactoryImpl extends ProcessDaoFactory {
+ private static final ProcessDao INSTANCE = new ProcessDaoCassandraImpl();
+
+ @Override
+ public ProcessDao createInterface() {
+ return INSTANCE;
+ }
+}
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/dao/impl/UploadDataDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/UploadDataDaoFactoryImpl.java
new file mode 100644
index 0000000000..317bc344c4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/UploadDataDaoFactoryImpl.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.impl;
+
+import org.openecomp.sdc.vendorsoftwareproduct.dao.UploadDataDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.UploadDataDaoFactory;
+
+public class UploadDataDaoFactoryImpl extends UploadDataDaoFactory {
+ private static final UploadDataDao INSTANCE = new UploadDataDaoImpl();
+
+ @Override
+ public UploadDataDao createInterface() {
+ return INSTANCE;
+ }
+}
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/dao/impl/UploadDataDaoImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/UploadDataDaoImpl.java
new file mode 100644
index 0000000000..df019a4f53
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/UploadDataDaoImpl.java
@@ -0,0 +1,92 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.impl;
+
+import com.datastax.driver.core.UDTValue;
+import com.datastax.driver.mapping.Mapper;
+import com.datastax.driver.mapping.Result;
+import com.datastax.driver.mapping.UDTMapper;
+import com.datastax.driver.mapping.annotations.Accessor;
+import com.datastax.driver.mapping.annotations.Query;
+import org.openecomp.core.dao.impl.CassandraBaseDao;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.UploadDataDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.UploadDataEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.nio.ByteBuffer;
+import java.util.Collection;
+
+public class UploadDataDaoImpl extends CassandraBaseDao<UploadDataEntity> implements UploadDataDao {
+
+ private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static final Mapper<UploadDataEntity> mapper =
+ noSqlDb.getMappingManager().mapper(UploadDataEntity.class);
+ private static final UploadDataAccessor accessor =
+ noSqlDb.getMappingManager().createAccessor(UploadDataAccessor.class);
+ private static final UDTMapper<Version> versionMapper =
+ noSqlDb.getMappingManager().udtMapper(Version.class);
+
+ @Override
+ protected Mapper<UploadDataEntity> getMapper() {
+ return mapper;
+ }
+
+ @Override
+ protected Object[] getKeys(UploadDataEntity entity) {
+ return new Object[]{entity.getId(), versionMapper.toUDT(entity.getVersion())};
+ }
+
+ @Override
+ public Collection<UploadDataEntity> list(UploadDataEntity entity) {
+ return accessor.listAll().all();
+ }
+
+ @Override
+ public void deleteContentDataAndValidationData(String vspId, Version version) {
+ accessor.deleteContentDataAndValidationData(vspId, versionMapper.toUDT(version));
+ }
+
+ @Override
+ public ByteBuffer getContentData(String vspId, Version version) {
+ return accessor.getContentData(vspId, version).one().getContentData();
+ }
+
+
+ @Accessor
+ interface UploadDataAccessor {
+
+ @Query(
+ "SELECT package_name, package_version, content_data, validation_data FROM vsp_information")
+ Result<UploadDataEntity> listAll();
+
+ @Query(
+ "DELETE package_name, package_version, content_data, validation_data FROM vsp_information "
+ + "WHERE vsp_id=? and version=?")
+ Result<VspDetails> deleteContentDataAndValidationData(String vspId, UDTValue udtValue);
+
+ @Query("SELECT CONTENT_DATA FROM vsp_information WHERE vsp_id=? and version=?")
+ Result<UploadDataEntity> getContentData(String vspId, Version version);
+
+ }
+}
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/dao/impl/VendorSoftwareProductDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/VendorSoftwareProductDaoFactoryImpl.java
new file mode 100644
index 0000000000..587f8ac036
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/VendorSoftwareProductDaoFactoryImpl.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.impl;
+
+import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductDaoFactory;
+
+public class VendorSoftwareProductDaoFactoryImpl extends VendorSoftwareProductDaoFactory {
+ private static final VendorSoftwareProductDao INSTANCE = new VendorSoftwareProductDaoImpl();
+
+ @Override
+ public VendorSoftwareProductDao createInterface() {
+ return INSTANCE;
+ }
+}
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/dao/impl/VendorSoftwareProductDaoImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/VendorSoftwareProductDaoImpl.java
new file mode 100644
index 0000000000..f592e63280
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/VendorSoftwareProductDaoImpl.java
@@ -0,0 +1,349 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.impl;
+
+import org.openecomp.core.model.dao.EnrichedServiceArtifactDao;
+import org.openecomp.core.model.dao.EnrichedServiceArtifactDaoFactory;
+import org.openecomp.core.model.dao.ServiceArtifactDaoFactory;
+import org.openecomp.core.model.dao.ServiceArtifactDaoInter;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.ComponentArtifactDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.ComponentArtifactDaoFactory;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.ComponentDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.ComponentDaoFactory;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.NetworkDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.NetworkDaoFactory;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.NicDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.NicDaoFactory;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.PackageInfoDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.PackageInfoDaoFactory;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.ProcessArtifactDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.ProcessArtifactDaoFactory;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.ProcessDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.ProcessDaoFactory;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.UploadDataDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.UploadDataDaoFactory;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductInfoDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductInfoDaoFactory;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.VspQuestionnaireDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.VspQuestionnaireDaoFactory;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentArtifactEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NetworkEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NicEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.PackageInfo;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessArtifactEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.UploadDataEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspQuestionnaireEntity;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.nio.ByteBuffer;
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+
+public class VendorSoftwareProductDaoImpl implements VendorSoftwareProductDao {
+
+ private static final VendorSoftwareProductInfoDao vspInfoDao =
+ VendorSoftwareProductInfoDaoFactory.getInstance().createInterface();
+ private static final PackageInfoDao packageInfoDao =
+ PackageInfoDaoFactory.getInstance().createInterface();
+ private static final UploadDataDao uploadDataDao =
+ UploadDataDaoFactory.getInstance().createInterface();
+ private static final VspQuestionnaireDao vspQuestionnaireDao =
+ VspQuestionnaireDaoFactory.getInstance().createInterface();
+ private static final NetworkDao networkDao = NetworkDaoFactory.getInstance().createInterface();
+ private static final ComponentDao componentDao =
+ ComponentDaoFactory.getInstance().createInterface();
+ private static final NicDao nicDao = NicDaoFactory.getInstance().createInterface();
+ private static final ProcessDao processDao = ProcessDaoFactory.getInstance().createInterface();
+ private static final ProcessArtifactDao processArtifactDao =
+ ProcessArtifactDaoFactory.getInstance().createInterface();
+ private static final ComponentArtifactDao componentArtifactDao =
+ ComponentArtifactDaoFactory.getInstance().createInterface();
+ private static final ServiceArtifactDaoInter artifactDao =
+ ServiceArtifactDaoFactory.getInstance().createInterface();
+ private static final EnrichedServiceArtifactDao enrichArtifactDao =
+ EnrichedServiceArtifactDaoFactory.getInstance().createInterface();
+
+ @Override
+ public void registerVersioning(String versionableEntityType) {
+ vspInfoDao.registerVersioning(versionableEntityType);
+ vspQuestionnaireDao.registerVersioning(versionableEntityType);
+ networkDao.registerVersioning(versionableEntityType);
+ componentDao.registerVersioning(versionableEntityType);
+ nicDao.registerVersioning(versionableEntityType);
+ processDao.registerVersioning(versionableEntityType);
+ }
+
+ @Override
+ public void createVendorSoftwareProductInfo(VspDetails vspDetails) {
+ vspInfoDao.create(vspDetails);
+ }
+
+ @Override
+ public Collection<VspDetails> listVendorSoftwareProductsInfo() {
+ return vspInfoDao.list(new VspDetails());
+ }
+
+ public VspDetails getVendorSoftwareProductInfo(VspDetails vspDetails) {
+ return vspInfoDao.get(vspDetails);
+ }
+
+
+ @Override
+ public void updateVendorSoftwareProductInfo(VspDetails vspDetails) {
+ vspInfoDao.update(vspDetails);
+ }
+
+ @Override
+ public void deleteVendorSoftwareProductInfo(VspDetails vspDetails) {
+ vspInfoDao.delete(vspDetails);
+ }
+
+ @Override
+ public void updateUploadData(UploadDataEntity uploadData) {
+ uploadDataDao.update(uploadData);
+ }
+
+ @Override
+ public UploadDataEntity getUploadData(UploadDataEntity uploadData) {
+ return uploadDataDao.get(uploadData);
+ }
+
+ @Override
+ public ByteBuffer getContentData(UploadDataEntity uploadDataEntity) {
+ return uploadDataDao.getContentData(uploadDataEntity.getId(), uploadDataEntity.getVersion());
+ }
+
+ @Override
+ public void insertPackageDetails(PackageInfo packageInfo) {
+ packageInfoDao.update(packageInfo);
+ }
+
+ @Override
+ public PackageInfo getPackageInfo(PackageInfo packageInfo) {
+ return packageInfoDao.get(packageInfo);
+ }
+
+ @Override
+ public void deletePackageInfo(PackageInfo packageInfo) {
+ packageInfoDao.delete(packageInfo);
+ }
+
+ @Override
+ public Collection<NetworkEntity> listNetworks(String vspId, Version version) {
+ return networkDao.list(new NetworkEntity(vspId, version, null));
+ }
+
+ @Override
+ public void createNetwork(NetworkEntity network) {
+ networkDao.create(network);
+ }
+
+ @Override
+ public void updateNetwork(NetworkEntity networkEntity) {
+ networkDao.update(networkEntity);
+ }
+
+ @Override
+ public NetworkEntity getNetwork(String vspId, Version version, String networkId) {
+ return networkDao.get(new NetworkEntity(vspId, version, networkId));
+ }
+
+ @Override
+ public void deleteNetwork(String vspId, Version version) {
+ NetworkEntity networkEntity = new NetworkEntity(vspId, version, null);
+ networkDao.delete(networkEntity);
+ }
+
+ @Override
+ public List<PackageInfo> listPackages(String category, String subCategory) {
+ return packageInfoDao.listByCategory(category, subCategory);
+ }
+
+
+ @Override
+ public Collection<ComponentEntity> listComponents(String vspId, Version version) {
+ return componentDao.list(new ComponentEntity(vspId, version, null));
+ }
+
+ @Override
+ public void createComponent(ComponentEntity component) {
+ componentDao.create(component);
+ }
+
+ @Override
+ public void updateComponent(ComponentEntity component) {
+ componentDao.update(component);
+ }
+
+ @Override
+ public ComponentEntity getComponent(String vspId, Version version, String componentId) {
+ return componentDao.get(new ComponentEntity(vspId, version, componentId));
+ }
+
+ @Override
+ public Collection<ComponentEntity> listComponentsQuestionnaire(String vspId, Version version) {
+ return componentDao.listQuestionnaires(vspId, version);
+ }
+
+ @Override
+ public void updateComponentQuestionnaire(String vspId, Version version, String componentId,
+ String questionnaireData) {
+ componentDao.updateQuestionnaireData(vspId, version, componentId, questionnaireData);
+ }
+
+ @Override
+ public void deleteComponent(String vspId, Version version) {
+ ComponentEntity componentEntity = new ComponentEntity(vspId, version, null);
+ componentDao.delete(componentEntity);
+ }
+
+ @Override
+ public Collection<ProcessEntity> listProcesses(String vspId, Version version,
+ String componentId) {
+ return processDao.list(new ProcessEntity(vspId, version, componentId, null));
+ }
+
+ @Override
+ public void deleteProcesses(String vspId, Version version, String componentId) {
+ processDao.delete(new ProcessEntity(vspId, version, componentId, null));
+ }
+
+ @Override
+ public ProcessEntity getProcess(String vspId, Version version, String componentId,
+ String processId) {
+ return processDao.get(new ProcessEntity(vspId, version, componentId, processId));
+ }
+
+ @Override
+ public void createProcess(ProcessEntity processEntity) {
+ processDao.create(processEntity);
+ }
+
+ @Override
+ public void updateProcess(ProcessEntity processEntity) {
+ processDao.update(processEntity);
+ }
+
+ @Override
+ public void deleteProcess(String vspId, Version version, String componentId, String processId) {
+ processDao.delete(new ProcessEntity(vspId, version, componentId, processId));
+ }
+
+ @Override
+ public void uploadProcessArtifact(String vspId, Version version, String componentId,
+ String processId, byte[] artifact, String artifactName) {
+ ProcessArtifactEntity processArtifact =
+ new ProcessArtifactEntity(vspId, version, componentId, processId);
+ processArtifact.setArtifact(ByteBuffer.wrap(artifact));
+ processArtifact.setArtifactName(artifactName);
+ processArtifactDao.update(processArtifact);
+ }
+
+ @Override
+ public ProcessArtifactEntity getProcessArtifact(String vspId, Version version, String componentId,
+ String processId) {
+ return processArtifactDao
+ .get(new ProcessArtifactEntity(vspId, version, componentId, processId));
+ }
+
+ @Override
+ public void deleteProcessArtifact(String vspId, Version version, String componentId,
+ String processId) {
+ processArtifactDao.delete(new ProcessArtifactEntity(vspId, version, componentId, processId));
+ }
+
+ @Override
+ public VspQuestionnaireEntity getQuestionnaire(String vspId, Version version) {
+ return vspQuestionnaireDao.get(new VspQuestionnaireEntity(vspId, version));
+ }
+
+ @Override
+ public void updateQuestionnaire(String vspId, Version version, String questionnaireData) {
+ vspQuestionnaireDao.updateQuestionnaireData(vspId, version, questionnaireData);
+ }
+
+ @Override
+ public Collection<NicEntity> listNics(String vspId, Version version, String componentId) {
+ return nicDao.list(new NicEntity(vspId, version, componentId, null));
+ }
+
+ @Override
+ public void createNic(NicEntity nic) {
+ nicDao.create(nic);
+ }
+
+ @Override
+ public NicEntity getNic(String vspId, Version version, String componentId, String nicId) {
+ return nicDao.get(new NicEntity(vspId, version, componentId, nicId));
+ }
+
+ @Override
+ public void updateNic(NicEntity nicEntity) {
+ nicDao.update(nicEntity);
+ }
+
+ @Override
+ public void updateNicQuestionnaire(String vspId, Version version, String componentId,
+ String nicId, String questionnaireData) {
+ nicDao.updateQuestionnaireData(vspId, version, componentId, nicId, questionnaireData);
+ }
+
+ @Override
+ public Collection<NicEntity> listNicsByVsp(String vspId, Version version) {
+ return nicDao.listByVsp(vspId, version);
+ }
+
+ @Override
+ public void deleteNic(String vspId, Version version, String componentId) {
+ NicEntity nicEntity = new NicEntity(vspId, version, componentId, null);
+ nicDao.delete(nicEntity);
+ }
+
+ @Override
+ public void deleteUploadData(String vspId, Version version) {
+ networkDao.deleteAll(vspId, version);
+ nicDao.deleteByVspId(vspId, version);
+ artifactDao.delete(vspId, version);
+ enrichArtifactDao.delete(vspId, version);
+ ComponentArtifactEntity componentArtifactEntity =
+ new ComponentArtifactEntity(vspId, version, null, null);
+ ProcessEntity processEntity = new ProcessEntity(vspId, version, null, null);
+ componentArtifactDao.deleteAll(componentArtifactEntity);
+ processDao.deleteAll(processEntity);
+ componentDao.deleteAll(vspId, version);
+ uploadDataDao.deleteContentDataAndValidationData(vspId, version);
+ }
+
+ @Override
+ public void updateVspLatestModificationTime(String vspId, Version version) {
+ if (Objects.isNull(vspId) || Objects.isNull(version)) {
+ return;
+ }
+
+ VspDetails retrieved = getVendorSoftwareProductInfo(new VspDetails(vspId, version));
+ updateVendorSoftwareProductInfo(retrieved);
+ }
+}
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/dao/impl/VendorSoftwareProductInfoDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/VendorSoftwareProductInfoDaoFactoryImpl.java
new file mode 100644
index 0000000000..1dcb3f4c66
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/VendorSoftwareProductInfoDaoFactoryImpl.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.impl;
+
+import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductInfoDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductInfoDaoFactory;
+
+public class VendorSoftwareProductInfoDaoFactoryImpl extends VendorSoftwareProductInfoDaoFactory {
+ private static final VendorSoftwareProductInfoDao INSTANCE =
+ new VendorSoftwareProductInfoDaoImpl();
+
+ @Override
+ public VendorSoftwareProductInfoDao createInterface() {
+ return INSTANCE;
+ }
+}
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/dao/impl/VendorSoftwareProductInfoDaoImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/VendorSoftwareProductInfoDaoImpl.java
new file mode 100644
index 0000000000..c3096dab29
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/VendorSoftwareProductInfoDaoImpl.java
@@ -0,0 +1,83 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.impl;
+
+import com.datastax.driver.mapping.Mapper;
+import com.datastax.driver.mapping.Result;
+import com.datastax.driver.mapping.UDTMapper;
+import com.datastax.driver.mapping.annotations.Accessor;
+import com.datastax.driver.mapping.annotations.Query;
+import org.openecomp.core.dao.impl.CassandraBaseDao;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductInfoDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails;
+import org.openecomp.sdc.versioning.VersioningManagerFactory;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.types.VersionableEntityMetadata;
+
+import java.util.Collection;
+
+public class VendorSoftwareProductInfoDaoImpl extends CassandraBaseDao<VspDetails>
+ implements VendorSoftwareProductInfoDao {
+
+ private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static final Mapper<VspDetails> mapper =
+ noSqlDb.getMappingManager().mapper(VspDetails.class);
+ private static final VendorSoftwareProductInfoAccessor accessor =
+ noSqlDb.getMappingManager().createAccessor(VendorSoftwareProductInfoAccessor.class);
+ private static final UDTMapper<Version> versionMapper =
+ noSqlDb.getMappingManager().udtMapper(Version.class);
+
+ @Override
+ public void registerVersioning(String versionableEntityType) {
+ VersioningManagerFactory.getInstance().createInterface()
+ .register(versionableEntityType, new VersionableEntityMetadata(
+ mapper.getTableMetadata().getName(),
+ mapper.getTableMetadata().getPartitionKey().get(0).getName(),
+ mapper.getTableMetadata().getPartitionKey().get(1).getName()));
+ }
+
+ @Override
+ protected Mapper<VspDetails> getMapper() {
+ return mapper;
+ }
+
+ @Override
+ protected Object[] getKeys(VspDetails entity) {
+ return new Object[]{entity.getId(), versionMapper.toUDT(entity.getVersion())};
+ }
+
+ @Override
+ public Collection<VspDetails> list(VspDetails entity) {
+ return accessor.listAll().all();
+ }
+
+ @Accessor
+ interface VendorSoftwareProductInfoAccessor {
+
+ @Query(
+ "SELECT vsp_id,version,name,description,icon,category,sub_category,vendor_id,"
+ + "vlm_version,license_agreement,feature_groups FROM vsp_information")
+ Result<VspDetails> listAll();
+
+ }
+}
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/dao/impl/VspQuestionnaireDaoCassandraImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/VspQuestionnaireDaoCassandraImpl.java
new file mode 100644
index 0000000000..ef4dd0de74
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/VspQuestionnaireDaoCassandraImpl.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.impl;
+
+import com.datastax.driver.core.ResultSet;
+import com.datastax.driver.core.UDTValue;
+import com.datastax.driver.mapping.Mapper;
+import com.datastax.driver.mapping.UDTMapper;
+import com.datastax.driver.mapping.annotations.Accessor;
+import com.datastax.driver.mapping.annotations.Query;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.VspQuestionnaireDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspQuestionnaireEntity;
+import org.openecomp.sdc.versioning.VersioningManagerFactory;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.types.VersionableEntityMetadata;
+
+public class VspQuestionnaireDaoCassandraImpl implements VspQuestionnaireDao {
+
+ private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static final Mapper<VspQuestionnaireEntity> mapper =
+ noSqlDb.getMappingManager().mapper(VspQuestionnaireEntity.class);
+ private static final VspQuestionnaireAccessor accessor =
+ noSqlDb.getMappingManager().createAccessor(VspQuestionnaireAccessor.class);
+ private static final UDTMapper<Version> versionMapper =
+ noSqlDb.getMappingManager().udtMapper(Version.class);
+
+ @Override
+ public void registerVersioning(String versionableEntityType) {
+ VersioningManagerFactory.getInstance().createInterface()
+ .register(versionableEntityType, new VersionableEntityMetadata(
+ mapper.getTableMetadata().getName(),
+ mapper.getTableMetadata().getPartitionKey().get(0).getName(),
+ mapper.getTableMetadata().getPartitionKey().get(1).getName()));
+ }
+
+ @Override
+ public VspQuestionnaireEntity get(VspQuestionnaireEntity entity) {
+ return mapper.get(entity.getId(), versionMapper.toUDT(entity.getVersion()));
+ }
+
+ @Override
+ public void updateQuestionnaireData(String id, Version version, String questionnaireData) {
+ accessor.updateQuestionnaireData(questionnaireData, id, versionMapper.toUDT(version));
+ }
+
+ @Accessor
+ interface VspQuestionnaireAccessor {
+
+ @Query("update vsp_information set questionnaire_data=? where vsp_id=? and version=?")
+ ResultSet updateQuestionnaireData(String questionnaireData, String id, UDTValue version);
+ }
+}
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/dao/impl/VspQuestionnaireDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/VspQuestionnaireDaoFactoryImpl.java
new file mode 100644
index 0000000000..aa91302ca2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/VspQuestionnaireDaoFactoryImpl.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.vendorsoftwareproduct.dao.impl;
+
+import org.openecomp.sdc.vendorsoftwareproduct.dao.VspQuestionnaireDao;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.VspQuestionnaireDaoFactory;
+
+public class VspQuestionnaireDaoFactoryImpl extends VspQuestionnaireDaoFactory {
+ private static final VspQuestionnaireDao INSTANCE = new VspQuestionnaireDaoCassandraImpl();
+
+ @Override
+ public VspQuestionnaireDao createInterface() {
+ return INSTANCE;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ServiceModelDaoFactoryTest.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ServiceModelDaoFactoryTest.java
new file mode 100644
index 0000000000..2c8ffb1ded
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/ServiceModelDaoFactoryTest.java
@@ -0,0 +1,97 @@
+package org.openecomp.sdc.vendorsoftwareproduct.dao;
+
+import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.core.model.dao.ServiceModelDaoFactory;
+import org.openecomp.core.model.types.ServiceArtifact;
+import org.openecomp.core.utilities.CommonMethods;
+import org.openecomp.core.utilities.file.FileContentHandler;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class ServiceModelDaoFactoryTest {
+
+ private static final String vspId = CommonMethods.nextUuId();
+ private static final Version version = Version.valueOf("1.0");
+ private static final String baseServiceTemplateName = "baseYaml.yaml";
+ private static String artifact001;
+
+
+// @Test
+ public void storeServiceModelTest() {
+
+
+ ToscaServiceModel model = getToscaServiceModel();
+ ServiceModelDaoFactory.getInstance().createInterface().storeServiceModel(vspId, version, model);
+ }
+
+
+// @Test(dependsOnMethods = "storeServiceModelTest")
+ public void getServiceModelTest() {
+ Object model =
+ ServiceModelDaoFactory.getInstance().createInterface().getServiceModel(vspId, version);
+ Assert.assertNotNull(model);
+ Assert.assertTrue(model instanceof ToscaServiceModel);
+ if (model instanceof ToscaServiceModel) {
+
+ artifact001 =
+ (String) ((ToscaServiceModel) model).getArtifactFiles().getFileList().toArray()[0];
+ }
+ }
+
+// @Test(dependsOnMethods = "getServiceModelTest")
+ public void getServiceModelInfoTest() {
+ Object info = ServiceModelDaoFactory.getInstance().createInterface()
+ .getServiceModelInfo(vspId, version, artifact001);
+ Assert.assertNotNull(info);
+ Assert.assertTrue(info instanceof ServiceArtifact);
+ if (info instanceof ServiceArtifact) {
+ Assert.assertEquals(((ServiceArtifact) info).getName(), artifact001);
+ }
+ }
+
+ private ToscaServiceModel getToscaServiceModel() {
+
+ Map<String, ServiceTemplate> serviceTemplates = getServiceTemplates(baseServiceTemplateName);
+ FileContentHandler artifacts = getArtifacts();
+ return new ToscaServiceModel(artifacts, serviceTemplates, baseServiceTemplateName);
+ }
+
+
+ private Map<String, ServiceTemplate> getServiceTemplates(String base) {
+
+ Map<String, ServiceTemplate> serviceTemplates = new HashMap<>();
+
+ serviceTemplates.put(base, getServiceTemplate());
+ serviceTemplates.put("SERV1", getServiceTemplate());
+ serviceTemplates.put("SERV2", getServiceTemplate());
+ serviceTemplates.put("SERV3", getServiceTemplate());
+ serviceTemplates.put("SERV4", getServiceTemplate());
+
+ return serviceTemplates;
+ }
+
+ public FileContentHandler getArtifacts() {
+ Map<String, byte[]> artifacts = new HashMap<>();
+ artifacts.put("art1", "this is art1".getBytes());
+ artifacts.put("art2", ("this is art2 desc:" + CommonMethods.nextUuId()).getBytes());
+ artifacts.put("art2", ("this is art3 desc:" + CommonMethods.nextUuId()).getBytes());
+ artifacts.put("art2", ("this is art4 desc:" + CommonMethods.nextUuId()).getBytes());
+
+ FileContentHandler fileContentHandler = new FileContentHandler();
+ fileContentHandler.putAll(artifacts);
+ return fileContentHandler;
+ }
+
+ public ServiceTemplate getServiceTemplate() {
+ ServiceTemplate serviceTemplate = new ServiceTemplate();
+ serviceTemplate.setTosca_definitions_version("version 1.0");
+ serviceTemplate.setDescription(CommonMethods.nextUuId());
+ return serviceTemplate;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/pom.xml b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/pom.xml
new file mode 100644
index 0000000000..8eabd76102
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/pom.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+
+ <artifactId>openecomp-sdc-vendor-software-product-lib</artifactId>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>openecomp-sdc-vendor-software-product-api</module>
+ <module>openecomp-sdc-vendor-software-product-core</module>
+ </modules>
+
+
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/pom.xml b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/pom.xml
new file mode 100644
index 0000000000..180410dcf0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/pom.xml
@@ -0,0 +1,71 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../..</relativePath>
+ </parent>
+
+ <artifactId>openecomp-sdc-versioning-api</artifactId>
+ <name>openecomp-sdc-versioning-api</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-facade-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-facade-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-nosqldb-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <version>${hibernate.validator.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>javax.el-api</artifactId>
+ <version>${javax.el-api.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.web</groupId>
+ <artifactId>javax.el</artifactId>
+ <version>2.2.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <scope>test</scope>
+ <version>1.10.19</version>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <scope>test</scope>
+ <version>6.8.5</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>snakeyaml</artifactId>
+ <groupId>org.yaml</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ <version>RELEASE</version>
+ </dependency>
+ </dependencies>
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/VersioningManager.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/VersioningManager.java
new file mode 100644
index 0000000000..7fab25456c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/VersioningManager.java
@@ -0,0 +1,57 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning;
+
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.types.VersionInfo;
+import org.openecomp.sdc.versioning.types.VersionableEntityAction;
+import org.openecomp.sdc.versioning.types.VersionableEntityMetadata;
+
+import java.util.Map;
+
+public interface VersioningManager {
+
+ void register(String entityType, VersionableEntityMetadata entityMetadata);
+
+ Version create(String entityType, String entityId, String user);
+
+ void delete(String entityType, String entityId, String user);
+
+ void undoDelete(String entityType, String entityId, String user);
+
+ Version checkout(String entityType, String entityId, String user);
+
+ Version undoCheckout(String entityType, String entityId, String user);
+
+ Version checkin(String entityType, String entityId, String user, String checkinDescription);
+
+ Version submit(String entityType, String entityId, String user, String submitDescription);
+
+ VersionInfo getEntityVersionInfo(String entityType, String entityId, String user,
+ VersionableEntityAction action);
+
+ Map<String, VersionInfo> listEntitiesVersionInfo(String entityType, String user,
+ VersionableEntityAction action);
+
+ Map<String, VersionInfo> listDeletedEntitiesVersionInfo(String entityType, String user,
+ VersionableEntityAction action);
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/VersioningManagerFactory.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/VersioningManagerFactory.java
new file mode 100644
index 0000000000..089777bbe6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/VersioningManagerFactory.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class VersioningManagerFactory extends AbstractComponentFactory<VersioningManager> {
+
+ public static VersioningManagerFactory getInstance() {
+ return AbstractFactory.getInstance(VersioningManagerFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/VersioningUtil.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/VersioningUtil.java
new file mode 100644
index 0000000000..d51f8c0a2b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/VersioningUtil.java
@@ -0,0 +1,187 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning;
+
+import org.openecomp.core.dao.BaseDao;
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
+import org.openecomp.sdc.versioning.errors.RequestedVersionInvalidErrorBuilder;
+import org.openecomp.sdc.versioning.errors.VersionableSubEntityNotFoundErrorBuilder;
+import org.openecomp.sdc.versioning.types.VersionInfo;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * The type Versioning util.
+ */
+public class VersioningUtil {
+
+ /**
+ * Validate entity existence.
+ *
+ * @param <T> the type parameter
+ * @param retrievedEntity the retrieved entity
+ * @param inputEntity the input entity
+ * @param firstClassCitizenType the first class citizen type
+ */
+ public static <T extends VersionableEntity> void validateEntityExistence(Object retrievedEntity,
+ T inputEntity,
+ String firstClassCitizenType) {
+ if (retrievedEntity == null) {
+ throw new CoreException(new VersionableSubEntityNotFoundErrorBuilder(
+ inputEntity.getEntityType(),
+ inputEntity.getId(),
+ firstClassCitizenType,
+ inputEntity.getFirstClassCitizenId(),
+ inputEntity.getVersion()).build());
+ }
+ }
+
+ /**
+ * Validate entities existence.
+ *
+ * @param <T> the type parameter
+ * @param <D> the type parameter
+ * @param entityIds the entity ids
+ * @param entity the entity
+ * @param entityDao the entity dao
+ * @param firstClassCitizenType the first class citizen type
+ */
+ public static <T extends VersionableEntity, D extends BaseDao<T>> void validateEntitiesExistence(
+ Set<String> entityIds, T entity, D entityDao, String firstClassCitizenType) {
+ if (entityIds == null) {
+ return;
+ }
+
+ List<String> nonExistingIds = new ArrayList<>();
+ for (String entityId : entityIds) {
+ entity.setId(entityId);
+ if (entityDao.get(entity) == null) {
+ nonExistingIds.add(entityId);
+ }
+ }
+
+ if (nonExistingIds.size() > 0) {
+ if (nonExistingIds.size() == 1) {
+ throw new CoreException(new VersionableSubEntityNotFoundErrorBuilder(
+ entity.getEntityType(),
+ nonExistingIds.get(0),
+ firstClassCitizenType,
+ entity.getFirstClassCitizenId(),
+ entity.getVersion()).build());
+ }
+ throw new CoreException(new VersionableSubEntityNotFoundErrorBuilder(
+ entity.getEntityType(),
+ nonExistingIds,
+ firstClassCitizenType,
+ entity.getFirstClassCitizenId(),
+ entity.getVersion()).build());
+ }
+ }
+
+ /**
+ * Validate contained entities existence.
+ *
+ * @param <T> the type parameter
+ * @param containedEntityType the contained entity type
+ * @param inputContainedEntityIds the input contained entity ids
+ * @param containingEntity the containing entity
+ * @param retrievedContainedEntityIds the retrieved contained entity ids
+ */
+ public static <T extends VersionableEntity> void validateContainedEntitiesExistence(
+ String containedEntityType, Set<String> inputContainedEntityIds, T containingEntity,
+ Set<String> retrievedContainedEntityIds) {
+ if (inputContainedEntityIds == null) {
+ return;
+ }
+
+ List<String> nonExistingIds = inputContainedEntityIds.stream()
+ .filter(entityId -> !retrievedContainedEntityIds.contains(entityId))
+ .collect(Collectors.toList());
+
+ if (nonExistingIds.size() > 0) {
+ if (nonExistingIds.size() == 1) {
+ throw new CoreException(new VersionableSubEntityNotFoundErrorBuilder(
+ containedEntityType,
+ nonExistingIds.get(0),
+ containingEntity.getEntityType(),
+ containingEntity.getId(),
+ containingEntity.getVersion()).build());
+ }
+ throw new CoreException(new VersionableSubEntityNotFoundErrorBuilder(
+ containedEntityType,
+ nonExistingIds,
+ containingEntity.getEntityType(),
+ containingEntity.getId(),
+ containingEntity.getVersion()).build());
+ }
+ }
+
+ /**
+ * Resolve version version.
+ *
+ * @param requestedVersion the requested version
+ * @param versionInfo the version info
+ * @param finalOnly the final only
+ * @return the version
+ */
+ public static Version resolveVersion(Version requestedVersion, VersionInfo versionInfo,
+ boolean finalOnly) {
+ if (requestedVersion == null) {
+ if (finalOnly) {
+ if (versionInfo.getLatestFinalVersion() == null) {
+ throw new CoreException(new RequestedVersionInvalidErrorBuilder().build());
+ }
+ requestedVersion = versionInfo.getLatestFinalVersion();
+ } else {
+ requestedVersion = versionInfo.getActiveVersion();
+ }
+ } else {
+ if ((finalOnly && !requestedVersion.isFinal())
+ || !versionInfo.getViewableVersions().contains(requestedVersion)) {
+ throw new CoreException(new RequestedVersionInvalidErrorBuilder().build());
+ }
+ }
+ return requestedVersion;
+ }
+
+ /**
+ * Resolve version version.
+ *
+ * @param requestedVersion the requested version
+ * @param versionInfo the version info
+ * @return the version
+ */
+ public static Version resolveVersion(Version requestedVersion, VersionInfo versionInfo) {
+ if (requestedVersion == null) {
+ requestedVersion = versionInfo.getActiveVersion();
+ } else {
+ if (!versionInfo.getViewableVersions().contains(requestedVersion)) {
+ throw new CoreException(new RequestedVersionInvalidErrorBuilder().build());
+ }
+ }
+ return requestedVersion;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionHistoryDao.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionHistoryDao.java
new file mode 100644
index 0000000000..f90265aeb6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionHistoryDao.java
@@ -0,0 +1,27 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.dao;
+
+import org.openecomp.core.dao.BaseDao;
+import org.openecomp.sdc.versioning.dao.types.VersionHistoryEntity;
+
+public interface VersionHistoryDao extends BaseDao<VersionHistoryEntity> {
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionHistoryDaoFactory.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionHistoryDaoFactory.java
new file mode 100644
index 0000000000..9ea8d714b0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionHistoryDaoFactory.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class VersionHistoryDaoFactory extends AbstractComponentFactory<VersionHistoryDao> {
+ public static VersionHistoryDaoFactory getInstance() {
+ return AbstractFactory.getInstance(VersionHistoryDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionInfoDao.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionInfoDao.java
new file mode 100644
index 0000000000..260214eb07
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionInfoDao.java
@@ -0,0 +1,28 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.dao;
+
+import org.openecomp.core.dao.BaseDao;
+import org.openecomp.sdc.versioning.dao.types.VersionInfoEntity;
+
+public interface VersionInfoDao extends BaseDao<VersionInfoEntity> {
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionInfoDaoFactory.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionInfoDaoFactory.java
new file mode 100644
index 0000000000..ebdb1a590b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionInfoDaoFactory.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class VersionInfoDaoFactory extends AbstractComponentFactory<VersionInfoDao> {
+ public static VersionInfoDaoFactory getInstance() {
+ return AbstractFactory.getInstance(VersionInfoDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionInfoDeletedDao.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionInfoDeletedDao.java
new file mode 100644
index 0000000000..cb6c050520
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionInfoDeletedDao.java
@@ -0,0 +1,29 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.dao;
+
+
+import org.openecomp.core.dao.BaseDao;
+import org.openecomp.sdc.versioning.dao.types.VersionInfoDeletedEntity;
+
+public interface VersionInfoDeletedDao extends BaseDao<VersionInfoDeletedEntity> {
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionInfoDeletedDaoFactory.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionInfoDeletedDaoFactory.java
new file mode 100644
index 0000000000..d14cbfeb0b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionInfoDeletedDaoFactory.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.dao;
+
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class VersionInfoDeletedDaoFactory
+ extends AbstractComponentFactory<VersionInfoDeletedDao> {
+ public static VersionInfoDeletedDaoFactory getInstance() {
+ return AbstractFactory.getInstance(VersionInfoDeletedDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionableDao.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionableDao.java
new file mode 100644
index 0000000000..12cef62f44
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionableDao.java
@@ -0,0 +1,25 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.dao;
+
+public interface VersionableDao {
+ void registerVersioning(String versionableEntityType);
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionableEntityDao.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionableEntityDao.java
new file mode 100644
index 0000000000..8709a983a3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionableEntityDao.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.dao;
+
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.types.VersionableEntityMetadata;
+
+public interface VersionableEntityDao {
+
+ void initVersion(VersionableEntityMetadata versionableTableMetadata, String entityId,
+ Version baseVersion, Version newVersion);
+
+ void deleteVersion(VersionableEntityMetadata versionableTableMetadata, String entityId,
+ Version versionToDelete);
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionableEntityDaoFactory.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionableEntityDaoFactory.java
new file mode 100644
index 0000000000..be3c635be2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionableEntityDaoFactory.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.dao;
+
+import org.openecomp.core.factory.api.AbstractComponentFactory;
+import org.openecomp.core.factory.api.AbstractFactory;
+
+public abstract class VersionableEntityDaoFactory
+ extends AbstractComponentFactory<VersionableEntityDao> {
+ public static VersionableEntityDaoFactory getInstance() {
+ return AbstractFactory.getInstance(VersionableEntityDaoFactory.class);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/UserCandidateVersion.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/UserCandidateVersion.java
new file mode 100644
index 0000000000..ca044142de
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/UserCandidateVersion.java
@@ -0,0 +1,56 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.dao.types;
+
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.UDT;
+
+@UDT(name = "user_candidate_version", keyspace = "dox")
+public class UserCandidateVersion {
+
+ @Frozen
+ private Version version;
+ private String user;
+
+ public UserCandidateVersion() {
+ }
+
+ public UserCandidateVersion(String user, Version candidateVersion) {
+ this.user = user;
+ this.version = candidateVersion;
+ }
+
+ public Version getVersion() {
+ return version;
+ }
+
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+
+ public String getUser() {
+ return user;
+ }
+
+ public void setUser(String user) {
+ this.user = user;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/Version.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/Version.java
new file mode 100644
index 0000000000..e6ac799fd4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/Version.java
@@ -0,0 +1,119 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.dao.types;
+
+import com.datastax.driver.mapping.annotations.UDT;
+
+@UDT(name = "version", keyspace = "dox")
+public class Version {
+ public static final String VERSION_REGEX = "^\\d+\\.\\d+$";
+ public static final String VERSION_STRING_VIOLATION_MSG =
+ "Version string must be in the format of: {integer}.{integer}";
+
+ private int major;
+ private int minor;
+
+ public Version() {
+ }
+
+ public Version(int major, int minor) {
+ this.major = major;
+ this.minor = minor;
+ }
+
+ /**
+ * Value of version.
+ *
+ * @param versionString the version string
+ * @return the version
+ */
+ public static Version valueOf(String versionString) {
+ if (versionString == null) {
+ return null;
+ }
+ String[] versionLevels = versionString.split("\\.");
+ Version version;
+ if (versionLevels.length != 2) {
+ throw new IllegalArgumentException(VERSION_STRING_VIOLATION_MSG);
+ }
+ try {
+ version = new Version(Integer.parseInt(versionLevels[0]), Integer.parseInt(versionLevels[1]));
+ } catch (Exception exception) {
+ throw new IllegalArgumentException(VERSION_STRING_VIOLATION_MSG);
+ }
+
+ return version;
+ }
+
+ public int getMajor() {
+ return major;
+ }
+
+ public void setMajor(int major) {
+ this.major = major;
+ }
+
+ public int getMinor() {
+ return minor;
+ }
+
+ public void setMinor(int minor) {
+ this.minor = minor;
+ }
+
+ public Version calculateNextCandidate() {
+ return new Version(major, minor + 1);
+ }
+
+ public Version calculateNextFinal() {
+ return new Version(major + 1, 0);
+ }
+
+ public boolean isFinal() {
+ return major != 0 && minor == 0;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null || getClass() != obj.getClass()) {
+ return false;
+ }
+
+ Version version = (Version) obj;
+
+ return major == version.major && minor == version.minor;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = major;
+ result = 31 * result + minor;
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ return major + "." + minor;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionHistoryEntity.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionHistoryEntity.java
new file mode 100644
index 0000000000..e97e177f52
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionHistoryEntity.java
@@ -0,0 +1,90 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.dao.types;
+
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+
+@Table(keyspace = "dox", name = "version_history")
+public class VersionHistoryEntity {
+
+ @PartitionKey
+ @Column(name = "entity_id")
+ @Frozen
+ private VersionableEntityId entityId;
+
+ @Column(name = "active_version")
+ @Frozen
+ private Version version;
+
+ private String user;
+ private String description;
+ private VersionType type;
+
+ public VersionHistoryEntity() {
+ }
+
+ public VersionHistoryEntity(VersionableEntityId entityId) {
+ this.entityId = entityId;
+ }
+
+ public VersionableEntityId getEntityId() {
+ return entityId;
+ }
+
+ public void setEntityId(VersionableEntityId entityId) {
+ this.entityId = entityId;
+ }
+
+ public Version getVersion() {
+ return version;
+ }
+
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+
+ public String getUser() {
+ return user;
+ }
+
+ public void setUser(String user) {
+ this.user = user;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public VersionType getType() {
+ return type;
+ }
+
+ public void setType(VersionType type) {
+ this.type = type;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionInfoDeletedEntity.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionInfoDeletedEntity.java
new file mode 100644
index 0000000000..9a60aa3b4a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionInfoDeletedEntity.java
@@ -0,0 +1,126 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.dao.types;
+
+import com.datastax.driver.mapping.annotations.ClusteringColumn;
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Enumerated;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.FrozenValue;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+
+import java.util.HashSet;
+import java.util.Set;
+
+@Table(keyspace = "dox", name = "version_info_deleted")
+public class VersionInfoDeletedEntity {
+
+ @PartitionKey
+ @Column(name = "entity_type")
+ private String entityType;
+
+ @ClusteringColumn
+ @Column(name = "entity_id")
+ private String entityId;
+
+ @Column(name = "active_version")
+ @Frozen
+ private Version activeVersion;
+
+ @Enumerated
+ private VersionStatus status;
+
+ @Frozen
+ private UserCandidateVersion candidate;
+
+ @Column(name = "viewable_versions")
+ @FrozenValue
+ private Set<Version> viewableVersions = new HashSet<>();
+
+ @Column(name = "latest_final_version")
+ @Frozen
+ private Version latestFinalVersion;
+
+ public VersionInfoDeletedEntity() {
+ }
+
+ public VersionInfoDeletedEntity(String entityType, String entityId) {
+ this.entityType = entityType;
+ this.entityId = entityId;
+ }
+
+ public String getEntityType() {
+ return entityType;
+ }
+
+ public void setEntityType(String entityType) {
+ this.entityType = entityType;
+ }
+
+ public String getEntityId() {
+ return entityId;
+ }
+
+ public void setEntityId(String entityId) {
+ this.entityId = entityId;
+ }
+
+ public Version getActiveVersion() {
+ return activeVersion;
+ }
+
+ public void setActiveVersion(Version activeVersion) {
+ this.activeVersion = activeVersion;
+ }
+
+ public VersionStatus getStatus() {
+ return status;
+ }
+
+ public void setStatus(VersionStatus status) {
+ this.status = status;
+ }
+
+ public UserCandidateVersion getCandidate() {
+ return candidate;
+ }
+
+ public void setCandidate(UserCandidateVersion candidate) {
+ this.candidate = candidate;
+ }
+
+ public Set<Version> getViewableVersions() {
+ return viewableVersions;
+ }
+
+ public void setViewableVersions(Set<Version> viewableVersions) {
+ this.viewableVersions = viewableVersions;
+ }
+
+ public Version getLatestFinalVersion() {
+ return latestFinalVersion;
+ }
+
+ public void setLatestFinalVersion(Version latestFinalVersion) {
+ this.latestFinalVersion = latestFinalVersion;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionInfoEntity.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionInfoEntity.java
new file mode 100644
index 0000000000..35ab4056f9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionInfoEntity.java
@@ -0,0 +1,126 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.dao.types;
+
+import com.datastax.driver.mapping.annotations.ClusteringColumn;
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.Enumerated;
+import com.datastax.driver.mapping.annotations.Frozen;
+import com.datastax.driver.mapping.annotations.FrozenValue;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+
+import java.util.HashSet;
+import java.util.Set;
+
+@Table(keyspace = "dox", name = "version_info")
+public class VersionInfoEntity {
+
+ @PartitionKey
+ @Column(name = "entity_type")
+ private String entityType;
+
+ @ClusteringColumn
+ @Column(name = "entity_id")
+ private String entityId;
+
+ @Column(name = "active_version")
+ @Frozen
+ private Version activeVersion;
+
+ @Enumerated
+ private VersionStatus status;
+
+ @Frozen
+ private UserCandidateVersion candidate;
+
+ @Column(name = "viewable_versions")
+ @FrozenValue
+ private Set<Version> viewableVersions = new HashSet<>();
+
+ @Column(name = "latest_final_version")
+ @Frozen
+ private Version latestFinalVersion;
+
+ public VersionInfoEntity() {
+ }
+
+ public VersionInfoEntity(String entityType, String entityId) {
+ this.entityType = entityType;
+ this.entityId = entityId;
+ }
+
+ public String getEntityType() {
+ return entityType;
+ }
+
+ public void setEntityType(String entityType) {
+ this.entityType = entityType;
+ }
+
+ public String getEntityId() {
+ return entityId;
+ }
+
+ public void setEntityId(String entityId) {
+ this.entityId = entityId;
+ }
+
+ public Version getActiveVersion() {
+ return activeVersion;
+ }
+
+ public void setActiveVersion(Version activeVersion) {
+ this.activeVersion = activeVersion;
+ }
+
+ public VersionStatus getStatus() {
+ return status;
+ }
+
+ public void setStatus(VersionStatus status) {
+ this.status = status;
+ }
+
+ public UserCandidateVersion getCandidate() {
+ return candidate;
+ }
+
+ public void setCandidate(UserCandidateVersion candidate) {
+ this.candidate = candidate;
+ }
+
+ public Set<Version> getViewableVersions() {
+ return viewableVersions;
+ }
+
+ public void setViewableVersions(Set<Version> viewableVersions) {
+ this.viewableVersions = viewableVersions;
+ }
+
+ public Version getLatestFinalVersion() {
+ return latestFinalVersion;
+ }
+
+ public void setLatestFinalVersion(Version latestFinalVersion) {
+ this.latestFinalVersion = latestFinalVersion;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionStatus.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionStatus.java
new file mode 100644
index 0000000000..1fb68540d6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionStatus.java
@@ -0,0 +1,28 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.dao.types;
+
+public enum VersionStatus {
+ Available,
+ Locked,
+ Final
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionType.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionType.java
new file mode 100644
index 0000000000..5a395c6172
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionType.java
@@ -0,0 +1,26 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.dao.types;
+
+public enum VersionType {
+ Draft,
+ Finalized
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionableEntity.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionableEntity.java
new file mode 100644
index 0000000000..d909af86a3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionableEntity.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.dao.types;
+
+public interface VersionableEntity {
+
+ String getEntityType();
+
+ String getFirstClassCitizenId();
+
+ String getId();
+
+ void setId(String id);
+
+ Version getVersion();
+
+ void setVersion(Version version);
+
+ default String getVersionUuId() {
+ return "";
+ }
+
+ default void setVersionUuId(String uuId) {
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionableEntityId.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionableEntityId.java
new file mode 100644
index 0000000000..78dc1b8811
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionableEntityId.java
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.dao.types;
+
+import com.datastax.driver.mapping.annotations.UDT;
+
+@UDT(name = "versionable_entity_id", keyspace = "dox")
+public class VersionableEntityId {
+ private String type;
+ private String id;
+
+ public VersionableEntityId() {
+ }
+
+ public VersionableEntityId(String type, String id) {
+ this.type = type;
+ this.id = id;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/CheckinOnEntityLockedByOtherErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/CheckinOnEntityLockedByOtherErrorBuilder.java
new file mode 100644
index 0000000000..829ce2691b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/CheckinOnEntityLockedByOtherErrorBuilder.java
@@ -0,0 +1,52 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.errors;
+
+import static org.openecomp.sdc.versioning.errors.VersioningErrorCodes
+ .CHECKIN_ON_ENTITY_LOCKED_BY_OTHER_USER;
+
+import org.openecomp.sdc.common.errors.BaseErrorBuilder;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+
+/**
+ * The type Checkin on entity locked by other error builder.
+ */
+public class CheckinOnEntityLockedByOtherErrorBuilder extends BaseErrorBuilder {
+
+ private static final String CHECKIN_ON_ENTITY_LOCKED_BY_OTHER_USER_MSG =
+ "Can not check in versionable entity %s with id %s since it is "
+ + "checked out by other user: %s.";
+
+ /**
+ * Instantiates a new Checkin on entity locked by other error builder.
+ *
+ * @param entityType the entity type
+ * @param entityId the entity id
+ * @param lockingUser the locking user
+ */
+ public CheckinOnEntityLockedByOtherErrorBuilder(String entityType, String entityId,
+ String lockingUser) {
+ getErrorCodeBuilder().withId(CHECKIN_ON_ENTITY_LOCKED_BY_OTHER_USER);
+ getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
+ getErrorCodeBuilder().withMessage(String
+ .format(CHECKIN_ON_ENTITY_LOCKED_BY_OTHER_USER_MSG, entityType, entityId, lockingUser));
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/CheckinOnUnlockedEntityErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/CheckinOnUnlockedEntityErrorBuilder.java
new file mode 100644
index 0000000000..4628febe2b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/CheckinOnUnlockedEntityErrorBuilder.java
@@ -0,0 +1,46 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.errors;
+
+import org.openecomp.sdc.common.errors.BaseErrorBuilder;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+
+/**
+ * The type Checkin on unlocked entity error builder.
+ */
+public class CheckinOnUnlockedEntityErrorBuilder extends BaseErrorBuilder {
+
+ private static final String CHECKIN_ON_UNLOCKED_ENTITY_MSG =
+ "Can not check in versionable entity %s with id %s since it is not checked out.";
+
+ /**
+ * Instantiates a new Checkin on unlocked entity error builder.
+ *
+ * @param entityType the entity type
+ * @param entityId the entity id
+ */
+ public CheckinOnUnlockedEntityErrorBuilder(String entityType, String entityId) {
+ getErrorCodeBuilder().withId(VersioningErrorCodes.CHECKIN_ON_UNLOCKED_ENTITY);
+ getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
+ getErrorCodeBuilder()
+ .withMessage(String.format(CHECKIN_ON_UNLOCKED_ENTITY_MSG, entityType, entityId));
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/CheckoutOnLockedEntityErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/CheckoutOnLockedEntityErrorBuilder.java
new file mode 100644
index 0000000000..60c02474ad
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/CheckoutOnLockedEntityErrorBuilder.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.errors;
+
+import org.openecomp.sdc.common.errors.BaseErrorBuilder;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+
+/**
+ * The type Checkout on locked entity error builder.
+ */
+public class CheckoutOnLockedEntityErrorBuilder extends BaseErrorBuilder {
+
+ private static final String CHECKOT_ON_LOCKED_ENTITY_MSG =
+ "Can not check out versionable entity %s with id %s since it is "
+ + "checked out by other user: %s.";
+
+ /**
+ * Instantiates a new Checkout on locked entity error builder.
+ *
+ * @param entityType the entity type
+ * @param entityId the entity id
+ * @param lockingUser the locking user
+ */
+ public CheckoutOnLockedEntityErrorBuilder(String entityType, String entityId,
+ String lockingUser) {
+ getErrorCodeBuilder().withId(VersioningErrorCodes.CHECKOT_ON_LOCKED_ENTITY);
+ getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
+ getErrorCodeBuilder().withMessage(
+ String.format(CHECKOT_ON_LOCKED_ENTITY_MSG, entityType, entityId, lockingUser));
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/DeleteOnLockedEntityErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/DeleteOnLockedEntityErrorBuilder.java
new file mode 100644
index 0000000000..a431e92ba4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/DeleteOnLockedEntityErrorBuilder.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.errors;
+
+import org.openecomp.sdc.common.errors.BaseErrorBuilder;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+
+/**
+ * The type Delete on locked entity error builder.
+ */
+public class DeleteOnLockedEntityErrorBuilder extends BaseErrorBuilder {
+
+ private static final String DELETE_ON_LOCKED_ENTITY_MSG =
+ "Can not delete versionable entity %s with id %s since it is checked out by other user: %s.";
+
+ /**
+ * Instantiates a new Delete on locked entity error builder.
+ *
+ * @param entityType the entity type
+ * @param entityId the entity id
+ * @param lockingUser the locking user
+ */
+ public DeleteOnLockedEntityErrorBuilder(String entityType, String entityId, String lockingUser) {
+ getErrorCodeBuilder().withId(VersioningErrorCodes.DELETE_ON_LOCKED_ENTITY);
+ getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
+ getErrorCodeBuilder()
+ .withMessage(String.format(DELETE_ON_LOCKED_ENTITY_MSG, entityType, entityId, lockingUser));
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EditOnEntityLockedByOtherErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EditOnEntityLockedByOtherErrorBuilder.java
new file mode 100644
index 0000000000..2c41bdeab1
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EditOnEntityLockedByOtherErrorBuilder.java
@@ -0,0 +1,50 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.errors;
+
+import org.openecomp.sdc.common.errors.BaseErrorBuilder;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+
+/**
+ * The type Edit on entity locked by other error builder.
+ */
+public class EditOnEntityLockedByOtherErrorBuilder extends BaseErrorBuilder {
+
+ private static final String EDIT_ON_ENTITY_LOCKED_BY_OTHER_USER_MSG =
+ "Versionable entity %s with id %s can not be edited since it is locked by other user %s.";
+
+ /**
+ * Instantiates a new Edit on entity locked by other error builder.
+ *
+ * @param entityType the entity type
+ * @param entityId the entity id
+ * @param lockingUser the locking user
+ */
+ public EditOnEntityLockedByOtherErrorBuilder(String entityType, String entityId,
+ String lockingUser) {
+ getErrorCodeBuilder().withId(VersioningErrorCodes.EDIT_ON_ENTITY_LOCKED_BY_OTHER_USER);
+ getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
+ getErrorCodeBuilder().withMessage(
+ String.format(EDIT_ON_ENTITY_LOCKED_BY_OTHER_USER_MSG, entityType, entityId, lockingUser));
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EditOnUnlockedEntityErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EditOnUnlockedEntityErrorBuilder.java
new file mode 100644
index 0000000000..fb61cce1f0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EditOnUnlockedEntityErrorBuilder.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.errors;
+
+import org.openecomp.sdc.common.errors.BaseErrorBuilder;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+
+/**
+ * The type Edit on unlocked entity error builder.
+ */
+public class EditOnUnlockedEntityErrorBuilder extends BaseErrorBuilder {
+
+ private static final String EDIT_ON_UNLOCKED_ENTITY_MSG =
+ "Can not edit versionable entity %s with id %s since it is not checked out.";
+
+ /**
+ * Instantiates a new Edit on unlocked entity error builder.
+ *
+ * @param entityType the entity type
+ * @param entityId the entity id
+ */
+ public EditOnUnlockedEntityErrorBuilder(String entityType, String entityId) {
+ getErrorCodeBuilder().withId(VersioningErrorCodes.EDIT_ON_UNLOCKED_ENTITY);
+ getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
+ getErrorCodeBuilder()
+ .withMessage(String.format(EDIT_ON_UNLOCKED_ENTITY_MSG, entityType, entityId));
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EntityAlreadyExistErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EntityAlreadyExistErrorBuilder.java
new file mode 100644
index 0000000000..8f80f6e14e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EntityAlreadyExistErrorBuilder.java
@@ -0,0 +1,46 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.errors;
+
+import org.openecomp.sdc.common.errors.BaseErrorBuilder;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+
+/**
+ * The type Entity already exist error builder.
+ */
+public class EntityAlreadyExistErrorBuilder extends BaseErrorBuilder {
+
+ private static final String VERSIONABLE_ENTITY_ALREADY_EXIST_MSG =
+ "Versionable entity %s with id %s already exist.";
+
+ /**
+ * Instantiates a new Entity already exist error builder.
+ *
+ * @param entityType the entity type
+ * @param entityId the entity id
+ */
+ public EntityAlreadyExistErrorBuilder(String entityType, String entityId) {
+ getErrorCodeBuilder().withId(VersioningErrorCodes.VERSIONABLE_ENTITY_ALREADY_EXIST);
+ getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
+ getErrorCodeBuilder()
+ .withMessage(String.format(VERSIONABLE_ENTITY_ALREADY_EXIST_MSG, entityType, entityId));
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EntityAlreadyFinalizedErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EntityAlreadyFinalizedErrorBuilder.java
new file mode 100644
index 0000000000..22643ddc26
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EntityAlreadyFinalizedErrorBuilder.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.errors;
+
+import static org.openecomp.sdc.versioning.errors.VersioningErrorCodes
+ .SUBMIT_FINALIZED_ENTITY_NOT_ALLOWED;
+
+import org.openecomp.sdc.common.errors.BaseErrorBuilder;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+
+/**
+ * The type Entity already finalized error builder.
+ */
+public class EntityAlreadyFinalizedErrorBuilder extends BaseErrorBuilder {
+
+ private static final String SUBMIT_FINALIZED_ENTITY_NOT_ALLOWED_MSG =
+ "Versionable entity %s with id %s can not be submitted since it is already final.";
+
+ /**
+ * Instantiates a new Entity already finalized error builder.
+ *
+ * @param entityType the entity type
+ * @param entityId the entity id
+ */
+ public EntityAlreadyFinalizedErrorBuilder(String entityType, String entityId) {
+ getErrorCodeBuilder().withId(SUBMIT_FINALIZED_ENTITY_NOT_ALLOWED);
+ getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
+ getErrorCodeBuilder()
+ .withMessage(String.format(SUBMIT_FINALIZED_ENTITY_NOT_ALLOWED_MSG, entityType, entityId));
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EntityNotExistErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EntityNotExistErrorBuilder.java
new file mode 100644
index 0000000000..806557f935
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EntityNotExistErrorBuilder.java
@@ -0,0 +1,46 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.errors;
+
+import org.openecomp.sdc.common.errors.BaseErrorBuilder;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+
+/**
+ * The type Entity not exist error builder.
+ */
+public class EntityNotExistErrorBuilder extends BaseErrorBuilder {
+
+ private static final String VERSIONABLE_ENTITY_NOT_EXIST_MSG =
+ "Versionable entity %s with id %s does not exist.";
+
+ /**
+ * Instantiates a new Entity not exist error builder.
+ *
+ * @param entityType the entity type
+ * @param entityId the entity id
+ */
+ public EntityNotExistErrorBuilder(String entityType, String entityId) {
+ getErrorCodeBuilder().withId(VersioningErrorCodes.VERSIONABLE_ENTITY_NOT_EXIST);
+ getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
+ getErrorCodeBuilder()
+ .withMessage(String.format(VERSIONABLE_ENTITY_NOT_EXIST_MSG, entityType, entityId));
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/RequestedVersionInvalidErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/RequestedVersionInvalidErrorBuilder.java
new file mode 100644
index 0000000000..7d3afcb94a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/RequestedVersionInvalidErrorBuilder.java
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.errors;
+
+import org.openecomp.sdc.common.errors.BaseErrorBuilder;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+
+/**
+ * The type Requested version invalid error builder.
+ */
+public class RequestedVersionInvalidErrorBuilder extends BaseErrorBuilder {
+ private static final String REQUESTED_VERSION_INVALID_MSG = "Invalid requested version.";
+
+ /**
+ * Instantiates a new Requested version invalid error builder.
+ */
+ public RequestedVersionInvalidErrorBuilder() {
+ getErrorCodeBuilder().withId(VersioningErrorCodes.REQUESTED_VERSION_INVALID);
+ getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
+ getErrorCodeBuilder().withMessage(REQUESTED_VERSION_INVALID_MSG);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/SubmitLockedEntityNotAllowedErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/SubmitLockedEntityNotAllowedErrorBuilder.java
new file mode 100644
index 0000000000..3f4fc81b76
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/SubmitLockedEntityNotAllowedErrorBuilder.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.errors;
+
+import org.openecomp.sdc.common.errors.BaseErrorBuilder;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+
+/**
+ * The type Submit locked entity not allowed error builder.
+ */
+public class SubmitLockedEntityNotAllowedErrorBuilder extends BaseErrorBuilder {
+
+ private static final String SUBMIT_LOCKED_ENTITY_NOT_ALLOWED_MSG =
+ "Versionable entity %s with id %s can not be submitted since it is currently "
+ + "locked by user %s.";
+
+ /**
+ * Instantiates a new Submit locked entity not allowed error builder.
+ *
+ * @param entityType the entity type
+ * @param entityId the entity id
+ * @param lockingUser the locking user
+ */
+ public SubmitLockedEntityNotAllowedErrorBuilder(String entityType, String entityId,
+ String lockingUser) {
+ getErrorCodeBuilder().withId(VersioningErrorCodes.SUBMIT_LOCKED_ENTITY_NOT_ALLOWED);
+ getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
+ getErrorCodeBuilder().withMessage(
+ String.format(SUBMIT_LOCKED_ENTITY_NOT_ALLOWED_MSG, entityType, entityId, lockingUser));
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/UndoCheckoutOnEntityLockedByOtherErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/UndoCheckoutOnEntityLockedByOtherErrorBuilder.java
new file mode 100644
index 0000000000..5e2be13d61
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/UndoCheckoutOnEntityLockedByOtherErrorBuilder.java
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.errors;
+
+import static org.openecomp.sdc.versioning.errors.VersioningErrorCodes
+ .UNDO_CHECKOUT_ON_ENTITY_LOCKED_BY_OTHER_USER;
+
+import org.openecomp.sdc.common.errors.BaseErrorBuilder;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+
+/**
+ * The type Undo checkout on entity locked by other error builder.
+ */
+public class UndoCheckoutOnEntityLockedByOtherErrorBuilder extends BaseErrorBuilder {
+
+ private static final String UNDO_CHECKOUT_ON_ENTITY_LOCKED_BY_OTHER_USER_MSG =
+ "Can not undo checkout on versionable entity %s with id %s since it is checked out by "
+ + "other user: %s.";
+
+ /**
+ * Instantiates a new Undo checkout on entity locked by other error builder.
+ *
+ * @param entityType the entity type
+ * @param entityId the entity id
+ * @param lockingUser the locking user
+ */
+ public UndoCheckoutOnEntityLockedByOtherErrorBuilder(String entityType, String entityId,
+ String lockingUser) {
+ getErrorCodeBuilder().withId(UNDO_CHECKOUT_ON_ENTITY_LOCKED_BY_OTHER_USER);
+ getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
+ getErrorCodeBuilder().withMessage(String
+ .format(UNDO_CHECKOUT_ON_ENTITY_LOCKED_BY_OTHER_USER_MSG, entityType, entityId,
+ lockingUser));
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/UndoCheckoutOnUnlockedEntityErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/UndoCheckoutOnUnlockedEntityErrorBuilder.java
new file mode 100644
index 0000000000..36ca5b5c41
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/UndoCheckoutOnUnlockedEntityErrorBuilder.java
@@ -0,0 +1,50 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.errors;
+
+import static org.openecomp.sdc.versioning.errors.VersioningErrorCodes
+ .UNDO_CHECKOUT_ON_UNLOCKED_ENTITY;
+
+import org.openecomp.sdc.common.errors.BaseErrorBuilder;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+
+
+/**
+ * The type Undo checkout on unlocked entity error builder.
+ */
+public class UndoCheckoutOnUnlockedEntityErrorBuilder extends BaseErrorBuilder {
+
+ private static final String UNDO_CHECKOUT_ON_UNLOCKED_ENTITY_MSG =
+ "Can not undo checkout on versionable entity %s with id %s since it is not checked out.";
+
+ /**
+ * Instantiates a new Undo checkout on unlocked entity error builder.
+ *
+ * @param entityType the entity type
+ * @param entityId the entity id
+ */
+ public UndoCheckoutOnUnlockedEntityErrorBuilder(String entityType, String entityId) {
+ getErrorCodeBuilder().withId(UNDO_CHECKOUT_ON_UNLOCKED_ENTITY);
+ getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
+ getErrorCodeBuilder()
+ .withMessage(String.format(UNDO_CHECKOUT_ON_UNLOCKED_ENTITY_MSG, entityType, entityId));
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/VersionableSubEntityNotFoundErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/VersionableSubEntityNotFoundErrorBuilder.java
new file mode 100644
index 0000000000..77be83f427
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/VersionableSubEntityNotFoundErrorBuilder.java
@@ -0,0 +1,77 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.errors;
+
+import org.openecomp.core.utilities.CommonMethods;
+import org.openecomp.sdc.common.errors.BaseErrorBuilder;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+import org.openecomp.sdc.versioning.dao.types.Version;
+
+import java.util.List;
+
+/**
+ * The type Versionable sub entity not found error builder.
+ */
+public class VersionableSubEntityNotFoundErrorBuilder extends BaseErrorBuilder {
+
+ private static final String SUB_ENTITY_NOT_FOUND_MSG =
+ "%s with Id %s does not exist for %s with id %s and version %s";
+ private static final String SUB_ENTITIES_NOT_FOUND_MSG =
+ "%ss with Ids %s do not exist for %s with id %s and version %s";
+
+ /**
+ * Instantiates a new Versionable sub entity not found error builder.
+ *
+ * @param entityType the entity type
+ * @param entityId the entity id
+ * @param containingEntityType the containing entity type
+ * @param containingEntityId the containing entity id
+ * @param version the version
+ */
+ public VersionableSubEntityNotFoundErrorBuilder(String entityType, String entityId,
+ String containingEntityType,
+ String containingEntityId, Version version) {
+ getErrorCodeBuilder().withId(VersioningErrorCodes.VERSIONABLE_SUB_ENTITY_NOT_FOUND);
+ getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
+ getErrorCodeBuilder().withMessage(String
+ .format(SUB_ENTITY_NOT_FOUND_MSG, entityType, entityId, containingEntityType,
+ containingEntityId, version.toString()));
+ }
+
+ /**
+ * Instantiates a new Versionable sub entity not found error builder.
+ *
+ * @param entityType the entity type
+ * @param entityIds the entity ids
+ * @param containingEntityType the containing entity type
+ * @param containingEntityId the containing entity id
+ * @param version the version
+ */
+ public VersionableSubEntityNotFoundErrorBuilder(String entityType, List<String> entityIds,
+ String containingEntityType,
+ String containingEntityId, Version version) {
+ getErrorCodeBuilder().withId(VersioningErrorCodes.VERSIONABLE_SUB_ENTITY_NOT_FOUND);
+ getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
+ getErrorCodeBuilder().withMessage(String.format(SUB_ENTITIES_NOT_FOUND_MSG, entityType,
+ CommonMethods.listToSeparatedString(entityIds, ','), containingEntityType,
+ containingEntityId, version.toString()));
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/VersioningErrorCodes.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/VersioningErrorCodes.java
new file mode 100644
index 0000000000..c1c6b96bfd
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/VersioningErrorCodes.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.errors;
+
+public class VersioningErrorCodes {
+
+ public static final String REQUESTED_VERSION_INVALID = "REQUESTED_VERSION_INVALID";
+ public static final String CHECKIN_ON_ENTITY_LOCKED_BY_OTHER_USER =
+ "CHECKIN_ON_ENTITY_LOCKED_BY_OTHER_USER";
+ public static final String CHECKIN_ON_UNLOCKED_ENTITY = "CHECKIN_ON_UNLOCKED_ENTITY";
+ public static final String CHECKOT_ON_LOCKED_ENTITY = "CHECKOT_ON_LOCKED_ENTITY";
+ public static final String DELETE_ON_LOCKED_ENTITY = "DELETE_ON_LOCKED_ENTITY";
+ public static final String EDIT_ON_ENTITY_LOCKED_BY_OTHER_USER =
+ "EDIT_ON_ENTITY_LOCKED_BY_OTHER_USER";
+ public static final String EDIT_ON_UNLOCKED_ENTITY = "EDIT_ON_UNLOCKED_ENTITY";
+ public static final String VERSIONABLE_ENTITY_ALREADY_EXIST = "VERSIONABLE_ENTITY_ALREADY_EXIST";
+ public static final String SUBMIT_FINALIZED_ENTITY_NOT_ALLOWED =
+ "SUBMIT_FINALIZED_ENTITY_NOT_ALLOWED";
+ public static final String VERSIONABLE_ENTITY_NOT_EXIST = "VERSIONABLE_ENTITY_NOT_EXIST";
+ public static final String VERSIONABLE_SUB_ENTITY_NOT_FOUND = "VERSIONABLE_SUB_ENTITY_NOT_FOUND";
+ public static final String SUBMIT_LOCKED_ENTITY_NOT_ALLOWED = "SUBMIT_LOCKED_ENTITY_NOT_ALLOWED";
+ public static final String UNDO_CHECKOUT_ON_ENTITY_LOCKED_BY_OTHER_USER =
+ "UNDO_CHECKOUT_ON_ENTITY_LOCKED_BY_OTHER_USER";
+ public static final String UNDO_CHECKOUT_ON_UNLOCKED_ENTITY = "UNDO_CHECKOUT_ON_UNLOCKED_ENTITY";
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/UniqueValueMetadata.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/UniqueValueMetadata.java
new file mode 100644
index 0000000000..21d42299fa
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/UniqueValueMetadata.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.types;
+
+import java.util.List;
+
+public class UniqueValueMetadata {
+ private String type;
+ private List<String> uniqueConstraintIdentifiers;
+
+ public UniqueValueMetadata(String type, List<String> contextIdentifierNames) {
+ this.type = type;
+ this.uniqueConstraintIdentifiers = contextIdentifierNames;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public List<String> getUniqueConstraintIdentifiers() {
+ return uniqueConstraintIdentifiers;
+ }
+
+ public void setUniqueConstraintIdentifiers(List<String> uniqueConstraintIdentifiers) {
+ this.uniqueConstraintIdentifiers = uniqueConstraintIdentifiers;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionInfo.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionInfo.java
new file mode 100644
index 0000000000..02b5aaa3bd
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionInfo.java
@@ -0,0 +1,97 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.types;
+
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.dao.types.VersionStatus;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class VersionInfo {
+ private Version activeVersion;
+ private Version latestFinalVersion;
+ private List<Version> viewableVersions = new ArrayList<>();
+ private List<Version> finalVersions = new ArrayList<>();
+ private VersionStatus status;
+ private String lockingUser;
+
+ public Version getActiveVersion() {
+ return activeVersion;
+ }
+
+ public void setActiveVersion(Version activeVersion) {
+ this.activeVersion = activeVersion;
+ }
+
+ public Version getLatestFinalVersion() {
+ return latestFinalVersion;
+ }
+
+ public void setLatestFinalVersion(Version latestFinalVersion) {
+ this.latestFinalVersion = latestFinalVersion;
+ }
+
+ public List<Version> getViewableVersions() {
+ return viewableVersions;
+ }
+
+ public void setViewableVersions(List<Version> viewableVersions) {
+ this.viewableVersions = viewableVersions;
+ }
+
+ public List<Version> getFinalVersions() {
+ return finalVersions;
+ }
+
+ public void setFinalVersions(List<Version> finalVersions) {
+ this.finalVersions = finalVersions;
+ }
+
+ public VersionStatus getStatus() {
+ return status;
+ }
+
+ public void setStatus(VersionStatus status) {
+ this.status = status;
+ }
+
+ public String getLockingUser() {
+ return lockingUser;
+ }
+
+ public void setLockingUser(String lockingUser) {
+ this.lockingUser = lockingUser;
+ }
+
+ @Override
+ public String toString() {
+ final StringBuilder sb = new StringBuilder("VersionInfo{");
+ sb.append("activeVersion=").append(activeVersion);
+ sb.append(", latestFinalVersion=").append(latestFinalVersion);
+ sb.append(", viewableVersions=").append(viewableVersions);
+ sb.append(", finalVersions=").append(finalVersions);
+ sb.append(", status=").append(status);
+ sb.append(", lockingUser='").append(lockingUser).append('\'');
+ sb.append('}');
+ return sb.toString();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionableEntityAction.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionableEntityAction.java
new file mode 100644
index 0000000000..c7413858e5
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionableEntityAction.java
@@ -0,0 +1,26 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.types;
+
+public enum VersionableEntityAction {
+ Read,
+ Write
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionableEntityMetadata.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionableEntityMetadata.java
new file mode 100644
index 0000000000..161221abe3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionableEntityMetadata.java
@@ -0,0 +1,78 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.types;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class VersionableEntityMetadata {
+
+ private String name;
+ private String identifierName;
+ private String versionIdentifierName;
+ private List<UniqueValueMetadata> uniqueValuesMetadata = new ArrayList<>();
+
+ /**
+ * Instantiates a new Versionable entity metadata.
+ *
+ * @param name the name
+ * @param identifierName the identifier name
+ * @param versionIdentifierName the version identifier name
+ */
+ public VersionableEntityMetadata(String name, String identifierName,
+ String versionIdentifierName) {
+ this.name = name;
+ this.identifierName = identifierName;
+ this.versionIdentifierName = versionIdentifierName;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getIdentifierName() {
+ return identifierName;
+ }
+
+ public void setIdentifierName(String idColumnName) {
+ this.identifierName = idColumnName;
+ }
+
+ public String getVersionIdentifierName() {
+ return versionIdentifierName;
+ }
+
+ public void setVersionIdentifierName(String versionColumnName) {
+ this.versionIdentifierName = versionColumnName;
+ }
+
+ public List<UniqueValueMetadata> getUniqueValuesMetadata() {
+ return uniqueValuesMetadata;
+ }
+
+ public void setUniqueValuesMetadata(List<UniqueValueMetadata> uniqueValuesMetadata) {
+ this.uniqueValuesMetadata = uniqueValuesMetadata;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/resources/factoryConfiguration.json b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/resources/factoryConfiguration.json
new file mode 100644
index 0000000000..f36c2d5a43
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/resources/factoryConfiguration.json
@@ -0,0 +1,7 @@
+{
+ "org.openecomp.sdc.versioning.VersioningManagerFactory": "org.openecomp.sdc.versioning.impl.VersioningManagerFactoryImpl",
+ "org.openecomp.sdc.versioning.dao.VersionableEntityDaoFactory" : "org.openecomp.sdc.versioning.dao.impl.VersionableEntityDaoFactoryImpl",
+ "org.openecomp.sdc.versioning.dao.VersionInfoDaoFactory": "org.openecomp.sdc.versioning.dao.impl.VersionInfoDaoFactoryImpl",
+ "org.openecomp.sdc.versioning.dao.VersionInfoDeletedDaoFactory": "org.openecomp.sdc.versioning.dao.impl.VersionInfoDeletedDaoFactoryImpl"
+
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/pom.xml b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/pom.xml
new file mode 100644
index 0000000000..9812a3e941
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/pom.xml
@@ -0,0 +1,61 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../..</relativePath>
+ </parent>
+
+ <name>openecomp-sdc-versioning-core</name>
+ <artifactId>openecomp-sdc-versioning-core</artifactId>
+
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-versioning-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.code.gson</groupId>
+ <artifactId>gson</artifactId>
+ <version>2.3.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.yaml</groupId>
+ <artifactId>snakeyaml</artifactId>
+ <version>1.14</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <scope>test</scope>
+ <version>1.10.19</version>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <scope>test</scope>
+ <version>6.8.5</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>snakeyaml</artifactId>
+ <groupId>org.yaml</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ <version>RELEASE</version>
+ </dependency>
+ </dependencies>
+
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionHistoryCassandraDaoImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionHistoryCassandraDaoImpl.java
new file mode 100644
index 0000000000..a50a8b7beb
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionHistoryCassandraDaoImpl.java
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.dao.impl;
+
+import com.datastax.driver.core.UDTValue;
+import com.datastax.driver.mapping.Mapper;
+import com.datastax.driver.mapping.Result;
+import com.datastax.driver.mapping.UDTMapper;
+import com.datastax.driver.mapping.annotations.Accessor;
+import com.datastax.driver.mapping.annotations.Query;
+import org.openecomp.core.dao.impl.CassandraBaseDao;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import org.openecomp.sdc.versioning.dao.VersionHistoryDao;
+import org.openecomp.sdc.versioning.dao.types.VersionHistoryEntity;
+import org.openecomp.sdc.versioning.dao.types.VersionableEntityId;
+
+import java.util.Collection;
+
+public class VersionHistoryCassandraDaoImpl extends CassandraBaseDao<VersionHistoryEntity>
+ implements VersionHistoryDao {
+
+ private static NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static Mapper<VersionHistoryEntity> mapper =
+ noSqlDb.getMappingManager().mapper(VersionHistoryEntity.class);
+ private static VersionHistoryAccessor accessor =
+ noSqlDb.getMappingManager().createAccessor(VersionHistoryAccessor.class);
+ private static UDTMapper<VersionableEntityId> versionedEntityIdMapper =
+ noSqlDb.getMappingManager().udtMapper(VersionableEntityId.class);
+
+ @Override
+ protected Mapper<VersionHistoryEntity> getMapper() {
+ return mapper;
+ }
+
+ @Override
+ protected Object[] getKeys(VersionHistoryEntity entity) {
+ return new Object[]{versionedEntityIdMapper.toUDT(entity.getEntityId())};
+ }
+
+ @Override
+ public Collection<VersionHistoryEntity> list(VersionHistoryEntity entity) {
+ return accessor.getAll(versionedEntityIdMapper.toUDT(entity.getEntityId())).all();
+ }
+
+ @Accessor
+ interface VersionHistoryAccessor {
+ @Query("select * from version_history where entity_id=?")
+ Result<VersionHistoryEntity> getAll(UDTValue entityId);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionHistoryDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionHistoryDaoFactoryImpl.java
new file mode 100644
index 0000000000..ac1c7e9634
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionHistoryDaoFactoryImpl.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.dao.impl;
+
+import org.openecomp.sdc.versioning.dao.VersionHistoryDao;
+import org.openecomp.sdc.versioning.dao.VersionHistoryDaoFactory;
+
+public class VersionHistoryDaoFactoryImpl extends VersionHistoryDaoFactory {
+ private static final VersionHistoryDao INSTANCE = new VersionHistoryCassandraDaoImpl();
+
+ @Override
+ public VersionHistoryDao createInterface() {
+ return INSTANCE;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDaoFactoryImpl.java
new file mode 100644
index 0000000000..46c6a9d795
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDaoFactoryImpl.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.dao.impl;
+
+import org.openecomp.sdc.versioning.dao.VersionInfoDao;
+import org.openecomp.sdc.versioning.dao.VersionInfoDaoFactory;
+
+public class VersionInfoDaoFactoryImpl extends VersionInfoDaoFactory {
+ private static VersionInfoDao INSTANCE = new VersionInfoDaoImpl();
+
+ @Override
+ public VersionInfoDao createInterface() {
+ return INSTANCE;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDaoImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDaoImpl.java
new file mode 100644
index 0000000000..a45c211f94
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDaoImpl.java
@@ -0,0 +1,66 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.dao.impl;
+
+import com.datastax.driver.mapping.Mapper;
+import com.datastax.driver.mapping.Result;
+import com.datastax.driver.mapping.annotations.Accessor;
+import com.datastax.driver.mapping.annotations.Query;
+import org.openecomp.core.dao.impl.CassandraBaseDao;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import org.openecomp.sdc.versioning.dao.VersionInfoDao;
+import org.openecomp.sdc.versioning.dao.types.VersionInfoEntity;
+
+import java.util.Collection;
+
+public class VersionInfoDaoImpl extends CassandraBaseDao<VersionInfoEntity>
+ implements VersionInfoDao {
+
+ private static NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static Mapper<VersionInfoEntity> mapper =
+ noSqlDb.getMappingManager().mapper(VersionInfoEntity.class);
+ private static VersionInfoAccessor accessor =
+ noSqlDb.getMappingManager().createAccessor(VersionInfoAccessor.class);
+ //private static UDTMapper<VersionableEntityId> versionedEntityIdMapper = noSqlDb
+ //.getMappingManager().udtMapper(VersionableEntityId.class);
+
+ @Override
+ protected Mapper<VersionInfoEntity> getMapper() {
+ return mapper;
+ }
+
+ @Override
+ protected Object[] getKeys(VersionInfoEntity entity) {
+ return new Object[]{entity.getEntityType(), entity.getEntityId()};
+ }
+
+ @Override
+ public Collection<VersionInfoEntity> list(VersionInfoEntity entity) {
+ return accessor.getAll(entity.getEntityType()).all();
+ }
+
+ @Accessor
+ interface VersionInfoAccessor {
+ @Query("select * from version_info where entity_type=?")
+ Result<VersionInfoEntity> getAll(String entityType);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDeletedDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDeletedDaoFactoryImpl.java
new file mode 100644
index 0000000000..9163018a85
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDeletedDaoFactoryImpl.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.dao.impl;
+
+
+import org.openecomp.sdc.versioning.dao.VersionInfoDeletedDao;
+import org.openecomp.sdc.versioning.dao.VersionInfoDeletedDaoFactory;
+
+public class VersionInfoDeletedDaoFactoryImpl extends VersionInfoDeletedDaoFactory {
+ private static VersionInfoDeletedDao INSTANCE = new VersionInfoDeletedDaoImpl();
+
+ @Override
+ public VersionInfoDeletedDao createInterface() {
+ return INSTANCE;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDeletedDaoImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDeletedDaoImpl.java
new file mode 100644
index 0000000000..82e4edcd80
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDeletedDaoImpl.java
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.dao.impl;
+
+import com.datastax.driver.mapping.Mapper;
+import com.datastax.driver.mapping.Result;
+import com.datastax.driver.mapping.annotations.Accessor;
+import com.datastax.driver.mapping.annotations.Query;
+import org.openecomp.core.dao.impl.CassandraBaseDao;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import org.openecomp.sdc.versioning.dao.VersionInfoDeletedDao;
+import org.openecomp.sdc.versioning.dao.types.VersionInfoDeletedEntity;
+
+import java.util.Collection;
+
+public class VersionInfoDeletedDaoImpl extends CassandraBaseDao<VersionInfoDeletedEntity>
+ implements VersionInfoDeletedDao {
+
+ private static NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static Mapper<VersionInfoDeletedEntity> mapper =
+ noSqlDb.getMappingManager().mapper(VersionInfoDeletedEntity.class);
+ private static VersionInfoAccessor accessor =
+ noSqlDb.getMappingManager().createAccessor(VersionInfoAccessor.class);
+
+
+ @Override
+ protected Mapper<VersionInfoDeletedEntity> getMapper() {
+ return mapper;
+ }
+
+ @Override
+ protected Object[] getKeys(VersionInfoDeletedEntity entity) {
+ return new Object[]{entity.getEntityType(), entity.getEntityId()};
+ }
+
+ @Override
+ public Collection<VersionInfoDeletedEntity> list(VersionInfoDeletedEntity entity) {
+ return accessor.getAll(entity.getEntityType()).all();
+ }
+
+ @Accessor
+ interface VersionInfoAccessor {
+ @Query("select * from version_info_deleted where entity_type=?")
+ Result<VersionInfoDeletedEntity> getAll(String entityType);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionableEntityDaoCassandraImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionableEntityDaoCassandraImpl.java
new file mode 100644
index 0000000000..f02ea89e34
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionableEntityDaoCassandraImpl.java
@@ -0,0 +1,159 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.dao.impl;
+
+import com.datastax.driver.core.ColumnDefinitions;
+import com.datastax.driver.core.ResultSet;
+import com.datastax.driver.core.Row;
+import com.datastax.driver.mapping.UDTMapper;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import org.openecomp.core.util.UniqueValueUtil;
+import org.openecomp.core.utilities.CommonMethods;
+import org.openecomp.sdc.versioning.dao.VersionableEntityDao;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.types.UniqueValueMetadata;
+import org.openecomp.sdc.versioning.types.VersionableEntityMetadata;
+
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+class VersionableEntityDaoCassandraImpl implements VersionableEntityDao {
+
+ private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static org.slf4j.Logger Logger =
+ LoggerFactory.getLogger(VersionableEntityDaoCassandraImpl.class);
+ private static UDTMapper<Version> versionMapper =
+ noSqlDb.getMappingManager().udtMapper(Version.class);
+
+ private static String commaSeparatedQuestionMarks(int size) {
+ StringBuilder sb = new StringBuilder(size * 2 - 1);
+ for (int i = 0; i < size; i++) {
+ if (i > 0) {
+ sb.append(',');
+ }
+ sb.append('?');
+ }
+ return sb.toString();
+
+ }
+
+ @Override
+ public void initVersion(VersionableEntityMetadata metadata, String entityId, Version baseVersion,
+ Version newVersion) {
+ ResultSet rows = loadVersionRows(metadata, entityId, baseVersion);
+ List<String> columnNames =
+ rows.getColumnDefinitions().asList().stream().map(ColumnDefinitions.Definition::getName)
+ .collect(Collectors.toList());
+
+ String insertCql = String.format("insert into %s (%s) values (%s)", metadata.getName(),
+ CommonMethods.listToSeparatedString(columnNames, ','),
+ commaSeparatedQuestionMarks(columnNames.size()));
+ Logger.debug("insertCql", insertCql);
+
+ for (Row row : rows) {
+ List<Object> columnValues = new ArrayList<>();
+ Map<String, Object> columnNameToValue = new HashMap<>();
+
+ for (String columnName : columnNames) {
+ if (metadata.getVersionIdentifierName().equals(columnName)) {
+ columnValues.add(versionMapper.toUDT(newVersion));
+ columnNameToValue.put(columnName, newVersion.toString());
+ } else {
+ Object value = row.getObject(columnName);
+ columnValues.add(value);
+ columnNameToValue.put(columnName, value);
+ }
+ }
+
+ initRowUniqueValues(metadata.getUniqueValuesMetadata(), columnNameToValue);
+
+ noSqlDb.execute(insertCql, columnValues.toArray());
+ }
+ }
+
+ private ResultSet loadVersionRows(VersionableEntityMetadata metadata, String entityId,
+ Version version) {
+ String selectCql = String.format("select * from %s where %s=? and %s=?", metadata.getName(),
+ metadata.getIdentifierName(), metadata.getVersionIdentifierName());
+ Logger.debug("selectCql", selectCql);
+ Logger.debug("entityId", entityId);
+ Logger.debug("version", version);
+
+ return noSqlDb.execute(selectCql, entityId, versionMapper.toUDT(version));
+ }
+
+ @Override
+ public void deleteVersion(VersionableEntityMetadata metadata, String entityId,
+ Version versionToDelete) {
+ deleteRowsUniqueValues(metadata, entityId, versionToDelete);
+
+ String deleteCql = String.format("delete from %s where %s=? and %s=?", metadata.getName(),
+ metadata.getIdentifierName(), metadata.getVersionIdentifierName());
+ noSqlDb.execute(deleteCql, entityId, versionMapper.toUDT(versionToDelete));
+ }
+
+ private void initRowUniqueValues(List<UniqueValueMetadata> metadata,
+ Map<String, Object> columnNameToValue) {
+ for (UniqueValueMetadata uniqueMetadata : metadata) {
+ List<String> uniqueValueCombination = uniqueMetadata.getUniqueConstraintIdentifiers().stream()
+ .map(colName -> (String) columnNameToValue.get(colName)).collect(Collectors.toList());
+ UniqueValueUtil.createUniqueValue(uniqueMetadata.getType(),
+ uniqueValueCombination.toArray(new String[uniqueValueCombination.size()]));
+ }
+ }
+
+ private void deleteRowUniqueValues(List<UniqueValueMetadata> metadata,
+ Map<String, Object> columnNameToValue) {
+ for (UniqueValueMetadata uniqueMetadata : metadata) {
+ List<String> uniqueValueCombination = uniqueMetadata.getUniqueConstraintIdentifiers().stream()
+ .map(colName -> (String) columnNameToValue.get(colName)).collect(Collectors.toList());
+ UniqueValueUtil.deleteUniqueValue(uniqueMetadata.getType(),
+ uniqueValueCombination.toArray(new String[uniqueValueCombination.size()]));
+ }
+ }
+
+ private void deleteRowsUniqueValues(VersionableEntityMetadata metadata, String entityId,
+ Version version) {
+ if (metadata.getUniqueValuesMetadata().isEmpty()) {
+ return;
+ }
+ ResultSet rows = loadVersionRows(metadata, entityId, version);
+ List<String> columnNames =
+ rows.getColumnDefinitions().asList().stream().map(ColumnDefinitions.Definition::getName)
+ .collect(Collectors.toList());
+
+ for (Row row : rows) {
+ Map<String, Object> columnNameToValue =
+ columnNames.stream().filter(name -> row.getObject(name) != null).collect(Collectors
+ .toMap(Function.identity(),
+ columnName -> metadata.getVersionIdentifierName().equals(columnName) ? version
+ .toString() : row.getObject(columnName)));
+ deleteRowUniqueValues(metadata.getUniqueValuesMetadata(), columnNameToValue);
+ }
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionableEntityDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionableEntityDaoFactoryImpl.java
new file mode 100644
index 0000000000..8ec0814fc9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionableEntityDaoFactoryImpl.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.dao.impl;
+
+import org.openecomp.sdc.versioning.dao.VersionableEntityDao;
+import org.openecomp.sdc.versioning.dao.VersionableEntityDaoFactory;
+
+public class VersionableEntityDaoFactoryImpl extends VersionableEntityDaoFactory {
+ private static VersionableEntityDao INSTANCE = new VersionableEntityDaoCassandraImpl();
+
+ @Override
+ public VersionableEntityDao createInterface() {
+ return INSTANCE;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersioningManagerFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersioningManagerFactoryImpl.java
new file mode 100644
index 0000000000..f7065cfda4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersioningManagerFactoryImpl.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.impl;
+
+import org.openecomp.sdc.versioning.VersioningManager;
+import org.openecomp.sdc.versioning.VersioningManagerFactory;
+
+public class VersioningManagerFactoryImpl extends VersioningManagerFactory {
+ private static final VersioningManager INSTANCE = new VersioningManagerImpl();
+
+ @Override
+ public VersioningManager createInterface() {
+ return INSTANCE;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersioningManagerImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersioningManagerImpl.java
new file mode 100644
index 0000000000..6aa2a9f63c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersioningManagerImpl.java
@@ -0,0 +1,468 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.versioning.impl;
+
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.versioning.VersioningManager;
+import org.openecomp.sdc.versioning.dao.VersionInfoDao;
+import org.openecomp.sdc.versioning.dao.VersionInfoDaoFactory;
+import org.openecomp.sdc.versioning.dao.VersionInfoDeletedDao;
+import org.openecomp.sdc.versioning.dao.VersionInfoDeletedDaoFactory;
+import org.openecomp.sdc.versioning.dao.VersionableEntityDao;
+import org.openecomp.sdc.versioning.dao.VersionableEntityDaoFactory;
+import org.openecomp.sdc.versioning.dao.types.UserCandidateVersion;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.dao.types.VersionHistoryEntity;
+import org.openecomp.sdc.versioning.dao.types.VersionInfoDeletedEntity;
+import org.openecomp.sdc.versioning.dao.types.VersionInfoEntity;
+import org.openecomp.sdc.versioning.dao.types.VersionStatus;
+import org.openecomp.sdc.versioning.dao.types.VersionType;
+import org.openecomp.sdc.versioning.dao.types.VersionableEntityId;
+import org.openecomp.sdc.versioning.errors.CheckinOnEntityLockedByOtherErrorBuilder;
+import org.openecomp.sdc.versioning.errors.CheckinOnUnlockedEntityErrorBuilder;
+import org.openecomp.sdc.versioning.errors.CheckoutOnLockedEntityErrorBuilder;
+import org.openecomp.sdc.versioning.errors.DeleteOnLockedEntityErrorBuilder;
+import org.openecomp.sdc.versioning.errors.EditOnEntityLockedByOtherErrorBuilder;
+import org.openecomp.sdc.versioning.errors.EditOnUnlockedEntityErrorBuilder;
+import org.openecomp.sdc.versioning.errors.EntityAlreadyExistErrorBuilder;
+import org.openecomp.sdc.versioning.errors.EntityAlreadyFinalizedErrorBuilder;
+import org.openecomp.sdc.versioning.errors.EntityNotExistErrorBuilder;
+import org.openecomp.sdc.versioning.errors.SubmitLockedEntityNotAllowedErrorBuilder;
+import org.openecomp.sdc.versioning.errors.UndoCheckoutOnEntityLockedByOtherErrorBuilder;
+import org.openecomp.sdc.versioning.errors.UndoCheckoutOnUnlockedEntityErrorBuilder;
+import org.openecomp.sdc.versioning.types.VersionInfo;
+import org.openecomp.sdc.versioning.types.VersionableEntityAction;
+import org.openecomp.sdc.versioning.types.VersionableEntityMetadata;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+public class VersioningManagerImpl implements VersioningManager {
+
+ private static final Version INITIAL_ACTIVE_VERSION = new Version(0, 0);
+ private static VersionInfoDao versionInfoDao =
+ VersionInfoDaoFactory.getInstance().createInterface();
+ private static VersionInfoDeletedDao versionInfoDeletedDao =
+ VersionInfoDeletedDaoFactory.getInstance().createInterface();
+ private static VersionableEntityDao versionableEntityDao =
+ VersionableEntityDaoFactory.getInstance().createInterface();
+
+ private static Map<String, Set<VersionableEntityMetadata>> versionableEntities = new HashMap<>();
+
+ private static VersionInfo getVersionInfo(VersionInfoEntity versionInfoEntity, String user,
+ VersionableEntityAction action) {
+ return getVersionInfo(versionInfoEntity.getEntityId(),
+ versionInfoEntity.getEntityType(),
+ versionInfoEntity.getActiveVersion(),
+ versionInfoEntity.getCandidate(),
+ versionInfoEntity.getStatus(),
+ versionInfoEntity.getLatestFinalVersion(),
+ versionInfoEntity.getViewableVersions(),
+ action,
+ user);
+ }
+
+ private static VersionInfo getVersionInfo(VersionInfoDeletedEntity versionInfoEntity, String user,
+ VersionableEntityAction action) {
+ return getVersionInfo(versionInfoEntity.getEntityId(),
+ versionInfoEntity.getEntityType(),
+ versionInfoEntity.getActiveVersion(),
+ versionInfoEntity.getCandidate(),
+ versionInfoEntity.getStatus(),
+ versionInfoEntity.getLatestFinalVersion(),
+ versionInfoEntity.getViewableVersions(),
+ action,
+ user);
+ }
+
+ private static VersionInfo getVersionInfo(String entityId, String entityType, Version activeVer,
+ UserCandidateVersion candidate, VersionStatus status,
+ Version latestFinalVersion,
+ Set<Version> viewableVersions,
+ VersionableEntityAction action, String user) {
+ Version activeVersion;
+
+ if (action == VersionableEntityAction.Write) {
+ if (candidate != null) {
+ if (user.equals(candidate.getUser())) {
+ activeVersion = candidate.getVersion();
+ } else {
+ throw new CoreException(
+ new EditOnEntityLockedByOtherErrorBuilder(entityType, entityId, candidate.getUser())
+ .build());
+ }
+ } else {
+ throw new CoreException(new EditOnUnlockedEntityErrorBuilder(entityType, entityId).build());
+ }
+ } else {
+ if (candidate != null && user.equals(candidate.getUser())) {
+ activeVersion = candidate.getVersion();
+ } else {
+ activeVersion = activeVer;
+ }
+ }
+
+ VersionInfo versionInfo = new VersionInfo();
+ versionInfo.setActiveVersion(activeVersion);
+ versionInfo.setLatestFinalVersion(latestFinalVersion);
+ versionInfo.setViewableVersions(toSortedList(viewableVersions));
+ versionInfo.setFinalVersions(getFinalVersions(viewableVersions));
+ versionInfo.setStatus(status);
+ if (candidate != null) {
+ versionInfo.setLockingUser(candidate.getUser());
+ if (user.equals(candidate.getUser())) {
+ versionInfo.getViewableVersions().add(candidate.getVersion());
+ }
+ }
+ return versionInfo;
+ }
+
+ private static List<Version> toSortedList(
+ Set<Version> versions) { // changing the Set to List in DB will require migration...
+ return versions.stream().sorted((o1, o2) -> {
+ return o1.getMajor() > o2.getMajor() ? 1
+ : o1.getMajor() == o2.getMajor() ? (o1.getMinor() > o2.getMinor() ? 1
+ : o1.getMinor() == o2.getMinor() ? 0 : -1) : -1;
+ }).collect(Collectors.toList());
+ }
+
+ private static List<Version> getFinalVersions(Set<Version> versions) {
+ return versions.stream().filter(version -> version.isFinal()).collect(Collectors.toList());
+ }
+
+ @Override
+ public void register(String entityType, VersionableEntityMetadata entityMetadata) {
+ Set<VersionableEntityMetadata> entitiesMetadata = versionableEntities.get(entityType);
+ if (entitiesMetadata == null) {
+ entitiesMetadata = new HashSet<>();
+ versionableEntities.put(entityType, entitiesMetadata);
+ }
+ entitiesMetadata.add(entityMetadata);
+ }
+
+ @Override
+ public Version create(String entityType, String entityId, String user) {
+ VersionInfoEntity versionInfoEntity =
+ versionInfoDao.get(new VersionInfoEntity(entityType, entityId));
+ if (versionInfoEntity != null) {
+ throw new CoreException(new EntityAlreadyExistErrorBuilder(entityType, entityId).build());
+ }
+
+ versionInfoEntity = new VersionInfoEntity(entityType, entityId);
+ versionInfoEntity.setActiveVersion(INITIAL_ACTIVE_VERSION);
+ markAsCheckedOut(versionInfoEntity, user);
+ versionInfoDao.create(versionInfoEntity);
+
+ return versionInfoEntity.getCandidate().getVersion();
+ }
+
+ @Override
+ public Version checkout(String entityType, String entityId, String user) {
+ VersionInfoEntity versionInfoEntity =
+ versionInfoDao.get(new VersionInfoEntity(entityType, entityId));
+ if (versionInfoEntity == null) {
+ throw new CoreException(new EntityNotExistErrorBuilder(entityType, entityId).build());
+ }
+
+ Version checkoutVersion = null;
+ switch (versionInfoEntity.getStatus()) {
+ case Locked:
+ throw new CoreException(new CheckoutOnLockedEntityErrorBuilder(entityType, entityId,
+ versionInfoEntity.getCandidate().getUser()).build());
+ case Final:
+ case Available:
+ checkoutVersion = doCheckout(versionInfoEntity, user);
+ break;
+ default:
+ }
+ return checkoutVersion;
+ }
+
+ @Override
+ public Version undoCheckout(String entityType, String entityId, String user) {
+ VersionInfoEntity versionInfoEntity =
+ versionInfoDao.get(new VersionInfoEntity(entityType, entityId));
+ if (versionInfoEntity == null) {
+ throw new CoreException(new EntityNotExistErrorBuilder(entityType, entityId).build());
+ }
+
+ Version activeVersion = null;
+ switch (versionInfoEntity.getStatus()) {
+ case Locked:
+ if (!user.equals(versionInfoEntity.getCandidate().getUser())) {
+ throw new CoreException(
+ new UndoCheckoutOnEntityLockedByOtherErrorBuilder(entityType, entityId,
+ versionInfoEntity.getCandidate().getUser()).build());
+ }
+ activeVersion = undoCheckout(versionInfoEntity);
+ break;
+ case Final:
+ case Available:
+ throw new CoreException(
+ new UndoCheckoutOnUnlockedEntityErrorBuilder(entityType, entityId).build());
+ default:
+ }
+ return activeVersion;
+ }
+
+ private Version undoCheckout(VersionInfoEntity versionInfoEntity) {
+ deleteVersionFromEntity(versionInfoEntity.getEntityType(), versionInfoEntity.getEntityId(),
+ versionInfoEntity.getCandidate().getVersion());
+
+ versionInfoEntity.setStatus(versionInfoEntity.getActiveVersion().isFinal() ? VersionStatus.Final
+ : VersionStatus.Available);
+ versionInfoEntity.setCandidate(null);
+ versionInfoDao.update(versionInfoEntity);
+ return versionInfoEntity.getActiveVersion();
+ }
+
+ @Override
+ public Version checkin(String entityType, String entityId, String user,
+ String checkinDescription) {
+ VersionInfoEntity versionInfoEntity =
+ versionInfoDao.get(new VersionInfoEntity(entityType, entityId));
+ if (versionInfoEntity == null) {
+ throw new CoreException(new EntityNotExistErrorBuilder(entityType, entityId).build());
+ }
+
+ Version checkedInVersion = null;
+ switch (versionInfoEntity.getStatus()) {
+ case Available:
+ case Final:
+ throw new CoreException(
+ new CheckinOnUnlockedEntityErrorBuilder(entityType, entityId).build());
+ case Locked:
+ if (!user.equals(versionInfoEntity.getCandidate().getUser())) {
+ throw new CoreException(new CheckinOnEntityLockedByOtherErrorBuilder(entityType, entityId,
+ versionInfoEntity.getCandidate().getUser()).build());
+ }
+ checkedInVersion = doCheckin(versionInfoEntity, checkinDescription);
+ break;
+ default:
+ }
+ return checkedInVersion;
+ }
+
+ @Override
+ public Version submit(String entityType, String entityId, String user, String submitDescription) {
+ VersionInfoEntity versionInfoEntity =
+ versionInfoDao.get(new VersionInfoEntity(entityType, entityId));
+ if (versionInfoEntity == null) {
+ throw new CoreException(new EntityNotExistErrorBuilder(entityType, entityId).build());
+ }
+
+ Version submitVersion = null;
+ switch (versionInfoEntity.getStatus()) {
+ case Final:
+ throw new CoreException(
+ new EntityAlreadyFinalizedErrorBuilder(entityType, entityId).build());
+ case Locked:
+ throw new CoreException(new SubmitLockedEntityNotAllowedErrorBuilder(entityType, entityId,
+ versionInfoEntity.getCandidate().getUser()).build());
+ case Available:
+ submitVersion = doSubmit(versionInfoEntity, user, submitDescription);
+ break;
+ default:
+ }
+ return submitVersion;
+ }
+
+ @Override
+ public VersionInfo getEntityVersionInfo(String entityType, String entityId, String user,
+ VersionableEntityAction action) {
+ VersionInfoEntity versionInfoEntity =
+ versionInfoDao.get(new VersionInfoEntity(entityType, entityId));
+ if (versionInfoEntity == null) {
+ throw new CoreException(new EntityNotExistErrorBuilder(entityType, entityId).build());
+ }
+ return getVersionInfo(versionInfoEntity, user, action);
+ }
+
+ @Override
+ public Map<String, VersionInfo> listEntitiesVersionInfo(String entityType, String user,
+ VersionableEntityAction action) {
+ Collection<VersionInfoEntity> versionInfoEntities =
+ versionInfoDao.list(new VersionInfoEntity(entityType, null));
+ Map<String, VersionInfo> activeVersions = new HashMap<>();
+ for (VersionInfoEntity versionInfoEntity : versionInfoEntities) {
+ activeVersions
+ .put(versionInfoEntity.getEntityId(), getVersionInfo(versionInfoEntity, user, action));
+ }
+ return activeVersions;
+ }
+
+ @Override
+ public Map<String, VersionInfo> listDeletedEntitiesVersionInfo(String entityType, String user,
+ VersionableEntityAction action) {
+ Collection<VersionInfoDeletedEntity> versionInfoDeletedEntities =
+ versionInfoDeletedDao.list(new VersionInfoDeletedEntity(entityType, null));
+ Map<String, VersionInfo> activeVersions = new HashMap<>();
+
+
+ for (VersionInfoDeletedEntity versionInfoDeletedEntity : versionInfoDeletedEntities) {
+ activeVersions.put(versionInfoDeletedEntity.getEntityId(),
+ getVersionInfo(versionInfoDeletedEntity, user, action));
+ }
+ return activeVersions;
+ }
+
+ @Override
+ public void delete(String entityType, String entityId, String user) {
+ VersionInfoEntity versionInfoEntity =
+ versionInfoDao.get(new VersionInfoEntity(entityType, entityId));
+ if (versionInfoEntity == null) {
+ throw new CoreException(new EntityNotExistErrorBuilder(entityType, entityId).build());
+ }
+
+ switch (versionInfoEntity.getStatus()) {
+ case Locked:
+ throw new CoreException(new DeleteOnLockedEntityErrorBuilder(entityType, entityId,
+ versionInfoEntity.getCandidate().getUser()).build());
+ default:
+ }
+
+ doDelete(versionInfoEntity, user);
+ }
+
+ @Override
+ public void undoDelete(String entityType, String entityId, String user) {
+ VersionInfoDeletedEntity versionInfoDeletedEntity =
+ versionInfoDeletedDao.get(new VersionInfoDeletedEntity(entityType, entityId));
+ if (versionInfoDeletedEntity == null) {
+ throw new CoreException(new EntityNotExistErrorBuilder(entityType, entityId).build());
+ }
+
+ doUndoDelete(versionInfoDeletedEntity, user);
+ }
+
+ private void markAsCheckedOut(VersionInfoEntity versionInfoEntity, String checkingOutUser) {
+ versionInfoEntity.setStatus(VersionStatus.Locked);
+ versionInfoEntity.setCandidate(new UserCandidateVersion(checkingOutUser,
+ versionInfoEntity.getActiveVersion().calculateNextCandidate()));
+ }
+
+ private Version doCheckout(VersionInfoEntity versionInfoEntity, String user) {
+ markAsCheckedOut(versionInfoEntity, user);
+ versionInfoDao.update(versionInfoEntity);
+
+ initVersionOnEntity(versionInfoEntity.getEntityType(), versionInfoEntity.getEntityId(),
+ versionInfoEntity.getActiveVersion(), versionInfoEntity.getCandidate().getVersion());
+
+ return versionInfoEntity.getCandidate().getVersion();
+ }
+
+ private void doDelete(VersionInfoEntity versionInfoEntity, String user) {
+
+ VersionInfoDeletedEntity versionInfoDeletedEntity = new VersionInfoDeletedEntity();
+ versionInfoDeletedEntity.setStatus(versionInfoEntity.getStatus());
+ versionInfoDeletedEntity.setViewableVersions(versionInfoEntity.getViewableVersions());
+ versionInfoDeletedEntity.setActiveVersion(versionInfoEntity.getActiveVersion());
+ versionInfoDeletedEntity.setCandidate(versionInfoEntity.getCandidate());
+ versionInfoDeletedEntity.setEntityId(versionInfoEntity.getEntityId());
+ versionInfoDeletedEntity.setEntityType(versionInfoEntity.getEntityType());
+ versionInfoDeletedEntity.setLatestFinalVersion(versionInfoEntity.getLatestFinalVersion());
+ versionInfoDeletedDao.create(versionInfoDeletedEntity);
+ versionInfoDao.delete(versionInfoEntity);
+
+ }
+
+ private void doUndoDelete(VersionInfoDeletedEntity versionInfoDeletedEntity, String user) {
+
+ VersionInfoEntity versionInfoEntity = new VersionInfoEntity();
+ versionInfoEntity.setStatus(versionInfoDeletedEntity.getStatus());
+ versionInfoEntity.setViewableVersions(versionInfoDeletedEntity.getViewableVersions());
+ versionInfoEntity.setActiveVersion(versionInfoDeletedEntity.getActiveVersion());
+ versionInfoEntity.setCandidate(versionInfoDeletedEntity.getCandidate());
+ versionInfoEntity.setEntityId(versionInfoDeletedEntity.getEntityId());
+ versionInfoEntity.setEntityType(versionInfoDeletedEntity.getEntityType());
+ versionInfoEntity.setLatestFinalVersion(versionInfoDeletedEntity.getLatestFinalVersion());
+ versionInfoDao.create(versionInfoEntity);
+ versionInfoDeletedDao.delete(versionInfoDeletedEntity);
+
+ }
+
+ private Version doCheckin(VersionInfoEntity versionInfoEntity, String checkinDescription) {
+ UserCandidateVersion userCandidateVersion = versionInfoEntity.getCandidate();
+ versionInfoEntity.setCandidate(null);
+ versionInfoEntity.setActiveVersion(userCandidateVersion.getVersion());
+ versionInfoEntity.getViewableVersions().add(versionInfoEntity.getActiveVersion());
+ versionInfoEntity.setStatus(VersionStatus.Available);
+ versionInfoDao.update(versionInfoEntity);
+
+ return versionInfoEntity.getActiveVersion();
+ }
+
+ private Version doSubmit(VersionInfoEntity versionInfoEntity, String submittingUser,
+ String submitDescription) {
+ Version finalVersion = versionInfoEntity.getActiveVersion().calculateNextFinal();
+ initVersionOnEntity(versionInfoEntity.getEntityType(), versionInfoEntity.getEntityId(),
+ versionInfoEntity.getActiveVersion(), finalVersion);
+
+ Set<Version> viewableVersions = new HashSet<>();
+ for (Version version : versionInfoEntity.getViewableVersions()) {
+ if (version.isFinal()) {
+ viewableVersions.add(version);
+ }
+ }
+ viewableVersions.add(finalVersion);
+ versionInfoEntity.setViewableVersions(viewableVersions);
+ versionInfoEntity.setActiveVersion(finalVersion);
+ versionInfoEntity.setLatestFinalVersion(finalVersion);
+ versionInfoEntity.setStatus(VersionStatus.Final);
+ versionInfoDao.update(versionInfoEntity);
+
+ return finalVersion;
+ }
+
+ private void createVersionHistory(VersionableEntityId entityId, Version version, String user,
+ String description, VersionType type) {
+ VersionHistoryEntity versionHistory = new VersionHistoryEntity(entityId);
+ versionHistory.setVersion(version);
+ versionHistory.setUser(user);
+ versionHistory.setDescription(description);
+ versionHistory.setType(type);
+ }
+
+ private void initVersionOnEntity(String entityType, String entityId, Version baseVersion,
+ Version newVersion) {
+ Set<VersionableEntityMetadata> entityMetadatas = versionableEntities.get(entityType);
+ if (entityMetadatas != null) {
+ for (VersionableEntityMetadata entityMetadata : entityMetadatas) {
+ versionableEntityDao.initVersion(entityMetadata, entityId, baseVersion, newVersion);
+ }
+ }
+ }
+
+ private void deleteVersionFromEntity(String entityType, String entityId,
+ Version versionToDelete) {
+ Set<VersionableEntityMetadata> entityMetadatas = versionableEntities.get(entityType);
+ if (entityMetadatas != null) {
+ for (VersionableEntityMetadata entityMetadata : entityMetadatas) {
+ versionableEntityDao.deleteVersion(entityMetadata, entityId, versionToDelete);
+ }
+ }
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/java/org/openecomp/sdc/versioning/VersioningManagerTest.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/java/org/openecomp/sdc/versioning/VersioningManagerTest.java
new file mode 100644
index 0000000000..3695f9ef2d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/java/org/openecomp/sdc/versioning/VersioningManagerTest.java
@@ -0,0 +1,364 @@
+package org.openecomp.sdc.versioning;
+
+
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.versioning.dao.VersionInfoDao;
+import org.openecomp.sdc.versioning.dao.VersionInfoDaoFactory;
+import org.openecomp.sdc.versioning.dao.VersionInfoDeletedDao;
+import org.openecomp.sdc.versioning.dao.VersionInfoDeletedDaoFactory;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.dao.types.VersionInfoDeletedEntity;
+import org.openecomp.sdc.versioning.dao.types.VersionInfoEntity;
+import org.openecomp.sdc.versioning.dao.types.VersionStatus;
+import org.openecomp.sdc.versioning.types.VersionInfo;
+import org.openecomp.sdc.versioning.types.VersionableEntityAction;
+import org.openecomp.sdc.versioning.types.VersionableEntityMetadata;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import com.datastax.driver.core.ResultSet;
+import com.datastax.driver.mapping.UDTMapper;
+
+import org.testng.Assert;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+public class VersioningManagerTest {
+ private static final VersioningManager versioningManager =
+ VersioningManagerFactory.getInstance().createInterface();
+ private static final VersionInfoDao versionInfoDao =
+ VersionInfoDaoFactory.getInstance().createInterface();
+ private static final VersionInfoDeletedDao versionInfoDeletedDao =
+ VersionInfoDeletedDaoFactory.getInstance().createInterface();
+ private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+ private static final String USR1 = "usr1";
+ private static final String USR2 = "usr2";
+ private static final String USR3 = "usr3";
+ private static final String TYPE1 = "Type1";
+ private static final String TYPE2 = "Type2";
+ private static final String ID1 = "Id1";
+ private static final String ID2 = "Id2";
+ private static final String ID3 = "Id3";
+ private static final String TYPE1_TABLE_NAME = "vendor_license_model";
+ private static final String TYPE1_ID_NAME = "vlm_id";
+ private static final String TYPE1_VERSION_NAME = "version";
+ private static final String TYPE2_TABLE_NAME = "feature_group";
+ private static final String TYPE2_ID_NAME = "vlm_id";
+ private static final String TYPE2_VERSION_NAME = "version";
+ private static final Version VERSION01 = new Version(0, 1);
+ private static final Version VERSION02 = new Version(0, 2);
+ private static final Version VERSION10 = new Version(1, 0);
+ private static final Version VERSION11 = new Version(1, 1);
+ private static UDTMapper<Version> versionMapper =
+ noSqlDb.getMappingManager().udtMapper(Version.class);
+ private static Set<Version> expectedViewableVersionsType1Id1 = new HashSet<>();
+
+ private static void assretVersionInfoEntity(VersionInfoEntity actual, String entityType,
+ String entityId, Version activeVersion,
+ Version candidateVersion, String candidateUser,
+ VersionStatus status, Set<Version> viewbleVersions,
+ Version latestFinalVersion) {
+ Assert.assertNotNull(actual);
+ Assert.assertEquals(actual.getEntityType(), entityType);
+ Assert.assertEquals(actual.getEntityId(), entityId);
+ Assert.assertEquals(actual.getActiveVersion(), activeVersion);
+ if (candidateVersion != null && candidateUser != null) {
+ Assert.assertEquals(actual.getCandidate().getVersion(), candidateVersion);
+ Assert.assertEquals(actual.getCandidate().getUser(), candidateUser);
+ } else {
+ Assert.assertNull(actual.getCandidate());
+ }
+ Assert.assertEquals(actual.getStatus(), status);
+ Assert.assertEquals(actual.getViewableVersions().size(), viewbleVersions.size());
+ Assert.assertEquals(actual.getViewableVersions(), viewbleVersions);
+ Assert.assertEquals(actual.getLatestFinalVersion(), latestFinalVersion);
+ }
+
+ private static void assretVersionInfo(VersionInfo actual, Version activeVersion,
+ VersionStatus status, String lockingUser,
+ Set<Version> viewableVersions, Version latestFinalVersion) {
+ Assert.assertNotNull(actual);
+ Assert.assertEquals(actual.getActiveVersion(), activeVersion);
+ Assert.assertEquals(actual.getStatus(), status);
+ Assert.assertEquals(actual.getLockingUser(), lockingUser);
+ Assert.assertEquals(actual.getViewableVersions().size(), viewableVersions.size());
+ Assert.assertEquals(actual.getViewableVersions(), viewableVersions);
+ Assert.assertEquals(actual.getLatestFinalVersion(), latestFinalVersion);
+ }
+
+// @BeforeClass
+ private void init() {
+ versionInfoDao.delete(new VersionInfoEntity(TYPE1, ID1));
+ versionInfoDao.delete(new VersionInfoEntity(TYPE1, ID2));
+ versionInfoDao.delete(new VersionInfoEntity(TYPE2, ID3));
+ String deleteFromType1 = String
+ .format("delete from %s where %s=? and %s=?", TYPE1_TABLE_NAME, TYPE1_ID_NAME,
+ TYPE1_VERSION_NAME);
+ noSqlDb.execute(deleteFromType1, ID1, versionMapper.toUDT(VERSION01));
+ noSqlDb.execute(deleteFromType1, ID1, versionMapper.toUDT(VERSION02));
+ noSqlDb.execute(deleteFromType1, ID1, versionMapper.toUDT(VERSION11));
+
+ versioningManager.register(TYPE1,
+ new VersionableEntityMetadata(TYPE1_TABLE_NAME, TYPE1_ID_NAME, TYPE1_VERSION_NAME));
+ versioningManager.register(TYPE2,
+ new VersionableEntityMetadata(TYPE2_TABLE_NAME, TYPE2_ID_NAME, TYPE2_VERSION_NAME));
+ }
+
+// @Test
+ public void createTest() {
+ Version version = versioningManager.create(TYPE1, ID1, USR1);
+ createVersionableEntityRecord(TYPE1_TABLE_NAME, TYPE1_ID_NAME, TYPE1_VERSION_NAME, ID1,
+ version);
+
+ VersionInfoEntity versionInfoEntity = versionInfoDao.get(new VersionInfoEntity(TYPE1, ID1));
+ assretVersionInfoEntity(versionInfoEntity, TYPE1, ID1, new Version(0, 0), VERSION01, USR1,
+ VersionStatus.Locked, expectedViewableVersionsType1Id1, null);
+ }
+
+// @Test(dependsOnMethods = "createTest")
+ public void checkinTest() {
+ Version version = versioningManager.checkin(TYPE1, ID1, USR1, "checkin 0.1");
+ Assert.assertEquals(version, VERSION01);
+
+ VersionInfoEntity versionInfoEntity = versionInfoDao.get(new VersionInfoEntity(TYPE1, ID1));
+ expectedViewableVersionsType1Id1.add(VERSION01);
+ assretVersionInfoEntity(versionInfoEntity, TYPE1, ID1, VERSION01, null, null,
+ VersionStatus.Available, expectedViewableVersionsType1Id1, null);
+ }
+
+// @Test(dependsOnMethods = "checkinTest")
+ public void getVersionInfoForReadOnAvailableTest() {
+ VersionInfo versionInfo =
+ versioningManager.getEntityVersionInfo(TYPE1, ID1, USR2, VersionableEntityAction.Read);
+ assretVersionInfo(versionInfo, VERSION01, VersionStatus.Available, null,
+ expectedViewableVersionsType1Id1, null);
+ }
+
+// @Test(dependsOnMethods = "getVersionInfoForReadOnAvailableTest",
+// expectedExceptions = CoreException.class)
+ public void getVersionInfoForWriteOnAvailableTest() {
+ versioningManager.getEntityVersionInfo(TYPE1, ID1, USR2, VersionableEntityAction.Write);
+ }
+
+// @Test(dependsOnMethods = "getVersionInfoForWriteOnAvailableTest",
+// expectedExceptions = CoreException.class)
+ public void checkinOnAvailableTest() {
+ versioningManager.checkin(TYPE1, ID1, USR1, "fail checkin");
+ }
+
+// @Test(dependsOnMethods = "checkinOnAvailableTest", expectedExceptions = CoreException.class)
+ public void undoCheckoutOnAvailableTest() {
+ versioningManager.undoCheckout(TYPE1, ID1, USR1);
+ }
+
+// @Test(dependsOnMethods = "undoCheckoutOnAvailableTest")
+ public void checkoutTest() {
+ Version version = versioningManager.checkout(TYPE1, ID1, USR2);
+ Assert.assertEquals(version, VERSION02);
+
+ VersionInfoEntity versionInfoEntity = versionInfoDao.get(new VersionInfoEntity(TYPE1, ID1));
+ assretVersionInfoEntity(versionInfoEntity, TYPE1, ID1, VERSION01, VERSION02, USR2,
+ VersionStatus.Locked, expectedViewableVersionsType1Id1, null);
+
+ ResultSet results =
+ loadVersionableEntityRecord(TYPE1_TABLE_NAME, TYPE1_ID_NAME, TYPE1_VERSION_NAME, ID1,
+ VERSION02);
+ Assert.assertTrue(results.iterator().hasNext());
+ }
+
+// @Test(dependsOnMethods = "checkoutTest")
+ public void getVersionInfoForReadOnLockedSameUserTest() {
+ VersionInfo versionInfo =
+ versioningManager.getEntityVersionInfo(TYPE1, ID1, USR2, VersionableEntityAction.Read);
+ Set<Version> expectedViewableVersions = new HashSet<>();
+ expectedViewableVersions.addAll(expectedViewableVersionsType1Id1);
+ expectedViewableVersions.add(VERSION02);
+ assretVersionInfo(versionInfo, VERSION02, VersionStatus.Locked, USR2, expectedViewableVersions,
+ null);
+ }
+
+// @Test(dependsOnMethods = "getVersionInfoForReadOnLockedSameUserTest")
+ public void getVersionInfoForReadOnLockedOtherUserTest() {
+ VersionInfo entityVersionInfo =
+ versioningManager.getEntityVersionInfo(TYPE1, ID1, USR1, VersionableEntityAction.Read);
+ Assert.assertEquals(entityVersionInfo.getActiveVersion(), VERSION01);
+ }
+
+// @Test(dependsOnMethods = "getVersionInfoForReadOnLockedOtherUserTest",
+// expectedExceptions = CoreException.class)
+ public void getVersionInfoForWriteOnLockedOtherUserTest() {
+ versioningManager.getEntityVersionInfo(TYPE1, ID1, USR1, VersionableEntityAction.Write)
+ .getActiveVersion();
+ }
+
+// @Test(dependsOnMethods = "getVersionInfoForWriteOnLockedOtherUserTest")
+ public void getVersionInfoForWriteOnLockedSameUserTest() {
+ Version activeVersion =
+ versioningManager.getEntityVersionInfo(TYPE1, ID1, USR2, VersionableEntityAction.Write)
+ .getActiveVersion();
+ Assert.assertEquals(activeVersion, VERSION02);
+ }
+
+// @Test(dependsOnMethods = "getVersionInfoForWriteOnLockedSameUserTest",
+// expectedExceptions = CoreException.class)
+ public void checkoutOnLockedSameUserTest() {
+ versioningManager.checkout(TYPE1, ID1, USR2);
+ }
+
+// @Test(dependsOnMethods = "checkoutOnLockedSameUserTest", expectedExceptions = CoreException.class)
+ public void checkoutOnLockedOtherUserTest() {
+ versioningManager.checkout(TYPE1, ID1, USR1);
+ }
+
+// @Test(dependsOnMethods = "checkoutOnLockedSameUserTest", expectedExceptions = CoreException.class)
+ public void undoCheckoutOnLockedOtherUserTest() {
+ versioningManager.undoCheckout(TYPE1, ID1, USR1);
+ }
+
+// @Test(dependsOnMethods = "undoCheckoutOnLockedOtherUserTest",
+// expectedExceptions = CoreException.class)
+ public void submitOnLockedTest() {
+ versioningManager.submit(TYPE1, ID1, USR2, "failed submit");
+ }
+
+// @Test(dependsOnMethods = "submitOnLockedTest")
+ public void undoCheckoutTest() {
+ Version version = versioningManager.undoCheckout(TYPE1, ID1, USR2);
+ Assert.assertEquals(version, VERSION01);
+
+ VersionInfoEntity versionInfoEntity = versionInfoDao.get(new VersionInfoEntity(TYPE1, ID1));
+ assretVersionInfoEntity(versionInfoEntity, TYPE1, ID1, VERSION01, null, null,
+ VersionStatus.Available, expectedViewableVersionsType1Id1, null);
+
+ ResultSet results =
+ loadVersionableEntityRecord(TYPE1_TABLE_NAME, TYPE1_ID_NAME, TYPE1_VERSION_NAME, ID1,
+ VERSION02);
+ Assert.assertFalse(results.iterator().hasNext());
+ }
+
+// @Test(dependsOnMethods = "undoCheckoutTest")
+ public void submitTest() {
+ Version version = versioningManager.submit(TYPE1, ID1, USR3, "submit msg");
+ Assert.assertEquals(version, VERSION10);
+ expectedViewableVersionsType1Id1 = new HashSet<>();
+ expectedViewableVersionsType1Id1.add(version);
+
+ VersionInfoEntity versionInfoEntity = versionInfoDao.get(new VersionInfoEntity(TYPE1, ID1));
+ assretVersionInfoEntity(versionInfoEntity, TYPE1, ID1, VERSION10, null, null,
+ VersionStatus.Final, expectedViewableVersionsType1Id1, VERSION10);
+
+ ResultSet results =
+ loadVersionableEntityRecord(TYPE1_TABLE_NAME, TYPE1_ID_NAME, TYPE1_VERSION_NAME, ID1,
+ VERSION10);
+ Assert.assertTrue(results.iterator().hasNext());
+ }
+
+// @Test(dependsOnMethods = "submitTest", expectedExceptions = CoreException.class)
+ public void checkinOnFinalizedTest() {
+ versioningManager.checkin(TYPE1, ID1, USR2, "failed checkin");
+ }
+
+// @Test(dependsOnMethods = "checkinOnFinalizedTest", expectedExceptions = CoreException.class)
+ public void undoCheckouOnFinalizedTest() {
+ versioningManager.undoCheckout(TYPE1, ID1, USR2);
+ }
+
+// @Test(dependsOnMethods = "undoCheckouOnFinalizedTest", expectedExceptions = CoreException.class)
+ public void submitOnFinalizedTest() {
+ versioningManager.submit(TYPE1, ID1, USR2, "failed submit");
+ }
+
+// @Test(dependsOnMethods = "submitOnFinalizedTest")
+ public void checkoutOnFinalizedTest() {
+ Version version = versioningManager.checkout(TYPE1, ID1, USR3);
+ Assert.assertEquals(version, VERSION11);
+
+ VersionInfoEntity versionInfoEntity = versionInfoDao.get(new VersionInfoEntity(TYPE1, ID1));
+ assretVersionInfoEntity(versionInfoEntity, TYPE1, ID1, VERSION10, VERSION11, USR3,
+ VersionStatus.Locked, expectedViewableVersionsType1Id1, VERSION10);
+
+ ResultSet results =
+ loadVersionableEntityRecord(TYPE1_TABLE_NAME, TYPE1_ID_NAME, TYPE1_VERSION_NAME, ID1,
+ VERSION11);
+ Assert.assertTrue(results.iterator().hasNext());
+ }
+
+// @Test(dependsOnMethods = "checkoutOnFinalizedTest")
+ public void viewableVersionsTest() {
+ versioningManager.checkin(TYPE1, ID1, USR3, "check in 1.1");
+ versioningManager.checkout(TYPE1, ID1, USR3);
+ versioningManager.checkin(TYPE1, ID1, USR3, "check in 1.2");
+ versioningManager.submit(TYPE1, ID1, USR3, "submit in 2.0");
+ versioningManager.checkout(TYPE1, ID1, USR3);
+ versioningManager.checkin(TYPE1, ID1, USR3, "check in 2.1");
+ versioningManager.submit(TYPE1, ID1, USR3, "submit in 3.0");
+ versioningManager.checkout(TYPE1, ID1, USR3);
+ versioningManager.checkin(TYPE1, ID1, USR3, "check in 3.1");
+ versioningManager.checkout(TYPE1, ID1, USR3);
+ versioningManager.checkin(TYPE1, ID1, USR3, "check in 3.2");
+ versioningManager.checkout(TYPE1, ID1, USR2);
+
+ VersionInfoEntity versionInfoEntity = versionInfoDao.get(new VersionInfoEntity(TYPE1, ID1));
+ HashSet<Version> expectedViewableVersions = new HashSet<>();
+ expectedViewableVersions.add(VERSION10);
+ expectedViewableVersions.add(new Version(2, 0));
+ expectedViewableVersions.add(new Version(3, 0));
+ expectedViewableVersions.add(new Version(3, 1));
+ expectedViewableVersions.add(new Version(3, 2));
+ assretVersionInfoEntity(versionInfoEntity, TYPE1, ID1, new Version(3, 2), new Version(3, 3),
+ USR2, VersionStatus.Locked, expectedViewableVersions, new Version(3, 0));
+ }
+
+// @Test(dependsOnMethods = "viewableVersionsTest")
+ public void listActiveVersionsTest() {
+ versioningManager.create(TYPE1, ID2, USR3);
+ versioningManager.checkin(TYPE1, ID2, USR3, "check in 0.1");
+
+ versioningManager.create(TYPE2, ID3, USR3);
+ versioningManager.checkin(TYPE2, ID3, USR3, "check in 0.1");
+
+ Map<String, VersionInfo> idToVersionInfo =
+ versioningManager.listEntitiesVersionInfo(TYPE1, USR2, VersionableEntityAction.Read);
+ Assert.assertEquals(idToVersionInfo.size(), 2);
+ Assert.assertEquals(idToVersionInfo.get(ID1).getActiveVersion(), new Version(3, 3));
+ Assert.assertEquals(idToVersionInfo.get(ID2).getActiveVersion(), VERSION01);
+ }
+
+// @Test(dependsOnMethods = "listActiveVersionsTest")
+ public void deleteTest() {
+ versioningManager.checkin(TYPE1, ID1, USR2, "check in for delete");
+ versioningManager.delete(TYPE1, ID1, USR1);
+
+ VersionInfoDeletedEntity versionInfoDeletedEntity =
+ versionInfoDeletedDao.get(new VersionInfoDeletedEntity(TYPE1, ID1));
+ Assert.assertNotNull(versionInfoDeletedEntity);
+
+ Map<String, VersionInfo> entitiesInfoMap =
+ versioningManager.listDeletedEntitiesVersionInfo(TYPE1, USR2, null);
+ Assert.assertEquals(entitiesInfoMap.size(), 1);
+ VersionInfoEntity versionInfoEntity = versionInfoDao.get(new VersionInfoEntity(TYPE1, ID1));
+ Assert.assertNull(versionInfoEntity);
+ versioningManager.undoDelete(TYPE1, ID1, USR1);
+ versionInfoEntity = versionInfoDao.get(new VersionInfoEntity(TYPE1, ID1));
+ Assert.assertNotNull(versionInfoEntity);
+
+
+ }
+
+ private void createVersionableEntityRecord(String tableName, String idName, String versionName,
+ String id, Version version) {
+ noSqlDb.execute(
+ String.format("insert into %s (%s,%s) values (?,?)", tableName, idName, versionName), id,
+ versionMapper.toUDT(version));
+ }
+
+ private ResultSet loadVersionableEntityRecord(String tableName, String idName, String versionName,
+ String id, Version version) {
+ return noSqlDb.execute(
+ String.format("select * from %s where %s=? and %s=?", tableName, idName, versionName), id,
+ versionMapper.toUDT(version));
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/pom.xml b/openecomp-be/lib/openecomp-sdc-versioning-lib/pom.xml
new file mode 100644
index 0000000000..b94d9a1cac
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/pom.xml
@@ -0,0 +1,23 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <groupId>org.openecomp.sdc</groupId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>openecomp-sdc-versioning-lib</artifactId>
+ <packaging>pom</packaging>
+ <name>openecomp-sdc-versioning-lib</name>
+
+ <modules>
+ <module>openecomp-sdc-versioning-api</module>
+ <module>openecomp-sdc-versioning-core</module>
+ </modules>
+
+ <dependencies>
+
+ </dependencies>
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-tosca-lib/pom.xml b/openecomp-be/lib/openecomp-tosca-lib/pom.xml
new file mode 100644
index 0000000000..eb67349896
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/pom.xml
@@ -0,0 +1,66 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+
+
+ <parent>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <groupId>org.openecomp.sdc</groupId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-tosca-lib</artifactId>
+ <name>openecomp-tosca-lib</name>
+
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-utilities-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-datatypes-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-common-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <version>1.1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>RELEASE</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <version>1.10.19</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <version>19.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.yaml</groupId>
+ <artifactId>snakeyaml</artifactId>
+ </dependency>
+ </dependencies>
+
+
+
+
+
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaArtifactType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaArtifactType.java
new file mode 100644
index 0000000000..2da60c0b79
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaArtifactType.java
@@ -0,0 +1,39 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes;
+
+
+public enum ToscaArtifactType {
+
+ DEPLOYMENT("tosca.artifacts.Deployment"),;
+
+ private String displayName;
+
+ ToscaArtifactType(String displayName) {
+ this.displayName = displayName;
+ }
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaCapabilityType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaCapabilityType.java
new file mode 100644
index 0000000000..d26eb3a83a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaCapabilityType.java
@@ -0,0 +1,52 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes;
+
+
+public enum ToscaCapabilityType {
+
+ ROOT("tosca.capabilities.Root"),
+ NODE("tosca.capabilities.Node"),
+ CONTAINER("tosca.capabilities.Container"),
+ NETWORK_BINDABLE("tosca.capabilities.network.Bindable"),
+ SCALABLE("tosca.capabilities.Scalable"),
+ OPERATING_SYSTEM("tosca.capabilities.OperatingSystem"),
+ ENDPOINT_ADMIN("tosca.capabilities.Endpoint.Admin"),
+ ATTACHMENT("tosca.capabilities.Attachment"),
+ NETWORK_LINKABLE("tosca.capabilities.network.Linkable"),
+ METRIC("org.openecomp.capabilities.Metric"),
+ NFV_METRIC("tosca.capabilities.nfv.Metric"),
+ METRIC_CEILOMETER("org.openecomp.capabilities.metric.Ceilometer"),
+ METRIC_SNMP_TRAP("org.openecomp.capabilities.metric.SnmpTrap"),
+ METRIC_SNMP_POLLING("org.openecomp.capabilities.metric.SnmpPolling"),;
+
+ private String displayName;
+
+ ToscaCapabilityType(String displayName) {
+ this.displayName = displayName;
+ }
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaDataType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaDataType.java
new file mode 100644
index 0000000000..2a9df65b17
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaDataType.java
@@ -0,0 +1,84 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes;
+
+
+public enum ToscaDataType {
+
+ ROOT("tosca.datatypes.Root"),
+ NETWORK_NETWORK_INFO("tosca.datatypes.network.NetworkInfo"),
+ NETWORK_PORT_INFO("tosca.datatypes.network.PortInfo"),
+ NOVA_SERVER_PORT_EXTRA_PROPERTIES(
+ "org.openecomp.datatypes.heat.novaServer.network.PortExtraProperties"),
+ NETWORK_ADDRESS_PAIR("org.openecomp.datatypes.heat.network.AddressPair"),
+ NEUTRON_PORT_FIXED_IPS("org.openecomp.datatypes.heat.neutron.port.FixedIps"),
+ CONTRAIL_NETWORK_RULE("org.openecomp.datatypes.heat.contrail.network.rule.Rule"),
+ CONTRAIL_NETWORK_RULE_LIST("org.openecomp.datatypes.heat.contrail.network.rule.RuleList"),
+ CONTRAIL_NETWORK_RULE_PORT_PAIRS("org.openecomp.datatypes.heat.contrail.network.rule.PortPairs"),
+ CONTRAIL_NETWORK_RULE_VIRTUAL_NETWORK(
+ "org.openecomp.datatypes.heat.contrail.network.rule.VirtualNetwork"),
+ CONTRAILV2_NETWORK_RULE("org.openecomp.datatypes.heat.contrailV2.network.rule.Rule"),
+ CONTRAILV2_NETWORK_RULE_LIST("org.openecomp.datatypes.heat.contrailV2.network.rule.RuleList"),
+ CONTRAILV2_NETWORK_RULE_SRC_PORT_PAIRS(
+ "org.openecomp.datatypes.heat.contrailV2.network.rule.SrcPortPairs"),
+ CONTRAILV2_NETWORK_RULE_DST_PORT_PAIRS(
+ "org.openecomp.datatypes.heat.contrailV2.network.rule.DstPortPairs"),
+ CONTRAILV2_NETWORK_RULE_DST_VIRTUAL_NETWORK(
+ "org.openecomp.datatypes.heat.contrailV2.network.rule.DstVirtualNetwork"),
+ CONTRAILV2_NETWORK_RULE_SRC_VIRTUAL_NETWORK(
+ "org.openecomp.datatypes.heat.contrailV2.network.rule.SrcVirtualNetwork"),
+ CONTRAILV2_VIRTUAL_MACHINE_INTERFACE_PROPERTIES(
+ "org.openecomp.datatypes.heat.contrailV2.virtual.machine.interface.Properties"),
+ CONTRAILV2_NETWORK_RULE_ACTION_LIST(
+ "org.openecomp.datatypes.heat.contrailV2.network.rule.ActionList"),
+ CONTRAILV2_VIRTUAL_NETWORK_IPAM_REF_DATA(
+ "org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.IpamRefData"),
+ CONTRAILV2_VIRTUAL_NETWORK_IPAM_REF_DATA_IPAM_SUBNET_LIST(
+ "org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.ref.data.IpamSubnetList"),
+ CONTRAILV2_VIRTUAL_NETWORK_IPAM_REF_DATA_IPAM_SUBNET(
+ "org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.ref.data.IpamSubnet"),
+ CONTRAILV2_VIRTUAL_NETWORK_POLICY_REF_DATA(
+ "org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.RefData"),
+ CONTRAILV2_VIRTUAL_NETWORK_POLICY_REF_DATA_SEQUENCE(
+ "org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.RefDataSequence"),
+ NOVA_SERVER_NETWORK_ADDRESS_INFO("org.openecomp.datatypes.heat.novaServer.network.AddressInfo"),
+ NEUTRON_SUBNET("org.openecomp.datatypes.heat.network.neutron.Subnet"),
+ NETWORK_ALLOCATION_POOL("org.openecomp.datatypes.heat.network.AllocationPool"),
+ NETWORK_HOST_ROUTE("org.openecomp.datatypes.heat.network.subnet.HostRoute"),
+ SUBSTITUTION_FILTER("org.openecomp.datatypes.heat.substitution.SubstitutionFilter"),
+ SUBSTITUTION_FILTERING("org.openecomp.datatypes.heat.substitution.SubstitutionFiltering"),
+ NEUTRON_SECURITY_RULES_RULE("org.openecomp.datatypes.heat.network.neutron.SecurityRules.Rule"),
+ CONTRAIL_STATIC_ROUTE("org.openecomp.datatypes.heat.network.contrail.port.StaticRoute"),
+ CONTRAIL_ADDRESS_PAIR("org.openecomp.datatypes.heat.network.contrail.AddressPair"),
+ CONTRAIL_INTERFACE_DATA("org.openecomp.datatypes.heat.network.contrail.InterfaceData");
+
+ private String displayName;
+
+ ToscaDataType(String displayName) {
+ this.displayName = displayName;
+ }
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+
+}
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
new file mode 100644
index 0000000000..97fec7ae7d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaElementTypes.java
@@ -0,0 +1,25 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes;
+
+public enum ToscaElementTypes {
+ CAPABILITY_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
new file mode 100644
index 0000000000..989a1c6178
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaFunctions.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes;
+
+public enum ToscaFunctions {
+
+ TOKEN("token"),
+ GET_PROPERTY("get_property"),
+ GET_ATTRIBUTE("get_attribute"),
+ GET_ARTIFACT("get_artifact"),
+ GET_INPUT("get_input"),
+ CONCAT("concat");
+
+ private String displayName;
+
+ ToscaFunctions(String displayName) {
+ this.displayName = displayName;
+ }
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaGroupType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaGroupType.java
new file mode 100644
index 0000000000..5422fa6dc9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaGroupType.java
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes;
+
+
+public enum ToscaGroupType {
+
+ ROOT("tosca.groups.Root"),
+ HEAT_STACK("org.openecomp.groups.heat.HeatStack"),;
+
+ private String displayName;
+
+ ToscaGroupType(String displayName) {
+ this.displayName = displayName;
+ }
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaNodeType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaNodeType.java
new file mode 100644
index 0000000000..c7c5a6e64e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaNodeType.java
@@ -0,0 +1,162 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes;
+
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+
+/**
+ * The enum Tosca node type.
+ */
+public enum ToscaNodeType {
+
+ /**
+ * Compute tosca node type.
+ */
+ COMPUTE("tosca.nodes.Compute"),
+ /**
+ * Root tosca node type.
+ */
+ ROOT("tosca.nodes.Root"),
+ /**
+ * Block storage tosca node type.
+ */
+ BLOCK_STORAGE("tosca.nodes.BlockStorage"),
+ /**
+ * Network tosca node type.
+ */
+ NETWORK("tosca.nodes.network.Network"),
+ /**
+ * Network port tosca node type.
+ */
+ NETWORK_PORT("tosca.nodes.network.Port"),
+ /**
+ * Nova server tosca node type.
+ */
+ NOVA_SERVER(ToscaConstants.NODES_PREFIX + "nova.Server"),
+ /**
+ * Cinder volume tosca node type.
+ */
+ CINDER_VOLUME(ToscaConstants.NODES_PREFIX + "cinder.Volume"),
+ /**
+ * Neutron net tosca node type.
+ */
+ NEUTRON_NET("org.openecomp.resource.vl.nodes.heat.network.neutron.Net"),
+ /**
+ * Neutron port tosca node type.
+ */
+ NEUTRON_PORT("org.openecomp.resource.cp.nodes.heat.network.neutron.Port"),
+ /**
+ * Neutron security rules tosca node type.
+ */
+ NEUTRON_SECURITY_RULES("org.openecomp.resource.vfc.rules.nodes"
+ + ".heat.network.neutron.SecurityRules"),
+ /**
+ * Contrail virtual network tosca node type.
+ */
+ CONTRAIL_VIRTUAL_NETWORK("org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork"),
+ /**
+ * Contrail network rule tosca node type.
+ */
+ CONTRAIL_NETWORK_RULE("org.openecomp.resource.vfc."
+ + "rules.nodes.heat.network.contrail.NetworkRules"),
+ /**
+ * Contrailv 2 virtual network tosca node type.
+ */
+ CONTRAILV2_VIRTUAL_NETWORK("org.openecomp.resource.vl.nodes."
+ + "heat.network.contrailV2.VirtualNetwork"),
+ /**
+ * Contrailv 2 network rule tosca node type.
+ */
+ CONTRAILV2_NETWORK_RULE(
+ "org.openecomp.resource.vfc.rules.nodes.heat.network.contrailV2.NetworkRules"),
+ /**
+ * Contrailv 2 virtual machine interface tosca node type.
+ */
+ CONTRAILV2_VIRTUAL_MACHINE_INTERFACE(
+ "org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface"),
+ /**
+ * Abstract substitute tosca node type.
+ */
+ ABSTRACT_SUBSTITUTE("org.openecomp.resource.abstract.nodes.AbstractSubstitute"),
+ /**
+ * Contrail compute tosca node type.
+ */
+ CONTRAIL_COMPUTE(ToscaConstants.NODES_PREFIX + "contrail.Compute"),
+ /**
+ * Contrail port tosca node type.
+ */
+ CONTRAIL_PORT("org.openecomp.resource.cp.nodes.heat.network.contrail.Port"),
+ /**
+ * Contrail abstract substitute tosca node type.
+ */
+ CONTRAIL_ABSTRACT_SUBSTITUTE("org.openecomp.resource.abstract."
+ + "nodes.contrail.AbstractSubstitute"),;
+
+ private static final Map<String, ToscaNodeType> mMap =
+ Collections.unmodifiableMap(initializeMapping());
+ private String displayName;
+
+ ToscaNodeType(String displayName) {
+ this.displayName = displayName;
+ }
+
+ /**
+ * Initialize mapping map.
+ *
+ * @return the map
+ */
+ public static Map<String, ToscaNodeType> initializeMapping() {
+ Map<String, ToscaNodeType> toscaMap = new HashMap<>();
+ for (ToscaNodeType v : ToscaNodeType.values()) {
+ toscaMap.put(v.displayName, v);
+ }
+ return toscaMap;
+ }
+
+ /**
+ * Gets tosca node type by display name.
+ *
+ * @param displayName the display name
+ * @return the tosca node type by display name
+ */
+ public static ToscaNodeType getToscaNodeTypeByDisplayName(String displayName) {
+ if (mMap.containsKey(displayName)) {
+ return mMap.get(displayName);
+ }
+ return null;
+ }
+
+ /**
+ * Gets display name.
+ *
+ * @return the display name
+ */
+ public String getDisplayName() {
+ return displayName;
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaPolicyType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaPolicyType.java
new file mode 100644
index 0000000000..38195782d2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaPolicyType.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes;
+
+public enum ToscaPolicyType {
+
+ PLACEMENT("tosca.policy.placement"),
+ PLACEMENT_ANTILOCATE("org.openecomp.policies.placement.Antilocate"),
+ PLACEMENT_COLOCATE("org.openecomp.policies.placement.Colocate"),
+ PLACEMENT_VALET_AFFINITY("org.openecomp.policies.placement.valet.Affinity"),
+ PLACEMENT_VALET_EXCLUSIVITY("org.openecomp.policies.placement.valet.Exclusivity"),
+ PLACEMENT_VALET_DIVERSITY("org.openecomp.policies.placement.valet.Diversity");
+
+ private String displayName;
+
+ ToscaPolicyType(String displayName) {
+ this.displayName = displayName;
+ }
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaRelationshipType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaRelationshipType.java
new file mode 100644
index 0000000000..03a35bd4d0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaRelationshipType.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes;
+
+public enum ToscaRelationshipType {
+
+ ROOT("tosca.relationships.Root"),
+ NATIVE_ATTACHES_TO("tosca.relationships.AttachesTo"),
+ DEPENDS_ON("tosca.relationships.DependsOn"),
+ NETWORK_LINK_TO("tosca.relationships.network.LinksTo"),
+ NETWORK_BINDS_TO("tosca.relationships.network.BindsTo"),
+ CINDER_VOLUME_ATTACHES_TO("org.openecomp.relationships.heat.cinder.VolumeAttachesTo"),
+ ATTACHES_TO("org.openecomp.relationships.AttachesTo"),;
+
+ private String displayName;
+
+ ToscaRelationshipType(String displayName) {
+ this.displayName = displayName;
+ }
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaServiceModel.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaServiceModel.java
new file mode 100644
index 0000000000..70b23ae3f6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaServiceModel.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes;
+
+import org.openecomp.core.utilities.file.FileContentHandler;
+import org.openecomp.sdc.datatypes.model.AsdcModel;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+
+import java.util.Collections;
+import java.util.Map;
+
+public class ToscaServiceModel implements AsdcModel {
+ private FileContentHandler artifactFiles;
+ private Map<String, ServiceTemplate> serviceTemplates;
+ private String entryDefinitionServiceTemplate;
+
+ /**
+ * Instantiates a new Tosca service model.
+ *
+ * @param artifactFiles the artifact files
+ * @param serviceTemplates the service templates
+ * @param entryDefinitionServiceTemplate the entry definition service template
+ */
+ public ToscaServiceModel(FileContentHandler artifactFiles,
+ Map<String, ServiceTemplate> serviceTemplates,
+ String entryDefinitionServiceTemplate) {
+ this.artifactFiles = artifactFiles;
+ this.serviceTemplates = serviceTemplates;
+ this.entryDefinitionServiceTemplate = entryDefinitionServiceTemplate;
+ }
+
+
+ public FileContentHandler getArtifactFiles() {
+ return artifactFiles;//MapUtils.isEmpty(artifactFiles) ? Collections.EMPTY_MAP
+ // : Collections.unmodifiableMap(artifactFiles);
+ }
+
+
+ public Map<String, ServiceTemplate> getServiceTemplates() {
+ return Collections.unmodifiableMap(serviceTemplates);
+ }
+
+ public void setServiceTemplates(Map<String, ServiceTemplate> serviceTemplates) {
+ this.serviceTemplates = serviceTemplates;
+ }
+
+ public String getEntryDefinitionServiceTemplate() {
+ return entryDefinitionServiceTemplate;
+ }
+
+ public void setEntryDefinitionServiceTemplate(String entryDefinitionServiceTemplate) {
+ this.entryDefinitionServiceTemplate = entryDefinitionServiceTemplate;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ArtifactDefinition.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ArtifactDefinition.java
new file mode 100644
index 0000000000..8461fef85f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ArtifactDefinition.java
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+public class ArtifactDefinition {
+ private String type;
+ private String file;
+ private String repository;
+ private String description;
+ private String deploy_path;
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getFile() {
+ return file;
+ }
+
+ public void setFile(String file) {
+ this.file = file;
+ }
+
+ public String getRepository() {
+ return repository;
+ }
+
+ public void setRepository(String repository) {
+ this.repository = repository;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getDeploy_path() {
+ return deploy_path;
+ }
+
+ public void setDeploy_path(String deployPath) {
+ this.deploy_path = deployPath;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ArtifactType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ArtifactType.java
new file mode 100644
index 0000000000..80580e97f3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ArtifactType.java
@@ -0,0 +1,83 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import java.util.List;
+import java.util.Map;
+
+public class ArtifactType {
+
+ private String derived_from;
+ private String version;
+ private String description;
+ private String mime_type;
+ private List<String> file_ext;
+ private Map<String, PropertyDefinition> properties;
+
+
+ public String getDerived_from() {
+ return derived_from;
+ }
+
+ public void setDerived_from(String derivedFrom) {
+ this.derived_from = derivedFrom;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getMime_type() {
+ return mime_type;
+ }
+
+ public void setMime_type(String mimeType) {
+ this.mime_type = mimeType;
+ }
+
+ public List<String> getFile_ext() {
+ return file_ext;
+ }
+
+ public void setFile_ext(List<String> fileExt) {
+ this.file_ext = fileExt;
+ }
+
+ public Map<String, PropertyDefinition> getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Map<String, PropertyDefinition> properties) {
+ this.properties = properties;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/AttributeDefinition.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/AttributeDefinition.java
new file mode 100644
index 0000000000..13c93a283d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/AttributeDefinition.java
@@ -0,0 +1,85 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+public class AttributeDefinition {
+
+ private String type;
+ private String description;
+ private Object _default;
+ private Status status;
+ private EntrySchema entry_schema;
+
+ public AttributeDefinition() {
+ status = Status.SUPPORTED;
+ }
+
+ public EntrySchema getEntry_schema() {
+ return entry_schema;
+ }
+
+ public void setEntry_schema(EntrySchema entrySchema) {
+ this.entry_schema = entrySchema;
+ }
+
+ public Status getStatus() {
+ return status;
+ }
+
+ public void setStatus(Status status) {
+ this.status = status;
+ }
+
+ public Object get_default() {
+ return _default;
+ }
+
+ public void set_default(Object defaultValue) {
+ this._default = defaultValue;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ @Override
+ public AttributeDefinition clone() {
+ AttributeDefinition attributeDefinition = new AttributeDefinition();
+ attributeDefinition.setType(this.getType());
+ attributeDefinition.setDescription(this.getDescription());
+ attributeDefinition.set_default(this.get_default());
+ attributeDefinition.setStatus(this.getStatus());
+ attributeDefinition.setEntry_schema(this.getEntry_schema().clone());
+ return attributeDefinition;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityAssignment.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityAssignment.java
new file mode 100644
index 0000000000..b548f7855c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityAssignment.java
@@ -0,0 +1,45 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import java.util.Map;
+
+public class CapabilityAssignment {
+
+ private Map<String, Object> properties;
+ private Map<String, Object> attributes;
+
+ public Map<String, Object> getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Map<String, Object> properties) {
+ this.properties = properties;
+ }
+
+ public Map<String, Object> getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Map<String, Object> attributes) {
+ this.attributes = attributes;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityDefinition.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityDefinition.java
new file mode 100644
index 0000000000..36dccad6eb
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityDefinition.java
@@ -0,0 +1,113 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+
+import java.util.List;
+import java.util.Map;
+
+public class CapabilityDefinition {
+
+ private String type;
+ private String description;
+ private Map<String, PropertyDefinition> properties;
+ private Map<String, AttributeDefinition> attributes;
+ private List<String> valid_source_types;
+ private Object[] occurrences;
+
+
+ /**
+ * Instantiates a new Capability definition.
+ */
+ public CapabilityDefinition() {
+ occurrences = new Object[2];
+ occurrences[0] = 1;
+ occurrences[1] = ToscaConstants.UNBOUNDED;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Map<String, PropertyDefinition> getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Map<String, PropertyDefinition> properties) {
+ this.properties = properties;
+ }
+
+ public Map<String, AttributeDefinition> getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Map<String, AttributeDefinition> attributes) {
+ this.attributes = attributes;
+ }
+
+ public List<String> getValid_source_types() {
+ return valid_source_types;
+ }
+
+ public void setValid_source_types(List<String> validSourceTypes) {
+ this.valid_source_types = validSourceTypes;
+ }
+
+ public Object[] getOccurrences() {
+ return occurrences;
+ }
+
+ public void setOccurrences(Object[] occurrences) {
+ this.occurrences = occurrences;
+ }
+
+ @Override
+ public CapabilityDefinition clone() {
+ CapabilityDefinition capabilityDefinition = new CapabilityDefinition();
+ capabilityDefinition
+ .setOccurrences(new Object[]{this.getOccurrences()[0], this.getOccurrences()[1]});
+ capabilityDefinition
+ .setProperties(DataModelUtil.clonePropertyDefinitions(this.getProperties()));
+ capabilityDefinition.setType(this.getType());
+ capabilityDefinition
+ .setAttributes(DataModelUtil.cloneAttributeDefinitions(this.getAttributes()));
+ capabilityDefinition.setDescription(this.getDescription());
+ capabilityDefinition
+ .setValid_source_types(DataModelUtil.cloneValidSourceTypes(this.getValid_source_types()));
+ return capabilityDefinition;
+
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityFilterDefinition.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityFilterDefinition.java
new file mode 100644
index 0000000000..3678583384
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityFilterDefinition.java
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import java.util.List;
+
+public class CapabilityFilterDefinition {
+ List<Constraint> properties;
+
+ public List<Constraint> getProperties() {
+ return properties;
+ }
+
+ public void setProperties(List<Constraint> properties) {
+ this.properties = properties;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityType.java
new file mode 100644
index 0000000000..b0281b4ca0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityType.java
@@ -0,0 +1,82 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import java.util.List;
+import java.util.Map;
+
+public class CapabilityType {
+
+ private String derived_from;
+ private String version;
+ private String description;
+ private Map<String, PropertyDefinition> properties;
+ private Map<String, AttributeDefinition> attributes;
+ private List<String> valid_source_types;
+
+ public String getDerived_from() {
+ return derived_from;
+ }
+
+ public void setDerived_from(String derivedFrom) {
+ this.derived_from = derivedFrom;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Map<String, PropertyDefinition> getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Map<String, PropertyDefinition> properties) {
+ this.properties = properties;
+ }
+
+ public Map<String, AttributeDefinition> getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Map<String, AttributeDefinition> attributes) {
+ this.attributes = attributes;
+ }
+
+ public List<String> getValid_source_types() {
+ return valid_source_types;
+ }
+
+ public void setValid_source_types(List<String> validSourceTypes) {
+ this.valid_source_types = validSourceTypes;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Constraint.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Constraint.java
new file mode 100644
index 0000000000..2c39ce3902
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Constraint.java
@@ -0,0 +1,181 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class Constraint {
+ private Object equal;
+ private Object greater_or_equal;
+ private Object greater_than;
+ private Object less_than;
+ private Object less_or_equal;
+ private Object[] in_range;
+ private List<Object> valid_values;
+ private Integer length;
+ private Integer min_length;
+ private Integer max_length;
+ private Object pattern;
+
+ public Constraint() {
+ }
+
+ public Object getGreater_or_equal() {
+ return greater_or_equal;
+ }
+
+ public void setGreater_or_equal(Object greaterOrEqual) {
+ this.greater_or_equal = greaterOrEqual;
+ }
+
+ public Object getEqual() {
+ return equal;
+ }
+
+ public void setEqual(Object equal) {
+ this.equal = equal;
+ }
+
+ public Object getGreater_than() {
+ return greater_than;
+ }
+
+ public void setGreater_than(Object greaterThan) {
+ this.greater_than = greaterThan;
+ }
+
+ public Object getLess_than() {
+ return less_than;
+ }
+
+ public void setLess_than(Object lessThan) {
+ this.less_than = lessThan;
+ }
+
+ public Object getLess_or_equal() {
+ return less_or_equal;
+ }
+
+ public void setLess_or_equal(Object lessOrEqual) {
+ this.less_or_equal = lessOrEqual;
+ }
+
+ public Object[] getIn_range() {
+ return in_range;
+ }
+
+ /**
+ * Sets in range.
+ *
+ * @param inRange the in range
+ */
+ public void setIn_range(Object[] inRange) {
+ this.in_range = new Object[2];
+ this.in_range[0] = inRange[0];
+ this.in_range[1] = inRange[1];
+ }
+
+ public List<Object> getValid_values() {
+ return valid_values;
+ }
+
+ public void setValid_values(List<Object> validValues) {
+ this.valid_values = validValues;
+ }
+
+ /**
+ * Add valid value.
+ *
+ * @param validValue the valid value
+ */
+ public void addValidValue(Object validValue) {
+ if (this.valid_values == null) {
+ this.valid_values = new ArrayList<>();
+ }
+ valid_values.add(validValue);
+ }
+
+ public Integer getLength() {
+ return length;
+ }
+
+ public void setLength(Integer length) {
+ this.length = length;
+ }
+
+ public Integer getMin_length() {
+ return min_length;
+ }
+
+ public void setMin_length(Integer minLength) {
+ this.min_length = minLength;
+ }
+
+ public Integer getMax_length() {
+ return max_length;
+ }
+
+ public void setMax_length(Integer maxLength) {
+ this.max_length = maxLength;
+ }
+
+ public Object getPattern() {
+ return pattern;
+ }
+
+ public void setPattern(Object pattern) {
+ this.pattern = pattern;
+ }
+
+ @Override
+ public Constraint clone() {
+ Constraint constraint = new Constraint();
+ constraint.setEqual(this.getEqual());
+ constraint.setGreater_or_equal(this.getGreater_or_equal());
+ constraint.setGreater_than(this.getGreater_than());
+ cloneInRange(constraint);
+ constraint.setLength(this.getLength());
+ constraint.setLess_or_equal(this.getLess_or_equal());
+ constraint.setLess_than(this.getLess_than());
+ constraint.setMax_length(this.getMax_length());
+ constraint.setMin_length(this.getMin_length());
+ constraint.setPattern(this.getPattern());
+ cloneValidValues(constraint);
+
+ return constraint;
+ }
+
+ private void cloneInRange(Constraint constraint) {
+ if (this.getIn_range() != null) {
+ constraint.setIn_range(new Object[]{this.getIn_range()[0], this.getIn_range()[1]});
+ }
+ }
+
+ private void cloneValidValues(Constraint constraint) {
+ if (this.getValid_values() != null) {
+ constraint.setValid_values(new ArrayList<>());
+ for (Object entry : this.getValid_values()) {
+ constraint.getValid_values().add(entry);
+ }
+ }
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/DataType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/DataType.java
new file mode 100644
index 0000000000..866c5774d8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/DataType.java
@@ -0,0 +1,73 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import java.util.List;
+import java.util.Map;
+
+public class DataType {
+
+ private String derived_from;
+ private String version;
+ private String description;
+ private List<Constraint> constraints;
+ private Map<String, PropertyDefinition> properties;
+
+ public String getDerived_from() {
+ return derived_from;
+ }
+
+ public void setDerived_from(String derivedFrom) {
+ this.derived_from = derivedFrom;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public List<Constraint> getConstraints() {
+ return constraints;
+ }
+
+ public void setConstraints(List<Constraint> constraints) {
+ this.constraints = constraints;
+ }
+
+ public Map<String, PropertyDefinition> getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Map<String, PropertyDefinition> properties) {
+ this.properties = properties;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Directive.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Directive.java
new file mode 100644
index 0000000000..078a6449ea
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Directive.java
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+public enum Directive {
+
+
+ SELECTABLE("selectable"),
+ SUBSTITUTABLE("substitutable");
+
+ private String displayName;
+
+ Directive(String displayName) {
+ this.displayName = displayName;
+ }
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/EntrySchema.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/EntrySchema.java
new file mode 100644
index 0000000000..8b08e54c01
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/EntrySchema.java
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+
+import java.util.List;
+
+public class EntrySchema {
+
+ private String description;
+ private String type;
+ private List<Constraint> constraints;
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public List<Constraint> getConstraints() {
+ return constraints;
+ }
+
+ public void setConstraints(List<Constraint> constraints) {
+ this.constraints = constraints;
+ }
+
+ @Override
+ public EntrySchema clone() {
+ EntrySchema entrySchema = new EntrySchema();
+ entrySchema.setDescription(this.getDescription());
+ entrySchema.setType(this.getType());
+ entrySchema.setConstraints(DataModelUtil.cloneConstraints(this.getConstraints()));
+ return entrySchema;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/GroupDefinition.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/GroupDefinition.java
new file mode 100644
index 0000000000..807bf260c3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/GroupDefinition.java
@@ -0,0 +1,64 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import java.util.List;
+import java.util.Map;
+
+public class GroupDefinition {
+
+ private String type;
+ private String description;
+ private Map<String, Object> properties;
+ private List<String> members;
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Map<String, Object> getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Map<String, Object> properties) {
+ this.properties = properties;
+ }
+
+ public List<String> getMembers() {
+ return members;
+ }
+
+ public void setMembers(List<String> members) {
+ this.members = members;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/GroupType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/GroupType.java
new file mode 100644
index 0000000000..4bbb861286
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/GroupType.java
@@ -0,0 +1,82 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import java.util.List;
+import java.util.Map;
+
+public class GroupType {
+
+ private String derived_from;
+ private String version;
+ private String description;
+ private Map<String, PropertyDefinition> properties;
+ private List<String> members;
+ private Map<String, InterfaceDefinition> interfaces;
+
+ public String getDerived_from() {
+ return derived_from;
+ }
+
+ public void setDerived_from(String derivedFrom) {
+ this.derived_from = derivedFrom;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Map<String, PropertyDefinition> getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Map<String, PropertyDefinition> properties) {
+ this.properties = properties;
+ }
+
+ public List<String> getMembers() {
+ return members;
+ }
+
+ public void setMembers(List<String> members) {
+ this.members = members;
+ }
+
+ public Map<String, InterfaceDefinition> getInterfaces() {
+ return interfaces;
+ }
+
+ public void setInterfaces(Map<String, InterfaceDefinition> interfaces) {
+ this.interfaces = interfaces;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Import.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Import.java
new file mode 100644
index 0000000000..207a1b520a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Import.java
@@ -0,0 +1,61 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+public class Import {
+
+ private String file;
+ private String repository;
+ private String namespace_uri;
+ private String namespace_prefix;
+
+ public String getFile() {
+ return file;
+ }
+
+ public void setFile(String file) {
+ this.file = file;
+ }
+
+ public String getRepository() {
+ return repository;
+ }
+
+ public void setRepository(String repository) {
+ this.repository = repository;
+ }
+
+ public String getNamespace_uri() {
+ return namespace_uri;
+ }
+
+ public void setNamespace_uri(String namespaceUri) {
+ this.namespace_uri = namespaceUri;
+ }
+
+ public String getNamespace_prefix() {
+ return namespace_prefix;
+ }
+
+ public void setNamespace_prefix(String namespacePrefix) {
+ this.namespace_prefix = namespacePrefix;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/InterfaceDefinition.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/InterfaceDefinition.java
new file mode 100644
index 0000000000..cf09510083
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/InterfaceDefinition.java
@@ -0,0 +1,24 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+public class InterfaceDefinition {
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/InterfaceType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/InterfaceType.java
new file mode 100644
index 0000000000..b177b0660a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/InterfaceType.java
@@ -0,0 +1,24 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+public class InterfaceType {
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Metadata.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Metadata.java
new file mode 100644
index 0000000000..162e693dba
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Metadata.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import java.util.Map;
+
+public class Metadata {
+
+ private String template_name;
+ private String template_author;
+ private String template_version;
+
+
+ public String getTemplate_name() {
+ return template_name;
+ }
+
+ public void setTemplate_name(String templateName) {
+ this.template_name = templateName;
+ }
+
+ public String getTemplate_author() {
+ return template_author;
+ }
+
+ public void setTemplate_author(String templateAuthor) {
+ this.template_author = templateAuthor;
+ }
+
+ public String getTemplate_version() {
+ return template_version;
+ }
+
+ public void setTemplate_version(String templateVersion) {
+ this.template_version = templateVersion;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/NodeFilter.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/NodeFilter.java
new file mode 100644
index 0000000000..d87dcd7b1d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/NodeFilter.java
@@ -0,0 +1,47 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import java.util.List;
+import java.util.Map;
+
+public class NodeFilter {
+
+ Map<String, List<Constraint>> properties;
+ Map<String, CapabilityFilterDefinition> capabilities;
+
+ public Map<String, List<Constraint>> getProperties() {
+
+ return properties;
+ }
+
+ public void setProperties(Map<String, List<Constraint>> properties) {
+ this.properties = properties;
+ }
+
+ public Map<String, CapabilityFilterDefinition> getCapabilities() {
+ return capabilities;
+ }
+
+ public void setCapabilities(Map<String, CapabilityFilterDefinition> capabilities) {
+ this.capabilities = capabilities;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/NodeTemplate.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/NodeTemplate.java
new file mode 100644
index 0000000000..41ac232605
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/NodeTemplate.java
@@ -0,0 +1,127 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import java.util.List;
+import java.util.Map;
+
+public class NodeTemplate implements Template {
+
+ private String type;
+ private String description;
+ private List<String> directives;
+ private Map<String, Object> properties;
+ private Map<String, Object> attributes;
+ private List<Map<String, RequirementAssignment>> requirements;
+ private List<Map<String, CapabilityAssignment>> capabilities;
+ private Map<String, InterfaceDefinition> interfaces;
+ private Map<String, ArtifactDefinition> artifacts;
+ private NodeFilter node_filter;
+ private String copy;
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public List<String> getDirectives() {
+ return directives;
+ }
+
+ public void setDirectives(List<String> directives) {
+ this.directives = directives;
+ }
+
+ public Map<String, Object> getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Map<String, Object> properties) {
+ this.properties = properties;
+ }
+
+ public Map<String, Object> getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Map<String, Object> attributes) {
+ this.attributes = attributes;
+ }
+
+ public List<Map<String, RequirementAssignment>> getRequirements() {
+ return requirements;
+ }
+
+ public void setRequirements(List<Map<String, RequirementAssignment>> requirements) {
+ this.requirements = requirements;
+ }
+
+ public List<Map<String, CapabilityAssignment>> getCapabilities() {
+ return capabilities;
+ }
+
+ public void setCapabilities(List<Map<String, CapabilityAssignment>> capabilities) {
+ this.capabilities = capabilities;
+ }
+
+ public Map<String, InterfaceDefinition> getInterfaces() {
+ return interfaces;
+ }
+
+ public void setInterfaces(Map<String, InterfaceDefinition> interfaces) {
+ this.interfaces = interfaces;
+ }
+
+ public Map<String, ArtifactDefinition> getArtifacts() {
+ return artifacts;
+ }
+
+ public void setArtifacts(Map<String, ArtifactDefinition> artifacts) {
+ this.artifacts = artifacts;
+ }
+
+ public NodeFilter getNode_filter() {
+ return node_filter;
+ }
+
+ public void setNode_filter(NodeFilter nodeFilter) {
+ this.node_filter = nodeFilter;
+ }
+
+ public String getCopy() {
+ return copy;
+ }
+
+ public void setCopy(String copy) {
+ this.copy = copy;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/NodeType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/NodeType.java
new file mode 100644
index 0000000000..d477f286ee
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/NodeType.java
@@ -0,0 +1,125 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import java.util.List;
+import java.util.Map;
+
+public class NodeType {
+
+ private String derived_from;
+ private String version;
+ private String description;
+ private Map<String, PropertyDefinition> properties;
+ private Map<String, AttributeDefinition> attributes;
+ private List<Map<String, RequirementDefinition>> requirements;
+ private Map<String, CapabilityDefinition> capabilities;
+ private Map<String, InterfaceDefinition> interfaces;
+ private Map<String, ArtifactDefinition> artifacts;
+
+
+ public String getDerived_from() {
+ return derived_from;
+ }
+
+ public void setDerived_from(String derivedFrom) {
+ this.derived_from = derivedFrom;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Map<String, PropertyDefinition> getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Map<String, PropertyDefinition> properties) {
+ this.properties = properties;
+ }
+
+ public Map<String, AttributeDefinition> getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Map<String, AttributeDefinition> attributes) {
+ this.attributes = attributes;
+ }
+
+ public List<Map<String, RequirementDefinition>> getRequirements() {
+ return requirements;
+ }
+
+ public void setRequirements(List<Map<String, RequirementDefinition>> requirements) {
+ this.requirements = requirements;
+ }
+
+ public Map<String, CapabilityDefinition> getCapabilities() {
+ return capabilities;
+ }
+
+ public void setCapabilities(Map<String, CapabilityDefinition> capabilities) {
+ this.capabilities = capabilities;
+ }
+
+ public Map<String, InterfaceDefinition> getInterfaces() {
+ return interfaces;
+ }
+
+ public void setInterfaces(Map<String, InterfaceDefinition> interfaces) {
+ this.interfaces = interfaces;
+ }
+
+ public Map<String, ArtifactDefinition> getArtifacts() {
+ return artifacts;
+ }
+
+ public void setArtifacts(Map<String, ArtifactDefinition> artifacts) {
+ this.artifacts = artifacts;
+ }
+
+ @Override
+ public NodeType clone() {
+ NodeType clone = new NodeType();
+ clone.setCapabilities(this.getCapabilities());
+ clone.setDerived_from(this.getDerived_from());
+ clone.setProperties(this.getProperties());
+ clone.setRequirements(this.getRequirements());
+ clone.setDescription(this.getDescription());
+ clone.setAttributes(this.getAttributes());
+ clone.setInterfaces(this.getInterfaces());
+ clone.setVersion(this.getVersion());
+ clone.setArtifacts(this.getArtifacts());
+ return clone;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ParameterDefinition.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ParameterDefinition.java
new file mode 100644
index 0000000000..6ef4c782f5
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ParameterDefinition.java
@@ -0,0 +1,99 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import java.util.List;
+
+public class ParameterDefinition {
+
+ private String type;
+ private String description;
+ private Object value;
+ private Boolean required;
+ private Object _default;
+ private Status status;
+ private List<Constraint> constraints;
+ private EntrySchema entry_schema;
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public void setValue(Object value) {
+ this.value = value;
+ }
+
+ public Boolean getRequired() {
+ return required;
+ }
+
+ public void setRequired(Boolean required) {
+ this.required = required;
+ }
+
+ public Object get_default() {
+ return _default;
+ }
+
+ public void set_default(Object defaultValue) {
+ this._default = defaultValue;
+ }
+
+ public Status getStatus() {
+ return status;
+ }
+
+ public void setStatus(Status status) {
+ this.status = status;
+ }
+
+ public List<Constraint> getConstraints() {
+ return constraints;
+ }
+
+ public void setConstraints(List<Constraint> constraints) {
+ this.constraints = constraints;
+ }
+
+ public EntrySchema getEntry_schema() {
+ return entry_schema;
+ }
+
+ public void setEntry_schema(EntrySchema entrySchema) {
+ this.entry_schema = entrySchema;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PolicyDefinition.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PolicyDefinition.java
new file mode 100644
index 0000000000..90f44ae36a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PolicyDefinition.java
@@ -0,0 +1,63 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import java.util.List;
+import java.util.Map;
+
+public class PolicyDefinition implements Template {
+ private String type;
+ private String description;
+ private Map<String, Object> properties;
+ private List<String> targets;
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Map<String, Object> getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Map<String, Object> properties) {
+ this.properties = properties;
+ }
+
+ public List<String> getTargets() {
+ return targets;
+ }
+
+ public void setTargets(List<String> targets) {
+ this.targets = targets;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PolicyType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PolicyType.java
new file mode 100644
index 0000000000..07412cda59
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PolicyType.java
@@ -0,0 +1,73 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import java.util.List;
+import java.util.Map;
+
+public class PolicyType {
+
+ private String derived_from;
+ private String version;
+ private String description;
+ private Map<String, PropertyDefinition> properties;
+ private List<String> targets;
+
+ public String getDerived_from() {
+ return derived_from;
+ }
+
+ public void setDerived_from(String derivedFrom) {
+ this.derived_from = derivedFrom;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Map<String, PropertyDefinition> getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Map<String, PropertyDefinition> properties) {
+ this.properties = properties;
+ }
+
+ public List<String> getTargets() {
+ return targets;
+ }
+
+ public void setTargets(List<String> targets) {
+ this.targets = targets;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PropertyDefinition.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PropertyDefinition.java
new file mode 100644
index 0000000000..cf47d0b113
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PropertyDefinition.java
@@ -0,0 +1,112 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+
+import java.util.List;
+
+public class PropertyDefinition {
+
+ private String type;
+ private String description;
+ private Boolean required;
+ private Object _default;
+ private Status status;
+ private List<Constraint> constraints;
+ private EntrySchema entry_schema;
+
+ public PropertyDefinition() {
+ status = Status.SUPPORTED;
+ required = true;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Boolean getRequired() {
+ return required;
+ }
+
+ public void setRequired(Boolean required) {
+ this.required = required;
+ }
+
+ public Object get_default() {
+ return _default;
+ }
+
+ public void set_default(Object defaultValue) {
+ this._default = defaultValue;
+ }
+
+ public Status getStatus() {
+ return status;
+ }
+
+ public void setStatus(Status status) {
+ this.status = status;
+ }
+
+ public List<Constraint> getConstraints() {
+ return constraints;
+ }
+
+ public void setConstraints(List<Constraint> constraints) {
+ this.constraints = constraints;
+ }
+
+ public EntrySchema getEntry_schema() {
+ return entry_schema;
+ }
+
+ public void setEntry_schema(EntrySchema entrySchema) {
+ this.entry_schema = entrySchema;
+ }
+
+ @Override
+ public PropertyDefinition clone() {
+ PropertyDefinition propertyDefinition = new PropertyDefinition();
+ propertyDefinition.setType(this.getType());
+ propertyDefinition.setDescription(this.getDescription());
+ propertyDefinition.setRequired(this.getRequired());
+ propertyDefinition.set_default(this.get_default());
+ propertyDefinition.setStatus(this.getStatus());
+ propertyDefinition.setEntry_schema(this.getEntry_schema().clone());
+ propertyDefinition.setConstraints(DataModelUtil.cloneConstraints(this.getConstraints()));
+ return propertyDefinition;
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PropertyType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PropertyType.java
new file mode 100644
index 0000000000..3fdd9bba0e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/PropertyType.java
@@ -0,0 +1,117 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * The enum Property type.
+ */
+public enum PropertyType {
+
+ /**
+ * String property type.
+ */
+ STRING("string"),
+ /**
+ * Integer property type.
+ */
+ INTEGER("integer"),
+ /**
+ * Float property type.
+ */
+ FLOAT("float"),
+ /**
+ * Boolean property type.
+ */
+ BOOLEAN("boolean"),
+ /**
+ * Timestamp property type.
+ */
+ TIMESTAMP("timestamp"),
+ /**
+ * Null property type.
+ */
+ NULL("null"),
+ /**
+ * Map property type.
+ */
+ MAP("map"),
+ /**
+ * List property type.
+ */
+ LIST("list"),
+ /**
+ * Scalar unit size property type.
+ */
+ SCALAR_UNIT_SIZE("scalar-unit.size");
+
+ private static final Map<String, PropertyType> mMap =
+ Collections.unmodifiableMap(initializeMapping());
+ private String displayName;
+
+ PropertyType(String displayName) {
+
+ this.displayName = displayName;
+ }
+
+ /**
+ * Initialize mapping map.
+ *
+ * @return the map
+ */
+ public static Map<String, PropertyType> initializeMapping() {
+ Map<String, PropertyType> typeMap = new HashMap<String, PropertyType>();
+ for (PropertyType v : PropertyType.values()) {
+ typeMap.put(v.displayName, v);
+ }
+ return typeMap;
+ }
+
+ /**
+ * Gets property type by display name.
+ *
+ * @param displayName the display name
+ * @return the property type by display name
+ */
+ public static PropertyType getPropertyTypeByDisplayName(String displayName) {
+ if (mMap == null) {
+ initializeMapping();
+ }
+ if (mMap.containsKey(displayName)) {
+ return mMap.get(displayName);
+ }
+ return null;
+ }
+
+ /**
+ * Gets display name.
+ *
+ * @return the display name
+ */
+ public String getDisplayName() {
+ return displayName;
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RelationshipTemplate.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RelationshipTemplate.java
new file mode 100644
index 0000000000..c3a1195565
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RelationshipTemplate.java
@@ -0,0 +1,99 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import java.util.Map;
+
+public class RelationshipTemplate implements Template {
+
+ private String type;
+ private String description;
+ private Map<String, Object> properties;
+ private Map<String, Object> attributes;
+ private Map<String, RequirementAssignment> requirements;
+ private Map<String, CapabilityAssignment> capabilities;
+ private Map<String, InterfaceDefinition> interfaces;
+ private String copy;
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Map<String, Object> getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Map<String, Object> properties) {
+ this.properties = properties;
+ }
+
+ public Map<String, Object> getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Map<String, Object> attributes) {
+ this.attributes = attributes;
+ }
+
+ public Map<String, RequirementAssignment> getRequirements() {
+ return requirements;
+ }
+
+ public void setRequirements(Map<String, RequirementAssignment> requirements) {
+ this.requirements = requirements;
+ }
+
+ public Map<String, CapabilityAssignment> getCapabilities() {
+ return capabilities;
+ }
+
+ public void setCapabilities(Map<String, CapabilityAssignment> capabilities) {
+ this.capabilities = capabilities;
+ }
+
+ public Map<String, InterfaceDefinition> getInterfaces() {
+ return interfaces;
+ }
+
+ public void setInterfaces(Map<String, InterfaceDefinition> interfaces) {
+ this.interfaces = interfaces;
+ }
+
+ public String getCopy() {
+ return copy;
+ }
+
+ public void setCopy(String copy) {
+ this.copy = copy;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RelationshipType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RelationshipType.java
new file mode 100644
index 0000000000..173a8a0f64
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RelationshipType.java
@@ -0,0 +1,93 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import java.util.List;
+import java.util.Map;
+
+public class RelationshipType {
+
+ private String derived_from;
+ private String version;
+ private String description;
+ private Map<String, PropertyDefinition> properties;
+ private Map<String, AttributeDefinition> attributes;
+ private Map<String, InterfaceDefinition> interfaces;
+ private List<String> valid_target_types;
+ //An optional list of one or more names of Capability Types that are valid targets
+ //for this relationship
+
+ public String getDerived_from() {
+ return derived_from;
+ }
+
+ public void setDerived_from(String derivedFrom) {
+ this.derived_from = derivedFrom;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Map<String, PropertyDefinition> getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Map<String, PropertyDefinition> properties) {
+ this.properties = properties;
+ }
+
+ public Map<String, AttributeDefinition> getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Map<String, AttributeDefinition> attributes) {
+ this.attributes = attributes;
+ }
+
+ public Map<String, InterfaceDefinition> getInterfaces() {
+ return interfaces;
+ }
+
+ public void setInterfaces(Map<String, InterfaceDefinition> interfaces) {
+ this.interfaces = interfaces;
+ }
+
+ public List<String> getValid_target_types() {
+ return valid_target_types;
+ }
+
+ public void setValid_target_types(List<String> validTargetTypes) {
+ this.valid_target_types = validTargetTypes;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RequirementAssignment.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RequirementAssignment.java
new file mode 100644
index 0000000000..445063a3ed
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RequirementAssignment.java
@@ -0,0 +1,70 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+public class RequirementAssignment {
+
+ private String capability;
+ private String node;
+ private String relationship;
+ private NodeFilter node_filter;
+ private Object[] occurrences;
+
+ public String getCapability() {
+ return capability;
+ }
+
+ public void setCapability(String capability) {
+ this.capability = capability;
+ }
+
+ public String getNode() {
+ return node;
+ }
+
+ public void setNode(String node) {
+ this.node = node;
+ }
+
+ public String getRelationship() {
+ return relationship;
+ }
+
+ public void setRelationship(String relationship) {
+ this.relationship = relationship;
+ }
+
+ public NodeFilter getNode_filter() {
+ return node_filter;
+ }
+
+ public void setNode_filter(NodeFilter nodeFilter) {
+ this.node_filter = nodeFilter;
+ }
+
+ public Object[] getOccurrences() {
+ return occurrences;
+ }
+
+ public void setOccurrences(Object[] occurrences) {
+ this.occurrences = occurrences;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RequirementDefinition.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RequirementDefinition.java
new file mode 100644
index 0000000000..fe3238f1b5
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/RequirementDefinition.java
@@ -0,0 +1,82 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+public class RequirementDefinition {
+
+ private String capability;
+ private String node;
+ private String relationship;
+ private Object[] occurrences;
+
+ /**
+ * Instantiates a new Requirement definition.
+ */
+ public RequirementDefinition() {
+ occurrences = new Object[2];
+ occurrences[0] = 1;
+ occurrences[1] = 1;
+ }
+
+ public String getCapability() {
+ return capability;
+ }
+
+ public void setCapability(String capability) {
+ this.capability = capability;
+ }
+
+ public String getNode() {
+ return node;
+ }
+
+ public void setNode(String node) {
+ this.node = node;
+ }
+
+ public String getRelationship() {
+ return relationship;
+ }
+
+ public void setRelationship(String relationship) {
+ this.relationship = relationship;
+ }
+
+ public Object[] getOccurrences() {
+ return occurrences;
+ }
+
+ public void setOccurrences(Object[] occurrences) {
+ this.occurrences = occurrences;
+ }
+
+ @Override
+ public RequirementDefinition clone() {
+ RequirementDefinition requirementDefinition = new RequirementDefinition();
+ requirementDefinition.setNode(this.getNode());
+ requirementDefinition.setRelationship(this.getRelationship());
+ requirementDefinition.setCapability(this.getCapability());
+ requirementDefinition
+ .setOccurrences(new Object[]{this.getOccurrences()[0], this.getOccurrences()[1]});
+ return requirementDefinition;
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Scalar.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Scalar.java
new file mode 100644
index 0000000000..619ac510b0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Scalar.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+public class Scalar {
+
+ private Float value;
+
+ public Float getValue() {
+ return value;
+ }
+
+ public void setValue(Float value) {
+ this.value = value;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ServiceTemplate.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ServiceTemplate.java
new file mode 100644
index 0000000000..98da0104b8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/ServiceTemplate.java
@@ -0,0 +1,144 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import java.util.Map;
+
+public class ServiceTemplate implements Template {
+
+ private String tosca_definitions_version;
+ private Metadata metadata;
+ private String description;
+ private Map<String, Import> imports;
+ private Map<String, ArtifactType> artifact_types;
+ private Map<String, DataType> data_types;
+ private Map<String, CapabilityType> capability_types;
+ private Map<String, InterfaceType> interface_types;
+ private Map<String, RelationshipType> relationship_types;
+ private Map<String, NodeType> node_types;
+ private Map<String, GroupType> group_types;
+ private Map<String, PolicyType> policy_types;
+ private TopologyTemplate topology_template;
+
+ public String getTosca_definitions_version() {
+ return tosca_definitions_version;
+ }
+
+ public void setTosca_definitions_version(String toscaDefinitionsVersion) {
+ this.tosca_definitions_version = toscaDefinitionsVersion;
+ }
+
+ public Metadata getMetadata() {
+ return metadata;
+ }
+
+ public void setMetadata(Metadata metadata) {
+ this.metadata = metadata;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Map<String, Import> getImports() {
+ return imports;
+ }
+
+ public void setImports(Map<String, Import> imports) {
+ this.imports = imports;
+ }
+
+ public Map<String, ArtifactType> getArtifact_types() {
+ return artifact_types;
+ }
+
+ public void setArtifact_types(Map<String, ArtifactType> artifactTypes) {
+ this.artifact_types = artifactTypes;
+ }
+
+ public Map<String, DataType> getData_types() {
+ return data_types;
+ }
+
+ public void setData_types(Map<String, DataType> dataTypes) {
+ this.data_types = dataTypes;
+ }
+
+ public Map<String, CapabilityType> getCapability_types() {
+ return capability_types;
+ }
+
+ public void setCapability_types(Map<String, CapabilityType> capabilityTypes) {
+ this.capability_types = capabilityTypes;
+ }
+
+ public Map<String, RelationshipType> getRelationship_types() {
+ return relationship_types;
+ }
+
+ public void setRelationship_types(Map<String, RelationshipType> relationshipTypes) {
+ this.relationship_types = relationshipTypes;
+ }
+
+ public Map<String, NodeType> getNode_types() {
+ return node_types;
+ }
+
+ public void setNode_types(Map<String, NodeType> nodeTypes) {
+ this.node_types = nodeTypes;
+ }
+
+ public Map<String, GroupType> getGroup_types() {
+ return group_types;
+ }
+
+ public void setGroup_types(Map<String, GroupType> groupTypes) {
+ this.group_types = groupTypes;
+ }
+
+ public Map<String, InterfaceType> getInterface_types() {
+ return interface_types;
+ }
+
+ public void setInterface_types(Map<String, InterfaceType> interfaceTypes) {
+ this.interface_types = interfaceTypes;
+ }
+
+ public Map<String, PolicyType> getPolicy_types() {
+ return policy_types;
+ }
+
+ public void setPolicy_types(Map<String, PolicyType> policyTypes) {
+ this.policy_types = policyTypes;
+ }
+
+ public TopologyTemplate getTopology_template() {
+ return topology_template;
+ }
+
+ public void setTopology_template(TopologyTemplate topologyTemplate) {
+ this.topology_template = topologyTemplate;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Status.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Status.java
new file mode 100644
index 0000000000..0805982a54
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Status.java
@@ -0,0 +1,42 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import java.util.Map;
+
+public enum Status {
+
+ SUPPORTED("supported"),
+ UNSUPPORTED("unsupported"),
+ EXPERIMENTAL("experimental"),
+ DEPRECATED("deprecated"),;
+ private String displayName;
+
+ Status(String displayName) {
+ this.displayName = displayName;
+ }
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/SubstitutionMapping.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/SubstitutionMapping.java
new file mode 100644
index 0000000000..50c262dc42
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/SubstitutionMapping.java
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import java.util.List;
+import java.util.Map;
+
+public class SubstitutionMapping {
+ private String node_type;
+ private Map<String, List<String>> capabilities;
+ private Map<String, List<String>> requirements;
+
+ public String getNode_type() {
+ return node_type;
+ }
+
+ public void setNode_type(String nodeType) {
+ this.node_type = nodeType;
+ }
+
+ public Map<String, List<String>> getRequirements() {
+ return requirements;
+ }
+
+ public void setRequirements(Map<String, List<String>> requirements) {
+ this.requirements = requirements;
+ }
+
+ public Map<String, List<String>> getCapabilities() {
+ return capabilities;
+ }
+
+ public void setCapabilities(Map<String, List<String>> capabilities) {
+ this.capabilities = capabilities;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Template.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Template.java
new file mode 100644
index 0000000000..128bb3c0a9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/Template.java
@@ -0,0 +1,24 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+public interface Template {
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/TopologyTemplate.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/TopologyTemplate.java
new file mode 100644
index 0000000000..288242946a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/TopologyTemplate.java
@@ -0,0 +1,114 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+public class TopologyTemplate {
+
+ private String description;
+ private Map<String, ParameterDefinition> inputs;
+ private Map<String, NodeTemplate> node_templates;
+ private Map<String, RelationshipTemplate> relationship_templates;
+ private Map<String, GroupDefinition> groups;
+ private Map<String, ParameterDefinition> outputs;
+ private SubstitutionMapping substitution_mappings;
+ private Map<String, PolicyDefinition> policies;
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Map<String, ParameterDefinition> getInputs() {
+ return inputs;
+ }
+
+ public void setInputs(Map<String, ParameterDefinition> inputs) {
+ this.inputs = inputs;
+ }
+
+ public Map<String, NodeTemplate> getNode_templates() {
+ return node_templates;
+ }
+
+ public void setNode_templates(Map<String, NodeTemplate> nodeTemplates) {
+ this.node_templates = nodeTemplates;
+ }
+
+ public Map<String, RelationshipTemplate> getRelationship_templates() {
+ return relationship_templates;
+ }
+
+ public void setRelationship_templates(Map<String, RelationshipTemplate> relationshipTemplates) {
+ this.relationship_templates = relationshipTemplates;
+ }
+
+ public Map<String, GroupDefinition> getGroups() {
+ return groups;
+ }
+
+ public void setGroups(Map<String, GroupDefinition> groups) {
+ this.groups = groups;
+ }
+
+ /**
+ * Add group.
+ *
+ * @param groupKey the group key
+ * @param groupDefinition the group definition
+ */
+ public void addGroup(String groupKey, GroupDefinition groupDefinition) {
+ if (Objects.isNull(this.groups)) {
+ this.groups = new HashMap<>();
+ }
+ this.groups.put(groupKey, groupDefinition);
+ }
+
+ public Map<String, ParameterDefinition> getOutputs() {
+ return outputs;
+ }
+
+ public void setOutputs(Map<String, ParameterDefinition> outputs) {
+ this.outputs = outputs;
+ }
+
+ public SubstitutionMapping getSubstitution_mappings() {
+ return substitution_mappings;
+ }
+
+ public void setSubstitution_mappings(SubstitutionMapping substitutionMapping) {
+ this.substitution_mappings = substitutionMapping;
+ }
+
+ public Map<String, PolicyDefinition> getPolicies() {
+ return policies;
+ }
+
+ public void setPolicies(Map<String, PolicyDefinition> policies) {
+ this.policies = policies;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/heatextend/ParameterDefinitionExt.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/heatextend/ParameterDefinitionExt.java
new file mode 100644
index 0000000000..bde81108de
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/heatextend/ParameterDefinitionExt.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model.heatextend;
+
+
+import org.openecomp.sdc.tosca.datatypes.model.ParameterDefinition;
+
+public class ParameterDefinitionExt extends ParameterDefinition {
+
+ String label;
+ Boolean hidden;
+ Boolean immutable;
+
+ public String getLabel() {
+ return label;
+ }
+
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+ public Boolean getHidden() {
+ return hidden;
+ }
+
+ public void setHidden(Boolean hidden) {
+ this.hidden = hidden;
+ }
+
+ public Boolean getImmutable() {
+ return immutable;
+ }
+
+ public void setImmutable(Boolean immutable) {
+ this.immutable = immutable;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/heatextend/PropertyTypeExt.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/heatextend/PropertyTypeExt.java
new file mode 100644
index 0000000000..f92d674070
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/model/heatextend/PropertyTypeExt.java
@@ -0,0 +1,85 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.datatypes.model.heatextend;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * The enum Property type ext.
+ */
+public enum PropertyTypeExt {
+
+ /**
+ * Json property type ext.
+ */
+ JSON("json");
+
+ private static final Map<String, PropertyTypeExt> mMap =
+ Collections.unmodifiableMap(initializeMapping());
+ private String displayName;
+
+ PropertyTypeExt(String displayName) {
+
+ this.displayName = displayName;
+ }
+
+ /**
+ * Initialize mapping map.
+ *
+ * @return the map
+ */
+ public static Map<String, PropertyTypeExt> initializeMapping() {
+ Map<String, PropertyTypeExt> typeMap = new HashMap<String, PropertyTypeExt>();
+ for (PropertyTypeExt v : PropertyTypeExt.values()) {
+ typeMap.put(v.displayName, v);
+ }
+ return typeMap;
+ }
+
+ /**
+ * Gets property type by display name.
+ *
+ * @param displayName the display name
+ * @return the property type by display name
+ */
+ public static PropertyTypeExt getPropertyTypeByDisplayName(String displayName) {
+ if (mMap == null) {
+ initializeMapping();
+ }
+ if (mMap.containsKey(displayName)) {
+ return mMap.get(displayName);
+ }
+ return null;
+ }
+
+ /**
+ * Gets display name.
+ *
+ * @return the display name
+ */
+ public String getDisplayName() {
+ return displayName;
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/InvalidAddActionNullEntityErrorBuilder.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/InvalidAddActionNullEntityErrorBuilder.java
new file mode 100644
index 0000000000..02bee69251
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/InvalidAddActionNullEntityErrorBuilder.java
@@ -0,0 +1,58 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.errors;
+
+import org.openecomp.sdc.common.errors.ErrorCategory;
+import org.openecomp.sdc.common.errors.ErrorCode;
+
+/**
+ * The type Invalid add action null entity error builder.
+ */
+public class InvalidAddActionNullEntityErrorBuilder {
+
+ private static final String INVALID_ACTION_NULL_ENTITY_ERR_MSG =
+ "Invalid action, can't add '%s' to '%s', '%s' entity is NULL.";
+
+ private final ErrorCode.ErrorCodeBuilder builder = new ErrorCode.ErrorCodeBuilder();
+
+ /**
+ * Instantiates a new Invalid add action null entity error builder.
+ *
+ * @param addedData the added data
+ * @param updatedEntity the updated entity
+ */
+ public InvalidAddActionNullEntityErrorBuilder(String addedData, String updatedEntity) {
+ builder.withId(ToscaErrorCodes.TOSCA_INVALID_ADD_ACTION_NULL_ENTITY);
+ builder.withCategory(ErrorCategory.APPLICATION);
+ builder.withMessage(
+ String.format(INVALID_ACTION_NULL_ENTITY_ERR_MSG, addedData, updatedEntity, updatedEntity));
+ }
+
+ /**
+ * Build error code.
+ *
+ * @return the error code
+ */
+ public ErrorCode build() {
+ return builder.build();
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/InvalidRequirementAssignmentErrorBuilder.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/InvalidRequirementAssignmentErrorBuilder.java
new file mode 100644
index 0000000000..cc0b821748
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/InvalidRequirementAssignmentErrorBuilder.java
@@ -0,0 +1,57 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.errors;
+
+import org.openecomp.sdc.common.errors.ErrorCategory;
+import org.openecomp.sdc.common.errors.ErrorCode;
+
+/**
+ * The type Invalid requirement assignment error builder.
+ */
+public class InvalidRequirementAssignmentErrorBuilder {
+
+ private static final String INVALID_REQ_ASSIGNMENT_ERR_ID = "INVALID_REQ_ASSIGNMENT_ERR_ID";
+ private static final String INVALID_REQ_ASSIGNMENT_ERR_MSG =
+ "Invalid Requirement Assignment, Node value is NULL, Requirement ID '%s'.";
+
+ private final ErrorCode.ErrorCodeBuilder builder = new ErrorCode.ErrorCodeBuilder();
+
+ /**
+ * Instantiates a new Invalid requirement assignment error builder.
+ *
+ * @param requirementId the requirement id
+ */
+ public InvalidRequirementAssignmentErrorBuilder(String requirementId) {
+ builder.withId(INVALID_REQ_ASSIGNMENT_ERR_ID);
+ builder.withCategory(ErrorCategory.APPLICATION);
+ builder.withMessage(String.format(INVALID_REQ_ASSIGNMENT_ERR_MSG, requirementId));
+ }
+
+ /**
+ * Build error code.
+ *
+ * @return the error code
+ */
+ public ErrorCode build() {
+ return builder.build();
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaErrorCodes.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaErrorCodes.java
new file mode 100644
index 0000000000..099f0771f2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaErrorCodes.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.errors;
+
+public class ToscaErrorCodes {
+
+ static final String INVALID_SUBSTITUTE_NODE_TEMPLATE = "INVALID_SUBSTITUTE_NODE_TEMPLATE";
+ static final String INVALID_SUBSTITUTION_SERVICE_TEMPLATE =
+ "INVALID_SUBSTITUTION_SERVICE_TEMPLATE";
+ static final String TOSCA_ENTRY_NOT_FOUND = "TOSCA_ENTRY_NOT_FOUND";
+ static final String MISSING_SUBSTITUTION_MAPPING_FOR_REQ_CAP =
+ "MISSING_SUBSTITUTION_MAPPING_FOR_REQ_CAP";
+ static final String TOSCA_INVALID_SUBSTITUTE_NODE_TEMPLATE =
+ "TOSCA_INVALID_SUBSTITUTE_NODE_TEMPLATE";
+ static final String TOSCA_INVALID_ADD_ACTION_NULL_ENTITY = "TOSCA_INVALID_ADD_ACTION_NULL_ENTITY";
+
+
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaInvalidEntryNotFoundErrorBuilder.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaInvalidEntryNotFoundErrorBuilder.java
new file mode 100644
index 0000000000..7e05d18755
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaInvalidEntryNotFoundErrorBuilder.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.errors;
+
+import org.openecomp.sdc.common.errors.ErrorCategory;
+import org.openecomp.sdc.common.errors.ErrorCode;
+
+/**
+ * The type Tosca invalid entry not found error builder.
+ */
+public class ToscaInvalidEntryNotFoundErrorBuilder {
+ //
+ private static final String ENTRY_NOT_FOUND_MSG =
+ "Invalid Tosca model data, missing '%s' entry for '%s' id %s";
+ private final ErrorCode.ErrorCodeBuilder builder = new ErrorCode.ErrorCodeBuilder();
+
+ /**
+ * Instantiates a new Tosca invalid entry not found error builder.
+ *
+ * @param entryName the entry name
+ * @param entryId the entry id
+ */
+ public ToscaInvalidEntryNotFoundErrorBuilder(String entryName, String entryId) {
+ builder.withId(ToscaErrorCodes.TOSCA_ENTRY_NOT_FOUND);
+ builder.withCategory(ErrorCategory.APPLICATION);
+ builder.withMessage(String.format(ENTRY_NOT_FOUND_MSG, entryName, entryName, entryId));
+ }
+
+ /**
+ * Build error code.
+ *
+ * @return the error code
+ */
+ public ErrorCode build() {
+ return builder.build();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaInvalidSubstituteNodeTemplateErrorBuilder.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaInvalidSubstituteNodeTemplateErrorBuilder.java
new file mode 100644
index 0000000000..5913e5ffba
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaInvalidSubstituteNodeTemplateErrorBuilder.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.errors;
+
+import org.openecomp.sdc.common.errors.ErrorCategory;
+import org.openecomp.sdc.common.errors.ErrorCode;
+
+
+/**
+ * The type Tosca invalid substitute node template error builder.
+ */
+public class ToscaInvalidSubstituteNodeTemplateErrorBuilder {
+ private static final String INVALID_SUBSTITUTE_NODE_TEMPLATE_MSG =
+ "Invalid substitute node template, directives with substitutable value must be defined. "
+ + "node template id %s";
+ private final ErrorCode.ErrorCodeBuilder builder = new ErrorCode.ErrorCodeBuilder();
+
+ /**
+ * Instantiates a new Tosca invalid substitute node template error builder.
+ *
+ * @param nodeTemplateId the node template id
+ */
+ public ToscaInvalidSubstituteNodeTemplateErrorBuilder(String nodeTemplateId) {
+ builder.withId(ToscaErrorCodes.TOSCA_INVALID_SUBSTITUTE_NODE_TEMPLATE);
+ builder.withCategory(ErrorCategory.APPLICATION);
+ builder.withMessage(String.format(INVALID_SUBSTITUTE_NODE_TEMPLATE_MSG, nodeTemplateId));
+ }
+
+ /**
+ * Build error code.
+ *
+ * @return the error code
+ */
+ public ErrorCode build() {
+ return builder.build();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaInvalidSubstituteNodeTemplatePropertiesErrorBuilder.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaInvalidSubstituteNodeTemplatePropertiesErrorBuilder.java
new file mode 100644
index 0000000000..90c681efc9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaInvalidSubstituteNodeTemplatePropertiesErrorBuilder.java
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.errors;
+
+import org.openecomp.sdc.common.errors.ErrorCategory;
+import org.openecomp.sdc.common.errors.ErrorCode;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+
+
+/**
+ * The type Tosca invalid substitute node template properties error builder.
+ */
+public class ToscaInvalidSubstituteNodeTemplatePropertiesErrorBuilder {
+
+ private static final String INVALID_SUBSTITUTE_NODE_TEMPLATE_MSG =
+ "Invalid Substitute Node Template %s, mandatory map property %s with mandatory "
+ + "key %s must be defined.";
+ private final ErrorCode.ErrorCodeBuilder builder = new ErrorCode.ErrorCodeBuilder();
+
+ /**
+ * Instantiates a new Tosca invalid substitute node template properties error builder.
+ *
+ * @param nodeTemplateId the node template id
+ */
+ public ToscaInvalidSubstituteNodeTemplatePropertiesErrorBuilder(String nodeTemplateId) {
+ builder.withId(ToscaErrorCodes.INVALID_SUBSTITUTE_NODE_TEMPLATE);
+ builder.withCategory(ErrorCategory.APPLICATION);
+ builder.withMessage(String.format(INVALID_SUBSTITUTE_NODE_TEMPLATE_MSG, nodeTemplateId,
+ ToscaConstants.SERVICE_TEMPLATE_FILTER_PROPERTY_NAME,
+ ToscaConstants.SUBSTITUTE_SERVICE_TEMPLATE_PROPERTY_NAME));
+ }
+
+ /**
+ * Build error code.
+ *
+ * @return the error code
+ */
+ public ErrorCode build() {
+ return builder.build();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaInvalidSubstitutionServiceTemplateErrorBuilder.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaInvalidSubstitutionServiceTemplateErrorBuilder.java
new file mode 100644
index 0000000000..c240992597
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaInvalidSubstitutionServiceTemplateErrorBuilder.java
@@ -0,0 +1,57 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.errors;
+
+import org.openecomp.sdc.common.errors.ErrorCategory;
+import org.openecomp.sdc.common.errors.ErrorCode;
+
+
+/**
+ * The type Tosca invalid substitution service template error builder.
+ */
+public class ToscaInvalidSubstitutionServiceTemplateErrorBuilder {
+
+ private static final String INVALID_SUBSTITUTION_SERVICE_TEMPLATE_MSG =
+ "Invalid Substitution Service Template %s, missing mandatory file 'Node type' "
+ + "in substitution mapping.";
+ private final ErrorCode.ErrorCodeBuilder builder = new ErrorCode.ErrorCodeBuilder();
+
+ /**
+ * Instantiates a new Tosca invalid substitution service template error builder.
+ *
+ * @param serviceTemplateFileName the service template file name
+ */
+ public ToscaInvalidSubstitutionServiceTemplateErrorBuilder(String serviceTemplateFileName) {
+ builder.withId(ToscaErrorCodes.INVALID_SUBSTITUTION_SERVICE_TEMPLATE);
+ builder.withCategory(ErrorCategory.APPLICATION);
+ builder.withMessage(
+ String.format(INVALID_SUBSTITUTION_SERVICE_TEMPLATE_MSG, serviceTemplateFileName));
+ }
+
+ /**
+ * Build error code.
+ *
+ * @return the error code
+ */
+ public ErrorCode build() {
+ return builder.build();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaMissingSubstitutionMappingForReqCapErrorBuilder.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaMissingSubstitutionMappingForReqCapErrorBuilder.java
new file mode 100644
index 0000000000..74392cdcdb
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaMissingSubstitutionMappingForReqCapErrorBuilder.java
@@ -0,0 +1,88 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.errors;
+
+import org.openecomp.sdc.common.errors.ErrorCategory;
+import org.openecomp.sdc.common.errors.ErrorCode;
+
+/**
+ * The type Tosca missing substitution mapping for req cap error builder.
+ */
+public class ToscaMissingSubstitutionMappingForReqCapErrorBuilder {
+
+ private static final String MISSING_SUBSTITUTION_MAPPING_FOR_REQ_CAP_MSG =
+ "Invalid Substitution, Missing Substitution Mapping for %s with Id %s.";
+ private final ErrorCode.ErrorCodeBuilder builder = new ErrorCode.ErrorCodeBuilder();
+
+ /**
+ * Instantiates a new Tosca missing substitution mapping for req cap error builder.
+ *
+ * @param exposedEntry the exposed entry
+ * @param id the id
+ */
+ public ToscaMissingSubstitutionMappingForReqCapErrorBuilder(MappingExposedEntry exposedEntry,
+ String id) {
+ builder.withId(ToscaErrorCodes.MISSING_SUBSTITUTION_MAPPING_FOR_REQ_CAP);
+ builder.withCategory(ErrorCategory.APPLICATION);
+ builder.withMessage(String
+ .format(MISSING_SUBSTITUTION_MAPPING_FOR_REQ_CAP_MSG, exposedEntry.getDisplayName(), id));
+ }
+
+ /**
+ * Build error code.
+ *
+ * @return the error code
+ */
+ public ErrorCode build() {
+ return builder.build();
+ }
+
+ /**
+ * The enum Mapping exposed entry.
+ */
+ public enum MappingExposedEntry {
+
+ /**
+ * Capability mapping exposed entry.
+ */
+ CAPABILITY("Capability"),
+ /**
+ * Requirement mapping exposed entry.
+ */
+ REQUIREMENT("Requirement"),;
+
+ private String displayName;
+
+ MappingExposedEntry(String displayName) {
+ this.displayName = displayName;
+ }
+
+ /**
+ * Gets display name.
+ *
+ * @return the display name
+ */
+ public String getDisplayName() {
+ return displayName;
+ }
+
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaNodeTypeNotFoundErrorBuilder.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaNodeTypeNotFoundErrorBuilder.java
new file mode 100644
index 0000000000..3d51970d50
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/errors/ToscaNodeTypeNotFoundErrorBuilder.java
@@ -0,0 +1,46 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.errors;
+
+import org.openecomp.sdc.common.errors.ErrorCategory;
+import org.openecomp.sdc.common.errors.ErrorCode;
+
+public class ToscaNodeTypeNotFoundErrorBuilder {
+ private static final String ENTRY_NOT_FOUND_MSG =
+ "NodeType '%s' or one of its derivedFrom node type hierarchy, "
+ + "is not defined in tosca service model";
+ private final ErrorCode.ErrorCodeBuilder builder = new ErrorCode.ErrorCodeBuilder();
+
+ /**
+ * Instantiates a new Tosca node type not found error builder.
+ *
+ * @param nodeType the node type
+ */
+ public ToscaNodeTypeNotFoundErrorBuilder(String nodeType) {
+ builder.withId(ToscaErrorCodes.TOSCA_ENTRY_NOT_FOUND);
+ builder.withCategory(ErrorCategory.APPLICATION);
+ builder.withMessage(String.format(ENTRY_NOT_FOUND_MSG, nodeType));
+ }
+
+ public ErrorCode build() {
+ return builder.build();
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/exceptions/CsarCreationErrorBuilder.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/exceptions/CsarCreationErrorBuilder.java
new file mode 100644
index 0000000000..c7b9bc2da4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/exceptions/CsarCreationErrorBuilder.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.exceptions;
+
+import org.openecomp.sdc.common.errors.BaseErrorBuilder;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+
+/**
+ * The type Csar creation error builder.
+ */
+public class CsarCreationErrorBuilder extends BaseErrorBuilder {
+
+ private static final String MANDATORY_PROPERTY_IS_MISSING_MSG =
+ "Failed to create CSAR file from ToscaServiceModel";
+ private static final String ZIP_FILE_CREATION = "ZIP_FILE_CREATION";
+
+ /**
+ * Instantiates a new Csar creation error builder.
+ */
+ public CsarCreationErrorBuilder() {
+ getErrorCodeBuilder().withId(ZIP_FILE_CREATION);
+ getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
+ getErrorCodeBuilder().withMessage(MANDATORY_PROPERTY_IS_MISSING_MSG);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/exceptions/CsarMissingEntryPointErrorBuilder.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/exceptions/CsarMissingEntryPointErrorBuilder.java
new file mode 100644
index 0000000000..9b9257ad33
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/exceptions/CsarMissingEntryPointErrorBuilder.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.exceptions;
+
+import org.openecomp.sdc.common.errors.BaseErrorBuilder;
+import org.openecomp.sdc.common.errors.ErrorCategory;
+
+/**
+ * The type Csar missing entry point error builder.
+ */
+public class CsarMissingEntryPointErrorBuilder extends BaseErrorBuilder {
+
+ private static final String MANDATORY_PROPERTY_IS_MISSING_MSG =
+ "Failed to create CSAR file from ToscaServiceModel,missing mandatory "
+ + "EntryDefinitionServiceTemplate ";
+ private static final String ZIP_FILE_CREATION = "ZIP_FILE_CREATION__MISSING_ENTRY_DEFINITION";
+
+ /**
+ * Instantiates a new Csar missing entry point error builder.
+ */
+ public CsarMissingEntryPointErrorBuilder() {
+ getErrorCodeBuilder().withId(ZIP_FILE_CREATION);
+ getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
+ getErrorCodeBuilder().withMessage(MANDATORY_PROPERTY_IS_MISSING_MSG);
+ }
+}
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
new file mode 100644
index 0000000000..d0d7ccf621
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java
@@ -0,0 +1,588 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.services;
+
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.tosca.datatypes.ToscaFunctions;
+import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.Constraint;
+import org.openecomp.sdc.tosca.datatypes.model.EntrySchema;
+import org.openecomp.sdc.tosca.datatypes.model.GroupDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.Metadata;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.PolicyDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.RelationshipTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.Status;
+import org.openecomp.sdc.tosca.datatypes.model.SubstitutionMapping;
+import org.openecomp.sdc.tosca.datatypes.model.TopologyTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.heatextend.ParameterDefinitionExt;
+import org.openecomp.sdc.tosca.errors.InvalidAddActionNullEntityErrorBuilder;
+import org.openecomp.sdc.tosca.errors.InvalidRequirementAssignmentErrorBuilder;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+/**
+ * The type Data model util.
+ */
+public class DataModelUtil {
+
+ /**
+ * Add substitution mapping.
+ *
+ * @param serviceTemplate the service template
+ * @param substitutionMapping the substitution mapping
+ */
+ public static void addSubstitutionMapping(ServiceTemplate serviceTemplate,
+ SubstitutionMapping substitutionMapping) {
+ if (serviceTemplate == null) {
+ throw new CoreException(
+ new InvalidAddActionNullEntityErrorBuilder("Substitution Mapping", "Service Template")
+ .build());
+ }
+
+ if (serviceTemplate.getTopology_template() == null) {
+ serviceTemplate.setTopology_template(new TopologyTemplate());
+ }
+ serviceTemplate.getTopology_template().setSubstitution_mappings(substitutionMapping);
+ }
+
+ /**
+ * Add substitution mapping req.
+ *
+ * @param serviceTemplate the service template
+ * @param substitutionMappingRequirementId the substitution mapping requirement id
+ * @param substitutionMappingRequirementList the substitution mapping requirement list
+ */
+ public static void addSubstitutionMappingReq(ServiceTemplate serviceTemplate,
+ String substitutionMappingRequirementId,
+ List<String> substitutionMappingRequirementList) {
+ if (serviceTemplate == null) {
+ throw new CoreException(
+ new InvalidAddActionNullEntityErrorBuilder("Substitution Mapping Requirements",
+ "Service Template").build());
+ }
+
+ if (serviceTemplate.getTopology_template() == null) {
+ serviceTemplate.setTopology_template(new TopologyTemplate());
+ }
+ if (serviceTemplate.getTopology_template().getSubstitution_mappings() == null) {
+ serviceTemplate.getTopology_template().setSubstitution_mappings(new SubstitutionMapping());
+ }
+ if (serviceTemplate.getTopology_template().getSubstitution_mappings().getRequirements()
+ == null) {
+ serviceTemplate.getTopology_template().getSubstitution_mappings()
+ .setRequirements(new HashMap<>());
+ }
+
+ serviceTemplate.getTopology_template().getSubstitution_mappings().getRequirements()
+ .put(substitutionMappingRequirementId, substitutionMappingRequirementList);
+ }
+
+ /**
+ * Add node template.
+ *
+ * @param serviceTemplate the service template
+ * @param nodeTemplateId the node template id
+ * @param nodeTemplate the node template
+ */
+ public static void addNodeTemplate(ServiceTemplate serviceTemplate, String nodeTemplateId,
+ NodeTemplate nodeTemplate) {
+ if (serviceTemplate == null) {
+ throw new CoreException(
+ new InvalidAddActionNullEntityErrorBuilder("Node Template", "Service Template").build());
+ }
+ TopologyTemplate topologyTemplate = serviceTemplate.getTopology_template();
+ if (Objects.isNull(topologyTemplate)) {
+ topologyTemplate = new TopologyTemplate();
+ serviceTemplate.setTopology_template(topologyTemplate);
+ }
+ if (topologyTemplate.getNode_templates() == null) {
+ topologyTemplate.setNode_templates(new HashMap<>());
+ }
+ topologyTemplate.getNode_templates().put(nodeTemplateId, nodeTemplate);
+ }
+
+ /**
+ * Add policy definition.
+ *
+ * @param serviceTemplate the service template
+ * @param policyId the policy id
+ * @param policyDefinition the policy definition
+ */
+ public static void addPolicyDefinition(ServiceTemplate serviceTemplate, String policyId,
+ PolicyDefinition policyDefinition) {
+ if (serviceTemplate == null) {
+ throw new CoreException(
+ new InvalidAddActionNullEntityErrorBuilder("Policy Definition", "Service Template")
+ .build());
+ }
+ TopologyTemplate topologyTemplate = serviceTemplate.getTopology_template();
+ if (Objects.isNull(topologyTemplate)) {
+ topologyTemplate = new TopologyTemplate();
+ serviceTemplate.setTopology_template(topologyTemplate);
+ }
+ if (topologyTemplate.getPolicies() == null) {
+ topologyTemplate.setPolicies(new HashMap<>());
+ }
+ topologyTemplate.getPolicies().put(policyId, policyDefinition);
+ }
+
+ /**
+ * Add node type.
+ *
+ * @param serviceTemplate the service template
+ * @param nodeTypeId the node type id
+ * @param nodeType the node type
+ */
+ public static void addNodeType(ServiceTemplate serviceTemplate, String nodeTypeId,
+ NodeType nodeType) {
+ if (serviceTemplate == null) {
+ throw new CoreException(
+ new InvalidAddActionNullEntityErrorBuilder("Node Type", "Service Template").build());
+ }
+ if (serviceTemplate.getNode_types() == null) {
+ serviceTemplate.setNode_types(new HashMap<>());
+ }
+ serviceTemplate.getNode_types().put(nodeTypeId, nodeType);
+ }
+
+ /**
+ * Add relationship template.
+ *
+ * @param serviceTemplate the service template
+ * @param relationshipTemplateId the relationship template id
+ * @param relationshipTemplate the relationship template
+ */
+ public static void addRelationshipTemplate(ServiceTemplate serviceTemplate,
+ String relationshipTemplateId,
+ RelationshipTemplate relationshipTemplate) {
+ if (serviceTemplate == null) {
+ throw new CoreException(
+ new InvalidAddActionNullEntityErrorBuilder("Relationship Template", "Service Template")
+ .build());
+ }
+ if (serviceTemplate.getTopology_template() == null) {
+ serviceTemplate.setTopology_template(new TopologyTemplate());
+ }
+ if (serviceTemplate.getTopology_template().getRelationship_templates() == null) {
+ serviceTemplate.getTopology_template().setRelationship_templates(new HashMap<>());
+ }
+ serviceTemplate.getTopology_template().getRelationship_templates()
+ .put(relationshipTemplateId, relationshipTemplate);
+ }
+
+ /**
+ * Add requirement assignment.
+ *
+ * @param nodeTemplate the node template
+ * @param requirementId the requirement id
+ * @param requirementAssignment the requirement assignment
+ */
+ public static void addRequirementAssignment(NodeTemplate nodeTemplate, String requirementId,
+ RequirementAssignment requirementAssignment) {
+ if (nodeTemplate == null) {
+ throw new CoreException(
+ new InvalidAddActionNullEntityErrorBuilder("Requirement Assignment", "Node Template")
+ .build());
+ }
+ if (requirementAssignment.getNode() == null) {
+ throw new CoreException(new InvalidRequirementAssignmentErrorBuilder(requirementId).build());
+ }
+
+ if (nodeTemplate.getRequirements() == null) {
+ nodeTemplate.setRequirements(new ArrayList<>());
+ }
+ Map<String, RequirementAssignment> requirement = new HashMap<>();
+ requirement.put(requirementId, requirementAssignment);
+ nodeTemplate.getRequirements().add(requirement);
+ }
+
+ /**
+ * Gets node template.
+ *
+ * @param serviceTemplate the service template
+ * @param nodeTemplateId the node template id
+ * @return the node template
+ */
+ public static NodeTemplate getNodeTemplate(ServiceTemplate serviceTemplate,
+ String nodeTemplateId) {
+ if (serviceTemplate == null
+ || serviceTemplate.getTopology_template() == null
+ || serviceTemplate.getTopology_template().getNode_templates() == null) {
+ return null;
+ }
+ return serviceTemplate.getTopology_template().getNode_templates().get(nodeTemplateId);
+ }
+
+ /**
+ * Gets node type.
+ *
+ * @param serviceTemplate the service template
+ * @param nodeTypeId the node type id
+ * @return the node type
+ */
+ public static NodeType getNodeType(ServiceTemplate serviceTemplate, String nodeTypeId) {
+ if (serviceTemplate == null || serviceTemplate.getNode_types() == null) {
+ return null;
+ }
+ return serviceTemplate.getNode_types().get(nodeTypeId);
+ }
+
+ /**
+ * Add group definition to topology template.
+ *
+ * @param serviceTemplate the service template
+ * @param groupName the group name
+ * @param group the group
+ */
+ public static void addGroupDefinitionToTopologyTemplate(ServiceTemplate serviceTemplate,
+ String groupName, GroupDefinition group) {
+ if (serviceTemplate == null) {
+ throw new CoreException(
+ new InvalidAddActionNullEntityErrorBuilder("Group Definition", "Service Template")
+ .build());
+ }
+
+ TopologyTemplate topologyTemplate = serviceTemplate.getTopology_template();
+ if (Objects.isNull(topologyTemplate)) {
+ topologyTemplate = new TopologyTemplate();
+ serviceTemplate.setTopology_template(topologyTemplate);
+ }
+ if (topologyTemplate.getGroups() == null) {
+ topologyTemplate.setGroups(new HashMap<>());
+ }
+ if (serviceTemplate.getTopology_template().getGroups() == null) {
+ Map<String, GroupDefinition> groups = new HashMap<>();
+ serviceTemplate.getTopology_template().setGroups(groups);
+ }
+ serviceTemplate.getTopology_template().getGroups().put(groupName, group);
+ }
+
+ /**
+ * Create property definition property definition.
+ *
+ * @param type the type
+ * @param description the description
+ * @param required the required
+ * @param constraints the constraints
+ * @param status the status
+ * @param entrySchema the entry schema
+ * @param defaultVal the default val
+ * @return the property definition
+ */
+ public static PropertyDefinition createPropertyDefinition(String type, String description,
+ boolean required,
+ List<Constraint> constraints,
+ Status status,
+ EntrySchema entrySchema,
+ Object defaultVal) {
+ PropertyDefinition propDef = new PropertyDefinition();
+ propDef.setType(type);
+ propDef.setDescription(description);
+ propDef.setRequired(required);
+ propDef.setConstraints(constraints);
+ if (status != null) {
+ propDef.setStatus(status);
+ }
+ propDef.setEntry_schema(entrySchema);
+ propDef.set_default(defaultVal);
+
+ return propDef;
+ }
+
+ /**
+ * Create requirement requirement definition.
+ *
+ * @param capability the capability
+ * @param node the node
+ * @param relationship the relationship
+ * @param occurrences the occurrences
+ * @return the requirement definition
+ */
+ public static RequirementDefinition createRequirement(String capability, String node,
+ String relationship, Object[] occurrences) {
+ RequirementDefinition requirementDefinition = new RequirementDefinition();
+ requirementDefinition.setCapability(capability);
+ requirementDefinition.setNode(node);
+ requirementDefinition.setRelationship(relationship);
+ if (occurrences != null) {
+ requirementDefinition.setOccurrences(occurrences);
+ }
+ return requirementDefinition;
+ }
+
+ /**
+ * Create attribute definition attribute definition.
+ *
+ * @param type the type
+ * @param description the description
+ * @param status the status
+ * @param entrySchema the entry schema
+ * @param defaultVal the default val
+ * @return the attribute definition
+ */
+ public static AttributeDefinition createAttributeDefinition(String type, String description,
+ Status status,
+ EntrySchema entrySchema,
+ Object defaultVal) {
+ AttributeDefinition attributeDef = new AttributeDefinition();
+ attributeDef.setType(type);
+
+ if (description != null) {
+ attributeDef.setDescription(description);
+ }
+ if (status != null) {
+ attributeDef.setStatus(status);
+ }
+ attributeDef.setEntry_schema(entrySchema);
+ attributeDef.set_default(defaultVal);
+
+ return attributeDef;
+ }
+
+ /**
+ * Create valid values constraint constraint.
+ *
+ * @param values the values
+ * @return the constraint
+ */
+ public static Constraint createValidValuesConstraint(Object... values) {
+ Constraint validValues = new Constraint();
+ for (Object value : values) {
+ validValues.addValidValue(value);
+ }
+ return validValues;
+ }
+
+ /**
+ * Create metadata metadata.
+ *
+ * @param templateName the template name
+ * @param templateVersion the template version
+ * @param templateAuthor the template author
+ * @return the metadata
+ */
+ public static Metadata createMetadata(String templateName, String templateVersion,
+ String templateAuthor) {
+ Metadata metadata = new Metadata();
+ metadata.setTemplate_name(templateName);
+ metadata.setTemplate_version(templateVersion);
+ metadata.setTemplate_author(templateAuthor);
+
+ return metadata;
+ }
+
+ /**
+ * Create entry schema entry schema.
+ *
+ * @param type the type
+ * @param description the description
+ * @param constraints the constraints
+ * @return the entry schema
+ */
+ public static EntrySchema createEntrySchema(String type, String description,
+ List<Constraint> constraints) {
+ EntrySchema entrySchema = new EntrySchema();
+ entrySchema.setType(type);
+ entrySchema.setDescription(description);
+ entrySchema.setConstraints(constraints);
+ return entrySchema;
+ }
+
+ /**
+ * Create valid values constraints list list.
+ *
+ * @param values the values
+ * @return the list
+ */
+ public static List<Constraint> createValidValuesConstraintsList(String... values) {
+ List<Constraint> constraints;
+ Constraint validValues;
+ constraints = new ArrayList<>();
+ validValues = DataModelUtil.createValidValuesConstraint(values);
+ constraints.add(validValues);
+ return constraints;
+ }
+
+ /**
+ * Create greater or equal constrain constraint.
+ *
+ * @param value the value
+ * @return the constraint
+ */
+ public static Constraint createGreaterOrEqualConstrain(Object value) {
+
+ Constraint constraint = new Constraint();
+ constraint.setGreater_or_equal(value);
+ return constraint;
+ }
+
+ /**
+ * Gets constrain list.
+ *
+ * @param constrains the constrains
+ * @return the constrain list
+ */
+ public static List<Constraint> getConstrainList(Constraint... constrains) {
+ return Arrays.asList(constrains);
+
+ }
+
+ /**
+ * Create get input property value from list parameter map.
+ *
+ * @param inputPropertyListName the input property list name
+ * @param indexInTheList the index in the list
+ * @param nestedPropertyName the nested property name
+ * @return the map
+ */
+ public static Map createGetInputPropertyValueFromListParameter(String inputPropertyListName,
+ int indexInTheList,
+ String... nestedPropertyName) {
+ List propertyList = new ArrayList<>();
+ propertyList.add(inputPropertyListName);
+ propertyList.add(indexInTheList);
+ if (nestedPropertyName != null) {
+ Collections.addAll(propertyList, nestedPropertyName);
+ }
+ Map getInputProperty = new HashMap<>();
+ getInputProperty.put(ToscaFunctions.GET_INPUT.getDisplayName(), propertyList);
+ return getInputProperty;
+ }
+
+ /**
+ * Convert property def to parameter def parameter definition ext.
+ *
+ * @param propertyDefinition the property definition
+ * @return the parameter definition ext
+ */
+ public static ParameterDefinitionExt convertPropertyDefToParameterDef(
+ PropertyDefinition propertyDefinition) {
+ if (propertyDefinition == null) {
+ return null;
+ }
+
+ ParameterDefinitionExt parameterDefinition = new ParameterDefinitionExt();
+ parameterDefinition.setType(propertyDefinition.getType());
+ parameterDefinition.setDescription(propertyDefinition.getDescription());
+ parameterDefinition.setRequired(propertyDefinition.getRequired());
+ parameterDefinition.set_default(propertyDefinition.get_default());
+ parameterDefinition.setStatus(propertyDefinition.getStatus());
+ parameterDefinition.setConstraints(propertyDefinition.getConstraints());
+ parameterDefinition.setEntry_schema(propertyDefinition.getEntry_schema());
+ parameterDefinition.setHidden(false);
+ parameterDefinition.setImmutable(false);
+
+ return parameterDefinition;
+ }
+
+ /**
+ * Convert attribute def to parameter def parameter definition ext.
+ *
+ * @param attributeDefinition the attribute definition
+ * @param outputValue the output value
+ * @return the parameter definition ext
+ */
+ public static ParameterDefinitionExt convertAttributeDefToParameterDef(
+ AttributeDefinition attributeDefinition, Map<String, List> outputValue) {
+ if (attributeDefinition == null) {
+ return null;
+ }
+ ParameterDefinitionExt parameterDefinition = new ParameterDefinitionExt();
+ parameterDefinition.setDescription(attributeDefinition.getDescription());
+ parameterDefinition.setValue(outputValue);
+ return parameterDefinition;
+ }
+
+ /**
+ * Clone constraints list.
+ *
+ * @param constraints the constraints
+ * @return the list
+ */
+ public static List<Constraint> cloneConstraints(List<Constraint> constraints) {
+ if (constraints == null) {
+ return null;
+ }
+ return constraints.stream().map(Constraint::clone).collect(Collectors.toList());
+ }
+
+ /**
+ * Clone valid source types list.
+ *
+ * @param validSourceTypes the valid source types
+ * @return the list
+ */
+ public static List<String> cloneValidSourceTypes(List<String> validSourceTypes) {
+ if (validSourceTypes == null) {
+ return null;
+ }
+ return validSourceTypes.stream().collect(Collectors.toList());
+ }
+
+ /**
+ * Clone property definitions map.
+ *
+ * @param propertyDefinitions the property definitions
+ * @return the map
+ */
+ public static Map<String, PropertyDefinition> clonePropertyDefinitions(
+ Map<String, PropertyDefinition> propertyDefinitions) {
+ if (propertyDefinitions == null) {
+ return null;
+ }
+ Map<String, PropertyDefinition> clonedProperties = new HashMap<>();
+ for (String propertyKey : propertyDefinitions.keySet()) {
+ clonedProperties.put(propertyKey, propertyDefinitions.get(propertyKey).clone());
+ }
+ return clonedProperties;
+ }
+
+ /**
+ * Clone attribute definitions map.
+ *
+ * @param attributeDefinitions the attribute definitions
+ * @return the map
+ */
+ public static Map<String, AttributeDefinition> cloneAttributeDefinitions(
+ Map<String, AttributeDefinition> attributeDefinitions) {
+ if (attributeDefinitions == null) {
+ return null;
+ }
+ Map<String, AttributeDefinition> clonedAttributeDefinitions = new HashMap<>();
+ for (String attributeKey : attributeDefinitions.keySet()) {
+ clonedAttributeDefinitions.put(attributeKey, attributeDefinitions.get(attributeKey).clone());
+ }
+ return clonedAttributeDefinitions;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaAnalyzerService.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaAnalyzerService.java
new file mode 100644
index 0000000000..271c471922
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaAnalyzerService.java
@@ -0,0 +1,66 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.services;
+
+import org.openecomp.sdc.tosca.datatypes.ToscaElementTypes;
+import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+public interface ToscaAnalyzerService {
+
+ /*
+ node template with type equal to node type or derived from node type
+ */
+ Map<String, NodeTemplate> getNodeTemplatesByType(ServiceTemplate serviceTemplate, String nodeType,
+ ToscaServiceModel toscaServiceModel);
+
+ boolean isTypeOf(NodeTemplate nodeTemplate, String nodeType, ServiceTemplate serviceTemplate,
+ ToscaServiceModel toscaServiceModel);
+
+ List<RequirementAssignment> getRequirements(NodeTemplate nodeTemplate, String requirementId);
+
+ Optional<NodeTemplate> getNodeTemplateById(ServiceTemplate serviceTemplate,
+ String nodeTemplateId);
+
+ Optional<String> getSubstituteServiceTemplateName(String substituteNodeTemplateId,
+ NodeTemplate substitutableNodeTemplate);
+
+ Map<String, NodeTemplate> getSubstitutableNodeTemplates(ServiceTemplate serviceTemplate);
+
+ Optional<Map.Entry<String, NodeTemplate>> getSubstitutionMappedNodeTemplateByExposedReq(
+ String substituteServiceTemplateFileName, ServiceTemplate substituteServiceTemplate,
+ String requirementId);
+
+ /*
+ match only for the input which is not null
+ */
+ boolean isDesiredRequirementAssignment(RequirementAssignment requirementAssignment,
+ String capability, String node, String relationship);
+
+ Object getFlatEntity(ToscaElementTypes elementType, String type, ServiceTemplate serviceTemplate,
+ ToscaServiceModel toscaModel);
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaConstants.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaConstants.java
new file mode 100644
index 0000000000..27cf07e166
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaConstants.java
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.services;
+
+
+public class ToscaConstants {
+
+ //TOSCA Node Types prefix
+ public static final String NODES_PREFIX = "org.openecomp.resource.vfc.nodes.heat.";
+ public static final String NODES_SUBSTITUTION_PREFIX
+ = "org.openecomp.resource.abstract.nodes.heat.";
+
+ //TOSCA Requirement Ids
+ public static final String DEPENDS_ON_REQUIREMENT_ID = "dependency";
+ public static final String BINDING_REQUIREMENT_ID = "binding";
+ public static final String LINK_REQUIREMENT_ID = "link";
+ public static final String LOCAL_STORAGE_REQUIREMENT_ID = "local_storage";
+ public static final String NETWORK_REQUIREMENT_ID = "network";
+ public static final String PORT_REQUIREMENT_ID = "port";
+
+ //TOSCA Capability Ids
+ public static final String BINDING_CAPABILITY_ID = "binding";
+ public static final String LINK_CAPABILITY_ID = "link";
+ public static final String HOST_CAPABILITY_ID = "host";
+ public static final String ENDPOINT_CAPABILITY_ID = "endpoint";
+ public static final String OS_CAPABILITY_ID = "os";
+ public static final String SCALABLE_CAPABILITY_ID = "scalable";
+
+ //General
+ public static final String TOSCA_DEFINITIONS_VERSION = "tosca_simple_yaml_1_0_0";
+ public static final String MODELABLE_ENTITY_NAME_SELF = "SELF";
+ public static final String NODE_TEMPLATE_DIRECTIVE_SUBSTITUTABLE = "substitutable";
+ public static final String NATIVE_TYPES_SERVICE_TEMPLATE_NAME = "NativeTypesServiceTemplate";
+ public static final String UNBOUNDED = "UNBOUNDED";
+
+ //properties
+ public static final String SERVICE_TEMPLATE_FILTER_PROPERTY_NAME = "service_template_filter";
+ public static final String SUBSTITUTE_SERVICE_TEMPLATE_PROPERTY_NAME =
+ "substitute_service_template";
+ public static final String COUNT_PROPERTY_NAME = "count";
+ public static final String INDEX_VALUE_PROPERTY_NAME = "index_value";
+ public static final String SCALING_ENABLED_PROPERTY_NAME = "scaling_enabled";
+
+ public static final String DHCP_ENABLED_PROPERTY_NAME = "dhcp_enabled";
+
+
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaFileOutputService.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaFileOutputService.java
new file mode 100644
index 0000000000..7ec2fffa2b
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaFileOutputService.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.services;
+
+import org.openecomp.core.utilities.file.FileContentHandler;
+import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
+
+public interface ToscaFileOutputService {
+ byte[] createOutputFile(ToscaServiceModel toscaServiceModel,
+ FileContentHandler externalArtifacts);
+
+ String createMetaFile(String entryDefinitionsFileName);
+
+ String getArtifactsFolderName();
+
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaNativeTypesServiceTemplate.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaNativeTypesServiceTemplate.java
new file mode 100644
index 0000000000..013d761168
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaNativeTypesServiceTemplate.java
@@ -0,0 +1,309 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.services;
+
+import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
+import org.openecomp.sdc.tosca.datatypes.ToscaDataType;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
+
+import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.InterfaceDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * The type Tosca native types service template.
+ */
+public class ToscaNativeTypesServiceTemplate {
+ /**
+ * Create service template service template.
+ *
+ * @return the service template
+ */
+ public static ServiceTemplate createServiceTemplate() {
+ ServiceTemplate nativeNodeTypesServiceTemplate = new ServiceTemplate();
+ nativeNodeTypesServiceTemplate
+ .setTosca_definitions_version(ToscaConstants.TOSCA_DEFINITIONS_VERSION);
+ nativeNodeTypesServiceTemplate.setMetadata(DataModelUtil
+ .createMetadata(ToscaConstants.NATIVE_TYPES_SERVICE_TEMPLATE_NAME, "1.0.0", null));
+ nativeNodeTypesServiceTemplate.setDescription("TOSCA Native Node Types");
+ nativeNodeTypesServiceTemplate.setNode_types(createNativeNodeTypes());
+ return nativeNodeTypesServiceTemplate;
+ }
+
+ private static Map<String, NodeType> createNativeNodeTypes() {
+ Map<String, NodeType> nativeNodeTypes = new HashMap<>();
+ nativeNodeTypes.put(ToscaNodeType.COMPUTE.getDisplayName(), createToscaNodesComputeNodeType());
+ nativeNodeTypes.put(ToscaNodeType.ROOT.getDisplayName(), createToscaNodesRootNodeType());
+ nativeNodeTypes
+ .put(ToscaNodeType.NETWORK_PORT.getDisplayName(), createToscaNodesPortsNodeType());
+ nativeNodeTypes
+ .put(ToscaNodeType.BLOCK_STORAGE.getDisplayName(), createToscaNodesBlockStorageNodeType());
+ nativeNodeTypes.put(ToscaNodeType.NETWORK.getDisplayName(), createToscaNodesNetworkNodeType());
+ return nativeNodeTypes;
+ }
+
+ private static NodeType createToscaNodesComputeNodeType() {
+ NodeType computeNodeType = new NodeType();
+ computeNodeType.setDerived_from(ToscaNodeType.ROOT.getDisplayName());
+ computeNodeType.setAttributes(createComputeAttributes());
+ computeNodeType.setRequirements(createComputeRequirements());
+ computeNodeType.setCapabilities(createComputeCapabilities());
+ return computeNodeType;
+ }
+
+ private static NodeType createToscaNodesRootNodeType() {
+ NodeType computeNodeType = new NodeType();
+ computeNodeType.setAttributes(createRootAttributes());
+ computeNodeType.setInterfaces(createRootInterfaces());
+ return computeNodeType;
+ }
+
+ private static NodeType createToscaNodesPortsNodeType() {
+ NodeType computeNodeType = new NodeType();
+ computeNodeType.setDerived_from(ToscaNodeType.ROOT.getDisplayName());
+ computeNodeType.setProperties(createToscaNodesPortProperties());
+ computeNodeType.setRequirements(createToscaNodesPortRequirements());
+ return computeNodeType;
+ }
+
+ private static NodeType createToscaNodesBlockStorageNodeType() {
+ NodeType computeNodeType = new NodeType();
+ computeNodeType.setDerived_from(ToscaNodeType.ROOT.getDisplayName());
+ computeNodeType.setProperties(createToscaNodesBlockStorageProperties());
+ computeNodeType.setCapabilities(createToscaNodesBlockStorageCapabilities());
+ return computeNodeType;
+ }
+
+ private static NodeType createToscaNodesNetworkNodeType() {
+ NodeType computeNodeType = new NodeType();
+ computeNodeType.setDerived_from(ToscaNodeType.ROOT.getDisplayName());
+ computeNodeType.setProperties(createToscaNodesNetworkProperties());
+ computeNodeType.setCapabilities(createToscaNodesNetworkCapabilities());
+ return computeNodeType;
+ }
+
+ private static Map<String, PropertyDefinition> createToscaNodesPortProperties() {
+ Map<String, PropertyDefinition> propertyDefinitionMap = new HashMap<>();
+ propertyDefinitionMap.put("ip_address", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), null, false, null, null,
+ null, null));
+ propertyDefinitionMap.put("order", DataModelUtil
+ .createPropertyDefinition(PropertyType.INTEGER.getDisplayName(), null, true,
+ DataModelUtil.getConstrainList(DataModelUtil.createGreaterOrEqualConstrain(0)), null,
+ null, 0));
+ propertyDefinitionMap.put("is_default", DataModelUtil
+ .createPropertyDefinition(PropertyType.BOOLEAN.getDisplayName(), null, false, null, null,
+ null, false));
+ propertyDefinitionMap.put("ip_range_start", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), null, false, null, null,
+ null, null));
+ propertyDefinitionMap.put("ip_range_end", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), null, false, null, null,
+ null, null));
+ return propertyDefinitionMap;
+ }
+
+ private static Map<String, PropertyDefinition> createToscaNodesBlockStorageProperties() {
+ Map<String, PropertyDefinition> propertyDefinitionMap = new HashMap<>();
+ propertyDefinitionMap.put("size", DataModelUtil
+ .createPropertyDefinition(PropertyType.SCALAR_UNIT_SIZE.getDisplayName(), null, false,
+ DataModelUtil.getConstrainList(DataModelUtil.createGreaterOrEqualConstrain("1 MB")),
+ null, null, null));
+ propertyDefinitionMap.put("volume_id", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), null, false, null, null,
+ null, null));
+ propertyDefinitionMap.put("snapshot_id", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), null, false, null, null,
+ null, null));
+ return propertyDefinitionMap;
+ }
+
+ private static Map<String, PropertyDefinition> createToscaNodesNetworkProperties() {
+ Map<String, PropertyDefinition> propertyDefinitionMap = new HashMap<>();
+ propertyDefinitionMap.put("ip_version", DataModelUtil
+ .createPropertyDefinition(PropertyType.INTEGER.getDisplayName(), null, false,
+ DataModelUtil.getConstrainList(DataModelUtil.createValidValuesConstraint(4, 6)), null,
+ null, 4));
+ propertyDefinitionMap.put("cidr", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), null, false, null, null,
+ null, null));
+ propertyDefinitionMap.put("start_ip", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), null, false, null, null,
+ null, null));
+ propertyDefinitionMap.put("end_ip", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), null, false, null, null,
+ null, null));
+ propertyDefinitionMap.put("gateway_ip", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), null, false, null, null,
+ null, null));
+ propertyDefinitionMap.put("network_name", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), null, false, null, null,
+ null, null));
+ propertyDefinitionMap.put("network_id", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), null, false, null, null,
+ null, null));
+ propertyDefinitionMap.put("segmentation_id", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), null, false, null, null,
+ null, null));
+ propertyDefinitionMap.put("network_type", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), null, false, null, null,
+ null, null));
+ propertyDefinitionMap.put("physical_network", DataModelUtil
+ .createPropertyDefinition(PropertyType.STRING.getDisplayName(), null, false, null, null,
+ null, null));
+ propertyDefinitionMap.put("dhcp_enabled", DataModelUtil
+ .createPropertyDefinition(PropertyType.BOOLEAN.getDisplayName(), null, false, null, null,
+ null, true));
+
+ return propertyDefinitionMap;
+ }
+
+ private static Map<String, InterfaceDefinition> createRootInterfaces() {
+ return new HashMap<>();
+ }
+
+ private static Map<String, CapabilityDefinition> createComputeCapabilities() {
+ Map<String, CapabilityDefinition> computeCapabilities = new HashMap<>();
+ computeCapabilities.put(ToscaConstants.HOST_CAPABILITY_ID,
+ createCapabilityDefinition(ToscaCapabilityType.CONTAINER.getDisplayName(),
+ createValidSourceTypes("tosca.nodes.SoftwareComponent")));
+ computeCapabilities.put(ToscaConstants.ENDPOINT_CAPABILITY_ID,
+ createCapabilityDefinition(ToscaCapabilityType.ENDPOINT_ADMIN.getDisplayName(), null));
+ computeCapabilities.put(ToscaConstants.OS_CAPABILITY_ID,
+ createCapabilityDefinition(ToscaCapabilityType.OPERATING_SYSTEM.getDisplayName(), null));
+ computeCapabilities.put(ToscaConstants.SCALABLE_CAPABILITY_ID,
+ createCapabilityDefinition(ToscaCapabilityType.SCALABLE.getDisplayName(), null));
+ computeCapabilities.put(ToscaConstants.BINDING_CAPABILITY_ID,
+ createCapabilityDefinition(ToscaCapabilityType.NETWORK_BINDABLE.getDisplayName(), null));
+ return computeCapabilities;
+ }
+
+ private static Map<String, CapabilityDefinition> createToscaNodesBlockStorageCapabilities() {
+ Map<String, CapabilityDefinition> computeCapabilities = new HashMap<>();
+ computeCapabilities.put("attachment",
+ createCapabilityDefinition(ToscaCapabilityType.ATTACHMENT.getDisplayName(), null));
+ return computeCapabilities;
+ }
+
+ private static Map<String, CapabilityDefinition> createToscaNodesNetworkCapabilities() {
+ Map<String, CapabilityDefinition> computeCapabilities = new HashMap<>();
+ computeCapabilities.put(ToscaConstants.LINK_CAPABILITY_ID,
+ createCapabilityDefinition(ToscaCapabilityType.NETWORK_LINKABLE.getDisplayName(), null));
+ return computeCapabilities;
+ }
+
+ private static List<String> createValidSourceTypes(String... validSourceTypes) {
+ return Arrays.asList(validSourceTypes);
+ }
+
+ private static CapabilityDefinition createCapabilityDefinition(String type,
+ List<String> validSourceTypes) {
+ CapabilityDefinition capabilityDefinition = new CapabilityDefinition();
+ capabilityDefinition.setType(type);
+ capabilityDefinition.setValid_source_types(validSourceTypes);
+ return capabilityDefinition;
+ }
+
+ private static List<Map<String, RequirementDefinition>> createComputeRequirements() {
+ List<Map<String, RequirementDefinition>> computeRequirementList = new ArrayList<>();
+ Map<String, RequirementDefinition> localStorageRequirement = new HashMap<>();
+ localStorageRequirement.put("local_storage", DataModelUtil
+ .createRequirement(ToscaCapabilityType.ATTACHMENT.getDisplayName(),
+ ToscaNodeType.BLOCK_STORAGE.getDisplayName(),
+ ToscaRelationshipType.NATIVE_ATTACHES_TO.getDisplayName(),
+ createOccurrences(0, ToscaConstants.UNBOUNDED)));
+ computeRequirementList.add(localStorageRequirement);
+ return computeRequirementList;
+ }
+
+ private static List<Map<String, RequirementDefinition>> createToscaNodesPortRequirements() {
+ List<Map<String, RequirementDefinition>> requirements = new ArrayList<>();
+
+ Map<String, RequirementDefinition> linkRequirement = new HashMap<>();
+ linkRequirement.put(ToscaConstants.LINK_REQUIREMENT_ID, DataModelUtil
+ .createRequirement(ToscaCapabilityType.NETWORK_LINKABLE.getDisplayName(),
+ ToscaNodeType.ROOT.getDisplayName(),
+ ToscaRelationshipType.NETWORK_LINK_TO.getDisplayName(), null));
+ requirements.add(linkRequirement);
+
+ Map<String, RequirementDefinition> bindingRequirement = new HashMap<>();
+ bindingRequirement.put(ToscaConstants.BINDING_REQUIREMENT_ID, DataModelUtil
+ .createRequirement(ToscaCapabilityType.NETWORK_BINDABLE.getDisplayName(),
+ ToscaNodeType.ROOT.getDisplayName(),
+ ToscaRelationshipType.NETWORK_BINDS_TO.getDisplayName(), null));
+ requirements.add(bindingRequirement);
+
+ return requirements;
+ }
+
+
+ private static Object[] createOccurrences(Object min, Object max) {
+ return new Object[]{min, max};
+
+ }
+
+ private static Map<String, AttributeDefinition> createComputeAttributes() {
+ Map<String, AttributeDefinition> computeAttributesDefMap = new HashMap<>();
+ computeAttributesDefMap.put("private_address", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(), "private address", null,
+ null, null));
+ computeAttributesDefMap.put("public_address", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(), "public_address", null,
+ null, null));
+ computeAttributesDefMap.put("networks", DataModelUtil
+ .createAttributeDefinition(PropertyType.MAP.getDisplayName(), "networks", null,
+ DataModelUtil
+ .createEntrySchema(ToscaDataType.NETWORK_NETWORK_INFO.getDisplayName(), null, null),
+ null));
+ computeAttributesDefMap.put("ports", DataModelUtil
+ .createAttributeDefinition(PropertyType.MAP.getDisplayName(), "ports", null, DataModelUtil
+ .createEntrySchema(ToscaDataType.NETWORK_PORT_INFO.getDisplayName(), null, null),
+ null));
+ return computeAttributesDefMap;
+ }
+
+ private static Map<String, AttributeDefinition> createRootAttributes() {
+ Map<String, AttributeDefinition> attributesDefMap = new HashMap<>();
+ attributesDefMap.put("tosca_id", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(), "tosca id", null, null,
+ null));
+ attributesDefMap.put("tosca_name", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(), "tosca name", null, null,
+ null));
+ attributesDefMap.put("state", DataModelUtil
+ .createAttributeDefinition(PropertyType.STRING.getDisplayName(), "state", null, null,
+ null));
+ return attributesDefMap;
+ }
+
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaUtil.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaUtil.java
new file mode 100644
index 0000000000..4f9c70267d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaUtil.java
@@ -0,0 +1,151 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.services;
+
+import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
+import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.CapabilityType;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.UUID;
+
+/**
+ * The type Tosca util.
+ */
+public class ToscaUtil {
+
+ /**
+ * Gets service template file name.
+ *
+ * @param serviceTemplate the service template
+ * @return the service template file name
+ */
+ public static String getServiceTemplateFileName(ServiceTemplate serviceTemplate) {
+ if (serviceTemplate == null) {
+ return null;
+ }
+ if (serviceTemplate.getMetadata() == null) {
+ return UUID.randomUUID().toString() + "ServiceTemplate.yaml";
+ }
+ return getServiceTemplateFileName(serviceTemplate.getMetadata().getTemplate_name());
+ }
+
+ /**
+ * Gets service template file name.
+ *
+ * @param templateName the template name
+ * @return the service template file name
+ */
+ public static String getServiceTemplateFileName(String templateName) {
+ return (Objects.isNull(templateName) ? UUID.randomUUID().toString() : templateName)
+ + "ServiceTemplate.yaml";
+ }
+
+ /**
+ * Add service template to map with key file name.
+ *
+ * @param serviceTemplates the service templates
+ * @param commonServiceTemplate the common service template
+ */
+ public static void addServiceTemplateToMapWithKeyFileName(
+ Map<String, ServiceTemplate> serviceTemplates, ServiceTemplate commonServiceTemplate) {
+ serviceTemplates
+ .put(ToscaUtil.getServiceTemplateFileName(commonServiceTemplate), commonServiceTemplate);
+ }
+
+ /**
+ * Convert type to definition capability definition.
+ *
+ * @param type the type
+ * @param capabilityType the capability type
+ * @param properties the properties
+ * @param description the description
+ * @return the capability definition
+ */
+ public static CapabilityDefinition convertTypeToDefinition(String type,
+ CapabilityType capabilityType,
+ Map<String, Object> properties,
+ String description) {
+ CapabilityDefinition capabilityDefinition = new CapabilityDefinition();
+ capabilityDefinition.setAttributes(capabilityType.getAttributes());
+ capabilityDefinition.setProperties(capabilityType.getProperties());
+ if (description == null) {
+ capabilityDefinition.setDescription(capabilityType.getDescription());
+ } else {
+ capabilityDefinition.setDescription(description);
+ }
+ capabilityDefinition.setType(type);
+
+ capabilityDefinition.getProperties()
+ .entrySet()
+ .stream()
+ .filter(entry -> properties.containsKey(entry.getKey()))
+ .forEach(entry -> entry.getValue()
+ .set_default(properties.get(entry.getKey())));
+
+
+ return capabilityDefinition;
+
+ }
+
+ /**
+ * Normalize component name node type map.
+ *
+ * @param toscaModel the tosca model
+ * @param components the components
+ * @return the map
+ */
+ public static Map<String, List<NodeType>> normalizeComponentNameNodeType(
+ ToscaServiceModel toscaModel, Set<String> components) {
+
+ Map<String, List<NodeType>> normalizedData = new HashMap<>();
+ toscaModel
+ .getServiceTemplates()
+ .entrySet().stream().filter(entry -> entry
+ .getValue()
+ .getNode_types() != null)
+ .forEach(entry -> entry
+ .getValue()
+ .getNode_types()
+ .entrySet().stream()
+ .filter(nodeTypeEntry -> components
+ .contains(nodeTypeEntry
+ .getKey()))
+ .forEach(nodeTypeEntry -> addNodeType(nodeTypeEntry.getKey(), nodeTypeEntry.getValue(),
+ normalizedData)));
+ return normalizedData;
+ }
+
+ private static void addNodeType(String key, NodeType value,
+ Map<String, List<NodeType>> normalizedData) {
+ if (!normalizedData.containsKey(key)) {
+ normalizedData.put(key, new ArrayList<>());
+ }
+ normalizedData.get(key).add(value);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaAnalyzerServiceImpl.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaAnalyzerServiceImpl.java
new file mode 100644
index 0000000000..a11bff4b6a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaAnalyzerServiceImpl.java
@@ -0,0 +1,467 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.services.impl;
+
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections4.MapUtils;
+import org.openecomp.core.utilities.CommonMethods;
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
+import org.openecomp.sdc.tosca.datatypes.ToscaElementTypes;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
+import org.openecomp.sdc.tosca.datatypes.model.CapabilityType;
+import org.openecomp.sdc.tosca.datatypes.model.Import;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.errors.ToscaInvalidEntryNotFoundErrorBuilder;
+import org.openecomp.sdc.tosca.errors.ToscaInvalidSubstituteNodeTemplatePropertiesErrorBuilder;
+import org.openecomp.sdc.tosca.errors.ToscaInvalidSubstitutionServiceTemplateErrorBuilder;
+import org.openecomp.sdc.tosca.errors.ToscaNodeTypeNotFoundErrorBuilder;
+import org.openecomp.sdc.tosca.services.ToscaAnalyzerService;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.tosca.services.yamlutil.ToscaExtensionYamlUtil;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+
+public class ToscaAnalyzerServiceImpl implements ToscaAnalyzerService {
+ /*
+ node template with type equal to node type or derived from node type.
+ */
+ @Override
+ public Map<String, NodeTemplate> getNodeTemplatesByType(ServiceTemplate serviceTemplate,
+ String nodeType,
+ ToscaServiceModel toscaServiceModel) {
+ Map<String, NodeTemplate> nodeTemplates = new HashMap<>();
+
+ if (Objects.nonNull(serviceTemplate.getTopology_template())
+ && MapUtils.isNotEmpty(serviceTemplate.getTopology_template().getNode_templates())) {
+ for (Map.Entry<String, NodeTemplate> nodeTemplateEntry : serviceTemplate
+ .getTopology_template().getNode_templates().entrySet()) {
+ if (isTypeOf(nodeTemplateEntry.getValue(), nodeType, serviceTemplate, toscaServiceModel)) {
+ nodeTemplates.put(nodeTemplateEntry.getKey(), nodeTemplateEntry.getValue());
+ }
+
+ }
+ }
+ return nodeTemplates;
+ }
+
+ @Override
+ public boolean isTypeOf(NodeTemplate nodeTemplate, String nodeType,
+ ServiceTemplate serviceTemplate, ToscaServiceModel toscaServiceModel) {
+ if (nodeTemplate == null) {
+ return false;
+ }
+
+ if (isNodeTemplateOfTypeNodeType(nodeTemplate, nodeType)) {
+ return true;
+ }
+
+ Optional<Boolean> nodeTypeExistInServiceTemplateHierarchy =
+ isNodeTypeExistInServiceTemplateHierarchy(nodeType, nodeTemplate.getType(), serviceTemplate,
+ toscaServiceModel, null);
+ return nodeTypeExistInServiceTemplateHierarchy.orElseThrow(() -> new CoreException(
+ new ToscaNodeTypeNotFoundErrorBuilder(nodeTemplate.getType()).build()));
+ }
+
+
+ private Optional<Boolean> isNodeTypeExistInServiceTemplateHierarchy(String nodeTypeToMatch,
+ String nodeTypeToSearch,
+ ServiceTemplate serviceTemplate,
+ ToscaServiceModel toscaServiceModel,
+ Set<String> analyzedImportFiles) {
+ Map<String, NodeType> searchableNodeTypes = serviceTemplate.getNode_types();
+ if (!MapUtils.isEmpty(searchableNodeTypes)) {
+ NodeType nodeType = searchableNodeTypes.get(nodeTypeToSearch);
+ if (Objects.nonNull(nodeType)) {
+ if (Objects.equals(nodeType.getDerived_from(), nodeTypeToMatch)) {
+ return Optional.of(true);
+ } else if (isNodeTypeIsToscaRoot(nodeType)) {
+ return Optional.of(false);
+ } else {
+ return isNodeTypeExistInServiceTemplateHierarchy(nodeTypeToMatch,
+ nodeType.getDerived_from(), serviceTemplate, toscaServiceModel, null);
+ }
+ } else {
+ return isNodeTypeExistInImports(nodeTypeToMatch, nodeTypeToSearch, serviceTemplate,
+ toscaServiceModel, analyzedImportFiles);
+ }
+ }
+ return isNodeTypeExistInImports(nodeTypeToMatch, nodeTypeToSearch, serviceTemplate,
+ toscaServiceModel, analyzedImportFiles);
+
+ }
+
+ private Optional<Boolean> isNodeTypeExistInImports(String nodeTypeToMatch,
+ String nodeTypeToSearch,
+ ServiceTemplate serviceTemplate,
+ ToscaServiceModel toscaServiceModel,
+ Set<String> analyzedImportFiles) {
+ Map<String, Import> imports = serviceTemplate.getImports();
+ if (imports == null) {
+ return Optional.empty();
+ }
+
+ analyzedImportFiles = createAnalyzedImportFilesSet(analyzedImportFiles);
+ for (Import anImport : imports.values()) {
+ if (Objects.isNull(anImport) || Objects.isNull(anImport.getFile())) {
+ throw new RuntimeException("import without file entry");
+ }
+ String importFile = anImport.getFile();
+ if (analyzedImportFiles.contains(importFile)) {
+ continue;
+ }
+ addImportFileToAnalyzedImportFilesSet(analyzedImportFiles, importFile);
+ ServiceTemplate template = toscaServiceModel.getServiceTemplates().get(importFile);
+ Optional<Boolean> nodeTypeExistInServiceTemplateHierarchy =
+ isNodeTypeExistInServiceTemplateHierarchy(nodeTypeToMatch, nodeTypeToSearch, template,
+ toscaServiceModel, analyzedImportFiles);
+ if (nodeTypeExistInServiceTemplateHierarchy.isPresent()) {
+ if (nodeTypeExistInServiceTemplateHierarchy.get()) {
+ return Optional.of(true);
+ }
+ }
+ }
+ return Optional.of(false);
+ }
+
+ private Set<String> addImportFileToAnalyzedImportFilesSet(Set<String> analyzedImportFiles,
+ String importFile) {
+ analyzedImportFiles.add(importFile);
+ return analyzedImportFiles;
+ }
+
+ private Set<String> createAnalyzedImportFilesSet(Set<String> analyzedImportFiles) {
+ if (Objects.isNull(analyzedImportFiles)) {
+ analyzedImportFiles = new HashSet<>();
+ }
+ return analyzedImportFiles;
+ }
+
+ private boolean isNodeTypeIsToscaRoot(NodeType stNodeType) {
+ return Objects.equals(stNodeType.getDerived_from(), ToscaNodeType.ROOT.getDisplayName());
+ }
+
+ private boolean isNodeTemplateOfTypeNodeType(NodeTemplate nodeTemplate, String nodeType) {
+ return Objects.equals(nodeTemplate.getType(), nodeType);
+ }
+
+ @Override
+ public List<RequirementAssignment> getRequirements(NodeTemplate nodeTemplate,
+ String requirementId) {
+ List<RequirementAssignment> requirements = new ArrayList<>();
+ List<Map<String, RequirementAssignment>> requirementList = nodeTemplate.getRequirements();
+ if (requirementList != null) {
+ requirementList.stream().filter(reqMap -> reqMap.get(requirementId) != null)
+ .forEach(reqMap -> {
+ ToscaExtensionYamlUtil toscaExtensionYamlUtil = new ToscaExtensionYamlUtil();
+ RequirementAssignment reqAssignment = toscaExtensionYamlUtil
+ .yamlToObject(toscaExtensionYamlUtil.objectToYaml(reqMap.get(requirementId)),
+ RequirementAssignment.class);
+ requirements.add(reqAssignment);
+ });
+ }
+ return requirements;
+ }
+
+ @Override
+ public Optional<NodeTemplate> getNodeTemplateById(ServiceTemplate serviceTemplate,
+ String nodeTemplateId) {
+ if ((serviceTemplate.getTopology_template() != null)
+ && (serviceTemplate.getTopology_template().getNode_templates() != null)
+ && (serviceTemplate.getTopology_template().getNode_templates()
+ .get(nodeTemplateId) != null)) {
+ return Optional
+ .of(serviceTemplate.getTopology_template().getNode_templates().get(nodeTemplateId));
+ }
+ return Optional.empty();
+ }
+
+ @Override
+ public Optional<String> getSubstituteServiceTemplateName(String substituteNodeTemplateId,
+ NodeTemplate substitutableNodeTemplate) {
+ if (!isSubstitutableNodeTemplate(substitutableNodeTemplate)) {
+ return Optional.empty();
+ }
+
+ if (substitutableNodeTemplate.getProperties() != null
+ && substitutableNodeTemplate.getProperties()
+ .get(ToscaConstants.SERVICE_TEMPLATE_FILTER_PROPERTY_NAME) != null) {
+ Object serviceTemplateFilter = substitutableNodeTemplate.getProperties()
+ .get(ToscaConstants.SERVICE_TEMPLATE_FILTER_PROPERTY_NAME);
+ if (serviceTemplateFilter != null && serviceTemplateFilter instanceof Map) {
+ Object substituteServiceTemplate = ((Map) serviceTemplateFilter)
+ .get(ToscaConstants.SUBSTITUTE_SERVICE_TEMPLATE_PROPERTY_NAME);
+ if (substituteServiceTemplate == null) {
+ throw new CoreException(
+ new ToscaInvalidSubstituteNodeTemplatePropertiesErrorBuilder(substituteNodeTemplateId)
+ .build());
+ }
+ return Optional.of(substituteServiceTemplate.toString());
+ }
+ }
+ throw new CoreException(
+ new ToscaInvalidSubstituteNodeTemplatePropertiesErrorBuilder(substituteNodeTemplateId)
+ .build());
+ }
+
+ @Override
+ public Map<String, NodeTemplate> getSubstitutableNodeTemplates(ServiceTemplate serviceTemplate) {
+ Map<String, NodeTemplate> substitutableNodeTemplates = new HashMap<>();
+
+ if (serviceTemplate == null
+ || serviceTemplate.getTopology_template() == null
+ || serviceTemplate.getTopology_template().getNode_templates() == null) {
+ return substitutableNodeTemplates;
+ }
+
+ Map<String, NodeTemplate> nodeTemplates =
+ serviceTemplate.getTopology_template().getNode_templates();
+ for (String nodeTemplateId : nodeTemplates.keySet()) {
+ NodeTemplate nodeTemplate = nodeTemplates.get(nodeTemplateId);
+ if (isSubstitutableNodeTemplate(nodeTemplate)) {
+ substitutableNodeTemplates.put(nodeTemplateId, nodeTemplate);
+ }
+ }
+
+ return substitutableNodeTemplates;
+ }
+
+ private boolean isSubstitutableNodeTemplate(NodeTemplate nodeTemplate) {
+ return nodeTemplate.getDirectives() != null
+ && nodeTemplate.getDirectives().contains(ToscaConstants
+ .NODE_TEMPLATE_DIRECTIVE_SUBSTITUTABLE);
+ }
+
+ private boolean isSubstitutionServiceTemplate(String substituteServiceTemplateFileName,
+ ServiceTemplate substituteServiceTemplate) {
+ if (substituteServiceTemplate != null
+ && substituteServiceTemplate.getTopology_template() != null
+ && substituteServiceTemplate.getTopology_template().getSubstitution_mappings() != null) {
+ if (substituteServiceTemplate.getTopology_template().getSubstitution_mappings()
+ .getNode_type() == null) {
+ throw new CoreException(new ToscaInvalidSubstitutionServiceTemplateErrorBuilder(
+ substituteServiceTemplateFileName).build());
+ }
+ return true;
+ }
+ return false;
+
+ }
+
+ @Override
+ public Optional<Map.Entry<String, NodeTemplate>> getSubstitutionMappedNodeTemplateByExposedReq(
+ String substituteServiceTemplateFileName, ServiceTemplate substituteServiceTemplate,
+ String requirementId) {
+ if (isSubstitutionServiceTemplate(substituteServiceTemplateFileName,
+ substituteServiceTemplate)) {
+ Map<String, List<String>> substitutionMappingRequirements =
+ substituteServiceTemplate.getTopology_template().getSubstitution_mappings()
+ .getRequirements();
+ if (substitutionMappingRequirements != null) {
+ List<String> requirementMapping = substitutionMappingRequirements.get(requirementId);
+ if (requirementMapping != null && !requirementMapping.isEmpty()) {
+ String mappedNodeTemplateId = requirementMapping.get(0);
+ Optional<NodeTemplate> mappedNodeTemplate =
+ getNodeTemplateById(substituteServiceTemplate, mappedNodeTemplateId);
+ mappedNodeTemplate.orElseThrow(() -> new CoreException(
+ new ToscaInvalidEntryNotFoundErrorBuilder("Node Template", mappedNodeTemplateId)
+ .build()));
+ Map.Entry<String, NodeTemplate> mappedNodeTemplateEntry =
+ new Map.Entry<String, NodeTemplate>() {
+ @Override
+ public String getKey() {
+ return mappedNodeTemplateId;
+ }
+
+ @Override
+ public NodeTemplate getValue() {
+ return mappedNodeTemplate.get();
+ }
+
+ @Override
+ public NodeTemplate setValue(NodeTemplate value) {
+ return null;
+ }
+ };
+ return Optional.of(mappedNodeTemplateEntry);
+ }
+ }
+ }
+ return Optional.empty();
+ }
+
+
+ /*
+ match only for the input which is not null
+ */
+ @Override
+ public boolean isDesiredRequirementAssignment(RequirementAssignment requirementAssignment,
+ String capability, String node,
+ String relationship) {
+ if (capability != null) {
+ if (requirementAssignment.getCapability() == null
+ || !requirementAssignment.getCapability().equals(capability)) {
+ return false;
+ }
+ }
+
+ if (node != null) {
+ if (requirementAssignment.getNode() == null
+ || !requirementAssignment.getNode().equals(node)) {
+ return false;
+ }
+ }
+
+ if (relationship != null) {
+ if (requirementAssignment.getRelationship() == null
+ || !requirementAssignment.getRelationship().equals(relationship)) {
+ return false;
+ }
+ }
+
+ return !(capability == null && node == null && relationship == null);
+
+ }
+
+ @Override
+ public Object getFlatEntity(ToscaElementTypes elementType, String typeId,
+ ServiceTemplate serviceTemplate, ToscaServiceModel toscaModel) {
+ Object returnEntity;
+
+ switch (elementType) {
+ case CAPABILITY_TYPE:
+ returnEntity = new CapabilityType();
+ break;
+ default:
+ throw new RuntimeException(
+ "Entity[" + elementType + "] id[" + typeId + "] flat not supported");
+ }
+
+ scanAnFlatEntity(elementType, typeId, returnEntity, serviceTemplate, toscaModel);
+
+
+ return returnEntity;
+ }
+
+ private void scanAnFlatEntity(ToscaElementTypes elementType, String typeId, Object entity,
+ ServiceTemplate serviceTemplate, ToscaServiceModel toscaModel) {
+
+
+ boolean entityFound =
+ enrichEntityFromCurrentServiceTemplate(elementType, typeId, entity, serviceTemplate,
+ toscaModel);
+ if (!entityFound) {
+ Map<String, Import> imports = serviceTemplate.getImports();
+ if (MapUtils.isEmpty(imports)) {
+ return;
+ }
+ for (Import importServiceTemplate : imports.values()) {
+ ServiceTemplate template =
+ toscaModel.getServiceTemplates().get(importServiceTemplate.getFile());
+ scanAnFlatEntity(elementType, typeId, entity, template, toscaModel);
+ }
+ }
+
+
+ }
+
+ private boolean enrichEntityFromCurrentServiceTemplate(ToscaElementTypes elementType,
+ String typeId, Object entity,
+ ServiceTemplate serviceTemplate,
+ ToscaServiceModel toscaModel) {
+ String derivedFrom;
+ switch (elementType) {
+ case CAPABILITY_TYPE:
+ if (serviceTemplate.getCapability_types() != null
+ && serviceTemplate.getCapability_types().containsKey(typeId)) {
+
+ CapabilityType targetCapabilityType = ((CapabilityType) entity);
+ CapabilityType sourceCapabilityType = serviceTemplate.getCapability_types().get(typeId);
+ derivedFrom = sourceCapabilityType.getDerived_from();
+ if (derivedFrom != null
+ && !ToscaCapabilityType.NFV_METRIC.getDisplayName().equals(derivedFrom)) {
+ scanAnFlatEntity(elementType, derivedFrom, entity, serviceTemplate, toscaModel);
+ }
+ combineCapabilityTypeInfo(sourceCapabilityType, targetCapabilityType);
+ } else {
+ return false;
+ }
+ break;
+ default:
+ throw new RuntimeException(
+ "Entity[" + elementType + "] id[" + typeId + "] flat not supported");
+ }
+
+ return true;
+
+
+ }
+
+ private void combineCapabilityTypeInfo(CapabilityType sourceCapabilityType,
+ CapabilityType targetCapabilityType) {
+ if (MapUtils.isNotEmpty(sourceCapabilityType.getAttributes())) {
+ if (targetCapabilityType.getAttributes() == null) {
+ targetCapabilityType.setAttributes(new HashMap<>());
+ }
+ targetCapabilityType.getAttributes().putAll(sourceCapabilityType.getAttributes());
+ }
+
+ if (MapUtils.isNotEmpty(sourceCapabilityType.getProperties())) {
+ if (targetCapabilityType.getProperties() == null) {
+ targetCapabilityType.setProperties(new HashMap<>());
+ }
+ targetCapabilityType.getProperties().putAll(sourceCapabilityType.getProperties());
+ }
+
+ if (CollectionUtils.isNotEmpty(sourceCapabilityType.getValid_source_types())) {
+ if (targetCapabilityType.getValid_source_types() == null) {
+ targetCapabilityType.setValid_source_types(new ArrayList<>());
+ }
+ targetCapabilityType.getValid_source_types()
+ .addAll(sourceCapabilityType.getValid_source_types());
+ }
+
+ if (CommonMethods.isEmpty(sourceCapabilityType.getDerived_from())) {
+ targetCapabilityType.setDerived_from(sourceCapabilityType.getDerived_from());
+ }
+ if (CommonMethods.isEmpty(sourceCapabilityType.getDescription())) {
+ targetCapabilityType.setDescription(sourceCapabilityType.getDescription());
+ }
+ if (CommonMethods.isEmpty(sourceCapabilityType.getVersion())) {
+ targetCapabilityType.setVersion(sourceCapabilityType.getVersion());
+ }
+
+
+ }
+
+
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImpl.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImpl.java
new file mode 100644
index 0000000000..d4c22f105f
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImpl.java
@@ -0,0 +1,158 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.services.impl;
+
+import org.openecomp.core.utilities.file.FileContentHandler;
+import org.openecomp.core.utilities.file.FileUtils;
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.exceptions.CsarCreationErrorBuilder;
+import org.openecomp.sdc.tosca.exceptions.CsarMissingEntryPointErrorBuilder;
+import org.openecomp.sdc.tosca.services.ToscaFileOutputService;
+
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Map;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
+
+public class ToscaFileOutputServiceCsarImpl implements ToscaFileOutputService {
+ static final String EXTERNAL_ARTIFACTS_FOLDER_NAME = "Artifacts";
+ private static final String DEFINITIONS_FOLDER_NAME = "Definitions";
+ private static final String ARTIFACTS_FOLDER_NAME = "Artifacts";
+ //todo currently duplicated, to be changed when external artifacts are separated from internal
+ private static final String TOSCA_META_FOLDER_NAME = "TOSCA-Metadata";
+ private static final String TOSCA_META_FILE_VERSION = "TOSCA-Meta-File-Version";
+ private static final String TOSCA_META_FILE_VERSION_VALUE = "1.0";
+ private static final String TOSCA_META_FILE_NAME = "TOSCA.meta";
+ private static final String CSAR_VERSION = "CSAR-Version";
+ private static final String CSAR_VERSION_VALUE = "1.1";
+ private static final String CREATED_BY = "Created-By";
+ private static final String CREATED_BY_VALUE = "ASDC Onboarding portal";
+ private static final String ENTRY_DEFINITIONS = "Entry-Definitions";
+ private static final String META_FILE_DELIMITER = ":";
+ private static final String SPACE = " ";
+ private static final String FILE_SEPARATOR = File.separator;
+
+ @Override
+ public byte[] createOutputFile(ToscaServiceModel toscaServiceModel,
+ FileContentHandler externalArtifacts) {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ try (ZipOutputStream zos = new ZipOutputStream(new BufferedOutputStream(baos))) {
+ packDefinitions(zos, toscaServiceModel.getServiceTemplates());
+ FileContentHandler artifactFiles = toscaServiceModel.getArtifactFiles();
+ if (artifactFiles != null && !artifactFiles.isEmpty()) {
+ packArtifacts(zos, artifactFiles);
+ }
+ if (toscaServiceModel.getEntryDefinitionServiceTemplate() == null) {
+ throw new CoreException(new CsarMissingEntryPointErrorBuilder().build());
+ }
+ createAndPackToscaMetaFile(zos, toscaServiceModel.getEntryDefinitionServiceTemplate());
+ if (externalArtifacts != null) {
+ packExternalArtifacts(zos, externalArtifacts);
+ }
+ } catch (IOException exc) {
+ throw new CoreException(new CsarCreationErrorBuilder().build(), exc);
+ }
+ return baos.toByteArray();
+ }
+
+ @Override
+ public String createMetaFile(String entryDefinitionsFileName) {
+ return TOSCA_META_FILE_VERSION + META_FILE_DELIMITER + SPACE + TOSCA_META_FILE_VERSION_VALUE
+ + System.lineSeparator()
+ + CSAR_VERSION + META_FILE_DELIMITER + SPACE + CSAR_VERSION_VALUE + System.lineSeparator()
+ + CREATED_BY + META_FILE_DELIMITER + SPACE + CREATED_BY_VALUE + System.lineSeparator()
+ + ENTRY_DEFINITIONS + META_FILE_DELIMITER + SPACE + DEFINITIONS_FOLDER_NAME
+ + FILE_SEPARATOR + entryDefinitionsFileName;
+ }
+
+ @Override
+ public String getArtifactsFolderName() {
+ return ARTIFACTS_FOLDER_NAME;
+ }
+
+ private void createAndPackToscaMetaFile(ZipOutputStream zos, String entryDefinitionsFileName)
+ throws IOException {
+ String metaFile = createMetaFile(entryDefinitionsFileName);
+ zos.putNextEntry(
+ new ZipEntry((TOSCA_META_FOLDER_NAME + FILE_SEPARATOR + TOSCA_META_FILE_NAME)));
+ writeBytesToZip(zos, new ByteArrayInputStream(metaFile.getBytes()));
+ }
+
+ private void packDefinitions(ZipOutputStream zos, Map<String, ServiceTemplate> serviceTemplates)
+ throws IOException {
+ for (Map.Entry<String, ServiceTemplate> serviceTemplate : serviceTemplates.entrySet()) {
+ String fileName = serviceTemplate.getKey();
+ zos.putNextEntry(new ZipEntry(DEFINITIONS_FOLDER_NAME + FILE_SEPARATOR + fileName));
+ writeBytesToZip(zos,
+ FileUtils.convertToInputStream(serviceTemplate.getValue(), FileUtils.FileExtension.YAML));
+ }
+ }
+
+ private void packExternalArtifacts(ZipOutputStream zos, FileContentHandler externalArtifacts) {
+
+ for (String filenameIncludingPath : externalArtifacts.getFileList()) {
+ try {
+ zos.putNextEntry(new ZipEntry(filenameIncludingPath));
+ writeBytesToZip(zos, externalArtifacts.getFileContent(filenameIncludingPath));
+
+ } catch (IOException exc) {
+ throw new RuntimeException(exc);
+ } finally {
+ try {
+ zos.closeEntry();
+ } catch (IOException ignore) {
+ //do nothing
+ }
+ }
+ }
+
+ }
+
+ private void packArtifacts(ZipOutputStream zos, FileContentHandler artifacts) {
+
+ for (String fileName : artifacts.getFileList()) {
+ try {
+ zos.putNextEntry(new ZipEntry((ARTIFACTS_FOLDER_NAME + FILE_SEPARATOR + fileName)));
+ writeBytesToZip(zos, artifacts.getFileContent(fileName));
+
+ } catch (IOException exc) {
+ throw new RuntimeException(exc);
+ } finally {
+ try {
+ zos.closeEntry();
+ } catch (IOException ignore) {
+ //do nothing
+ }
+ }
+ }
+ }
+
+ private void writeBytesToZip(ZipOutputStream zos, InputStream is) throws IOException {
+ FileUtils.copy(is, zos);
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/yamlutil/ToscaExtensionYamlUtil.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/yamlutil/ToscaExtensionYamlUtil.java
new file mode 100644
index 0000000000..a1c11c2483
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/yamlutil/ToscaExtensionYamlUtil.java
@@ -0,0 +1,93 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.tosca.services.yamlutil;
+
+import org.openecomp.core.utilities.yaml.YamlUtil;
+import org.yaml.snakeyaml.constructor.Constructor;
+import org.yaml.snakeyaml.introspector.Property;
+import org.yaml.snakeyaml.introspector.PropertyUtils;
+import org.yaml.snakeyaml.nodes.MappingNode;
+import org.yaml.snakeyaml.nodes.NodeId;
+
+import java.beans.IntrospectionException;
+
+public class ToscaExtensionYamlUtil extends YamlUtil {
+
+ @Override
+ public <T> Constructor getConstructor(Class<T> typClass) {
+ return new ToscaWithHeatExtensionConstructor(typClass);
+ }
+
+ @Override
+ protected PropertyUtils getPropertyUtils() {
+ return new ToscaPropertyUtilsWithHeatExtension();
+ }
+
+ public class ToscaPropertyUtilsWithHeatExtension extends MyPropertyUtils {
+ @Override
+ public Property getProperty(Class<? extends Object> type, String name)
+ throws IntrospectionException {
+ try {
+ if (type.equals(
+ Class.forName("org.openecomp.sdc.tosca.datatypes.model.ParameterDefinition"))) {
+ type = Class.forName(
+ "org.openecomp.sdc.tosca.datatypes.model.heatextend.ParameterDefinitionExt");
+ }
+ } catch (ClassNotFoundException exception) {
+ throw new RuntimeException(exception);
+ }
+ return super.getProperty(type, name);
+ }
+ }
+
+ protected class ToscaWithHeatExtensionConstructor extends StrictMapAppenderConstructor {
+ public ToscaWithHeatExtensionConstructor(Class<?> theRoot) {
+ super(theRoot);
+ yamlClassConstructors.put(NodeId.mapping, new MyPersistentObjectConstruct());
+ }
+
+ class MyPersistentObjectConstruct extends ConstructMapping {
+ @Override
+ protected Object constructJavaBean2ndStep(MappingNode node, Object object) {
+ Class type = node.getType();
+ try {
+ if (type.equals(
+ Class.forName("org.openecomp.sdc.tosca.datatypes.model.ParameterDefinition"))) {
+ Class extendHeatClass = Class.forName(
+ "org.openecomp.sdc.tosca.datatypes.model.heatextend.ParameterDefinitionExt");
+ Object extendHeatObject = extendHeatClass.newInstance();
+ // create JavaBean
+ return super.constructJavaBean2ndStep(node, extendHeatObject);
+ } else {
+ // create JavaBean
+ return super.constructJavaBean2ndStep(node, object);
+ }
+ } catch (ClassNotFoundException | InstantiationException
+ | IllegalAccessException exception) {
+ throw new RuntimeException(exception);
+ }
+ }
+ }
+ }
+}
+
+
+
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/TestUtil.java b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/TestUtil.java
new file mode 100644
index 0000000000..da3ae76f27
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/TestUtil.java
@@ -0,0 +1,71 @@
+package org.openecomp.sdc.tosca;
+
+import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.services.yamlutil.ToscaExtensionYamlUtil;
+
+import java.io.*;
+import java.net.URL;
+import java.nio.file.NotDirectoryException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class TestUtil {
+
+ public static ToscaServiceModel loadToscaServiceModel(String serviceTemplatesPath,
+ String globalServiceTemplatesPath,
+ String entryDefinitionServiceTemplate)
+ throws IOException {
+ ToscaExtensionYamlUtil toscaExtensionYamlUtil = new ToscaExtensionYamlUtil();
+ Map<String, ServiceTemplate> serviceTemplates = new HashMap<>();
+ if (entryDefinitionServiceTemplate == null) {
+ entryDefinitionServiceTemplate = "MainServiceTemplate.yaml";
+ }
+
+ loadServiceTemplates(serviceTemplatesPath, toscaExtensionYamlUtil, serviceTemplates);
+ if (globalServiceTemplatesPath != null) {
+ loadServiceTemplates(globalServiceTemplatesPath, toscaExtensionYamlUtil, serviceTemplates);
+ }
+
+ return new ToscaServiceModel(null, serviceTemplates, entryDefinitionServiceTemplate);
+ }
+
+ private static void loadServiceTemplates(String serviceTemplatesPath,
+ ToscaExtensionYamlUtil toscaExtensionYamlUtil,
+ Map<String, ServiceTemplate> serviceTemplates)
+ throws IOException {
+ URL urlFile = TestUtil.class.getResource(serviceTemplatesPath);
+ if (urlFile != null) {
+ File pathFile = new File(urlFile.getFile());
+ File[] files = pathFile.listFiles();
+ if (files != null) {
+ addServiceTemplateFiles(serviceTemplates, files, toscaExtensionYamlUtil);
+ } else {
+ throw new NotDirectoryException(serviceTemplatesPath);
+ }
+ } else {
+ throw new NotDirectoryException(serviceTemplatesPath);
+ }
+ }
+
+ private static void addServiceTemplateFiles(Map<String, ServiceTemplate> serviceTemplates,
+ File[] files,
+ ToscaExtensionYamlUtil toscaExtensionYamlUtil)
+ throws IOException {
+ for (File file : files) {
+ try (InputStream yamlFile = new FileInputStream(file)) {
+ ServiceTemplate serviceTemplateFromYaml =
+ toscaExtensionYamlUtil.yamlToObject(yamlFile, ServiceTemplate.class);
+ serviceTemplates.put(file.getName(), serviceTemplateFromYaml);
+ try {
+ yamlFile.close();
+ } catch (IOException ignore) {
+ }
+ } catch (FileNotFoundException e) {
+ throw e;
+ } catch (IOException e) {
+ throw e;
+ }
+ }
+ }
+}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/datatypes/PropertyTypeTest.java b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/datatypes/PropertyTypeTest.java
new file mode 100644
index 0000000000..470dd9784a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/datatypes/PropertyTypeTest.java
@@ -0,0 +1,20 @@
+package org.openecomp.sdc.tosca.datatypes;
+
+import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class PropertyTypeTest {
+ @Test
+ public void shouldReturnNullWhenDisplayNameDoesNotExistForAnyProperty() {
+ String s = "blabla";
+ Assert.assertEquals(PropertyType.getPropertyTypeByDisplayName(s), null);
+ }
+
+ @Test
+ public void shouldReturnApproppriatePropertyTypeWhenDisplayNameExist() {
+ String s = "scalar-unit.size";
+ Assert
+ .assertEquals(PropertyType.getPropertyTypeByDisplayName(s), PropertyType.SCALAR_UNIT_SIZE);
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/datatypes/ToscaModelTest.java b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/datatypes/ToscaModelTest.java
new file mode 100644
index 0000000000..13b05543fb
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/datatypes/ToscaModelTest.java
@@ -0,0 +1,282 @@
+package org.openecomp.sdc.tosca.datatypes;
+
+import org.openecomp.sdc.tosca.datatypes.model.ArtifactType;
+import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.CapabilityAssignment;
+import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.Constraint;
+import org.openecomp.sdc.tosca.datatypes.model.Directive;
+import org.openecomp.sdc.tosca.datatypes.model.Import;
+import org.openecomp.sdc.tosca.datatypes.model.Metadata;
+import org.openecomp.sdc.tosca.datatypes.model.NodeFilter;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.ParameterDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.SubstitutionMapping;
+import org.openecomp.sdc.tosca.datatypes.model.TopologyTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.heatextend.ParameterDefinitionExt;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.tosca.services.yamlutil.ToscaExtensionYamlUtil;
+import org.openecomp.core.utilities.yaml.YamlUtil;
+import org.junit.Assert;
+import org.junit.Test;
+
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+public class ToscaModelTest {
+
+ @Test
+ public void testServiceTemplateJavaToYaml() {
+
+ ServiceTemplate serviceTemplate = new ServiceTemplate();
+ Metadata metadata = new Metadata();
+ metadata.setTemplate_author("OPENECOMP");
+ metadata.setTemplate_name("Test");
+ metadata.setTemplate_version("1.0.0");
+ serviceTemplate.setTosca_definitions_version("tosca_simple_yaml_1_0_0");
+ serviceTemplate.setDescription("testing desc tosca service template");
+ serviceTemplate.setMetadata(metadata);
+
+ Import fileImport1 = new Import();
+ fileImport1.setFile("path1/path2/file1.yaml");
+ Import fileImport2 = new Import();
+ fileImport2.setFile("path1/path2/file2.yaml");
+ Map<String, Import> imports = new HashMap<>();
+ imports.put("myfile1", fileImport1);
+ imports.put("myfile2", fileImport2);
+ serviceTemplate.setImports(imports);
+
+ ArtifactType artifact = new ArtifactType();
+ artifact.setMime_type("application/java-archive");
+ ArrayList<String> ext = new ArrayList<>();
+ ext.add("yaml");
+ ext.add("xml");
+ artifact.setFile_ext(ext);
+ Map<String, ArtifactType> artifactTypes = new HashMap<>();
+ artifactTypes.put("one_artifact", artifact);
+ serviceTemplate.setArtifact_types(artifactTypes);
+
+ NodeType nodeType = new NodeType();
+ nodeType.setDerived_from("tosca.nodes.Root");
+ nodeType.setVersion("1.0.0");
+ nodeType.setDescription("tosca compute test");
+
+ PropertyDefinition propDef1 = new PropertyDefinition();
+ propDef1.setType("integer");
+ propDef1.setDescription("Number of CPUs requested for a software node instance");
+ propDef1.setRequired(true);
+ propDef1.set_default(1);
+
+ Constraint graterOrEqual = new Constraint();
+ graterOrEqual.setGreater_or_equal((float) 5.0);
+ Constraint constraintEqual = new Constraint();
+ constraintEqual.setEqual(5);
+ Constraint greater_than = new Constraint();
+ greater_than.setGreater_than(6.02);
+ Constraint inRange = new Constraint();
+ inRange.setIn_range(new Object[2]);
+ inRange.getIn_range()[0] = 0;
+ inRange.getIn_range()[1] = ToscaConstants.UNBOUNDED;
+
+ List<Constraint> constraints = new ArrayList<>();
+ constraints.add(graterOrEqual);
+ constraints.add(constraintEqual);
+ constraints.add(greater_than);
+ constraints.add(inRange);
+ propDef1.setConstraints(constraints);
+
+ Map<String, PropertyDefinition> properties = new HashMap<>();
+ properties.put("cpu_num", propDef1);
+ nodeType.setProperties(properties);
+
+ Map<String, AttributeDefinition> attributesDef = new HashMap<>();
+ AttributeDefinition attDef = new AttributeDefinition();
+ attDef.setType(PropertyType.STRING.getDisplayName());
+ attDef.set_default("hi");
+ attributesDef.put("attDef1", attDef);
+ nodeType.setAttributes(attributesDef);
+
+ Map<String, RequirementDefinition> reqsDef = new HashMap<>();
+ RequirementDefinition reqDef = new RequirementDefinition();
+ reqDef.setCapability("tosca.cap1");
+ reqDef.getOccurrences()[0] = 5;
+ reqsDef.put("re1", reqDef);
+ List<Map<String, RequirementDefinition>> reqList = new ArrayList<>();
+ reqList.add(reqsDef);
+ nodeType.setRequirements(reqList);
+
+
+ Map<String, CapabilityDefinition> capsDef = new HashMap<>();
+ CapabilityDefinition capdef = new CapabilityDefinition();
+ capdef.setType("tosca.cap");
+ List<String> vvSource = new ArrayList<>();
+ vvSource.add("node1");
+ vvSource.add("node2");
+ capdef.setValid_source_types(vvSource);
+ capsDef.put("cap1", capdef);
+ nodeType.setCapabilities(capsDef);
+
+ Map<String, NodeType> nodeTypes = new HashMap<>();
+ nodeTypes.put("compute_node_type", nodeType);
+ serviceTemplate.setNode_types(nodeTypes);
+
+ TopologyTemplate topologyTemplate = new TopologyTemplate();
+ topologyTemplate.setDescription("topologi template descroption");
+ Map<String, ParameterDefinition> inputs = new HashMap<>();
+ ParameterDefinition paramDef = new ParameterDefinition();
+ paramDef.setType(PropertyType.STRING.getDisplayName());
+ paramDef.setDescription("desc");
+ paramDef.set_default("my default val");
+ paramDef.setRequired(false);
+ paramDef.setEntry_schema(DataModelUtil.createEntrySchema("tosca.myType", null, null));
+ List<Constraint> paramConstraint = new ArrayList<>();
+ Constraint paramConst1 = new Constraint();
+ paramConst1.setGreater_than(6);
+ Constraint paramConst2 = new Constraint();
+ paramConst2.setGreater_or_equal(9);
+ paramConstraint.add(paramConst1);
+ paramConstraint.add(paramConst2);
+ paramDef.setConstraints(paramConstraint);
+ inputs.put("inParam1", paramDef);
+ topologyTemplate.setInputs(inputs);
+
+ Map<String, NodeTemplate> nodeTemplates = new HashMap<>();
+ NodeTemplate nodeTemplate = new NodeTemplate();
+ nodeTemplate.setType("nodeTypeRef");
+ List<String> directives = new ArrayList<>();
+ directives.add(Directive.SELECTABLE.getDisplayName());
+ directives.add(Directive.SUBSTITUTABLE.getDisplayName());
+ nodeTemplate.setDirectives(directives);
+ Map<String, Object> nodeTemplateProperties = new HashMap<>();
+ nodeTemplateProperties.put("prop1", "abcd");
+ nodeTemplateProperties.put("prop2", "{ get_input: my_mysql_rootpw }");
+ nodeTemplate.setProperties(nodeTemplateProperties);
+ Map<String, Object> nodeTemplateAtts = new HashMap<>();
+ nodeTemplateAtts.put("att1", "att1Val");
+ nodeTemplateAtts.put("att2", "{ get_input: my_mysql_rootpw }");
+ nodeTemplate.setAttributes(nodeTemplateAtts);
+
+
+ RequirementAssignment reqAssignment1 = new RequirementAssignment();
+ reqAssignment1.setNode("nodeA");
+ reqAssignment1.setCapability("capA");
+ reqAssignment1.setRelationship("relationB");
+ Object[] reqAssOccurrences = new Object[2];
+ reqAssOccurrences[0] = 1;
+ reqAssOccurrences[1] = 2;
+ reqAssignment1.setOccurrences(reqAssOccurrences);
+ NodeFilter reqNodeFilter = new NodeFilter();
+ List<Constraint> propConstrain1 = new ArrayList<>();
+ Constraint propConst1 = new Constraint();
+ propConst1.setGreater_or_equal(9);
+ propConstrain1.add(propConst1);
+ List<Constraint> propConstrain2 = new ArrayList<>();
+ Constraint propConst2 = new Constraint();
+ propConst2.setMin_length(1);
+ propConstrain2.add(propConst2);
+ Constraint propConst3 = new Constraint();
+ propConst3.setMax_length(2);
+ propConstrain2.add(propConst3);
+ Map<String, List<Constraint>> nodeFilterProp = new HashMap<>();
+ nodeFilterProp.put("propName1", propConstrain1);
+ nodeFilterProp.put("propName2", propConstrain2);
+ reqNodeFilter.setProperties(nodeFilterProp);
+ reqAssignment1.setNode_filter(reqNodeFilter);
+
+ RequirementAssignment reqAssignment2 = new RequirementAssignment();
+ reqAssignment2.setNode("nodeA");
+ reqAssignment2.setCapability("capA");
+ reqAssignment2.setRelationship("relationB");
+ Map<String, RequirementAssignment> nodeTemplateRequirement1 = new HashMap<>();
+ Map<String, RequirementAssignment> nodeTemplateRequirement2 = new HashMap<>();
+ nodeTemplateRequirement1.put("req1", reqAssignment1);
+ nodeTemplateRequirement2.put("req2", reqAssignment2);
+ nodeTemplate.setRequirements(new ArrayList<>());
+ nodeTemplate.getRequirements().add(nodeTemplateRequirement1);
+ nodeTemplate.getRequirements().add(nodeTemplateRequirement2);
+
+ Map<String, CapabilityAssignment> nodeTemplateCapability = new HashMap<>();
+ CapabilityAssignment capAss = new CapabilityAssignment();
+ Map<String, Object> capProps = new HashMap<>();
+ capProps.put("num_cpus", "{ get_input: cpus }");
+ capAss.setProperties(capProps);
+ Map<String, Object> capAtts = new HashMap<>();
+ capAtts.put("num_cpus", "66");
+ capAss.setAttributes(capAtts);
+ nodeTemplateCapability.put("cap1", capAss);
+ nodeTemplate.setCapabilities(new ArrayList<>());
+ nodeTemplate.getCapabilities().add(nodeTemplateCapability);
+
+ NodeFilter nodeTemplateNodeFilter = new NodeFilter();
+ Map<String, List<Constraint>> ntProp = new HashMap<>();
+ Constraint c1 = new Constraint();
+ c1.setEqual("1 MB");
+ List<Constraint> consList = new ArrayList<>();
+ consList.add(c1);
+ ntProp.put("test1", consList);
+ nodeTemplateNodeFilter.setProperties(ntProp);
+ nodeTemplate.setNode_filter(nodeTemplateNodeFilter);
+ nodeTemplates.put("firatNodeTemplate", nodeTemplate);
+ topologyTemplate.setNode_templates(nodeTemplates);
+
+ SubstitutionMapping subMap = new SubstitutionMapping();
+ subMap.setNode_type("myNodeType.node");
+ Map<String, List<String>> mapCapabilities = new HashMap<>();
+ List<String> NodeCap = new ArrayList<>();
+ NodeCap.add("database");
+ NodeCap.add("database_endpoint");
+ mapCapabilities.put("database_endpoint", NodeCap);
+ subMap.setCapabilities(mapCapabilities);
+ topologyTemplate.setSubstitution_mappings(subMap);
+ serviceTemplate.setTopology_template(topologyTemplate);
+
+ String yaml = new YamlUtil().objectToYaml(serviceTemplate);
+ ServiceTemplate serviceTemplateFromYaml =
+ new YamlUtil().yamlToObject(yaml, ServiceTemplate.class);
+ Assert.assertNotNull(serviceTemplateFromYaml);
+ }
+
+
+ @Test
+ public void testYamlToServiceTemplateObj() {
+ InputStream yamlFile = new YamlUtil().loadYamlFileIs("/mock/model/serviceTemplate.yaml");
+ ServiceTemplate serviceTemplateFromYaml =
+ new YamlUtil().yamlToObject(yamlFile, ServiceTemplate.class);
+ Assert.assertNotNull(serviceTemplateFromYaml);
+ }
+
+
+ @Test
+ public void testYamlToServiceTemplateIncludingHeatExtend() {
+ ToscaExtensionYamlUtil toscaExtensionYamlUtil = new ToscaExtensionYamlUtil();
+ InputStream yamlFile =
+ toscaExtensionYamlUtil.loadYamlFileIs("/mock/model/serviceTemplateHeatExtend.yaml");
+ ServiceTemplate serviceTemplateFromYaml =
+ toscaExtensionYamlUtil.yamlToObject(yamlFile, ServiceTemplate.class);
+ ParameterDefinitionExt parameterDefinitionExt =
+ (ParameterDefinitionExt) serviceTemplateFromYaml.getTopology_template().getInputs()
+ .get("inParam1");
+ Assert.assertNotNull(parameterDefinitionExt.getLabel());
+ String backToYamlString = toscaExtensionYamlUtil.objectToYaml(serviceTemplateFromYaml);
+ Assert.assertNotNull(backToYamlString);
+ }
+
+}
+
+
+
+
+
+
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityDefinitionTest.java b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityDefinitionTest.java
new file mode 100644
index 0000000000..2b0f88fdea
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/datatypes/model/CapabilityDefinitionTest.java
@@ -0,0 +1,101 @@
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.core.utilities.yaml.YamlUtil;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class CapabilityDefinitionTest {
+
+ @Test
+ public void cloneTest() {
+ CapabilityDefinition capDef1 = new CapabilityDefinition();
+ Map<String, AttributeDefinition> attributes = new HashMap<>();
+ attributes.put("key1", getAttributeDefinition());
+ capDef1.setAttributes(attributes);
+
+ capDef1.setDescription("This is my desc");
+ capDef1.setOccurrences(getMockOccurrences());
+
+ Map<String, PropertyDefinition> properties = new HashMap<>();
+ PropertyDefinition propertyDefinition = getMockPropertyDefinition();
+ properties.put("key1", propertyDefinition);
+ capDef1.setProperties(properties);
+ capDef1.setType("My Type");
+ List<String> valid_source_types = new ArrayList<>();
+ valid_source_types.add("nonono");
+ capDef1.setValid_source_types(valid_source_types);
+
+ CapabilityDefinition capDef2 = capDef1.clone();
+ NodeType nodeType = new NodeType();
+ nodeType.setCapabilities(new HashMap<>());
+ nodeType.getCapabilities().put("cap1", capDef1);
+ nodeType.getCapabilities().put("cap2", capDef2);
+
+ String yamlString = new YamlUtil().objectToYaml(nodeType);
+ Boolean passResult = !yamlString.contains("&") && !yamlString.contains("*");
+ Assert.assertEquals(true, passResult);
+ }
+
+ private PropertyDefinition getMockPropertyDefinition() {
+ PropertyDefinition propertyDefinition = new PropertyDefinition();
+ propertyDefinition.setConstraints(getMockConstraints());
+ propertyDefinition.setDescription("desc");
+ propertyDefinition.setType("typeProp");
+ propertyDefinition.set_default(5);
+ propertyDefinition.setEntry_schema(getMockEntrySchema());
+ propertyDefinition.setRequired(false);
+ propertyDefinition.setStatus(Status.UNSUPPORTED);
+ return propertyDefinition;
+ }
+
+ private Object[] getMockOccurrences() {
+ Object[] occurrences = new Object[2];
+ occurrences[0] = 2;
+ occurrences[1] = ToscaConstants.UNBOUNDED;
+ return occurrences;
+ }
+
+ private ArtifactDefinition getMockArtifactDefinition() {
+ ArtifactDefinition artifactDefinition = new ArtifactDefinition();
+ artifactDefinition.setType("type1");
+ artifactDefinition.setDescription("description of OPENECOMP def");
+ artifactDefinition.setDeploy_path("my deployment path");
+ artifactDefinition.setFile("my file");
+ artifactDefinition.setRepository("my repository");
+ return artifactDefinition;
+ }
+
+ private AttributeDefinition getAttributeDefinition() {
+ AttributeDefinition attributeDefinition = new AttributeDefinition();
+ attributeDefinition.setDescription("desc1");
+ attributeDefinition.setType("type1");
+ attributeDefinition.set_default("none");
+ attributeDefinition.setEntry_schema(getMockEntrySchema());
+ attributeDefinition.setStatus(Status.UNSUPPORTED);
+ return attributeDefinition;
+ }
+
+ private EntrySchema getMockEntrySchema() {
+ EntrySchema entrySchema = new EntrySchema();
+ entrySchema.setType("string");
+ entrySchema.setDescription("string for string");
+ List<Constraint> constraints = getMockConstraints();
+ entrySchema.setConstraints(constraints);
+ return entrySchema;
+ }
+
+ private List<Constraint> getMockConstraints() {
+ List<Constraint> constraints = new ArrayList<>();
+ Constraint constraint = new Constraint();
+ constraint.setEqual("5");
+ constraints.add(constraint);
+ return constraints;
+ }
+
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/datatypes/model/RequirementDefinitionTest.java b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/datatypes/model/RequirementDefinitionTest.java
new file mode 100644
index 0000000000..3109a8abff
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/datatypes/model/RequirementDefinitionTest.java
@@ -0,0 +1,40 @@
+package org.openecomp.sdc.tosca.datatypes.model;
+
+import org.openecomp.core.utilities.yaml.YamlUtil;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class RequirementDefinitionTest {
+
+ @Test
+ public void cloneTest() {
+ RequirementDefinition reqDef1 = new RequirementDefinition();
+ reqDef1.setNode("node1");
+ reqDef1.setRelationship("my Relationship");
+ reqDef1.setCapability("capabilities");
+ reqDef1.setOccurrences(new Object[]{1, 1});
+
+ RequirementDefinition reqDef2 = reqDef1.clone();
+ NodeType nodeType = new NodeType();
+
+ List<Map<String, RequirementDefinition>> requirements = new ArrayList<>();
+ Map<String, RequirementDefinition> reqMap1 = new HashMap<>();
+ reqMap1.put("req1", reqDef1);
+ requirements.add(reqMap1);
+ Map<String, RequirementDefinition> reqMap2 = new HashMap<>();
+ reqMap2.put("req2", reqDef2);
+ requirements.add(reqMap2);
+ nodeType.setRequirements(requirements);
+
+ String yamlString = new YamlUtil().objectToYaml(nodeType);
+ Boolean passResult = !yamlString.contains("&") && !yamlString.contains("*");
+ Assert.assertEquals(true, passResult);
+ }
+
+
+} \ No newline at end of file
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
new file mode 100644
index 0000000000..893f7a1a5e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/DataModelUtilTest.java
@@ -0,0 +1,104 @@
+package org.openecomp.sdc.tosca.services;
+
+import org.openecomp.sdc.common.errors.CoreException;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.openecomp.sdc.tosca.datatypes.model.GroupDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.PolicyDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.RelationshipTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.openecomp.sdc.tosca.datatypes.model.SubstitutionMapping;
+
+import java.util.ArrayList;
+
+@RunWith(MockitoJUnitRunner.class)
+public class DataModelUtilTest {
+
+ @Rule
+ public ExpectedException thrown = ExpectedException.none();
+
+ @Test
+ public void testAddSubstitutionMapping() throws Exception {
+ thrown.expect(CoreException.class);
+ thrown.expectMessage(
+ "Invalid action, can't add 'Substitution Mapping' to 'Service Template', 'Service Template' entity is NULL.");
+ DataModelUtil.addSubstitutionMapping(null, new SubstitutionMapping());
+ }
+
+ @Test
+ public void testAddSubstitutionMappingReq() throws Exception {
+ thrown.expect(CoreException.class);
+ thrown.expectMessage(
+ "Invalid action, can't add 'Substitution Mapping Requirements' to 'Service Template', 'Service Template' entity is NULL.");
+ DataModelUtil.addSubstitutionMappingReq(null, "123", new ArrayList<>());
+ }
+
+ @Test
+ public void testAddNodeTemplate() throws Exception {
+ thrown.expect(CoreException.class);
+ thrown.expectMessage(
+ "Invalid action, can't add 'Node Template' to 'Service Template', 'Service Template' entity is NULL.");
+ DataModelUtil.addNodeTemplate(null, "123", new NodeTemplate());
+ }
+
+ @Test
+ public void testAddPolicyDefinition() throws Exception {
+ thrown.expect(CoreException.class);
+ thrown.expectMessage(
+ "Invalid action, can't add 'Policy Definition' to 'Service Template', 'Service Template' entity is NULL.");
+ DataModelUtil.addPolicyDefinition(null, "123", new PolicyDefinition());
+ }
+
+ @Test
+ public void testAddNodeType() throws Exception {
+ thrown.expect(CoreException.class);
+ thrown.expectMessage(
+ "Invalid action, can't add 'Node Type' to 'Service Template', 'Service Template' entity is NULL.");
+ DataModelUtil.addNodeType(null, "123", new NodeType());
+ }
+
+ @Test
+ public void testAddRelationshipTemplate() throws Exception {
+ thrown.expect(CoreException.class);
+ thrown.expectMessage(
+ "Invalid action, can't add 'Relationship Template' to 'Service Template', 'Service Template' entity is NULL.");
+ DataModelUtil.addRelationshipTemplate(null, "123", new RelationshipTemplate());
+ }
+
+ @Test
+ public void testAddRequirementAssignment() throws Exception {
+ thrown.expect(CoreException.class);
+ thrown.expectMessage(
+ "Invalid action, can't add 'Requirement Assignment' to 'Node Template', 'Node Template' entity is NULL.");
+ DataModelUtil.addRequirementAssignment(null, "123", new RequirementAssignment());
+ }
+
+ @Test
+ public void testGetNodeTemplate() throws Exception {
+ thrown.expect(CoreException.class);
+ thrown.expectMessage(
+ "Invalid action, can't add 'Node Template' to 'Service Template', 'Service Template' entity is NULL.");
+ DataModelUtil.addNodeTemplate(null, "123", new NodeTemplate());
+ }
+
+ @Test
+ public void testGetNodeType() throws Exception {
+ thrown.expect(CoreException.class);
+ thrown.expectMessage(
+ "Invalid action, can't add 'Node Type' to 'Service Template', 'Service Template' entity is NULL.");
+ DataModelUtil.addNodeType(null, "123", new NodeType());
+ }
+
+ @Test
+ public void testAddGroupToTopologyTemplate() throws Exception {
+ thrown.expect(CoreException.class);
+ thrown.expectMessage(
+ "Invalid action, can't add 'Group Definition' to 'Service Template', 'Service Template' entity is NULL.");
+ DataModelUtil.addGroupDefinitionToTopologyTemplate(null, "123", new GroupDefinition());
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/impl/ToscaAnalyzerServiceImplTest.java b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/impl/ToscaAnalyzerServiceImplTest.java
new file mode 100644
index 0000000000..47f0bd9aef
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/impl/ToscaAnalyzerServiceImplTest.java
@@ -0,0 +1,472 @@
+package org.openecomp.sdc.tosca.services.impl;
+
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.tosca.TestUtil;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
+import org.openecomp.sdc.tosca.services.ToscaAnalyzerService;
+import org.openecomp.sdc.tosca.services.ToscaConstants;
+import org.openecomp.sdc.tosca.services.yamlutil.ToscaExtensionYamlUtil;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.openecomp.sdc.tosca.datatypes.model.Import;
+import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.NodeType;
+import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.datatypes.model.SubstitutionMapping;
+import org.openecomp.sdc.tosca.datatypes.model.TopologyTemplate;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.when;
+
+@RunWith(MockitoJUnitRunner.class)
+public class ToscaAnalyzerServiceImplTest {
+ /*
+ Dictionary:
+ SrvTmp: ServiceTemplate
+ NdTmp: NodeTemplate
+ NdTy: NodeType
+ */
+
+ private static ToscaAnalyzerService toscaAnalyzerService;
+ private static ToscaServiceModel toscaServiceModel;
+ @Rule
+ public ExpectedException thrown = ExpectedException.none();
+
+ @Mock
+ NodeTemplate nodeTemplateMock;
+ @Mock
+ ToscaServiceModel toscaServiceModelMock;
+
+ @BeforeClass
+ public static void onlyOnceSetUp() throws IOException {
+ toscaAnalyzerService = new ToscaAnalyzerServiceImpl();
+ toscaServiceModel = TestUtil.loadToscaServiceModel("/mock/analyzerService/toscasubstitution/",
+ "/mock/globalServiceTemplates/", null);
+ }
+
+ @Before
+ public void init() throws IOException {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ public void testGetRequirements() throws Exception {
+ ToscaExtensionYamlUtil toscaExtensionYamlUtil = new ToscaExtensionYamlUtil();
+ InputStream yamlFile = toscaExtensionYamlUtil
+ .loadYamlFileIs("/mock/analyzerService/NestedServiceTemplateReqTest.yaml");
+ ServiceTemplate serviceTemplateFromYaml =
+ toscaExtensionYamlUtil.yamlToObject(yamlFile, ServiceTemplate.class);
+
+ NodeTemplate port_0 =
+ serviceTemplateFromYaml.getTopology_template().getNode_templates().get("cmaui_port_0");
+ List<RequirementAssignment> reqList =
+ toscaAnalyzerService.getRequirements(port_0, ToscaConstants.BINDING_REQUIREMENT_ID);
+ assertEquals(1, reqList.size());
+
+ reqList.clear();
+ NodeTemplate port_1 =
+ serviceTemplateFromYaml.getTopology_template().getNode_templates().get("cmaui1_port_1");
+ reqList = toscaAnalyzerService.getRequirements(port_1, ToscaConstants.LINK_REQUIREMENT_ID);
+ assertEquals(2, reqList.size());
+
+ reqList.clear();
+ reqList = toscaAnalyzerService.getRequirements(port_0, ToscaConstants.LINK_REQUIREMENT_ID);
+ assertEquals(0, reqList.size());
+ }
+
+ @Test
+ public void testGetNodeTemplateById() throws Exception {
+ ServiceTemplate emptyServiceTemplate = new ServiceTemplate();
+ Optional<NodeTemplate> nodeTemplate =
+ toscaAnalyzerService.getNodeTemplateById(emptyServiceTemplate, "test_net222");
+ assertEquals(false, nodeTemplate.isPresent());
+
+ ServiceTemplate mainServiceTemplate = toscaServiceModel.getServiceTemplates()
+ .get(toscaServiceModel.getEntryDefinitionServiceTemplate());
+ nodeTemplate = toscaAnalyzerService.getNodeTemplateById(mainServiceTemplate, "test_net");
+ assertEquals(true, nodeTemplate.isPresent());
+
+ nodeTemplate = toscaAnalyzerService.getNodeTemplateById(mainServiceTemplate, "test_net222");
+ assertEquals(false, nodeTemplate.isPresent());
+ }
+
+ @Test
+ public void testGetSubstituteServiceTemplateName() throws Exception {
+ thrown.expect(CoreException.class);
+ thrown.expectMessage(
+ "Invalid Substitute Node Template invalid2, mandatory map property service_template_filter with mandatory key substitute_service_template must be defined.");
+
+ ServiceTemplate mainServiceTemplate = toscaServiceModel.getServiceTemplates()
+ .get(toscaServiceModel.getEntryDefinitionServiceTemplate());
+ Optional<NodeTemplate> notSubstitutableNodeTemplate =
+ toscaAnalyzerService.getNodeTemplateById(mainServiceTemplate, "test_net");
+ Optional<String> substituteServiceTemplateName = toscaAnalyzerService
+ .getSubstituteServiceTemplateName("test_net", notSubstitutableNodeTemplate.get());
+ assertEquals(false, substituteServiceTemplateName.isPresent());
+
+ Optional<NodeTemplate> substitutableNodeTemplate =
+ toscaAnalyzerService.getNodeTemplateById(mainServiceTemplate, "test_nested");
+ substituteServiceTemplateName = toscaAnalyzerService
+ .getSubstituteServiceTemplateName("test_nested", substitutableNodeTemplate.get());
+ assertEquals(true, substituteServiceTemplateName.isPresent());
+ assertEquals("nestedServiceTemplate.yaml", substituteServiceTemplateName.get());
+
+ NodeTemplate invalidSubstitutableNodeTemplate1 = new NodeTemplate();
+ substituteServiceTemplateName = toscaAnalyzerService
+ .getSubstituteServiceTemplateName("invalid1", invalidSubstitutableNodeTemplate1);
+ assertEquals(false, substituteServiceTemplateName.isPresent());
+
+
+ NodeTemplate invalidSubstitutableNodeTemplate2 = substitutableNodeTemplate.get();
+ Object serviceTemplateFilter = invalidSubstitutableNodeTemplate2.getProperties()
+ .get(ToscaConstants.SERVICE_TEMPLATE_FILTER_PROPERTY_NAME);
+ ((Map) serviceTemplateFilter).clear();
+ toscaAnalyzerService
+ .getSubstituteServiceTemplateName("invalid2", invalidSubstitutableNodeTemplate2);
+
+
+ }
+
+
+ @Test
+ public void testGetSubstitutableNodeTemplates() throws Exception {
+ ToscaExtensionYamlUtil toscaExtensionYamlUtil = new ToscaExtensionYamlUtil();
+ InputStream yamlFile = toscaExtensionYamlUtil
+ .loadYamlFileIs("/mock/analyzerService/ServiceTemplateSubstituteTest.yaml");
+ ServiceTemplate serviceTemplateFromYaml =
+ toscaExtensionYamlUtil.yamlToObject(yamlFile, ServiceTemplate.class);
+
+ Map<String, NodeTemplate> substitutableNodeTemplates =
+ toscaAnalyzerService.getSubstitutableNodeTemplates(serviceTemplateFromYaml);
+ assertEquals(2, substitutableNodeTemplates.size());
+ assertNotNull(substitutableNodeTemplates.get("test_nested1"));
+ assertNotNull(substitutableNodeTemplates.get("test_nested2"));
+
+ ServiceTemplate emptyServiceTemplate = new ServiceTemplate();
+ emptyServiceTemplate.setTopology_template(new TopologyTemplate());
+ substitutableNodeTemplates =
+ toscaAnalyzerService.getSubstitutableNodeTemplates(emptyServiceTemplate);
+ assertEquals(0, substitutableNodeTemplates.size());
+
+ yamlFile = toscaExtensionYamlUtil
+ .loadYamlFileIs("/mock/analyzerService/NestedServiceTemplateReqTest.yaml");
+ serviceTemplateFromYaml = toscaExtensionYamlUtil.yamlToObject(yamlFile, ServiceTemplate.class);
+ substitutableNodeTemplates =
+ toscaAnalyzerService.getSubstitutableNodeTemplates(serviceTemplateFromYaml);
+ assertEquals(0, substitutableNodeTemplates.size());
+ }
+
+ @Test
+ public void testGetSubstitutionMappedNodeTemplateByExposedReq() throws Exception {
+ thrown.expect(CoreException.class);
+ thrown.expectMessage(
+ "Invalid Tosca model data, missing 'Node Template' entry for 'Node Template' id cmaui_port_9");
+ ToscaExtensionYamlUtil toscaExtensionYamlUtil = new ToscaExtensionYamlUtil();
+ InputStream yamlFile = toscaExtensionYamlUtil
+ .loadYamlFileIs("/mock/analyzerService/NestedServiceTemplateReqTest.yaml");
+ ServiceTemplate nestedServiceTemplateFromYaml =
+ toscaExtensionYamlUtil.yamlToObject(yamlFile, ServiceTemplate.class);
+
+ Optional<Map.Entry<String, NodeTemplate>> mappedNodeTemplate = toscaAnalyzerService
+ .getSubstitutionMappedNodeTemplateByExposedReq("NestedServiceTemplateSubstituteTest.yaml",
+ nestedServiceTemplateFromYaml, "local_storage_server_cmaui");
+ assertEquals("server_cmaui", mappedNodeTemplate.get().getKey());
+ assertNotNull(mappedNodeTemplate.get().getValue());
+
+ mappedNodeTemplate = toscaAnalyzerService
+ .getSubstitutionMappedNodeTemplateByExposedReq("NestedServiceTemplateSubstituteTest.yaml",
+ nestedServiceTemplateFromYaml, "link_cmaui_port_invalid");
+ assertEquals("server_cmaui", mappedNodeTemplate.get().getKey());
+ assertNotNull(mappedNodeTemplate.get().getValue());
+
+ ServiceTemplate mainServiceTemplate = toscaServiceModel.getServiceTemplates()
+ .get(toscaServiceModel.getEntryDefinitionServiceTemplate());
+ mappedNodeTemplate = toscaAnalyzerService.getSubstitutionMappedNodeTemplateByExposedReq(
+ toscaServiceModel.getEntryDefinitionServiceTemplate(), mainServiceTemplate,
+ "local_storage_server_cmaui");
+ assertEquals(false, mappedNodeTemplate.isPresent());
+ }
+
+ @Test
+ public void invalidSubstitutableMapping() throws Exception {
+ thrown.expect(CoreException.class);
+ thrown.expectMessage(
+ "Invalid Substitution Service Template invalidMappingServiceTemplate.yaml, missing mandatory file 'Node type' in substitution mapping.");
+ ServiceTemplate invalidMappingServiceTemplate = new ServiceTemplate();
+ invalidMappingServiceTemplate.setTopology_template(new TopologyTemplate());
+ invalidMappingServiceTemplate.getTopology_template()
+ .setSubstitution_mappings(new SubstitutionMapping());
+ toscaAnalyzerService
+ .getSubstitutionMappedNodeTemplateByExposedReq("invalidMappingServiceTemplate.yaml",
+ invalidMappingServiceTemplate, "local_storage_server_cmaui");
+ }
+
+ @Test
+ public void substitutableMappingWithNoReqMap() throws Exception {
+ ServiceTemplate mainServiceTemplate = toscaServiceModel.getServiceTemplates()
+ .get(toscaServiceModel.getEntryDefinitionServiceTemplate());
+ ServiceTemplate emptyReqMapping = new ServiceTemplate();
+ emptyReqMapping.setTopology_template(new TopologyTemplate());
+ emptyReqMapping.getTopology_template().setSubstitution_mappings(new SubstitutionMapping());
+ emptyReqMapping.getTopology_template().getSubstitution_mappings().setNode_type("temp");
+ Optional<Map.Entry<String, NodeTemplate>> mappedNodeTemplate = toscaAnalyzerService
+ .getSubstitutionMappedNodeTemplateByExposedReq(
+ toscaServiceModel.getEntryDefinitionServiceTemplate(), mainServiceTemplate,
+ "local_storage_server_cmaui");
+ assertEquals(false, mappedNodeTemplate.isPresent());
+ }
+
+ @Test
+ public void testGetSubstitutionMappedNodeTemplateByExposedReqInvalid() throws Exception {
+ thrown.expect(CoreException.class);
+ thrown.expectMessage(
+ "Invalid Tosca model data, missing 'Node Template' entry for 'Node Template' id cmaui_port_9");
+ ToscaExtensionYamlUtil toscaExtensionYamlUtil = new ToscaExtensionYamlUtil();
+ InputStream yamlFile = toscaExtensionYamlUtil
+ .loadYamlFileIs("/mock/analyzerService/NestedServiceTemplateReqTest.yaml");
+ ServiceTemplate nestedServiceTemplateFromYaml =
+ toscaExtensionYamlUtil.yamlToObject(yamlFile, ServiceTemplate.class);
+
+ toscaAnalyzerService
+ .getSubstitutionMappedNodeTemplateByExposedReq("NestedServiceTemplateSubstituteTest.yaml",
+ nestedServiceTemplateFromYaml, "link_cmaui_port_invalid");
+ }
+
+ @Test
+ public void testIsDesiredRequirementAssignmentMatch() throws Exception {
+
+ RequirementAssignment requirementAssignment = new RequirementAssignment();
+ String capability = "Test.Capability";
+ String node = "Test.node";
+ String relationship = "Test.relationship";
+ requirementAssignment.setCapability(capability);
+ requirementAssignment.setNode(node);
+ requirementAssignment.setRelationship(relationship);
+
+ assertEquals(true, toscaAnalyzerService
+ .isDesiredRequirementAssignment(requirementAssignment, capability, node, relationship));
+ assertEquals(true, toscaAnalyzerService
+ .isDesiredRequirementAssignment(requirementAssignment, null, node, relationship));
+ assertEquals(true, toscaAnalyzerService
+ .isDesiredRequirementAssignment(requirementAssignment, capability, null, relationship));
+ assertEquals(true, toscaAnalyzerService
+ .isDesiredRequirementAssignment(requirementAssignment, capability, node, null));
+ assertEquals(true, toscaAnalyzerService
+ .isDesiredRequirementAssignment(requirementAssignment, null, null, relationship));
+ assertEquals(true, toscaAnalyzerService
+ .isDesiredRequirementAssignment(requirementAssignment, capability, null, null));
+ assertEquals(true, toscaAnalyzerService
+ .isDesiredRequirementAssignment(requirementAssignment, null, node, null));
+
+ }
+
+ @Test
+ public void testIsDesiredRequirementAssignmentNoMatch() throws Exception {
+
+ RequirementAssignment requirementAssignment = new RequirementAssignment();
+ String capability = "Test.Capability";
+ String node = "Test.node";
+ String relationship = "Test.relationship";
+ requirementAssignment.setCapability(capability);
+ requirementAssignment.setNode(node);
+ requirementAssignment.setRelationship(relationship);
+
+ assertEquals(false, toscaAnalyzerService
+ .isDesiredRequirementAssignment(requirementAssignment, "no", node, relationship));
+ assertEquals(false, toscaAnalyzerService
+ .isDesiredRequirementAssignment(requirementAssignment, "no", "no", relationship));
+ assertEquals(false, toscaAnalyzerService
+ .isDesiredRequirementAssignment(requirementAssignment, "no", "no", "no"));
+ assertEquals(false, toscaAnalyzerService
+ .isDesiredRequirementAssignment(requirementAssignment, capability, "no", relationship));
+ assertEquals(false, toscaAnalyzerService
+ .isDesiredRequirementAssignment(requirementAssignment, capability, node, "no"));
+ assertEquals(false, toscaAnalyzerService
+ .isDesiredRequirementAssignment(requirementAssignment, capability, "no", "no"));
+ assertEquals(false, toscaAnalyzerService
+ .isDesiredRequirementAssignment(requirementAssignment, "no", null, null));
+ assertEquals(false, toscaAnalyzerService
+ .isDesiredRequirementAssignment(requirementAssignment, null, null, null));
+
+
+ }
+
+ @Test
+ public void shouldReturnFalseIfNdTmpIsNull() {
+ assertFalse(toscaAnalyzerService
+ .isTypeOf(null, ToscaNodeType.NETWORK.getDisplayName(), new ServiceTemplate(),
+ toscaServiceModelMock));
+ }
+
+ @Test
+ public void shouldReturnTrueIfNdTmpTypeIsOfRequestedType() {
+ NodeTemplate nodeTemplate = new NodeTemplate();
+ ToscaNodeType nodeTypeToSearch = ToscaNodeType.BLOCK_STORAGE;
+ nodeTemplate.setType(nodeTypeToSearch.getDisplayName());
+ assertTrue(toscaAnalyzerService
+ .isTypeOf(nodeTemplate, nodeTypeToSearch.getDisplayName(), new ServiceTemplate(),
+ toscaServiceModelMock));
+ }
+
+ @Test
+ public void shouldReturnTrueIfNdTmpTypeIsFoundInSrvTmpNdTyAndNdTyDerivedFromRequestedType() {
+ String typeToMatch = ToscaNodeType.CINDER_VOLUME.getDisplayName();
+ when(nodeTemplateMock.getType()).thenReturn(typeToMatch);
+ Map<String, NodeType> stNodeTypes = new HashMap<>();
+ addNodeType(stNodeTypes, ToscaNodeType.COMPUTE.getDisplayName(), new NodeType());
+ NodeType nodeType = createNodeType(ToscaNodeType.BLOCK_STORAGE.getDisplayName());
+ addNodeType(stNodeTypes, typeToMatch, nodeType);
+ ServiceTemplate serviceTemplate = new ServiceTemplate();
+ serviceTemplate.setNode_types(stNodeTypes);
+ assertTrue(toscaAnalyzerService
+ .isTypeOf(nodeTemplateMock, ToscaNodeType.BLOCK_STORAGE.getDisplayName(), serviceTemplate,
+ toscaServiceModelMock));
+
+ }
+
+ @Test
+ public void shouldThrowCoreExceptionForInvalidNodeType() {
+ thrown.expect(CoreException.class);
+ thrown.expectMessage(
+ "NodeType 'AAA' or one of its derivedFrom node type hierarchy, is not defined in tosca service model");
+ when(nodeTemplateMock.getType()).thenReturn("AAA");
+ Map<String, NodeType> stNodeTypes = new HashMap<>();
+ addNodeType(stNodeTypes, "notImportant", new NodeType());
+ ServiceTemplate serviceTemplate = new ServiceTemplate();
+ serviceTemplate.setNode_types(stNodeTypes);
+ toscaAnalyzerService
+ .isTypeOf(nodeTemplateMock, ToscaNodeType.COMPUTE.getDisplayName(), serviceTemplate,
+ toscaServiceModelMock);
+ }
+
+ @Test
+ public void shouldThrowCoreExceptionForInvalidNodeType2Level() {
+ thrown.expect(CoreException.class);
+ thrown.expectMessage(
+ "NodeType 'A' or one of its derivedFrom node type hierarchy, is not defined in tosca service model");
+ String typeToMatch = "A";
+ when(nodeTemplateMock.getType()).thenReturn(typeToMatch);
+ Map<String, NodeType> stNodeTypes = new HashMap<>();
+ addNodeType(stNodeTypes, "notImportant", new NodeType());
+ addNodeType(stNodeTypes, "A", createNodeType("ADerivedFromB"));
+ addNodeType(stNodeTypes, "ADerivedFromB'", createNodeType("BDerivedFromC"));
+ ServiceTemplate serviceTemplate = new ServiceTemplate();
+ serviceTemplate.setNode_types(stNodeTypes);
+ assertTrue(toscaAnalyzerService
+ .isTypeOf(nodeTemplateMock, "BDerivedFromC", serviceTemplate, toscaServiceModelMock));
+ }
+
+ @Test
+ public void shouldReturnTrueIfNdTmpTypeIsFoundInSrvTmpNdTyAndNotDerivedFromRequestedTypeBut2ndLevelDerivedFromMatch() {
+ String typeToMatch = "A";
+ when(nodeTemplateMock.getType()).thenReturn(typeToMatch);
+ Map<String, NodeType> stNodeTypes = new HashMap<>();
+ addNodeType(stNodeTypes, "notImportant", new NodeType());
+ addNodeType(stNodeTypes, "A", createNodeType("ADerivedFromB"));
+ addNodeType(stNodeTypes, "ADerivedFromB", createNodeType("BDerivedFromC"));
+ ServiceTemplate serviceTemplate = new ServiceTemplate();
+ serviceTemplate.setNode_types(stNodeTypes);
+ assertTrue(toscaAnalyzerService
+ .isTypeOf(nodeTemplateMock, "BDerivedFromC", serviceTemplate, toscaServiceModelMock));
+ }
+
+ private NodeType createNodeType(String derivedFrom) {
+ NodeType nodeType = new NodeType();
+ nodeType.setDerived_from(derivedFrom);
+ return nodeType;
+ }
+
+ private void addNodeType(Map<String, NodeType> stNodeTypes, String key, NodeType nodeType) {
+ stNodeTypes.put(key, nodeType);
+ }
+
+ @Test
+ public void shouldReturnTrueIfNdTmpTypeIsFoundInSrvTmpNdTyButRequestedTypeNotMatchButFoundIn1stLevelImports() {
+ String typeToMatch = ToscaNodeType.CINDER_VOLUME.getDisplayName();
+ when(nodeTemplateMock.getType()).thenReturn(typeToMatch);
+ ServiceTemplate mainST = new ServiceTemplate();
+ Map<String, Import> imports = new HashMap<>();
+ Import anImport = new Import();
+ anImport.setFile("mainImport");
+ imports.put("bla bla", anImport);
+ mainST.setImports(imports);
+
+ //create searchable service template
+ Map<String, NodeType> stNodeTypes = new HashMap<>();
+ addNodeType(stNodeTypes, ToscaNodeType.COMPUTE.getDisplayName(), new NodeType());
+ NodeType nodeType = createNodeType(ToscaNodeType.BLOCK_STORAGE.getDisplayName());
+ addNodeType(stNodeTypes, typeToMatch, nodeType);
+ ServiceTemplate serviceTemplate = new ServiceTemplate();
+ serviceTemplate.setNode_types(stNodeTypes);
+
+ // add service templates to tosca service model
+ Map<String, ServiceTemplate> serviceTemplates = toscaServiceModelMock.getServiceTemplates();
+ serviceTemplates.put("testMainServiceTemplate", mainST);
+ serviceTemplates.put("mainImport", serviceTemplate);
+ when(toscaServiceModelMock.getServiceTemplates()).thenReturn(serviceTemplates);
+
+ assertTrue(toscaAnalyzerService
+ .isTypeOf(nodeTemplateMock, ToscaNodeType.BLOCK_STORAGE.getDisplayName(), mainST,
+ toscaServiceModelMock));
+ }
+
+ @Test
+ public void shouldReturnTrueIfNdTmpTypeIsFoundInSrvTmpNdTyButRequestedTypeNotMatchButFoundIn2ndLevelImports() {
+ String typeToMatch = ToscaNodeType.CINDER_VOLUME.getDisplayName();
+ when(nodeTemplateMock.getType()).thenReturn(typeToMatch);
+ ServiceTemplate mainST = new ServiceTemplate();
+ Map<String, Import> imports = new HashMap<>();
+ Import anImport = new Import();
+ anImport.setFile("refToMainImport");
+ imports.put("bla bla", anImport);
+ mainST.setImports(imports);
+
+ //create searchable service template
+ Map<String, NodeType> stNodeTypes = new HashMap<>();
+ addNodeType(stNodeTypes, ToscaNodeType.COMPUTE.getDisplayName(), new NodeType());
+ NodeType nodeType = createNodeType(ToscaNodeType.BLOCK_STORAGE.getDisplayName());
+ addNodeType(stNodeTypes, typeToMatch, nodeType);
+ ServiceTemplate serviceTemplate = new ServiceTemplate();
+ serviceTemplate.setNode_types(stNodeTypes);
+
+ // create 1st level service template with import only
+ ServiceTemplate firstLevelST = new ServiceTemplate();
+ Map<String, Import> firstLevelImports = new HashMap<>();
+ Import firstLevelImport = new Import();
+ firstLevelImport.setFile("mainImport");
+ firstLevelImports.put("bla bla 2", firstLevelImport);
+
+ firstLevelST.setImports(firstLevelImports);
+
+ // add service templates to tosca service model
+ Map<String, ServiceTemplate> serviceTemplates = toscaServiceModelMock.getServiceTemplates();
+ serviceTemplates.put("testMainServiceTemplate", mainST);
+ serviceTemplates.put("refToMainImport", firstLevelST);
+ serviceTemplates.put("mainImport", serviceTemplate);
+ when(toscaServiceModelMock.getServiceTemplates()).thenReturn(serviceTemplates);
+
+ assertTrue(toscaAnalyzerService
+ .isTypeOf(nodeTemplateMock, ToscaNodeType.BLOCK_STORAGE.getDisplayName(), mainST,
+ toscaServiceModelMock));
+ }
+
+ // not found at all should throw core exception
+
+
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImplTest.java b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImplTest.java
new file mode 100644
index 0000000000..963b8a6f57
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImplTest.java
@@ -0,0 +1,150 @@
+package org.openecomp.sdc.tosca.services.impl;
+
+import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
+import org.openecomp.sdc.tosca.datatypes.model.Metadata;
+import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.openecomp.sdc.tosca.services.ToscaUtil;
+import org.openecomp.core.utilities.file.FileContentHandler;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+public class ToscaFileOutputServiceCsarImplTest {
+
+ private ToscaFileOutputServiceCsarImpl toscaFileOutputServiceCsarImpl =
+ new ToscaFileOutputServiceCsarImpl();
+
+ @Test
+ public void testCreationMetaFile() {
+ String createdMeta = toscaFileOutputServiceCsarImpl.createMetaFile("entryFile.yaml");
+ String expectedMeta =
+ "TOSCA-Meta-File-Version: 1.0\n" +
+ "CSAR-Version: 1.1\n" +
+ "Created-By: ASDC Onboarding portal\n" +
+ "Entry-Definitions: Definitions" + File.separator + "entryFile.yaml";
+ Assert.assertEquals(createdMeta.replaceAll("\\s+", ""), expectedMeta.replaceAll("\\s+", ""));
+ }
+
+ @Test
+ public void testCSARFileCreationWithExternalArtifacts() throws IOException {
+ ServiceTemplate mainServiceTemplate = new ServiceTemplate();
+ Metadata metadata1 = new Metadata();
+ metadata1.setTemplate_author("OPENECOMP");
+ metadata1.setTemplate_name("ST1");
+ metadata1.setTemplate_version("1.0.0");
+ mainServiceTemplate.setTosca_definitions_version("tosca_simple_yaml_1_0_0");
+ mainServiceTemplate.setDescription("testing desc tosca service template");
+ mainServiceTemplate.setMetadata(metadata1);
+
+ ServiceTemplate additionalServiceTemplate = new ServiceTemplate();
+ Metadata metadata2 = new Metadata();
+ metadata2.setTemplate_author("OPENECOMP");
+ metadata2.setTemplate_name("ST2");
+ metadata2.setTemplate_version("1.0.0");
+ additionalServiceTemplate.setTosca_definitions_version("tosca_simple_yaml_1_0_0");
+ additionalServiceTemplate.setDescription("testing desc tosca service template");
+ additionalServiceTemplate.setMetadata(metadata2);
+
+ Map<String, ServiceTemplate> definitionsInput = new HashMap<>();
+ definitionsInput
+ .put(ToscaUtil.getServiceTemplateFileName(mainServiceTemplate), mainServiceTemplate);
+ definitionsInput.put(ToscaUtil.getServiceTemplateFileName(additionalServiceTemplate),
+ additionalServiceTemplate);
+
+
+ Map<String, byte[]> dummyHeatArtifacts = new HashMap<>();
+ String file1Content = "this is file number 1";
+ String file2Content = "this is file number 2";
+ String file1 = "file1.xml";
+ dummyHeatArtifacts.put(file1, file1Content.getBytes());
+ String file2 = "file2.yml";
+ dummyHeatArtifacts.put(file2, file2Content.getBytes());
+
+
+ FileContentHandler heatFiles = new FileContentHandler();
+ heatFiles.putAll(dummyHeatArtifacts);
+ Map<String, byte[]> licenseArtifacts = new HashMap<>();
+
+ FileContentHandler licenseArtifactsFiles = new FileContentHandler();
+
+ licenseArtifacts.put(
+ ToscaFileOutputServiceCsarImpl.EXTERNAL_ARTIFACTS_FOLDER_NAME + File.separator +
+ "license-file-1.xml", file1Content.getBytes());
+ licenseArtifacts.put(
+ ToscaFileOutputServiceCsarImpl.EXTERNAL_ARTIFACTS_FOLDER_NAME + File.separator +
+ "license-file-2.xml", file1Content.getBytes());
+
+ licenseArtifactsFiles.putAll(licenseArtifacts);
+
+ byte[] csarFile = toscaFileOutputServiceCsarImpl.createOutputFile(
+ new ToscaServiceModel(heatFiles, definitionsInput,
+ ToscaUtil.getServiceTemplateFileName(mainServiceTemplate)), licenseArtifactsFiles);
+
+ String resultFileName = "resultFile.zip";
+ File file = new File(resultFileName);
+ FileOutputStream fos = new FileOutputStream(file);
+ fos.write(csarFile);
+ fos.close();
+
+ ZipFile zipFile = new ZipFile(resultFileName);
+
+ Enumeration<? extends ZipEntry> entries = zipFile.entries();
+
+ int count = 0;
+ while (entries.hasMoreElements()) {
+ count++;
+ entries.nextElement();
+ }
+ Assert.assertEquals(7, count);
+ zipFile.close();
+ Files.delete(Paths.get(file.getPath()));
+ }
+
+ @Test
+ public void testCSARFileCreation_noArtifacts() throws IOException {
+ ServiceTemplate serviceTemplate = new ServiceTemplate();
+ Metadata metadata = new Metadata();
+ metadata.setTemplate_author("OPENECOMP");
+ metadata.setTemplate_name("Test");
+ metadata.setTemplate_version("1.0.0");
+ serviceTemplate.setTosca_definitions_version("tosca_simple_yaml_1_0_0");
+ serviceTemplate.setDescription("testing desc tosca service template");
+ serviceTemplate.setMetadata(metadata);
+ Map<String, ServiceTemplate> definitionsInput = new HashMap<>();
+ String serviceTemplateFileName = ToscaUtil.getServiceTemplateFileName(serviceTemplate);
+ definitionsInput.put(serviceTemplateFileName, serviceTemplate);
+ byte[] csarFile = toscaFileOutputServiceCsarImpl
+ .createOutputFile(new ToscaServiceModel(null, definitionsInput, serviceTemplateFileName),
+ null);
+
+
+ String resultFileName = "resultFile.zip";
+ File file = new File(resultFileName);
+ FileOutputStream fos = new FileOutputStream(file);
+ fos.write(csarFile);
+ fos.close();
+
+ ZipFile zipFile = new ZipFile(resultFileName);
+
+ Enumeration<? extends ZipEntry> entries = zipFile.entries();
+
+ int count = 0;
+ while (entries.hasMoreElements()) {
+ count++;
+ entries.nextElement();
+ }
+ Assert.assertEquals(2, count);
+ zipFile.close();
+ Files.delete(Paths.get(file.getPath()));
+ }
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/analyzerService/NestedServiceTemplateReqTest.yaml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/analyzerService/NestedServiceTemplateReqTest.yaml
new file mode 100644
index 0000000000..f64cb709f0
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/analyzerService/NestedServiceTemplateReqTest.yaml
@@ -0,0 +1,176 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested
+imports:
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ nested:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui_image:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: String
+ p1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ security_group_name:
+ hidden: false
+ immutable: false
+ description: not impotrtant
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ node_templates:
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui_image
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ cmaui_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: p1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ cmaui1_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - subnet: subnetNameVal
+ ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 1
+ - subnet: subnetNameVal2
+ ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 1
+ network: jsa_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: jsa_net1
+ relationship: tosca.relationships.network.LinksTo
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: jsa_net2
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ jsa_net1:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ jsa_net2:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ groups:
+ nested:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested.yml
+ description: cmaui server template for vMMSC
+ members:
+ - server_cmaui
+ - cmaui_port_0
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested
+ capabilities:
+ host_server_cmaui:
+ - server_cmaui
+ - host
+ os_server_cmaui:
+ - server_cmaui
+ - os
+ endpoint_server_cmaui:
+ - server_cmaui
+ - endpoint
+ binding_server_cmaui:
+ - server_cmaui
+ - binding
+ scalable_server_cmaui:
+ - server_cmaui
+ - scalable
+ attachment_cmaui_port_0:
+ - cmaui_port_0
+ - attachment
+ requirements:
+ local_storage_server_cmaui:
+ - server_cmaui
+ - local_storage
+ link_cmaui_port_0:
+ - cmaui_port_0
+ - link
+ link_cmaui_port_invalid:
+ - cmaui_port_9
+ - link
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/analyzerService/ServiceTemplateSubstituteTest.yaml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/analyzerService/ServiceTemplateSubstituteTest.yaml
new file mode 100644
index 0000000000..c4df76a1aa
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/analyzerService/ServiceTemplateSubstituteTest.yaml
@@ -0,0 +1,89 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+topology_template:
+ inputs:
+ shared_network_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ jsa_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ node_templates:
+ test_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ test_nested1:
+ type: org.openecomp.resource.abstract.nodes.heat.nested
+ directives:
+ - substitutable
+ properties:
+ p1:
+ get_input: shared_network_id
+ service_template_filter:
+ substitute_service_template: nestedServiceTemplate.yaml
+ requirements:
+ - link_cmaui_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net
+ relationship: tosca.relationships.network.LinksTo
+ test_nested2:
+ type: org.openecomp.resource.abstract.nodes.heat.nested
+ directives:
+ - substitutable
+ properties:
+ p1:
+ get_input: shared_network_id
+ service_template_filter:
+ substitute_service_template: nestedServiceTemplate.yaml
+ requirements:
+ - link_cmaui_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net
+ relationship: tosca.relationships.network.LinksTo
+ groups:
+ addOn:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/addOn.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - test_nested
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - test_net
+ outputs:
+ shared_network_id:
+ value: test_net \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/analyzerService/toscasubstitution/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/analyzerService/toscasubstitution/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..65b90ef5b1
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/analyzerService/toscasubstitution/MainServiceTemplate.yaml
@@ -0,0 +1,75 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Main
+imports:
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+topology_template:
+ inputs:
+ shared_network_id:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ jsa_net_name:
+ hidden: false
+ immutable: false
+ type: string
+ description: network name of jsa log network
+ node_templates:
+ test_net:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ test_nested:
+ type: org.openecomp.resource.abstract.nodes.heat.nested
+ directives:
+ - substitutable
+ properties:
+ p1:
+ get_input: shared_network_id
+ service_template_filter:
+ substitute_service_template: nestedServiceTemplate.yaml
+ requirements:
+ - link_cmaui_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: test_net
+ relationship: tosca.relationships.network.LinksTo
+ groups:
+ addOn:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/addOn.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - test_nested
+ main:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/main.yml
+ description: |
+ Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
+ members:
+ - test_net
+ outputs:
+ shared_network_id:
+ value: test_net \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/analyzerService/toscasubstitution/nestedServiceTemplate.yaml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/analyzerService/toscasubstitution/nestedServiceTemplate.yaml
new file mode 100644
index 0000000000..cd27e7ba1a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/analyzerService/toscasubstitution/nestedServiceTemplate.yaml
@@ -0,0 +1,130 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested
+imports:
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+ nested:
+ file: GlobalSubstitutionTypesServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui_image:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: String
+ p1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ security_group_name:
+ hidden: false
+ immutable: false
+ description: not impotrtant
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ node_templates:
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui_image
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ cmaui_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: p1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ groups:
+ nested:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested.yml
+ description: cmaui server template for vMMSC
+ members:
+ - server_cmaui
+ - cmaui_port_0
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested
+ capabilities:
+ host_server_cmaui:
+ - server_cmaui
+ - host
+ os_server_cmaui:
+ - server_cmaui
+ - os
+ endpoint_server_cmaui:
+ - server_cmaui
+ - endpoint
+ binding_server_cmaui:
+ - server_cmaui
+ - binding
+ scalable_server_cmaui:
+ - server_cmaui
+ - scalable
+ attachment_cmaui_port_0:
+ - cmaui_port_0
+ - attachment
+ requirements:
+ local_storage_server_cmaui:
+ - server_cmaui
+ - local_storage
+ link_cmaui_port_0:
+ - cmaui_port_0
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/AbstractSubstituteGlobalTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/AbstractSubstituteGlobalTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..8813b0abf6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/AbstractSubstituteGlobalTypesServiceTemplate.yaml
@@ -0,0 +1,47 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: AbstractSubstituteGlobalTypes
+ template_version: 1.0.0
+description: Abstract Substitute Global Types
+imports:
+ common_definitions:
+ file: CommonGlobalTypesServiceTemplate.yaml
+data_types:
+ org.openecomp.datatypes.heat.substitution.SubstitutionFilter:
+ derived_from: tosca.datatypes.Root
+ description: Substitution Filter
+ properties:
+ substitute_service_template:
+ type: string
+ description: Substitute Service Template
+ required: true
+ status: SUPPORTED
+ index_variable:
+ type: string
+ description: Index variable
+ required: false
+ default: '%index%'
+ status: SUPPORTED
+ constraints:
+ - min_length: 3
+ count:
+ type: string
+ description: Count
+ required: false
+ default: 1
+ status: SUPPORTED
+ mandatory:
+ type: boolean
+ description: Mandatory
+ required: false
+ default: true
+ status: SUPPORTED
+node_types:
+ org.openecomp.resource.abstract.nodes.AbstractSubstitute:
+ derived_from: tosca.nodes.Root
+ properties:
+ service_template_filter:
+ type: org.openecomp.datatypes.heat.substitution.SubstitutionFilter
+ description: Substitution Filter
+ required: true
+ status: SUPPORTED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/CinderVolumeGlobalTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/CinderVolumeGlobalTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..3ef94f22e7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/CinderVolumeGlobalTypesServiceTemplate.yaml
@@ -0,0 +1,176 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: CinderVolumeGlobalTypes
+ template_version: 1.0.0
+description: Cinder Volume TOSCA Global Types
+relationship_types:
+ org.openecomp.relationships.heat.cinder.VolumeAttachesTo:
+ derived_from: tosca.relationships.AttachesTo
+ description: This type represents an attachment relationship for associating volume
+ properties:
+ volume_id:
+ type: string
+ description: The ID of the volume to be attached
+ required: true
+ status: SUPPORTED
+ location:
+ type: string
+ description: The location where the volume is exposed on the instance, mountpoint
+ required: false
+ status: SUPPORTED
+ instance_uuid:
+ type: string
+ description: The ID of the server to which the volume attaches
+ required: true
+ status: SUPPORTED
+ attributes:
+ show:
+ type: string
+ description: Detailed information about resource
+ status: SUPPORTED
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cinder.Volume:
+ derived_from: tosca.nodes.BlockStorage
+ properties:
+ availability_zone:
+ type: string
+ description: The availability zone in which the volume will be created
+ required: false
+ status: SUPPORTED
+ image:
+ type: string
+ description: If specified, the name or ID of the image to create the volume from
+ required: false
+ status: SUPPORTED
+ metadata:
+ type: map
+ description: Key/value pairs to associate with the volume
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ volume_type:
+ type: string
+ description: If specified, the type of volume to use, mapping to a specific backend
+ required: false
+ status: SUPPORTED
+ description:
+ type: string
+ description: A description of the volume
+ required: false
+ status: SUPPORTED
+ device_type:
+ type: string
+ description: Device type
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - cdrom
+ - disk
+ disk_bus:
+ type: string
+ description: 'Bus of the device: hypervisor driver chooses a suitable default
+ if omitted'
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - ide
+ - lame_bus
+ - scsi
+ - usb
+ - virtio
+ backup_id:
+ type: string
+ description: If specified, the backup to create the volume from
+ required: false
+ status: SUPPORTED
+ source_volid:
+ type: string
+ description: If specified, the volume to use as source
+ required: false
+ status: SUPPORTED
+ boot_index:
+ type: integer
+ description: Integer used for ordering the boot disks
+ required: false
+ status: SUPPORTED
+ size:
+ type: scalar-unit.size
+ description: The requested storage size (default unit is MB)
+ required: false
+ status: SUPPORTED
+ constraints:
+ - greater_or_equal: 1 GB
+ read_only:
+ type: boolean
+ description: Enables or disables read-only access mode of volume
+ required: false
+ status: SUPPORTED
+ name:
+ type: string
+ description: A name used to distinguish the volume
+ required: false
+ status: SUPPORTED
+ scheduler_hints:
+ type: map
+ description: Arbitrary key-value pairs specified by the client to help the Cinder scheduler creating a volume
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ swap_size:
+ type: scalar-unit.size
+ description: The size of the swap, in MB
+ required: false
+ status: SUPPORTED
+ delete_on_termination:
+ type: boolean
+ description: Indicate whether the volume should be deleted when the server is terminated
+ required: false
+ status: SUPPORTED
+ multiattach:
+ type: boolean
+ description: Whether allow the volume to be attached more than once
+ required: false
+ status: SUPPORTED
+ attributes:
+ display_description:
+ type: string
+ description: Description of the volume
+ status: SUPPORTED
+ attachments:
+ type: string
+ description: The list of attachments of the volume
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ encrypted:
+ type: boolean
+ description: Boolean indicating if the volume is encrypted or not
+ status: SUPPORTED
+ show:
+ type: string
+ description: Detailed information about resource
+ status: SUPPORTED
+ created_at:
+ type: timestamp
+ description: The timestamp indicating volume creation
+ status: SUPPORTED
+ display_name:
+ type: string
+ description: Name of the volume
+ status: SUPPORTED
+ metadata_values:
+ type: map
+ description: Key/value pairs associated with the volume in raw dict form
+ status: SUPPORTED
+ bootable:
+ type: boolean
+ description: Boolean indicating if the volume can be booted or not
+ status: SUPPORTED
+ status:
+ type: string
+ description: The current status of the volume
+ status: SUPPORTED
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/CommonGlobalTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/CommonGlobalTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..1a183e9c50
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/CommonGlobalTypesServiceTemplate.yaml
@@ -0,0 +1,210 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: CommonGlobalTypes
+ template_version: 1.0.0
+description: TOSCA Global Types
+data_types:
+ org.openecomp.datatypes.heat.network.AddressPair:
+ derived_from: tosca.datatypes.Root
+ description: MAC/IP address pairs
+ properties:
+ mac_address:
+ type: string
+ description: MAC address
+ required: false
+ status: SUPPORTED
+ ip_address:
+ type: string
+ description: IP address
+ required: false
+ status: SUPPORTED
+ org.openecomp.datatypes.heat.network.subnet.HostRoute:
+ derived_from: tosca.datatypes.Root
+ description: Host route info for the subnet
+ properties:
+ destination:
+ type: string
+ description: The destination for static route
+ required: false
+ status: SUPPORTED
+ nexthop:
+ type: string
+ description: The next hop for the destination
+ required: false
+ status: SUPPORTED
+ org.openecomp.datatypes.heat.network.neutron.Subnet:
+ derived_from: tosca.datatypes.Root
+ description: A subnet represents an IP address block that can be used for assigning IP addresses to virtual instances
+ properties:
+ tenant_id:
+ type: string
+ description: The ID of the tenant who owns the network
+ required: false
+ status: SUPPORTED
+ enable_dhcp:
+ type: boolean
+ description: Set to true if DHCP is enabled and false if DHCP is disabled
+ required: false
+ default: true
+ status: SUPPORTED
+ ipv6_address_mode:
+ type: string
+ description: IPv6 address mode
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - dhcpv6-stateful
+ - dhcpv6-stateless
+ - slaac
+ ipv6_ra_mode:
+ type: string
+ description: IPv6 RA (Router Advertisement) mode
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - dhcpv6-stateful
+ - dhcpv6-stateless
+ - slaac
+ value_specs:
+ type: map
+ description: Extra parameters to include in the request
+ required: false
+ default: {
+ }
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ allocation_pools:
+ type: list
+ description: The start and end addresses for the allocation pools
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.AllocationPool
+ subnetpool:
+ type: string
+ description: The name or ID of the subnet pool
+ required: false
+ status: SUPPORTED
+ dns_nameservers:
+ type: list
+ description: A specified set of DNS name servers to be used
+ required: false
+ default: [
+ ]
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ host_routes:
+ type: list
+ description: The gateway IP address
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.subnet.HostRoute
+ ip_version:
+ type: integer
+ description: The gateway IP address
+ required: false
+ default: 4
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - '4'
+ - '6'
+ name:
+ type: string
+ description: The name of the subnet
+ required: false
+ status: SUPPORTED
+ prefixlen:
+ type: integer
+ description: Prefix length for subnet allocation from subnet pool
+ required: false
+ status: SUPPORTED
+ constraints:
+ - greater_or_equal: 0
+ cidr:
+ type: string
+ description: The CIDR
+ required: false
+ status: SUPPORTED
+ gateway_ip:
+ type: string
+ description: The gateway IP address
+ required: false
+ status: SUPPORTED
+ org.openecomp.datatypes.heat.network.AllocationPool:
+ derived_from: tosca.datatypes.Root
+ description: The start and end addresses for the allocation pool
+ properties:
+ start:
+ type: string
+ description: Start address for the allocation pool
+ required: false
+ status: SUPPORTED
+ end:
+ type: string
+ description: End address for the allocation pool
+ required: false
+ status: SUPPORTED
+relationship_types:
+ org.openecomp.relationships.AttachesTo:
+ derived_from: tosca.relationships.Root
+ description: This type represents an attachment relationship
+group_types:
+ org.openecomp.groups.heat.HeatStack:
+ derived_from: tosca.groups.Root
+ description: Grouped all heat resources which are in the same heat stack
+ properties:
+ heat_file:
+ type: string
+ description: Heat file which associate to this group/heat stack
+ required: true
+ status: SUPPORTED
+ description:
+ type: string
+ description: Heat file description
+ required: false
+ status: SUPPORTED
+policy_types:
+ org.openecomp.policies.placement.Colocate:
+ derived_from: tosca.policy.placement
+ description: Keep associated nodes (groups of nodes) based upon affinity value
+ properties:
+ name:
+ type: string
+ description: The name of the policy
+ required: false
+ status: SUPPORTED
+ affinity:
+ type: string
+ description: affinity
+ required: true
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - host
+ - region
+ - compute
+ org.openecomp.policies.placement.Antilocate:
+ derived_from: tosca.policy.placement
+ description: My placement policy for separation based upon container type value
+ properties:
+ name:
+ type: string
+ description: The name of the policy
+ required: false
+ status: SUPPORTED
+ container_type:
+ type: string
+ description: container type
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - host
+ - region
+ - compute
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/ContrailNetworkRuleGlobalTypeServiceTemplate.yaml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
new file mode 100644
index 0000000000..98317310fa
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
@@ -0,0 +1,117 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: ContrailNetworkRuleGlobalType
+ template_version: 1.0.0
+description: Contrail Network Rule Global Types
+imports:
+ common_definitions:
+ file: CommonGlobalTypesServiceTemplate.yaml
+data_types:
+ org.openecomp.datatypes.heat.contrail.network.rule.PortPairs:
+ derived_from: tosca.datatypes.Root
+ description: source and destination port pairs
+ properties:
+ start_port:
+ type: string
+ description: Start port
+ required: false
+ status: SUPPORTED
+ end_port:
+ type: string
+ description: End port
+ required: false
+ status: SUPPORTED
+ org.openecomp.datatypes.heat.contrail.network.rule.Rule:
+ derived_from: tosca.datatypes.Root
+ description: policy rule
+ properties:
+ src_ports:
+ type: list
+ description: Source ports
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.contrail.network.rule.PortPairs
+ protocol:
+ type: string
+ description: Protocol
+ required: false
+ status: SUPPORTED
+ dst_addresses:
+ type: list
+ description: Destination addresses
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.contrail.network.rule.VirtualNetwork
+ apply_service:
+ type: string
+ description: Service to apply
+ required: false
+ status: SUPPORTED
+ dst_ports:
+ type: list
+ description: Destination ports
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.contrail.network.rule.PortPairs
+ src_addresses:
+ type: list
+ description: Source addresses
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.contrail.network.rule.VirtualNetwork
+ direction:
+ type: string
+ description: Direction
+ required: false
+ status: SUPPORTED
+ org.openecomp.datatypes.heat.contrail.network.rule.RuleList:
+ derived_from: tosca.datatypes.Root
+ description: list of policy rules
+ properties:
+ policy_rule:
+ type: list
+ description: Contrail network rule
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.contrail.network.rule.Rule
+ org.openecomp.datatypes.heat.contrail.network.rule.VirtualNetwork:
+ derived_from: tosca.datatypes.Root
+ description: source and destination addresses
+ properties:
+ virtual_network:
+ type: string
+ description: Virtual network
+ required: false
+ status: SUPPORTED
+node_types:
+ org.openecomp.resource.nodes.heat.network.contrail.NetworkRules:
+ derived_from: tosca.nodes.Root
+ properties:
+ entries:
+ type: org.openecomp.datatypes.heat.contrail.network.rule.RuleList
+ description: A symbolic name for this contrail network rule
+ required: false
+ status: SUPPORTED
+ name:
+ type: string
+ description: A symbolic name for this contrail network rule
+ required: false
+ status: SUPPORTED
+ attributes:
+ fq_name:
+ type: string
+ description: fq_name
+ status: SUPPORTED
+ requirements:
+ - network:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.network.Network
+ relationship: org.openecomp.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
new file mode 100644
index 0000000000..0927e3dd0e
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
@@ -0,0 +1,71 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: ContrailVirtualNetworkGlobalType
+ template_version: 1.0.0
+description: Contrail Virtual Network Global Types
+imports:
+ common_definitions:
+ file: CommonGlobalTypesServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork:
+ derived_from: tosca.nodes.network.Network
+ properties:
+ shared:
+ type: string
+ description: Is virtual network shared
+ required: false
+ status: SUPPORTED
+ forwarding_mode:
+ type: string
+ description: forwarding mode of the virtual network
+ required: false
+ status: SUPPORTED
+ external:
+ type: string
+ description: Is virtual network external
+ required: false
+ status: SUPPORTED
+ flood_unknown_unicast:
+ type: string
+ description: flood L2 packets on network
+ required: false
+ status: SUPPORTED
+ route_targets:
+ type: list
+ description: route targets associated with the virtual network
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ subnets:
+ type: map
+ description: Network related subnets
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.neutron.Subnet
+ attributes:
+ subnets_name:
+ type: list
+ description: Subnets name of this network
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ subnets_show:
+ type: map
+ description: Detailed information about each subnet
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ subnets:
+ type: map
+ description: Network related subnets
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.neutron.Subnet
+ capabilities:
+ attachment:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/GlobalSubstitutionTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..08c47bc646
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -0,0 +1,93 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: GlobalSubstitutionTypes
+imports:
+ NeutronPortGlobalTypes:
+ file: NeutronPortGlobalTypesServiceTemplate.yaml
+ NeutronNetGlobalTypes:
+ file: NeutronNetGlobalTypesServiceTemplate.yaml
+ CommonGlobalTypes:
+ file: CommonGlobalTypesServiceTemplate.yaml
+ CinderVolumeGlobalTypes:
+ file: CinderVolumeGlobalTypesServiceTemplate.yaml
+ ContrailNetworkRuleGlobalType:
+ file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
+ NeutronSecurityRulesGlobalTypes:
+ file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
+ NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+ ContrailVirtualNetworkGlobalType:
+ file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
+ AbstractSubstituteGlobalTypes:
+ file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.abstract.nodes.heat.nested:
+ derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+ properties:
+ cmaui_names:
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: String
+ p1:
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ type: string
+ description: Flavor for CMAUI server
+ security_group_name:
+ description: not impotrtant
+ availability_zone_0:
+ type: string
+ description: availabilityzone name
+ requirements:
+ - local_storage_server_cmaui:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - link_cmaui_port_0:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ occurrences:
+ - 1
+ - 1
+ capabilities:
+ host_server_cmaui:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os_server_cmaui:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint_server_cmaui:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding_server_cmaui:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ scalable_server_cmaui:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ attachment_cmaui_port_0:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/NativeTypesServiceTemplateServiceTemplate.yaml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/NativeTypesServiceTemplateServiceTemplate.yaml
new file mode 100644
index 0000000000..e7dfd49ed9
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/NativeTypesServiceTemplateServiceTemplate.yaml
@@ -0,0 +1,194 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: NativeTypesServiceTemplate
+ template_version: 1.0.0
+description: TOSCA Native Node Types
+node_types:
+ tosca.nodes.Compute:
+ derived_from: tosca.nodes.Root
+ attributes:
+ private_address:
+ type: string
+ description: private address
+ status: SUPPORTED
+ public_address:
+ type: string
+ description: public_address
+ status: SUPPORTED
+ networks:
+ type: map
+ description: networks
+ status: SUPPORTED
+ entry_schema:
+ type: tosca.datatypes.network.NetworkInfo
+ ports:
+ type: map
+ description: ports
+ status: SUPPORTED
+ entry_schema:
+ type: tosca.datatypes.network.PortInfo
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+ capabilities:
+ scalable:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ tosca.nodes.network.Port:
+ derived_from: tosca.nodes.Root
+ properties:
+ ip_range_end:
+ type: string
+ required: false
+ status: SUPPORTED
+ ip_range_start:
+ type: string
+ required: false
+ status: SUPPORTED
+ ip_address:
+ type: string
+ required: false
+ status: SUPPORTED
+ is_default:
+ type: boolean
+ required: false
+ default: false
+ status: SUPPORTED
+ order:
+ type: integer
+ required: true
+ default: 0
+ status: SUPPORTED
+ constraints:
+ - greater_or_equal: 0
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.network.BindsTo
+ tosca.nodes.Root:
+ attributes:
+ tosca_name:
+ type: string
+ description: tosca name
+ status: SUPPORTED
+ state:
+ type: string
+ description: state
+ status: SUPPORTED
+ tosca_id:
+ type: string
+ description: tosca id
+ status: SUPPORTED
+ interfaces: {
+ }
+ tosca.nodes.network.Network:
+ derived_from: tosca.nodes.Root
+ properties:
+ physical_network:
+ type: string
+ required: false
+ status: SUPPORTED
+ segmentation_id:
+ type: string
+ required: false
+ status: SUPPORTED
+ network_id:
+ type: string
+ required: false
+ status: SUPPORTED
+ ip_version:
+ type: integer
+ required: false
+ default: 4
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - 4
+ - 6
+ start_ip:
+ type: string
+ required: false
+ status: SUPPORTED
+ network_name:
+ type: string
+ required: false
+ status: SUPPORTED
+ cidr:
+ type: string
+ required: false
+ status: SUPPORTED
+ gateway_ip:
+ type: string
+ required: false
+ status: SUPPORTED
+ network_type:
+ type: string
+ required: false
+ status: SUPPORTED
+ end_ip:
+ type: string
+ required: false
+ status: SUPPORTED
+ capabilities:
+ link:
+ type: tosca.capabilities.network.Linkable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ tosca.nodes.BlockStorage:
+ derived_from: tosca.nodes.Root
+ properties:
+ size:
+ type: scalar-unit.size
+ required: false
+ status: SUPPORTED
+ constraints:
+ - greater_or_equal: 1 MB
+ volume_id:
+ type: string
+ required: false
+ status: SUPPORTED
+ snapshot_id:
+ type: string
+ required: false
+ status: SUPPORTED
+ capabilities:
+ attachment:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/NeutronNetGlobalTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/NeutronNetGlobalTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..e80e2727c7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/NeutronNetGlobalTypesServiceTemplate.yaml
@@ -0,0 +1,97 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: NeutronNetGlobalTypes
+ template_version: 1.0.0
+description: Neutron Network TOSCA Global Types
+imports:
+ common_definitions:
+ file: CommonGlobalTypesServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vl.nodes.heat.network.neutron.Net:
+ derived_from: tosca.nodes.network.Network
+ properties:
+ dhcp_agent_ids:
+ type: list
+ description: The IDs of the DHCP agent to schedule the network
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ tenant_id:
+ type: string
+ description: The ID of the tenant which will own the network
+ required: false
+ status: SUPPORTED
+ port_security_enabled:
+ type: boolean
+ description: Flag to enable/disable port security on the network
+ required: false
+ status: SUPPORTED
+ shared:
+ type: boolean
+ description: Whether this network should be shared across all tenants
+ required: false
+ default: false
+ status: SUPPORTED
+ admin_state_up:
+ type: boolean
+ description: A boolean value specifying the administrative status of the network
+ required: false
+ default: true
+ status: SUPPORTED
+ qos_policy:
+ type: string
+ description: The name or ID of QoS policy to attach to this network
+ required: false
+ status: SUPPORTED
+ subnets:
+ type: map
+ description: Network related subnets
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.neutron.Subnet
+ value_specs:
+ type: map
+ description: Extra parameters to include in the request
+ required: false
+ default: {
+ }
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ attributes:
+ qos_policy_id:
+ type: string
+ description: The QoS policy ID attached to this network
+ status: SUPPORTED
+ show:
+ type: string
+ description: Detailed information about resource
+ status: SUPPORTED
+ subnets_name:
+ type: list
+ description: Subnets name of this network
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ subnets:
+ type: map
+ description: Network related subnets
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.neutron.Subnet
+ mtu:
+ type: scalar-unit.size
+ description: The maximum transmission unit size(in bytes) for the network
+ status: SUPPORTED
+ status:
+ type: string
+ description: The status of the network
+ status: SUPPORTED
+ capabilities:
+ attachment:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/NeutronPortGlobalTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/NeutronPortGlobalTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..a337d6ed18
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/NeutronPortGlobalTypesServiceTemplate.yaml
@@ -0,0 +1,151 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: NeutronPortGlobalTypes
+ template_version: 1.0.0
+description: Neutron Port TOSCA Global Types
+imports:
+ common_definitions:
+ file: CommonGlobalTypesServiceTemplate.yaml
+data_types:
+ org.openecomp.datatypes.heat.neutron.port.FixedIps:
+ derived_from: tosca.datatypes.Root
+ description: subnet/ip_address
+ properties:
+ subnet:
+ type: string
+ description: Subnet in which to allocate the IP address for this port
+ required: false
+ status: SUPPORTED
+ ip_address:
+ type: string
+ description: IP address desired in the subnet for this port
+ required: false
+ status: SUPPORTED
+node_types:
+ org.openecomp.resource.cp.nodes.heat.network.neutron.Port:
+ derived_from: tosca.nodes.network.Port
+ properties:
+ port_security_enabled:
+ type: boolean
+ description: Flag to enable/disable port security on the network
+ required: false
+ status: SUPPORTED
+ device_id:
+ type: string
+ description: Device ID of this port
+ required: false
+ status: SUPPORTED
+ qos_policy:
+ type: string
+ description: The name or ID of QoS policy to attach to this network
+ required: false
+ status: SUPPORTED
+ allowed_address_pairs:
+ type: list
+ description: Additional MAC/IP address pairs allowed to pass through the port
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.AddressPair
+ binding:vnic_type:
+ type: string
+ description: The vnic type to be bound on the neutron port
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - macvtap
+ - direct
+ - normal
+ value_specs:
+ type: map
+ description: Extra parameters to include in the request
+ required: false
+ default: {
+ }
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ device_owner:
+ type: string
+ description: Name of the network owning the port
+ required: false
+ status: SUPPORTED
+ network:
+ type: string
+ description: Network this port belongs to
+ required: false
+ status: SUPPORTED
+ replacement_policy:
+ type: string
+ description: Policy on how to respond to a stack-update for this resource
+ required: false
+ default: AUTO
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - REPLACE_ALWAYS
+ - AUTO
+ security_groups:
+ type: list
+ description: List of security group names or IDs
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ fixed_ips:
+ type: list
+ description: Desired IPs for this port
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.neutron.port.FixedIps
+ mac_address:
+ type: string
+ description: MAC address to give to this port
+ required: false
+ status: SUPPORTED
+ admin_state_up:
+ type: boolean
+ description: A boolean value specifying the administrative status of the network
+ required: false
+ default: true
+ status: SUPPORTED
+ name:
+ type: string
+ description: A symbolic name for this port
+ required: false
+ status: SUPPORTED
+ attributes:
+ tenant_id:
+ type: string
+ description: Tenant owning the port
+ status: SUPPORTED
+ network_id:
+ type: string
+ description: Unique identifier for the network owning the port
+ status: SUPPORTED
+ qos_policy_id:
+ type: string
+ description: The QoS policy ID attached to this network
+ status: SUPPORTED
+ show:
+ type: string
+ description: Detailed information about resource
+ status: SUPPORTED
+ subnets:
+ type: list
+ description: Subnets of this network
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ status:
+ type: string
+ description: The status of the network
+ status: SUPPORTED
+ capabilities:
+ attachment:
+ type: tosca.capabilities.Attachment
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/NeutronSecurityRulesGlobalTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..49c9a102c8
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
@@ -0,0 +1,116 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: NeutronSecurityRulesGlobalTypes
+ template_version: 1.0.0
+description: Neutron Security Rules TOSCA Global Types
+imports:
+ common_definitions:
+ file: CommonGlobalTypesServiceTemplate.yaml
+data_types:
+ org.openecomp.datatypes.heat.network.neutron.SecurityRules.Rule:
+ derived_from: tosca.datatypes.Root
+ description: Rules Pairs
+ properties:
+ remote_group_id:
+ type: string
+ description: The remote group ID to be associated with this security group rule
+ required: false
+ status: SUPPORTED
+ protocol:
+ type: string
+ description: The protocol that is matched by the security group rule
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - tcp
+ - udp
+ - icmp
+ ethertype:
+ type: string
+ description: Ethertype of the traffic
+ required: false
+ default: IPv4
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - IPv4
+ - IPv6
+ port_range_max:
+ type: integer
+ description: 'The maximum port number in the range that is matched by the
+ security group rule. '
+ required: false
+ status: SUPPORTED
+ constraints:
+ - in_range:
+ - 0
+ - 65535
+ remote_ip_prefix:
+ type: string
+ description: The remote IP prefix (CIDR) to be associated with this security group rule
+ required: false
+ status: SUPPORTED
+ remote_mode:
+ type: string
+ description: Whether to specify a remote group or a remote IP prefix
+ required: false
+ default: remote_ip_prefix
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - remote_ip_prefix
+ - remote_group_id
+ direction:
+ type: string
+ description: The direction in which the security group rule is applied
+ required: false
+ default: ingress
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - egress
+ - ingress
+ port_range_min:
+ type: integer
+ description: The minimum port number in the range that is matched by the security group rule.
+ required: false
+ status: SUPPORTED
+ constraints:
+ - in_range:
+ - 0
+ - 65535
+node_types:
+ org.openecomp.resource.nodes.heat.network.neutron.SecurityRules:
+ derived_from: tosca.nodes.Root
+ properties:
+ description:
+ type: string
+ description: Description of the security group
+ required: false
+ status: SUPPORTED
+ name:
+ type: string
+ description: A symbolic name for this security group, which is not required to be unique.
+ required: false
+ status: SUPPORTED
+ rules:
+ type: list
+ description: List of security group rules
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.neutron.SecurityRules.Rule
+ attributes:
+ show:
+ type: string
+ description: Detailed information about resource
+ status: SUPPORTED
+ requirements:
+ - port:
+ capability: tosca.capabilities.Attachment
+ node: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ relationship: org.openecomp.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/NovaServerGlobalTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/NovaServerGlobalTypesServiceTemplate.yaml
new file mode 100644
index 0000000000..2253a1e4af
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/NovaServerGlobalTypesServiceTemplate.yaml
@@ -0,0 +1,249 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: NovaServerGlobalTypes
+ template_version: 1.0.0
+description: Nova Server TOSCA Global Types
+imports:
+ common_definitions:
+ file: CommonGlobalTypesServiceTemplate.yaml
+data_types:
+ org.openecomp.datatypes.heat.novaServer.network.PortExtraProperties:
+ derived_from: tosca.datatypes.Root
+ description: Nova server network expand properties for port
+ properties:
+ port_security_enabled:
+ type: boolean
+ description: Flag to enable/disable port security on the port
+ required: false
+ status: SUPPORTED
+ mac_address:
+ type: string
+ description: MAC address to give to this port
+ required: false
+ status: SUPPORTED
+ admin_state_up:
+ type: boolean
+ description: The administrative state of this port
+ required: false
+ default: true
+ status: SUPPORTED
+ qos_policy:
+ type: string
+ description: The name or ID of QoS policy to attach to this port
+ required: false
+ status: SUPPORTED
+ allowed_address_pairs:
+ type: list
+ description: Additional MAC/IP address pairs allowed to pass through the port
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.network.AddressPair
+ binding:vnic_type:
+ type: string
+ description: The vnic type to be bound on the neutron port
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - macvtap
+ - direct
+ - normal
+ value_specs:
+ type: map
+ description: Extra parameters to include in the request
+ required: false
+ default: {
+ }
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ org.openecomp.datatypes.heat.novaServer.network.AddressInfo:
+ derived_from: tosca.datatypes.network.NetworkInfo
+ description: Network addresses with corresponding port id
+ properties:
+ port_id:
+ type: string
+ description: Port id
+ required: false
+ status: SUPPORTED
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.nova.Server:
+ derived_from: tosca.nodes.Compute
+ properties:
+ admin_pass:
+ type: string
+ description: The administrator password for the server
+ required: false
+ status: SUPPORTED
+ availability_zone:
+ type: string
+ description: Availability zone to create servers in
+ required: false
+ status: SUPPORTED
+ image:
+ type: string
+ description: The ID or name of the image to boot with
+ required: false
+ status: SUPPORTED
+ image_update_policy:
+ type: string
+ description: Policy on how to apply an image-id update
+ required: false
+ default: REBUILD
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - REBUILD_PRESERVE_EPHEMERAL
+ - REPLACE
+ - REBUILD
+ metadata:
+ type: map
+ description: Arbitrary key/value metadata to store for this server
+ required: false
+ status: SUPPORTED
+ constraints:
+ - max_length: 255
+ entry_schema:
+ type: string
+ constraints:
+ - max_length: 255
+ user_data_update_policy:
+ type: string
+ description: Policy on how to apply a user_data update
+ required: false
+ default: REPLACE
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - REPLACE
+ - IGNORE
+ flavor_update_policy:
+ type: string
+ description: Policy on how to apply a flavor update
+ required: false
+ default: RESIZE
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - RESIZE
+ - REPLACE
+ user_data:
+ type: string
+ description: User data script to be executed by cloud-init
+ required: false
+ default: ''
+ status: SUPPORTED
+ flavor:
+ type: string
+ description: The ID or name of the flavor to boot onto
+ required: true
+ status: SUPPORTED
+ key_name:
+ type: string
+ description: Name of keypair to inject into the server
+ required: false
+ status: SUPPORTED
+ reservation_id:
+ type: string
+ description: A UUID for the set of servers being requested
+ required: false
+ status: SUPPORTED
+ security_groups:
+ type: list
+ description: List of security group names or IDs
+ required: false
+ default: [
+ ]
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ config_drive:
+ type: boolean
+ description: enable config drive on the server
+ required: false
+ status: SUPPORTED
+ personality:
+ type: map
+ description: A map of files to create/overwrite on the server upon boot
+ required: false
+ default: {
+ }
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ software_config_transport:
+ type: string
+ description: How the server should receive the metadata required for software configuration
+ required: false
+ default: POLL_SERVER_CFN
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - POLL_SERVER_CFN
+ - POLL_SERVER_HEAT
+ - POLL_TEMP_URL
+ - ZAQAR_MESSAGE
+ user_data_format:
+ type: string
+ description: How the user_data should be formatted for the server
+ required: false
+ default: HEAT_CFNTOOLS
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - SOFTWARE_CONFIG
+ - RAW
+ - HEAT_CFNTOOLS
+ diskConfig:
+ type: string
+ description: Control how the disk is partitioned when the server is created
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - AUTO
+ - MANUAL
+ name:
+ type: string
+ description: Server name
+ required: false
+ status: SUPPORTED
+ scheduler_hints:
+ type: map
+ description: Arbitrary key-value pairs specified by the client to help boot a server
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ attributes:
+ accessIPv4:
+ type: string
+ description: The manually assigned alternative public IPv4 address of the server
+ status: SUPPORTED
+ addresses:
+ type: map
+ description: A dict of all network addresses with corresponding port_id
+ status: SUPPORTED
+ entry_schema:
+ type: org.openecomp.datatypes.heat.novaServer.network.AddressInfo
+ accessIPv6:
+ type: string
+ description: The manually assigned alternative public IPv6 address of the server
+ status: SUPPORTED
+ instance_name:
+ type: string
+ description: AWS compatible instance name
+ status: SUPPORTED
+ name:
+ type: string
+ description: Name of the server
+ status: SUPPORTED
+ show:
+ type: string
+ description: Detailed information about resource
+ status: SUPPORTED
+ console_urls:
+ type: string
+ description: URLs of servers consoles
+ status: SUPPORTED \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/model/serviceTemplate.yaml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/model/serviceTemplate.yaml
new file mode 100644
index 0000000000..612bc2d2fa
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/model/serviceTemplate.yaml
@@ -0,0 +1,116 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Test
+ template_author: OPENECOMP
+ template_version: 1.0.0
+description: testing desc tosca service template
+imports:
+ myfile1:
+ file: path1/path2/file1.yaml
+ myfile2:
+ file: path1/path2/file2.yaml
+artifact_types:
+ one_artifact:
+ mime_type: application/java-archive
+ file_ext:
+ - yaml
+ - xml
+node_types:
+ compute_node_type:
+ derived_from: tosca.nodes.Root
+ version: 1.0.0
+ description: tosca compute test
+ properties:
+ cpu_num:
+ type: integer
+ description: Number of CPUs requested for a software node instance
+ required: true
+ default: 1
+ status: SUPPORTED
+ constraints:
+ - greater_or_equal: 5.0
+ - equal: 5
+ - greater_than: 6.02
+ - in_range:
+ - 0
+ - UNBOUNDED
+ attributes:
+ attDef1:
+ type: string
+ default: hi
+ status: SUPPORTED
+ requirements:
+ - re1:
+ capability: tosca.cap1
+ occurrences:
+ - 5
+ - 1
+ capabilities:
+ cap1:
+ type: tosca.cap
+ valid_source_types:
+ - node1
+ - node2
+ occurrences:
+ - 1
+ - UNBOUNDED
+topology_template:
+ description: topologi template descroption
+ inputs:
+ inParam1:
+ type: string
+ description: desc
+ required: false
+ default: my default val
+ constraints:
+ - greater_than: 6
+ - greater_or_equal: 9
+ entry_schema:
+ type: tosca.myType
+ node_templates:
+ firatNodeTemplate:
+ type: nodeTypeRef
+ directives:
+ - selectable
+ - substitutable
+ properties:
+ prop2: '{ get_input: my_mysql_rootpw }'
+ prop1: abcd
+ attributes:
+ att2: '{ get_input: my_mysql_rootpw }'
+ att1: att1Val
+ requirements:
+ - req1:
+ capability: capA
+ node: nodeA
+ relationship: relationB
+ node_filter:
+ properties:
+ propName1:
+ - greater_or_equal: 9
+ propName2:
+ - min_length: 1
+ - max_length: 2
+ occurrences:
+ - 1
+ - 2
+ - req2:
+ capability: capA
+ node: nodeA
+ relationship: relationB
+ capabilities:
+ - cap1:
+ properties:
+ num_cpus: '{ get_input: cpus }'
+ attributes:
+ num_cpus: '66'
+ node_filter:
+ properties:
+ test1:
+ - equal: 1 MB
+ substitution_mappings:
+ node_type: myNodeType.node
+ capabilities:
+ database_endpoint:
+ - database
+ - database_endpoint
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/model/serviceTemplateHeatExtend.yaml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/model/serviceTemplateHeatExtend.yaml
new file mode 100644
index 0000000000..4515e3dee3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/model/serviceTemplateHeatExtend.yaml
@@ -0,0 +1,117 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: Test
+ template_author: OPENECOMP
+ template_version: 1.0.0
+description: testing desc tosca service template
+imports:
+ myfile1:
+ file: path1/path2/file1.yaml
+ myfile2:
+ file: path1/path2/file2.yaml
+artifact_types:
+ one_artifact:
+ mime_type: application/java-archive
+ file_ext:
+ - yaml
+ - xml
+node_types:
+ compute_node_type:
+ derived_from: tosca.nodes.Root
+ version: 1.0.0
+ description: tosca compute test
+ properties:
+ cpu_num:
+ type: integer
+ description: Number of CPUs requested for a software node instance
+ required: true
+ default: 1
+ status: SUPPORTED
+ constraints:
+ - greater_or_equal: 5.0
+ - equal: 5
+ - greater_than: 6.02
+ - in_range:
+ - 0
+ - UNBOUNDED
+ attributes:
+ attDef1:
+ type: string
+ default: hi
+ status: SUPPORTED
+ requirements:
+ - re1:
+ capability: tosca.cap1
+ occurrences:
+ - 5
+ - 1
+ capabilities:
+ cap1:
+ type: tosca.cap
+ valid_source_types:
+ - node1
+ - node2
+ occurrences:
+ - 1
+ - UNBOUNDED
+topology_template:
+ description: topologi template descroption
+ inputs:
+ inParam1:
+ type: string
+ description: desc
+ required: false
+ default: my default val
+ label: my label
+ constraints:
+ - greater_than: 6
+ - greater_or_equal: 9
+ entry_schema:
+ type: tosca.myType
+ node_templates:
+ firatNodeTemplate:
+ type: nodeTypeRef
+ directives:
+ - selectable
+ - substitutable
+ properties:
+ prop2: '{ get_input: my_mysql_rootpw }'
+ prop1: abcd
+ attributes:
+ att2: '{ get_input: my_mysql_rootpw }'
+ att1: att1Val
+ requirements:
+ - req1:
+ capability: capA
+ node: nodeA
+ relationship: relationB
+ node_filter:
+ properties:
+ propName1:
+ - greater_or_equal: 9
+ propName2:
+ - min_length: 1
+ - max_length: 2
+ occurrences:
+ - 1
+ - 2
+ - req2:
+ capability: capA
+ node: nodeA
+ relationship: relationB
+ capabilities:
+ - cap1:
+ properties:
+ num_cpus: '{ get_input: cpus }'
+ attributes:
+ num_cpus: '66'
+ node_filter:
+ properties:
+ test1:
+ - equal: 1 MB
+ substitution_mappings:
+ node_type: myNodeType.node
+ capabilities:
+ database_endpoint:
+ - database
+ - database_endpoint
diff --git a/openecomp-be/lib/pom.xml b/openecomp-be/lib/pom.xml
new file mode 100644
index 0000000000..9665bd47c4
--- /dev/null
+++ b/openecomp-be/lib/pom.xml
@@ -0,0 +1,30 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>openecomp-sdc</artifactId>
+ <groupId>org.openecomp.sdc</groupId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <name>openecomp-sdc-lib</name>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>openecomp-core-lib</module>
+ <module>openecomp-common-lib</module>
+ <module>openecomp-sdc-versioning-lib</module>
+ <module>openecomp-sdc-vendor-license-lib</module>
+ <module>openecomp-sdc-vendor-software-product-lib</module>
+ <module>openecomp-sdc-translator-lib</module>
+ <module>openecomp-sdc-model-lib</module>
+ <module>openecomp-sdc-validation-lib</module>
+ <module>openecomp-sdc-datatypes-lib</module>
+ <module>openecomp-heat-lib</module>
+ <module>openecomp-tosca-lib</module>
+ <module>openecomp-sdc-action-lib</module>
+ <module>openecomp-sdc-enrichment-lib</module>
+ </modules>
+</project> \ No newline at end of file