From 51d50f0ef642e0f996a1c8b8d2ef4838bdfec892 Mon Sep 17 00:00:00 2001 From: Tal Gitelman Date: Sun, 10 Dec 2017 18:55:03 +0200 Subject: Final commit to master merge from Change-Id: Ib464f9a8828437c86fe6def8af238aaf83473507 Issue-ID: SDC-714 Signed-off-by: Tal Gitelman --- .../sdc/be/auditing/api/IAuditingManager.java | 2 - .../auditing/impl/AuditingLogFormatConstants.java | 59 +- .../be/auditing/impl/AuditingLogFormatUtil.java | 2 - .../clean/AsdcComponentsCleanerTask.java | 2 +- .../distribution/engine/CambriaHandler.java | 190 +- .../distribution/engine/DistributionEngine.java | 1 - .../engine/DistributionEngineClusterHealth.java | 10 +- .../distribution/engine/INotificationData.java | 4 + .../distribution/engine/NotificationDataImpl.java | 20 +- .../ServiceDistributionArtifactsBuilder.java | 16 +- .../engine/VfModuleArtifactPayload.java | 2 - .../be/components/impl/ArtifactResolverImpl.java | 14 +- .../be/components/impl/ArtifactsBusinessLogic.java | 515 ++- .../be/components/impl/AttributeBusinessLogic.java | 1 - .../sdc/be/components/impl/BaseBusinessLogic.java | 55 +- .../be/components/impl/CassandraHealthCheck.java | 2 - .../be/components/impl/CommonImportManager.java | 3 +- .../be/components/impl/ComponentBusinessLogic.java | 137 +- .../impl/ComponentInstanceBusinessLogic.java | 972 ++++-- .../components/impl/CompositionBusinessLogic.java | 2 +- .../be/components/impl/CsarValidationUtils.java | 2 - .../impl/DistributionMonitoringBusinessLogic.java | 9 +- .../be/components/impl/ElementBusinessLogic.java | 42 +- .../sdc/be/components/impl/GroupBusinessLogic.java | 12 +- .../be/components/impl/GroupTypeImportManager.java | 18 +- .../components/impl/HealthCheckBusinessLogic.java | 232 +- .../sdc/be/components/impl/ImportUtils.java | 10 +- .../InformationDeployedArtifactsBusinessLogic.java | 25 - .../be/components/impl/InputsBusinessLogic.java | 27 +- .../components/impl/PolicyTypeImportManager.java | 12 +- .../ProductComponentInstanceBusinessLogic.java | 3 - .../be/components/impl/PropertyBusinessLogic.java | 31 +- .../be/components/impl/ResourceBusinessLogic.java | 295 +- .../be/components/impl/ResourceImportManager.java | 54 +- .../be/components/impl/ResponseFormatManager.java | 3 - .../be/components/impl/ServiceBusinessLogic.java | 39 +- .../impl/VFComponentInstanceBusinessLogic.java | 7 - .../impl/generic/GenericTypeBusinessLogic.java | 91 + .../lifecycle/CertificationChangeTransition.java | 1 + .../lifecycle/CertificationRequestTransition.java | 32 +- .../components/lifecycle/CheckoutTransition.java | 21 +- .../components/lifecycle/LifeCycleTransition.java | 6 +- .../lifecycle/LifecycleBusinessLogic.java | 16 +- .../lifecycle/LifecycleChangeInfoWithAction.java | 2 +- .../lifecycle/StartCertificationTransition.java | 5 +- .../lifecycle/UndoCheckoutTransition.java | 1 + .../merge/GlobalInputsFilteringBusinessLogic.java | 36 + .../merge/GlobalTypesMergeBusinessLogic.java | 41 + .../be/components/merge/RelationsComparator.java | 95 + .../be/components/merge/TopologyComparator.java | 105 + .../heat/HeatEnvArtifactsMergeBusinessLogic.java | 64 + .../merge/input/ComponentInputsMergeBL.java | 60 + .../input/InputsValuesMergingBusinessLogic.java | 180 + .../instance/ComponentInstanceArtifactsMerge.java | 101 + .../instance/ComponentInstanceHeatEnvMerge.java | 63 + .../ComponentInstanceMergeDataBusinessLogic.java | 90 + .../instance/ComponentInstanceMergeInterface.java | 18 + .../ComponentInstancePropsAndInputsMerge.java | 131 + .../merge/instance/DataForMergeHolder.java | 114 + .../merge/property/ComplexPropertyValueMerger.java | 17 + .../property/ComponentInstanceInputsMergeBL.java | 72 + .../ComponentInstancePropertiesMergeBL.java | 73 + .../DataDefinitionsValuesMergingBusinessLogic.java | 43 + .../merge/property/MergePropertyData.java | 52 + .../PropertyDataValueMergeBusinessLogic.java | 164 + .../property/PropertyInstanceMergeDataBuilder.java | 79 + .../merge/property/PropertyValueMerger.java | 148 + .../merge/property/ScalarPropertyValueMerger.java | 20 + .../merge/resource/MergeResourceBLFactory.java | 33 + .../merge/resource/MergeResourceBusinessLogic.java | 10 + .../resource/ResourceDataMergeBusinessLogic.java | 62 + .../validation/ComponentValidations.java | 6 +- .../sdc/be/exception/SdcActionException.java | 16 + .../servlet/ArtifactExternalServlet.java | 4 +- .../org/openecomp/sdc/be/impl/ComponentsUtils.java | 35 +- .../sdc/be/impl/DownloadArtifactLogic.java | 1 - .../sdc/be/info/ArtifactDefinitionInfo.java | 1 - .../sdc/be/info/ArtifactTemplateInfo.java | 16 +- .../openecomp/sdc/be/info/GroupDefinitionInfo.java | 1 + .../openecomp/sdc/be/info/MergedArtifactInfo.java | 4 +- .../sdc/be/listen/BEAppContextListener.java | 18 +- .../be/servlets/AdditionalInformationServlet.java | 4 +- .../openecomp/sdc/be/servlets/ArtifactServlet.java | 4 +- .../sdc/be/servlets/AttributeServlet.java | 4 +- .../sdc/be/servlets/BeGenericServlet.java | 2 - .../sdc/be/servlets/BeMonitoringServlet.java | 32 +- .../sdc/be/servlets/ComponentInstanceServlet.java | 221 +- .../sdc/be/servlets/ComponentServlet.java | 15 +- .../openecomp/sdc/be/servlets/ConsumerServlet.java | 4 +- .../be/servlets/DistributionServiceServlet.java | 4 +- .../openecomp/sdc/be/servlets/ElementServlet.java | 43 +- .../openecomp/sdc/be/servlets/GroupServlet.java | 7 +- .../openecomp/sdc/be/servlets/InputsServlet.java | 7 +- .../sdc/be/servlets/LifecycleServlet.java | 4 +- .../openecomp/sdc/be/servlets/ProductServlet.java | 6 +- .../openecomp/sdc/be/servlets/PropertyServlet.java | 4 +- .../sdc/be/servlets/RequirementsServlet.java | 1 + .../sdc/be/servlets/ResourceUploadServlet.java | 1 + .../sdc/be/servlets/ResourcesServlet.java | 4 +- .../openecomp/sdc/be/servlets/ServiceServlet.java | 5 +- .../sdc/be/servlets/TypesFetchServlet.java | 10 +- .../sdc/be/servlets/TypesUploadServlet.java | 8 +- .../sdc/be/servlets/UserAdminServlet.java | 4 +- .../be/switchover/detector/SwitchoverDetector.java | 2 +- .../be/tosca/CapabiltyRequirementConvertor.java | 79 +- .../java/org/openecomp/sdc/be/tosca/CsarUtils.java | 79 +- .../openecomp/sdc/be/tosca/PropertyConvertor.java | 6 +- .../openecomp/sdc/be/tosca/ToscaExportHandler.java | 270 +- .../sdc/be/tosca/model/ToscaMetadata.java | 40 +- .../openecomp/sdc/be/user/UserBusinessLogic.java | 1 - .../common/transaction/mngr/RollbackManager.java | 10 +- .../src/main/resources/application-context.xml | 1 + .../src/main/resources/config/configuration.yaml | 29 +- .../main/resources/config/error-configuration.yaml | 26 + .../tosca/capability-types/capabilityTypes.yml | 5 + .../tosca/capability-types/capabilityTypes.zip | Bin 1598 -> 1676 bytes .../import/tosca/categories/categoryTypes.yml | 9 + .../import/tosca/categories/categoryTypes.zip | Bin 1079 -> 1109 bytes .../import/tosca/data-types/dataTypes.yml | 17 + .../import/tosca/data-types/dataTypes.zip | Bin 6242 -> 6601 bytes .../tosca/heat-types/Generic_VF/Generic_VF.yml | 5 +- .../tosca/heat-types/Generic_VF/Generic_VF.zip | Bin 436 -> 460 bytes .../heat-types/extContrailCP/extContrailCP.json | 21 + .../heat-types/extContrailCP/extContrailCP.yml | 59 + .../heat-types/extContrailCP/extContrailCP.zip | Bin 0 -> 665 bytes .../import/tosca/heat-types/extCp2/extCp2.json | 21 + .../import/tosca/heat-types/extCp2/extCp2.yml | 8 + .../import/tosca/heat-types/extCp2/extCp2.zip | Bin 0 -> 347 bytes .../heat-types/extNeutronCP/extNeutronCP.json | 21 + .../tosca/heat-types/extNeutronCP/extNeutronCP.yml | 140 + .../tosca/heat-types/extNeutronCP/extNeutronCP.zip | Bin 0 -> 1193 bytes .../import/tosca/heat-types/extVl/extVl.yml | 2 +- .../import/tosca/heat-types/extVl/extVl.zip | Bin 767 -> 762 bytes .../heat-types/portMirroring/portMirroring.json | 21 + .../heat-types/portMirroring/portMirroring.yml | 11 + .../heat-types/portMirroring/portMirroring.zip | Bin 0 -> 711 bytes .../portMirroringByPolicy.json | 21 + .../portMirroringByPolicy.yml | 26 + .../portMirroringByPolicy.zip | Bin 0 -> 909 bytes .../heat-types/serviceProxy/serviceProxy.json | 21 + .../tosca/heat-types/serviceProxy/serviceProxy.yml | 4 + .../tosca/heat-types/serviceProxy/serviceProxy.zip | Bin 0 -> 557 bytes .../scripts/import/tosca/importHeatTypes.py | 9 +- .../scripts/import/tosca/importNormativeAll.py | 6 +- .../scripts/import/tosca/importONAPNormativeAll.py | 140 + .../scripts/import/tosca/typesToUpgrade.json | 58 +- .../scripts/import/tosca/upgradeNormative.py | 4 - .../scripts/import/tosca/upgradeONAPNormative.py | 124 + .../src/test/java/org/openecomp/sdc/ZipUtil.java | 2 - .../sdc/be/DummyConfigurationManager.java | 40 + .../sdc/be/components/AuditingManagerTest.java | 6 +- .../be/components/ComponentBusinessLogicTest.java | 75 +- .../sdc/be/components/GroupBusinessLogicTest.java | 12 - .../components/HealthCheckBusinessLogicTest.java | 23 +- .../be/components/PropertyBusinessLogicTest.java | 31 +- .../be/components/ResourceImportManagerTest.java | 7 +- .../be/components/ServiceBusinessLogicTest.java | 11 +- .../clean/AsdcComponentsCleanerTaskTest.java | 2 - .../engine/DistributionEngineConfigTest.java | 4 +- .../engine/DistributionEngineHealthCheckTest.java | 4 - .../engine/DistributionEngineInitTaskTest.java | 31 +- .../engine/VfModuleArtifactPayloadTest.java | 3 - .../AdditionalInformationBusinessLogicTest.java | 1 - .../components/impl/ArtifactBusinessLogicTest.java | 168 +- .../be/components/impl/ArtifactResolverTest.java | 12 +- .../impl/AttributeBusinessLogicTest.java | 3 - .../impl/CapabilityTypeImportManagerTest.java | 2 - .../impl/CategoriesImportManagerTest.java | 15 +- .../impl/ComponentInstanceBusinessLogicTest.java | 245 ++ .../impl/CompositionBusinessLogicTest.java | 1 - .../components/impl/ConsumerBusinessLogicTest.java | 4 - .../components/impl/CsarValidationUtilsTest.java | 2 +- .../components/impl/ElementBusinessLogicTest.java | 25 - .../be/components/impl/GroupBusinessLogicTest.java | 2 - .../sdc/be/components/impl/ImportUtilsTest.java | 5 +- .../components/impl/InputsBusinessLogicTest.java | 20 +- .../InterfaceLifecycleTypeImportManagerTest.java | 2 - .../components/impl/ProductBusinessLogicTest.java | 3 - .../components/impl/ResourceBusinessLogicTest.java | 1253 ++----- .../impl/ResourceInstanceBusinessLogicTest.java | 23 +- .../impl/generic/GenericTypeBusinessLogicTest.java | 97 + .../CertificationChangeTransitionTest.java | 13 +- .../lifecycle/CertificationRequestTest.java | 57 +- .../sdc/be/components/lifecycle/CheckinTest.java | 8 +- .../sdc/be/components/lifecycle/CheckoutTest.java | 13 +- .../be/components/lifecycle/LifecycleTestBase.java | 27 +- .../be/components/lifecycle/UndoCheckoutTest.java | 5 +- .../GlobalInputsFilteringBusinessLogicTest.java | 86 + .../merge/GlobalTypesMergeBusinessLogicTest.java | 62 + .../components/merge/RelationsComparatorTest.java | 112 + .../components/merge/TopologyComparatorTest.java | 119 + .../HeatEnvArtifactsMergeBusinessLogicTest.java | 112 + .../merge/input/ComponentInputsMergeBLTest.java | 94 + .../InputsValuesMergingBusinessLogicTest.java | 186 + .../ComponentInstanceArtifactsMergeTest.java | 88 + .../instance/ComponentInstanceDataMergingTest.java | 16 + .../ComponentInstanceHeatEnvMergeTest.java | 101 + ...omponentInstanceMergeDataBusinessLogicTest.java | 115 + .../ComponentInstancePropsAndInputsMergeTest.java | 154 + .../ComponentInstanceInputsMergeBLTest.java | 120 + .../ComponentInstancePropertiesMergeBLTest.java | 114 + ...aDefinitionsValuesMergingBusinessLogicTest.java | 122 + .../PropertyDataValueMergeBusinessLogicTest.java | 253 ++ .../ResourceDataMergeBusinessLogicTest.java | 82 + .../sdc/be/components/utils/ArtifactBuilder.java | 42 + .../components/utils/ComponentInstanceBuilder.java | 49 + .../be/components/utils/HeatParameterBuilder.java | 36 + .../sdc/be/components/utils/ObjectGenerator.java | 101 + .../utils/PropertyDataDefinitionBuilder.java | 68 + .../sdc/be/components/utils/RelationsBuilder.java | 53 + .../sdc/be/components/utils/ResourceBuilder.java | 126 + .../DistributionBusinessLogicTest.java | 2 - .../ServiceDistributionArtifactsBuilderTest.java | 21 +- .../openecomp/sdc/be/distribution/TestQueue.java | 188 + .../servlet/DistributionServletTest.java | 1 - .../sdc/be/ecomp/GenerateEcompErrorFileTest.java | 6 +- .../externalapi/servlet/AssetsDataServletTest.java | 39 +- .../representation/ArtifactMetadataTest.java | 2 - .../representation/ProductAssetMetadataTest.java | 2 - .../ProductCategoryGroupMetadataTest.java | 2 - .../ResourceAssetDetailedMetadataTest.java | 2 - .../representation/ResourceAssetMetadataTest.java | 2 - .../ResourceInstanceMetadataTest.java | 2 - .../ServiceAssetDetailedMetadataTest.java | 2 - .../representation/ServiceAssetMetadataTest.java | 2 - .../openecomp/sdc/be/impl/ComponentsUtilsTest.java | 20 - .../sdc/be/info/ArtifactAccessInfoTest.java | 2 - .../sdc/be/info/ArtifactAccessListTest.java | 2 - .../sdc/be/info/ArtifactDefinitionInfoTest.java | 2 - .../sdc/be/info/ArtifactTemplateInfoTest.java | 5 +- .../sdc/be/info/ArtifactTypesInfoTest.java | 2 - .../sdc/be/info/CreateAndAssotiateInfoTest.java | 2 - .../sdc/be/info/DistributionStatusInfoTest.java | 2 - .../info/DistributionStatusListResponseTest.java | 2 - .../info/DistributionStatusOfServiceInfoTest.java | 2 - ...istributionStatusOfServiceListResponceTest.java | 2 - .../sdc/be/info/GroupDefinitionInfoTest.java | 4 - .../sdc/be/info/GroupTemplateInfoTest.java | 2 - .../org/openecomp/sdc/be/info/ServiceInfoTest.java | 2 - .../sdc/be/info/ServiceVersionInfoTest.java | 2 - .../openecomp/sdc/be/info/ServicesWrapperTest.java | 2 - .../sdc/be/info/ServletJsonResponseTest.java | 2 - .../sdc/be/info/ToscaNodeTypeInfoTest.java | 2 - .../sdc/be/info/ToscaNodeTypeInterfaceTest.java | 2 - .../servlets/AbstractValidationsServletTest.java | 17 - .../servlets/AdditionalInformationServletTest.java | 4 - .../sdc/be/servlets/ApplicationConfig.java | 1 - .../sdc/be/servlets/ArtifactServletTest.java | 3 - .../sdc/be/servlets/AttributeServletTest.java | 1 - .../be/servlets/ComponentInstanceServletTest.java | 419 +-- .../sdc/be/servlets/ComponentServletTest.java | 1 - .../sdc/be/servlets/ConfigMgrServletTest.java | 2 - .../sdc/be/servlets/ConfigServletTest.java | 1 - .../sdc/be/servlets/ConsumerServletTest.java | 1 - .../sdc/be/servlets/CsarBuildServletTest.java | 6 - .../servlets/DistributionServiceServletTest.java | 1 - .../sdc/be/servlets/ElementServletTest.java | 1 - .../sdc/be/servlets/GroupServletTest.java | 1 - .../sdc/be/servlets/InputsServletTest.java | 1 - .../sdc/be/servlets/LifecycleServletTest.java | 1 - .../sdc/be/servlets/ProductServletTest.java | 1 - .../sdc/be/servlets/PropertyServletTest.java | 3 - .../sdc/be/servlets/RepresentationUtilsTest.java | 2 - .../sdc/be/servlets/RequirementsServletTest.java | 1 - .../ResourceArtifactDownloadServletTest.java | 1 - .../sdc/be/servlets/ResourceServletTest.java | 1 - .../sdc/be/servlets/ResourceUploadServletTest.java | 5 +- .../sdc/be/servlets/ResourcesServletTest.java | 2 - .../sdc/be/servlets/ServiceServletTest.java | 1 - .../sdc/be/servlets/TypesFetchServletTest.java | 1 - .../sdc/be/servlets/TypesUploadServletTest.java | 6 - .../sdc/be/servlets/UserAdminServletTest.java | 1 - .../detector/SwitchoverDetectorTest.java | 2 - .../openecomp/sdc/be/tosca/ArtifactTypesTest.java | 2 - .../org/openecomp/sdc/be/tosca/CsarUtilsTest.java | 3 - .../sdc/be/tosca/PropertyConvertorTest.java | 34 +- .../org/openecomp/sdc/be/tosca/SchemaFiles.java | 3 +- .../sdc/be/tosca/ToscaExportHandlerTest.java | 2 - .../sdc/be/tosca/ToscaExportUtilsTest.java | 124 + .../sdc/be/tosca/ToscaRepresentationTest.java | 2 - .../org/openecomp/sdc/be/tosca/ToscaUtilsTest.java | 2 - .../sdc/be/tosca/model/EntrySchemaTest.java | 2 - .../be/tosca/model/SubstitutionMappingTest.java | 2 - .../sdc/be/tosca/model/ToscaCapabilityTest.java | 2 - .../sdc/be/tosca/model/ToscaGroupTemplateTest.java | 2 - .../sdc/be/tosca/model/ToscaMetadataTest.java | 2 - .../sdc/be/tosca/model/ToscaNodeTemplateTest.java | 2 - .../sdc/be/tosca/model/ToscaNodeTypeTest.java | 2 - .../sdc/be/tosca/model/ToscaPropertyTest.java | 2 - .../sdc/be/tosca/model/ToscaRequirementTest.java | 2 - .../tosca/model/ToscaTemplateCapabilityTest.java | 2 - .../tosca/model/ToscaTemplateRequirementTest.java | 2 - .../sdc/be/tosca/model/ToscaTemplateTest.java | 2 - .../be/tosca/model/ToscaTopolgyTemplateTest.java | 2 - .../be/tosca/model/VfModuleToscaMetadataTest.java | 2 - .../transaction/mngr/RollbackManagerTest.java | 2 - .../transaction/mngr/SdncTransactionTest.java | 2 - .../transaction/mngr/TransactionManagerTest.java | 2 - .../resources/config/catalog-be/configuration.yaml | 20 +- .../csarComparer/vmmeDifferentName.yaml | 3585 ++++++++++++++++++++ .../csarComparer/vmmeDifferentRelationship.yaml | 3585 ++++++++++++++++++++ .../csarComparer/vmmeDifferentRequirementName.yaml | 3585 ++++++++++++++++++++ .../csarComparer/vmmeDifferentRequirementNode.yaml | 3585 ++++++++++++++++++++ .../csarComparer/vmmeDifferentType.yaml | 3585 ++++++++++++++++++++ .../csarComparer/vmmeLessInstances.yaml | 3509 +++++++++++++++++++ .../csarComparer/vmmeLessRequirements.yaml | 3581 +++++++++++++++++++ .../yamlValidation/csarComparer/vmmeOrig.yaml | 3585 ++++++++++++++++++++ .../vmmeReuirementWithDifferentCapability.yaml | 3585 ++++++++++++++++++++ .../csarComparer/vmmeWithMissingRelationship.yaml | 3584 +++++++++++++++++++ 309 files changed, 44798 insertions(+), 3355 deletions(-) create mode 100644 catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/generic/GenericTypeBusinessLogic.java create mode 100644 catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/GlobalInputsFilteringBusinessLogic.java create mode 100644 catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/GlobalTypesMergeBusinessLogic.java create mode 100644 catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/RelationsComparator.java create mode 100644 catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/TopologyComparator.java create mode 100644 catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/heat/HeatEnvArtifactsMergeBusinessLogic.java create mode 100644 catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/input/ComponentInputsMergeBL.java create mode 100644 catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/input/InputsValuesMergingBusinessLogic.java create mode 100644 catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceArtifactsMerge.java create mode 100644 catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceHeatEnvMerge.java create mode 100644 catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceMergeDataBusinessLogic.java create mode 100644 catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceMergeInterface.java create mode 100644 catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstancePropsAndInputsMerge.java create mode 100644 catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/instance/DataForMergeHolder.java create mode 100644 catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/ComplexPropertyValueMerger.java create mode 100644 catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/ComponentInstanceInputsMergeBL.java create mode 100644 catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/ComponentInstancePropertiesMergeBL.java create mode 100644 catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/DataDefinitionsValuesMergingBusinessLogic.java create mode 100644 catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/MergePropertyData.java create mode 100644 catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/PropertyDataValueMergeBusinessLogic.java create mode 100644 catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/PropertyInstanceMergeDataBuilder.java create mode 100644 catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/PropertyValueMerger.java create mode 100644 catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/ScalarPropertyValueMerger.java create mode 100644 catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/resource/MergeResourceBLFactory.java create mode 100644 catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/resource/MergeResourceBusinessLogic.java create mode 100644 catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/resource/ResourceDataMergeBusinessLogic.java create mode 100644 catalog-be/src/main/java/org/openecomp/sdc/be/exception/SdcActionException.java create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/extContrailCP/extContrailCP.json create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/extContrailCP/extContrailCP.yml create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/extContrailCP/extContrailCP.zip create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/extCp2/extCp2.json create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/extCp2/extCp2.yml create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/extCp2/extCp2.zip create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/extNeutronCP/extNeutronCP.json create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/extNeutronCP/extNeutronCP.yml create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/extNeutronCP/extNeutronCP.zip create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/portMirroring/portMirroring.json create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/portMirroring/portMirroring.yml create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/portMirroring/portMirroring.zip create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/portMirroringByPolicy/portMirroringByPolicy.json create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/portMirroringByPolicy/portMirroringByPolicy.yml create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/portMirroringByPolicy/portMirroringByPolicy.zip create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/serviceProxy/serviceProxy.json create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/serviceProxy/serviceProxy.yml create mode 100644 catalog-be/src/main/resources/import/tosca/heat-types/serviceProxy/serviceProxy.zip create mode 100644 catalog-be/src/main/resources/scripts/import/tosca/importONAPNormativeAll.py create mode 100644 catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPNormative.py create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/DummyConfigurationManager.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogicTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/generic/GenericTypeBusinessLogicTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/GlobalInputsFilteringBusinessLogicTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/GlobalTypesMergeBusinessLogicTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/RelationsComparatorTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/TopologyComparatorTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/heat/HeatEnvArtifactsMergeBusinessLogicTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/input/ComponentInputsMergeBLTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/input/InputsValuesMergingBusinessLogicTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceArtifactsMergeTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceDataMergingTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceHeatEnvMergeTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceMergeDataBusinessLogicTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstancePropsAndInputsMergeTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/property/ComponentInstanceInputsMergeBLTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/property/ComponentInstancePropertiesMergeBLTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/property/DataDefinitionsValuesMergingBusinessLogicTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/property/PropertyDataValueMergeBusinessLogicTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/resource/ResourceDataMergeBusinessLogicTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/ArtifactBuilder.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/ComponentInstanceBuilder.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/HeatParameterBuilder.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/ObjectGenerator.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/PropertyDataDefinitionBuilder.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/RelationsBuilder.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/ResourceBuilder.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/distribution/TestQueue.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaExportUtilsTest.java create mode 100644 catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeDifferentName.yaml create mode 100644 catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeDifferentRelationship.yaml create mode 100644 catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeDifferentRequirementName.yaml create mode 100644 catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeDifferentRequirementNode.yaml create mode 100644 catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeDifferentType.yaml create mode 100644 catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeLessInstances.yaml create mode 100644 catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeLessRequirements.yaml create mode 100644 catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeOrig.yaml create mode 100644 catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeReuirementWithDifferentCapability.yaml create mode 100644 catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeWithMissingRelationship.yaml (limited to 'catalog-be/src') diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/auditing/api/IAuditingManager.java b/catalog-be/src/main/java/org/openecomp/sdc/be/auditing/api/IAuditingManager.java index 36b79c2d9c..b6cd4320f4 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/auditing/api/IAuditingManager.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/auditing/api/IAuditingManager.java @@ -22,8 +22,6 @@ package org.openecomp.sdc.be.auditing.api; import java.util.EnumMap; -import javax.servlet.ServletContext; - import org.openecomp.sdc.common.datastructure.AuditingFieldsKeysEnum; public interface IAuditingManager { diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/auditing/impl/AuditingLogFormatConstants.java b/catalog-be/src/main/java/org/openecomp/sdc/be/auditing/impl/AuditingLogFormatConstants.java index 8ff3fca4f8..ed0fd6de0e 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/auditing/impl/AuditingLogFormatConstants.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/auditing/impl/AuditingLogFormatConstants.java @@ -20,14 +20,13 @@ package org.openecomp.sdc.be.auditing.impl; -import org.apache.commons.lang3.StringUtils; -import org.openecomp.sdc.be.components.impl.ImportUtils; -import org.openecomp.sdc.be.model.LifecycleStateEnum; import org.openecomp.sdc.common.datastructure.AuditingFieldsKeysEnum; -public interface AuditingLogFormatConstants { +class AuditingLogFormatConstants { - static AuditingFieldsKeysEnum[] DISTRIBUTION_REGISTRATION_TEMPLATE_ARRAY = { + private AuditingLogFormatConstants() {} + + static final AuditingFieldsKeysEnum[] DISTRIBUTION_REGISTRATION_TEMPLATE_ARRAY = { AuditingFieldsKeysEnum.AUDIT_ACTION, AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_CONSUMER_ID, AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_API_KEY, @@ -37,7 +36,7 @@ public interface AuditingLogFormatConstants { AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_NOTIFICATION_TOPIC_NAME, AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_STATUS_TOPIC_NAME}; - static AuditingFieldsKeysEnum[] DISTRIBUTION_DOWNLOAD_TEMPLATE_ARRAY = { + static final AuditingFieldsKeysEnum[] DISTRIBUTION_DOWNLOAD_TEMPLATE_ARRAY = { AuditingFieldsKeysEnum.AUDIT_ACTION, AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_CONSUMER_ID, AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_RESOURCE_URL, @@ -45,7 +44,7 @@ public interface AuditingLogFormatConstants { AuditingFieldsKeysEnum.AUDIT_DESC }; - static AuditingFieldsKeysEnum[] GET_UEB_CLUSTER_ARRAY = { + static final AuditingFieldsKeysEnum[] GET_UEB_CLUSTER_ARRAY = { AuditingFieldsKeysEnum.AUDIT_ACTION, AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_CONSUMER_ID, AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_STATUS_TIME, @@ -53,7 +52,7 @@ public interface AuditingLogFormatConstants { AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_STATUS_DESC }; - static AuditingFieldsKeysEnum[] DISTRIBUTION_DEPLOY_ARRAY = { + static final AuditingFieldsKeysEnum[] DISTRIBUTION_DEPLOY_ARRAY = { AuditingFieldsKeysEnum.AUDIT_ACTION, AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, AuditingFieldsKeysEnum.AUDIT_RESOURCE_TYPE, @@ -65,7 +64,7 @@ public interface AuditingLogFormatConstants { AuditingFieldsKeysEnum.AUDIT_DESC }; - static AuditingFieldsKeysEnum[] DISTRIBUTION_STATUS_TEMPLATE_ARRAY = { + static final AuditingFieldsKeysEnum[] DISTRIBUTION_STATUS_TEMPLATE_ARRAY = { AuditingFieldsKeysEnum.AUDIT_ACTION, AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_ID, AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_CONSUMER_ID, @@ -76,7 +75,7 @@ public interface AuditingLogFormatConstants { AuditingFieldsKeysEnum.AUDIT_DESC }; - static AuditingFieldsKeysEnum[] DISTRIBUTION_NOTIFY_ARRAY = { + static final AuditingFieldsKeysEnum[] DISTRIBUTION_NOTIFY_ARRAY = { AuditingFieldsKeysEnum.AUDIT_ACTION, AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, AuditingFieldsKeysEnum.AUDIT_RESOURCE_TYPE, @@ -90,7 +89,7 @@ public interface AuditingLogFormatConstants { AuditingFieldsKeysEnum.AUDIT_DESC }; - static AuditingFieldsKeysEnum[] ADD_REMOVE_TOPIC_KEY_ACL_TEMPLATE_ARRAY = { + static final AuditingFieldsKeysEnum[] ADD_REMOVE_TOPIC_KEY_ACL_TEMPLATE_ARRAY = { AuditingFieldsKeysEnum.AUDIT_ACTION, AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_ENVRIONMENT_NAME, AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_TOPIC_NAME, @@ -99,14 +98,14 @@ public interface AuditingLogFormatConstants { AuditingFieldsKeysEnum.AUDIT_STATUS }; - static AuditingFieldsKeysEnum[] CREATE_TOPIC_TEMPLATE_ARRAY = { + static final AuditingFieldsKeysEnum[] CREATE_TOPIC_TEMPLATE_ARRAY = { AuditingFieldsKeysEnum.AUDIT_ACTION, AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_ENVRIONMENT_NAME, AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_TOPIC_NAME, AuditingFieldsKeysEnum.AUDIT_STATUS }; - static AuditingFieldsKeysEnum[] ACTIVATE_DISTRIBUTION_ARRAY ={ + static final AuditingFieldsKeysEnum[] ACTIVATE_DISTRIBUTION_ARRAY ={ AuditingFieldsKeysEnum.AUDIT_ACTION, AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, AuditingFieldsKeysEnum.AUDIT_RESOURCE_TYPE, @@ -121,7 +120,7 @@ public interface AuditingLogFormatConstants { AuditingFieldsKeysEnum.AUDIT_DESC }; - static AuditingFieldsKeysEnum[] CHANGE_DISTRIBUTION_STATUS_ARRAY = { + static final AuditingFieldsKeysEnum[] CHANGE_DISTRIBUTION_STATUS_ARRAY = { AuditingFieldsKeysEnum.AUDIT_ACTION, AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, AuditingFieldsKeysEnum.AUDIT_RESOURCE_TYPE, @@ -136,12 +135,12 @@ public interface AuditingLogFormatConstants { AuditingFieldsKeysEnum.AUDIT_RESOURCE_COMMENT }; - static AuditingFieldsKeysEnum[] CREATE_RESOURCE_TEMPLATE_SUFFIX_ARRAY = { + static final AuditingFieldsKeysEnum[] CREATE_RESOURCE_TEMPLATE_SUFFIX_ARRAY = { AuditingFieldsKeysEnum.AUDIT_STATUS, AuditingFieldsKeysEnum.AUDIT_DESC }; - static AuditingFieldsKeysEnum[] CREATE_RESOURCE_TEMPLATE_PREFIX_ARRAY = { + static final AuditingFieldsKeysEnum[] CREATE_RESOURCE_TEMPLATE_PREFIX_ARRAY = { AuditingFieldsKeysEnum.AUDIT_ACTION, AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, AuditingFieldsKeysEnum.AUDIT_RESOURCE_TYPE, @@ -155,14 +154,14 @@ public interface AuditingLogFormatConstants { }; - static AuditingFieldsKeysEnum[] USER_ACCESS_TEMPLATE_ARRAY = { + static final AuditingFieldsKeysEnum[] USER_ACCESS_TEMPLATE_ARRAY = { AuditingFieldsKeysEnum.AUDIT_ACTION, AuditingFieldsKeysEnum.AUDIT_USER_UID, AuditingFieldsKeysEnum.AUDIT_STATUS, AuditingFieldsKeysEnum.AUDIT_DESC }; - static AuditingFieldsKeysEnum[] USER_TEMPLATE_ARRAY = { + static final AuditingFieldsKeysEnum[] USER_TEMPLATE_ARRAY = { AuditingFieldsKeysEnum.AUDIT_ACTION, AuditingFieldsKeysEnum.AUDIT_MODIFIER_UID, AuditingFieldsKeysEnum.AUDIT_USER_UID, @@ -170,7 +169,7 @@ public interface AuditingLogFormatConstants { AuditingFieldsKeysEnum.AUDIT_DESC }; - static AuditingFieldsKeysEnum[] AUTH_TEMPLATE_ARRAY = { + static final AuditingFieldsKeysEnum[] AUTH_TEMPLATE_ARRAY = { AuditingFieldsKeysEnum.AUDIT_ACTION, AuditingFieldsKeysEnum.AUDIT_AUTH_URL, AuditingFieldsKeysEnum.AUDIT_AUTH_USER, @@ -178,7 +177,7 @@ public interface AuditingLogFormatConstants { AuditingFieldsKeysEnum.AUDIT_AUTH_REALM }; - static AuditingFieldsKeysEnum[] ECOMP_USER_TEMPLATE_ARRAY = { + static final AuditingFieldsKeysEnum[] ECOMP_USER_TEMPLATE_ARRAY = { AuditingFieldsKeysEnum.AUDIT_ACTION, AuditingFieldsKeysEnum.AUDIT_MODIFIER_UID, AuditingFieldsKeysEnum.AUDIT_ECOMP_USER, @@ -186,7 +185,7 @@ public interface AuditingLogFormatConstants { AuditingFieldsKeysEnum.AUDIT_DESC }; - static AuditingFieldsKeysEnum[] CATEGORY_TEMPLATE_ARRAY = { + static final AuditingFieldsKeysEnum[] CATEGORY_TEMPLATE_ARRAY = { AuditingFieldsKeysEnum.AUDIT_ACTION, AuditingFieldsKeysEnum.AUDIT_MODIFIER_UID, AuditingFieldsKeysEnum.AUDIT_CATEGORY_NAME, @@ -197,7 +196,7 @@ public interface AuditingLogFormatConstants { AuditingFieldsKeysEnum.AUDIT_DESC }; - static AuditingFieldsKeysEnum[] GET_USERS_LIST_TEMPLATE_ARRAY = { + static final AuditingFieldsKeysEnum[] GET_USERS_LIST_TEMPLATE_ARRAY = { AuditingFieldsKeysEnum.AUDIT_ACTION, AuditingFieldsKeysEnum.AUDIT_MODIFIER_UID, AuditingFieldsKeysEnum.AUDIT_USER_DETAILS, @@ -205,14 +204,14 @@ public interface AuditingLogFormatConstants { AuditingFieldsKeysEnum.AUDIT_DESC }; - static AuditingFieldsKeysEnum[] GET_CATEGORY_HIERARCHY_TEMPLATE_ARRAY = { + static final AuditingFieldsKeysEnum[] GET_CATEGORY_HIERARCHY_TEMPLATE_ARRAY = { AuditingFieldsKeysEnum.AUDIT_ACTION, AuditingFieldsKeysEnum.AUDIT_MODIFIER_UID, AuditingFieldsKeysEnum.AUDIT_DETAILS, AuditingFieldsKeysEnum.AUDIT_STATUS, AuditingFieldsKeysEnum.AUDIT_DESC }; - static AuditingFieldsKeysEnum[] USER_ADMIN_TEMPLATE_ARRAY = { + static final AuditingFieldsKeysEnum[] USER_ADMIN_TEMPLATE_ARRAY = { AuditingFieldsKeysEnum.AUDIT_ACTION, AuditingFieldsKeysEnum.AUDIT_MODIFIER_UID, AuditingFieldsKeysEnum.AUDIT_USER_BEFORE, @@ -220,14 +219,14 @@ public interface AuditingLogFormatConstants { AuditingFieldsKeysEnum.AUDIT_STATUS, AuditingFieldsKeysEnum.AUDIT_DESC }; - static AuditingFieldsKeysEnum[] EXTERNAL_GET_ASSET_LIST_TEMPLATE_ARRAY = { + static final AuditingFieldsKeysEnum[] EXTERNAL_GET_ASSET_LIST_TEMPLATE_ARRAY = { AuditingFieldsKeysEnum.AUDIT_ACTION, AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_CONSUMER_ID, AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_RESOURCE_URL, AuditingFieldsKeysEnum.AUDIT_STATUS, AuditingFieldsKeysEnum.AUDIT_DESC }; - static AuditingFieldsKeysEnum[] EXTERNAL_GET_ASSET_TEMPLATE_ARRAY = { + static final AuditingFieldsKeysEnum[] EXTERNAL_GET_ASSET_TEMPLATE_ARRAY = { AuditingFieldsKeysEnum.AUDIT_ACTION, AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_CONSUMER_ID, AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_RESOURCE_URL, @@ -237,13 +236,13 @@ public interface AuditingLogFormatConstants { AuditingFieldsKeysEnum.AUDIT_STATUS, AuditingFieldsKeysEnum.AUDIT_DESC }; - static AuditingFieldsKeysEnum[] EXTERNAL_DOWNLOAD_ARTIFACT_ARRAY = { + static final AuditingFieldsKeysEnum[] EXTERNAL_DOWNLOAD_ARTIFACT_ARRAY = { AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_CONSUMER_ID, AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_RESOURCE_URL, AuditingFieldsKeysEnum.AUDIT_STATUS, AuditingFieldsKeysEnum.AUDIT_DESC }; - static AuditingFieldsKeysEnum[] EXTERNAL_CRUD_API_ARTIFACT_ARRAY = { + static final AuditingFieldsKeysEnum[] EXTERNAL_CRUD_API_ARTIFACT_ARRAY = { AuditingFieldsKeysEnum.AUDIT_ACTION, AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, AuditingFieldsKeysEnum.AUDIT_RESOURCE_TYPE, @@ -257,7 +256,7 @@ public interface AuditingLogFormatConstants { AuditingFieldsKeysEnum.AUDIT_DESC }; - static AuditingFieldsKeysEnum[] EXTERNAL_CRUD_API_ARRAY = { + static final AuditingFieldsKeysEnum[] EXTERNAL_CRUD_API_ARRAY = { AuditingFieldsKeysEnum.AUDIT_ACTION, AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, AuditingFieldsKeysEnum.AUDIT_RESOURCE_TYPE, @@ -278,7 +277,7 @@ public interface AuditingLogFormatConstants { AuditingFieldsKeysEnum.AUDIT_DESC }; - static AuditingFieldsKeysEnum[] EXTERNAL_LYFECYCLE_API_ARRAY = { + static final AuditingFieldsKeysEnum[] EXTERNAL_LYFECYCLE_API_ARRAY = { AuditingFieldsKeysEnum.AUDIT_ACTION, AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, AuditingFieldsKeysEnum.AUDIT_RESOURCE_TYPE, diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/auditing/impl/AuditingLogFormatUtil.java b/catalog-be/src/main/java/org/openecomp/sdc/be/auditing/impl/AuditingLogFormatUtil.java index b965516df8..8fb5c4116e 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/auditing/impl/AuditingLogFormatUtil.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/auditing/impl/AuditingLogFormatUtil.java @@ -24,9 +24,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.EnumMap; import java.util.Formatter; -import java.util.HashSet; import java.util.Locale; -import java.util.Set; import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum; import org.openecomp.sdc.common.api.Constants; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/clean/AsdcComponentsCleanerTask.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/clean/AsdcComponentsCleanerTask.java index b3b842b9e4..824b70073e 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/clean/AsdcComponentsCleanerTask.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/clean/AsdcComponentsCleanerTask.java @@ -162,7 +162,7 @@ public class AsdcComponentsCleanerTask implements Runnable { public void run() { try { componentsCleanBusinessLogic.cleanComponents(componentsToClean); - } catch (Throwable e) { + } catch (Exception e) { log.error("unexpected error occured", e); String methodName = new Object() { }.getClass().getEnclosingMethod().getName(); diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/CambriaHandler.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/CambriaHandler.java index e6d15b8d5e..c496715a02 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/CambriaHandler.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/CambriaHandler.java @@ -25,14 +25,12 @@ import java.net.MalformedURLException; import java.security.GeneralSecurityException; import java.util.ArrayList; import java.util.Collection; -import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.regex.Matcher; import java.util.regex.Pattern; -import com.att.nsa.cambria.client.*; import org.apache.http.HttpStatus; import org.openecomp.sdc.be.config.BeEcompErrorManager; import org.openecomp.sdc.be.config.ConfigurationManager; @@ -43,189 +41,34 @@ import org.slf4j.LoggerFactory; import com.att.nsa.apiClient.http.HttpException; import com.att.nsa.apiClient.http.HttpObjectNotFoundException; +import com.att.nsa.cambria.client.CambriaBatchingPublisher; +import com.att.nsa.cambria.client.CambriaClient; import com.att.nsa.cambria.client.CambriaClient.CambriaApiException; -import com.att.nsa.cambria.client.CambriaClientBuilders.TopicManagerBuilder; -import com.att.nsa.cambria.client.CambriaClientBuilders.PublisherBuilder; +import com.att.nsa.cambria.client.CambriaClientBuilders; import com.att.nsa.cambria.client.CambriaClientBuilders.ConsumerBuilder; import com.att.nsa.cambria.client.CambriaClientBuilders.IdentityManagerBuilder; +import com.att.nsa.cambria.client.CambriaClientBuilders.PublisherBuilder; +import com.att.nsa.cambria.client.CambriaClientBuilders.TopicManagerBuilder; +import com.att.nsa.cambria.client.CambriaConsumer; +import com.att.nsa.cambria.client.CambriaIdentityManager; import com.att.nsa.cambria.client.CambriaPublisher.message; +import com.att.nsa.cambria.client.CambriaTopicManager; import com.google.gson.Gson; import fj.data.Either; -import jline.internal.Log; public class CambriaHandler { private static Logger logger = LoggerFactory.getLogger(CambriaHandler.class.getName()); - public static String PARTITION_KEY = "asdc" + "aa"; + private static final String PARTITION_KEY = "asdc" + "aa"; + + private final String SEND_NOTIFICATION = "send notification"; private Gson gson = new Gson(); public static boolean useHttpsWithDmaap = ConfigurationManager.getConfigurationManager().getDistributionEngineConfiguration().isUseHttpsWithDmaap(); - public static void main(String[] args) { - - // String userBodyJson ="{\"artifactName\":\"myartifact\", - // \"artifactType\":\"MURANO-PKG\", - // \"artifactDescription\":\"description\", - // \"payloadData\":\"UEsDBAoAAAAIAAeLb0bDQz\", \"Content-MD5\": - // \"YTg2Mjg4MWJhNmI5NzBiNzdDFkMWI=\" }"; - // System.out.println(userBodyJson); - // String encodeBase64Str = GeneralUtililty.calculateMD5 (userBodyJson); - // System.out.println(encodeBase64Str); - - CambriaTopicManager createTopicManager = null; - try { - List servers = new ArrayList(); - // servers.add("uebsb91kcdc.it.sdc.com:3904"); - // servers.add("uebsb92kcdc.it.sdc.com:3904"); - // servers.add("uebsb93kcdc.it.sdc.com:3904"); - servers.add("uebsb91sfdc.it.att.com:3904"); - servers.add("uebsb92sfdc.it.att.com:3904"); - - String key = "sSJc5qiBnKy2qrlc"; - String secret = "4ZRPzNJfEUK0sSNBvccd2m7X"; - - createTopicManager = buildCambriaClient(new TopicManagerBuilder().usingHosts(servers).authenticatedBy(key, secret)); - - String topicName = "ASDC-DISTR-NOTIF-TOPIC-PRODesofer"; - - String clientKey1 = "CGGoorrGPXPx2B1C"; - String clientSecret1 = "OTHk2mcCSbskEtHhDw8h5oUa"; - - CambriaTopicManager createStatusTopicManager = buildCambriaClient(new TopicManagerBuilder().usingHosts(servers).authenticatedBy(key, secret)); - String reportTopic = "ASDC-DISTR-STATUS-TOPIC-PRODESOFER"; - createStatusTopicManager.allowProducer(reportTopic, clientKey1); - - CambriaBatchingPublisher createSimplePublisher = new PublisherBuilder().onTopic(reportTopic).usingHttps(useHttpsWithDmaap).usingHosts(servers).build(); - createSimplePublisher.setApiCredentials(clientKey1, clientSecret1); - - DistributionStatusNotification distributionStatusNotification = new DistributionStatusNotification(); - distributionStatusNotification.setStatus(DistributionStatusNotificationEnum.DEPLOY_OK); - distributionStatusNotification.setArtifactURL("Ssssssss url"); - distributionStatusNotification.setDistributionID("idddddddddddddd"); - distributionStatusNotification.setTimestamp(System.currentTimeMillis()); - distributionStatusNotification.setConsumerID("my consumer id"); - - Gson gson = new Gson(); - int result = createSimplePublisher.send(PARTITION_KEY, gson.toJson(distributionStatusNotification)); - - List messagesInQ = createSimplePublisher.close(20, TimeUnit.SECONDS); - System.out.println(messagesInQ == null ? 0 : messagesInQ.size()); - - // createTopicManager.createTopic(topicName, "my test topic", 1, 1); - - /* - * - * { "secret": "OTHk2mcCSbskEtHhDw8h5oUa", "aux": { "email": "esofer@intl.sdc.com", "description": "test-keys" }, "key": "CGGoorrGPXPx2B1C" } - * - * - * { "secret": "FSlNJbmGWWBvBLJetQMYxPP6", "aux": { "email": "esofer@intl.sdc.com", "description": "test-keys" }, "key": "TAIEPO0aDU4VzM0G" } - * - */ - - String clientKey2 = "TAIEPO0aDU4VzM0G"; - - CambriaConsumer createConsumer1 = new ConsumerBuilder().authenticatedBy("asdc1", "consumerId1").onTopic(topicName).usingHttps(useHttpsWithDmaap).usingHosts(servers).build(); - createConsumer1.setApiCredentials(clientKey1, "OTHk2mcCSbskEtHhDw8h5oUa"); - - createTopicManager.allowConsumer(topicName, clientKey1); - - CambriaConsumer createConsumer2 = null; - if (true) { - createConsumer2 = new ConsumerBuilder().authenticatedBy("asdc2", "consumerId3").onTopic(topicName).usingHttps(useHttpsWithDmaap).usingHosts(servers).build(); - createConsumer2.setApiCredentials(clientKey2, "FSlNJbmGWWBvBLJetQMYxPP6"); - - createTopicManager.allowConsumer(topicName, clientKey2); - } - - createSimplePublisher = new PublisherBuilder().onTopic(topicName).usingHttps(useHttpsWithDmaap).usingHosts(servers).build(); - createSimplePublisher.setApiCredentials(key, secret); - createTopicManager.allowProducer(topicName, key); - - createSimplePublisher.send("aaaa", "{ my testttttttttttttttt }"); - - while (true) { - - Iterable fetch1 = createConsumer1.fetch(); - - Iterator iterator1 = fetch1.iterator(); - while (iterator1.hasNext()) { - System.out.println("***********************************************"); - System.out.println("client 1" + iterator1.next()); - System.out.println("***********************************************"); - } - - if (createConsumer2 != null) { - Iterable fetch2 = createConsumer2.fetch(); - - Iterator iterator2 = fetch2.iterator(); - while (iterator2.hasNext()) { - System.out.println("***********************************************"); - System.out.println("client 2" + iterator2.next()); - System.out.println("***********************************************"); - } - } - Thread.sleep(1000 * 20); - } - - // createTopicManager = CambriaClientFactory.createTopicManager( - // servers, "8F3MDAtMSBwwpSMy", "gzFmsTxSCtO5RQfAccM6PqqX"); - - // createTopicManager.deleteTopic("ASDC-DISTR-NOTIF-TOPIC-PROD"); - // createTopicManager.deleteTopic("ASDC-DISTR-NOTIF-TOPIC-PROD1"); - - // CambriaIdentityManager createIdentityManager = - // CambriaClientFactory.createIdentityManager(null, null, null); - // createIdentityManager.setApiCredentials(arg0, arg1); - // createIdentityManager.cl - - // String topicName = " "; - // createTopicManager.createTopic(topicName, - // "ASDC distribution notification topic", 1, 1); - // - // Thread.sleep(10 * 1000); - // - // for (int i = 0; i < 5; i++) { - // try { - // boolean openForProducing = createTopicManager - // .isOpenForProducing(topicName); - // - // System.out.println("openForProducing=" + openForProducing); - // createTopicManager.allowProducer(topicName, - // "8F3MDAtMSBwwpSMy"); - // Set allowedProducers = createTopicManager - // .getAllowedProducers(topicName); - // System.out.println(allowedProducers); - // - // } catch (Exception e) { - // e.printStackTrace(); - // } - // } - - // createTopicManager.createTopic("", "", 0, 0); - // createTopicManager.allowProducer(arg0, arg1); - // createTopicManager.getTopics(); - // createTopicManager.close(); - // CambriaClientFactory. - // CambriaBatchingPublisher createSimplePublisher = - // CambriaClientFactory.createSimplePublisher("hostlist", "topic"); - - // CambriaIdentityManager createIdentityManager = - // CambriaClientFactory.createIdentityManager(null, "apiKey", - // "apiSecret"); - // createIdentityManager. - - } catch (Exception e) { - Log.debug("Exception in main test of Cambria Handler: {}", e.getMessage(), e); - e.printStackTrace(); - } finally { - if (createTopicManager != null) { - createTopicManager.close(); - } - } - } /** * process the response error from Cambria client @@ -403,7 +246,8 @@ public class CambriaHandler { BeEcompErrorManager.getInstance().processEcompError(EcompErrorName.BeUebSystemError, methodName, operationDesc); BeEcompErrorManager.getInstance().logBeUebSystemError(methodName, operationDesc); break; - + default: + break; } } @@ -661,7 +505,7 @@ public class CambriaHandler { CambriaErrorResponse cambriaErrorResponse = processError(e); - writeErrorToLog(cambriaErrorResponse, e.getMessage(), methodName, "send notification"); + writeErrorToLog(cambriaErrorResponse, e.getMessage(), methodName, SEND_NOTIFICATION); return cambriaErrorResponse; } finally { @@ -719,7 +563,7 @@ public class CambriaHandler { response = processError(e); - writeErrorToLog(response, e.getMessage(), methodName, "send notification"); + writeErrorToLog(response, e.getMessage(), methodName, SEND_NOTIFICATION); return response; @@ -733,7 +577,7 @@ public class CambriaHandler { response = new CambriaErrorResponse(CambriaOperationStatus.INTERNAL_SERVER_ERROR, 500); String methodName = new Object() { }.getClass().getEnclosingMethod().getName(); - writeErrorToLog(response, "closing publisher returned non sent messages", methodName, "send notification"); + writeErrorToLog(response, "closing publisher returned non sent messages", methodName, SEND_NOTIFICATION); } else { logger.debug("No message left in the queue after closing cambria publisher"); response = new CambriaErrorResponse(CambriaOperationStatus.OK, 200); @@ -743,7 +587,7 @@ public class CambriaHandler { response = new CambriaErrorResponse(CambriaOperationStatus.INTERNAL_SERVER_ERROR, 500); String methodName = new Object() { }.getClass().getEnclosingMethod().getName(); - writeErrorToLog(response, "closing publisher returned non sent messages", methodName, "send notification"); + writeErrorToLog(response, "closing publisher returned non sent messages", methodName, SEND_NOTIFICATION); } logger.debug("After closing publisher"); diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngine.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngine.java index d3d04ea735..bd3d74e323 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngine.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngine.java @@ -34,7 +34,6 @@ import javax.annotation.PreDestroy; import org.openecomp.sdc.be.config.BeEcompErrorManager; import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.config.DistributionEngineConfiguration; -import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.impl.ComponentsUtils; import org.openecomp.sdc.be.model.Service; import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngineClusterHealth.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngineClusterHealth.java index 1b868951c5..85a868f156 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngineClusterHealth.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngineClusterHealth.java @@ -39,8 +39,8 @@ import javax.annotation.PreDestroy; import org.openecomp.sdc.be.config.BeEcompErrorManager; import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.config.DistributionEngineConfiguration; +import org.openecomp.sdc.common.api.Constants; import org.openecomp.sdc.common.api.HealthCheckInfo; -import org.openecomp.sdc.common.api.HealthCheckInfo.HealthCheckComponent; import org.openecomp.sdc.common.api.HealthCheckInfo.HealthCheckStatus; import org.openecomp.sdc.common.config.EcompErrorName; import org.slf4j.Logger; @@ -72,10 +72,10 @@ public class DistributionEngineClusterHealth { public enum HealthCheckInfoResult { - OK(new HealthCheckInfo(HealthCheckComponent.DE, HealthCheckStatus.UP, null, ClusterStatusDescription.OK.getDescription())), - UNAVAILABLE(new HealthCheckInfo(HealthCheckComponent.DE, HealthCheckStatus.DOWN, null, ClusterStatusDescription.UNAVAILABLE.getDescription())), - NOT_CONFIGURED(new HealthCheckInfo(HealthCheckComponent.DE, HealthCheckStatus.DOWN, null, ClusterStatusDescription.NOT_CONFIGURED.getDescription())), - DISABLED(new HealthCheckInfo(HealthCheckComponent.DE, HealthCheckStatus.DOWN, null, ClusterStatusDescription.DISABLED.getDescription())); + OK(new HealthCheckInfo(Constants.HC_COMPONENT_DISTRIBUTION_ENGINE, HealthCheckStatus.UP, null, ClusterStatusDescription.OK.getDescription())), + UNAVAILABLE(new HealthCheckInfo(Constants.HC_COMPONENT_DISTRIBUTION_ENGINE, HealthCheckStatus.DOWN, null, ClusterStatusDescription.UNAVAILABLE.getDescription())), + NOT_CONFIGURED(new HealthCheckInfo(Constants.HC_COMPONENT_DISTRIBUTION_ENGINE, HealthCheckStatus.DOWN, null, ClusterStatusDescription.NOT_CONFIGURED.getDescription())), + DISABLED(new HealthCheckInfo(Constants.HC_COMPONENT_DISTRIBUTION_ENGINE, HealthCheckStatus.DOWN, null, ClusterStatusDescription.DISABLED.getDescription())); private HealthCheckInfo healthCheckInfo; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/INotificationData.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/INotificationData.java index 48f6c42823..d631724701 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/INotificationData.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/INotificationData.java @@ -64,6 +64,8 @@ public interface INotificationData { /** List of the artifacts */ List getServiceArtifacts(); + String getWorkloadContext(); + void setDistributionID(String distributionId); /** Logical Service Name. */ @@ -99,4 +101,6 @@ public interface INotificationData { /** List of the Resource Instances */ void setServiceArtifacts(List artifacts); + void setWorkloadContext(String workloadContext); + } diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/NotificationDataImpl.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/NotificationDataImpl.java index 149499811f..353039647d 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/NotificationDataImpl.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/NotificationDataImpl.java @@ -32,6 +32,7 @@ public class NotificationDataImpl implements INotificationData { private String serviceInvariantUUID; private List resources; private List serviceArtifacts; + private String workloadContext; @Override public String getDistributionID() { @@ -76,12 +77,25 @@ public class NotificationDataImpl implements INotificationData { public void setServiceDescription(String serviceDescription) { this.serviceDescription = serviceDescription; } + @Override + public String getWorkloadContext() { return workloadContext; } + + @Override + public void setWorkloadContext(String workloadContext) { this.workloadContext = workloadContext; } - @Override public String toString() { - return "NotificationDataImpl [distributionID=" + distributionID + ", serviceName=" + serviceName + ", serviceVersion=" + serviceVersion + ", serviceUUID=" + serviceUUID + ", serviceDescription=" + serviceDescription - + ", serviceInvariantUUID=" + serviceInvariantUUID + ", resources=" + resources + ", serviceArtifacts=" + serviceArtifacts + "]"; + return "NotificationDataImpl{" + + "distributionID='" + distributionID + '\'' + + ", serviceName='" + serviceName + '\'' + + ", serviceVersion='" + serviceVersion + '\'' + + ", serviceUUID='" + serviceUUID + '\'' + + ", serviceDescription='" + serviceDescription + '\'' + + ", serviceInvariantUUID='" + serviceInvariantUUID + '\'' + + ", resources=" + resources + + ", serviceArtifacts=" + serviceArtifacts + + ", workloadContext='" + workloadContext + '\'' + + '}'; } @Override diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/ServiceDistributionArtifactsBuilder.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/ServiceDistributionArtifactsBuilder.java index 90120288bc..0330a756c6 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/ServiceDistributionArtifactsBuilder.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/ServiceDistributionArtifactsBuilder.java @@ -101,7 +101,10 @@ public class ServiceDistributionArtifactsBuilder { notificationData.setServiceUUID(service.getUUID()); notificationData.setServiceDescription(service.getDescription()); notificationData.setServiceInvariantUUID(service.getInvariantUUID()); - + String workloadContext= ConfigurationManager.getConfigurationManager().getConfiguration().getWorkloadContext(); + if(workloadContext!=null){ + notificationData.setWorkloadContext(workloadContext); + } logger.debug("Before returning notification data object {}", notificationData); return notificationData; @@ -198,7 +201,7 @@ public class ServiceDistributionArtifactsBuilder { } JsonContainerResourceInstance jsonContainer = new JsonContainerResourceInstance(resourceInstance, resoucreType, - artifacts); + rebuildArtifactswith120TimeoutInsteadOf60(artifacts)/*TODO used to send artifacts, the function is a fix to the short timeout bug in distribution*/); jsonContainer.setResourceInvariantUUID(resourceInvariantUUID); jsonContainer.setCategory(resourceCategory); jsonContainer.setSubcategory(resourceSubcategory); @@ -208,6 +211,15 @@ public class ServiceDistributionArtifactsBuilder { return ret; } + private List rebuildArtifactswith120TimeoutInsteadOf60(List artifacts) { + for(ArtifactInfoImpl artifact : artifacts){ + if(artifact.getArtifactTimeout().equals(60)){ + artifact.setArtifactTimeout(120); + } + } + return artifacts; + } + private List getArtifactsWithPayload(ComponentInstance resourceInstance) { List ret = new ArrayList(); diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/VfModuleArtifactPayload.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/VfModuleArtifactPayload.java index 2bcaa4f54a..d706e40f5c 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/VfModuleArtifactPayload.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/VfModuleArtifactPayload.java @@ -20,13 +20,11 @@ package org.openecomp.sdc.be.components.distribution.engine; -import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.stream.Collectors; -import org.apache.commons.collections.CollectionUtils; import org.openecomp.sdc.be.model.GroupDefinition; import org.openecomp.sdc.be.model.GroupInstance; import org.openecomp.sdc.be.model.GroupInstanceProperty; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArtifactResolverImpl.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArtifactResolverImpl.java index 141ed95575..1c5a35453b 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArtifactResolverImpl.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArtifactResolverImpl.java @@ -20,13 +20,6 @@ package org.openecomp.sdc.be.components.impl; -import org.openecomp.sdc.be.components.ArtifactsResolver; -import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; -import org.openecomp.sdc.be.model.ArtifactDefinition; -import org.openecomp.sdc.be.model.Component; -import org.openecomp.sdc.be.model.ComponentInstance; -import org.openecomp.sdc.be.model.Service; - import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -34,6 +27,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import org.openecomp.sdc.be.components.ArtifactsResolver; +import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; +import org.openecomp.sdc.be.model.ArtifactDefinition; +import org.openecomp.sdc.be.model.Component; +import org.openecomp.sdc.be.model.ComponentInstance; +import org.openecomp.sdc.be.model.Service; + @org.springframework.stereotype.Component("artifact-resolver") public class ArtifactResolverImpl implements ArtifactsResolver { diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogic.java index b7344e9911..bd7f61444d 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogic.java @@ -63,6 +63,7 @@ import org.openecomp.sdc.be.datatypes.elements.GroupDataDefinition; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; +import org.openecomp.sdc.be.info.ArtifactTemplateInfo; import org.openecomp.sdc.be.model.ArtifactDefinition; import org.openecomp.sdc.be.model.ArtifactType; import org.openecomp.sdc.be.model.Component; @@ -111,12 +112,19 @@ import org.openecomp.sdc.exception.ResponseFormat; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.xml.sax.*; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; +import org.xml.sax.SAXNotRecognizedException; +import org.xml.sax.SAXNotSupportedException; +import org.xml.sax.XMLReader; import org.yaml.snakeyaml.Yaml; import com.google.gson.Gson; import com.google.gson.GsonBuilder; -import com.sun.org.apache.xerces.internal.parsers.SAXParser; + +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; import fj.data.Either; @@ -142,7 +150,7 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { // private static final Integer NON_HEAT_TIMEOUT = 0; private static Logger log = LoggerFactory.getLogger(ArtifactsBusinessLogic.class.getName()); private Gson gson = new GsonBuilder().setPrettyPrinting().create(); - + private static XMLReader parser; @javax.annotation.Resource private IInterfaceLifecycleOperation interfaceLifecycleOperation; @javax.annotation.Resource @@ -198,7 +206,30 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { } } + + //SAX XML Parser initialization + static { + SAXParserFactory spf = SAXParserFactory.newInstance(); + SAXParser newSAXParser = null; + + try { + newSAXParser = spf.newSAXParser(); + parser = newSAXParser.getXMLReader(); + } catch (ParserConfigurationException | SAXException e1) { + log.debug("SAX XML Parser could not been initialized", e1); + } + + try { + parser.setFeature("http://apache.org/xml/features/validation/schema", false); + } catch (SAXNotRecognizedException e) { + log.debug("SAX Xml parser couldn't set feature: \"http://apache.org/xml/features/validation/schema\", false", e.getMessage(), e); + + } catch (SAXNotSupportedException e) { + log.debug("SAX Xml parser couldn't set feature: \"http://apache.org/xml/features/validation/schema\", false", e.getMessage(), e); + } + } + public class ArtifactOperationInfo { private ArtifactOperationEnum artifactOperationEnum; @@ -438,8 +469,10 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { } } return result; - case Create: - return handleCreate(componentId, artifactInfo, operation, auditingAction, user, componentType, parent, origMd5, originData, interfaceName, operationName, shouldLock, inTransaction); + case Create: + return handleCreate(componentId, artifactInfo, operation, auditingAction, user, componentType, parent, origMd5, originData, interfaceName, operationName, shouldLock, inTransaction); + case Link: + return handleLink(componentId, artifactInfo, operation, auditingAction, user, componentType, parent, origMd5, originData, interfaceName, operationName, shouldLock, inTransaction); } return null; } @@ -603,16 +636,6 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { } } - /** - * - * @param componentId - * @param artifactId - * @param userId - * @param componentType - * @param parentId - * @return - */ - public Either, ResponseFormat> handleDownloadToscaModelRequest(Component component, ArtifactDefinition csarArtifact) { if (artifactGenerationRequired(component, csarArtifact)) { Either generated = csarUtils.createCsar(component, false, false); @@ -839,6 +862,30 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { } + private Either, ResponseFormat> handleLink(String componentId, ArtifactDefinition artifactInfo, ArtifactOperationInfo operation, AuditingActionEnum auditingAction, User user, ComponentTypeEnum componentType, + org.openecomp.sdc.be.model.Component parent, String origMd5, String originData, String interfaceType, String operationName, boolean shouldLock, boolean inTransaction) { + + if (shouldLock) { + Either lockComponent = lockComponent(parent, "Upload Artifact - lock "); + if (lockComponent.isRight()) { + handleAuditing(auditingAction, parent, componentId, user, null, null, null, lockComponent.right().value(), componentType, null); + return Either.right(lockComponent.right().value()); + } + } + Either, ResponseFormat> resultOp = null; + + try { + resultOp = createAndLinkArtifact(parent, componentId, artifactInfo, user, componentType, auditingAction); + return resultOp; + } finally { + if (shouldLock) { + unlockComponent(resultOp, parent, inTransaction); + } + + } + + } + private Either, ResponseFormat> lockComponentAndUpdateArtifact(String parentId, ArtifactDefinition artifactInfo, AuditingActionEnum auditingAction, String artifactId, User user, ComponentTypeEnum componentType, org.openecomp.sdc.be.model.Component parent, byte[] decodedPayload, String interfaceType, String operationName, boolean shouldLock, boolean inTransaction) { @@ -920,9 +967,9 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { public void handleAuditing(AuditingActionEnum auditingActionEnum, Component component, String componentId, User user, ArtifactDefinition artifactDefinition, String prevArtifactUuid, String currentArtifactUuid, ResponseFormat responseFormat, ComponentTypeEnum componentTypeEnum, String resourceInstanceName) { - if (auditingActionEnum.getAuditingEsType().equals(AuditingTypesConstants.EXTERNAL_API_EVENT_TYPE)) { + if (auditingActionEnum != null && auditingActionEnum.getAuditingEsType().equals(AuditingTypesConstants.EXTERNAL_API_EVENT_TYPE)) { return; - } + } EnumMap auditingFields = createArtifactAuditingFields(artifactDefinition, prevArtifactUuid, currentArtifactUuid); @@ -1019,9 +1066,11 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { return Either.right(componentsUtils.getResponseFormat(ActionStatus.ARTIFACT_INVALID_MD5)); } } else { - if (operation.getArtifactOperationEnum() == ArtifactOperationEnum.Create) { - log.debug("Missing md5 header during artifact create"); - return Either.right(componentsUtils.getResponseFormat(ActionStatus.ARTIFACT_INVALID_MD5)); + if (ArtifactOperationEnum.isCreateOrLink(operation.getArtifactOperationEnum())) { + if (payload!=null && payload.length != 0) { + log.debug("Missing md5 header during artifact create"); + return Either.right(componentsUtils.getResponseFormat(ActionStatus.ARTIFACT_INVALID_MD5)); + } } // Update metadata if (payload != null && payload.length != 0) { @@ -1061,7 +1110,7 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { // This is a patch to block possibility of updating service api fields // through other artifacts flow - if (operation.getArtifactOperationEnum() != ArtifactOperationEnum.Create) { + if (!ArtifactOperationEnum.isCreateOrLink(operation.getArtifactOperationEnum())) { checkAndSetUnUpdatableFields(user, artifactInfo, currentArtifactInfo, (operationName != null ? ArtifactGroupTypeEnum.LIFE_CYCLE : ArtifactGroupTypeEnum.INFORMATIONAL)); } else { checkCreateFields(user, artifactInfo, (operationName != null ? ArtifactGroupTypeEnum.LIFE_CYCLE : ArtifactGroupTypeEnum.INFORMATIONAL)); @@ -1073,7 +1122,7 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { } // artifactGroupType is not allowed to be updated - if (operation.getArtifactOperationEnum() != ArtifactOperationEnum.Create) { + if (!ArtifactOperationEnum.isCreateOrLink(operation.getArtifactOperationEnum())) { Either validateGroupType = validateOrSetArtifactGroupType(artifactInfo, currentArtifactInfo); if (validateGroupType.isRight()) { return Either.right(validateGroupType.right().value()); @@ -1083,7 +1132,7 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { NodeTypeEnum parentType = convertParentType(componentType); // TODO TEMP !!! - boolean isCreate = operation.getArtifactOperationEnum() == ArtifactOperationEnum.Create; + boolean isCreate = ArtifactOperationEnum.isCreateOrLink(operation.getArtifactOperationEnum()); if (isDeploymentArtifact(artifactInfo)) { Either deploymentValidationResult = validateDeploymentArtifact(parentComponent, componentId, user.getUserId(), isCreate, artifactInfo, currentArtifactInfo, parentType); @@ -1159,11 +1208,11 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { if (StringUtils.isNotEmpty(artifactId)) { foundArtifact = findArtifact(parentComponent, componentType, parentId, artifactId); } - if (foundArtifact != null && operation.getArtifactOperationEnum() == ArtifactOperationEnum.Create) { + if (foundArtifact != null && ArtifactOperationEnum.isCreateOrLink(operation.getArtifactOperationEnum())) { log.debug("Artifact {} already exist", artifactId); result = Either.right(componentsUtils.getResponseFormat(ActionStatus.ARTIFACT_EXIST, foundArtifact.getArtifactLabel())); } - if (foundArtifact == null && operation.getArtifactOperationEnum() != ArtifactOperationEnum.Create) { + if (foundArtifact == null && !ArtifactOperationEnum.isCreateOrLink(operation.getArtifactOperationEnum())) { log.debug("The artifact {} was not found on parent {}. ", artifactId, parentId); result = Either.right(componentsUtils.getResponseFormat(ActionStatus.ARTIFACT_NOT_FOUND, "")); } @@ -1272,7 +1321,22 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { resultOp = Either.right(responseFormat); } } + boolean isNeedToDeleteArtifactFromDB = true; if (resultOp == null) { + + if(componentType == ComponentTypeEnum.RESOURCE_INSTANCE){ + String instanceId = parentId; + Either isOnlyResourceInstanceArtifact = isArtifactOnlyResourceInstanceArtifact(foundArtifact, fetchedContainerComponent, instanceId); + + if (isOnlyResourceInstanceArtifact.isRight()) { + log.debug("Failed to delete or update the artifact {}. Parent uniqueId is {}", artifactId, parentId); + responseFormat = componentsUtils.getResponseFormatByArtifactId(isOnlyResourceInstanceArtifact.right().value(), foundArtifact.getArtifactDisplayName()); + handleAuditing(auditingAction, parent, parentId, user, null, null, artifactId, responseFormat, componentType, null); + resultOp = Either.right(responseFormat); + } + isNeedToDeleteArtifactFromDB = isOnlyResourceInstanceArtifact.left().value(); + } + Either updatedArtifactRes = deleteOrUpdateArtifactOnGraph(parent, parentId, artifactId, parentType, foundArtifact, needCloneRes.left().value()); if (updatedArtifactRes.isRight()) { log.debug("Failed to delete or update the artifact {}. Parent uniqueId is {}", artifactId, parentId); @@ -1285,13 +1349,16 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { } if (resultOp == null && (!needCloneRes.left().value() && !isDuplicated)) { - log.debug("Going to delete the artifact {} from the database. ", artifactId); - CassandraOperationStatus cassandraStatus = artifactCassandraDao.deleteArtifact(esId); - if (cassandraStatus != CassandraOperationStatus.OK) { - log.debug("Failed to delete the artifact {} from the database. ", artifactId); - responseFormat = componentsUtils.getResponseFormatByArtifactId(componentsUtils.convertFromStorageResponse(convertToStorageOperationStatus(cassandraStatus)), foundArtifact.getArtifactDisplayName()); - handleAuditing(auditingAction, parent, parentId, user, null, null, artifactId, responseFormat, componentType, null); - resultOp = Either.right(responseFormat); + + if(isNeedToDeleteArtifactFromDB){ + log.debug("Going to delete the artifact {} from the database. ", artifactId); + CassandraOperationStatus cassandraStatus = artifactCassandraDao.deleteArtifact(esId); + if (cassandraStatus != CassandraOperationStatus.OK) { + log.debug("Failed to delete the artifact {} from the database. ", artifactId); + responseFormat = componentsUtils.getResponseFormatByArtifactId(componentsUtils.convertFromStorageResponse(convertToStorageOperationStatus(cassandraStatus)), foundArtifact.getArtifactDisplayName()); + handleAuditing(auditingAction, parent, parentId, user, null, null, artifactId, responseFormat, componentType, null); + resultOp = Either.right(responseFormat); + } } } if (resultOp == null && componentType == ComponentTypeEnum.RESOURCE_INSTANCE) { @@ -1340,6 +1407,40 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { } } + private Either isArtifactOnlyResourceInstanceArtifact( ArtifactDefinition foundArtifact, Component parent, String instanceId) { + Either result = Either.left(true); + ComponentInstance foundInstance = null; + Optional componentInstanceOpt = parent.getComponentInstances().stream().filter(i -> i.getUniqueId().equals(instanceId)).findFirst(); + if (!componentInstanceOpt.isPresent()) { + result = Either.right(ActionStatus.COMPONENT_INSTANCE_NOT_FOUND_ON_CONTAINER); + } else { + foundInstance = componentInstanceOpt.get(); + String componentUid = foundInstance.getComponentUid(); + Either getContainerRes = toscaOperationFacade.getToscaElement(parent.getUniqueId()); + if (getContainerRes.isRight()) { + log.debug("Failed to fetch the container component {}. ", componentUid); + result = Either.right(componentsUtils.convertFromStorageResponse(getContainerRes.right().value())); + } + Component origComponent = getContainerRes.left().value(); + Map deploymentArtifacts = origComponent.getDeploymentArtifacts(); + if( deploymentArtifacts!= null && !deploymentArtifacts.isEmpty()){ + Optional op = deploymentArtifacts.keySet().stream().filter(a -> a.equals(foundArtifact.getArtifactLabel())).findAny(); + if(op.isPresent()){ + return Either.left(false); + } + } + Map artifacts = origComponent.getArtifacts(); + if( artifacts!= null && !artifacts.isEmpty()){ + Optional op = artifacts.keySet().stream().filter(a -> a.equals(foundArtifact.getArtifactLabel())).findAny(); + if(op.isPresent()){ + return Either.left(false); + } + } + + } + return result; + } + private List getUpdatedGroups(String artifactId, ArtifactDefinition foundArtifact, List groups) { List updatedGroups = new ArrayList<>(); boolean isUpdated = false; @@ -1393,7 +1494,7 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { if (isMandatory) { log.debug("Going to update mandatory artifact {} from the component {}", artifactId, parentId); resetMandatoryArtifactFields(foundArtifact); - result = artifactToscaOperation.updateArtifactOnGraph(componentId, foundArtifact, parentType, artifactId, instanceId, true); + result = artifactToscaOperation.updateArtifactOnGraph(componentId, foundArtifact, parentType, artifactId, instanceId, true, true); } else if (cloneIsNeeded) { log.debug("Going to clone artifacts and to delete the artifact {} from the component {}", artifactId, parentId); result = artifactToscaOperation.deleteArtifactWithClonnigOnGraph(componentId, foundArtifact, parentType, instanceId, false); @@ -1540,13 +1641,13 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { private Either fetchCurrentArtifact(String parentId, ArtifactOperationInfo operation, String artifactId) { Either artifactById = artifactToscaOperation.getArtifactById(parentId, artifactId); - if (!(operation.getArtifactOperationEnum() == ArtifactOperationEnum.Create) && artifactById.isRight()) { + if (!(ArtifactOperationEnum.isCreateOrLink(operation.getArtifactOperationEnum())) && artifactById.isRight()) { // in case of update artifact must be BeEcompErrorManager.getInstance().logBeArtifactMissingError("Artifact Update / Upload", artifactId); log.debug("Failed to fetch artifact {}. error: {}", artifactId, artifactById.right().value()); return Either.right(componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponse(artifactById.right().value()), artifactId)); } - if (operation.getArtifactOperationEnum() == ArtifactOperationEnum.Create && artifactById.isLeft()) { + if (ArtifactOperationEnum.isCreateOrLink(operation.getArtifactOperationEnum()) && artifactById.isLeft()) { log.debug("Artifact {} already exist", artifactId); return Either.right(componentsUtils.getResponseFormat(ActionStatus.ARTIFACT_EXIST, artifactById.left().value().getArtifactLabel())); } @@ -1567,7 +1668,7 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { log.debug("missing artifact logical name for component {}", componentId); return Either.right(componentsUtils.getResponseFormat(ActionStatus.MISSING_DATA, ARTIFACT_LABEL)); } - if (operation.getArtifactOperationEnum() == ArtifactOperationEnum.Create && !artifactInfo.getMandatory()) { + if (ArtifactOperationEnum.isCreateOrLink(operation.getArtifactOperationEnum()) && !artifactInfo.getMandatory()) { if (operationName != null) { if (artifactInfo.getArtifactLabel() != null && !operationName.equals(artifactInfo.getArtifactLabel())) { @@ -1647,6 +1748,52 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { // *************************************************************** + private Either, ResponseFormat> createAndLinkArtifact(org.openecomp.sdc.be.model.Component parent, String parentId, ArtifactDefinition artifactInfo, User user, + ComponentTypeEnum componentTypeEnum, AuditingActionEnum auditingActionEnum) { + Either, ResponseFormat> resultOp = null; + Either insideEither = null; + ComponentInstance foundInstance = findComponentInstance(parentId, parent); + String instanceId = null; + String instanceName = null; + if (foundInstance != null) { + instanceId = foundInstance.getUniqueId(); + instanceName = foundInstance.getName(); + } + boolean isLeft = false; + String artifactUniqueId = null; + StorageOperationStatus error = null; + // information/deployment/api aritfacts + log.trace("Try to create entry on graph"); + NodeTypeEnum nodeType = convertParentType(componentTypeEnum); + Either result = artifactToscaOperation.addArifactToComponent(artifactInfo, parent.getUniqueId(), nodeType, true, instanceId); + + isLeft = result.isLeft(); + if (isLeft) { + artifactUniqueId = result.left().value().getUniqueId(); + result.left().value(); + + insideEither = Either.left(result.left().value()); + resultOp = Either.left(insideEither); + + error = generateCustomizationUUIDOnInstance(parent.getUniqueId(), parentId, componentTypeEnum); + if (error != StorageOperationStatus.OK) { + isLeft = false; + } + + } if (isLeft) { + ResponseFormat responseFormat = componentsUtils.getResponseFormat(ActionStatus.OK); + handleAuditing(auditingActionEnum, parent, parentId, user, artifactInfo, artifactUniqueId, artifactUniqueId, responseFormat, componentTypeEnum, instanceName); + return resultOp; + } else{ + log.debug("Failed to create entry on graph for artifact {}", artifactInfo.getArtifactName()); + ResponseFormat responseFormat = componentsUtils.getResponseFormatByArtifactId(componentsUtils.convertFromStorageResponse(error), artifactInfo.getArtifactDisplayName()); + handleAuditing(auditingActionEnum, parent, parentId, user, artifactInfo, null, null, responseFormat, componentTypeEnum, instanceName); + resultOp = Either.right(responseFormat); + return resultOp; + + } + } + private Either, ResponseFormat> createArtifact(org.openecomp.sdc.be.model.Component parent, String parentId, ArtifactDefinition artifactInfo, byte[] decodedPayload, User user, ComponentTypeEnum componentTypeEnum, AuditingActionEnum auditingActionEnum, String interfaceType, String operationName) { @@ -2039,27 +2186,20 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { } } - @SuppressWarnings("restriction") public boolean isValidXml(byte[] xmlToParse) { - XMLReader parser = new SAXParser(); - try { - parser.setFeature("http://apache.org/xml/features/validation/schema", false); - } catch (SAXNotRecognizedException e) { - e.printStackTrace(); - log.debug("Xml parser couldn't set feature: \"http://apache.org/xml/features/validation/schema\", false", e.getMessage(), e); - - } catch (SAXNotSupportedException e) { - e.printStackTrace(); - log.debug("Xml parser couldn't set feature: \"http://apache.org/xml/features/validation/schema\", false", e.getMessage(), e); - + if(parser == null) { + log.debug("SAX XML Parser have not been initialized"); + return false; } boolean isXmlValid = true; + try { parser.parse(new InputSource(new ByteArrayInputStream(xmlToParse))); } catch (IOException | SAXException e) { log.debug("Xml is invalid : {}", e.getMessage(), e); isXmlValid = false; } + return isXmlValid; } @@ -2898,22 +3038,6 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { } - public StorageOperationStatus deleteAllComponentArtifactsIfNotOnGraph(List artifacts) { - - if (artifacts != null && !artifacts.isEmpty()) { - for (ArtifactDefinition artifactDefinition : artifacts) { - String esId = artifactDefinition.getEsId(); - if (esId != null && !esId.isEmpty()) { - StorageOperationStatus deleteIfNotOnGraph = deleteIfNotOnGraph(artifactDefinition.getUniqueId(), esId, false); - if (!deleteIfNotOnGraph.equals(StorageOperationStatus.OK)) { - return deleteIfNotOnGraph; - } - } - } - } - return StorageOperationStatus.OK; - } - private Operation convertToOperation(ArtifactDefinition artifactInfo, String operationName) { Operation op = new Operation(); long time = System.currentTimeMillis(); @@ -2933,31 +3057,6 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { return newArtifactName; } - public StorageOperationStatus deleteIfNotOnGraph(String artifactId, String artifactEsId, boolean deleteOnlyPayload) { - log.debug("deleteIfNotOnGraph: delete only payload = {}", deleteOnlyPayload); - // Either checkArtifactNode = titanDao.getNode(UniqueIdBuilder.getKeyByNodeType(NodeTypeEnum.ArtifactRef), artifactId, ArtifactData.class); - // if ((artifactEsId != null && !artifactEsId.isEmpty())) { - // boolean isNotExistOnGraph = checkArtifactNode.isRight() && checkArtifactNode.right().value().equals(TitanOperationStatus.NOT_FOUND); - // - // if ((isNotExistOnGraph) || (checkArtifactNode.left().value().getArtifactDataDefinition().getMandatory() && deleteOnlyPayload) - // || (ArtifactGroupTypeEnum.SERVICE_API.equals(checkArtifactNode.left().value().getArtifactDataDefinition().getArtifactGroupType()) && deleteOnlyPayload)) { - // // last one. need to delete in ES - // log.debug("Entry on graph is deleted. Delete artifact in ES for id = {}", artifactEsId); - // artifactCassandraDao.deleteArtifact(artifactEsId); - // return StorageOperationStatus.OK; - // // return - // // componentsUtils.getResponseFormatByResourceId(ActionStatus.OK, - // // resourceId); - // - // } else { - // log.debug("Entry on graph is deleted. Exist more connections on this artifact. Don't delete artifact in ES for id = {}", artifactEsId); - // return StorageOperationStatus.OK; - // } - // - // } - return StorageOperationStatus.OK; - } - // download by MSO public Either downloadRsrcArtifactByNames(String serviceName, String serviceVersion, String resourceName, String resourceVersion, String artifactName) { @@ -3512,35 +3611,46 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { String payload = generateHeatEnvPayload(artifactDefinition); String prevUUID = artifactDefinition.getArtifactUUID(); ArtifactDefinition clonedBeforeGenerate = new ArtifactDefinition(artifactDefinition); - Either generateResult = generateAndSaveHeatEnvArtifact(artifactDefinition, payload, componentType, component, resourceInstanceName, modifier, shouldLock, instanceId); - if (generateResult.isLeft()) { - ArtifactDefinition updatedArtDef = generateResult.left().value(); - if (!prevUUID.equals(updatedArtDef.getArtifactUUID())) { - List componentInstances = component.getComponentInstances(); - if (componentInstances != null) { - Optional findFirst = componentInstances.stream().filter(ci -> ci.getUniqueId().equals(instanceId)).findFirst(); - if (findFirst.isPresent()) { - ComponentInstance relevantInst = findFirst.get(); - List updatedGroupInstances = getUpdatedGroupInstances(updatedArtDef.getUniqueId(), clonedBeforeGenerate, relevantInst.getGroupInstances()); - - if (CollectionUtils.isNotEmpty(updatedGroupInstances)) { - updatedGroupInstances.forEach(gi -> { - gi.getGroupInstanceArtifacts().add(updatedArtDef.getUniqueId()); - gi.getGroupInstanceArtifactsUuid().add(updatedArtDef.getArtifactUUID()); - }); - Either, StorageOperationStatus> status = toscaOperationFacade.updateGroupInstancesOnComponent(component, componentType, instanceId, updatedGroupInstances); - if (status.isRight()) { - log.debug("Failed to update groups of the component {}. ", component.getUniqueId()); - ResponseFormat responseFormat = componentsUtils.getResponseFormatByArtifactId(componentsUtils.convertFromStorageResponse(status.right().value()), clonedBeforeGenerate.getArtifactDisplayName()); - return Either.right(responseFormat); - } - } - } - } - } - } + return generateAndSaveHeatEnvArtifact(artifactDefinition, payload, componentType, component, resourceInstanceName, modifier, shouldLock, instanceId) + .left() + .bind(artifactDef -> updateArtifactOnGroupInstance(componentType, component, instanceId, prevUUID, clonedBeforeGenerate, artifactDef)); + } - return generateResult; + public Either forceGenerateHeatEnvArtifact(ArtifactDefinition artifactDefinition, ComponentTypeEnum componentType, org.openecomp.sdc.be.model.Component component, String resourceInstanceName, User modifier, + boolean shouldLock, String instanceId) { + String payload = generateHeatEnvPayload(artifactDefinition); + String prevUUID = artifactDefinition.getArtifactUUID(); + ArtifactDefinition clonedBeforeGenerate = new ArtifactDefinition(artifactDefinition); + return forceGenerateAndSaveHeatEnvArtifact(artifactDefinition, payload, componentType, component, resourceInstanceName, modifier, shouldLock, instanceId) + .left() + .bind(artifactDef -> updateArtifactOnGroupInstance(componentType, component, instanceId, prevUUID, clonedBeforeGenerate, artifactDef)); + } + + private Either updateArtifactOnGroupInstance(ComponentTypeEnum componentType, Component component, String instanceId, String prevUUID, ArtifactDefinition clonedBeforeGenerate, ArtifactDefinition updatedArtDef) { + if (!prevUUID.equals(updatedArtDef.getArtifactUUID())) { + List componentInstances = component.getComponentInstances(); + if (componentInstances != null) { + Optional findFirst = componentInstances.stream().filter(ci -> ci.getUniqueId().equals(instanceId)).findFirst(); + if (findFirst.isPresent()) { + ComponentInstance relevantInst = findFirst.get(); + List updatedGroupInstances = getUpdatedGroupInstances(updatedArtDef.getUniqueId(), clonedBeforeGenerate, relevantInst.getGroupInstances()); + + if (CollectionUtils.isNotEmpty(updatedGroupInstances)) { + updatedGroupInstances.forEach(gi -> { + gi.getGroupInstanceArtifacts().add(updatedArtDef.getUniqueId()); + gi.getGroupInstanceArtifactsUuid().add(updatedArtDef.getArtifactUUID()); + }); + Either, StorageOperationStatus> status = toscaOperationFacade.updateGroupInstancesOnComponent(component, componentType, instanceId, updatedGroupInstances); + if (status.isRight()) { + log.debug("Failed to update groups of the component {}. ", component.getUniqueId()); + ResponseFormat responseFormat = componentsUtils.getResponseFormatByArtifactId(componentsUtils.convertFromStorageResponse(status.right().value()), clonedBeforeGenerate.getArtifactDisplayName()); + return Either.right(responseFormat); + } + } + } + } + } + return Either.left(updatedArtDef); } private String generateHeatEnvPayload(ArtifactDefinition artifactDefinition) { @@ -3628,6 +3738,13 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { } + public Either forceGenerateAndSaveHeatEnvArtifact(ArtifactDefinition artifactDefinition, String payload, ComponentTypeEnum componentType, org.openecomp.sdc.be.model.Component component, String resourceInstanceName, + User modifier, boolean shouldLock, String instanceId) { + return generateArtifactPayload(artifactDefinition, componentType, component, resourceInstanceName, modifier, shouldLock, System::currentTimeMillis, + () -> createEsHeatEnvArtifactDataFromString(artifactDefinition, payload), instanceId); + + } + protected Either generateArtifactPayload(ArtifactDefinition artifactDefinition, ComponentTypeEnum componentType, org.openecomp.sdc.be.model.Component component, String resourceInstanceName, User modifier, boolean shouldLock, Supplier payloadUpdateDateGen, Supplier> esDataCreator, String instanceId) { @@ -3743,6 +3860,57 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { return Either.left(artifactDefinition); } + + public Map buildJsonForUpdateArtifact(ArtifactDefinition artifactDef, ArtifactGroupTypeEnum artifactGroupType, List updatedRequiredArtifacts) { + return this.buildJsonForUpdateArtifact(artifactDef.getUniqueId(), artifactDef.getArtifactName(), artifactDef.getArtifactType(), artifactGroupType, artifactDef.getArtifactLabel(), artifactDef.getArtifactDisplayName(), + artifactDef.getDescription(), artifactDef.getPayloadData(), updatedRequiredArtifacts, artifactDef.getListHeatParameters()); + + } + + public Map buildJsonForUpdateArtifact(String artifactId, String artifactName, String artifactType, ArtifactGroupTypeEnum artifactGroupType, String label, String displayName, String description, byte[] artifactContent, + List updatedRequiredArtifacts, List heatParameters) { + + Map json = new HashMap(); + if (artifactId != null && !artifactId.isEmpty()) + json.put(Constants.ARTIFACT_ID, artifactId); + + json.put(Constants.ARTIFACT_NAME, artifactName); + json.put(Constants.ARTIFACT_TYPE, artifactType); + json.put(Constants.ARTIFACT_DESCRIPTION, description); + + if (artifactContent != null) { + String encodedPayload = new String(artifactContent); + + // boolean isEncoded = GeneralUtility.isBase64Encoded(artifactContentent); + // if (!isEncoded) { + log.debug("payload is encoded. perform decode"); + encodedPayload = Base64.encodeBase64String(artifactContent); + json.put(Constants.ARTIFACT_PAYLOAD_DATA, encodedPayload); + } + // } + json.put(Constants.ARTIFACT_DISPLAY_NAME, displayName); + json.put(Constants.ARTIFACT_LABEL, label); + json.put(Constants.ARTIFACT_GROUP_TYPE, artifactGroupType.getType()); + json.put(Constants.REQUIRED_ARTIFACTS, (updatedRequiredArtifacts == null || updatedRequiredArtifacts.isEmpty()) ? new ArrayList<>() + : updatedRequiredArtifacts.stream().filter(e -> e.getType().equals(ArtifactTypeEnum.HEAT_ARTIFACT.getType()) || e.getType().equals(ArtifactTypeEnum.HEAT_NESTED.getType())).map(e -> e.getFileName()).collect(Collectors.toList())); + json.put(Constants.ARTIFACT_HEAT_PARAMS, (heatParameters == null || heatParameters.isEmpty()) ? new ArrayList<>() + : heatParameters); + return json; + } + + public Either, ResponseFormat> updateResourceInstanceArtifactNoContent(String resourceId, Component containerComponent, User user, Map json, ArtifactOperationInfo operation, ArtifactDefinition artifactInfo) { + + String jsonStr = gson.toJson(json); + ArtifactDefinition artifactDefinitionFromJson = artifactInfo == null? RepresentationUtils.convertJsonToArtifactDefinition(jsonStr, ArtifactDefinition.class) : artifactInfo; + String artifactUniqueId = artifactDefinitionFromJson == null ? null : artifactDefinitionFromJson.getUniqueId(); + Either, ResponseFormat> uploadArtifactToService = validateAndHandleArtifact(resourceId, ComponentTypeEnum.RESOURCE_INSTANCE, operation, artifactUniqueId, + artifactDefinitionFromJson, null, jsonStr, null, null, null, user, containerComponent, false, false, true); + if (uploadArtifactToService.isRight()) + return Either.right(uploadArtifactToService.right().value()); + + return Either.left(uploadArtifactToService.left().value()); + } + private Either, ResponseFormat> handleUpdateHeatEnv(String componentId, ArtifactDefinition artifactInfo, AuditingActionEnum auditingAction, String artifactId, User user, ComponentTypeEnum componentType, org.openecomp.sdc.be.model.Component parent, String originData, String origMd5, ArtifactOperationInfo operation, boolean shouldLock, boolean inTransaction) { convertParentType(componentType); @@ -3789,7 +3957,7 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { } Either, ResponseFormat> resultOp = null; try { - resultOp = updateHeatEnvParams(componentId, artifactId, artifactInfo, user, auditingAction, parent, componentType, currArtifact, origMd5, inTransaction); + resultOp = updateHeatEnvParams(componentId, artifactId, artifactInfo, user, auditingAction, parent, componentType, origMd5); return resultOp; } finally { @@ -3812,7 +3980,7 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { } private Either, ResponseFormat> updateHeatEnvParams(String componentId, String artifactId, ArtifactDefinition artifactInfo, User user, AuditingActionEnum auditingAction, Component parent, - ComponentTypeEnum componentType, ArtifactDefinition currArtifact1, String origMd5, boolean inTransaction) { + ComponentTypeEnum componentType, String origMd5) { Either, ResponseFormat> resultOp = null; Either insideEither = null; @@ -3859,22 +4027,9 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { } if (updatedHeatEnvParams != null && !updatedHeatEnvParams.isEmpty()) { - String paramName; // fill reduced heat env parameters List for updating - for (HeatParameterDefinition heatEnvParam : updatedHeatEnvParams) { - paramName = heatEnvParam.getName(); - for (HeatParameterDefinition currHeatParam : currentHeatEnvParams) { - if (paramName.equalsIgnoreCase(currHeatParam.getName())) { - String updatedParamValue = heatEnvParam.getCurrentValue(); - if (updatedParamValue != null && updatedParamValue.equals("")) { // reset - currHeatParam.setCurrentValue(heatEnvParam.getDefaultValue()); - } else if (updatedParamValue != null) { - currHeatParam.setCurrentValue(updatedParamValue); - } - } - } - } - //currArtifact.setHeatParamsUpdateDate(System.currentTimeMillis()); + replaceCurrHeatValueWithUpdatedValue(currentHeatEnvParams, updatedHeatEnvParams); + currArtifact.setHeatParamsUpdateDate(System.currentTimeMillis()); currArtifact.setListHeatParameters(currentHeatEnvParams); Either updateArifactRes = artifactToscaOperation.updateArifactOnResource(currArtifact, parent.getUniqueId(), currArtifact.getUniqueId(), componentType.getNodeType(), componentId); @@ -3899,8 +4054,6 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { } } - // } - insideEither = Either.left(currArtifact); resultOp = Either.left(insideEither); ResponseFormat responseFormat = componentsUtils.getResponseFormat(ActionStatus.OK); @@ -3908,6 +4061,18 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { return resultOp; } + private void replaceCurrHeatValueWithUpdatedValue(List currentHeatEnvParams, List updatedHeatEnvParams) { + for (HeatParameterDefinition heatEnvParam : updatedHeatEnvParams) { + String paramName = heatEnvParam.getName(); + for (HeatParameterDefinition currHeatParam : currentHeatEnvParams) { + if (paramName.equalsIgnoreCase(currHeatParam.getName())) { + String updatedParamValue = heatEnvParam.getCurrentValue(); + currHeatParam.setCurrentValue(updatedParamValue); + } + } + } + } + private Either, ResponseFormat> updateHeatParams(String componentId, String artifactId, ArtifactDefinition artifactEnvInfo, User user, AuditingActionEnum auditingAction, Component parent, ComponentTypeEnum componentType, ArtifactDefinition currHeatArtifact, String origMd5, boolean needToUpdateGroup) { @@ -3929,9 +4094,6 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { } ESArtifactData esArtifactData = artifactfromES.left().value(); - byte[] data = esArtifactData.getDataAsArray(); - - ArtifactDefinition updatedHeatArt = currHeatArtifact; List updatedHeatEnvParams = artifactEnvInfo.getListHeatParameters(); @@ -4149,7 +4311,7 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { * * @param componentType * @param componentUuid - * @param resourceName + * @param resourceInstanceName * @param artifactUUID * @param auditAdditionalParam * @return @@ -4574,15 +4736,9 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { return artifactId; } - public Either createHeatEnvPlaceHolder(ArtifactDefinition artifact, String envType, String parentId, NodeTypeEnum parentType, String parentName, User user, Component component, - Map existingEnvVersions) { - return createHeatEnvPlaceHolder(artifact, envType, parentId, parentType, parentName, user, component, existingEnvVersions, true); - - } - @SuppressWarnings("unchecked") - public Either createHeatEnvPlaceHolder(ArtifactDefinition artifact, String envType, String parentId, NodeTypeEnum parentType, String parentName, User user, Component component, - Map existingEnvVersions, boolean overrideId) { + public Either createHeatEnvPlaceHolder(ArtifactDefinition heatArtifact, String envType, String parentId, NodeTypeEnum parentType, String parentName, User user, Component component, + Map existingEnvVersions) { Map deploymentResourceArtifacts = ConfigurationManager.getConfigurationManager().getConfiguration().getDeploymentResourceInstanceArtifacts(); if (deploymentResourceArtifacts == null) { log.debug("no deployment artifacts are configured for generated artifacts"); @@ -4594,64 +4750,55 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { return Either.right(componentsUtils.getResponseFormat(ActionStatus.GENERAL_ERROR)); } - String envLabel = (artifact.getArtifactLabel() + HEAT_ENV_SUFFIX).toLowerCase(); - String parentIdParam = parentId; - if (!overrideId) { - parentIdParam = null; - } - Either createArtifactPlaceHolder = createArtifactPlaceHolderInfo(parentIdParam, envLabel, placeHolderData, user.getUserId(), ArtifactGroupTypeEnum.DEPLOYMENT, true); + String envLabel = (heatArtifact.getArtifactLabel() + HEAT_ENV_SUFFIX).toLowerCase(); + Either createArtifactPlaceHolder = createArtifactPlaceHolderInfo(parentId, envLabel, placeHolderData, user.getUserId(), ArtifactGroupTypeEnum.DEPLOYMENT, true); if (createArtifactPlaceHolder.isRight()) { return Either.right(createArtifactPlaceHolder.right().value()); } ArtifactDefinition artifactHeatEnv = createArtifactPlaceHolder.left().value(); - if (!overrideId) { - // fix for migration only!!!! create heat env placeholder according to heat id. - artifactHeatEnv.setUniqueId(artifact.getUniqueId() + HEAT_ENV_SUFFIX); - } - - artifactHeatEnv.setGeneratedFromId(artifact.getUniqueId()); + artifactHeatEnv.setGeneratedFromId(heatArtifact.getUniqueId()); artifactHeatEnv.setHeatParamsUpdateDate(System.currentTimeMillis()); artifactHeatEnv.setTimeout(0); - buildHeatEnvFileName(artifact, artifactHeatEnv, placeHolderData); + buildHeatEnvFileName(heatArtifact, artifactHeatEnv, placeHolderData); // rbetzer - keep env artifactVersion - changeComponentInstanceVersion flow handleEnvArtifactVersion(artifactHeatEnv, existingEnvVersions); - // clone heat parameters in case of heat env only not VF heat env - if (envType.equals(HEAT_ENV_NAME)) { - artifactHeatEnv.setHeatParameters(artifact.getHeatParameters()); - } - ArtifactDefinition artifactDefinition; + ArtifactDefinition heatEnvPlaceholder; // Evg : for resource instance artifact will be added later as block with other env artifacts from BL if (parentType != NodeTypeEnum.ResourceInstance) { - Either addHeatEnvArtifact = addHeatEnvArtifact(artifactHeatEnv, artifact, component.getUniqueId(), parentType, parentId); + Either addHeatEnvArtifact = addHeatEnvArtifact(artifactHeatEnv, heatArtifact, component.getUniqueId(), parentType, parentId); if (addHeatEnvArtifact.isRight()) { log.debug("failed to create heat env artifact on resource instance"); return Either.right(componentsUtils.getResponseFormatForResourceInstance(componentsUtils.convertFromStorageResponseForResourceInstance(addHeatEnvArtifact.right().value(), false), "", null)); } - artifactDefinition = createArtifactPlaceHolder.left().value(); + heatEnvPlaceholder = createArtifactPlaceHolder.left().value(); } else { - artifactDefinition = artifactHeatEnv; - artifactToscaOperation.generateUUID(artifactDefinition, artifactDefinition.getArtifactVersion()); - } - - if (artifact.getHeatParameters() != null) { - List heatEnvParameters = new ArrayList(); - for (HeatParameterDefinition parameter : artifact.getListHeatParameters()) { - HeatParameterDefinition heatEnvParameter = new HeatParameterDefinition(parameter); - heatEnvParameter.setDefaultValue(parameter.getCurrentValue()); - heatEnvParameters.add(heatEnvParameter); - } - artifactDefinition.setListHeatParameters(heatEnvParameters); + heatEnvPlaceholder = artifactHeatEnv; + artifactToscaOperation.generateUUID(heatEnvPlaceholder, heatEnvPlaceholder.getArtifactVersion()); + setHeatCurrentValuesOnHeatEnvDefaultValues(heatArtifact, heatEnvPlaceholder); } - // audit - EnumMap artifactAuditingFields = createArtifactAuditingFields(artifactDefinition, "", artifactDefinition.getUniqueId()); + EnumMap artifactAuditingFields = createArtifactAuditingFields(heatEnvPlaceholder, "", heatEnvPlaceholder.getUniqueId()); artifactAuditingFields.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, parentName); ComponentTypeEnum componentType = component.getComponentType(); if (parentType == NodeTypeEnum.ResourceInstance) { componentType = ComponentTypeEnum.RESOURCE_INSTANCE; } componentsUtils.auditComponent(componentsUtils.getResponseFormat(ActionStatus.OK), user, component, "", "", AuditingActionEnum.ARTIFACT_UPLOAD, componentType, artifactAuditingFields); - return Either.left(artifactDefinition); + return Either.left(heatEnvPlaceholder); + } + + private void setHeatCurrentValuesOnHeatEnvDefaultValues(ArtifactDefinition artifact, ArtifactDefinition artifactDefinition) { + if (artifact.getListHeatParameters() == null) { + return; + } + List heatEnvParameters = new ArrayList<>(); + for (HeatParameterDefinition parameter : artifact.getListHeatParameters()) { + HeatParameterDefinition heatEnvParameter = new HeatParameterDefinition(parameter); + heatEnvParameter.setDefaultValue(parameter.getCurrentValue()); + heatEnvParameter.setCurrentValue(null); + heatEnvParameters.add(heatEnvParameter); + } + artifactDefinition.setListHeatParameters(heatEnvParameters); } private void buildHeatEnvFileName(ArtifactDefinition heatArtifact, ArtifactDefinition heatEnvArtifact, Map placeHolderData) { @@ -4707,7 +4854,7 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic { if (actionResult.isRight()) { log.debug("Failed to upload artifact to component with type {} and name {}. Status is {}. ", componentType, component.getName(), actionResult.right().value()); errorWrapper.setInnerElement(actionResult.right().value()); - if (operation.getArtifactOperationEnum() == ArtifactOperationEnum.Create) { + if (ArtifactOperationEnum.isCreateOrLink(operation.getArtifactOperationEnum())) { vfcsNewCreatedArtifacts.addAll(uploadedArtifacts); } break; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/AttributeBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/AttributeBusinessLogic.java index 5b8a10a03e..2e14028338 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/AttributeBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/AttributeBusinessLogic.java @@ -34,7 +34,6 @@ import org.openecomp.sdc.be.model.Resource; import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; import org.openecomp.sdc.be.model.operations.utils.ComponentValidationUtils; - import org.openecomp.sdc.exception.ResponseFormat; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/BaseBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/BaseBusinessLogic.java index 5a4961b24f..14c451a3b0 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/BaseBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/BaseBusinessLogic.java @@ -20,8 +20,12 @@ package org.openecomp.sdc.be.components.impl; -import com.google.gson.JsonElement; -import fj.data.Either; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.function.Function; + import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.ImmutablePair; import org.openecomp.sdc.be.config.BeEcompErrorManager; @@ -36,7 +40,16 @@ import org.openecomp.sdc.be.datatypes.elements.SchemaDefinition; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; import org.openecomp.sdc.be.impl.ComponentsUtils; -import org.openecomp.sdc.be.model.*; +import org.openecomp.sdc.be.model.Component; +import org.openecomp.sdc.be.model.ComponentInstanceInput; +import org.openecomp.sdc.be.model.ComponentInstanceProperty; +import org.openecomp.sdc.be.model.ComponentParametersView; +import org.openecomp.sdc.be.model.DataTypeDefinition; +import org.openecomp.sdc.be.model.GroupProperty; +import org.openecomp.sdc.be.model.IComplexDefaultValue; +import org.openecomp.sdc.be.model.IPropertyInputCommon; +import org.openecomp.sdc.be.model.LifecycleStateEnum; +import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.be.model.cache.ApplicationDataTypeCache; import org.openecomp.sdc.be.model.jsontitan.operations.ArtifactsOperations; import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade; @@ -65,11 +78,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.function.Function; +import com.google.gson.JsonElement; + +import fj.data.Either; public abstract class BaseBusinessLogic { @@ -287,34 +298,6 @@ public abstract class BaseBusinessLogic { return Either.left(componentFound.left().value()); } -// protected Either validateComponentExists(String componentId, ComponentTypeEnum componentType, ComponentParametersView componentParametersView, String userId, -// AuditingActionEnum auditingAction, User user) { -// -// ComponentOperation componentOperation = getComponentOperation(componentType); -// -// if (componentOperation == null) { -// ResponseFormat responseFormat = componentsUtils.getResponseFormat(ActionStatus.GENERAL_ERROR); -// log.debug("addGroup - not supported component type {}", componentType); -// return Either.right(responseFormat); -// } -// Either componentResult = componentOperation.getComponent(componentId, componentParametersView, true); -// -// if (componentResult.isRight()) { -// ActionStatus status = (componentType.equals(ComponentTypeEnum.RESOURCE)) ? ActionStatus.RESOURCE_NOT_FOUND : ActionStatus.SERVICE_NOT_FOUND; -// -// ResponseFormat responseFormat = componentsUtils.getResponseFormat(status, componentId); -// -// log.debug("Service not found, serviceId {}", componentId); -// // ComponentTypeEnum componentForAudit = -// // (componentType.equals(ComponentTypeEnum.RESOURCE)) ? -// // ComponentTypeEnum.RESOURCE : ComponentTypeEnum.SERVICE; -// // handleAuditing(auditingAction, null, componentId, user, null, -// // null, artifactId, responseFormat, componentForAudit, null); -// return Either.right(responseFormat); -// } -// return Either.left(componentResult.left().value()); -// } - public Either validateCanWorkOnComponent(Component component, String userId) { Either canWork = Either.right(componentsUtils.getResponseFormat(ActionStatus.RESTRICTED_OPERATION)); if (component.getLifecycleState() != LifecycleStateEnum.NOT_CERTIFIED_CHECKOUT) { diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/CassandraHealthCheck.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/CassandraHealthCheck.java index 237ec6d5fe..1f5770856b 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/CassandraHealthCheck.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/CassandraHealthCheck.java @@ -1,8 +1,6 @@ package org.openecomp.sdc.be.components.impl; import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.Collections; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/CommonImportManager.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/CommonImportManager.java index f97b4cf3f1..31c665686e 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/CommonImportManager.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/CommonImportManager.java @@ -31,8 +31,6 @@ import java.util.stream.Collectors; import javax.annotation.Resource; -import jersey.repackaged.com.google.common.base.Function; - import org.apache.commons.lang3.tuple.ImmutablePair; import org.openecomp.sdc.be.components.impl.ImportUtils.ResultStatusEnum; import org.openecomp.sdc.be.config.BeEcompErrorManager; @@ -52,6 +50,7 @@ import org.springframework.stereotype.Component; import org.yaml.snakeyaml.Yaml; import fj.data.Either; +import jersey.repackaged.com.google.common.base.Function; @Component("commonImportManager") public class CommonImportManager { diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentBusinessLogic.java index 108e03c274..40e67aa876 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentBusinessLogic.java @@ -31,14 +31,21 @@ import java.util.stream.Collectors; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.ImmutablePair; +import org.openecomp.sdc.be.components.impl.generic.GenericTypeBusinessLogic; import org.openecomp.sdc.be.config.BeEcompErrorManager; import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; +import org.openecomp.sdc.be.dao.utils.MapUtil; import org.openecomp.sdc.be.datamodel.api.HighestFilterEnum; import org.openecomp.sdc.be.datatypes.components.ServiceMetadataDataDefinition; import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition; -import org.openecomp.sdc.be.datatypes.enums.*; +import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; +import org.openecomp.sdc.be.datatypes.enums.FilterKeyEnum; +import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum; +import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; +import org.openecomp.sdc.be.datatypes.enums.OriginTypeEnum; +import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition; import org.openecomp.sdc.be.model.ArtifactDefinition; import org.openecomp.sdc.be.model.CapReqDef; @@ -82,6 +89,12 @@ public abstract class ComponentBusinessLogic extends BaseBusinessLogic { @Autowired protected ComponentCache componentCache; + @Autowired + private GenericTypeBusinessLogic genericTypeBusinessLogic; + + public void setGenericTypeBusinessLogic(GenericTypeBusinessLogic genericTypeBusinessLogic) { + this.genericTypeBusinessLogic = genericTypeBusinessLogic; + } private static Logger log = LoggerFactory.getLogger(ComponentBusinessLogic.class.getName()); @@ -116,7 +129,6 @@ public abstract class ComponentBusinessLogic extends BaseBusinessLogic { componentsUtils.auditComponentAdmin(responseFormat, user, component, "", "", auditAction, component.getComponentType()); return Either.right(responseFormat); } - user = userResult.left().value(); return userResult; } @@ -502,17 +514,6 @@ public abstract class ComponentBusinessLogic extends BaseBusinessLogic { return Either.left(true); } - /*** - * Fetches Component From the DB - * - * @param componentId - * @param componentTypeEnum - * @return - */ - public Either getComponent(String componentId, ComponentTypeEnum componentTypeEnum) { - return toscaOperationFacade.getToscaElement(componentId); - } - public Either getRequirementsAndCapabilities(String componentId, ComponentTypeEnum componentTypeEnum, String userId) { Either resp = validateUserExists(userId, "create Component Instance", false); @@ -545,7 +546,7 @@ public abstract class ComponentBusinessLogic extends BaseBusinessLogic { List componentsUidToFetch = new ArrayList<>(); componentsUidToFetch.addAll(componentUids); - if (componentsUidToFetch.size() > 0) { + if (!componentsUidToFetch.isEmpty()) { log.debug("Number of Components to fetch from graph is {}", componentsUidToFetch.size()); Boolean isHighest = isHighest(highestFilter); Either, StorageOperationStatus> nonCheckoutCompResponse = toscaOperationFacade.getLatestVersionNotAbstractComponents(isAbstractAbstract, isHighest, componentTypeEnum, internalComponentType, componentsUidToFetch); @@ -617,7 +618,7 @@ public abstract class ComponentBusinessLogic extends BaseBusinessLogic { public void setToscaArtifactsPlaceHolders(Component component, User user) { Map artifactMap = component.getToscaArtifacts(); if (artifactMap == null) { - artifactMap = new HashMap(); + artifactMap = new HashMap<>(); } String componentUniqueId = component.getUniqueId(); String componentSystemName = component.getSystemName(); @@ -628,7 +629,7 @@ public abstract class ComponentBusinessLogic extends BaseBusinessLogic { for (Entry artifactInfoMap : toscaArtifacts.entrySet()) { Map artifactInfo = (Map) artifactInfoMap.getValue(); ArtifactDefinition artifactDefinition = artifactsBusinessLogic.createArtifactPlaceHolderInfo(componentUniqueId, artifactInfoMap.getKey(), artifactInfo, user, ArtifactGroupTypeEnum.TOSCA); - artifactDefinition.setArtifactName(componentType + "-" + componentSystemName + artifactInfo.get("artifactName")); + artifactDefinition.setArtifactName(ValidationUtils.normalizeFileName(componentType + "-" + componentSystemName + artifactInfo.get("artifactName"))); artifactMap.put(artifactDefinition.getArtifactLabel(), artifactDefinition); } } @@ -695,7 +696,7 @@ public abstract class ComponentBusinessLogic extends BaseBusinessLogic { List components = latestVersionEither.left().value(); - Component component = components.stream().filter(c -> c.isHighestVersion()).findFirst().orElse(null); + Component component = components.stream().filter(Component::isHighestVersion).findFirst().orElse(null); if(component == null){ component = components.stream().filter(c -> c.getLifecycleState() == LifecycleStateEnum.CERTIFIED).findFirst().orElse(null); } @@ -785,7 +786,6 @@ public abstract class ComponentBusinessLogic extends BaseBusinessLogic { protected Either, ResponseFormat> deleteMarkedComponents(ComponentTypeEnum componentType) { -// List deletedComponents = new ArrayList(); log.trace("start deleteMarkedComponents"); Either, StorageOperationStatus> deleteMarkedElements = toscaOperationFacade.deleteMarkedElements(componentType); @@ -794,30 +794,12 @@ public abstract class ComponentBusinessLogic extends BaseBusinessLogic { ResponseFormat responseFormat = componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponse(deleteMarkedElements.right().value(), componentType)); return Either.right(responseFormat); } -// ComponentOperation componentOperation = getComponentOperation(componentType); -// Either, StorageOperationStatus> resourcesToDelete = componentOperation.getAllComponentsMarkedForDeletion(); -// if (resourcesToDelete.isRight()) { -// ResponseFormat responseFormat = componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponse(resourcesToDelete.right().value(), componentType)); -// return Either.right(responseFormat); -// } -// -// for (String resourceToDelete : resourcesToDelete.left().value()) { -// -// Either deleteMarkedResource = deleteMarkedComponent(resourceToDelete, componentType); -// if (deleteMarkedResource.isLeft()) { -// deletedComponents.add(deleteMarkedResource.left().value()); -// } -// } -// if(deletedComponents.size() == 0) { -// log.debug("Component list to delete is empty. do commit"); -// titanGenericDao.commit(); -// } log.trace("end deleteMarkedComponents"); return Either.left(deleteMarkedElements.left().value()); } - public Either, StorageOperationStatus> getComponentArtifactsForDelete(String parentId, NodeTypeEnum parentType, boolean inTransacton) { - List artifacts = new ArrayList(); + public Either, StorageOperationStatus> getComponentArtifactsForDelete(String parentId, NodeTypeEnum parentType) { + List artifacts = new ArrayList<>(); Either, StorageOperationStatus> artifactsResponse = artifactToscaOperation.getArtifacts(parentId); if (artifactsResponse.isRight()) { if (!artifactsResponse.right().value().equals(StorageOperationStatus.NOT_FOUND)) { @@ -827,16 +809,6 @@ public abstract class ComponentBusinessLogic extends BaseBusinessLogic { } else { artifacts.addAll(artifactsResponse.left().value().values()); } - -// if (NodeTypeEnum.Resource.equals(parentType)) { -// Either, StorageOperationStatus> interfacesArtifactsForResource = getAdditionalArtifacts(parentId, false, true); -// if (artifactsResponse.isRight() && !interfacesArtifactsForResource.right().value().equals(StorageOperationStatus.NOT_FOUND)) { -// log.debug("failed to retrieve interface artifacts for {} {}", parentType, parentId); -// return Either.right(interfacesArtifactsForResource.right().value()); -// } else if (artifactsResponse.isLeft()) { -// artifacts.addAll(interfacesArtifactsForResource.left().value()); -// } -// } return Either.left(artifacts); } @@ -873,50 +845,39 @@ public abstract class ComponentBusinessLogic extends BaseBusinessLogic { return Either.left(result); } - protected void generateInputsFromGenericTypeProperties(T component, Resource genericType) { - - List genericTypeProps = genericType.getProperties(); - if(null != genericTypeProps) { - String genericUniqueId = genericType.getUniqueId(); - List inputs = convertGenericTypePropertiesToInputsDefintion(genericTypeProps, genericUniqueId); - if(null != component.getInputs()) - inputs.addAll(component.getInputs()); - component.setInputs(inputs); - } - } - - private List convertGenericTypePropertiesToInputsDefintion(List genericTypeProps, String genericUniqueId) { - return genericTypeProps.stream() - .map(p -> setInputDefinitionFromProp(p, genericUniqueId)) - .collect(Collectors.toList()); + protected void generateAndAddInputsFromGenericTypeProperties(T component, Resource genericType) { + List genericAndComponentInputs = new ArrayList<>(); + List genericInputs = genericTypeBusinessLogic.generateInputsFromGenericTypeProperties(genericType); + genericAndComponentInputs.addAll(genericInputs); + if (null != component.getInputs()){ + List nonGenericInputsFromComponent = getAllNonGenericInputsFromComponent(genericInputs, component.getInputs()); + genericAndComponentInputs.addAll(nonGenericInputsFromComponent); + } + component.setInputs(genericAndComponentInputs); } - - private InputDefinition setInputDefinitionFromProp(PropertyDefinition prop, String genericUniqueId){ - InputDefinition input = new InputDefinition(prop); - input.setOwnerId(genericUniqueId); - return input; + + private List getAllNonGenericInputsFromComponent(List genericInputs, List componentInputs) { + if (genericInputs == null) { + return componentInputs; + } + + Map inputByNameMap = MapUtil.toMap(genericInputs, InputDefinition::getName); + List componentNonGenericInputs = new ArrayList<>(); + componentInputs.stream().forEach(input -> { + if (!inputByNameMap.containsKey(input.getName())) { + componentNonGenericInputs.add(input); + } + }); + return componentNonGenericInputs; } protected Either fetchAndSetDerivedFromGenericType(T component){ - String genericTypeToscaName = null; - if(component.getComponentType() == ComponentTypeEnum.RESOURCE && ((Resource)component).getResourceType() == ResourceTypeEnum.CVFC && CollectionUtils.isNotEmpty(((Resource)component).getDerivedFrom())){ - genericTypeToscaName = ((Resource)component).getDerivedFrom().get(0); - } else { - genericTypeToscaName = component.fetchGenericTypeToscaNameFromConfig(); - } - log.debug("Fetching generic tosca name {}", genericTypeToscaName); - if(null == genericTypeToscaName) { - log.debug("Failed to fetch certified node type by tosca resource name {}", genericTypeToscaName); - return Either.right(componentsUtils.getResponseFormat(ActionStatus.GENERAL_ERROR)); + Either genericTypeEither = this.genericTypeBusinessLogic.fetchDerivedFromGenericType(component); + if(genericTypeEither.isRight()){ + log.debug("Failed to fetch latest generic type for component {} of type", component.getName(), component.assetType()); + return Either.right(componentsUtils.getResponseFormat(ActionStatus.GENERIC_TYPE_NOT_FOUND, component.assetType())); } - - Either findLatestGeneric = toscaOperationFacade.getLatestCertifiedNodeTypeByToscaResourceName(genericTypeToscaName); - if(findLatestGeneric.isRight()){ - log.debug("Failed to fetch certified node type by tosca resource name {}", genericTypeToscaName); - return Either.right(componentsUtils.getResponseFormat(ActionStatus.GENERIC_TYPE_NOT_FOUND, component.assetType(), genericTypeToscaName)); - } - - Resource genericTypeResource = findLatestGeneric.left().value(); + Resource genericTypeResource = genericTypeEither.left().value(); component.setDerivedFromGenericInfo(genericTypeResource); return Either.left(genericTypeResource); } @@ -1119,7 +1080,7 @@ public abstract class ComponentBusinessLogic extends BaseBusinessLogic { return shouldUpgradeNodeType(componentToCheckOut, latestGeneric); } List genericTypeProps = latestGeneric.getProperties(); - List genericTypeInputs = null == genericTypeProps? null : convertGenericTypePropertiesToInputsDefintion(genericTypeProps, latestGeneric.getUniqueId()); + List genericTypeInputs = null == genericTypeProps? null : genericTypeBusinessLogic.convertGenericTypePropertiesToInputsDefintion(genericTypeProps, latestGeneric.getUniqueId()); List currentList = new ArrayList<>(); // nullify existing ownerId from existing list and merge into updated list if (null != componentToCheckOut.getInputs()) { diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java index 66d8668fea..b86b28a6c5 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java @@ -21,6 +21,8 @@ package org.openecomp.sdc.be.components.impl; import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.List; @@ -32,23 +34,28 @@ import java.util.UUID; import java.util.stream.Collectors; import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.collections.MapUtils; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.tuple.ImmutablePair; +import org.openecomp.sdc.be.components.merge.instance.ComponentInstanceMergeDataBusinessLogic; +import org.openecomp.sdc.be.components.merge.instance.DataForMergeHolder; import org.openecomp.sdc.be.config.BeEcompErrorManager; import org.openecomp.sdc.be.config.BeEcompErrorManager.ErrorSeverity; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; import org.openecomp.sdc.be.dao.neo4j.GraphPropertiesDictionary; import org.openecomp.sdc.be.dao.titan.TitanOperationStatus; -import org.openecomp.sdc.be.datatypes.components.ResourceMetadataDataDefinition; +import org.openecomp.sdc.be.datatypes.elements.CapabilityDataDefinition; import org.openecomp.sdc.be.datatypes.elements.GroupDataDefinition; import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition; +import org.openecomp.sdc.be.datatypes.elements.RequirementDataDefinition; import org.openecomp.sdc.be.datatypes.elements.SchemaDefinition; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; import org.openecomp.sdc.be.datatypes.enums.OriginTypeEnum; import org.openecomp.sdc.be.info.CreateAndAssotiateInfo; import org.openecomp.sdc.be.model.ArtifactDefinition; +import org.openecomp.sdc.be.model.CapabilityDefinition; import org.openecomp.sdc.be.model.Component; import org.openecomp.sdc.be.model.ComponentInstance; import org.openecomp.sdc.be.model.ComponentInstanceInput; @@ -59,7 +66,10 @@ import org.openecomp.sdc.be.model.GroupDefinition; import org.openecomp.sdc.be.model.InputDefinition; import org.openecomp.sdc.be.model.LifecycleStateEnum; import org.openecomp.sdc.be.model.PropertyDefinition.PropertyNames; +import org.openecomp.sdc.be.model.RelationshipInfo; import org.openecomp.sdc.be.model.RequirementCapabilityRelDef; +import org.openecomp.sdc.be.model.RequirementDefinition; +import org.openecomp.sdc.be.model.Resource; import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.be.model.cache.ApplicationDataTypeCache; import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade; @@ -95,7 +105,10 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { private ArtifactsBusinessLogic artifactBusinessLogic; @Autowired private ApplicationDataTypeCache dataTypeCache; - + + @Autowired + private ComponentInstanceMergeDataBusinessLogic compInstMergeDataBL; + public static final String VF_MODULE = "org.openecomp.groups.VfModule"; public ComponentInstanceBusinessLogic() { @@ -112,8 +125,8 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { User user = null; org.openecomp.sdc.be.model.Component containerComponent = null; ComponentTypeEnum containerComponentType; - - try{ + + try { Either resp = validateUserExists(userId, "create Component Instance", inTransaction); if (resp.isRight()) { return Either.right(resp.right().value()); @@ -125,37 +138,56 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { if (validateValidJson.isRight()) { return Either.right(validateValidJson.right().value()); } - + Either validateComponentType = validateComponentType(containerComponentParam); if (validateComponentType.isRight()) { return Either.right(validateComponentType.right().value()); } else { containerComponentType = validateComponentType.left().value(); } - + Either validateComponentExists = validateComponentExists(containerComponentId, containerComponentType, null); if (validateComponentExists.isRight()) { return Either.right(validateComponentExists.right().value()); } else { containerComponent = validateComponentExists.left().value(); } - + if (ModelConverter.isAtomicComponent(containerComponent)) { log.debug("Cannot attach resource instances to container resource of type {}", containerComponent.assetType()); return Either.right(componentsUtils.getResponseFormat(ActionStatus.RESOURCE_CANNOT_CONTAIN_RESOURCE_INSTANCES, containerComponent.assetType())); } - + Either validateCanWorkOnComponent = validateCanWorkOnComponent(containerComponent, userId); if (validateCanWorkOnComponent.isRight()) { return Either.right(validateCanWorkOnComponent.right().value()); } - + if (resourceInstance != null && containerComponentType != null) { - Either getOriginComponentRes = getAndValidateOriginComponentOfComponentInstance(containerComponentType, resourceInstance); - if (getOriginComponentRes.isRight()) { - return Either.right(getOriginComponentRes.right().value()); + OriginTypeEnum originType = resourceInstance.getOriginType(); + if (originType == OriginTypeEnum.ServiceProxy) { + Either serviceProxyOrigin = toscaOperationFacade.getLatestByName("serviceProxy"); + if (serviceProxyOrigin.isRight()) { + log.debug("Failed to fetch normative service proxy resource by tosca name, error {}", serviceProxyOrigin.right().value()); + return Either.right(componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponse(serviceProxyOrigin.right().value()))); + } + origComponent = serviceProxyOrigin.left().value(); + + StorageOperationStatus fillProxyRes = fillProxyInstanceData(resourceInstance, origComponent); + if (fillProxyRes != StorageOperationStatus.OK) { + log.debug("Failed to fill service proxy resource data with data from service, error {}", fillProxyRes); + return Either.right(componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponse(fillProxyRes))); + + } + } else { - origComponent = getOriginComponentRes.left().value(); + Either getOriginComponentRes = getAndValidateOriginComponentOfComponentInstance(containerComponentType, resourceInstance); + + if (getOriginComponentRes.isRight()) { + return Either.right(getOriginComponentRes.right().value()); + } else { + origComponent = getOriginComponentRes.left().value(); + } } } if (needLock) { @@ -174,6 +206,43 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { } } + private StorageOperationStatus fillProxyInstanceData(ComponentInstance resourceInstance, Component proxyTemplate) { + resourceInstance.setIsProxy(true); + ComponentParametersView filter = new ComponentParametersView(true); + filter.setIgnoreCapabilities(false); + filter.setIgnoreCapabiltyProperties(false); + filter.setIgnoreComponentInstances(false); + filter.setIgnoreRequirements(false); + Either serviceRes = toscaOperationFacade.getToscaElement(resourceInstance.getComponentUid(), filter); + if (serviceRes.isRight()) { + return serviceRes.right().value(); + } + Component service = serviceRes.left().value(); + Map> capabilities = service.getCapabilities(); + resourceInstance.setCapabilities(capabilities); + Map> req = service.getRequirements(); + resourceInstance.setRequirements(req); + + String name = service.getNormalizedName() + ToscaOperationFacade.PROXY_SUFFIX; + String toscaResourceName = ((Resource) proxyTemplate).getToscaResourceName(); + int lastIndexOf = toscaResourceName.lastIndexOf('.'); + if (lastIndexOf != -1) { + String proxyToscaName = toscaResourceName.substring(0, lastIndexOf + 1) + name; + resourceInstance.setToscaComponentName(proxyToscaName); + } + resourceInstance.setName(name); + resourceInstance.setIsProxy(true); + resourceInstance.setSourceModelInvariant(service.getInvariantUUID()); + resourceInstance.setSourceModelName(service.getName()); + resourceInstance.setSourceModelUuid(service.getUUID()); + resourceInstance.setSourceModelUid(service.getUniqueId()); + resourceInstance.setComponentUid(proxyTemplate.getUniqueId()); + resourceInstance.setDescription("A Proxy for Service " + service.getName()); + resourceInstance.setComponentVersion(service.getVersion()); + + return StorageOperationStatus.OK; + } + public Either createAndAssociateRIToRI(String containerComponentParam, String containerComponentId, String userId, CreateAndAssotiateInfo createAndAssotiateInfo) { Either resultOp = null; @@ -216,7 +285,7 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { try { log.debug("Try to create entry on graph"); - Either eitherResourceName = getOriginComponentNameFromComponentInstance(resourceInstance, true); + Either eitherResourceName = getOriginComponentFromComponentInstance(resourceInstance, true); if (eitherResourceName.isRight()) { resultOp = Either.right(eitherResourceName.right().value()); @@ -260,7 +329,7 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { } } - private Either getOriginComponentNameFromComponentInstance(ComponentInstance componentInstance, boolean inTransaction) { + private Either getOriginComponentFromComponentInstance(ComponentInstance componentInstance, boolean inTransaction) { Either eitherResponse; Either eitherComponent = toscaOperationFacade.getToscaFullElement(componentInstance.getComponentUid()); if (eitherComponent.isRight()) { @@ -286,7 +355,7 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { log.debug("Entity on graph is created."); Component updatedComponent = result.left().value().getLeft(); Map existingEnvVersions = new HashMap<>(); - //TODO existingEnvVersions ?? + // TODO existingEnvVersions ?? Either addComponentInstanceArtifacts = addComponentInstanceArtifacts(updatedComponent, componentInstance, originComponent, user, existingEnvVersions); if (addComponentInstanceArtifacts.isRight()) { log.debug("Failed to create component instance {}", componentInstance.getName()); @@ -304,19 +373,17 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { return resultOp; } - /** - * addResourceInstanceArtifacts - add artifacts (HEAT_ENV) to resource instance The instance artifacts are generated from the resource's artifacts - * - * @param componentInstance - * @param userId - * @param existingEnvVersions - * TODO - * @param containerComponentId - * - * @return - */ - protected Either addComponentInstanceArtifacts(org.openecomp.sdc.be.model.Component containerComponent, ComponentInstance componentInstance, org.openecomp.sdc.be.model.Component originComponent, User user, - Map existingEnvVersions) { +/** + * addResourceInstanceArtifacts - add artifacts (HEAT_ENV) to resource instance The instance artifacts are generated from the resource's artifacts + * @param containerComponent + * @param componentInstance + * @param originComponent + * @param user + * @param existingEnvVersions + * @return + */ + protected Either addComponentInstanceArtifacts(org.openecomp.sdc.be.model.Component containerComponent, ComponentInstance componentInstance, org.openecomp.sdc.be.model.Component originComponent, User user, Map existingEnvVersions) { + log.debug("add artifacts to resource instance"); List filteredGroups = null; ActionStatus status = setResourceArtifactsOnResourceInstance(componentInstance); @@ -324,80 +391,72 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { ResponseFormat resultOp = componentsUtils.getResponseFormatForResourceInstance(status, "", null); return Either.right(resultOp); } - + StorageOperationStatus artStatus; // generate heat_env if necessary Map componentDeploymentArtifacts = componentInstance.getDeploymentArtifacts(); - if (componentDeploymentArtifacts == null) { - return Either.left(ActionStatus.OK); - } - Map finalDeploymentArtifacts = new HashMap(); - - Map> groupInstancesArtifacts = new HashMap<>(); - - for (ArtifactDefinition artifact : componentDeploymentArtifacts.values()) { - String type = artifact.getArtifactType(); + if (MapUtils.isNotEmpty(componentDeploymentArtifacts)) { - if ( !type.equalsIgnoreCase(ArtifactTypeEnum.HEAT_ENV.getType()) ){ - finalDeploymentArtifacts.put(artifact.getArtifactLabel(), artifact); - } - - if (!(type.equalsIgnoreCase(ArtifactTypeEnum.HEAT.getType()) || type.equalsIgnoreCase(ArtifactTypeEnum.HEAT_NET.getType()) || type.equalsIgnoreCase(ArtifactTypeEnum.HEAT_VOL.getType()))) { - continue; - } + Map finalDeploymentArtifacts = new HashMap(); + Map> groupInstancesArtifacts = new HashMap<>(); - if (artifact.checkEsIdExist()) { - Either createHeatEnvPlaceHolder = artifactBusinessLogic.createHeatEnvPlaceHolder(artifact, ArtifactsBusinessLogic.HEAT_ENV_NAME, componentInstance.getUniqueId(), NodeTypeEnum.ResourceInstance, - componentInstance.getName(), user, containerComponent, existingEnvVersions); - if (createHeatEnvPlaceHolder.isRight()) { - return Either.right(createHeatEnvPlaceHolder.right().value()); + for (ArtifactDefinition artifact : componentDeploymentArtifacts.values()) { + String type = artifact.getArtifactType(); + if (!type.equalsIgnoreCase(ArtifactTypeEnum.HEAT_ENV.getType())) { + finalDeploymentArtifacts.put(artifact.getArtifactLabel(), artifact); } - ArtifactDefinition artifactDefinition = createHeatEnvPlaceHolder.left().value(); - - //put env - finalDeploymentArtifacts.put(artifactDefinition.getArtifactLabel(), artifactDefinition); - - if(CollectionUtils.isNotEmpty(originComponent.getGroups())){ - filteredGroups = originComponent.getGroups().stream().filter(g -> g.getType().equals(VF_MODULE)).collect(Collectors.toList()); + if (!(type.equalsIgnoreCase(ArtifactTypeEnum.HEAT.getType()) || type.equalsIgnoreCase(ArtifactTypeEnum.HEAT_NET.getType()) || type.equalsIgnoreCase(ArtifactTypeEnum.HEAT_VOL.getType()))) { + continue; } - if (CollectionUtils.isNotEmpty(filteredGroups)) { - for (GroupDefinition groupInstance : filteredGroups) { - Optional op = groupInstance.getArtifacts().stream().filter(p -> p.equals(artifactDefinition.getGeneratedFromId())).findAny(); - if (op.isPresent()) { - List artifactsUid; - if (groupInstancesArtifacts.containsKey(groupInstance.getUniqueId())) { - artifactsUid = groupInstancesArtifacts.get(groupInstance.getUniqueId()); - } else { - artifactsUid = new ArrayList<>(); + if (artifact.checkEsIdExist()) { + Either createHeatEnvPlaceHolder = artifactBusinessLogic.createHeatEnvPlaceHolder(artifact, ArtifactsBusinessLogic.HEAT_ENV_NAME, componentInstance.getUniqueId(), NodeTypeEnum.ResourceInstance, + componentInstance.getName(), user, containerComponent, existingEnvVersions); + if (createHeatEnvPlaceHolder.isRight()) { + return Either.right(createHeatEnvPlaceHolder.right().value()); + } + ArtifactDefinition artifactDefinition = createHeatEnvPlaceHolder.left().value(); + // put env + finalDeploymentArtifacts.put(artifactDefinition.getArtifactLabel(), artifactDefinition); + + if (CollectionUtils.isNotEmpty(originComponent.getGroups())) { + filteredGroups = originComponent.getGroups().stream().filter(g -> g.getType().equals(VF_MODULE)).collect(Collectors.toList()); + } + if (CollectionUtils.isNotEmpty(filteredGroups)) { + for (GroupDefinition groupInstance : filteredGroups) { + Optional op = groupInstance.getArtifacts().stream().filter(p -> p.equals(artifactDefinition.getGeneratedFromId())).findAny(); + if (op.isPresent()) { + List artifactsUid; + if (groupInstancesArtifacts.containsKey(groupInstance.getUniqueId())) { + artifactsUid = groupInstancesArtifacts.get(groupInstance.getUniqueId()); + } else { + artifactsUid = new ArrayList<>(); + } + artifactsUid.add(artifactDefinition); + groupInstancesArtifacts.put(groupInstance.getUniqueId(), artifactsUid); + break; } - artifactsUid.add(artifactDefinition); - groupInstancesArtifacts.put(groupInstance.getUniqueId(), artifactsUid); - break; } } - } } + artStatus = toscaOperationFacade.addDeploymentArtifactsToInstance(containerComponent.getUniqueId(), componentInstance, finalDeploymentArtifacts); + if (artStatus != StorageOperationStatus.OK) { + log.debug("Failed to add instance deployment artifacts for instance {} in conatiner {} error {}", componentInstance.getUniqueId(), containerComponent.getUniqueId(), artStatus); + return Either.right(componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponseForResourceInstance(artStatus, false))); + + } + StorageOperationStatus result = toscaOperationFacade.addGroupInstancesToComponentInstance(containerComponent, componentInstance, filteredGroups, groupInstancesArtifacts); + if (result != StorageOperationStatus.OK) { + log.debug("failed to update group instance for component instance {}", componentInstance.getUniqueId()); + return Either.right(componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponse(result))); + } + componentInstance.setDeploymentArtifacts(finalDeploymentArtifacts); } - StorageOperationStatus artStatus = toscaOperationFacade.addDeploymentArtifactsToInstance(containerComponent.getUniqueId(), componentInstance, finalDeploymentArtifacts); - if ( artStatus != StorageOperationStatus.OK){ - log.debug("Failed to add instance deployment artifacts for instance {} in conatiner {} error {}", componentInstance.getUniqueId(), containerComponent.getUniqueId(), artStatus); - return Either.right(componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponseForResourceInstance(artStatus, false))); - - } - StorageOperationStatus result = toscaOperationFacade - .addGroupInstancesToComponentInstance(containerComponent, componentInstance, filteredGroups, groupInstancesArtifacts); - if (result != StorageOperationStatus.OK) { - log.debug("failed to update group instance for component instance {}", componentInstance.getUniqueId()); - return Either.right(componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponse(result))); - } - componentInstance.setDeploymentArtifacts(finalDeploymentArtifacts); - - + artStatus = toscaOperationFacade.addInformationalArtifactsToInstance(containerComponent.getUniqueId(), componentInstance, originComponent.getArtifacts()); - if ( artStatus != StorageOperationStatus.OK){ + if (artStatus != StorageOperationStatus.OK) { log.debug("Failed to add informational artifacts to the instance {} belonging to the conatiner {}. Status is {}", componentInstance.getUniqueId(), containerComponent.getUniqueId(), artStatus); return Either.right(componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponseForResourceInstance(artStatus, false))); - + } componentInstance.setArtifacts(originComponent.getArtifacts()); return Either.left(ActionStatus.OK); @@ -483,7 +542,7 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { } try { - Either eitherResourceName = getOriginComponentNameFromComponentInstance(componentInstance, inTransaction); + Either eitherResourceName = getOriginComponentFromComponentInstance(componentInstance, inTransaction); if (eitherResourceName.isRight()) { resultOp = Either.right(eitherResourceName.right().value()); @@ -557,42 +616,40 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { List updatedList = new ArrayList<>(); List instancesFromContainerComponent = containerComponent.getComponentInstances(); List listForUpdate = new ArrayList<>(); - if(instancesFromContainerComponent == null || instancesFromContainerComponent.isEmpty()) + if (instancesFromContainerComponent == null || instancesFromContainerComponent.isEmpty()) containerComponent.setComponentInstances(componentInstanceList); - else{ + else { Iterator iterator = instancesFromContainerComponent.iterator(); - while(iterator.hasNext()){ + while (iterator.hasNext()) { ComponentInstance origInst = iterator.next(); Optional op = componentInstanceList.stream().filter(ci -> ci.getUniqueId().equals(origInst.getUniqueId())).findAny(); - if(op.isPresent()){ - ComponentInstance updatedCi = op.get(); + if (op.isPresent()) { + ComponentInstance updatedCi = op.get(); updatedCi = buildComponentInstance(updatedCi, origInst); - + Boolean isUniqueName = validateInstanceNameUniquenessUponUpdate(containerComponent, origInst, updatedCi.getName()); - if(!isUniqueName){ - CommonUtility.addRecordToLog(log, LogLevelEnum.DEBUG, "Failed to update the name of the component instance {} to {}. A component instance with the same name already exists. ", - origInst.getName(), updatedCi.getName()); + if (!isUniqueName) { + CommonUtility.addRecordToLog(log, LogLevelEnum.DEBUG, "Failed to update the name of the component instance {} to {}. A component instance with the same name already exists. ", origInst.getName(), updatedCi.getName()); resultOp = Either.right(componentsUtils.getResponseFormat(ActionStatus.COMPONENT_NAME_ALREADY_EXIST, containerComponentType.getValue(), origInst.getName())); return resultOp; } - + listForUpdate.add(updatedCi); - } - else + } else listForUpdate.add(origInst); } containerComponent.setComponentInstances(listForUpdate); - - if(resultOp == null){ - Either updateStatus = toscaOperationFacade.updateComponentInstanceMetadataOfTopologyTemplate(containerComponent); - if(updateStatus.isRight()){ + + if (resultOp == null) { + Either updateStatus = toscaOperationFacade.updateComponentInstanceMetadataOfTopologyTemplate(containerComponent, componentFilter); + if (updateStatus.isRight()) { CommonUtility.addRecordToLog(log, LogLevelEnum.DEBUG, "Failed to update metadata belonging to container component {}. Status is {}. ", containerComponent.getName(), updateStatus.right().value()); resultOp = Either.right(componentsUtils.getResponseFormatForResourceInstance(componentsUtils.convertFromStorageResponseForResourceInstance(updateStatus.right().value(), true), "", null)); return resultOp; } - for(ComponentInstance updatedInstance : updateStatus.left().value().getComponentInstances()){ + for (ComponentInstance updatedInstance : updateStatus.left().value().getComponentInstances()) { Optional op = componentInstanceList.stream().filter(ci -> ci.getName().equals(updatedInstance.getName())).findAny(); - if(op.isPresent()){ + if (op.isPresent()) { updatedList.add(updatedInstance); } } @@ -640,8 +697,7 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { if (resultOp == null) { oldComponentInstance = componentInstanceOptional.get(); String newInstanceName = componentInstance.getName(); - if ( oldComponentInstance!=null && oldComponentInstance.getName() != null - && !oldComponentInstance.getName().equals( newInstanceName ) ) + if (oldComponentInstance != null && oldComponentInstance.getName() != null && !oldComponentInstance.getName().equals(newInstanceName)) isNameChanged = true; Boolean isUniqueName = validateInstanceNameUniquenessUponUpdate(containerComponent, oldComponentInstance, newInstanceName); if (!isUniqueName) { @@ -655,14 +711,14 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { CommonUtility.addRecordToLog(log, LogLevelEnum.DEBUG, "Failed to update metadata of component instance {} belonging to container component {}. Status is {}. ", componentInstance.getName(), containerComponent.getName(), updateRes.right().value()); resultOp = Either.right(componentsUtils.getResponseFormatForResourceInstance(componentsUtils.convertFromStorageResponseForResourceInstance(updateRes.right().value(), true), "", null)); - }else{ - //region - Update instance Groups - if ( isNameChanged ){ - Either result = toscaOperationFacade.cleanAndAddGroupInstancesToComponentInstance( containerComponent ,oldComponentInstance ,componentInstanceId ); - if ( result.isRight() ) - CommonUtility.addRecordToLog(log, LogLevelEnum.DEBUG, "Failed to rename group instances for container {}. error {} ", componentInstanceId ,result.right().value() ); + } else { + // region - Update instance Groups + if (isNameChanged) { + Either result = toscaOperationFacade.cleanAndAddGroupInstancesToComponentInstance(containerComponent, oldComponentInstance, componentInstanceId); + if (result.isRight()) + CommonUtility.addRecordToLog(log, LogLevelEnum.DEBUG, "Failed to rename group instances for container {}. error {} ", componentInstanceId, result.right().value()); } - //endregion + // endregion } } if (resultOp == null) { @@ -672,24 +728,28 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { if (!updatedInstanceOptional.isPresent()) { log.debug("Failed to update metadata of component instance {} of container component {}", componentInstance.getName(), containerComponent.getName()); resultOp = Either.right(componentsUtils.getResponseFormat(ActionStatus.COMPONENT_INSTANCE_NOT_FOUND_ON_CONTAINER, componentInstance.getName())); - }else{ + } else { resultOp = Either.left(updatedInstanceOptional.get()); } - + } if (resultOp == null) { resultOp = Either.left(componentInstanceOptional.get()); } return resultOp; } + /** - * @param oldPrefix- The normalized old vf name - * @param newNormailzedPrefix- The normalized new vf name - * @param qualifiedGroupInstanceName- old Group Instance Name + * @param oldPrefix- + * The normalized old vf name + * @param newNormailzedPrefix- + * The normalized new vf name + * @param qualifiedGroupInstanceName- + * old Group Instance Name **/ - //modify group names - private String getNewGroupName( String oldPrefix ,String newNormailzedPrefix , String qualifiedGroupInstanceName){ - if (qualifiedGroupInstanceName == null){ + // modify group names + private String getNewGroupName(String oldPrefix, String newNormailzedPrefix, String qualifiedGroupInstanceName) { + if (qualifiedGroupInstanceName == null) { log.info("CANNOT change group name "); return null; } @@ -702,9 +762,8 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { oldComponentInstance.setName(newComponentInstance.getName()); oldComponentInstance.setModificationTime(System.currentTimeMillis()); oldComponentInstance.setCustomizationUUID(UUID.randomUUID().toString()); - if ( oldComponentInstance.getGroupInstances() != null ) - oldComponentInstance.getGroupInstances().forEach( group -> - group.setName( getNewGroupName( oldComponentInstance.getNormalizedName() , ValidationUtils.normalizeComponentInstanceName( newComponentInstance.getName() ) , group.getName() ) ) ); + if (oldComponentInstance.getGroupInstances() != null) + oldComponentInstance.getGroupInstances().forEach(group -> group.setName(getNewGroupName(oldComponentInstance.getNormalizedName(), ValidationUtils.normalizeComponentInstanceName(newComponentInstance.getName()), group.getName()))); return oldComponentInstance; } @@ -772,26 +831,25 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { } if (resultOp.isLeft() && CollectionUtils.isNotEmpty(containerComponent.getGroups())) { List groupsToUpdate = new ArrayList<>(); - for(GroupDataDefinition currGroup : containerComponent.getGroups()){ - if(currGroup.getMembers().containsKey(deletedInstance.getName())){ - currGroup.getMembers().remove(deletedInstance.getName()); + for (GroupDataDefinition currGroup : containerComponent.getGroups()) { + Map members = currGroup.getMembers(); + if (members != null && members.containsKey(deletedInstance.getName())) { + members.remove(deletedInstance.getName()); groupsToUpdate.add(currGroup); } } - Either, StorageOperationStatus> updateGroupsRes = - toscaOperationFacade.updateGroupsOnComponent(containerComponent, containerComponent.getComponentType(), groupsToUpdate); + Either, StorageOperationStatus> updateGroupsRes = toscaOperationFacade.updateGroupsOnComponent(containerComponent, containerComponent.getComponentType(), groupsToUpdate); if (updateGroupsRes.isRight()) { log.debug("Failed to delete component instance {} from group members. ", componentInstanceId); ActionStatus status = componentsUtils.convertFromStorageResponse(updateGroupsRes.right().value(), containerComponentType); resultOp = Either.right(componentsUtils.getResponseFormat(status, componentInstanceId)); } } - if(resultOp.isLeft() && CollectionUtils.isNotEmpty(containerComponent.getInputs())){ + if (resultOp.isLeft() && CollectionUtils.isNotEmpty(containerComponent.getInputs())) { List inputsToDelete = containerComponent.getInputs().stream().filter(i -> i.getInstanceUniqueId() != null && i.getInstanceUniqueId().equals(componentInstanceId)).collect(Collectors.toList()); - if(CollectionUtils.isNotEmpty(inputsToDelete)){ - StorageOperationStatus deleteInputsRes = - toscaOperationFacade.deleteComponentInstanceInputsFromTopologyTemplate(containerComponent, containerComponent.getComponentType(), inputsToDelete); - if(deleteInputsRes != StorageOperationStatus.OK){ + if (CollectionUtils.isNotEmpty(inputsToDelete)) { + StorageOperationStatus deleteInputsRes = toscaOperationFacade.deleteComponentInstanceInputsFromTopologyTemplate(containerComponent, containerComponent.getComponentType(), inputsToDelete); + if (deleteInputsRes != StorageOperationStatus.OK) { log.debug("Failed to delete inputs of the component instance {} from container component. ", componentInstanceId); resultOp = Either.right(componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponse(deleteInputsRes, containerComponentType), componentInstanceId)); } @@ -802,8 +860,8 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { private ComponentInstance findAndRemoveComponentInstanceFromContainerComponent(String componentInstanceId, Component containerComponent) { ComponentInstance foundInstance = null; - for(ComponentInstance instance : containerComponent.getComponentInstances()){ - if(instance.getUniqueId().equals(componentInstanceId)){ + for (ComponentInstance instance : containerComponent.getComponentInstances()) { + if (instance.getUniqueId().equals(componentInstanceId)) { foundInstance = instance; containerComponent.getComponentInstances().remove(instance); break; @@ -885,7 +943,7 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { toNameOrId = toResult.left().value().getName(); } - resultOp = Either.right(componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponseForResourceInstance(result.right().value(), true), fromNameOrId, toNameOrId, requirementDef.getRelationships().get(0).getRequirement())); + resultOp = Either.right(componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponseForResourceInstance(result.right().value(), true), fromNameOrId, toNameOrId, requirementDef.getRelationships().get(0).getRelation().getRequirement())); return resultOp; } @@ -941,13 +999,156 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { } resultOp = Either - .right(componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponseForResourceInstance(result.right().value(), true), fromNameOrId, toNameOrId, requirementDef.getRelationships().get(0).getRequirement())); + .right(componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponseForResourceInstance(result.right().value(), true), fromNameOrId, toNameOrId, requirementDef.getRelationships().get(0).getRelation().getRequirement())); return resultOp; } } finally { unlockComponent(resultOp, containerComponent); } } + /** + * Allows to get relation contained in specified component according to received Id + * @param componentId + * @param relationId + * @param userId + * @param componentTypeEnum + * @return + */ + public Either getRelationById(String componentId, String relationId, String userId, ComponentTypeEnum componentTypeEnum) { + + Either resultOp = null; + try { + org.openecomp.sdc.be.model.Component containerComponent = null; + Either validateComponentExists = null; + RequirementCapabilityRelDef foundRelation = null; + + Either validateUserRes = validateUserExists(userId, "get relation by Id", false); + if (validateUserRes.isRight()) { + resultOp = Either.right(validateUserRes.right().value()); + } + if(resultOp == null){ + validateComponentExists = validateComponentExists(componentId, componentTypeEnum, null); + if (validateComponentExists.isRight()) { + resultOp = Either.right(validateComponentExists.right().value()); + } + } + if(resultOp == null){ + containerComponent = validateComponentExists.left().value(); + List requirementCapabilityRelations = containerComponent.getComponentInstancesRelations(); + foundRelation = findRelation(relationId, requirementCapabilityRelations); + if(foundRelation == null){ + ResponseFormat responseFormat = componentsUtils.getResponseFormat(ActionStatus.RELATION_NOT_FOUND, relationId, componentId); + log.debug("Relation with id {} was not found on the component", relationId, componentId); + resultOp = Either.right(responseFormat); + } + } + if(resultOp == null){ + resultOp = setRelatedCapability(foundRelation, containerComponent); + } + if(resultOp.isLeft()){ + resultOp = setRelatedRequirement(foundRelation, containerComponent); + } + } catch (Exception e) { + log.error("The exception {} occured upon get relation {} of the component {} ", e, relationId, componentId); + resultOp = Either.right(componentsUtils.getResponseFormat(ActionStatus.GENERAL_ERROR)); + } + return resultOp; + } + + private RequirementCapabilityRelDef findRelation(String relationId, List requirementCapabilityRelations) { + for(RequirementCapabilityRelDef relationship : requirementCapabilityRelations){ + if(relationship.getRelationships().stream().filter(r -> r.getRelation().getId().equals(relationId)).findFirst().isPresent()){ + return relationship; + } + } + return null; + } + + private Either setRelatedRequirement(RequirementCapabilityRelDef foundRelation, Component containerComponent) { + Either result = null; + RelationshipInfo relationshipInfo = foundRelation.getSingleRelationship().getRelation(); + String instanceId = foundRelation.getFromNode(); + Optional foundRequirement; + Optional instance = containerComponent.getComponentInstances().stream().filter(i -> i.getUniqueId().equals(instanceId)).findFirst(); + if(!instance.isPresent()){ + ResponseFormat responseFormat = componentsUtils.getResponseFormat(ActionStatus.COMPONENT_INSTANCE_NOT_FOUND_ON_CONTAINER, instanceId, "instance", containerComponent.getComponentType().getValue(), containerComponent.getName()); + log.debug("Component instance with id {} was not found on the component", instanceId, containerComponent.getUniqueId()); + result = Either.right(responseFormat); + } + if(result == null){ + for(List requirements : instance.get().getRequirements().values()){ + foundRequirement = requirements.stream().filter(r -> isBelongingRequirement(relationshipInfo, r)).findFirst(); + if(foundRequirement.isPresent()){ + foundRelation.getSingleRelationship().setRequirement(foundRequirement.get()); + result = Either.left(foundRelation); + } + } + } + if(result == null){ + Either getfulfilledRequirementRes = toscaOperationFacade.getFulfilledRequirementByRelation(containerComponent.getUniqueId(), instanceId, foundRelation, (rel, req)->isBelongingRequirement(rel, req)); + if(getfulfilledRequirementRes.isRight()){ + ResponseFormat responseFormat = componentsUtils.getResponseFormat(ActionStatus.REQUIREMENT_OF_INSTANCE_NOT_FOUND_ON_CONTAINER, relationshipInfo.getRequirement(), instanceId, containerComponent.getUniqueId()); + log.debug("Requirement {} of instance {} was not found on the container {}. ", relationshipInfo.getCapability(), instanceId, containerComponent.getUniqueId()); + result = Either.right(responseFormat); + } else { + foundRelation.getSingleRelationship().setRequirement(getfulfilledRequirementRes.left().value()); + } + } + if(result == null){ + result = Either.left(foundRelation); + } + return result; + } + + private boolean isBelongingRequirement(RelationshipInfo relationshipInfo, RequirementDataDefinition req) { + return req.getRelationship().equals(relationshipInfo.getRelationship().getType()) && + req.getName().equals(relationshipInfo.getRequirement()) && + req.getUniqueId().equals(relationshipInfo.getRequirementUid()) && + req.getOwnerId().equals(relationshipInfo.getRequirementOwnerId()); + } + + private Either setRelatedCapability(RequirementCapabilityRelDef foundRelation, Component containerComponent) { + Either result = null; + RelationshipInfo relationshipInfo = foundRelation.getSingleRelationship().getRelation(); + String instanceId = foundRelation.getToNode(); + Optional foundCapability; + Optional instance = containerComponent.getComponentInstances().stream().filter(i -> i.getUniqueId().equals(instanceId)).findFirst(); + if(!instance.isPresent()){ + ResponseFormat responseFormat = componentsUtils.getResponseFormat(ActionStatus.COMPONENT_INSTANCE_NOT_FOUND_ON_CONTAINER, instanceId, "instance", containerComponent.getComponentType().getValue(), containerComponent.getName()); + log.debug("Component instance with id {} was not found on the component", instanceId, containerComponent.getUniqueId()); + result = Either.right(responseFormat); + } + if(result == null){ + for(List capabilities : instance.get().getCapabilities().values()){ + foundCapability = capabilities.stream().filter(c -> isBelongingCapability(relationshipInfo, c)).findFirst(); + if(foundCapability.isPresent()){ + foundRelation.getSingleRelationship().setCapability(foundCapability.get()); + result = Either.left(foundRelation); + } + } + } + if(result == null){ + Either getfulfilledRequirementRes = + toscaOperationFacade.getFulfilledCapabilityByRelation(containerComponent.getUniqueId(), instanceId, foundRelation, (rel, cap)->isBelongingCapability(rel, cap)); + if(getfulfilledRequirementRes.isRight()){ + ResponseFormat responseFormat = componentsUtils.getResponseFormat(ActionStatus.CAPABILITY_OF_INSTANCE_NOT_FOUND_ON_CONTAINER, relationshipInfo.getCapability(), instanceId, containerComponent.getUniqueId()); + log.debug("Capability {} of instance {} was not found on the container {}. ", relationshipInfo.getCapability(), instanceId, containerComponent.getUniqueId()); + result = Either.right(responseFormat); + } else { + foundRelation.getSingleRelationship().setCapability(getfulfilledRequirementRes.left().value()); + } + } + if(result == null){ + result = Either.left(foundRelation); + } + return result; + } + + private boolean isBelongingCapability(RelationshipInfo relationshipInfo, CapabilityDataDefinition cap) { + return cap.getName().equals(relationshipInfo.getCapability()) && + cap.getUniqueId().equals(relationshipInfo.getCapabilityUid()) && + cap.getOwnerId().equals(relationshipInfo.getCapabilityOwnerId()); + } private Either updateAttributeValue(ComponentInstanceProperty attribute, String resourceInstanceId) { Either eitherAttribute = componentInstanceOperation.updateAttributeValueInResourceInstance(attribute, resourceInstanceId, true); @@ -999,7 +1200,7 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { /** * Create Or Updates Attribute Instance - * + * * @param componentTypeEnum * @param componentId * @param resourceInstanceId @@ -1047,28 +1248,82 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { } } - // US833308 VLI in service - specific network_role property value logic + private boolean isNetworkRoleServiceProperty(ComponentInstanceProperty property, ComponentTypeEnum componentTypeEnum) { + return StringUtils.isNotEmpty(property.getValue()) + && PropertyNames.NETWORK_ROLE.getPropertyName().equalsIgnoreCase(property.getName()) + && ComponentTypeEnum.SERVICE == componentTypeEnum; + } + private StorageOperationStatus concatServiceNameToVLINetworkRolePropertyValue(ToscaOperationFacade toscaOperationFacade, ComponentTypeEnum componentTypeEnum, String componentId, String resourceInstanceId, ComponentInstanceProperty property) { - if (StringUtils.isNotEmpty(property.getValue()) && PropertyNames.NETWORK_ROLE.getPropertyName().equalsIgnoreCase(property.getName()) && ComponentTypeEnum.SERVICE == componentTypeEnum) { - ComponentParametersView componentParametersView = new ComponentParametersView(); - componentParametersView.disableAll(); - componentParametersView.setIgnoreComponentInstances(false); - Either getServiceResult = toscaOperationFacade.getToscaElement(componentId, componentParametersView); - if (getServiceResult.isRight()) { - return getServiceResult.right().value(); + return concatServiceNameToVLINetworkRolePropertiesValues(toscaOperationFacade, componentTypeEnum, componentId, resourceInstanceId, Arrays.asList(property)); + } + + // US833308 VLI in service - specific network_role property value logic + private StorageOperationStatus concatServiceNameToVLINetworkRolePropertiesValues(ToscaOperationFacade toscaOperationFacade, ComponentTypeEnum componentTypeEnum, String componentId, String resourceInstanceId, List properties) { + for (ComponentInstanceProperty property: properties) { + if (isNetworkRoleServiceProperty(property, componentTypeEnum)) { + ComponentParametersView componentParametersView = new ComponentParametersView(); + componentParametersView.disableAll(); + componentParametersView.setIgnoreComponentInstances(false); + Either getServiceResult = toscaOperationFacade.getToscaElement(componentId, componentParametersView); + if (getServiceResult.isRight()) { + return getServiceResult.right().value(); + } + Component service = getServiceResult.left().value(); + Optional getInstance = service.getComponentInstances().stream().filter(p -> p.getUniqueId().equals(resourceInstanceId)).findAny(); + if (!getInstance.isPresent()) { + return StorageOperationStatus.NOT_FOUND; + } + String prefix = service.getSystemName() + "."; + String value = property.getValue(); + if (OriginTypeEnum.VL == getInstance.get().getOriginType() && (!value.startsWith(prefix) || value.equalsIgnoreCase(prefix))) { + property.setValue(prefix + value); + } + } + } + return StorageOperationStatus.OK; + } + + private Either updatePropertyObjectValue(ComponentInstanceProperty property, Map allDataTypes) { + String innerType = null; + String propertyType = property.getType(); + ToscaPropertyType type = ToscaPropertyType.isValidType(propertyType); + log.debug("The type of the property {} is {}", property.getUniqueId(), propertyType); + + if (type == ToscaPropertyType.LIST || type == ToscaPropertyType.MAP) { + SchemaDefinition def = property.getSchema(); + if (def == null) { + log.debug("Schema doesn't exists for property of type {}", type); + return Either.right(componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponse(StorageOperationStatus.INVALID_VALUE))); } - Component service = getServiceResult.left().value(); - Optional getInstance = service.getComponentInstances().stream().filter(p -> p.getUniqueId().equals(resourceInstanceId)).findAny(); - if (!getInstance.isPresent()) { - return StorageOperationStatus.NOT_FOUND; + PropertyDataDefinition propDef = def.getProperty(); + if (propDef == null) { + log.debug("Property in Schema Definition inside property of type {} doesn't exist", type); + return Either.right(componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponse(StorageOperationStatus.INVALID_VALUE))); } - String prefix = service.getSystemName() + "."; - String value = property.getValue(); - if (OriginTypeEnum.VL == getInstance.get().getOriginType() && (!value.startsWith(prefix) || value.equalsIgnoreCase(prefix))) { - property.setValue(prefix + value); + innerType = propDef.getType(); + } + // Specific Update Logic + Either isValid = propertyOperation.validateAndUpdatePropertyValue(propertyType, property.getValue(), true, innerType, allDataTypes); + String newValue = property.getValue(); + if (isValid.isRight()) { + Boolean res = isValid.right().value(); + if (res == false) { + return Either.right(componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponse(DaoStatusConverter.convertTitanStatusToStorageStatus(TitanOperationStatus.ILLEGAL_ARGUMENT)))); + } + } else { + Object object = isValid.left().value(); + if (object != null) { + newValue = object.toString(); } } - return StorageOperationStatus.OK; + + ImmutablePair pair = propertyOperation.validateAndUpdateRules(propertyType, property.getRules(), innerType, allDataTypes, true); + if (pair.getRight() != null && pair.getRight() == false) { + BeEcompErrorManager.getInstance().logBeInvalidValueError("Add property value", pair.getLeft(), property.getName(), propertyType); + return Either.right(componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponse(DaoStatusConverter.convertTitanStatusToStorageStatus(TitanOperationStatus.ILLEGAL_ARGUMENT)))); + } + return Either.left(newValue); } public Either createOrUpdatePropertyValue(ComponentTypeEnum componentTypeEnum, String componentId, String resourceInstanceId, ComponentInstanceProperty property, String userId) { @@ -1156,7 +1411,7 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { if (object != null) { newValue = object.toString(); } - } + } ImmutablePair pair = propertyOperation.validateAndUpdateRules(propertyType, property.getRules(), innerType, allDataTypes.left().value(), true); if (pair.getRight() != null && pair.getRight() == false) { @@ -1169,12 +1424,12 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { Optional instanceProperty = instanceProperties.stream().filter(p -> p.getUniqueId().equals(property.getUniqueId())).findAny(); StorageOperationStatus status; instanceProperty.get().setValue(newValue); - if(instanceProperty.isPresent()){ + if (instanceProperty.isPresent()) { status = toscaOperationFacade.updateComponentInstanceProperty(containerComponent, foundResourceInstance.getUniqueId(), property); } else { status = toscaOperationFacade.addComponentInstanceProperty(containerComponent, foundResourceInstance.getUniqueId(), property); } - if(status != StorageOperationStatus.OK){ + if (status != StorageOperationStatus.OK) { ActionStatus actionStatus = componentsUtils.convertFromStorageResponseForResourceInstanceProperty(status); resultOp = Either.right(componentsUtils.getResponseFormatForResourceInstanceProperty(actionStatus, "")); return resultOp; @@ -1182,17 +1437,17 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { List path = new ArrayList<>(); path.add(foundResourceInstance.getUniqueId()); property.setPath(path); - + foundResourceInstance.setCustomizationUUID(UUID.randomUUID().toString()); Either updateContainerRes = toscaOperationFacade.updateComponentInstanceMetadataOfTopologyTemplate(containerComponent); - + if (updateContainerRes.isRight()) { ActionStatus actionStatus = componentsUtils.convertFromStorageResponseForResourceInstanceProperty(updateContainerRes.right().value()); resultOp = Either.right(componentsUtils.getResponseFormatForResourceInstanceProperty(actionStatus, "")); return resultOp; } - resultOp = Either.left(property); - return resultOp; + resultOp = Either.left(property); + return resultOp; } finally { if (resultOp == null || resultOp.isRight()) { @@ -1205,7 +1460,7 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { } } - + public Either createOrUpdateInstanceInputValue(ComponentTypeEnum componentTypeEnum, String componentId, String resourceInstanceId, ComponentInstanceInput property, String userId) { Either resultOp = null; @@ -1239,9 +1494,9 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { resultOp = Either.right(componentsUtils.getResponseFormat(ActionStatus.RESOURCE_INSTANCE_NOT_FOUND_ON_SERVICE, resourceInstanceId, componentId)); return resultOp; } - + ComponentInstance foundResourceInstance = resourceInstanceStatus.left().value(); - + // lock resource StorageOperationStatus lockStatus = graphLockOperation.lockComponent(componentId, componentTypeEnum.getNodeType()); if (lockStatus != StorageOperationStatus.OK) { @@ -1276,44 +1531,38 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { } Either isValid = propertyOperation.validateAndUpdatePropertyValue(propertyType, property.getValue(), true, innerType, allDataTypes.left().value()); - String newValue = property.getValue(); if (isValid.isRight()) { Boolean res = isValid.right().value(); - if (res == false) { + if (!res) { return Either.right(componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponse(DaoStatusConverter.convertTitanStatusToStorageStatus(TitanOperationStatus.ILLEGAL_ARGUMENT)))); } - } else { - Object object = isValid.left().value(); - if (object != null) { - newValue = object.toString(); - } - } + } try { List instanceProperties = containerComponent.getComponentInstancesInputs().get(resourceInstanceId); Optional instanceProperty = instanceProperties.stream().filter(p -> p.getUniqueId().equals(property.getUniqueId())).findAny(); StorageOperationStatus status; - if(instanceProperty.isPresent()){ + if (instanceProperty.isPresent()) { instanceProperty.get().setValue(property.getValue()); status = toscaOperationFacade.updateComponentInstanceInput(containerComponent, foundResourceInstance.getUniqueId(), property); } else { status = toscaOperationFacade.addComponentInstanceInput(containerComponent, foundResourceInstance.getUniqueId(), property); } - if(status != StorageOperationStatus.OK){ + if (status != StorageOperationStatus.OK) { ActionStatus actionStatus = componentsUtils.convertFromStorageResponseForResourceInstanceProperty(status); resultOp = Either.right(componentsUtils.getResponseFormatForResourceInstanceProperty(actionStatus, "")); return resultOp; } foundResourceInstance.setCustomizationUUID(UUID.randomUUID().toString()); Either updateContainerRes = toscaOperationFacade.updateComponentInstanceMetadataOfTopologyTemplate(containerComponent); - + if (updateContainerRes.isRight()) { ActionStatus actionStatus = componentsUtils.convertFromStorageResponseForResourceInstanceProperty(updateContainerRes.right().value()); resultOp = Either.right(componentsUtils.getResponseFormatForResourceInstanceProperty(actionStatus, "")); return resultOp; } - resultOp = Either.left(property); - return resultOp; + resultOp = Either.left(property); + return resultOp; } finally { if (resultOp == null || resultOp.isRight()) { @@ -1577,7 +1826,7 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { } private Either getAndValidateOriginComponentOfComponentInstance(ComponentTypeEnum containerComponentType, ComponentInstance componentInstance) { - + Either eitherResponse = null; ComponentTypeEnum componentType = getComponentTypeByParentComponentType(containerComponentType); Component component; @@ -1589,16 +1838,16 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { errorResponse = componentsUtils.getResponseFormat(actionStatus, Constants.EMPTY_STRING); eitherResponse = Either.right(errorResponse); } - if(eitherResponse == null) { + if (eitherResponse == null) { component = getComponentRes.left().value(); LifecycleStateEnum resourceCurrState = component.getLifecycleState(); if (resourceCurrState == LifecycleStateEnum.NOT_CERTIFIED_CHECKOUT) { ActionStatus actionStatus = ActionStatus.ILLEGAL_COMPONENT_STATE; errorResponse = componentsUtils.getResponseFormat(actionStatus, component.getComponentType().toString(), component.getName(), resourceCurrState.toString()); - eitherResponse = Either.right(errorResponse); + eitherResponse = Either.right(errorResponse); } } - if(eitherResponse == null) { + if (eitherResponse == null) { eitherResponse = Either.left(getComponentRes.left().value()); } return eitherResponse; @@ -1632,7 +1881,7 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { return Either.right(validateCanWorkOnComponent.right().value()); } - Either resourceInstanceStatus = getResourceInstanceById(containerComponent,componentInstanceId); + Either resourceInstanceStatus = getResourceInstanceById(containerComponent, componentInstanceId); if (resourceInstanceStatus.isRight()) { resultOp = Either.right(componentsUtils.getResponseFormat(ActionStatus.RESOURCE_INSTANCE_NOT_FOUND_ON_SERVICE, componentInstanceId, containerComponentId)); return resultOp; @@ -1646,48 +1895,79 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { } try { + + if (currentResourceInstance.getComponentUid().equals(newComponentInstance.getComponentUid())) { resultOp = Either.left(currentResourceInstance); return resultOp; } String resourceId = newComponentInstance.getComponentUid(); + + + Either componentExistsRes = toscaOperationFacade.validateComponentExists(resourceId); - if(componentExistsRes.isRight()){ + if (componentExistsRes.isRight()) { log.debug("Failed to validate existing of the component {}. Status is {} ", resourceId); resultOp = Either.right(componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponse(componentExistsRes.right().value()), resourceId)); return resultOp; - } - else if (!componentExistsRes.left().value()) { + } else if (!componentExistsRes.left().value()) { log.debug("The resource {} not found ", resourceId); resultOp = Either.right(componentsUtils.getResponseFormat(ActionStatus.RESOURCE_NOT_FOUND, resourceId)); return resultOp; } - // List groupInstances = currentResourceInstance.getGroupInstances(); - Map deploymentArtifacts = currentResourceInstance.getDeploymentArtifacts(); + Either eitherOriginComponent = getOriginComponentFromComponentInstance(currentResourceInstance, true); + + if (eitherOriginComponent.isRight()) { + resultOp = Either.right(eitherOriginComponent.right().value()); + return resultOp; + } + DataForMergeHolder dataHolder = compInstMergeDataBL.saveAllDataBeforeDeleting(containerComponent, currentResourceInstance, eitherOriginComponent.left().value()); resultOp = deleteComponentInstance(containerComponent, componentInstanceId, containerComponentType); if (resultOp.isRight()) { log.debug("failed to delete resource instance {}", resourceId); return resultOp; } + ComponentInstance resResourceInfo = resultOp.left().value(); + Component origComponent = null; + OriginTypeEnum originType = currentResourceInstance.getOriginType(); + if (originType == OriginTypeEnum.ServiceProxy) { + Either serviceProxyOrigin = toscaOperationFacade.getLatestByName("serviceProxy"); + if (serviceProxyOrigin.isRight()) { + log.debug("Failed to fetch normative service proxy resource by tosca name, error {}", serviceProxyOrigin.right().value()); + return Either.right(componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponse(serviceProxyOrigin.right().value()))); + } + origComponent = serviceProxyOrigin.left().value(); - Either eitherResourceName = getOriginComponentNameFromComponentInstance(newComponentInstance, true); + StorageOperationStatus fillProxyRes = fillProxyInstanceData(newComponentInstance, origComponent); - if (eitherResourceName.isRight()) { - resultOp = Either.right(eitherResourceName.right().value()); - return resultOp; - } + if (fillProxyRes != StorageOperationStatus.OK) { + log.debug("Failed to fill service proxy resource data with data from service, error {}", fillProxyRes); + return Either.right(componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponse(fillProxyRes))); - Component origComponent = eitherResourceName.left().value(); + } + newComponentInstance.setOriginType(originType); + }else{ + + + Either eitherResourceName = getOriginComponentFromComponentInstance(newComponentInstance, true); + + if (eitherResourceName.isRight()) { + resultOp = Either.right(eitherResourceName.right().value()); + return resultOp; + } + + origComponent = eitherResourceName.left().value(); + + newComponentInstance.setName(resResourceInfo.getName()); + //newComponentInstance.setToscaComponentName(((ResourceMetadataDataDefinition) origComponent.getComponentMetadataDefinition().getMetadataDataDefinition()).getToscaResourceName()); + } - ComponentInstance resResourceInfo = resultOp.left().value(); - newComponentInstance.setName(resResourceInfo.getName()); newComponentInstance.setInvariantName(resResourceInfo.getInvariantName()); newComponentInstance.setPosX(resResourceInfo.getPosX()); newComponentInstance.setPosY(resResourceInfo.getPosY()); newComponentInstance.setDescription(resResourceInfo.getDescription()); - newComponentInstance.setToscaComponentName(((ResourceMetadataDataDefinition)origComponent.getComponentMetadataDefinition().getMetadataDataDefinition()).getToscaResourceName()); resultOp = createComponentInstanceOnGraph(containerComponent, origComponent, newComponentInstance, user); @@ -1702,29 +1982,25 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { return resultOp; } - /* if (CollectionUtils.isNotEmpty(groupInstances)) { - StorageOperationStatus addGroupsToComponentInstance = toscaOperationFacade.addGroupInstancesToComponentInstance(containerComponent, updatedComponentInstance, groupInstances); - if (addGroupsToComponentInstance != StorageOperationStatus.OK) { - BeEcompErrorManager.getInstance().logInternalFlowError("ChangeComponentInstanceVersion", "Failed to associate groups to new component instance", ErrorSeverity.ERROR); - resultOp = Either.right(componentsUtils.getResponseFormat(ActionStatus.GENERAL_ERROR)); - return resultOp; - } - - + Either mergeStatusEither = compInstMergeDataBL.mergeComponentUserOrigData(user, dataHolder, containerComponent, containerComponentId, newComponentInstance.getUniqueId()); + if (mergeStatusEither.isRight()) { + return Either.right(mergeStatusEither.right().value()); } - if (MapUtils.isNotEmpty(deploymentArtifacts)) { - StorageOperationStatus addDeploymentArtifactsToComponentInstance = toscaOperationFacade.addDeploymentArtifactsToComponentInstance(containerComponent, updatedComponentInstance, deploymentArtifacts); - if (addDeploymentArtifactsToComponentInstance != StorageOperationStatus.OK) { - BeEcompErrorManager.getInstance().logInternalFlowError("ChangeComponentInstanceVersion", "Failed to associate groups to new component instance", ErrorSeverity.ERROR); - resultOp = Either.right(componentsUtils.getResponseFormat(ActionStatus.GENERAL_ERROR)); - return resultOp; - } - }*/ - + /* + * if (CollectionUtils.isNotEmpty(groupInstances)) { StorageOperationStatus addGroupsToComponentInstance = toscaOperationFacade.addGroupInstancesToComponentInstance( containerComponent, updatedComponentInstance, groupInstances); if + * (addGroupsToComponentInstance != StorageOperationStatus.OK) { BeEcompErrorManager.getInstance().logInternalFlowError( "ChangeComponentInstanceVersion", "Failed to associate groups to new component instance", ErrorSeverity.ERROR); + * resultOp = Either.right(componentsUtils.getResponseFormat(ActionStatus. GENERAL_ERROR)); return resultOp; } + * + * + * } if (MapUtils.isNotEmpty(deploymentArtifacts)) { StorageOperationStatus addDeploymentArtifactsToComponentInstance = toscaOperationFacade.addDeploymentArtifactsToComponentInstance( containerComponent, updatedComponentInstance, + * deploymentArtifacts); if (addDeploymentArtifactsToComponentInstance != StorageOperationStatus.OK) { BeEcompErrorManager.getInstance().logInternalFlowError( "ChangeComponentInstanceVersion", + * "Failed to associate groups to new component instance", ErrorSeverity.ERROR); resultOp = Either.right(componentsUtils.getResponseFormat(ActionStatus. GENERAL_ERROR)); return resultOp; } } + */ + ComponentParametersView filter = new ComponentParametersView(true); filter.setIgnoreComponentInstances(false); - Either updatedComponentRes = toscaOperationFacade.getToscaElement(containerComponentId, filter); + Either updatedComponentRes = toscaOperationFacade.getToscaElement(containerComponentId, filter); if (updatedComponentRes.isRight()) { StorageOperationStatus storageOperationStatus = updatedComponentRes.right().value(); ActionStatus actionStatus = componentsUtils.convertFromStorageResponse(storageOperationStatus, containerComponent.getComponentType()); @@ -1732,7 +2008,7 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { log.debug("Component with id {} was not found", containerComponentId); return Either.right(responseFormat); } - resourceInstanceStatus = getResourceInstanceById(updatedComponentRes.left().value(),updatedComponentInstance.getUniqueId()); + resourceInstanceStatus = getResourceInstanceById(updatedComponentRes.left().value(), updatedComponentInstance.getUniqueId()); if (resourceInstanceStatus.isRight()) { resultOp = Either.right(componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponse(resourceInstanceStatus.right().value()), updatedComponentInstance.getUniqueId())); return resultOp; @@ -1780,9 +2056,9 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { resultOp = Either.right(componentsUtils.getResponseFormat(ActionStatus.RESOURCE_INSTANCE_NOT_FOUND_ON_SERVICE, componentInstanceUniqueId, containerComponentId)); return resultOp; } - + List instanceProperties = containerComponent.getComponentInstancesProperties().get(componentInstanceUniqueId); - if(CollectionUtils.isEmpty(instanceProperties)){ + if (CollectionUtils.isEmpty(instanceProperties)) { instanceProperties = new ArrayList<>(); } resultOp = Either.left(instanceProperties); @@ -1808,7 +2084,7 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { /** * updates componentInstance modificationTime - * + * * @param componentInstance * @param componentInstanceType * @param modificationTime @@ -1827,7 +2103,7 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { } return result; } - + public Either deleteServiceProxy(String containerComponentType, String containerComponentId, String serviceProxyId, String userId) { // TODO Add implementation Either result = Either.left(new ComponentInstance()); @@ -1845,7 +2121,7 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { Either result = Either.left(new ComponentInstance()); return result; } - + private Boolean validateInstanceNameUniquenessUponUpdate(Component containerComponent, ComponentInstance oldComponentInstance, String newInstanceName) { Boolean isUnique = true; String newInstanceNormalizedName = ValidationUtils.normalizeComponentInstanceName(newInstanceName); @@ -1859,57 +2135,259 @@ public abstract class ComponentInstanceBusinessLogic extends BaseBusinessLogic { } private Either getResourceInstanceById(Component containerComponent, String instanceId) { - + Either result = null; List instances = containerComponent.getComponentInstances(); Optional foundInstance = null; - if(CollectionUtils.isEmpty(instances)){ + if (CollectionUtils.isEmpty(instances)) { result = Either.right(StorageOperationStatus.NOT_FOUND); } - if(result == null){ + if (result == null) { foundInstance = instances.stream().filter(i -> i.getUniqueId().equals(instanceId)).findFirst(); - if(!foundInstance.isPresent()){ + if (!foundInstance.isPresent()) { result = Either.right(StorageOperationStatus.NOT_FOUND); } } - if(result == null){ + if (result == null) { result = Either.left(foundInstance.get()); } return result; } - - private ComponentInstance buildComponentInstance(ComponentInstance resourceInstanceForUpdate, ComponentInstance origInstanceForUpdate) { - Long creationDate = origInstanceForUpdate.getCreationTime(); - + private ComponentInstance buildComponentInstance(ComponentInstance resourceInstanceForUpdate, ComponentInstance origInstanceForUpdate) { + + Long creationDate = origInstanceForUpdate.getCreationTime(); + Long modificationTime = System.currentTimeMillis(); resourceInstanceForUpdate.setCreationTime(creationDate); resourceInstanceForUpdate.setModificationTime(modificationTime); - + resourceInstanceForUpdate.setCustomizationUUID(origInstanceForUpdate.getCustomizationUUID()); - + if (StringUtils.isEmpty(resourceInstanceForUpdate.getName()) && StringUtils.isNotEmpty(origInstanceForUpdate.getName())) { resourceInstanceForUpdate.setName(origInstanceForUpdate.getName()); } - + resourceInstanceForUpdate.setNormalizedName(ValidationUtils.normalizeComponentInstanceName(resourceInstanceForUpdate.getName())); - + if (StringUtils.isEmpty(resourceInstanceForUpdate.getIcon())) - resourceInstanceForUpdate.setIcon(origInstanceForUpdate.getIcon()); - - + resourceInstanceForUpdate.setIcon(origInstanceForUpdate.getIcon()); + if (StringUtils.isEmpty(resourceInstanceForUpdate.getComponentVersion())) resourceInstanceForUpdate.setComponentVersion(origInstanceForUpdate.getComponentVersion()); - + if (StringUtils.isEmpty(resourceInstanceForUpdate.getComponentName())) resourceInstanceForUpdate.setComponentName(origInstanceForUpdate.getComponentName()); - + if (StringUtils.isEmpty(resourceInstanceForUpdate.getToscaComponentName())) - resourceInstanceForUpdate.setToscaComponentName(origInstanceForUpdate.getToscaComponentName()); - - if (resourceInstanceForUpdate.getOriginType() == null) { + resourceInstanceForUpdate.setToscaComponentName(origInstanceForUpdate.getToscaComponentName()); + + if (resourceInstanceForUpdate.getOriginType() == null) { resourceInstanceForUpdate.setOriginType(origInstanceForUpdate.getOriginType()); } + if(resourceInstanceForUpdate.getOriginType() == OriginTypeEnum.ServiceProxy) + resourceInstanceForUpdate.setIsProxy(true); + if (resourceInstanceForUpdate.getSourceModelInvariant() == null) { + resourceInstanceForUpdate.setSourceModelInvariant(origInstanceForUpdate.getSourceModelInvariant()); + } + if (resourceInstanceForUpdate.getSourceModelName() == null) { + resourceInstanceForUpdate.setSourceModelName(origInstanceForUpdate.getSourceModelName()); + } + if (resourceInstanceForUpdate.getSourceModelUuid() == null) { + resourceInstanceForUpdate.setSourceModelUuid(origInstanceForUpdate.getSourceModelUuid()); + } + if (resourceInstanceForUpdate.getSourceModelUid() == null) { + resourceInstanceForUpdate.setSourceModelUid(origInstanceForUpdate.getSourceModelUid()); + } return resourceInstanceForUpdate; } + /** + * Returns list of ComponentInstanceProperty belonging to component instance capability specified by name and type + * @param containerComponentType + * @param containerComponentId + * @param componentInstanceUniqueId + * @param capabilityType + * @param capabilityName + * @param userId + * @return + */ + public Either, ResponseFormat> getComponentInstanceCapabilityPropertiesById(String containerComponentType, String containerComponentId, String componentInstanceUniqueId, String capabilityType, String capabilityName, String userId) { + + Component containerComponent = null; + + Either, ResponseFormat> resultOp = null; + try { + Either validateUserExists = validateUserExists(userId, "Get Component Instance Properties By Id", false); + if (validateUserExists.isRight()) { + resultOp = Either.right(validateUserExists.right().value()); + } + if(resultOp == null){ + Either validateComponentType = validateComponentType(containerComponentType); + if (validateComponentType.isRight()) { + resultOp = Either.right(validateComponentType.right().value()); + } + } + if(resultOp == null){ + Either validateContainerComponentExists = toscaOperationFacade.getToscaFullElement(containerComponentId); + if (validateContainerComponentExists.isRight()) { + resultOp = Either.right(componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponse(validateContainerComponentExists.right().value()))); + } else { + containerComponent = validateContainerComponentExists.left().value(); + } + } + if(resultOp == null){ + Either resourceInstanceStatus = getResourceInstanceById(containerComponent, componentInstanceUniqueId); + if (resourceInstanceStatus.isRight()) { + resultOp = Either.right(componentsUtils.getResponseFormat(ActionStatus.RESOURCE_INSTANCE_NOT_FOUND_ON_SERVICE, componentInstanceUniqueId, containerComponentId)); + } else { + resultOp = findCapabilityOfInstance(containerComponentId, componentInstanceUniqueId, capabilityType, capabilityName, resourceInstanceStatus.left().value().getCapabilities()); + } + } + return resultOp; + } finally { + unlockComponent(resultOp, containerComponent); + } + } + + private Either, ResponseFormat> findCapabilityOfInstance( String componentId, String instanceId, String capabilityType, String capabilityName, Map> instanceCapabilities) { + Either, ResponseFormat> result = null; + CapabilityDefinition foundCapability; + if (MapUtils.isNotEmpty(instanceCapabilities)) { + List capabilitiesPerType = instanceCapabilities.get(capabilityType); + if (capabilitiesPerType != null) { + Optional capabilityOpt = capabilitiesPerType.stream().filter(c -> c.getName().equals(capabilityName)).findFirst(); + if (capabilityOpt.isPresent()) { + foundCapability = capabilityOpt.get(); + result = Either.left(foundCapability.getProperties() == null ? new ArrayList<>() : foundCapability.getProperties()); + } + } + } + if (result == null) { + result = fetchComponentInstanceCapabilityProperties(componentId, instanceId, capabilityType, capabilityName); + } + return result; + } + + private Either, ResponseFormat> fetchComponentInstanceCapabilityProperties(String componentId, String instanceId, String capabilityType, String capabilityName) { + Either, ResponseFormat> resultOp = null; + try { + Either, StorageOperationStatus> getComponentInstanceCapabilityProperties = toscaOperationFacade.getComponentInstanceCapabilityProperties(componentId, instanceId, capabilityName, capabilityType); + if(getComponentInstanceCapabilityProperties.isRight()){ + resultOp = Either.right(componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponse(getComponentInstanceCapabilityProperties.right().value()), capabilityType, instanceId, componentId)); + } else { + resultOp = Either.left(getComponentInstanceCapabilityProperties.left().value()); + } + } catch(Exception e){ + log.error("The exception {} occurred upon the component {} instance {} capability {} properties retrieving. ", componentId, instanceId, capabilityName, e); + resultOp = Either.right(componentsUtils.getResponseFormat(ActionStatus.GENERAL_ERROR)); + } + return resultOp; + } + + private ResponseFormat updateCapabilityPropertyOnContainerComponent(ComponentInstanceProperty property, String newValue, Component containerComponent, ComponentInstance foundResourceInstance, + String capabilityType, String capabilityName) { + String componentInstanceUniqueId = foundResourceInstance.getUniqueId(); + StringBuilder sb = new StringBuilder(componentInstanceUniqueId); + sb.append(ModelConverter.CAP_PROP_DELIM).append(property.getOwnerId()).append(ModelConverter.CAP_PROP_DELIM).append(capabilityType).append(ModelConverter.CAP_PROP_DELIM).append(capabilityName); + String capKey = sb.toString(); + + Map> capabilities = Optional.ofNullable(foundResourceInstance.getCapabilities()) + .orElse(Collections.emptyMap()); + List capPerType = Optional.ofNullable(capabilities.get(capabilityType)).orElse(Collections.emptyList()); + Optional cap = capPerType.stream().filter(c -> c.getName().equals(capabilityName)).findAny(); + if (cap.isPresent()) { + List capProperties = cap.get().getProperties(); + if (capProperties != null) { + Optional instanceProperty = capProperties.stream().filter(p -> p.getUniqueId().equals(property.getUniqueId())).findAny(); + StorageOperationStatus status; + if (instanceProperty.isPresent()) { + instanceProperty.get().setValue(newValue); + List path = new ArrayList<>(); + path.add(componentInstanceUniqueId); + path.add(capKey); + instanceProperty.get().setPath(path); + status = toscaOperationFacade.updateComponentInstanceCapabiltyProperty(containerComponent, componentInstanceUniqueId, capKey, instanceProperty.get()); + if (status != StorageOperationStatus.OK) { + ActionStatus actionStatus = componentsUtils.convertFromStorageResponseForResourceInstanceProperty(status); + return componentsUtils.getResponseFormatForResourceInstanceProperty(actionStatus, ""); + + } + foundResourceInstance.setCustomizationUUID(UUID.randomUUID().toString()); + } + } + } + return componentsUtils.getResponseFormat(ActionStatus.OK); + } + + public Either, ResponseFormat> updateInstanceCapabilityProperties(ComponentTypeEnum componentTypeEnum, String containerComponentId, String componentInstanceUniqueId, String capabilityType, String capabilityName, + List properties, String userId) { + Either, ResponseFormat> resultOp = null; + + Either resp = validateUserExists(userId, "update instance capability property", false); + if (resp.isRight()) { + return Either.right(resp.right().value()); + } + + if (componentTypeEnum == null) { + BeEcompErrorManager.getInstance().logInvalidInputError("updateInstanceCapabilityProperty", "invalid component type", ErrorSeverity.INFO); + return Either.right(componentsUtils.getResponseFormat(ActionStatus.NOT_ALLOWED)); + } + Either getResourceResult = toscaOperationFacade.getToscaFullElement(containerComponentId); + + if (getResourceResult.isRight()) { + log.debug("Failed to retrieve component, component id {}", containerComponentId); + return Either.right(componentsUtils.getResponseFormat(ActionStatus.RESTRICTED_OPERATION)); + } + Component containerComponent = getResourceResult.left().value(); + + if (!ComponentValidationUtils.canWorkOnComponent(containerComponent, userId)) { + log.info("Restricted operation for user: {} on component {}", userId, containerComponentId); + return Either.right(componentsUtils.getResponseFormat(ActionStatus.RESTRICTED_OPERATION)); + } + Either resourceInstanceStatus = getResourceInstanceById(containerComponent, componentInstanceUniqueId); + if (resourceInstanceStatus.isRight()) { + return Either.right(componentsUtils.getResponseFormat(ActionStatus.RESOURCE_INSTANCE_NOT_FOUND_ON_SERVICE, componentInstanceUniqueId, containerComponentId)); + } + ComponentInstance foundResourceInstance = resourceInstanceStatus.left().value(); + // lock resource + StorageOperationStatus lockStatus = graphLockOperation.lockComponent(containerComponentId, componentTypeEnum.getNodeType()); + if (lockStatus != StorageOperationStatus.OK) { + log.debug("Failed to lock component {}", containerComponentId); + return Either.right(componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponse(lockStatus))); + } + + Either, TitanOperationStatus> allDataTypes = dataTypeCache.getAll(); + if (allDataTypes.isRight()) { + TitanOperationStatus status = allDataTypes.right().value(); + BeEcompErrorManager.getInstance().logInternalFlowError("UpdatePropertyValueOnComponentInstance", "Failed to update property value on instance. Status is " + status, ErrorSeverity.ERROR); + return Either.right(componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponse(DaoStatusConverter.convertTitanStatusToStorageStatus(status)))); + } + + try { + for (ComponentInstanceProperty property : properties) { + Either newPropertyValueEither = updatePropertyObjectValue(property, allDataTypes.left().value()); + newPropertyValueEither.bimap(updatedValue -> + updateCapabilityPropertyOnContainerComponent(property,updatedValue, containerComponent, foundResourceInstance, capabilityType, capabilityName), + responseFormat -> Either.right(responseFormat)); + } + Either updateContainerRes = toscaOperationFacade.updateComponentInstanceMetadataOfTopologyTemplate(containerComponent); + + if (updateContainerRes.isRight()) { + ActionStatus actionStatus = componentsUtils.convertFromStorageResponseForResourceInstanceProperty(updateContainerRes.right().value()); + resultOp = Either.right(componentsUtils.getResponseFormatForResourceInstanceProperty(actionStatus, "")); + return resultOp; + } + resultOp = Either.left(properties); + return resultOp; + + } finally { + if (resultOp == null || resultOp.isRight()) { + titanDao.rollback(); + } else { + titanDao.commit(); + } + // unlock resource + graphLockOperation.unlockComponent(containerComponentId, componentTypeEnum.getNodeType()); + } + } } diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/CompositionBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/CompositionBusinessLogic.java index e8c04c22c1..f6a108cf75 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/CompositionBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/CompositionBusinessLogic.java @@ -69,7 +69,7 @@ public class CompositionBusinessLogic { boolean isNotAllPositionsCalculated = resource.getComponentInstances() == null || resource.getComponentInstances().stream().filter(p -> (p.getPosX() == null || p.getPosX().isEmpty()) || (p.getPosY() == null || p.getPosY().isEmpty())).findAny().isPresent(); - if (isNotAllPositionsCalculated) { + if (isNotAllPositionsCalculated && resource.getComponentInstances() != null) { // Arrange Icons In Spiral Pattern Map, ComponentInstance> componentInstanceLocations = buildSpiralPatternPositioningForComponentInstances(resource); diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/CsarValidationUtils.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/CsarValidationUtils.java index 8b0c6fa8bf..53dceb8112 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/CsarValidationUtils.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/CsarValidationUtils.java @@ -20,8 +20,6 @@ package org.openecomp.sdc.be.components.impl; -import static org.openecomp.sdc.be.tosca.CsarUtils.VF_NODE_TYPE_ARTIFACTS_PATH_PATTERN; - import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.StringReader; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/DistributionMonitoringBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/DistributionMonitoringBusinessLogic.java index 9d9425ea85..be3ac13cc9 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/DistributionMonitoringBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/DistributionMonitoringBusinessLogic.java @@ -20,9 +20,12 @@ package org.openecomp.sdc.be.components.impl; -import org.springframework.beans.factory.annotation.Autowired; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; -import fj.data.Either; import org.apache.http.HttpStatus; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.cassandra.AuditCassandraDao; @@ -43,7 +46,7 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import java.util.*; +import fj.data.Either; @Component("distributionMonitoringBusinessLogic") public class DistributionMonitoringBusinessLogic extends BaseBusinessLogic { diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ElementBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ElementBusinessLogic.java index 2c051b2b94..54bed5ae56 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ElementBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ElementBusinessLogic.java @@ -20,10 +20,20 @@ package org.openecomp.sdc.be.components.impl; -import com.thinkaurelius.titan.core.TitanGraph; -import fj.data.Either; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Arrays; import java.util.EnumMap; +import java.util.HashMap; +import java.util.HashSet; import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import java.util.function.Predicate; +import java.util.stream.Collectors; + import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.http.NameValuePair; import org.apache.http.client.utils.URLEncodedUtils; @@ -38,10 +48,27 @@ import org.openecomp.sdc.be.datamodel.api.CategoryTypeEnum; import org.openecomp.sdc.be.datamodel.utils.NodeTypeConvertUtils; import org.openecomp.sdc.be.datatypes.components.ComponentMetadataDataDefinition; import org.openecomp.sdc.be.datatypes.components.ResourceMetadataDataDefinition; -import org.openecomp.sdc.be.datatypes.enums.*; +import org.openecomp.sdc.be.datatypes.enums.AssetTypeEnum; +import org.openecomp.sdc.be.datatypes.enums.ComponentFieldsEnum; +import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; +import org.openecomp.sdc.be.datatypes.enums.FilterKeyEnum; import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum; +import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; +import org.openecomp.sdc.be.datatypes.enums.OriginTypeEnum; +import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; import org.openecomp.sdc.be.impl.ComponentsUtils; -import org.openecomp.sdc.be.model.*; +import org.openecomp.sdc.be.model.ArtifactType; +import org.openecomp.sdc.be.model.Component; +import org.openecomp.sdc.be.model.ComponentParametersView; +import org.openecomp.sdc.be.model.DistributionStatusEnum; +import org.openecomp.sdc.be.model.LifecycleStateEnum; +import org.openecomp.sdc.be.model.Product; +import org.openecomp.sdc.be.model.PropertyScope; +import org.openecomp.sdc.be.model.Resource; +import org.openecomp.sdc.be.model.ResourceMetadataDefinition; +import org.openecomp.sdc.be.model.Service; +import org.openecomp.sdc.be.model.Tag; +import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.be.model.category.CategoryDefinition; import org.openecomp.sdc.be.model.category.GroupingDefinition; import org.openecomp.sdc.be.model.category.SubCategoryDefinition; @@ -64,10 +91,9 @@ import org.openecomp.sdc.exception.ResponseFormat; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.nio.charset.StandardCharsets; -import java.util.*; -import java.util.function.Predicate; -import java.util.stream.Collectors; +import com.thinkaurelius.titan.core.TitanGraph; + +import fj.data.Either; @org.springframework.stereotype.Component("elementsBusinessLogic") public class ElementBusinessLogic extends BaseBusinessLogic { diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/GroupBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/GroupBusinessLogic.java index a3d590374f..de571b0f03 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/GroupBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/GroupBusinessLogic.java @@ -20,7 +20,6 @@ package org.openecomp.sdc.be.components.impl; -import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -42,17 +41,13 @@ import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.math.NumberUtils; import org.apache.commons.lang3.tuple.ImmutablePair; -import org.codehaus.jackson.JsonGenerationException; -import org.codehaus.jackson.map.JsonMappingException; import org.openecomp.sdc.be.config.BeEcompErrorManager; import org.openecomp.sdc.be.config.BeEcompErrorManager.ErrorSeverity; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.dao.jsongraph.utils.JsonParserUtils; import org.openecomp.sdc.be.dao.titan.TitanOperationStatus; import org.openecomp.sdc.be.datatypes.elements.GroupDataDefinition; import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; -import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; import org.openecomp.sdc.be.info.ArtifactDefinitionInfo; import org.openecomp.sdc.be.info.ArtifactTemplateInfo; import org.openecomp.sdc.be.info.GroupDefinitionInfo; @@ -69,17 +64,15 @@ import org.openecomp.sdc.be.model.GroupTypeDefinition; import org.openecomp.sdc.be.model.PropertyDefinition; import org.openecomp.sdc.be.model.PropertyDefinition.GroupInstancePropertyValueUpdateBehavior; import org.openecomp.sdc.be.model.PropertyDefinition.PropertyNames; +import org.openecomp.sdc.be.model.Resource; +import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.be.model.cache.ApplicationDataTypeCache; import org.openecomp.sdc.be.model.jsontitan.operations.ArtifactsOperations; import org.openecomp.sdc.be.model.jsontitan.operations.GroupsOperation; -import org.openecomp.sdc.be.model.Resource; -import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; import org.openecomp.sdc.be.model.operations.impl.DaoStatusConverter; -import org.openecomp.sdc.be.model.operations.impl.GroupOperation; import org.openecomp.sdc.be.model.operations.impl.GroupTypeOperation; import org.openecomp.sdc.be.model.operations.impl.UniqueIdBuilder; -import org.openecomp.sdc.common.api.ArtifactTypeEnum; import org.openecomp.sdc.common.api.Constants; import org.openecomp.sdc.exception.ResponseFormat; import org.slf4j.Logger; @@ -88,7 +81,6 @@ import org.springframework.beans.factory.annotation.Autowired; import com.google.gson.Gson; import com.google.gson.GsonBuilder; -import com.google.gson.JsonSyntaxException; import fj.data.Either; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/GroupTypeImportManager.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/GroupTypeImportManager.java index 2de9eee217..b3448b27ef 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/GroupTypeImportManager.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/GroupTypeImportManager.java @@ -20,7 +20,15 @@ package org.openecomp.sdc.be.components.impl; -import fj.data.Either; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; +import java.util.stream.Collectors; + +import javax.annotation.Resource; + import org.apache.commons.lang3.tuple.ImmutablePair; import org.openecomp.sdc.be.components.impl.CommonImportManager.ElementTypeEnum; import org.openecomp.sdc.be.components.impl.ImportUtils.ToscaTagNamesEnum; @@ -37,13 +45,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; -import javax.annotation.Resource; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.function.Consumer; -import java.util.stream.Collectors; +import fj.data.Either; @Component("groupTypeImportManager") public class GroupTypeImportManager { diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/HealthCheckBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/HealthCheckBusinessLogic.java index fe9c8488aa..eff3d39f7f 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/HealthCheckBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/HealthCheckBusinessLogic.java @@ -21,7 +21,6 @@ package org.openecomp.sdc.be.components.impl; import java.io.IOException; -import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -38,6 +37,8 @@ import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; import javax.annotation.Resource; +import org.apache.commons.lang3.tuple.ImmutablePair; +import org.apache.commons.lang3.tuple.Pair; import org.apache.http.HttpEntity; import org.apache.http.HttpStatus; import org.apache.http.client.config.RequestConfig; @@ -54,18 +55,18 @@ import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.dao.api.IEsHealthCheckDao; import org.openecomp.sdc.be.dao.titan.TitanGenericDao; import org.openecomp.sdc.be.switchover.detector.SwitchoverDetector; +import org.openecomp.sdc.common.api.Constants; import org.openecomp.sdc.common.api.HealthCheckInfo; -import org.openecomp.sdc.common.api.HealthCheckInfo.HealthCheckComponent; import org.openecomp.sdc.common.api.HealthCheckInfo.HealthCheckStatus; -import org.openecomp.sdc.common.api.HealthCheckWrapper; import org.openecomp.sdc.common.impl.ExternalConfiguration; +import org.openecomp.sdc.common.util.HealthCheckUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import com.google.gson.Gson; -import com.google.gson.reflect.TypeToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; @Component("healthCheckBusinessLogic") public class HealthCheckBusinessLogic { @@ -135,12 +136,26 @@ public class HealthCheckBusinessLogic { return true; } - public List getBeHealthCheckInfosStatus() { + public Pair> getBeHealthCheckInfosStatus() { - return prevBeHealthCheckInfos; + return new ImmutablePair>(getAggregateBeStatus(prevBeHealthCheckInfos), prevBeHealthCheckInfos); } + private Boolean getAggregateBeStatus(List beHealthCheckInfos) { + + Boolean status = true; + + for (HealthCheckInfo healthCheckInfo : beHealthCheckInfos) { + if (healthCheckInfo.getHealthCheckStatus().equals(HealthCheckStatus.DOWN) && !healthCheckInfo.getHealthCheckComponent().equals(Constants.HC_COMPONENT_DISTRIBUTION_ENGINE)) { + status = false; + break; + } + } + return status; + } + + private List getBeHealthCheckInfos() { log.trace("In getBeHealthCheckInfos"); @@ -150,9 +165,6 @@ public class HealthCheckBusinessLogic { // BE getBeHealthCheck(healthCheckInfos); - /*// ES - getEsHealthCheck(healthCheckInfos);*/ - // Titan getTitanHealthCheck(healthCheckInfos); @@ -165,18 +177,21 @@ public class HealthCheckBusinessLogic { // Amdocs getAmdocsHealthCheck(healthCheckInfos); + //DCAE + getDcaeHealthCheck(healthCheckInfos); + return healthCheckInfos; } private List getBeHealthCheck(List healthCheckInfos) { String appVersion = ExternalConfiguration.getAppVersion(); String description = "OK"; - healthCheckInfos.add(new HealthCheckInfo(HealthCheckComponent.BE, HealthCheckStatus.UP, appVersion, description)); + healthCheckInfos.add(new HealthCheckInfo(Constants.HC_COMPONENT_BE, HealthCheckStatus.UP, appVersion, description)); return healthCheckInfos; } //Removed from aggregate HC - TDP 293490 -/* private List getEsHealthCheck(List healthCheckInfos) { + /* private List getEsHealthCheck(List healthCheckInfos) { // ES health check and version HealthCheckStatus healthCheckStatus; @@ -198,7 +213,7 @@ public class HealthCheckBusinessLogic { healthCheckInfos.add(new HealthCheckInfo(HealthCheckComponent.ES, healthCheckStatus, null, description)); return healthCheckInfos; } -*/ + */ public List getTitanHealthCheck(List healthCheckInfos) { // Titan health check and version String description; @@ -208,15 +223,15 @@ public class HealthCheckBusinessLogic { isTitanUp = titanGenericDao.isGraphOpen(); } catch (Exception e) { description = "Titan error: " + e.getMessage(); - healthCheckInfos.add(new HealthCheckInfo(HealthCheckComponent.TITAN, HealthCheckStatus.DOWN, null, description)); + healthCheckInfos.add(new HealthCheckInfo(Constants.HC_COMPONENT_TITAN, HealthCheckStatus.DOWN, null, description)); return healthCheckInfos; } if (isTitanUp) { description = "OK"; - healthCheckInfos.add(new HealthCheckInfo(HealthCheckComponent.TITAN, HealthCheckStatus.UP, null, description)); + healthCheckInfos.add(new HealthCheckInfo(Constants.HC_COMPONENT_TITAN, HealthCheckStatus.UP, null, description)); } else { description = "Titan graph is down"; - healthCheckInfos.add(new HealthCheckInfo(HealthCheckComponent.TITAN, HealthCheckStatus.DOWN, null, description)); + healthCheckInfos.add(new HealthCheckInfo(Constants.HC_COMPONENT_TITAN, HealthCheckStatus.DOWN, null, description)); } return healthCheckInfos; } @@ -234,10 +249,10 @@ public class HealthCheckBusinessLogic { } if (isCassandraUp) { description = "OK"; - healthCheckInfos.add(new HealthCheckInfo(HealthCheckComponent.CASSANDRA, HealthCheckStatus.UP, null, description)); + healthCheckInfos.add(new HealthCheckInfo(Constants.HC_COMPONENT_CASSANDRA, HealthCheckStatus.UP, null, description)); } else { description = "Cassandra is down"; - healthCheckInfos.add(new HealthCheckInfo(HealthCheckComponent.CASSANDRA, HealthCheckStatus.DOWN, null, description)); + healthCheckInfos.add(new HealthCheckInfo(Constants.HC_COMPONENT_CASSANDRA, HealthCheckStatus.DOWN, null, description)); } return healthCheckInfos; @@ -252,71 +267,92 @@ public class HealthCheckBusinessLogic { } private List getAmdocsHealthCheck(List healthCheckInfos) { + HealthCheckInfo beHealthCheckInfo = getHostedComponentsBeHealthCheck(Constants.HC_COMPONENT_ON_BOARDING, buildOnBoardingHealthCheckUrl()); + healthCheckInfos.add(beHealthCheckInfo); + return healthCheckInfos; + } + + private List getDcaeHealthCheck(List healthCheckInfos) { + HealthCheckInfo beHealthCheckInfo = getHostedComponentsBeHealthCheck(Constants.HC_COMPONENT_DCAE, buildDcaeHealthCheckUrl()); + healthCheckInfos.add(beHealthCheckInfo); + return healthCheckInfos; + } + + private HealthCheckInfo getHostedComponentsBeHealthCheck(String componentName, String healthCheckUrl) { HealthCheckStatus healthCheckStatus; String description; String version = null; List componentsInfo = new ArrayList<>(); CloseableHttpClient httpClient = getHttpClient(); - String amdocsHealtchCheckUrl = buildHealthCheckUrl(); - HttpGet httpGet = new HttpGet(amdocsHealtchCheckUrl); - CloseableHttpResponse beResponse; - int beStatus; - try { - beResponse = httpClient.execute(httpGet); - beStatus = beResponse.getStatusLine().getStatusCode(); - - StringBuilder sb = new StringBuilder(); - - if (beStatus == HttpStatus.SC_OK || beStatus == HttpStatus.SC_INTERNAL_SERVER_ERROR) { - HttpEntity entity = beResponse.getEntity(); - String beJsonResponse = EntityUtils.toString(entity); - Gson gson = new Gson(); - HealthCheckWrapper healthCheckWrapper = gson.fromJson(beJsonResponse, HealthCheckWrapper.class); - version = healthCheckWrapper.getSdcVersion(); - componentsInfo = healthCheckWrapper.getComponentsInfo(); - - if (componentsInfo != null) { - componentsInfo.forEach(x -> { - if (x.getHealthCheckStatus() == HealthCheckStatus.DOWN) { - sb.append("Component " + x.getHealthCheckComponent().name() + " is Down, "); - } - }); + + if (healthCheckUrl != null) { + HttpGet httpGet = new HttpGet(healthCheckUrl); + CloseableHttpResponse beResponse; + int beStatus; + try { + beResponse = httpClient.execute(httpGet); + beStatus = beResponse.getStatusLine().getStatusCode(); + + String aggDescription = ""; + + if (beStatus == HttpStatus.SC_OK || beStatus == HttpStatus.SC_INTERNAL_SERVER_ERROR) { + HttpEntity entity = beResponse.getEntity(); + String beJsonResponse = EntityUtils.toString(entity); + log.trace("{} Health Check response: {}", componentName, beJsonResponse); + + ObjectMapper mapper = new ObjectMapper(); + Map healthCheckMap = mapper.readValue(beJsonResponse, new TypeReference>(){}); + version = healthCheckMap.get("sdcVersion") != null ? healthCheckMap.get("sdcVersion").toString() : null; + if (healthCheckMap.containsKey("componentsInfo")) { + componentsInfo = mapper.convertValue(healthCheckMap.get("componentsInfo"), new TypeReference>() {}); + } + + if (componentsInfo.size() > 0) { + aggDescription = HealthCheckUtil.getAggregateDescription(componentsInfo, null); + } else { + componentsInfo.add(new HealthCheckInfo(Constants.HC_COMPONENT_BE, HealthCheckStatus.DOWN, null, null)); + } } else { - componentsInfo.add(new HealthCheckInfo(HealthCheckComponent.BE, HealthCheckStatus.DOWN, null, null)); + log.trace("{} Health Check Response code: {}", componentName, beStatus); } - } - if (beStatus != HttpStatus.SC_OK) { - healthCheckStatus = HealthCheckStatus.DOWN; - //Removing the last comma - description = sb.length()>0 - ? sb.substring(0, sb.length()-1) - : "Onboarding is Down, specific reason unknown";//No Amdocs inner component returned DOWN, but the status of Amdocs HC is still DOWN. - if (componentsInfo.size() == 0) { - componentsInfo.add(new HealthCheckInfo(HealthCheckComponent.BE, HealthCheckStatus.DOWN, null, description)); + if (beStatus != HttpStatus.SC_OK) { + healthCheckStatus = HealthCheckStatus.DOWN; + description = aggDescription.length() > 0 + ? aggDescription + : componentName + " is Down, specific reason unknown";//No inner component returned DOWN, but the status of HC is still DOWN. + if (componentsInfo.size() == 0) { + componentsInfo.add(new HealthCheckInfo(Constants.HC_COMPONENT_BE, HealthCheckStatus.DOWN, null, description)); + } + } else { + healthCheckStatus = HealthCheckStatus.UP; + description = "OK"; } - } else { - healthCheckStatus = HealthCheckStatus.UP; - description = "OK"; - } - } catch (Exception e) { - healthCheckStatus = HealthCheckStatus.DOWN; - description = "Onboarding unexpected response: " + e.getMessage(); - componentsInfo.add(new HealthCheckInfo(HealthCheckComponent.BE, HealthCheckStatus.DOWN, null, description)); - } finally { - if (httpClient != null) { - try { - httpClient.close(); - } catch (IOException e) { - e.printStackTrace(); + } catch (Exception e) { + log.error("{} unexpected response: ", componentName, e); + healthCheckStatus = HealthCheckStatus.DOWN; + description = componentName + " unexpected response: " + e.getMessage(); + if (componentsInfo != null && componentsInfo.size() == 0) { + componentsInfo.add(new HealthCheckInfo(Constants.HC_COMPONENT_BE, HealthCheckStatus.DOWN, null, description)); + } + } finally { + if (httpClient != null) { + try { + httpClient.close(); + } catch (IOException e) { + log.error("closing http client has failed" , e); + } } } + } else { + healthCheckStatus = HealthCheckStatus.DOWN; + description = componentName + " health check Configuration is missing"; + componentsInfo.add(new HealthCheckInfo(Constants.HC_COMPONENT_BE, HealthCheckStatus.DOWN, null, description)); } - healthCheckInfos.add(new HealthCheckInfo(HealthCheckComponent.ON_BOARDING, healthCheckStatus, version, description, componentsInfo)); - return healthCheckInfos; + return new HealthCheckInfo(componentName, healthCheckStatus, version, description, componentsInfo); } private CloseableHttpClient getHttpClient() { @@ -371,20 +407,6 @@ public class HealthCheckBusinessLogic { } } - - private boolean getAggregateBeStatus(List beHealthCheckInfos) { - - boolean status = true; - - for (HealthCheckInfo healthCheckInfo : beHealthCheckInfos) { - if (healthCheckInfo.getHealthCheckStatus().equals(HealthCheckStatus.DOWN) && healthCheckInfo.getHealthCheckComponent() != HealthCheckComponent.DE) { - status = false; - break; - } - } - return status; - } - } private void logAlarm(boolean prevHealthState) { @@ -410,8 +432,8 @@ public class HealthCheckBusinessLogic { if (beHealthCheckInfos != null && prevBeHealthCheckInfos != null) { - Map currentValues = beHealthCheckInfos.stream().collect(Collectors.toMap(p -> p.getHealthCheckComponent(), p -> p.getHealthCheckStatus())); - Map prevValues = prevBeHealthCheckInfos.stream().collect(Collectors.toMap(p -> p.getHealthCheckComponent(), p -> p.getHealthCheckStatus())); + Map currentValues = beHealthCheckInfos.stream().collect(Collectors.toMap(p -> p.getHealthCheckComponent(), p -> p.getHealthCheckStatus())); + Map prevValues = prevBeHealthCheckInfos.stream().collect(Collectors.toMap(p -> p.getHealthCheckComponent(), p -> p.getHealthCheckStatus())); if (currentValues != null && prevValues != null) { int currentSize = currentValues.size(); @@ -421,7 +443,7 @@ public class HealthCheckBusinessLogic { result = true; //extra/missing component - Map notPresent = null; + Map notPresent = null; if (currentValues.keySet().containsAll(prevValues.keySet())) { notPresent = new HashMap<>(currentValues); notPresent.keySet().removeAll(prevValues.keySet()); @@ -430,15 +452,15 @@ public class HealthCheckBusinessLogic { notPresent.keySet().removeAll(currentValues.keySet()); } - for (HealthCheckComponent component : notPresent.keySet()) { + for (String component : notPresent.keySet()) { logAlarm(String.format(COMPONENT_CHANGED_MESSAGE, component, prevValues.get(component), currentValues.get(component))); } // HealthCheckComponent changedComponent = notPresent.keySet().iterator().next(); } else { - for (Entry entry : currentValues.entrySet()) { - HealthCheckComponent key = entry.getKey(); + for (Entry entry : currentValues.entrySet()) { + String key = entry.getKey(); HealthCheckStatus value = entry.getValue(); if (!prevValues.containsKey(key)) { @@ -468,15 +490,37 @@ public class HealthCheckBusinessLogic { return result; } - private String buildHealthCheckUrl() { + private String buildOnBoardingHealthCheckUrl() { Configuration.OnboardingConfig onboardingConfig = ConfigurationManager.getConfigurationManager().getConfiguration().getOnboarding(); - String protocol = onboardingConfig.getProtocol(); - String host = onboardingConfig.getHost(); - Integer port = onboardingConfig.getPort(); - String uri = onboardingConfig.getHealthCheckUri(); + if (onboardingConfig != null) { + String protocol = onboardingConfig.getProtocol(); + String host = onboardingConfig.getHost(); + Integer port = onboardingConfig.getPort(); + String uri = onboardingConfig.getHealthCheckUri(); + + return protocol + "://" + host + ":" + port + uri; + } + + log.error("onboarding health check configuration is missing."); + return null; + } + + private String buildDcaeHealthCheckUrl() { + + Configuration.DcaeConfig dcaeConfig = ConfigurationManager.getConfigurationManager().getConfiguration().getDcae(); + + if (dcaeConfig != null) { + String protocol = dcaeConfig.getProtocol(); + String host = dcaeConfig.getHost(); + Integer port = dcaeConfig.getPort(); + String uri = dcaeConfig.getHealthCheckUri(); + + return protocol + "://" + host + ":" + port + uri; + } - return protocol + "://" + host + ":" + port + uri; + log.error("dcae health check configuration is missing."); + return null; } } diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ImportUtils.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ImportUtils.java index 1755d0b20c..01d64f519f 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ImportUtils.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ImportUtils.java @@ -21,7 +21,15 @@ package org.openecomp.sdc.be.components.impl; import java.lang.reflect.Type; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; import java.util.Map.Entry; import java.util.function.Consumer; import java.util.function.Function; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InformationDeployedArtifactsBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InformationDeployedArtifactsBusinessLogic.java index 3b6e0f7a76..52dcce9e2e 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InformationDeployedArtifactsBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InformationDeployedArtifactsBusinessLogic.java @@ -20,31 +20,6 @@ package org.openecomp.sdc.be.components.impl; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.function.Predicate; -import java.util.stream.Collectors; - -import org.apache.commons.codec.binary.Base64; -import org.openecomp.sdc.be.config.ConfigurationManager; -import org.openecomp.sdc.be.config.Configuration.ArtifactTypeConfig; -import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; -import org.openecomp.sdc.be.model.ArtifactDefinition; -import org.openecomp.sdc.be.model.Component; -import org.openecomp.sdc.be.model.ComponentInstance; -import org.openecomp.sdc.be.model.Resource; -import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; -import org.openecomp.sdc.common.api.ArtifactGroupTypeEnum; -import org.openecomp.sdc.common.api.ArtifactTypeEnum; -import org.openecomp.sdc.common.datastructure.Wrapper; -import org.openecomp.sdc.exception.ResponseFormat; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import fj.data.Either; - //Pavel //currently NOT IN USE - there are no informational deployed artifacts after US601880 diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogic.java index 892da8af9d..a9e7f0b34b 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogic.java @@ -20,12 +20,19 @@ package org.openecomp.sdc.be.components.impl; -import java.util.*; +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.Map.Entry; +import java.util.Optional; +import java.util.Set; import java.util.function.BiConsumer; import java.util.stream.Collectors; -import jline.internal.Log; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.MapUtils; import org.json.simple.JSONObject; @@ -50,7 +57,6 @@ import org.openecomp.sdc.be.model.IComponentInstanceConnectedElement; import org.openecomp.sdc.be.model.InputDefinition; import org.openecomp.sdc.be.model.PropertyDefinition; import org.openecomp.sdc.be.model.User; - import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; import org.openecomp.sdc.be.model.operations.impl.DaoStatusConverter; import org.openecomp.sdc.be.model.operations.impl.UniqueIdBuilder; @@ -65,6 +71,7 @@ import org.yaml.snakeyaml.Yaml; import com.google.gson.Gson; import fj.data.Either; +import jline.internal.Log; @Component("inputsBusinessLogic") public class InputsBusinessLogic extends BaseBusinessLogic { @@ -311,6 +318,7 @@ public class InputsBusinessLogic extends BaseBusinessLogic { } currentInput.setDefaultValue(newValue); + currentInput.setOwnerId(userId); Either status = toscaOperationFacade.updateInputOfComponent(component, currentInput); @@ -473,6 +481,7 @@ public class InputsBusinessLogic extends BaseBusinessLogic { } + assignOwnerIdToInputs(userId, inputsToCreate); Either, StorageOperationStatus> assotiateInputsEither = toscaOperationFacade.addInputsToComponent(inputsToCreate, component.getUniqueId()); if(assotiateInputsEither.isRight()){ @@ -524,6 +533,10 @@ public class InputsBusinessLogic extends BaseBusinessLogic { } + private void assignOwnerIdToInputs(String userId, Map inputsToCreate) { + inputsToCreate.values().forEach(inputDefinition -> inputDefinition.setOwnerId(userId)); + } + private StorageOperationStatus addInputsToComponent(String componentId, Map inputsToCreate, Map> inputsValueToCreateMap, Map allDataTypes, List resList, int index, String compInstId, String compInstname, org.openecomp.sdc.be.model.Component origComponent, InputDefinition input) { @@ -642,7 +655,7 @@ public class InputsBusinessLogic extends BaseBusinessLogic { } Map inputs = inputsDefinitions.stream().collect(Collectors.toMap( o -> o.getName(), o -> o)); - result = createInputsInGraph(inputs, component, user, inTransaction); + result = createInputsInGraph(inputs, component); } return result; @@ -669,7 +682,7 @@ public class InputsBusinessLogic extends BaseBusinessLogic { } - public Either, ResponseFormat> createInputsInGraph(Map inputs, org.openecomp.sdc.be.model.Component component, User user, boolean inTransaction) { + public Either, ResponseFormat> createInputsInGraph(Map inputs, org.openecomp.sdc.be.model.Component component) { List resList = inputs.values().stream().collect(Collectors.toList()); Either, ResponseFormat> result = Either.left(resList); @@ -1212,7 +1225,7 @@ public class InputsBusinessLogic extends BaseBusinessLogic { propInput.setOwnerId(null); propInput.setParentUniqueId(null); - Either createInputRes = createInputForComponentInstance(component, origComponent,ci, inputsToCreate, propertiesToCreate, inputsValueToCreate, dataTypes, inputName, propInput, isInputValue); + Either createInputRes = createInputForComponentInstance(component, ci, inputsToCreate, propertiesToCreate, inputsValueToCreate, inputName, propInput, isInputValue); if (createInputRes.isRight()) { log.debug("Failed to create input of resource instance for id {} error {}", compInstId, createInputRes.right().value()); @@ -1235,7 +1248,7 @@ public class InputsBusinessLogic extends BaseBusinessLogic { return Either.left(resList); } - private Either createInputForComponentInstance(org.openecomp.sdc.be.model.Component component,org.openecomp.sdc.be.model.Component orignComponent, ComponentInstance ci, Map inputsToCreate, List propertiesToCreate, List inputsValueToCreate, Map dataTypes, String inputName, ComponentInstancePropInput propInput, boolean isInputValue) { + private Either createInputForComponentInstance(org.openecomp.sdc.be.model.Component component, ComponentInstance ci, Map inputsToCreate, List propertiesToCreate, List inputsValueToCreate, String inputName, ComponentInstancePropInput propInput, boolean isInputValue) { String propertiesName = propInput.getPropertiesName() ; PropertyDefinition selectedProp = propInput.getInput(); String[] parsedPropNames = propInput.getParsedPropNames(); diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PolicyTypeImportManager.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PolicyTypeImportManager.java index 7b55a6988e..4a07120994 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PolicyTypeImportManager.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PolicyTypeImportManager.java @@ -20,7 +20,12 @@ package org.openecomp.sdc.be.components.impl; -import fj.data.Either; +import java.util.List; +import java.util.Map; +import java.util.function.Consumer; + +import javax.annotation.Resource; + import org.apache.commons.lang3.tuple.ImmutablePair; import org.openecomp.sdc.be.components.impl.CommonImportManager.ElementTypeEnum; import org.openecomp.sdc.be.components.impl.ImportUtils.ToscaTagNamesEnum; @@ -34,10 +39,7 @@ import org.openecomp.sdc.exception.ResponseFormat; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import javax.annotation.Resource; -import java.util.List; -import java.util.Map; -import java.util.function.Consumer; +import fj.data.Either; @Component("policyTypeImportManager") public class PolicyTypeImportManager { diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ProductComponentInstanceBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ProductComponentInstanceBusinessLogic.java index 7a7148a6a1..73f72216d2 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ProductComponentInstanceBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ProductComponentInstanceBusinessLogic.java @@ -22,11 +22,8 @@ package org.openecomp.sdc.be.components.impl; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; -import org.openecomp.sdc.exception.ResponseFormat; import org.springframework.stereotype.Component; -import fj.data.Either; - @Component("productComponentInstanceBusinessLogic") public class ProductComponentInstanceBusinessLogic extends ComponentInstanceBusinessLogic { diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PropertyBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PropertyBusinessLogic.java index e16b34f389..ff26ced5c9 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PropertyBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PropertyBusinessLogic.java @@ -20,11 +20,16 @@ package org.openecomp.sdc.be.components.impl; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonElement; -import com.google.gson.reflect.TypeToken; -import fj.data.Either; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.function.Supplier; + +import javax.servlet.ServletContext; + import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.tuple.ImmutablePair; import org.openecomp.sdc.be.config.BeEcompErrorManager; @@ -57,14 +62,12 @@ import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; import org.springframework.web.context.WebApplicationContext; -import javax.servlet.ServletContext; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.function.Supplier; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonElement; +import com.google.gson.reflect.TypeToken; + +import fj.data.Either; @Component("propertyBusinessLogic") public class PropertyBusinessLogic extends BaseBusinessLogic { @@ -229,7 +232,7 @@ public class PropertyBusinessLogic extends BaseBusinessLogic { return Either.right(componentsUtils.getResponseFormat(ActionStatus.PROPERTY_NOT_FOUND, "")); } for (PropertyDefinition property : properties) { - if (property.getUniqueId().equals(propertyId) && isPropertyBelongsToResource(property, resourceId)) { + if (property.getUniqueId().equals(propertyId) ) { Map propMap = new HashMap<>(); propMap.put(property.getName(), property); return Either.left(propMap.entrySet().iterator().next()); diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java index 1ab7ffb007..4924bd25a7 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java @@ -55,6 +55,8 @@ import org.openecomp.sdc.be.components.impl.ImportUtils.ToscaTagNamesEnum; import org.openecomp.sdc.be.components.lifecycle.LifecycleBusinessLogic; import org.openecomp.sdc.be.components.lifecycle.LifecycleChangeInfoWithAction; import org.openecomp.sdc.be.components.lifecycle.LifecycleChangeInfoWithAction.LifecycleChanceActionEnum; +import org.openecomp.sdc.be.components.merge.resource.MergeResourceBLFactory; +import org.openecomp.sdc.be.components.merge.resource.MergeResourceBusinessLogic; import org.openecomp.sdc.be.config.BeEcompErrorManager; import org.openecomp.sdc.be.config.BeEcompErrorManager.ErrorSeverity; import org.openecomp.sdc.be.config.Configuration.VfModuleProperty; @@ -76,6 +78,7 @@ import org.openecomp.sdc.be.info.ArtifactTemplateInfo; import org.openecomp.sdc.be.info.MergedArtifactInfo; import org.openecomp.sdc.be.model.ArtifactDefinition; import org.openecomp.sdc.be.model.CapabilityDefinition; +import org.openecomp.sdc.be.model.CapabilityRequirementRelationship; import org.openecomp.sdc.be.model.CapabilityTypeDefinition; import org.openecomp.sdc.be.model.Component; import org.openecomp.sdc.be.model.ComponentInstance; @@ -97,7 +100,7 @@ import org.openecomp.sdc.be.model.Operation; import org.openecomp.sdc.be.model.ParsedToscaYamlInfo; import org.openecomp.sdc.be.model.PropertyDefinition; import org.openecomp.sdc.be.model.RelationshipImpl; -import org.openecomp.sdc.be.model.RequirementAndRelationshipPair; +import org.openecomp.sdc.be.model.RelationshipInfo; import org.openecomp.sdc.be.model.RequirementCapabilityRelDef; import org.openecomp.sdc.be.model.RequirementDefinition; import org.openecomp.sdc.be.model.Resource; @@ -127,7 +130,6 @@ import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum; import org.openecomp.sdc.be.servlets.RepresentationUtils; import org.openecomp.sdc.be.tosca.CsarUtils; import org.openecomp.sdc.be.tosca.CsarUtils.NonMetaArtifactInfo; -import org.openecomp.sdc.be.tosca.ToscaUtils; import org.openecomp.sdc.be.ui.model.UiComponentDataTransfer; import org.openecomp.sdc.be.user.IUserBusinessLogic; import org.openecomp.sdc.be.user.Role; @@ -215,6 +217,9 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { @Autowired private ApplicationDataTypeCache dataTypeCache; + @Autowired + private MergeResourceBLFactory mergeResourceBLFactory; + private Gson gson = new Gson(); public CsarOperation getCsarOperation() { @@ -539,20 +544,12 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { } Map>> nodeTypesArtifactsToHandle = findNodeTypesArtifactsToHandleRes.left().value(); try{ - result = updateResourceFromYaml(oldRresource, newRresource, updateResource, createdArtifacts, isUpdateYaml, yamlFileName, yamlFileContents, csarInfo, nodeTypesInfo, nodeTypesArtifactsToHandle, null); + result = updateResourceFromYaml(oldRresource, newRresource, updateResource, createdArtifacts, isUpdateYaml, yamlFileName, yamlFileContents, csarInfo, nodeTypesInfo, nodeTypesArtifactsToHandle, null, false); } finally { if (result == null || result.isRight()) { log.warn("operation failed. do rollback"); titanDao.rollback(); - if (!createdArtifacts.isEmpty()) { - StorageOperationStatus deleteFromEsRes = artifactsBusinessLogic.deleteAllComponentArtifactsIfNotOnGraph(createdArtifacts); - if (!deleteFromEsRes.equals(StorageOperationStatus.OK)) { - ActionStatus actionStatus = componentsUtils.convertFromStorageResponse(deleteFromEsRes); - result = Either.right(componentsUtils.getResponseFormat(actionStatus, oldRresource.getName())); - } - log.debug("component and all its artifacts were deleted, id = {}", oldRresource.getName()); - } } else { log.debug("operation success. do commit"); titanDao.commit(); @@ -566,7 +563,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { private Either updateResourceFromYaml(Resource oldRresource, Resource newRresource, AuditingActionEnum updateResource, List createdArtifacts, boolean isUpdateYaml, String yamlFileName, String yamlFileContent, CsarInfo csarInfo, Map nodeTypesInfo, - Map>> nodeTypesArtifactsToHandle, String nodeName) { + Map>> nodeTypesArtifactsToHandle, String nodeName, boolean isNested) { Either result; Either, ResponseFormat> parseNodeTypeInfoYamlEither; boolean inTransaction = true; @@ -586,7 +583,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { if (isUpdateYaml || !nodeTypesArtifactsToHandle.isEmpty()) { - prepareForUpdate = updateExistingResourceByImport(newRresource, oldRresource, csarInfo.getModifier(), inTransaction, shouldLock); + prepareForUpdate = updateExistingResourceByImport(newRresource, oldRresource, csarInfo.getModifier(), inTransaction, shouldLock, isNested); if (prepareForUpdate.isRight()) { log.debug("Failed to prepare resource for update : {}", prepareForUpdate.right().value()); result = Either.right(prepareForUpdate.right().value()); @@ -690,19 +687,35 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { preparedResource = createdCsarArtifactsEither.left().value(); } + ActionStatus mergingPropsAndInputsStatus = mergeResourceEntities(oldRresource, preparedResource); + if (mergingPropsAndInputsStatus != ActionStatus.OK) { + ResponseFormat responseFormat = componentsUtils.getResponseFormatByResource(mergingPropsAndInputsStatus, preparedResource); + return Either.right(responseFormat); + } + Either, ResponseFormat> eitherSetPosition = compositionBusinessLogic.setPositionsForComponentInstances(preparedResource, csarInfo.getModifier().getUserId()); result = eitherSetPosition.isRight() ? Either.right(eitherSetPosition.right().value()) : Either.left(preparedResource); return result; } + + private ActionStatus mergeResourceEntities(Resource oldResource, Resource newResource) { + Either mergeResourceBLEither = mergeResourceBLFactory.getInstance(oldResource, newResource); + if (mergeResourceBLEither.isRight()) { + return mergeResourceBLEither.right().value(); + } + MergeResourceBusinessLogic mergeResourceBusinessLogic = mergeResourceBLEither.left().value(); + return mergeResourceBusinessLogic.mergeResourceEntities(oldResource, newResource); + } + private Either handleResourceGenericType(Resource resource) { Either genericResourceEither = fetchAndSetDerivedFromGenericType(resource); if (genericResourceEither.isRight()) { return genericResourceEither; } if (resource.shouldGenerateInputs()) { - generateInputsFromGenericTypeProperties(resource, genericResourceEither.left().value()); + generateAndAddInputsFromGenericTypeProperties(resource, genericResourceEither.left().value()); } return genericResourceEither; } @@ -715,18 +728,22 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { try { nodeTypesArtifactsToHandleRes = Either.left(nodeTypesArtifactsToHandle); - Map extractedVfcToscaNames = extractVfcToscaNames(nodeTypesInfo, oldResource.getName(), csarInfo); + Map> extractedVfcToscaNames = extractVfcToscaNames(nodeTypesInfo, oldResource.getName(), csarInfo); Either>, ResponseFormat> curNodeTypeArtifactsToHandleRes; EnumMap> curNodeTypeArtifactsToHandle = null; log.debug("Going to fetch node types for resource with name {} during import csar with UUID {}. ", oldResource.getName(), csarInfo.getCsarUUID()); - for (Entry currVfcToscaNameEntry : extractedVfcToscaNames.entrySet()) { - String currVfcToscaName = currVfcToscaNameEntry.getValue(); + for (Entry> currVfcToscaNameEntry : extractedVfcToscaNames.entrySet()) { + String currVfcToscaName = currVfcToscaNameEntry.getValue().getLeft(); + String previousVfcToscaName = currVfcToscaNameEntry.getValue().getRight(); String currNamespace = currVfcToscaNameEntry.getKey(); log.debug("Going to fetch node type with tosca name {}. ", currVfcToscaName); Either curVfcRes = toscaOperationFacade.getLatestByToscaResourceName(currVfcToscaName); Resource curNodeType = null; + if (curVfcRes.isRight() && curVfcRes.right().value() == StorageOperationStatus.NOT_FOUND) { + curVfcRes = toscaOperationFacade.getLatestByToscaResourceName(previousVfcToscaName); + } if (curVfcRes.isRight() && curVfcRes.right().value() != StorageOperationStatus.NOT_FOUND) { log.debug("Error occured during fetching node type with tosca name {}, error: {}", currVfcToscaName, curVfcRes.right().value()); ResponseFormat responseFormat = componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponse(curVfcRes.right().value()), csarInfo.getCsarUUID()); @@ -925,15 +942,15 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { return handleNodeTypeArtifactsRes; } - private Map extractVfcToscaNames(Map nodeTypesInfo, String vfResourceName, CsarInfo csarInfo) { - Map vfcToscaNames = new HashMap<>(); + private Map> extractVfcToscaNames(Map nodeTypesInfo, String vfResourceName, CsarInfo csarInfo) { + Map> vfcToscaNames = new HashMap<>(); Map nodes = extractAllNodes(nodeTypesInfo, csarInfo); if (!nodes.isEmpty()) { Iterator> nodesNameEntry = nodes.entrySet().iterator(); while (nodesNameEntry.hasNext()) { Entry nodeType = nodesNameEntry.next(); - String toscaResourceName = buildNestedToscaResourceName(ResourceTypeEnum.VFC.name(), vfResourceName, nodeType.getKey()); + ImmutablePair toscaResourceName = buildNestedToscaResourceName(ResourceTypeEnum.VFC.name(), vfResourceName, nodeType.getKey()); vfcToscaNames.put(nodeType.getKey(), toscaResourceName); } } @@ -1201,7 +1218,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { vfcCreated = handleNeatedVfcYaml.left().value(); } else if(csarInfo.getCreatedNodesToscaResourceNames()!= null && !csarInfo.getCreatedNodesToscaResourceNames().containsKey(nodeType.getKey())){ log.trace("************* Going to create node {}", nodeType.getKey()); - Either, ResponseFormat> resourceCreated = this.createNodeTypeResourceFromYaml(yamlName, nodeType, csarInfo.getModifier(), mapToConvert, resource, needLock, nodeTypeArtifactsToHandle, nodeTypesNewCreatedArtifacts, true, csarInfo); + Either, ResponseFormat> resourceCreated = this.createNodeTypeResourceFromYaml(yamlName, nodeType, csarInfo.getModifier(), mapToConvert, resource, needLock, nodeTypeArtifactsToHandle, nodeTypesNewCreatedArtifacts, true, csarInfo, true); log.debug("************* Finished to create node {}", nodeType.getKey()); if (resourceCreated.isRight()) { @@ -1257,11 +1274,18 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { if(result == null){ newComplexVfc = buildCvfcRes.left().value(); Either oldComplexVfcRes = toscaOperationFacade.getFullLatestComponentByToscaResourceName(newComplexVfc.getToscaResourceName()); + if(oldComplexVfcRes.isRight() && oldComplexVfcRes.right().value() == StorageOperationStatus.NOT_FOUND){ + oldComplexVfcRes = toscaOperationFacade.getFullLatestComponentByToscaResourceName(buildNestedToscaResourceName(ResourceTypeEnum.CVFC.name(), csarInfo.getVfResourceName(), nodeName).getRight()); + } if(oldComplexVfcRes.isRight() && oldComplexVfcRes.right().value() != StorageOperationStatus.NOT_FOUND){ log.debug("Failed to fetch previous complex VFC by tosca resource name {}. Status is {}. ", newComplexVfc.getToscaResourceName(), oldComplexVfcRes.right().value()); result = Either.right(componentsUtils.getResponseFormat(ActionStatus.GENERAL_ERROR)); } else if(oldComplexVfcRes.isLeft()){ - oldComplexVfc = oldComplexVfcRes.left().value(); + log.debug("validate derived before update"); + Either eitherValidation = validateNestedDerivedFromDuringUpdate(oldComplexVfcRes.left().value(), newComplexVfc, ValidationUtils.hasBeenCertified(oldComplexVfcRes.left().value().getVersion())); + if (eitherValidation.isLeft()) { + oldComplexVfc = oldComplexVfcRes.left().value(); + } } } if(result == null){ @@ -1298,7 +1322,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { log.debug("Failed to create resource {} from YAML {}. ", newComplexVfc.getName(), yamlName); } } else { - handleComplexVfcRes = updateResourceFromYaml(oldComplexVfc, newComplexVfc, AuditingActionEnum.UPDATE_RESOURCE_METADATA, createdArtifacts, true, yamlContent, yamlName, csarInfo, newNodeTypesInfo, nodesArtifactsToHandle, nodeName); + handleComplexVfcRes = updateResourceFromYaml(oldComplexVfc, newComplexVfc, AuditingActionEnum.UPDATE_RESOURCE_METADATA, createdArtifacts, true, yamlContent, yamlName, csarInfo, newNodeTypesInfo, nodesArtifactsToHandle, nodeName, true); if (handleComplexVfcRes.isRight()) { log.debug("Failed to update resource {} from YAML {}. ", oldComplexVfc.getName(), yamlName); } @@ -1335,13 +1359,13 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { } private Either, ResponseFormat> createNodeTypeResourceFromYaml(String yamlName, Entry nodeNameValue, User user, Map mapToConvert, Resource resourceVf, boolean needLock, - Map> nodeTypeArtifactsToHandle, List nodeTypesNewCreatedArtifacts, boolean forceCertificationAllowed, CsarInfo csarInfo) { + Map> nodeTypeArtifactsToHandle, List nodeTypesNewCreatedArtifacts, boolean forceCertificationAllowed, CsarInfo csarInfo, boolean isNested) { Either resourceMetaData = fillResourceMetadata(yamlName, resourceVf, nodeNameValue.getKey(), user); if (resourceMetaData.isRight()) { return Either.right(resourceMetaData.right().value()); } - String singleVfcYaml = buildNodeTypeYaml(nodeNameValue, mapToConvert, resourceMetaData.left().value().getResourceType(), csarInfo.getVfResourceName()); + String singleVfcYaml = buildNodeTypeYaml(nodeNameValue, mapToConvert, resourceMetaData.left().value().getResourceType(), csarInfo); Either eitherCreator = validateUser(user, "CheckIn Resource", resourceVf, AuditingActionEnum.CHECKIN_RESOURCE, true); if (eitherCreator.isRight()) { @@ -1349,10 +1373,10 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { } user = eitherCreator.left().value(); - return this.createResourceFromNodeType(singleVfcYaml, resourceMetaData.left().value(), user, true, needLock, nodeTypeArtifactsToHandle, nodeTypesNewCreatedArtifacts, forceCertificationAllowed, csarInfo); + return this.createResourceFromNodeType(singleVfcYaml, resourceMetaData.left().value(), user, true, needLock, nodeTypeArtifactsToHandle, nodeTypesNewCreatedArtifacts, forceCertificationAllowed, csarInfo, nodeNameValue.getKey(), isNested); } - private String buildNodeTypeYaml(Entry nodeNameValue, Map mapToConvert, String nodeResourceType, String csarVfName) { + private String buildNodeTypeYaml(Entry nodeNameValue, Map mapToConvert, String nodeResourceType, CsarInfo csarInfo) { // We need to create a Yaml from each node_types in order to create // resource from each node type using import normative flow. DumperOptions options = new DumperOptions(); @@ -1360,7 +1384,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { Yaml yaml = new Yaml(options); Map node = new HashMap<>(); - node.put(buildNestedToscaResourceName(nodeResourceType, csarVfName, nodeNameValue.getKey()), nodeNameValue.getValue()); + node.put(buildNestedToscaResourceName(nodeResourceType, csarInfo.getVfResourceName(), nodeNameValue.getKey()).getLeft(), nodeNameValue.getValue()); mapToConvert.put(ToscaTagNamesEnum.NODE_TYPES.getElementName(), node); return yaml.dumpAsMap(mapToConvert); @@ -1376,11 +1400,11 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { } public Either, ResponseFormat> createResourceFromNodeType(String nodeTypeYaml, UploadResourceInfo resourceMetaData, User creator, boolean isInTransaction, boolean needLock, - Map> nodeTypeArtifactsToHandle, List nodeTypesNewCreatedArtifacts, boolean forceCertificationAllowed, CsarInfo csarInfo) { + Map> nodeTypeArtifactsToHandle, List nodeTypesNewCreatedArtifacts, boolean forceCertificationAllowed, CsarInfo csarInfo, String nodeName, boolean isNested) { LifecycleChangeInfoWithAction lifecycleChangeInfo = new LifecycleChangeInfoWithAction("certification on import", LifecycleChanceActionEnum.CREATE_FROM_CSAR); Function> validator = (resource) -> this.validateResourceCreationFromNodeType(resource, creator); - return this.resourceImportManager.importCertifiedResource(nodeTypeYaml, resourceMetaData, creator, validator, lifecycleChangeInfo, isInTransaction, true, needLock, nodeTypeArtifactsToHandle, nodeTypesNewCreatedArtifacts, forceCertificationAllowed, csarInfo); + return this.resourceImportManager.importCertifiedResource(nodeTypeYaml, resourceMetaData, creator, validator, lifecycleChangeInfo, isInTransaction, true, needLock, nodeTypeArtifactsToHandle, nodeTypesNewCreatedArtifacts, forceCertificationAllowed, csarInfo, nodeName, isNested); } private Either fillResourceMetadata(String yamlName, Resource resourceVf, String nodeName, User user) { @@ -1457,7 +1481,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { cvfc.setVendorName(resourceVf.getVendorName()); cvfc.setVendorRelease(resourceVf.getVendorRelease()); cvfc.setResourceVendorModelNumber(resourceVf.getResourceVendorModelNumber()); - cvfc.setToscaResourceName(buildNestedToscaResourceName(ResourceTypeEnum.CVFC.name(), csarInfo.getVfResourceName(), nodeName)); + cvfc.setToscaResourceName(buildNestedToscaResourceName(ResourceTypeEnum.CVFC.name(), csarInfo.getVfResourceName(), nodeName).getLeft()); cvfc.setInvariantUUID(UniqueIdBuilder.buildInvariantUUID()); List tags = new ArrayList<>(); @@ -1521,7 +1545,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { // add groups to resource log.trace("************* Going to add inputs from yaml {}", yamlName); if (resource.shouldGenerateInputs()) - generateInputsFromGenericTypeProperties(resource, genericResourceEither.left().value()); + generateAndAddInputsFromGenericTypeProperties(resource, genericResourceEither.left().value()); Map inputs = parsedToscaYamlInfo.getInputs(); Either createInputsOnResource = createInputsOnResource(resource, csarInfo.getModifier(), inputs, inTransaction); @@ -1599,11 +1623,6 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { titanDao.rollback(); if (!createdArtifacts.isEmpty() || !nodeTypesNewCreatedArtifacts.isEmpty()) { createdArtifacts.addAll(nodeTypesNewCreatedArtifacts); - StorageOperationStatus deleteFromEsRes = artifactsBusinessLogic.deleteAllComponentArtifactsIfNotOnGraph(createdArtifacts); - if (!deleteFromEsRes.equals(StorageOperationStatus.OK)) { - ActionStatus actionStatus = componentsUtils.convertFromStorageResponse(deleteFromEsRes); - return Either.right(componentsUtils.getResponseFormat(actionStatus, resource.getName())); - } log.debug("component and all its artifacts were deleted, id = {}", resource.getName()); } @@ -1720,7 +1739,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { List resourceProperties = resource.getInputs(); if ( (inputs != null && false == inputs.isEmpty()) || (resourceProperties != null && false == resourceProperties.isEmpty()) ) { - Either, ResponseFormat> createInputs = inputsBusinessLogic.createInputsInGraph(inputs, resource, user, inTransaction); + Either, ResponseFormat> createInputs = inputsBusinessLogic.createInputsInGraph(inputs, resource); if (createInputs.isRight()) { return Either.right(createInputs.right().value()); } @@ -2042,12 +2061,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { if (groupsToDelete != null && !groupsToDelete.isEmpty()) { Set artifactsToDelete = new HashSet(); - /* - * for (GroupDefinition group : groupsToDelete) { List artifacts = group.getArtifacts(); if (artifacts != null) { artifactsToDelete.addAll(artifacts); Either deleteGroupEither = - * groupOperation.deleteGroup(group.getUniqueId(), inTransaction); if (deleteGroupEither.isRight()) { StorageOperationStatus storageOperationStatus = deleteGroupEither.right().value(); ActionStatus actionStatus = - * componentsUtils.convertFromStorageResponse(storageOperationStatus); log.debug("Failed to delete group {} under component {}, error: {}", group.getUniqueId(), resource.getNormalizedName(), actionStatus.name()); return - * Either.right(componentsUtils.getResponseFormat(actionStatus)); } } } - */ + for (String artifactId : artifactsToDelete) { Either, ResponseFormat> handleDelete = artifactsBusinessLogic.handleDelete(resource.getUniqueId(), artifactId, csarInfo.getModifier(), AuditingActionEnum.ARTIFACT_DELETE, ComponentTypeEnum.RESOURCE, resource, null, null, shouldLock, inTransaction); @@ -2169,9 +2183,14 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { ////////////////////////////////////// create set parsed ////////////////////////////////////// artifacts/////////////////////////////////////////// Map> parsedArtifactsMap = parseResourceInfoFromYamlEither.left().value(); - Collection> parsedArifactsCollection = parsedArtifactsMap.values(); + Map> parsedGroup = new HashMap>(); - + List artifactsWithoutGroups = null; + if(parsedArtifactsMap.containsKey(ArtifactTemplateInfo.CSAR_ARTIFACT)){ + artifactsWithoutGroups = parsedArtifactsMap.get(ArtifactTemplateInfo.CSAR_ARTIFACT); + parsedArtifactsMap.remove(ArtifactTemplateInfo.CSAR_ARTIFACT); + } + Collection> parsedArifactsCollection = parsedArtifactsMap.values(); for (List parsedGroupTemplateList : parsedArifactsCollection) { for (ArtifactTemplateInfo parsedGroupTemplate : parsedGroupTemplateList) { @@ -2235,7 +2254,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { ////////////// artifacts//////////////////////////// Either assDissotiateEither = associateAndDissociateArtifactsToGroup(csarInfo, resource, createdNewArtifacts, labelCounter, shouldLock, inTransaction, createdDeplymentArtifactsAfterDelete, mergedgroup, deletedArtifacts); - + groups = resource.getGroups(); if (assDissotiateEither.isRight()) { log.debug("Failed to delete artifacts. Status is {} ", assDissotiateEither.right().value()); @@ -2251,7 +2270,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { } } - groups = resource.getGroups(); + // update vfModule names Set groupForAssociateWithMembers = mergedgroup.keySet(); @@ -2331,7 +2350,16 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { } } - + if(artifactsWithoutGroups != null && !artifactsWithoutGroups.isEmpty()){ + for(ArtifactTemplateInfo t: artifactsWithoutGroups){ + List arrtifacts = new ArrayList(); + arrtifacts.add(t); + Either resStatus = createGroupDeploymentArtifactsFromCsar(csarInfo, resource, arrtifacts, createdNewArtifacts, createdDeplymentArtifactsAfterDelete, labelCounter, shouldLock, inTransaction); + if (resStatus.isRight()) + return resStatus; + }; + } + Either eitherGerResource = toscaOperationFacade.getToscaElement(resource.getUniqueId()); if (eitherGerResource.isRight()) { ResponseFormat responseFormat = componentsUtils.getResponseFormatByResource(componentsUtils.convertFromStorageResponse(eitherGerResource.right().value()), resource); @@ -2351,17 +2379,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { for (ArtifactDefinition artifact : artifactsToDelete) { String artifactType = artifact.getArtifactType(); ArtifactTypeEnum artifactTypeEnum = ArtifactTypeEnum.findType(artifactType); - if (artifactTypeEnum == ArtifactTypeEnum.HEAT_ENV) { - - /* - * Either removeArifactFromGraph = artifactOperation.removeArifactFromResource(resourceId, artifact.getUniqueId(), NodeTypeEnum.Resource, true, true); if - * (removeArifactFromGraph.isRight()) { StorageOperationStatus status = removeArifactFromGraph.right().value(); log.debug("Failed to delete heat env artifact {} . status is {}", artifact.getUniqueId(), status); ActionStatus - * actionStatus = componentsUtils.convertFromStorageResponse(status); return Either.right(componentsUtils.getResponseFormat(actionStatus)); } - * - * deletedArtifacts.add(removeArifactFromGraph.left().value()); - */ - - } else { + if (artifactTypeEnum != ArtifactTypeEnum.HEAT_ENV) { Either, ResponseFormat> handleDelete = artifactsBusinessLogic.handleDelete(resourceId, artifact.getUniqueId(), user, AuditingActionEnum.ARTIFACT_DELETE, ComponentTypeEnum.RESOURCE, resource, null, null, shouldLock, inTransaction); if (handleDelete.isRight()) { @@ -2425,8 +2443,9 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { GroupDefinition groupToUpdate = artifactsToUpdateEntry.getKey(); for (ImmutablePair artifact : artifactsToUpdateList) { - String prevUUID = artifact.getKey().getArtifactUUID(); + String prevUUID = artifact.getKey().getArtifactUUID(); String prevId = artifact.getKey().getUniqueId(); + String prevHeatEnvId = checkAndGetHeatEnvId(artifact.getKey()); Either updateArtifactEither = updateDeploymentArtifactsFromCsar(csarInfo, resource, artifact.getKey(), artifact.getValue(), updatedArtifacts, artifact.getRight().getRelatedArtifactsInfo(), shouldLock, inTransaction); if (updateArtifactEither.isRight()) { @@ -2441,6 +2460,13 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { groupToUpdate.getArtifacts().add(artAfterUpdate.getUniqueId()); groupToUpdate.getArtifactsUuid().add(artAfterUpdate.getArtifactUUID()); } + Optional op = updatedArtifacts.stream().filter(p -> p.getGeneratedFromId() != null && p.getGeneratedFromId().equals(artAfterUpdate.getUniqueId())).findAny(); + if (op.isPresent()) { + ArtifactDefinition artifactInfoHeatEnv = op.get(); + groupToUpdate.getArtifacts().remove(prevHeatEnvId); + groupToUpdate.getArtifacts().add(artifactInfoHeatEnv.getUniqueId()); + } + } } } @@ -2521,16 +2547,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { } } - /* - * if (!associateArtifactGroup.isEmpty()) { - * - * log.debug("Try to associate artifacts to groups."); - * - * Either, ResponseFormat> assotiateGroupEither = groupBusinessLogic.associateArtifactsToGroup(resource.getUniqueId(), user.getUserId(), ComponentTypeEnum.RESOURCE, associateArtifactGroup, shouldLock, inTransaction); if - * (assotiateGroupEither.isRight()) { log.debug("Failed to associate artifacts to groups. Status is {} ", assotiateGroupEither.right().value()); resEither = Either.right(assotiateGroupEither.right().value()); return resEither; - * - * } } - */ + ComponentParametersView parametersView = new ComponentParametersView(); parametersView.disableAll(); @@ -3332,6 +3349,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { return resStatus; } ArtifactDefinition currentInfo = uploadArtifactToService.left().value().left().value(); + updatedArtifacts.add(currentInfo); Either updateEnvEither = updateHeatParamsFromCsar(resource, csarInfo, artifactTemplateInfo, currentInfo, true); if (updateEnvEither.isRight()) { @@ -3342,7 +3360,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { // TODO evg update env time ( must be separate US for this!!!!) updatedArtifacts.add(updateEnvEither.left().value()); - resStatus = Either.left(updateEnvEither.left().value()); + resStatus = Either.left(currentInfo); return resStatus; @@ -3359,11 +3377,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { return resStatus; } Either, ResponseFormat> propsStatus = extractHeatParameters(ArtifactTypeEnum.HEAT_ENV.getType(), artifactTemplateInfo.getEnv(), artifactparamsStatus.left().value().getValue(), false); - /* - * if (propsStatus.isRight()) { - * - * resStatus = Either.right(propsStatus.right().value()); return resStatus; } - */ + if (propsStatus.isLeft()) { List updatedHeatEnvParams = propsStatus.left().value(); List currentHeatEnvParams = currentInfo.getListHeatParameters(); @@ -3405,6 +3419,23 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { } } if (isUpdateEnv) { + ComponentParametersView parametersView = new ComponentParametersView(); + parametersView.disableAll(); + parametersView.setIgnoreComponentInstances(false); + parametersView.setIgnoreUsers(false); + parametersView.setIgnoreArtifacts(false); + parametersView.setIgnoreGroups(false); + + Either eitherGerResource = toscaOperationFacade.getToscaElement(resource.getUniqueId(), parametersView); + + if (eitherGerResource.isRight()) { + ResponseFormat responseFormat = componentsUtils.getResponseFormatByResource(componentsUtils.convertFromStorageResponse(eitherGerResource.right().value()), resource); + + resStatus = Either.right(responseFormat); + return resStatus; + + } + resource = eitherGerResource.left().value(); Map artifacts = resource.getDeploymentArtifacts(); Optional op = artifacts.values().stream().filter(p -> p.getGeneratedFromId() != null && p.getGeneratedFromId().equals(currentInfo.getUniqueId())).findAny(); if (op.isPresent()) { @@ -3414,6 +3445,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { log.debug("Failed to update heat env on CSAR flow for component {} artifact {} label {}", resource.getUniqueId(), artifactInfoHeatEnv.getUniqueId(), artifactInfoHeatEnv.getArtifactLabel()); return Either.right(componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponse(updateArifactOnResource.right().value()))); } + resStatus = Either.left(updateArifactOnResource.left().value()); } } return resStatus; @@ -3821,7 +3853,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { String value = null; List getInputs = null; boolean isValidate = true; - if (null != propertyInfo && null != propertyInfo.getValue()) { + if (propertyInfo.getValue() != null) { getInputs = propertyInfo.getGet_input(); isValidate = getInputs == null || getInputs.isEmpty(); if (isValidate) { @@ -3944,10 +3976,10 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { } RequirementDefinition validReq = eitherReqStatus.left().value(); - List reqAndRelationshipPairList = regCapRelDef.getRelationships(); + List reqAndRelationshipPairList = regCapRelDef.getRelationships(); if (reqAndRelationshipPairList == null) - reqAndRelationshipPairList = new ArrayList(); - RequirementAndRelationshipPair reqAndRelationshipPair = new RequirementAndRelationshipPair(); + reqAndRelationshipPairList = new ArrayList<>(); + RelationshipInfo reqAndRelationshipPair = new RelationshipInfo(); reqAndRelationshipPair.setRequirement(regName); reqAndRelationshipPair.setRequirementOwnerId(validReq.getOwnerId()); reqAndRelationshipPair.setRequirementUid(validReq.getUniqueId()); @@ -3982,7 +4014,9 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { reqAndRelationshipPair.setCapability(aviableCapForRel.getName()); reqAndRelationshipPair.setCapabilityUid(aviableCapForRel.getUniqueId()); reqAndRelationshipPair.setCapabilityOwnerId(aviableCapForRel.getOwnerId()); - reqAndRelationshipPairList.add(reqAndRelationshipPair); + CapabilityRequirementRelationship capReqRel = new CapabilityRequirementRelationship(); + capReqRel.setRelation(reqAndRelationshipPair); + reqAndRelationshipPairList.add(capReqRel); regCapRelDef.setRelationships(reqAndRelationshipPairList); relations.add(regCapRelDef); } @@ -4151,8 +4185,6 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { return componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponse(validatevalueEiter.right().value())); } - // String uniqueId = UniqueIdBuilder.buildResourceInstancePropertyValueUid(currentCompInstance.getComponentUid(), index++); - // property.setUniqueId(uniqueId); property.setValue(validatevalueEiter.left().value()); if (getInputs != null && !getInputs.isEmpty()) { @@ -4239,18 +4271,6 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { } } - - // TODO temporary fix - remove specific capability node validation - - // String reqNode = validReq.getNode(); - // if (reqNode != null && !reqNode.isEmpty() && - // !cap.getCapabilitySources().contains(reqNode)) { - // return null; - // } - // RequirementAndRelationshipPair relationPair = getReqRelPair(cap); - // Either eitherStatus = componentInstanceOperation.isAvailableCapabilty(currentCapCompInstance, relationPair); - // if (eitherStatus.isRight() || eitherStatus.left().value() == false) { - // return null; - // } return cap; } @@ -4261,13 +4281,6 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { List capList = capMap.get(validReq.getCapability()); for (CapabilityDefinition cap : capList) { - // TODO temporary fix - remove specific capability node - // String reqNode = validReq.getNode(); - // if (reqNode != null && !reqNode.isEmpty()) { - // if (!cap.getCapabilitySources().contains(reqNode)) { - // continue; - // } - // } if (cap.getMaxOccurrences() != null && !cap.getMaxOccurrences().equals(CapabilityDataDefinition.MAX_OCCURRENCES)) { String leftOccurrences = cap.getLeftOccurrences(); if (leftOccurrences == null) { @@ -5097,7 +5110,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { * createOrUpdateResourceByImport(resource, user, isNormative, false, needLock); } */ - public Either, ResponseFormat> createOrUpdateResourceByImport(Resource resource, User user, boolean isNormative, boolean isInTransaction, boolean needLock, CsarInfo csarInfo) { + public Either, ResponseFormat> createOrUpdateResourceByImport(Resource resource, User user, boolean isNormative, boolean isInTransaction, boolean needLock, CsarInfo csarInfo, String nodeName, boolean isNested) { // check if resource already exist Either latestByName = toscaOperationFacade.getLatestByName(resource.getName()); @@ -5107,10 +5120,22 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { if (latestByName.isRight() && latestByName.right().value().equals(StorageOperationStatus.NOT_FOUND)) { Either latestByToscaName = toscaOperationFacade.getLatestByToscaResourceName(resource.getToscaResourceName()); - if (latestByToscaName.isRight() && latestByToscaName.right().value().equals(StorageOperationStatus.NOT_FOUND)) + if (csarInfo!= null && csarInfo.isUpdate() && nodeName != null && latestByToscaName.isRight() && latestByToscaName.right().value().equals(StorageOperationStatus.NOT_FOUND)){ + latestByToscaName = toscaOperationFacade.getLatestByToscaResourceName(buildNestedToscaResourceName(resource.getResourceType().name(), csarInfo.getVfResourceName(), nodeName).getRight()); + // update + if (latestByToscaName.isLeft()) { + log.debug("validate derived before update"); + Either eitherValidation = validateNestedDerivedFromDuringUpdate(latestByToscaName.left().value(), resource, ValidationUtils.hasBeenCertified(latestByToscaName.left().value().getVersion())); + if (eitherValidation.isRight()) { + result = createResourceByImport(resource, user, isNormative, isInTransaction, csarInfo); + } else { + result = updateExistingResourceByImport(resource, latestByToscaName.left().value(), user, isNormative, needLock, isNested); + } + } + } + if (result == null && latestByToscaName.isRight() && latestByToscaName.right().value().equals(StorageOperationStatus.NOT_FOUND)){ result = createResourceByImport(resource, user, isNormative, isInTransaction, csarInfo); - - else { + } else if (result == null){ StorageOperationStatus status = latestByName.right().value(); BeEcompErrorManager.getInstance().logBeComponentMissingError("Create / Update resource by import", ComponentTypeEnum.RESOURCE.getValue(), resource.getName()); log.debug("resource already exist {}. status={}", resource.getName(), status); @@ -5123,7 +5148,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { // update else if (latestByName.isLeft()) { - result = updateExistingResourceByImport(resource, latestByName.left().value(), user, isNormative, needLock); + result = updateExistingResourceByImport(resource, latestByName.left().value(), user, isNormative, needLock, isNested); } // error @@ -5160,7 +5185,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { return latestByName.isLeft(); } - private Either, ResponseFormat> updateExistingResourceByImport(Resource newResource, Resource oldResource, User user, boolean inTransaction, boolean needLock) { + private Either, ResponseFormat> updateExistingResourceByImport(Resource newResource, Resource oldResource, User user, boolean inTransaction, boolean needLock, boolean isNested) { String lockedResourceId = oldResource.getUniqueId(); log.debug("found resource: name={}, id={}, version={}, state={}", oldResource.getName(), lockedResourceId, oldResource.getVersion(), oldResource.getLifecycleState()); Either, ResponseFormat> result = null; @@ -5184,7 +5209,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { mergeOldResourceMetadataWithNew(oldResource, newResource); - Either validateFieldsResponse = validateResourceFieldsBeforeUpdate(oldResource, newResource, inTransaction); + Either validateFieldsResponse = validateResourceFieldsBeforeUpdate(oldResource, newResource, inTransaction, isNested); if (validateFieldsResponse.isRight()) { result = Either.right(validateFieldsResponse.right().value()); return result; @@ -5211,7 +5236,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { newResource.setSystemName(oldResource.getSystemName()); if (oldResource.getCsarUUID() != null) { newResource.setCsarUUID(oldResource.getCsarUUID()); - } + } if (oldResource.getImportedToscaChecksum() != null) { newResource.setImportedToscaChecksum(oldResource.getImportedToscaChecksum()); } @@ -5957,7 +5982,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { } //endregion - Either validateResourceFields = validateResourceFieldsBeforeUpdate(currentResource, newResource, inTransaction); + Either validateResourceFields = validateResourceFieldsBeforeUpdate(currentResource, newResource, inTransaction, false); if (validateResourceFields.isRight()) { return Either.right(validateResourceFields.right().value()); } @@ -6117,15 +6142,16 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { * validateResourceFieldsBeforeUpdate * * @param currentResource - Resource object to validate + * @param isNested * @return Either */ - private Either validateResourceFieldsBeforeUpdate(Resource currentResource, Resource updateInfoResource, boolean inTransaction) { + private Either validateResourceFieldsBeforeUpdate(Resource currentResource, Resource updateInfoResource, boolean inTransaction, boolean isNested) { boolean hasBeenCertified = ValidationUtils.hasBeenCertified(currentResource.getVersion()); // validate resource name log.debug("validate resource name before update"); - Either eitherValidation = validateResourceName(currentResource, updateInfoResource, hasBeenCertified); + Either eitherValidation = validateResourceName(currentResource, updateInfoResource, hasBeenCertified, isNested); if (eitherValidation.isRight()) { return eitherValidation; } @@ -6314,10 +6340,10 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { return resourceName+"Cvfc"; } - private Either validateResourceName(Resource currentResource, Resource updateInfoResource, boolean hasBeenCertified) { + private Either validateResourceName(Resource currentResource, Resource updateInfoResource, boolean hasBeenCertified, boolean isNested) { String resourceNameUpdated = updateInfoResource.getName(); if (!isResourceNameEquals(currentResource, updateInfoResource)) { - if (!hasBeenCertified) { + if (isNested || !hasBeenCertified) { Either validateResourceNameResponse = validateComponentName(null, updateInfoResource, null); if (validateResourceNameResponse.isRight()) { ResponseFormat errorResponse = validateResourceNameResponse.right().value(); @@ -6449,6 +6475,36 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { } return Either.left(true); } + + private Either validateNestedDerivedFromDuringUpdate(Resource currentResource, Resource updateInfoResource, boolean hasBeenCertified) { + + List currentDerivedFrom = currentResource.getDerivedFrom(); + List updatedDerivedFrom = updateInfoResource.getDerivedFrom(); + if (currentDerivedFrom == null || currentDerivedFrom.isEmpty() || updatedDerivedFrom == null || updatedDerivedFrom.isEmpty()) { + log.trace("Update normative types"); + return Either.left(true); + } + + String derivedFromCurrent = currentDerivedFrom.get(0); + String derivedFromUpdated = updatedDerivedFrom.get(0); + + if (!derivedFromCurrent.equals(derivedFromUpdated)) { + if (!hasBeenCertified) { + Either validateDerivedFromExistsEither = validateDerivedFromExist(null, updateInfoResource, null); + if (validateDerivedFromExistsEither.isRight()) { + return validateDerivedFromExistsEither; + } + } else { + Either validateDerivedFromExtending = validateDerivedFromExtending(null, currentResource, updateInfoResource, null); + + if (validateDerivedFromExtending.isRight() || !validateDerivedFromExtending.left().value()) { + log.debug("Derived from cannot be updated if it doesnt inherits directly or extends inheritance"); + return validateDerivedFromExtending; + } + } + } + return Either.left(true); + } private Either validateDerivedFromExist(User user, Resource resource, AuditingActionEnum actionEnum) { @@ -7309,9 +7365,10 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { } - private String buildNestedToscaResourceName(String nodeResourceType, String vfResourceName, String nodeTypeFullName) { + private ImmutablePair buildNestedToscaResourceName(String nodeResourceType, String vfResourceName, String nodeTypeFullName) { String actualType; String actualVfName; + String actualPreviousVfName; if(ResourceTypeEnum.CVFC.name().equals(nodeResourceType)){ actualVfName = vfResourceName + ResourceTypeEnum.CVFC.name(); actualType = ResourceTypeEnum.VFC.name(); @@ -7319,6 +7376,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { actualVfName = vfResourceName; actualType = nodeResourceType; } + StringBuilder toscaResourceName = new StringBuilder(Constants.USER_DEFINED_RESOURCE_NAMESPACE_PREFIX); String nameWithouNamespacePrefix = nodeTypeFullName.substring(Constants.USER_DEFINED_RESOURCE_NAMESPACE_PREFIX.length()); String[] findTypes = nameWithouNamespacePrefix.split("\\."); @@ -7330,7 +7388,8 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { } else { toscaResourceName.append(actualType.toLowerCase()).append('.').append(ValidationUtils.convertToSystemName(actualVfName)).append('.').append(Constants.ABSTRACT); } - return toscaResourceName.append(actualName.toLowerCase()).toString(); + StringBuilder previousToscaResourceName = new StringBuilder(toscaResourceName); + return new ImmutablePair<>(toscaResourceName.append(actualName.toLowerCase()).toString(), previousToscaResourceName.append(actualName.substring(actualName.split("\\.")[1].length() + 1).toLowerCase()).toString()); } public ICacheMangerOperation getCacheManagerOperation() { diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceImportManager.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceImportManager.java index b21195ff42..7ed90ce3b6 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceImportManager.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceImportManager.java @@ -20,7 +20,22 @@ package org.openecomp.sdc.be.components.impl; -import fj.data.Either; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.EnumMap; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.function.Function; +import java.util.regex.Pattern; +import java.util.stream.Collectors; + +import javax.servlet.ServletContext; + import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.ImmutablePair; import org.openecomp.sdc.be.auditing.api.IAuditingManager; @@ -38,7 +53,17 @@ import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; import org.openecomp.sdc.be.impl.ComponentsUtils; import org.openecomp.sdc.be.impl.WebAppContextWrapper; -import org.openecomp.sdc.be.model.*; +import org.openecomp.sdc.be.model.ArtifactDefinition; +import org.openecomp.sdc.be.model.CapabilityDefinition; +import org.openecomp.sdc.be.model.ComponentInstanceProperty; +import org.openecomp.sdc.be.model.CsarInfo; +import org.openecomp.sdc.be.model.InterfaceDefinition; +import org.openecomp.sdc.be.model.LifecycleStateEnum; +import org.openecomp.sdc.be.model.PropertyDefinition; +import org.openecomp.sdc.be.model.RequirementDefinition; +import org.openecomp.sdc.be.model.Resource; +import org.openecomp.sdc.be.model.UploadResourceInfo; +import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.be.model.category.CategoryDefinition; import org.openecomp.sdc.be.model.category.SubCategoryDefinition; import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade; @@ -57,20 +82,7 @@ import org.springframework.stereotype.Component; import org.springframework.web.context.WebApplicationContext; import org.yaml.snakeyaml.Yaml; -import javax.servlet.ServletContext; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.EnumMap; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; -import java.util.function.Function; -import java.util.regex.Pattern; -import java.util.stream.Collectors; +import fj.data.Either; @Component("resourceImportManager") public class ResourceImportManager { @@ -110,7 +122,7 @@ public class ResourceImportManager { lifecycleChangeInfo.setUserRemarks("certification on import"); Function> validator = (resource) -> resourceBusinessLogic.validatePropertiesDefaultValues(resource); - return importCertifiedResource(resourceYml, resourceMetaData, creator, validator, lifecycleChangeInfo, false, createNewVersion, needLock, null, null, false, null); + return importCertifiedResource(resourceYml, resourceMetaData, creator, validator, lifecycleChangeInfo, false, createNewVersion, needLock, null, null, false, null, null, false); } public Either, ResponseFormat> importNormativeResourceFromCsar(String resourceYml, UploadResourceInfo resourceMetaData, User creator, boolean createNewVersion, boolean needLock) { @@ -119,11 +131,11 @@ public class ResourceImportManager { lifecycleChangeInfo.setUserRemarks("certification on import"); Function> validator = (resource) -> resourceBusinessLogic.validatePropertiesDefaultValues(resource); - return importCertifiedResource(resourceYml, resourceMetaData, creator, validator, lifecycleChangeInfo, false, createNewVersion, needLock, null, null, false, null); + return importCertifiedResource(resourceYml, resourceMetaData, creator, validator, lifecycleChangeInfo, false, createNewVersion, needLock, null, null, false, null, null, false); } public Either, ResponseFormat> importCertifiedResource(String resourceYml, UploadResourceInfo resourceMetaData, User creator, Function> validationFunction, - LifecycleChangeInfoWithAction lifecycleChangeInfo, boolean isInTransaction, boolean createNewVersion, boolean needLock, Map> nodeTypeArtifactsToHandle, List nodeTypesNewCreatedArtifacts, boolean forceCertificationAllowed, CsarInfo csarInfo) { + LifecycleChangeInfoWithAction lifecycleChangeInfo, boolean isInTransaction, boolean createNewVersion, boolean needLock, Map> nodeTypeArtifactsToHandle, List nodeTypesNewCreatedArtifacts, boolean forceCertificationAllowed, CsarInfo csarInfo, String nodeName, boolean isNested) { Resource resource = new Resource(); ImmutablePair responsePair = new ImmutablePair<>(resource, ActionStatus.CREATED); Either, ResponseFormat> response = Either.left(responsePair); @@ -152,7 +164,7 @@ public class ResourceImportManager { } } - response = resourceBusinessLogic.createOrUpdateResourceByImport(resource, creator, true, isInTransaction, needLock, csarInfo); + response = resourceBusinessLogic.createOrUpdateResourceByImport(resource, creator, true, isInTransaction, needLock, csarInfo, nodeName, isNested); Either changeStateResponse; if (response.isLeft()) { resource = response.left().value().left; @@ -240,7 +252,7 @@ public class ResourceImportManager { Either validatePropertiesTypes = resourceBusinessLogic.validatePropertiesDefaultValues(resource); if (validatePropertiesTypes.isLeft()) { - response = resourceBusinessLogic.createOrUpdateResourceByImport(resource, creator, false, isInTransaction, true, null); + response = resourceBusinessLogic.createOrUpdateResourceByImport(resource, creator, false, isInTransaction, true, null, null, false); } else { ResponseFormat validationErrorResponse = validatePropertiesTypes.right().value(); auditErrorImport(resourceMetaData, creator, validationErrorResponse, false); diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResponseFormatManager.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResponseFormatManager.java index e8c0bf3d8a..136121484d 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResponseFormatManager.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResponseFormatManager.java @@ -20,13 +20,11 @@ package org.openecomp.sdc.be.components.impl; -import org.openecomp.sdc.be.config.BeEcompErrorManager; import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.config.ErrorConfiguration; import org.openecomp.sdc.be.config.ErrorInfo; import org.openecomp.sdc.be.config.ErrorInfo.ErrorInfoType; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.common.config.EcompErrorName; import org.openecomp.sdc.exception.OkResponseInfo; import org.openecomp.sdc.exception.PolicyException; import org.openecomp.sdc.exception.ResponseFormat; @@ -60,7 +58,6 @@ public class ResponseFormatManager { ErrorConfiguration errorConfiguration = configurationManager.getErrorConfiguration(); ErrorInfo errorInfo = errorConfiguration.getErrorInfo(responseEnum.name()); if (errorInfo == null) { - BeEcompErrorManager.getInstance().processEcompError(EcompErrorName.EcompErrorNotFound, "ResponseFormatManager", responseEnum.name()); log.debug("failed to locate {} in error configuration", responseEnum.name()); errorInfo = errorConfiguration.getErrorInfo(ActionStatus.GENERAL_ERROR.name()); } diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceBusinessLogic.java index 89c444b6d9..23852c30a2 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceBusinessLogic.java @@ -23,7 +23,6 @@ package org.openecomp.sdc.be.components.impl; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collection; import java.util.Collections; import java.util.EnumMap; import java.util.HashMap; @@ -359,7 +358,7 @@ public class ServiceBusinessLogic extends ComponentBusinessLogic { if (genericServiceEither.isRight()) return Either.right(genericServiceEither.right().value()); - generateInputsFromGenericTypeProperties(service, genericServiceEither.left().value()); + generateAndAddInputsFromGenericTypeProperties(service, genericServiceEither.left().value()); Either dataModelResponse = toscaOperationFacade.createToscaComponent(service); @@ -711,7 +710,7 @@ public class ServiceBusinessLogic extends ComponentBusinessLogic { String uuidUpdated = serviceUpdate.getUUID(); String uuidCurrent = currentService.getUUID(); if (!uuidCurrent.equals(uuidUpdated)) { - log.info("update srvice: recived request to update uuid to {} the field is not updatable ignoring.", uuidUpdated); + log.info("update service: recived request to update uuid to {} the field is not updatable ignoring.", uuidUpdated); } response = validateAndUpdateServiceType(user, currentService, serviceUpdate, null); @@ -734,7 +733,9 @@ public class ServiceBusinessLogic extends ComponentBusinessLogic { serviceUpdate.setInvariantUUID(currentInvariantUuid); } validateAndUpdateEcompNaming(currentService, serviceUpdate); - + + currentService.setEnvironmentContext(serviceUpdate.getEnvironmentContext()); + return Either.left(currentService); } @@ -1508,7 +1509,7 @@ public class ServiceBusinessLogic extends ComponentBusinessLogic { return vfModuleAertifact; } - private void fillVfModuleInstHeatEnvPayload(List groupsForCurrVF, ComponentInstance currVFInstance, Wrapper payloadWrapper) { + private void fillVfModuleInstHeatEnvPayload(List groupsForCurrVF, Wrapper payloadWrapper) { // Converts GroupDefinition to VfModuleArtifactPayload which is the // format used in the payload @@ -1531,37 +1532,13 @@ public class ServiceBusinessLogic extends ComponentBusinessLogic { } - private void addHeatEnvArtifactsToVFModulePayload(VfModuleArtifactPayload vfModulePayload, ComponentInstance currVFInstance) { - List originalModuleArtifacts = vfModulePayload.getArtifacts(); - if (!MapUtils.isEmpty(currVFInstance.getDeploymentArtifacts()) && !CollectionUtils.isEmpty(originalModuleArtifacts)) { - - // EVG : fix now for patch. remove null from list. Need to be fixed later : remove VF HEAT ENV uuid from the list?? - List filteredUUIDFromModule = originalModuleArtifacts.stream().filter(uuid -> uuid != null).collect(Collectors.toList()); - - final Collection depInsArtifacts = currVFInstance.getDeploymentArtifacts().values(); - // All Heat_ENV - List heatEnvArtifacts = depInsArtifacts.stream().filter(art -> art.getArtifactType().equals(ArtifactTypeEnum.HEAT_ENV.getType())).collect(Collectors.toList()); - // Unique Id Of Artifacts In the vf module - List moduleArtUniqueId = depInsArtifacts.stream().filter(art -> originalModuleArtifacts.contains(art.getArtifactUUID())).map(art -> art.getUniqueId()).collect(Collectors.toList()); - // Collect Only Heat Artifatcs that are Generated from artifacts in - // the module - List relevantHeatEnvUUID = heatEnvArtifacts.stream().filter(heatEnv -> moduleArtUniqueId.contains(heatEnv.getGeneratedFromId())).map(heatEnv -> heatEnv.getArtifactUUID()).collect(Collectors.toList()); - - List fullArtifactList = new ArrayList<>(); - fullArtifactList.addAll(filteredUUIDFromModule); - fullArtifactList.addAll(relevantHeatEnvUUID); - - vfModulePayload.setArtifacts(fullArtifactList); - } - } - private Either generateVfModuleInstanceArtifact(User modifier, ComponentInstance currVFInstance, Service service, boolean shouldLock) { ArtifactDefinition vfModuleAertifact = null; Wrapper responseWrapper = new Wrapper<>(); Wrapper payloadWrapper = new Wrapper<>(); List groupsForCurrVF = collectGroupsInstanceForCompInstance(currVFInstance, responseWrapper); if (responseWrapper.isEmpty()) { - fillVfModuleInstHeatEnvPayload(groupsForCurrVF, currVFInstance, payloadWrapper); + fillVfModuleInstHeatEnvPayload(groupsForCurrVF, payloadWrapper); } if (responseWrapper.isEmpty() && payloadWrapper.getInnerElement() != null) { vfModuleAertifact = getVfModuleInstArtifactForCompInstance(currVFInstance, service, modifier, groupsForCurrVF, payloadWrapper, responseWrapper); @@ -1694,7 +1671,7 @@ public class ServiceBusinessLogic extends ComponentBusinessLogic { @Override public Either call() throws Exception { - return artifactsBusinessLogic.generateHeatEnvArtifact(artifactDefinition, ComponentTypeEnum.RESOURCE_INSTANCE, service, resourceInstanceName, modifier, shouldLock, instanceId); + return artifactsBusinessLogic.forceGenerateHeatEnvArtifact(artifactDefinition, ComponentTypeEnum.RESOURCE_INSTANCE, service, resourceInstanceName, modifier, shouldLock, instanceId); } public ArtifactDefinition getArtifactDefinition() { diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/VFComponentInstanceBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/VFComponentInstanceBusinessLogic.java index 5a93ecf182..c5db7ee022 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/VFComponentInstanceBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/VFComponentInstanceBusinessLogic.java @@ -20,19 +20,12 @@ package org.openecomp.sdc.be.components.impl; -import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; -import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; -import org.openecomp.sdc.be.model.Resource; -import org.openecomp.sdc.be.tosca.ToscaUtils; -import org.openecomp.sdc.exception.ResponseFormat; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; -import fj.data.Either; - @Component("vfComponentInstanceBusinessLogic") public class VFComponentInstanceBusinessLogic extends ComponentInstanceBusinessLogic { diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/generic/GenericTypeBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/generic/GenericTypeBusinessLogic.java new file mode 100644 index 0000000000..7f6abe7f2c --- /dev/null +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/generic/GenericTypeBusinessLogic.java @@ -0,0 +1,91 @@ +package org.openecomp.sdc.be.components.impl.generic; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +import org.apache.commons.collections.CollectionUtils; +import org.openecomp.sdc.be.dao.api.ActionStatus; +import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; +import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; +import org.openecomp.sdc.be.impl.ComponentsUtils; +import org.openecomp.sdc.be.model.Component; +import org.openecomp.sdc.be.model.InputDefinition; +import org.openecomp.sdc.be.model.PropertyDefinition; +import org.openecomp.sdc.be.model.Resource; +import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade; +import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; +import org.openecomp.sdc.exception.ResponseFormat; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; + +import fj.data.Either; + +@org.springframework.stereotype.Component +public class GenericTypeBusinessLogic { + + private final static Logger log = LoggerFactory.getLogger(GenericTypeBusinessLogic.class); + + @Autowired + private ComponentsUtils componentsUtils; + + @Autowired + private ToscaOperationFacade toscaOperationFacade; + + /** + * @param component the component of which to fetch its generic type + * @return the generic node type which corresponds to the given component + */ + public Either fetchDerivedFromGenericType(Component component){ + String genericTypeToscaName = getGenericTypeToscaName(component); + log.debug("Fetching generic tosca name {}", genericTypeToscaName); + if(null == genericTypeToscaName) { + log.debug("Failed to fetch certified generic node type for component {}", component.getName()); + return Either.right(componentsUtils.getResponseFormat(ActionStatus.GENERAL_ERROR)); + } + + Either findLatestGeneric = toscaOperationFacade.getLatestCertifiedNodeTypeByToscaResourceName(genericTypeToscaName); + if(findLatestGeneric.isRight()){ + log.debug("Failed to fetch certified node type by tosca resource name {}", genericTypeToscaName); + return Either.right(componentsUtils.getResponseFormat(ActionStatus.GENERIC_TYPE_NOT_FOUND, component.assetType(), genericTypeToscaName)); + } + + Resource genericTypeResource = findLatestGeneric.left().value(); + return Either.left(genericTypeResource); + } + + /** + * + * @param genericType the generic node type + * @return the generic type properties as inputs + */ + public List generateInputsFromGenericTypeProperties(Resource genericType) { + List genericTypeProps = genericType.getProperties(); + if(null != genericTypeProps) { + return convertGenericTypePropertiesToInputsDefintion(genericTypeProps, genericType.getUniqueId()); + } + return new ArrayList<>(); + } + + public List convertGenericTypePropertiesToInputsDefintion(List genericTypeProps, String genericUniqueId) { + return genericTypeProps.stream() + .map(p -> setInputDefinitionFromProp(p, genericUniqueId)) + .collect(Collectors.toList()); + } + + private InputDefinition setInputDefinitionFromProp(PropertyDefinition prop, String genericUniqueId){ + InputDefinition input = new InputDefinition(prop); + input.setOwnerId(genericUniqueId); + return input; + } + + private String getGenericTypeToscaName(T component) { + return isCvfcHasDerivedFrom(component) ? ((Resource)component).getDerivedFrom().get(0) : component.fetchGenericTypeToscaNameFromConfig(); + } + + private boolean isCvfcHasDerivedFrom(T component) { + return component.getComponentType() == ComponentTypeEnum.RESOURCE && ((Resource)component).getResourceType() == ResourceTypeEnum.CVFC && CollectionUtils.isNotEmpty(((Resource)component).getDerivedFrom()); + } + +} diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/CertificationChangeTransition.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/CertificationChangeTransition.java index 0e0f6f9464..47e494f66d 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/CertificationChangeTransition.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/CertificationChangeTransition.java @@ -21,6 +21,7 @@ package org.openecomp.sdc.be.components.lifecycle; import java.util.Arrays; + import org.openecomp.sdc.be.components.impl.ArtifactsBusinessLogic; import org.openecomp.sdc.be.components.impl.ComponentBusinessLogic; import org.openecomp.sdc.be.config.BeEcompErrorManager; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/CertificationRequestTransition.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/CertificationRequestTransition.java index d12afdbd55..4a7f446739 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/CertificationRequestTransition.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/CertificationRequestTransition.java @@ -20,7 +20,14 @@ package org.openecomp.sdc.be.components.lifecycle; -import fj.data.Either; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Optional; +import java.util.Set; + import org.openecomp.sdc.be.components.distribution.engine.ServiceDistributionArtifactsBuilder; import org.openecomp.sdc.be.components.impl.ComponentBusinessLogic; import org.openecomp.sdc.be.components.impl.ServiceBusinessLogic; @@ -32,7 +39,15 @@ import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; import org.openecomp.sdc.be.datatypes.enums.OriginTypeEnum; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; import org.openecomp.sdc.be.impl.ComponentsUtils; -import org.openecomp.sdc.be.model.*; +import org.openecomp.sdc.be.model.ArtifactDefinition; +import org.openecomp.sdc.be.model.Component; +import org.openecomp.sdc.be.model.ComponentInstance; +import org.openecomp.sdc.be.model.LifeCycleTransitionEnum; +import org.openecomp.sdc.be.model.LifecycleStateEnum; +import org.openecomp.sdc.be.model.Operation; +import org.openecomp.sdc.be.model.Resource; +import org.openecomp.sdc.be.model.Service; +import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.be.model.jsontitan.datamodel.ToscaElement; import org.openecomp.sdc.be.model.jsontitan.datamodel.ToscaElementTypeEnum; import org.openecomp.sdc.be.model.jsontitan.operations.ToscaElementLifecycleOperation; @@ -48,14 +63,7 @@ import org.openecomp.sdc.exception.ResponseFormat; 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.Map.Entry; -import java.util.Optional; -import java.util.Set; +import fj.data.Either; public class CertificationRequestTransition extends LifeCycleTransition { @@ -229,12 +237,12 @@ public class CertificationRequestTransition extends LifeCycleTransition { } finally { if (result == null || result.isRight()) { BeEcompErrorManager.getInstance().logBeDaoSystemError("Change LifecycleState"); - if (inTransaction == false) { + if (!inTransaction) { log.debug("operation failed. do rollback"); titanDao.rollback(); } } else { - if (inTransaction == false) { + if (!inTransaction) { log.debug("operation success. do commit"); titanDao.commit(); } diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/CheckoutTransition.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/CheckoutTransition.java index 14f54e4c19..b7983b1174 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/CheckoutTransition.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/CheckoutTransition.java @@ -21,10 +21,7 @@ package org.openecomp.sdc.be.components.lifecycle; import java.util.Arrays; -import java.util.Collection; import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; import org.openecomp.sdc.be.components.impl.ComponentBusinessLogic; import org.openecomp.sdc.be.config.BeEcompErrorManager; @@ -32,22 +29,17 @@ import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.jsongraph.TitanDao; import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; -import org.openecomp.sdc.be.datatypes.elements.ComponentInstanceDataDefinition; -import org.openecomp.sdc.be.datatypes.elements.MapPropertiesDataDefinition; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields; -import org.openecomp.sdc.be.datatypes.enums.OriginTypeEnum; import org.openecomp.sdc.be.impl.ComponentsUtils; import org.openecomp.sdc.be.model.Component; import org.openecomp.sdc.be.model.InputDefinition; import org.openecomp.sdc.be.model.LifeCycleTransitionEnum; import org.openecomp.sdc.be.model.LifecycleStateEnum; import org.openecomp.sdc.be.model.User; -import org.openecomp.sdc.be.model.jsontitan.datamodel.TopologyTemplate; import org.openecomp.sdc.be.model.jsontitan.datamodel.ToscaElement; import org.openecomp.sdc.be.model.jsontitan.datamodel.ToscaElementTypeEnum; import org.openecomp.sdc.be.model.jsontitan.operations.ToscaElementLifecycleOperation; -import org.openecomp.sdc.be.model.jsontitan.operations.ToscaElementOperation; import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade; import org.openecomp.sdc.be.model.jsontitan.utils.ModelConverter; import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; @@ -108,11 +100,22 @@ public class CheckoutTransition extends LifeCycleTransition { } else { Component clonedComponent = ModelConverter.convertFromToscaElement(checkoutResourceResult.left().value()); + if ( checkoutResourceResult.left().value().getToscaType() == ToscaElementTypeEnum.NodeType ){ + Either upgradeToLatestDerived = componentBl.shouldUpgradeToLatestDerived(clonedComponent); + if (upgradeToLatestDerived.isRight() && ActionStatus.OK != upgradeToLatestDerived.right().value()){ + result = Either.right(componentUtils.getResponseFormat(upgradeToLatestDerived.right().value())); + return result; + } + if ( upgradeToLatestDerived.isLeft() ){ + //get resource after update derived + clonedComponent = upgradeToLatestDerived.left().value(); + } + } result = Either.left(clonedComponent); Either upgradeToLatestGeneric = componentBl.shouldUpgradeToLatestGeneric(clonedComponent); if (upgradeToLatestGeneric.isRight()) result = Either.right(upgradeToLatestGeneric.right().value()); - else if (upgradeToLatestGeneric.left().value()) { + else if (upgradeToLatestGeneric.left().value() ) { StorageOperationStatus response = upgradeToLatestGenericData(clonedComponent); if (StorageOperationStatus.OK != response) { ActionStatus actionStatus = componentUtils.convertFromStorageResponse(response); diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/LifeCycleTransition.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/LifeCycleTransition.java index cc534bb694..87e8175960 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/LifeCycleTransition.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/LifeCycleTransition.java @@ -145,10 +145,12 @@ public abstract class LifeCycleTransition { if (getAuthorizedRoles(componentType).contains(Role.valueOf(modifier.getRole())) || userResourceRoleValidation(component,componentType,modifier)) { return Either.left(true); } - // this is only when creating vfc/cp when import vf from csar - when we + // this is only used in 2 cases + //1. when creating vfc/cp when import vf from csar - when we // create resources from node type, we create need to change the state // to certified - if (lifecycleChangeInfo != null && lifecycleChangeInfo.getAction() != null && lifecycleChangeInfo.getAction() == LifecycleChanceActionEnum.CREATE_FROM_CSAR) { + //2. certification flow upno upgrade migration + if (lifecycleChangeInfo != null && lifecycleChangeInfo.getAction() != null && (lifecycleChangeInfo.getAction() == LifecycleChanceActionEnum.CREATE_FROM_CSAR|| lifecycleChangeInfo.getAction() == LifecycleChanceActionEnum.UPGRADE_MIGRATION)) { return Either.left(true); } diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/LifecycleBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/LifecycleBusinessLogic.java index f0b369072e..e478bc6924 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/LifecycleBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/LifecycleBusinessLogic.java @@ -207,7 +207,7 @@ public class LifecycleBusinessLogic { LifecycleStateEnum resourceCurrState = component.getLifecycleState(); // lock resource - if (inTransaction == false && needLock) { + if (!inTransaction && needLock) { log.info("lock component {}", componentId); Either eitherLockResource = lockComponent(componentType, component); if (eitherLockResource.isRight()) { @@ -216,7 +216,7 @@ public class LifecycleBusinessLogic { log.error("lock component {} failed", componentId); return Either.right(errorResponse); } - log.info("after lock component {}", componentId); + log.debug("after lock component {}", componentId); } try { Either commentValidationResult = validateComment(changeInfo, transitionEnum); @@ -228,12 +228,12 @@ public class LifecycleBusinessLogic { return Either.right(errorResponse); } changeInfo.setUserRemarks(commentValidationResult.left().value()); - log.info("after validate component"); + log.debug("after validate component"); Either validateHighestVersion = validateHighestVersion(modifier, lifeCycleTransition, component, resourceCurrVersion, componentType); if (validateHighestVersion.isRight()) { return Either.right(validateHighestVersion.right().value()); } - log.info("after validate Highest Version"); + log.debug("after validate Highest Version"); if (isComponentVFCMT(component,componentType)){ Either changeVFCMTStateResponse = changeVFCMTState(componentType, modifier, transitionEnum, changeInfo, inTransaction, component); if (changeVFCMTStateResponse.isRight()){ @@ -243,11 +243,11 @@ public class LifecycleBusinessLogic { return changeState(component, lifeCycleTransition, componentType, modifier, changeInfo, inTransaction); } finally { - log.info("unlock component {}", componentId); - if (inTransaction == false && needLock && component != null) { - component.setUniqueId(componentId); + component.setUniqueId(componentId); + if (!inTransaction && needLock) { + log.info("unlock component {}", componentId); NodeTypeEnum nodeType = componentType.getNodeType(); - log.info("During change state, another component {} has been created/updated", componentId); + log.info("During change state, another component {} has been created/updated", componentId); graphLockOperation.unlockComponent(componentId, nodeType); } diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/LifecycleChangeInfoWithAction.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/LifecycleChangeInfoWithAction.java index 170e187f15..5d8b29ecdc 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/LifecycleChangeInfoWithAction.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/LifecycleChangeInfoWithAction.java @@ -23,7 +23,7 @@ package org.openecomp.sdc.be.components.lifecycle; public class LifecycleChangeInfoWithAction extends LifecycleChangeInfoBase { public enum LifecycleChanceActionEnum { - CREATE_FROM_CSAR, UPDATE_FROM_EXTERNAL_API + CREATE_FROM_CSAR, UPDATE_FROM_EXTERNAL_API, UPGRADE_MIGRATION }; private LifecycleChanceActionEnum action; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/StartCertificationTransition.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/StartCertificationTransition.java index 24266521c2..b74ae5d8e5 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/StartCertificationTransition.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/StartCertificationTransition.java @@ -20,7 +20,8 @@ package org.openecomp.sdc.be.components.lifecycle; -import fj.data.Either; +import java.util.Arrays; + import org.openecomp.sdc.be.components.impl.ComponentBusinessLogic; import org.openecomp.sdc.be.config.BeEcompErrorManager; import org.openecomp.sdc.be.dao.api.ActionStatus; @@ -43,7 +44,7 @@ import org.openecomp.sdc.exception.ResponseFormat; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.Arrays; +import fj.data.Either; public class StartCertificationTransition extends LifeCycleTransition { diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/UndoCheckoutTransition.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/UndoCheckoutTransition.java index 277cd173aa..324e46016f 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/UndoCheckoutTransition.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/UndoCheckoutTransition.java @@ -21,6 +21,7 @@ package org.openecomp.sdc.be.components.lifecycle; import java.util.Arrays; + import org.openecomp.sdc.be.components.impl.ArtifactsBusinessLogic; import org.openecomp.sdc.be.components.impl.ComponentBusinessLogic; import org.openecomp.sdc.be.config.BeEcompErrorManager; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/GlobalInputsFilteringBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/GlobalInputsFilteringBusinessLogic.java new file mode 100644 index 0000000000..9c140b36c7 --- /dev/null +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/GlobalInputsFilteringBusinessLogic.java @@ -0,0 +1,36 @@ +package org.openecomp.sdc.be.components.merge; + +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +import org.openecomp.sdc.be.components.impl.BaseBusinessLogic; +import org.openecomp.sdc.be.components.impl.generic.GenericTypeBusinessLogic; +import org.openecomp.sdc.be.dao.api.ActionStatus; +import org.openecomp.sdc.be.model.InputDefinition; +import org.openecomp.sdc.be.model.Resource; +import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; +import org.springframework.stereotype.Component; + +import fj.data.Either; + +@Component +public class GlobalInputsFilteringBusinessLogic extends BaseBusinessLogic { + + @javax.annotation.Resource + private GenericTypeBusinessLogic genericTypeBusinessLogic; + + Either, ActionStatus> filterGlobalInputs(Resource newResource) { + Either genericComp = toscaOperationFacade.getLatestCertifiedNodeTypeByToscaResourceName(newResource.fetchGenericTypeToscaNameFromConfig()); + return genericComp.bimap(genericResource -> findCommonInputs(genericResource, newResource), + storageOperationStatus -> componentsUtils.convertFromStorageResponse(storageOperationStatus)); + } + + private List findCommonInputs(Resource genericResource, Resource resource) { + List resourceInputs = resource.getInputs(); + List genericInputs = genericTypeBusinessLogic.generateInputsFromGenericTypeProperties(genericResource); + Set genericInputsNames = genericInputs.stream().map(InputDefinition::getName).collect(Collectors.toSet()); + return resourceInputs.stream().filter(input -> genericInputsNames.contains(input.getName())).collect(Collectors.toList()); + } + +} diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/GlobalTypesMergeBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/GlobalTypesMergeBusinessLogic.java new file mode 100644 index 0000000000..eb359e949e --- /dev/null +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/GlobalTypesMergeBusinessLogic.java @@ -0,0 +1,41 @@ +package org.openecomp.sdc.be.components.merge; + +import java.util.List; + +import org.openecomp.sdc.be.components.merge.input.ComponentInputsMergeBL; +import org.openecomp.sdc.be.components.merge.resource.MergeResourceBusinessLogic; +import org.openecomp.sdc.be.dao.api.ActionStatus; +import org.openecomp.sdc.be.model.InputDefinition; +import org.openecomp.sdc.be.model.Resource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import fj.data.Either; + +@Component +public class GlobalTypesMergeBusinessLogic implements MergeResourceBusinessLogic { + + private static final Logger LOGGER = LoggerFactory.getLogger(GlobalTypesMergeBusinessLogic.class); + + @javax.annotation.Resource + private GlobalInputsFilteringBusinessLogic globalInputsFilteringBusinessLogic; + + @javax.annotation.Resource + private ComponentInputsMergeBL inputsValuesMergeBL; + + @Override + public ActionStatus mergeResourceEntities(Resource oldResource, Resource newResource) { + if (oldResource == null) { + return ActionStatus.OK; + } + Either, ActionStatus> globalInputsEither = globalInputsFilteringBusinessLogic.filterGlobalInputs(newResource); + if (globalInputsEither.isRight()) { + LOGGER.error("failed to get global inputs of resource {} status is {}", newResource.getUniqueId(), globalInputsEither.right().value()); + return globalInputsEither.right().value(); + } + List globalInputs = globalInputsEither.left().value(); + return inputsValuesMergeBL.mergeComponentInputs(oldResource, newResource, globalInputs); + } + +} diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/RelationsComparator.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/RelationsComparator.java new file mode 100644 index 0000000000..6c20e501f9 --- /dev/null +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/RelationsComparator.java @@ -0,0 +1,95 @@ +package org.openecomp.sdc.be.components.merge; + +import java.util.List; +import java.util.Map; +import java.util.Optional; + +import org.openecomp.sdc.be.model.ComponentInstance; +import org.openecomp.sdc.be.model.RelationshipInfo; +import org.openecomp.sdc.be.model.RequirementCapabilityRelDef; +import org.openecomp.sdc.be.model.Resource; +import org.springframework.stereotype.Component; + +@Component +public class RelationsComparator { + + /** + * + * @param oldResource the old resource + * @param newResource the new resource + * @return true if there was a change in one of the relations between the old and new resource + * a change in relation is determine by comparing the relations type, node, capability and requirement name + */ + public boolean isRelationsChanged(Resource oldResource, Resource newResource) { + Map> oldRelationsByInstance = oldResource.groupRelationsByInstanceName(oldResource); + Map> newRelationsByInstance = newResource.groupRelationsByInstanceName(newResource); + for (Map.Entry> relationByInst : newRelationsByInstance.entrySet()) { + List oldRelations = oldRelationsByInstance.get(relationByInst.getKey()); + List newRelations = relationByInst.getValue(); + if (isInstanceRelationsChanged(oldResource, oldRelations, newResource, newRelations)) { + return true; + } + } + return false; + + } + + private boolean isInstanceRelationsChanged(Resource oldResource, List oldRelations, Resource newResource, List newRelations) { + if (oldRelations == null || oldRelations.size() != newRelations.size()){ + return true; + } + return newRelations.stream().anyMatch(newRelation -> !findRelation(oldResource, oldRelations, newResource, newRelation)); + } + + + + private boolean findRelation(Resource oldResource, List oldRelations, Resource newResource, RequirementCapabilityRelDef newRelation) { + for (RequirementCapabilityRelDef oldRelation : oldRelations) { + RelationshipInfo oldRelationship = oldRelation.getSingleRelationship().getRelation(); + RelationshipInfo newRelationship = newRelation.getSingleRelationship().getRelation(); + if (oldRelationship != null && newRelationship != null && isRelationEqual(oldRelationship, newRelationship) && isRelationToNodeEquals(oldResource, oldRelation, newResource, newRelation)) { + return true; + } + } + return false; + } + + private boolean isRelationToNodeEquals(Resource oldResource, RequirementCapabilityRelDef oldRelation, Resource newResource, RequirementCapabilityRelDef newRelation) { + String oldToNodeId = oldRelation.getToNode(); + String newToNodeId = newRelation.getToNode(); + Optional oldRelationToNode = oldResource.getComponentInstanceById(oldToNodeId); + Optional newRelationToNode = newResource.getComponentInstanceById(newToNodeId); + return oldRelationToNode.isPresent() && newRelationToNode.isPresent() && oldRelationToNode.get().getName().equals(newRelationToNode.get().getName()); + } + + private boolean isRelationEqual(RelationshipInfo oldRelationship, RelationshipInfo newRelationship) { + return isRelationshipTypeEquals(oldRelationship, newRelationship) && + isRelationshipCapabilityEquals(oldRelationship, newRelationship) && + isRelationshipReqNameEquals(oldRelationship, newRelationship); + } + + private boolean isRelationshipCapabilityEquals(RelationshipInfo oldRelationship, RelationshipInfo newRelationship) { + if(oldRelationship.getCapabilityUid() !=null && newRelationship.getCapabilityUid() != null){ + return oldRelationship.getCapabilityUid().equals(newRelationship.getCapabilityUid()); + } + else if(oldRelationship.getCapabilityUid() == null && newRelationship.getCapabilityUid() == null){ + return true; + } + return false; + } + + private boolean isRelationshipTypeEquals(RelationshipInfo oldRelationship, RelationshipInfo newRelationship) { + return oldRelationship.getRelationship().getType().equals(newRelationship.getRelationship().getType()); + } + + private boolean isRelationshipReqNameEquals(RelationshipInfo oldRelationship, RelationshipInfo newRelationship) { + if(oldRelationship.getRequirement() != null && newRelationship.getRequirement() != null){ + return oldRelationship.getRequirement().equals(newRelationship.getRequirement()); + } + else if(oldRelationship.getRequirement() == null && newRelationship.getRequirement() == null){ + return true; + } + return false; + } + +} diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/TopologyComparator.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/TopologyComparator.java new file mode 100644 index 0000000000..8b48b0897a --- /dev/null +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/TopologyComparator.java @@ -0,0 +1,105 @@ +package org.openecomp.sdc.be.components.merge; + +import java.util.List; +import java.util.Map; + +import org.openecomp.sdc.be.dao.api.ActionStatus; +import org.openecomp.sdc.be.dao.utils.MapUtil; +import org.openecomp.sdc.be.exception.SdcActionException; +import org.openecomp.sdc.be.impl.ComponentsUtils; +import org.openecomp.sdc.be.model.Component; +import org.openecomp.sdc.be.model.ComponentInstance; +import org.openecomp.sdc.be.model.Resource; +import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade; +import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import fj.data.Either; + +@org.springframework.stereotype.Component +public class TopologyComparator { + + public static final Logger LOGGER = LoggerFactory.getLogger(TopologyComparator.class); + + @javax.annotation.Resource + private RelationsComparator relationsComparator; + + @javax.annotation.Resource + private ToscaOperationFacade toscaOperationFacade; + + @javax.annotation.Resource + private ComponentsUtils componentsUtils; + + /** + * + * @param oldResource the old version of the resource of which to check for topology change + * @param newResource the new version of the resource of which to check for topology change + * @return true if there was a topology change between the old resource and new resource or false otherwise + * in case the action to find topology change failed, an appropriate {@link ActionStatus} will be returned + */ + public Either isTopologyChanged(Resource oldResource, Resource newResource) { + List oldInstances = oldResource.getComponentInstances(); + List newInstances = newResource.getComponentInstances(); + if (oldInstances != null && newInstances == null || oldInstances == null && newInstances != null) { + return Either.left(true); + } + if (oldInstances == null && newInstances == null) { + return Either.left(false); + } + Map oldInstancesByName = MapUtil.toMap(oldInstances, ComponentInstance::getName); + Map newInstancesByName = MapUtil.toMap(newInstances, ComponentInstance::getName); + return isTopologyInstancesChanged(oldResource, newResource, oldInstancesByName, newInstancesByName); + } + + private Either isTopologyInstancesChanged(Resource oldResource, Resource newResource, Map oldInstancesByName, Map newInstancesByName) { + try { + boolean isTopologyChanged = isInstanceNamesChanged(oldInstancesByName, newInstancesByName) || + isInstanceTypesChanged(oldInstancesByName, newInstancesByName) || + relationsComparator.isRelationsChanged(oldResource, newResource); + return Either.left(isTopologyChanged); + } catch (SdcActionException e) { + LOGGER.error("failed to merge entities of previous resource %s to current resource %s. reason: %s", oldResource.getUniqueId(), newResource.getUniqueId(), e.getActionStatus(), e); + return Either.right(e.getActionStatus()); + } + } + + private boolean isInstanceTypesChanged(Map oldInstancesByName, Map newInstancesByName) { + for (Map.Entry instanceByName : newInstancesByName.entrySet()) { + ComponentInstance oldInstance = oldInstancesByName.get(instanceByName.getKey()); + if (!isSameToscaTypeOrOriginComponent(oldInstance, instanceByName.getValue())) { + return true; + } + } + return false; + } + + private boolean isInstanceNamesChanged(Map oldInstanceByName, Map newInstancesByName) { + return !oldInstanceByName.keySet().equals(newInstancesByName.keySet()); + } + + private boolean isSameToscaTypeOrOriginComponent(ComponentInstance oldInstance, ComponentInstance newInstance) { + return isSameToscaType(oldInstance, newInstance) || + isSameOriginComponent(oldInstance, newInstance); + } + + private boolean isSameToscaType(ComponentInstance oldInstance, ComponentInstance newInstance) { + return oldInstance.getToscaComponentName().equals(newInstance.getToscaComponentName()); + } + + private boolean isSameOriginComponent(ComponentInstance oldInstance, ComponentInstance newInstance) { + if (oldInstance.getComponentUid().equals(newInstance.getComponentUid())) { + return true; + } + Component oldOriginCmpt = toscaOperationFacade.getToscaElement(oldInstance.getComponentUid()).left().on(storageStatus -> throwSdcActionException(storageStatus, oldInstance)); + Component newOriginCmpt = toscaOperationFacade.getToscaElement(newInstance.getComponentUid()).left().on(storageStatus -> throwSdcActionException(storageStatus, newInstance)); + return oldOriginCmpt.getInvariantUUID().equals(newOriginCmpt.getInvariantUUID()); + } + + private Component throwSdcActionException(StorageOperationStatus storageOperationStatus, ComponentInstance cmptInstance) { + LOGGER.error("failed to fetch origin node type %s for instance %s", cmptInstance.getUniqueId(), cmptInstance.getComponentUid()); + throw new SdcActionException(componentsUtils.convertFromStorageResponse(storageOperationStatus)); + } + + +} diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/heat/HeatEnvArtifactsMergeBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/heat/HeatEnvArtifactsMergeBusinessLogic.java new file mode 100644 index 0000000000..1e1bc862cf --- /dev/null +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/heat/HeatEnvArtifactsMergeBusinessLogic.java @@ -0,0 +1,64 @@ +package org.openecomp.sdc.be.components.merge.heat; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import org.openecomp.sdc.be.dao.utils.MapUtil; +import org.openecomp.sdc.be.model.ArtifactDefinition; +import org.openecomp.sdc.be.model.HeatParameterDefinition; +import org.springframework.stereotype.Component; +import org.springframework.util.CollectionUtils; + +/** + * Created by chaya on 9/14/2017. + */ +@Component +public class HeatEnvArtifactsMergeBusinessLogic { + + public List mergeInstanceHeatEnvArtifacts(List origHeatEnvArtifacts, List newHeatEnvArtifacts) { + Map origArtifactDefinitionByLabel = MapUtil.toMap(origHeatEnvArtifacts, ArtifactDefinition::getArtifactLabel); + List artifactsToUpdate = new ArrayList<>(); + newHeatEnvArtifacts.stream() + .filter(heatEnvArtifact -> origArtifactDefinitionByLabel.containsKey(heatEnvArtifact.getArtifactLabel())) + .forEach(heatEnvArtifact -> { + ArtifactDefinition origHeatEnvArtifact = origArtifactDefinitionByLabel.get(heatEnvArtifact.getArtifactLabel()); + Boolean wasMergedHeatEnvArtifact = mergeHeatEnvArtifactsParameters(heatEnvArtifact, origHeatEnvArtifact); + if (wasMergedHeatEnvArtifact) { + artifactsToUpdate.add(heatEnvArtifact); + } + }); + return artifactsToUpdate; + } + + private Boolean mergeHeatEnvArtifactsParameters(ArtifactDefinition currArtifact, ArtifactDefinition origArtifact) { + List currentHeatEnvParams = currArtifact.getListHeatParameters(); + List origHeatEnvParams = origArtifact.getListHeatParameters(); + boolean wasChanged = false; + + if (CollectionUtils.isEmpty(origHeatEnvParams) || CollectionUtils.isEmpty(currentHeatEnvParams)) { + return false; + } + + Map origHeatParametersByName = MapUtil.toMap(origHeatEnvParams, HeatParameterDefinition::getName); + + for (HeatParameterDefinition currHeatParam : currentHeatEnvParams) { + String paramName = currHeatParam.getName(); + HeatParameterDefinition origHeatParam = origHeatParametersByName.get(paramName); + if (isSameHeatWithDiffValue(origHeatParam, currHeatParam)) { + currHeatParam.setCurrentValue(origHeatParam.getCurrentValue()); + wasChanged = true; + } + } + currArtifact.setListHeatParameters(currentHeatEnvParams); + return wasChanged; + } + + private boolean isSameHeatWithDiffValue(HeatParameterDefinition origHeatParam, HeatParameterDefinition newHeatParam) { + return origHeatParam != null && + origHeatParam.getCurrentValue() != null && + origHeatParam.getType().equals(newHeatParam.getType()) && + !origHeatParam.getCurrentValue().equals(newHeatParam.getCurrentValue()); + } + +} diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/input/ComponentInputsMergeBL.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/input/ComponentInputsMergeBL.java new file mode 100644 index 0000000000..b8ea5e35c4 --- /dev/null +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/input/ComponentInputsMergeBL.java @@ -0,0 +1,60 @@ +package org.openecomp.sdc.be.components.merge.input; + +import java.util.Collections; +import java.util.List; +import java.util.Map; + +import org.openecomp.sdc.be.dao.api.ActionStatus; +import org.openecomp.sdc.be.dao.utils.MapUtil; +import org.openecomp.sdc.be.impl.ComponentsUtils; +import org.openecomp.sdc.be.model.Component; +import org.openecomp.sdc.be.model.InputDefinition; +import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade; +import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; + +import fj.data.Either; + +@org.springframework.stereotype.Component +public class ComponentInputsMergeBL { + + @javax.annotation.Resource + private InputsValuesMergingBusinessLogic inputsValuesMergingBusinessLogic; + + @javax.annotation.Resource + private ToscaOperationFacade toscaOperationFacade; + + @javax.annotation.Resource + private ComponentsUtils componentsUtils; + + public ActionStatus mergeAndRedeclareComponentInputs(Component prevComponent, Component newComponent, List inputsToMerge) { + mergeInputs(prevComponent, inputsToMerge); + List previouslyDeclaredInputs = inputsValuesMergingBusinessLogic.getPreviouslyDeclaredInputsToMerge(prevComponent, newComponent); + inputsToMerge.addAll(previouslyDeclaredInputs); + return updateInputs(newComponent.getUniqueId(), inputsToMerge); + } + + public ActionStatus mergeComponentInputs(Component prevComponent, Component newComponent, List inputsToMerge) { + mergeInputs(prevComponent, inputsToMerge); + return updateInputs(newComponent.getUniqueId(), inputsToMerge); + } + + public ActionStatus redeclareComponentInputsForInstance(List oldInputs, Component newComponent, String instanceId) { + List previouslyDeclaredInputs = inputsValuesMergingBusinessLogic.getPreviouslyDeclaredInputsToMerge(oldInputs, newComponent, instanceId); + return updateInputs(newComponent.getUniqueId(), previouslyDeclaredInputs); + } + + private void mergeInputs(Component prevComponent, List inputsToMerge) { + Map oldInputsByName = prevComponent.getInputs() == null ? Collections.emptyMap() : MapUtil.toMap(prevComponent.getInputs(), InputDefinition::getName); + Map inputsToMergeByName = MapUtil.toMap(inputsToMerge, InputDefinition::getName); + inputsValuesMergingBusinessLogic.mergeComponentInputs(oldInputsByName, inputsToMergeByName); + } + + private ActionStatus updateInputs(String containerId, List inputsToUpdate) { + Either, StorageOperationStatus> updateInputsEither = toscaOperationFacade.updateInputsToComponent(inputsToUpdate, containerId); + if (updateInputsEither.isRight()) { + return componentsUtils.convertFromStorageResponse(updateInputsEither.right().value()); + } + return ActionStatus.OK; + } + +} diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/input/InputsValuesMergingBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/input/InputsValuesMergingBusinessLogic.java new file mode 100644 index 0000000000..e49d2b2c87 --- /dev/null +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/input/InputsValuesMergingBusinessLogic.java @@ -0,0 +1,180 @@ +package org.openecomp.sdc.be.components.merge.input; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import org.apache.commons.lang.StringUtils; +import org.openecomp.sdc.be.dao.utils.MapUtil; +import org.openecomp.sdc.be.datatypes.elements.GetInputValueDataDefinition; +import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition; +import org.openecomp.sdc.be.model.Component; +import org.openecomp.sdc.be.model.InputDefinition; + +@org.springframework.stereotype.Component +public class InputsValuesMergingBusinessLogic { + + /** + * Merge old inputs values into the updated inputs + * An input value is merged if the input previous version had a user defined value and its value is empty in current version + * @param oldInputs the currently persisted inputs mapped by their names + * @param updatedInputs the currently being update inputs mapped by their names + */ + public void mergeComponentInputs(Map oldInputs, Map updatedInputs) { + updatedInputs.forEach((inputName, input) -> mergeInputsValues(oldInputs.get(inputName), input)); + } + + /** + * @param oldComponent the old state of {@link Component} that is being updated + * @param newComponent the new state of {@link Component} that is being updated + * @return a list of all inputs that were previously declared and need to be merged to the updating component + * An input needs to merged if a property was declared as an input (by the user) in previous component version and the declared input not exist in new version + */ + public List getPreviouslyDeclaredInputsToMerge(Component oldComponent, Component newComponent) { + if (oldComponent == null || oldComponent.getInputs() == null || newComponent == null ) { + return Collections.emptyList(); + } + Map> getInputProperties = getAllGetInputPropertyData(newComponent); + List inputsToRedeclareData = buildRedeclareInputData(newComponent, getInputProperties); + return findPrevDeclaredInputs(oldComponent.getInputs(), inputsToRedeclareData); + } + + /** + * @param oldInputs list of previous inputs to find inputs to redeclare from + * @param newComponent the new state of {@link Component} that is being updated + * @param instanceId instance id + * @return a list of all inputs that were previously declared and need to be merged to the updating component + * An input needs to merged if an instance property was declared as an input (by the user) in previous component version and the declared input not exist in new version + */ + public List getPreviouslyDeclaredInputsToMerge(List oldInputs, Component newComponent, String instanceId) { + if (oldInputs == null || newComponent == null ) { + return Collections.emptyList(); + } + Map> getInputProperties = getAllGetInputPropertyData(newComponent, instanceId); + List inputsToRedeclareData = buildRedeclareInputData(newComponent, getInputProperties); + return findPrevDeclaredInputs(oldInputs, inputsToRedeclareData); + } + + private List findPrevDeclaredInputs(List oldInputs, List inputsToRedeclareData) { + Map oldInputsById = MapUtil.toMap(oldInputs, InputDefinition::getUniqueId); + List inputsToRedeclare = new ArrayList<>(); + inputsToRedeclareData.forEach(redeclareInputData -> { + List inputDefinitions = prepareInputsForRedeclaration(oldInputsById, redeclareInputData); + inputsToRedeclare.addAll(inputDefinitions); + }); + return inputsToRedeclare; + } + + private List prepareInputsForRedeclaration(Map oldInputsById, RedeclareInputData redeclareInputData) { + List inputsForRedeclaration = redeclareInputData.declaredInputIds.stream().map(oldInputsById::get).collect(Collectors.toList()); + inputsForRedeclaration.forEach(input -> { + input.setPropertyId(redeclareInputData.propertyId); + input.setInstanceUniqueId(redeclareInputData.instanceId); + }); + return inputsForRedeclaration; + } + + private Map> findGetInputPropsDefinitions(Map> instancesPropDefinitions) { + Map> getInputProps = new HashMap<>(); + if (instancesPropDefinitions == null) { + return getInputProps; + } + return instancesPropDefinitions.entrySet() + .stream() + .collect(Collectors.toMap(Map.Entry::getKey, + entry -> this.filterGetInputProps(entry.getValue()))); + } + + private List filterGetInputProps(List propDefinitions) { + return propDefinitions + .stream() + .filter(PropertyDataDefinition::isGetInputProperty) + .collect(Collectors.toList()); + } + + private void mergeInputsValues(InputDefinition oldInput, InputDefinition updatedInput) { + if (shouldMergeOldValue(oldInput, updatedInput)) { + updatedInput.setDefaultValue(oldInput.getDefaultValue()); + } + } + + private boolean shouldMergeOldValue(InputDefinition oldInput, InputDefinition newInput) { + return isNonEmptyDefaultValue(oldInput) && isEmptyDefaultValue(newInput) && isSameType(oldInput, newInput); + } + + private boolean isSameType(InputDefinition oldInput, InputDefinition updatedInput) { + return oldInput.typeEquals(updatedInput); + } + + private boolean isEmptyDefaultValue(InputDefinition input) { + return input != null && StringUtils.isEmpty(input.getDefaultValue()); + } + + private boolean isNonEmptyDefaultValue(InputDefinition input) { + return input != null && !isEmptyDefaultValue(input); + } + + private List buildRedeclareInputData(Component newComponent, Map> getInputProperties) { + Map inputsById = MapUtil.toMap(newComponent.getInputs(), InputDefinition::getUniqueId); + List redeclareInputData = new ArrayList<>(); + getInputProperties.forEach((instanceId, getInputProps) -> { + redeclareInputData.addAll(findInputsToRedeclare(inputsById, instanceId, getInputProps)); + }); + return redeclareInputData; + + } + + private Map> getAllGetInputPropertyData(Component newComponent) { + Map> getInputInstanceProps = findGetInputPropsDefinitions(newComponent.getComponentInstancesProperties()); + Map> getInputInstanceInputs = findGetInputPropsDefinitions(newComponent.getComponentInstancesInputs()); + getInputInstanceInputs.putAll(getInputInstanceProps); + return getInputInstanceInputs; + } + + private Map> getAllGetInputPropertyData(Component newComponent, String instanceId) { + List getInputInstanceProps = this.filterGetInputProps(newComponent.safeGetComponentInstanceProperties(instanceId)); + List getInputInstanceInputs = this.filterGetInputProps(newComponent.safeGetComponentInstanceInput(instanceId)); + getInputInstanceInputs.addAll(getInputInstanceProps); + return Collections.singletonMap(instanceId, getInputInstanceInputs); + } + + private List findInputsToRedeclare(Map inputsById, String instanceId, List getInputProps) { + List redeclareInputDataList = new ArrayList<>(); + getInputProps.forEach(property -> { + List inputsToRedeclareIds = findInputsToRedeclareIds(inputsById, property); + RedeclareInputData redeclareInputData = new RedeclareInputData(property.getUniqueId(), inputsToRedeclareIds, instanceId); + redeclareInputDataList.add(redeclareInputData); + }); + return redeclareInputDataList; + } + + private List findInputsToRedeclareIds(Map inputsById, PropertyDataDefinition property) { + List getInputValues = property.getGetInputValues(); + return getInputValues.stream() + .filter(getInputVal -> getInputValueWithNoCorrespondingInput(getInputVal, inputsById)) + .map(GetInputValueDataDefinition::getInputId) + .collect(Collectors.toList()); + } + + private boolean getInputValueWithNoCorrespondingInput(GetInputValueDataDefinition getInputVal, Map inputsById) { + return !inputsById.containsKey(getInputVal.getInputId()); + } + + private class RedeclareInputData { + private String propertyId; + private List declaredInputIds; + private String instanceId; + + public RedeclareInputData(String propertyId, List declaredInputIds, String instanceId) { + this.propertyId = propertyId; + this.declaredInputIds = declaredInputIds; + this.instanceId = instanceId; + } + + } + + +} \ No newline at end of file diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceArtifactsMerge.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceArtifactsMerge.java new file mode 100644 index 0000000000..cac8c977e3 --- /dev/null +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceArtifactsMerge.java @@ -0,0 +1,101 @@ +package org.openecomp.sdc.be.components.merge.instance; + +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; +import java.util.stream.Collectors; + +import org.openecomp.sdc.be.components.impl.ArtifactsBusinessLogic; +import org.openecomp.sdc.be.model.ArtifactDefinition; +import org.openecomp.sdc.be.model.Component; +import org.openecomp.sdc.be.model.ComponentInstance; +import org.openecomp.sdc.be.model.Operation; +import org.openecomp.sdc.be.model.User; +import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade; +import org.openecomp.sdc.common.api.Constants; +import org.openecomp.sdc.exception.ResponseFormat; +import org.springframework.beans.factory.annotation.Autowired; + +import fj.data.Either; + +/** + * Created by chaya on 9/20/2017. + */ +@org.springframework.stereotype.Component("ComponentInstanceArtifactsMerge") +public class ComponentInstanceArtifactsMerge implements ComponentInstanceMergeInterface { + + @Autowired + ToscaOperationFacade toscaOperationFacade; + + @Autowired + ArtifactsBusinessLogic artifactsBusinessLogic; + + @Override + public void saveDataBeforeMerge(DataForMergeHolder dataHolder, Component containerComponent, ComponentInstance currentResourceInstance, Component originComponent) { + Map componentInstancesDeploymentArtifacts = currentResourceInstance.safeGetDeploymentArtifacts(); + Map originalComponentDeploymentArtifacts = originComponent.getDeploymentArtifacts(); + Map deploymentArtifactsCreatedOnTheInstance = componentInstancesDeploymentArtifacts.entrySet() + .stream() + .filter(i -> !originalComponentDeploymentArtifacts.containsKey(i.getKey())) + .collect(Collectors.toMap(p -> p.getKey(), p -> p.getValue())); + + dataHolder.setOrigComponentDeploymentArtifactsCreatedOnTheInstance(deploymentArtifactsCreatedOnTheInstance); + + Map componentInstancesInformationalArtifacts = currentResourceInstance.safeGetArtifacts(); + Map originalComponentInformationalArtifacts = originComponent.getArtifacts(); + Map informationalArtifactsCreatedOnTheInstance = componentInstancesInformationalArtifacts.entrySet() + .stream() + .filter(i -> !originalComponentInformationalArtifacts.containsKey(i.getKey())) + .collect(Collectors.toMap(p -> p.getKey(), p -> p.getValue())); + dataHolder.setOrigComponentInformationalArtifactsCreatedOnTheInstance(informationalArtifactsCreatedOnTheInstance); + } + + private void addEsIdToArtifactJson(Map artifactJson, String origEsId) { + artifactJson.put(Constants.ARTIFACT_ES_ID, origEsId); + } + + @Override + public Either mergeDataAfterCreate(User user, DataForMergeHolder dataHolder, Component updatedContainerComponent, String newInstanceId) { + Map origInstanceDeploymentArtifactsCreatedOnTheInstance = dataHolder.getOrigComponentDeploymentArtifactsCreatedOnTheInstance(); + Map currentInstanceDeploymentArtifacts = updatedContainerComponent.safeGetComponentInstanceDeploymentArtifacts(newInstanceId); + Map filteredDeploymentArtifactsToAdd = Optional.ofNullable(origInstanceDeploymentArtifactsCreatedOnTheInstance).orElse(new HashMap<>()).entrySet().stream() + .filter(artifact -> noArtifactWithTheSameLabel(artifact.getValue().getArtifactLabel(), currentInstanceDeploymentArtifacts)) + .collect(Collectors.toMap(p -> p.getKey(), q -> q.getValue())); + Map origInstanceInformationalArtifactsCreatedOnTheInstance = dataHolder.getOrigComponentInformationalArtifactsCreatedOnTheInstance(); + Map currentInstanceInformationalArtifacts = updatedContainerComponent.safeGetComponentInstanceInformationalArtifacts(newInstanceId); + Map filteredInformationalArtifactsToAdd = Optional.ofNullable(origInstanceInformationalArtifactsCreatedOnTheInstance).orElse(new HashMap<>()).entrySet().stream() + .filter(artifact -> noArtifactWithTheSameLabel(artifact.getValue().getArtifactLabel(), currentInstanceInformationalArtifacts)) + .collect(Collectors.toMap(p -> p.getKey(), q -> q.getValue())); + Map allFilteredArtifactsToAdd = new HashMap<>(); + allFilteredArtifactsToAdd.putAll(filteredDeploymentArtifactsToAdd); + allFilteredArtifactsToAdd.putAll(filteredInformationalArtifactsToAdd); + + for (Map.Entry currentArtifactDefinition : allFilteredArtifactsToAdd.entrySet()) { + Map jsonForUpdateArtifact = artifactsBusinessLogic.buildJsonForUpdateArtifact( + currentArtifactDefinition.getValue().getUniqueId(), currentArtifactDefinition.getValue().getArtifactName(), + currentArtifactDefinition.getValue().getArtifactType(), currentArtifactDefinition.getValue().getArtifactGroupType(), + currentArtifactDefinition.getValue().getArtifactLabel(), currentArtifactDefinition.getValue().getArtifactDisplayName(), + currentArtifactDefinition.getValue().getDescription(), currentArtifactDefinition.getValue().getPayloadData(), + null, currentArtifactDefinition.getValue().getListHeatParameters()); + addEsIdToArtifactJson(jsonForUpdateArtifact, currentArtifactDefinition.getValue().getEsId()); + Either, ResponseFormat> uploadArtifactToService = + artifactsBusinessLogic.updateResourceInstanceArtifactNoContent(newInstanceId, updatedContainerComponent, + user, jsonForUpdateArtifact, artifactsBusinessLogic.new ArtifactOperationInfo( + false, false, ArtifactsBusinessLogic.ArtifactOperationEnum.Link), currentArtifactDefinition.getValue()); + if (uploadArtifactToService.isRight()) { + return Either.right(uploadArtifactToService.right().value()); + } + toscaOperationFacade.commit(); + } + return Either.left(updatedContainerComponent); + } + + private boolean noArtifactWithTheSameLabel(String artifactLabel, Map currDeploymentArtifacts) { + for (Map.Entry artifact : currDeploymentArtifacts.entrySet()) { + if (artifact.getValue().getArtifactLabel().equals(artifactLabel)) { + return false; + } + } + return true; + } +} diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceHeatEnvMerge.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceHeatEnvMerge.java new file mode 100644 index 0000000000..1561cdc797 --- /dev/null +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceHeatEnvMerge.java @@ -0,0 +1,63 @@ +package org.openecomp.sdc.be.components.merge.instance; + +import java.util.List; +import java.util.Map; + +import org.openecomp.sdc.be.components.impl.ArtifactsBusinessLogic; +import org.openecomp.sdc.be.components.merge.heat.HeatEnvArtifactsMergeBusinessLogic; +import org.openecomp.sdc.be.impl.ComponentsUtils; +import org.openecomp.sdc.be.model.ArtifactDefinition; +import org.openecomp.sdc.be.model.Component; +import org.openecomp.sdc.be.model.ComponentInstance; +import org.openecomp.sdc.be.model.Operation; +import org.openecomp.sdc.be.model.User; +import org.openecomp.sdc.common.api.ArtifactGroupTypeEnum; +import org.openecomp.sdc.exception.ResponseFormat; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; + +import fj.data.Either; + +/** + * Created by chaya on 9/20/2017. + */ +@org.springframework.stereotype.Component("ComponentInstanceHeatEnvMerge") +public class ComponentInstanceHeatEnvMerge implements ComponentInstanceMergeInterface { + + private static Logger log = LoggerFactory.getLogger(ComponentInstanceHeatEnvMerge.class.getName()); + + @Autowired + private ArtifactsBusinessLogic artifactsBusinessLogic; + + @Autowired + private HeatEnvArtifactsMergeBusinessLogic heatEnvArtifactsMergeBusinessLogic; + + @Autowired + protected ComponentsUtils componentsUtils; + + + @Override + public void saveDataBeforeMerge(DataForMergeHolder dataHolder, Component containerComponent, ComponentInstance currentResourceInstance, Component originComponent) { + dataHolder.setOrigComponentInstanceHeatEnvArtifacts(containerComponent.safeGetComponentInstanceHeatArtifacts(currentResourceInstance.getUniqueId())); + } + + @Override + public Either mergeDataAfterCreate(User user, DataForMergeHolder dataHolder, Component updatedContainerComponent, String newInstanceId) { + List origCompInstHeatEnvArtifacts = dataHolder.getOrigComponentInstanceHeatEnvArtifacts(); + List newCompInstHeatEnvArtifacts = updatedContainerComponent.safeGetComponentInstanceHeatArtifacts(newInstanceId); + List artifactsToUpdate = heatEnvArtifactsMergeBusinessLogic.mergeInstanceHeatEnvArtifacts(origCompInstHeatEnvArtifacts, newCompInstHeatEnvArtifacts); + + for (ArtifactDefinition artifactInfo : artifactsToUpdate) { + Map json = artifactsBusinessLogic.buildJsonForUpdateArtifact(artifactInfo, ArtifactGroupTypeEnum.DEPLOYMENT, null); + + Either, ResponseFormat> uploadArtifactToService = artifactsBusinessLogic.updateResourceInstanceArtifactNoContent(newInstanceId, updatedContainerComponent, user, json, + artifactsBusinessLogic.new ArtifactOperationInfo(false, false, ArtifactsBusinessLogic.ArtifactOperationEnum.Update), null); + if (uploadArtifactToService.isRight()) { + log.error("Failed to update artifact {} on resourceInstance {}", artifactInfo.getArtifactLabel(), newInstanceId); + return Either.right(uploadArtifactToService.right().value()); + } + } + return Either.left(updatedContainerComponent); + } +} diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceMergeDataBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceMergeDataBusinessLogic.java new file mode 100644 index 0000000000..04af6b7fc0 --- /dev/null +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceMergeDataBusinessLogic.java @@ -0,0 +1,90 @@ +package org.openecomp.sdc.be.components.merge.instance; + +import java.util.List; + +import org.openecomp.sdc.be.dao.api.ActionStatus; +import org.openecomp.sdc.be.impl.ComponentsUtils; +import org.openecomp.sdc.be.model.Component; +import org.openecomp.sdc.be.model.ComponentInstance; +import org.openecomp.sdc.be.model.ComponentParametersView; +import org.openecomp.sdc.be.model.User; +import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade; +import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; +import org.openecomp.sdc.exception.ResponseFormat; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; + +import fj.data.Either; +/** + * Created by chaya on 9/12/2017. + */ +@org.springframework.stereotype.Component("componentInstanceMergeDataBusinessLogic") +public class ComponentInstanceMergeDataBusinessLogic { + + private static Logger log = LoggerFactory.getLogger(ComponentInstanceMergeDataBusinessLogic.class.getName()); + + @Autowired + private List componentInstancesMergeBLs; + + @Autowired + private ToscaOperationFacade toscaOperationFacade; + + @Autowired + private ComponentsUtils componentsUtils; + + //for testing only + protected void setComponentInstancesMergeBLs(List componentInstancesMergeBLs) { + this.componentInstancesMergeBLs = componentInstancesMergeBLs; + } + + /** + * Saves all containerComponents data before deleting, in order to merge once creating a new instance + * @param containerComponent + * @param currentResourceInstance + */ + public DataForMergeHolder saveAllDataBeforeDeleting(org.openecomp.sdc.be.model.Component containerComponent, ComponentInstance currentResourceInstance, Component originComponent) { + DataForMergeHolder dataHolder = new DataForMergeHolder(); + for (ComponentInstanceMergeInterface compInstMergeBL : componentInstancesMergeBLs) { + compInstMergeBL.saveDataBeforeMerge(dataHolder, containerComponent, currentResourceInstance, originComponent); + } + return dataHolder; + } + + /** + * Merges inputs and instance inputs/props of the new Container component with the old container component data (before deleting) + * @param containerComponent + * @param newContainerComponentId + * @param newInstanceId + * @return + */ + public Either mergeComponentUserOrigData(User user, DataForMergeHolder dataHolder, org.openecomp.sdc.be.model.Component containerComponent, String newContainerComponentId, String newInstanceId) { + + Either componentWithInstancesInputsAndProperties = getComponentWithInstancesInputsAndProperties(newContainerComponentId); + if (componentWithInstancesInputsAndProperties.isRight()) { + log.error("Component with id {} was not found", newContainerComponentId); + StorageOperationStatus storageOperationStatus = componentWithInstancesInputsAndProperties.right().value(); + ActionStatus actionStatus = componentsUtils.convertFromStorageResponse(storageOperationStatus, containerComponent.getComponentType()); + return Either.right(componentsUtils.getResponseFormat(actionStatus)); + } + Component updatedContainerComponent = componentWithInstancesInputsAndProperties.left().value(); + + for (ComponentInstanceMergeInterface compInstMergeBL: componentInstancesMergeBLs) { + Either compInstanceMergeEither = compInstMergeBL.mergeDataAfterCreate(user, dataHolder, updatedContainerComponent, newInstanceId); + if (compInstanceMergeEither.isRight()) { + return Either.right(compInstanceMergeEither.right().value()); + } + } + + return Either.left(updatedContainerComponent); + } + + private Either getComponentWithInstancesInputsAndProperties(String containerComponentId) { + ComponentParametersView filter = new ComponentParametersView(true); + filter.setIgnoreComponentInstances(false); + filter.setIgnoreComponentInstancesInputs(false); + filter.setIgnoreComponentInstancesProperties(false); + filter.setIgnoreArtifacts(false); + return toscaOperationFacade.getToscaElement(containerComponentId, filter); + } +} diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceMergeInterface.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceMergeInterface.java new file mode 100644 index 0000000000..1d2849b94c --- /dev/null +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceMergeInterface.java @@ -0,0 +1,18 @@ +package org.openecomp.sdc.be.components.merge.instance; + +import org.openecomp.sdc.be.model.Component; +import org.openecomp.sdc.be.model.ComponentInstance; +import org.openecomp.sdc.be.model.User; +import org.openecomp.sdc.exception.ResponseFormat; + +import fj.data.Either; + +/** + * Created by chaya on 9/20/2017. + */ +public interface ComponentInstanceMergeInterface { + + void saveDataBeforeMerge(DataForMergeHolder dataHolder, Component containerComponent, ComponentInstance currentResourceInstance, Component originComponent); + + Either mergeDataAfterCreate(User user, DataForMergeHolder dataHolder, Component updatedContainerComponent, String newInstanceId); +} diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstancePropsAndInputsMerge.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstancePropsAndInputsMerge.java new file mode 100644 index 0000000000..765ddb57f6 --- /dev/null +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstancePropsAndInputsMerge.java @@ -0,0 +1,131 @@ +package org.openecomp.sdc.be.components.merge.instance; + +import java.util.ArrayList; +import java.util.List; + +import org.openecomp.sdc.be.components.merge.input.ComponentInputsMergeBL; +import org.openecomp.sdc.be.components.merge.property.ComponentInstanceInputsMergeBL; +import org.openecomp.sdc.be.components.merge.property.ComponentInstancePropertiesMergeBL; +import org.openecomp.sdc.be.dao.api.ActionStatus; +import org.openecomp.sdc.be.impl.ComponentsUtils; +import org.openecomp.sdc.be.model.Component; +import org.openecomp.sdc.be.model.ComponentInstance; +import org.openecomp.sdc.be.model.ComponentInstanceInput; +import org.openecomp.sdc.be.model.ComponentInstanceProperty; +import org.openecomp.sdc.be.model.ComponentParametersView; +import org.openecomp.sdc.be.model.InputDefinition; +import org.openecomp.sdc.be.model.User; +import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade; +import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; +import org.openecomp.sdc.exception.ResponseFormat; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; + +import fj.data.Either; + +/** + * Created by chaya on 9/20/2017. + */ +@org.springframework.stereotype.Component("ComponentInstancePropsAndInputsMerge") +public class ComponentInstancePropsAndInputsMerge implements ComponentInstanceMergeInterface { + + private static Logger log = LoggerFactory.getLogger(ComponentInstancePropsAndInputsMerge.class.getName()); + + @Autowired + private ToscaOperationFacade toscaOperationFacade; + + @Autowired + private ComponentsUtils componentsUtils; + + @Autowired + private ComponentInstancePropertiesMergeBL componentInstancePropertiesMergeBL; + + @Autowired + private ComponentInstanceInputsMergeBL resourceInstanceInputsMergeBL; + + @Autowired + private ComponentInputsMergeBL resourceInputsMergeBL; + + @Override + public void saveDataBeforeMerge(DataForMergeHolder dataHolder, Component containerComponent, ComponentInstance currentResourceInstance, Component originComponent) { + dataHolder.setOrigComponentInstanceInputs(containerComponent.safeGetComponentInstanceInputsByName(currentResourceInstance.getName())); + dataHolder.setOrigComponentInstanceProperties(containerComponent.safeGetComponentInstanceProperties(currentResourceInstance.getUniqueId())); + dataHolder.setOrigComponentInputs(containerComponent.getInputs()); + } + + @Override + public Either mergeDataAfterCreate(User user, DataForMergeHolder dataHolder, Component updatedContainerComponent, String newInstanceId) { + Either, ActionStatus> instanceInputsEither = mergeComponentInstanceInputsIntoContainer(dataHolder, updatedContainerComponent, newInstanceId); + if (instanceInputsEither.isRight()) { + ActionStatus actionStatus = instanceInputsEither.right().value(); + return Either.right(componentsUtils.getResponseFormat(actionStatus)); + } + Either, ActionStatus> instancePropsEither = mergeComponentInstancePropsIntoContainer(dataHolder, updatedContainerComponent, newInstanceId); + if (instancePropsEither.isRight()) { + ActionStatus actionStatus = instancePropsEither.right().value(); + return Either.right(componentsUtils.getResponseFormat(actionStatus)); + } + Either, ActionStatus> inputsEither = mergeComponentInputsIntoContainer(dataHolder, updatedContainerComponent.getUniqueId(), newInstanceId); + if (inputsEither.isRight()) { + ActionStatus actionStatus = inputsEither.right().value(); + return Either.right(componentsUtils.getResponseFormat(actionStatus)); + } + return Either.left(updatedContainerComponent); + } + + private Either, ActionStatus> mergeComponentInstancePropsIntoContainer(DataForMergeHolder dataHolder, Component updatedComponent, String instanceId) { + List originComponentInstanceProps = dataHolder.getOrigComponentInstanceProperties(); + List originComponentsInputs = dataHolder.getOrigComponentInputs(); + List newComponentInstancesProps = updatedComponent.safeGetComponentInstanceProperties(instanceId); + ActionStatus actionStatus = componentInstancePropertiesMergeBL.mergeComponentInstanceProperties(originComponentInstanceProps, originComponentsInputs, updatedComponent, instanceId); + + if (actionStatus != ActionStatus.OK) { + log.error("Failed to update component {} with merged instance properties", updatedComponent.getUniqueId(), newComponentInstancesProps); + return Either.right(actionStatus); + } + return Either.left(newComponentInstancesProps); + } + + private Either, ActionStatus> mergeComponentInstanceInputsIntoContainer(DataForMergeHolder dataHolder, Component updatedComponent, String instanceId) { + List originComponentInstanceInputs = dataHolder.getOrigComponentInstanceInputs(); + List originComponentsInputs = dataHolder.getOrigComponentInputs(); + List newComponentInstancesInputs = updatedComponent.safeGetComponentInstanceInput(instanceId); + ActionStatus actionStatus = resourceInstanceInputsMergeBL.mergeComponentInstanceInputs(originComponentInstanceInputs, originComponentsInputs, updatedComponent, instanceId); + if (actionStatus != ActionStatus.OK) { + log.error("Failed to update component {} with merged instance properties", updatedComponent.getUniqueId(), newComponentInstancesInputs); + return Either.right(actionStatus); + } + return Either.left(newComponentInstancesInputs); + } + + private Either, ActionStatus> mergeComponentInputsIntoContainer(DataForMergeHolder dataHolder, String newContainerComponentId, String newInstanceId) { + List origComponentInputs = dataHolder.getOrigComponentInputs(); + List inputsToAddToContainer = new ArrayList<>(); + if (origComponentInputs != null && !origComponentInputs.isEmpty()) { + // get instance inputs and properties after merge + Either componentWithInstancesInputsAndProperties = getComponentWithInstancesInputsAndProperties(newContainerComponentId); + if (componentWithInstancesInputsAndProperties.isRight()) { + log.error("Component %s was not found", newContainerComponentId); + return Either.right(componentsUtils.convertFromStorageResponse(componentWithInstancesInputsAndProperties.right().value())); + } + Component updatedContainerComponent = componentWithInstancesInputsAndProperties.left().value(); + + ActionStatus redeclareStatus = resourceInputsMergeBL.redeclareComponentInputsForInstance(origComponentInputs, updatedContainerComponent, newInstanceId); + if (redeclareStatus != ActionStatus.OK) { + log.error("Failed to update component {} with merged inputs {}", newContainerComponentId, inputsToAddToContainer); + Either.right(redeclareStatus); + } + } + return Either.left(inputsToAddToContainer); + } + + private Either getComponentWithInstancesInputsAndProperties(String containerComponentId) { + ComponentParametersView filter = new ComponentParametersView(true); + filter.setIgnoreComponentInstances(false); + filter.setIgnoreComponentInstancesInputs(false); + filter.setIgnoreComponentInstancesProperties(false); + filter.setIgnoreArtifacts(false); + return toscaOperationFacade.getToscaElement(containerComponentId, filter); + } +} diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/instance/DataForMergeHolder.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/instance/DataForMergeHolder.java new file mode 100644 index 0000000000..c5fb1d4a86 --- /dev/null +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/instance/DataForMergeHolder.java @@ -0,0 +1,114 @@ +package org.openecomp.sdc.be.components.merge.instance; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +import org.openecomp.sdc.be.model.ArtifactDefinition; +import org.openecomp.sdc.be.model.ComponentInstanceInput; +import org.openecomp.sdc.be.model.ComponentInstanceProperty; +import org.openecomp.sdc.be.model.InputDefinition; + +/** + * Created by chaya on 9/7/2017. + */ +public class DataForMergeHolder { + + private List origComponentInstanceInputs; + private List origComponentInstanceProperties; + private List origComponentInputs; + private Map origCompInstDeploymentArtifactsCreatedOnTheInstance; + private Map origCompInstInformationalArtifactsCreatedOnTheInstance; + private List origComponentInstanceHeatEnvArtifacts; + + public DataForMergeHolder() { + origComponentInstanceInputs = new ArrayList<>(); + origComponentInstanceProperties = new ArrayList<>(); + origComponentInputs = new ArrayList<>(); + origCompInstDeploymentArtifactsCreatedOnTheInstance = new HashMap<>(); + origCompInstDeploymentArtifactsCreatedOnTheInstance = new HashMap<>(); + + } + + public List getOrigComponentInstanceHeatEnvArtifacts() { + return origComponentInstanceHeatEnvArtifacts; + } + + public void setOrigComponentInstanceHeatEnvArtifacts(List origComponentInstanceHeatEnvArtifacts) { + this.origComponentInstanceHeatEnvArtifacts = origComponentInstanceHeatEnvArtifacts; + } + + public List getOrigComponentInstanceInputs() { + return origComponentInstanceInputs; + } + + public void setOrigComponentInstanceInputs(List origComponentInstanceInputs) { + Optional.ofNullable(origComponentInstanceInputs).orElse(Collections.emptyList()).stream().forEach(input -> { + ComponentInstanceInput copyInput = new ComponentInstanceInput(); + copyInput.setType(input.getType()); + copyInput.setPath(input.getPath()); + copyInput.setRules(input.getRules()); + copyInput.setValueUniqueUid(input.getValueUniqueUid()); + copyInput.setDefaultValue(input.getDefaultValue()); + copyInput.setDescription(input.getDescription()); + copyInput.setGetInputValues(input.getGetInputValues()); + copyInput.setInputId(input.getInputId()); + copyInput.setInputPath(input.getInputPath()); + copyInput.setInputs(input.getInputs()); + copyInput.setLabel(input.getLabel()); + copyInput.setName(input.getName()); + copyInput.setParentUniqueId(input.getParentUniqueId()); + copyInput.setProperties(input.getProperties()); + copyInput.setPropertyId(input.getPropertyId()); + copyInput.setSchema(input.getSchema()); + copyInput.setStatus(input.getStatus()); + copyInput.setDefaultValue(input.getDefaultValue()); + copyInput.setValue(input.getValue()); + this.origComponentInstanceInputs.add(copyInput); + }); + } + + public List getOrigComponentInstanceProperties() { + return origComponentInstanceProperties; + } + + public void setOrigComponentInstanceProperties(List origComponentInstanceProperties) { + Optional.ofNullable(origComponentInstanceProperties).orElse(Collections.emptyList()).stream().forEach(property -> { + ComponentInstanceProperty propertyCopy = new ComponentInstanceProperty(); + propertyCopy.setType(property.getType()); + propertyCopy.setName(property.getName()); + propertyCopy.setValue(property.getValue()); + propertyCopy.setUniqueId(property.getUniqueId()); + propertyCopy.setDefaultValue(property.getDefaultValue()); + propertyCopy.setInputId(property.getInputId()); + propertyCopy.setGetInputValues(property.getGetInputValues()); + this.origComponentInstanceProperties.add(propertyCopy); + }); + } + + public List getOrigComponentInputs() { + return origComponentInputs; + } + + public void setOrigComponentInputs(List origComponentInputs) { + this.origComponentInputs = origComponentInputs; + } + + public Map getOrigComponentDeploymentArtifactsCreatedOnTheInstance(){ return this.origCompInstDeploymentArtifactsCreatedOnTheInstance;} + + public Map getOrigComponentInformationalArtifactsCreatedOnTheInstance(){ return origCompInstInformationalArtifactsCreatedOnTheInstance;} + + public void setOrigComponentDeploymentArtifactsCreatedOnTheInstance(Map origDeploymentArtifacts){ + origCompInstDeploymentArtifactsCreatedOnTheInstance = origDeploymentArtifacts; + } + + public void setOrigComponentInformationalArtifactsCreatedOnTheInstance(Map origInformationalArtifacts){ + origCompInstInformationalArtifactsCreatedOnTheInstance = origInformationalArtifacts; + } + + + +} diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/ComplexPropertyValueMerger.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/ComplexPropertyValueMerger.java new file mode 100644 index 0000000000..a68e28024c --- /dev/null +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/ComplexPropertyValueMerger.java @@ -0,0 +1,17 @@ +package org.openecomp.sdc.be.components.merge.property; + +import java.util.List; + +public class ComplexPropertyValueMerger extends PropertyValueMerger { + + private static final ComplexPropertyValueMerger INSTANCE = new ComplexPropertyValueMerger(); + + public static PropertyValueMerger getInstance() { + return INSTANCE; + } + + @Override + Object merge(Object oldVal, Object newVal, List someStrings) { + return mergeValues(oldVal, newVal, someStrings); + } +} diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/ComponentInstanceInputsMergeBL.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/ComponentInstanceInputsMergeBL.java new file mode 100644 index 0000000000..4e49eef94c --- /dev/null +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/ComponentInstanceInputsMergeBL.java @@ -0,0 +1,72 @@ +package org.openecomp.sdc.be.components.merge.property; + +import java.util.Collections; +import java.util.List; +import java.util.Map; + +import org.openecomp.sdc.be.dao.api.ActionStatus; +import org.openecomp.sdc.be.impl.ComponentsUtils; +import org.openecomp.sdc.be.model.Component; +import org.openecomp.sdc.be.model.ComponentInstance; +import org.openecomp.sdc.be.model.ComponentInstanceInput; +import org.openecomp.sdc.be.model.InputDefinition; +import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade; +import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; + +import fj.data.Either; + +@org.springframework.stereotype.Component +public class ComponentInstanceInputsMergeBL { + + @javax.annotation.Resource + private ToscaOperationFacade toscaOperationFacade; + + @javax.annotation.Resource + private ComponentsUtils componentsUtils; + + @javax.annotation.Resource + private DataDefinitionsValuesMergingBusinessLogic propertyValuesMergingBusinessLogic; + + public ActionStatus mergeComponentInstancesInputs(Component oldComponent, Component newComponent) { + Map> componentInstancesInputs = newComponent.getComponentInstancesInputs(); + if (componentInstancesInputs == null) { + return ActionStatus.OK; + } + componentInstancesInputs.forEach((instanceId, instInputs) -> mergeOldInstanceInputsValues(oldComponent, newComponent, instanceId, instInputs)); + return updateComponentInstancesInputs(newComponent, componentInstancesInputs); + } + + public ActionStatus mergeComponentInstanceInputs(List oldInstProps, List oldInputs, Component newComponent, String instanceId) { + List newInstInput = newComponent.safeGetComponentInstanceInput(instanceId); + if (newInstInput == null) { + return ActionStatus.OK; + } + propertyValuesMergingBusinessLogic.mergeInstanceDataDefinitions(oldInstProps, oldInputs, newInstInput, newComponent.getInputs()); + return updateComponentInstanceInputs(newComponent, instanceId, newInstInput); + } + + private ActionStatus updateComponentInstanceInputs(Component newComponent, String instanceId, List newInstInput) { + StorageOperationStatus storageOperationStatus = toscaOperationFacade.updateComponentInstanceInputs(newComponent, instanceId, newInstInput); + if (storageOperationStatus != StorageOperationStatus.OK) { + return componentsUtils.convertFromStorageResponse(storageOperationStatus); + } + return ActionStatus.OK; + } + + private ActionStatus updateComponentInstancesInputs(Component component, Map> componentInstancesInputs) { + Either>, StorageOperationStatus> mapStorageOperationStatusEither = toscaOperationFacade.updateComponentInstanceInputsToComponent(componentInstancesInputs, component.getUniqueId()); + if (mapStorageOperationStatusEither.isRight()) { + return componentsUtils.convertFromStorageResponse(mapStorageOperationStatusEither.right().value()); + } + return ActionStatus.OK; + } + + private void mergeOldInstanceInputsValues(Component oldComponent, Component newComponent, String instanceId, List instInputs) { + ComponentInstance currentCompInstance = newComponent.getComponentInstanceById(instanceId).get(); + List oldInstInputs = oldComponent == null ? Collections.emptyList() : oldComponent.safeGetComponentInstanceInputsByName(currentCompInstance.getName()); + List oldInputs = oldComponent == null ? Collections.emptyList() : oldComponent.getInputs(); + propertyValuesMergingBusinessLogic.mergeInstanceDataDefinitions(oldInstInputs, oldInputs, instInputs, newComponent.getInputs()); + } + + +} diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/ComponentInstancePropertiesMergeBL.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/ComponentInstancePropertiesMergeBL.java new file mode 100644 index 0000000000..43e3ec624a --- /dev/null +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/ComponentInstancePropertiesMergeBL.java @@ -0,0 +1,73 @@ +package org.openecomp.sdc.be.components.merge.property; + +import java.util.Collections; +import java.util.List; +import java.util.Map; + +import org.openecomp.sdc.be.dao.api.ActionStatus; +import org.openecomp.sdc.be.impl.ComponentsUtils; +import org.openecomp.sdc.be.model.Component; +import org.openecomp.sdc.be.model.ComponentInstanceProperty; +import org.openecomp.sdc.be.model.InputDefinition; +import org.openecomp.sdc.be.model.Resource; +import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade; +import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; + +import fj.data.Either; + +@org.springframework.stereotype.Component +public class ComponentInstancePropertiesMergeBL { + + @javax.annotation.Resource + private ToscaOperationFacade toscaOperationFacade; + + @javax.annotation.Resource(name = "componentUtils") + private ComponentsUtils componentsUtils; + + @javax.annotation.Resource + private DataDefinitionsValuesMergingBusinessLogic propertyValuesMergingBusinessLogic; + + public ActionStatus mergeComponentInstancesProperties(Component oldComponent, Resource newResource) { + Map> newInstProps = newResource.getComponentInstancesProperties(); + if (newInstProps == null) { + return ActionStatus.OK; + } + newInstProps.forEach((instanceId, newProps) -> mergeOldInstancePropertiesValues(oldComponent, newResource, instanceId, newProps) ); + return updateComponentInstancesProperties(newResource, newInstProps); + } + + + public ActionStatus mergeComponentInstanceProperties(List oldInstProps, List oldInputs, Component newComponent, String instanceId) { + List newInstProps = newComponent.safeGetComponentInstanceProperties(instanceId); + if (newInstProps == null) { + return ActionStatus.OK; + } + propertyValuesMergingBusinessLogic.mergeInstanceDataDefinitions(oldInstProps, oldInputs, newInstProps, newComponent.getInputs()); + return updateComponentInstanceProperties(newComponent, instanceId, newInstProps); + } + + private void mergeOldInstancePropertiesValues(Component oldComponent, Component newComponent, String instanceId, List newProps) { + List oldInstProperties = oldComponent == null ? Collections.emptyList() : oldComponent.safeGetComponentInstanceProperties(instanceId); + List oldInputs = oldComponent == null ? Collections.emptyList() : oldComponent.getInputs(); + propertyValuesMergingBusinessLogic.mergeInstanceDataDefinitions(oldInstProperties, oldInputs, newProps, newComponent.getInputs()); + } + + private ActionStatus updateComponentInstancesProperties(Component newComponent, Map> newInstProps) { + Either>, StorageOperationStatus> mapStorageOperationStatusEither = toscaOperationFacade.updateComponentInstancePropsToComponent(newInstProps, newComponent.getUniqueId()); + if (mapStorageOperationStatusEither.isRight()) { + return componentsUtils.convertFromStorageResponse(mapStorageOperationStatusEither.right().value()); + } + return ActionStatus.OK; + } + + private ActionStatus updateComponentInstanceProperties(Component component, String instanceId, List newInstProps) { + StorageOperationStatus storageOperationStatus = toscaOperationFacade.updateComponentInstanceProperties(component, instanceId, newInstProps); + if (storageOperationStatus != StorageOperationStatus.OK) { + return componentsUtils.convertFromStorageResponse(storageOperationStatus); + } + return ActionStatus.OK; + } + + + +} diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/DataDefinitionsValuesMergingBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/DataDefinitionsValuesMergingBusinessLogic.java new file mode 100644 index 0000000000..96d3bce97e --- /dev/null +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/DataDefinitionsValuesMergingBusinessLogic.java @@ -0,0 +1,43 @@ +package org.openecomp.sdc.be.components.merge.property; + +import java.util.List; + +import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition; +import org.openecomp.sdc.be.model.InputDefinition; +import org.springframework.stereotype.Component; + +@Component +public class DataDefinitionsValuesMergingBusinessLogic { + + @javax.annotation.Resource + private PropertyDataValueMergeBusinessLogic propertyValueMergeBL; + + /** + * Merge previous version data definition values into the new version data definition. + * A data definition value is merged if it had a value in previous version and has no value in the current version. + * in case a property get input value has no corresponding input in the current version its value will not be merged + * @param oldInstanceDataDefinition the currently persisted instance data definitions + * @param oldInputs the previous version inputs + * @param updatedInstanceDataDefinition the currently being update instance data definitions + * @param newInputs the new version inputs + */ + public void mergeInstanceDataDefinitions(List oldInstanceDataDefinition, List oldInputs, List updatedInstanceDataDefinition, List newInputs) { + if (updatedInstanceDataDefinition == null || updatedInstanceDataDefinition.isEmpty() || oldInstanceDataDefinition == null || oldInstanceDataDefinition.isEmpty()) { + return; + } + List mergePropertyData = PropertyInstanceMergeDataBuilder.getInstance().buildDataForMerging(oldInstanceDataDefinition, oldInputs, updatedInstanceDataDefinition, newInputs); + mergePropertyData.forEach(this::mergeInstanceDefinition); + + } + + private void mergeInstanceDefinition(MergePropertyData mergeData) { + if (isSameType(mergeData.getOldProp(), mergeData.getNewProp())) { + propertyValueMergeBL.mergePropertyValue(mergeData.getOldProp(), mergeData.getNewProp(), mergeData.getGetInputNamesToMerge()); + } + } + + private boolean isSameType(PropertyDataDefinition oldDataDefinition, PropertyDataDefinition updatedDataDefinition) { + return oldDataDefinition.typeEquals(updatedDataDefinition); + } + +} diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/MergePropertyData.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/MergePropertyData.java new file mode 100644 index 0000000000..63a7a1b3a0 --- /dev/null +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/MergePropertyData.java @@ -0,0 +1,52 @@ +package org.openecomp.sdc.be.components.merge.property; + +import java.util.ArrayList; +import java.util.List; + +import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition; + +/** + * A POJO which represents an instance property data definition (a {@link org.openecomp.sdc.be.model.ComponentInstanceProperty} or {@link org.openecomp.sdc.be.model.ComponentInstanceInput}) + * that its value needs to be merged during an upgrade of a VSP. + * + */ +public class MergePropertyData { + + /*The previous state of the instance property to merge */ + private PropertyDataDefinition oldProp; + /*The new state of the instance property to merge */ + private PropertyDataDefinition newProp; + + private List getInputNamesToMerge = new ArrayList<>(); + + public PropertyDataDefinition getOldProp() { + return oldProp; + } + + public MergePropertyData setOldProp(PropertyDataDefinition oldProp) { + this.oldProp = oldProp; + return this; + } + + public MergePropertyData setNewProp(PropertyDataDefinition newProp) { + this.newProp = newProp; + return this; + } + + public PropertyDataDefinition getNewProp() { + return newProp; + } + + public void addAddGetInputNamesToMerge(List getInputsNameToMerge) { + getInputNamesToMerge.addAll(getInputsNameToMerge); + } + + public List getGetInputNamesToMerge() { + return getInputNamesToMerge; + } + + public boolean isGetInputProp() { + return oldProp.isGetInputProperty(); + } + +} diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/PropertyDataValueMergeBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/PropertyDataValueMergeBusinessLogic.java new file mode 100644 index 0000000000..6b083596c7 --- /dev/null +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/PropertyDataValueMergeBusinessLogic.java @@ -0,0 +1,164 @@ +package org.openecomp.sdc.be.components.merge.property; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.stream.Collectors; + +import javax.annotation.Resource; + +import org.openecomp.sdc.be.components.impl.ImportUtils; +import org.openecomp.sdc.be.dao.titan.TitanOperationStatus; +import org.openecomp.sdc.be.datatypes.elements.GetInputValueDataDefinition; +import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition; +import org.openecomp.sdc.be.model.DataTypeDefinition; +import org.openecomp.sdc.be.model.cache.ApplicationDataTypeCache; +import org.openecomp.sdc.be.model.tosca.ToscaFunctions; +import org.openecomp.sdc.be.model.tosca.ToscaPropertyType; +import org.openecomp.sdc.be.tosca.PropertyConvertor; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import com.google.gson.Gson; + +import fj.data.Either; + +@Component +public class PropertyDataValueMergeBusinessLogic { + + private static final Logger LOGGER = LoggerFactory.getLogger(PropertyDataValueMergeBusinessLogic.class); + + private final PropertyConvertor propertyConvertor = PropertyConvertor.getInstance(); + + private PropertyValueMerger complexPropertyValueMerger = ComplexPropertyValueMerger.getInstance(); + + private PropertyValueMerger scalarPropertyValueMerger = ScalarPropertyValueMerger.getInstance(); + + @Resource + private ApplicationDataTypeCache dataTypeCache; + + private final Gson gson = new Gson(); + + /** + * + * @param oldProp the old property to merge value from + * @param newProp the new property to merge value into + * @param getInputNamesToMerge inputs names which their corresponding get_input values are allowed to be merged + */ + public void mergePropertyValue(PropertyDataDefinition oldProp, PropertyDataDefinition newProp, List getInputNamesToMerge) { + Either, TitanOperationStatus> dataTypesEither = dataTypeCache.getAll(); + if (dataTypesEither.isRight()) { + LOGGER.debug("failed to fetch data types, skip merging of previous property values. status: {}", dataTypesEither.right().value()); + } + mergePropertyValue(oldProp, newProp, dataTypesEither.left().value(), getInputNamesToMerge); + mergeComplexPropertyGetInputsValues(oldProp, newProp); + } + + private void mergePropertyValue(PropertyDataDefinition oldProp, PropertyDataDefinition newProp, Map dataTypes, List getInputNamesToMerge) { + Object oldValAsObject = convertPropertyStrValueToObject(oldProp, dataTypes); + Object newValAsObject = convertPropertyStrValueToObject(newProp, dataTypes); + PropertyValueMerger propertyValueMerger = getPropertyValueMerger(newProp); + if(oldValAsObject != null){ + Object mergedValue = propertyValueMerger.mergeValues(oldValAsObject, newValAsObject, getInputNamesToMerge); + newProp.setValue(convertPropertyValueObjectToString(mergedValue)); + } + } + + private PropertyValueMerger getPropertyValueMerger(PropertyDataDefinition newProp) { + if (ToscaPropertyType.isPrimitiveType(newProp.getType()) || ToscaPropertyType.isPrimitiveType(newProp.getSchemaType())) { + return scalarPropertyValueMerger; + } + return complexPropertyValueMerger; + } + + private String convertPropertyValueObjectToString(Object mergedValue) { + if (isEmptyValue(mergedValue)) { + return null; + } + return mergedValue instanceof String? mergedValue.toString() : gson.toJson(mergedValue); + } + + private Object convertPropertyStrValueToObject(PropertyDataDefinition propertyDataDefinition, Map dataTypes) { + String propValue = propertyDataDefinition.getValue() == null ? "": propertyDataDefinition.getValue(); + String propertyType = propertyDataDefinition.getType(); + String innerType = propertyDataDefinition.getSchemaType(); + return propertyConvertor.convertToToscaObject(propertyType, propValue, innerType, dataTypes); + } + + + @SuppressWarnings("unchecked") + private Object removeUnwantedGetInputValues(Object val, List getInputNamesToMerge) { + if (val instanceof Map) { + return removeUnwantedGetInputValues((Map) val, getInputNamesToMerge); + } + if (val instanceof List) { + return removeUnwantedGetInputValues((List)val, getInputNamesToMerge); + } + return val; + } + + private List removeUnwantedGetInputValues(List listVal, List getInputNamesToMerge) { + return listVal.stream().map(val -> removeUnwantedGetInputValues(val, getInputNamesToMerge)).collect(Collectors.toList()); + } + + private Map removeUnwantedGetInputValues(Map val, List getInputNamesToMerge) { + return val.entrySet().stream().filter(entry -> !isGetInputEntry(entry) || isGetInputToMerge(getInputNamesToMerge, entry)) + .collect(Collectors.toMap(Map.Entry::getKey, entry -> removeUnwantedGetInputValues(entry.getValue(), getInputNamesToMerge))); + } + + private boolean isGetInputToMerge(List getInputNamesToMerge, Map.Entry entry) { + return getInputNamesToMerge.contains(retrieveGetInputInputName(entry.getValue())); + } + + private String retrieveGetInputInputName(Object getInputValue) { + return getInputValue instanceof List ? (String)((List) getInputValue).get(0) : (String)getInputValue; + } + + private boolean isGetInputEntry(Map.Entry oldValEntry) { + return oldValEntry.getKey().equals(ImportUtils.ToscaTagNamesEnum.GET_INPUT.getElementName()); + } + + private boolean isEmptyValue(Object val) { + return val == null || + val instanceof Map && ((Map) val).isEmpty() || + val instanceof List && ((List) val).isEmpty(); + } + + private void mergeComplexPropertyGetInputsValues(PropertyDataDefinition oldProp, PropertyDataDefinition newProp) { + if (!oldProp.isGetInputProperty()) { + return; + } + List getInputsToMerge = findOldGetInputValuesToMerge(oldProp, newProp); + List newPropGetInputValues = Optional.ofNullable(newProp.getGetInputValues()).orElse(new ArrayList<>()); + newPropGetInputValues.addAll(getInputsToMerge); + newProp.setGetInputValues(newPropGetInputValues); + } + + private List findOldGetInputValuesToMerge(PropertyDataDefinition oldProp, PropertyDataDefinition newProp) { + List oldGetInputValues = oldProp.getGetInputValues(); + List newGetInputValues = Optional.ofNullable(newProp.getGetInputValues()).orElse(Collections.emptyList()); + List newGetInputNames = newGetInputValues.stream().map(GetInputValueDataDefinition::getInputName).collect(Collectors.toList()); + return oldGetInputValues.stream() + .filter(getInput -> !newGetInputNames.contains(getInput.getInputName())) + .filter(getInput -> isValueContainsGetInput(getInput.getInputName(), newProp.getValue())) + .collect(Collectors.toList()); + } + + private boolean isValueContainsGetInput(String inputName, String value) { + String getInputEntry = "\"%s\":\"%s\""; + return value != null && value.contains(String.format(getInputEntry, ToscaFunctions.GET_INPUT.getFunctionName(), inputName)); + } + + + + + + + + + + +} diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/PropertyInstanceMergeDataBuilder.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/PropertyInstanceMergeDataBuilder.java new file mode 100644 index 0000000000..09f26a39ee --- /dev/null +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/PropertyInstanceMergeDataBuilder.java @@ -0,0 +1,79 @@ +package org.openecomp.sdc.be.components.merge.property; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import org.openecomp.sdc.be.dao.utils.MapUtil; +import org.openecomp.sdc.be.datatypes.elements.GetInputValueDataDefinition; +import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition; +import org.openecomp.sdc.be.model.InputDefinition; + +public class PropertyInstanceMergeDataBuilder { + + private final static PropertyInstanceMergeDataBuilder INSTANCE = new PropertyInstanceMergeDataBuilder(); + + private PropertyInstanceMergeDataBuilder() { + } + + public static PropertyInstanceMergeDataBuilder getInstance() { + return INSTANCE; + } + + public List buildDataForMerging(List oldProps, + List oldInputs, + List newProps, + List newInputs) { + + Map oldPropsByName = MapUtil.toMap(oldProps, T::getName); + Map oldInputsByName = MapUtil.toMap(oldInputs, InputDefinition::getName); + Map newPropsByName = MapUtil.toMap(newProps, T::getName); + Map newInputsByName = MapUtil.toMap(newInputs, InputDefinition::getName); + return buildMergeData(oldPropsByName, oldInputsByName, newPropsByName, newInputsByName); + + } + + private List buildMergeData(Map oldPropsByName, Map oldInputsByName, Map newPropsByName, Map newInputsByName) { + List mergeData = new ArrayList<>(); + newPropsByName.forEach((name, prop) -> { + if (oldPropsByName.containsKey(name)) { + mergeData.add(buildMergePropertyData(oldPropsByName.get(name), oldInputsByName, prop, newInputsByName)); + } + }); + return mergeData; + } + + private MergePropertyData buildMergePropertyData(PropertyDataDefinition oldProp, + Map oldInputsByName, + PropertyDataDefinition newProp, + Map newInputsByName) { + MergePropertyData mergePropertyData = new MergePropertyData(); + mergePropertyData.setOldProp(oldProp) + .setNewProp(newProp); + if (oldProp.isGetInputProperty()) { + setGetInputData(oldProp, oldInputsByName, newInputsByName, mergePropertyData); + + } + return mergePropertyData; + } + + private void setGetInputData(PropertyDataDefinition oldProp, Map oldInputsByName, Map newInputsByName, MergePropertyData mergePropertyData) { + List oldDeclaredByUserInputNames = getOldDeclaredInputsByUser(oldProp.getGetInputValues(), oldInputsByName); + List oldGetInputNamesWhichExistInNewVersion = getOldGetInputNamesWhichExistInNewVersion(oldProp.getGetInputValues(), newInputsByName); + mergePropertyData.addAddGetInputNamesToMerge(oldDeclaredByUserInputNames); + mergePropertyData.addAddGetInputNamesToMerge(oldGetInputNamesWhichExistInNewVersion); + } + + private List getOldGetInputNamesWhichExistInNewVersion(List getInputValues, Map newInputsByName) { + return getInputValues.stream().map(GetInputValueDataDefinition::getInputName).filter(newInputsByName::containsKey).collect(Collectors.toList()); + } + + private List getOldDeclaredInputsByUser(List getInputValues, Map oldInputsByName) { + return getInputValues.stream().map(GetInputValueDataDefinition::getInputName) + .map(oldInputsByName::get) + .filter(oldInput -> oldInput.getInstanceUniqueId() != null) + .map(PropertyDataDefinition::getName) + .collect(Collectors.toList()); + } +} diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/PropertyValueMerger.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/PropertyValueMerger.java new file mode 100644 index 0000000000..88601bb521 --- /dev/null +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/PropertyValueMerger.java @@ -0,0 +1,148 @@ +package org.openecomp.sdc.be.components.merge.property; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import org.apache.commons.lang.StringUtils; +import org.openecomp.sdc.be.components.impl.ImportUtils; + +public abstract class PropertyValueMerger { + + abstract Object merge(Object oldVal, Object newVal, List someStrings); + + @SuppressWarnings("unchecked") + /** + * merges property value oldVal into property value newVal recursively + * @param oldVal - cannot be {@code Null} + */ + protected Object mergeValues(Object oldVal, Object newVal, List getInputNamesToMerge) { + if (isEmptyValue(newVal)) { + return removeUnwantedGetInputValues(oldVal, getInputNamesToMerge); + } + if (isMapTypeValues(oldVal, newVal)) { + return mergeMapValue((Map) oldVal, (Map) newVal, getInputNamesToMerge); + } + if (isListTypeValues(oldVal, newVal)) { + return mergeListValue((List) oldVal, (List) newVal, getInputNamesToMerge); + } + if (isSameTypeValues(oldVal, newVal)) { + return mergeScalarValue(oldVal, newVal); + } + return newVal; + + } + + private Map mergeMapValue(Map oldValMap, Map newValMap, List getInputNamesToMerge) { + mergeEntriesExistInNewValue(oldValMap, newValMap, getInputNamesToMerge);//continue the recursion + setOldEntriesNotExistInNewValue(oldValMap, newValMap, getInputNamesToMerge); + return newValMap; + } + + private void mergeEntriesExistInNewValue(Map oldValMap, Map newValMap, List getInputNamesToMerge) { + for (Map.Entry newValEntry : newValMap.entrySet()) { + Object oldVal = oldValMap.get(newValEntry.getKey()); + if (oldVal != null) { + newValMap.put(newValEntry.getKey(), merge(oldVal, newValEntry.getValue(), getInputNamesToMerge)); + } + } + } + + private void setOldEntriesNotExistInNewValue(Map oldVal, Map newVal, List getInputNamesToMerge) { + for (Map.Entry oldValEntry : oldVal.entrySet()) { + if (!isGetInputEntry(oldValEntry) || isGetInputToMerge(getInputNamesToMerge, oldValEntry)) { + Object oldValObj = oldValEntry.getValue(); + newVal.computeIfAbsent(oldValEntry.getKey(), key -> removeUnwantedGetInputValues(oldValObj, getInputNamesToMerge)); + } + } + } + + private List mergeListValue(List oldVal, List newVal, List getInputNamesToMerge) { + List mergedList = mergeLists(oldVal, newVal, getInputNamesToMerge); + copyRestOfBiggerList(oldVal, newVal, getInputNamesToMerge, mergedList); + return mergedList; + } + + private void copyRestOfBiggerList(List oldVal, List newVal, List getInputNamesToMerge, List mergedList) { + if (oldVal.size() == newVal.size()) { + return; + } + int maxListSize = Math.max(oldVal.size(), newVal.size()); + List greaterList = newVal.size() == maxListSize ? newVal : oldVal; + for (int i = mergedList.size(); i < maxListSize; i ++) { + Object listVal = greaterList.get(i); + Object listValToMerge = greaterList == oldVal ? removeUnwantedGetInputValues(listVal, getInputNamesToMerge) : listVal; + mergedList.add(listValToMerge); + } + } + + private List mergeLists(List oldVal, List newVal, List getInputNamesToMerge) { + int minListSize = Math.min(oldVal.size(), newVal.size()); + List mergedList = new ArrayList<>(); + for (int i = 0; i < minListSize; i++) { + Object mergedVal = merge(oldVal.get(i), newVal.get(i), getInputNamesToMerge); + mergedList.add(mergedVal); + } + return mergedList; + } + + Object mergeScalarValue(Object oldVal, Object newVal) { + return isEmptyValue(newVal) ? oldVal : newVal; + } + + @SuppressWarnings("unchecked") + Object removeUnwantedGetInputValues(Object val, List getInputNamesToMerge) { + if (val instanceof Map) { + return removeUnwantedGetInputValues((Map) val, getInputNamesToMerge); + } + if (val instanceof List) { + return removeUnwantedGetInputValues((List)val, getInputNamesToMerge); + } + return val; + } + + private List removeUnwantedGetInputValues(List listVal, List getInputNamesToMerge) { + return listVal.stream().map(val -> removeUnwantedGetInputValues(val, getInputNamesToMerge)).collect(Collectors.toList()); + } + + private Map removeUnwantedGetInputValues(Map val, List getInputNamesToMerge) { + return val.entrySet().stream().filter(entry -> !isGetInputEntry(entry) || isGetInputToMerge(getInputNamesToMerge, entry)) + .collect(Collectors.toMap(Map.Entry::getKey, entry -> removeUnwantedGetInputValues(entry.getValue(), getInputNamesToMerge))); + } + + private boolean isGetInputToMerge(List getInputNamesToMerge, Map.Entry entry) { + return getInputNamesToMerge.contains(retrieveGetInputInputName(entry.getValue())); + } + + private boolean isMapTypeValues(Object oldVal, Object newVal) { + return newVal instanceof Map && oldVal instanceof Map; + } + + private boolean isListTypeValues(Object oldVal, Object newVal) { + return newVal instanceof List && oldVal instanceof List; + } + + private boolean isSameTypeValues(Object oldVal, Object newVal) { + return oldVal.getClass().equals(newVal.getClass()); + } + + private String retrieveGetInputInputName(Object getInputValue) { + return getInputValue instanceof List ? (String)((List) getInputValue).get(0) : (String)getInputValue; + } + + private boolean isGetInputEntry(Map.Entry oldValEntry) { + return oldValEntry.getKey().equals(ImportUtils.ToscaTagNamesEnum.GET_INPUT.getElementName()); + } + + private boolean isEmptyValue(Object val) { + return val == null || + val instanceof String && StringUtils.isEmpty((String)val) || + val instanceof Map && ((Map) val).isEmpty() || + val instanceof List && ((List) val).isEmpty(); + + + } + + +} diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/ScalarPropertyValueMerger.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/ScalarPropertyValueMerger.java new file mode 100644 index 0000000000..39381e7322 --- /dev/null +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/property/ScalarPropertyValueMerger.java @@ -0,0 +1,20 @@ +package org.openecomp.sdc.be.components.merge.property; + +import java.util.List; + +import org.springframework.stereotype.Component; + +@Component("scalar-prop-value-merger") +public class ScalarPropertyValueMerger extends PropertyValueMerger { + + private final static ScalarPropertyValueMerger INSTANCE = new ScalarPropertyValueMerger(); + + public static PropertyValueMerger getInstance() { + return INSTANCE; + } + + @Override + Object merge(Object oldVal, Object newVal, List getInputNamesToMerge) { + return mergeScalarValue(removeUnwantedGetInputValues(oldVal, getInputNamesToMerge), newVal); + } +} diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/resource/MergeResourceBLFactory.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/resource/MergeResourceBLFactory.java new file mode 100644 index 0000000000..9d11eb9aaf --- /dev/null +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/resource/MergeResourceBLFactory.java @@ -0,0 +1,33 @@ +package org.openecomp.sdc.be.components.merge.resource; + + +import org.openecomp.sdc.be.components.merge.GlobalTypesMergeBusinessLogic; +import org.openecomp.sdc.be.components.merge.TopologyComparator; +import org.openecomp.sdc.be.dao.api.ActionStatus; +import org.openecomp.sdc.be.model.Resource; +import org.springframework.stereotype.Component; + +import fj.data.Either; + +@Component +public class MergeResourceBLFactory { + + @javax.annotation.Resource + private ResourceDataMergeBusinessLogic resourceDataMergeBusinessLogic; + + @javax.annotation.Resource + private GlobalTypesMergeBusinessLogic globalTypesMergeBusinessLogic; + + @javax.annotation.Resource + private TopologyComparator topologyComparator; + + public Either getInstance(Resource oldResource, Resource newResource) { + Either isTopologyChangeEither = topologyComparator.isTopologyChanged(oldResource, newResource); + return isTopologyChangeEither.bimap(this::getInstance, actionStatus -> actionStatus); + } + + private MergeResourceBusinessLogic getInstance(boolean topologyChanged) { + return topologyChanged ? globalTypesMergeBusinessLogic : resourceDataMergeBusinessLogic; + } + +} diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/resource/MergeResourceBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/resource/MergeResourceBusinessLogic.java new file mode 100644 index 0000000000..f3bc0c2395 --- /dev/null +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/resource/MergeResourceBusinessLogic.java @@ -0,0 +1,10 @@ +package org.openecomp.sdc.be.components.merge.resource; + +import org.openecomp.sdc.be.dao.api.ActionStatus; +import org.openecomp.sdc.be.model.Resource; + +public interface MergeResourceBusinessLogic { + + ActionStatus mergeResourceEntities(Resource oldResource, Resource newResource); + +} diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/resource/ResourceDataMergeBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/resource/ResourceDataMergeBusinessLogic.java new file mode 100644 index 0000000000..251fb1a64e --- /dev/null +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/merge/resource/ResourceDataMergeBusinessLogic.java @@ -0,0 +1,62 @@ +package org.openecomp.sdc.be.components.merge.resource; + +import java.util.ArrayList; +import java.util.List; + +import org.openecomp.sdc.be.components.merge.input.ComponentInputsMergeBL; +import org.openecomp.sdc.be.components.merge.property.ComponentInstanceInputsMergeBL; +import org.openecomp.sdc.be.components.merge.property.ComponentInstancePropertiesMergeBL; +import org.openecomp.sdc.be.dao.api.ActionStatus; +import org.openecomp.sdc.be.model.InputDefinition; +import org.openecomp.sdc.be.model.Resource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +@Component +public class ResourceDataMergeBusinessLogic implements MergeResourceBusinessLogic { + + private final static Logger log = LoggerFactory.getLogger(ResourceDataMergeBusinessLogic.class.getName()); + + @javax.annotation.Resource + private ComponentInputsMergeBL inputsValuesMergeBL; + + @javax.annotation.Resource + private ComponentInstancePropertiesMergeBL instancePropertiesValueMergeBL; + + @javax.annotation.Resource + private ComponentInstanceInputsMergeBL instanceInputsValueMergeBL; + + @Override + public ActionStatus mergeResourceEntities(Resource oldResource, Resource newResource) { + if (oldResource == null) { + return ActionStatus.OK; + } + + ActionStatus mergeInstInputsStatus = instancePropertiesValueMergeBL.mergeComponentInstancesProperties(oldResource, newResource); + if (mergeInstInputsStatus != ActionStatus.OK) { + log.error("failed to merge instance properties of resource {} status is {}", newResource.getUniqueId(), mergeInstInputsStatus); + return mergeInstInputsStatus; + } + + ActionStatus mergeInstPropsStatus = instanceInputsValueMergeBL.mergeComponentInstancesInputs(oldResource, newResource); + if (mergeInstPropsStatus != ActionStatus.OK) { + log.error("failed to merge instance inputs of resource {} status is {}", newResource.getUniqueId(), mergeInstPropsStatus); + return mergeInstPropsStatus; + } + + ActionStatus mergeInputsStatus = mergeInputs(oldResource, newResource); + if (mergeInputsStatus != ActionStatus.OK) { + log.error("failed to merge inputs of resource {} status is {}", newResource.getUniqueId(), mergeInputsStatus); + return mergeInputsStatus; + } + return ActionStatus.OK; + } + + private ActionStatus mergeInputs(Resource oldResource, Resource newResource) { + List inputsToMerge = newResource.getInputs() != null ? newResource.getInputs() : new ArrayList<>(); + return inputsValuesMergeBL.mergeAndRedeclareComponentInputs(oldResource, newResource, inputsToMerge); + } + + +} diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/validation/ComponentValidations.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/validation/ComponentValidations.java index 7964b4406c..15fff52ab9 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/validation/ComponentValidations.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/validation/ComponentValidations.java @@ -20,12 +20,12 @@ package org.openecomp.sdc.be.components.validation; -import org.openecomp.sdc.be.model.Component; -import org.openecomp.sdc.be.model.ComponentInstance; - import java.util.Optional; import java.util.stream.Collectors; +import org.openecomp.sdc.be.model.Component; +import org.openecomp.sdc.be.model.ComponentInstance; + public class ComponentValidations { public static boolean validateComponentInstanceExist(Component component, String instanceId) { diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/exception/SdcActionException.java b/catalog-be/src/main/java/org/openecomp/sdc/be/exception/SdcActionException.java new file mode 100644 index 0000000000..5c6a437b3d --- /dev/null +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/exception/SdcActionException.java @@ -0,0 +1,16 @@ +package org.openecomp.sdc.be.exception; + +import org.openecomp.sdc.be.dao.api.ActionStatus; + +public class SdcActionException extends RuntimeException { + + private ActionStatus actionStatus; + + public SdcActionException(ActionStatus actionStatus) { + this.actionStatus = actionStatus; + } + + public ActionStatus getActionStatus() { + return actionStatus; + } +} diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ArtifactExternalServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ArtifactExternalServlet.java index 1c2f175cfb..f5fcf628cd 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ArtifactExternalServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ArtifactExternalServlet.java @@ -57,6 +57,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.jcabi.aspects.Loggable; + +import fj.data.Either; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -65,8 +67,6 @@ import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; -import fj.data.Either; - /** * This Servlet serves external users operations on artifacts. * diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/impl/ComponentsUtils.java b/catalog-be/src/main/java/org/openecomp/sdc/be/impl/ComponentsUtils.java index 8c066c8fde..910521c8dc 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/impl/ComponentsUtils.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/impl/ComponentsUtils.java @@ -21,8 +21,11 @@ package org.openecomp.sdc.be.impl; import java.lang.reflect.Type; -import java.security.cert.CollectionCertStoreParameters; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.EnumMap; +import java.util.List; +import java.util.Map; import java.util.regex.Pattern; import javax.annotation.PostConstruct; @@ -39,20 +42,28 @@ import org.openecomp.sdc.be.components.impl.ResponseFormatManager; import org.openecomp.sdc.be.config.BeEcompErrorManager; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.graph.datatype.AdditionalInformationEnum; -import org.openecomp.sdc.be.dao.utils.CollectionUtils; import org.openecomp.sdc.be.datatypes.elements.AdditionalInfoParameterInfo; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields; import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; -import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition; -import org.openecomp.sdc.be.model.*; +import org.openecomp.sdc.be.model.ArtifactDefinition; +import org.openecomp.sdc.be.model.CapabilityTypeDefinition; +import org.openecomp.sdc.be.model.Component; +import org.openecomp.sdc.be.model.ConsumerDefinition; +import org.openecomp.sdc.be.model.DataTypeDefinition; +import org.openecomp.sdc.be.model.GroupTypeDefinition; +import org.openecomp.sdc.be.model.PolicyTypeDefinition; +import org.openecomp.sdc.be.model.PropertyConstraint; +import org.openecomp.sdc.be.model.RequirementDefinition; +import org.openecomp.sdc.be.model.Resource; +import org.openecomp.sdc.be.model.Service; +import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; import org.openecomp.sdc.be.model.operations.impl.PropertyOperation.PropertyConstraintDeserialiser; import org.openecomp.sdc.be.model.operations.impl.PropertyOperation.PropertyConstraintJacksonDeserialiser; import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum; import org.openecomp.sdc.be.tosca.ToscaError; import org.openecomp.sdc.common.api.Constants; -import org.openecomp.sdc.common.config.EcompErrorName; import org.openecomp.sdc.common.datastructure.AuditingFieldsKeysEnum; import org.openecomp.sdc.common.util.ThreadLocalsHolder; import org.openecomp.sdc.common.util.ValidationUtils; @@ -91,7 +102,6 @@ public class ComponentsUtils { public Either convertJsonToObject(String data, User user, Class clazz, AuditingActionEnum actionEnum) { if (data == null) { - BeEcompErrorManager.getInstance().processEcompError(EcompErrorName.BeInvalidJsonInput, "convertJsonToObject"); BeEcompErrorManager.getInstance().logBeInvalidJsonInput("convertJsonToObject"); log.debug("object is null after converting from json"); ResponseFormat responseFormat = getInvalidContentErrorAndAudit(user, actionEnum); @@ -102,7 +112,6 @@ public class ComponentsUtils { return Either.left(obj); } catch (Exception e) { // INVALID JSON - BeEcompErrorManager.getInstance().processEcompError(EcompErrorName.BeInvalidJsonInput, "convertJsonToObject"); BeEcompErrorManager.getInstance().logBeInvalidJsonInput("convertJsonToObject"); log.debug("failed to convert from json {}", data, e); ResponseFormat responseFormat = getInvalidContentErrorAndAudit(user, actionEnum); @@ -134,14 +143,12 @@ public class ComponentsUtils { component = mapper.readValue(data, clazz); if (component == null) { - BeEcompErrorManager.getInstance().processEcompError(EcompErrorName.BeInvalidJsonInput, "convertJsonToObject"); BeEcompErrorManager.getInstance().logBeInvalidJsonInput("convertJsonToObject"); log.debug("object is null after converting from json"); ResponseFormat responseFormat = getInvalidContentErrorAndAuditComponent(user, actionEnum, typeEnum); return Either.right(responseFormat); } } catch (Exception e) { - BeEcompErrorManager.getInstance().processEcompError(EcompErrorName.BeInvalidJsonInput, "convertJsonToObject"); BeEcompErrorManager.getInstance().logBeInvalidJsonInput("convertJsonToObject"); log.debug("failed to convert from json {}", data, e); ResponseFormat responseFormat = getInvalidContentErrorAndAuditComponent(user, actionEnum, typeEnum); @@ -160,6 +167,10 @@ public class ComponentsUtils { return responseFormatManager.getResponseFormat(actionStatus, params); } + public ResponseFormat getResponseFormat(StorageOperationStatus storageStatus, String... params) { + return responseFormatManager.getResponseFormat(this.convertFromStorageResponse(storageStatus), params); + } + /** * Returns the response format of resource error with respective variables according to actionStatus. This is needed for cases where actionStatus is anonymously converted from storage operation, and the caller doesn't know what actionStatus he * received. It's caller's Responsibility to fill the resource object passed to this function with needed fields. @@ -238,8 +249,8 @@ public class ComponentsUtils { switch (actionStatus) { case MISSING_CAPABILITY_TYPE: - if (obj instanceof List && org.apache.commons.collections.CollectionUtils.isNotEmpty((List) obj)){ - List list = (List)obj; + if (obj instanceof List && org.apache.commons.collections.CollectionUtils.isNotEmpty((List) obj)){ + List list = (List)obj; if ( list.get(0) instanceof RequirementDefinition ) { responseFormat = getResponseFormat(ActionStatus.MISSING_CAPABILITY_TYPE, ((RequirementDefinition) list.get(0)).getName()); //Arbitray index, all we need is single object return responseFormat; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/impl/DownloadArtifactLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/impl/DownloadArtifactLogic.java index cfa108ed80..ddc5ecabe7 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/impl/DownloadArtifactLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/impl/DownloadArtifactLogic.java @@ -43,7 +43,6 @@ import org.openecomp.sdc.be.info.ServletJsonResponse; import org.openecomp.sdc.be.resources.data.ESArtifactData; import org.openecomp.sdc.common.api.Constants; import org.openecomp.sdc.common.config.EcompErrorName; -import org.openecomp.sdc.common.util.GeneralUtility; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactDefinitionInfo.java b/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactDefinitionInfo.java index 163d220871..dfdfeac741 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactDefinitionInfo.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactDefinitionInfo.java @@ -21,7 +21,6 @@ package org.openecomp.sdc.be.info; import org.openecomp.sdc.be.model.ArtifactDefinition; -import org.openecomp.sdc.common.api.ArtifactGroupTypeEnum; public class ArtifactDefinitionInfo { diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactTemplateInfo.java b/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactTemplateInfo.java index 0f1bf4603d..f78b7dfead 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactTemplateInfo.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/info/ArtifactTemplateInfo.java @@ -27,8 +27,8 @@ import java.util.Map; import java.util.Set; import org.openecomp.sdc.be.config.BeEcompErrorManager; -import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.config.Configuration.ArtifactTypeConfig; +import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; import org.openecomp.sdc.be.impl.ComponentsUtils; @@ -177,13 +177,17 @@ public class ArtifactTemplateInfo { String correctType = type; if (type.equalsIgnoreCase(CSAR_NESTED)) correctType = ArtifactTypeEnum.HEAT_NESTED.getType(); - else if ((type.equalsIgnoreCase(CSAR_VOLUME))) + else if (type.equalsIgnoreCase(CSAR_VOLUME)) correctType = ArtifactTypeEnum.HEAT_VOL.getType(); - else if ((type.equalsIgnoreCase(CSAR_NETWORK))) + else if (type.equalsIgnoreCase(CSAR_NETWORK)) correctType = ArtifactTypeEnum.HEAT_NET.getType(); - else if ((type.equalsIgnoreCase(CSAR_ARTIFACT))) - correctType = ArtifactTypeEnum.HEAT_ARTIFACT.getType(); - else if ((type.equalsIgnoreCase(CSAR_HEAT))) + else if (type.equalsIgnoreCase(CSAR_ARTIFACT)){ + if( parentArtifact != null) + correctType = ArtifactTypeEnum.HEAT_ARTIFACT.getType(); + else + correctType = resourceInfo.type; + } + else if (type.equalsIgnoreCase(CSAR_HEAT)) correctType = ArtifactTypeEnum.HEAT.getType(); else correctType = ArtifactTypeEnum.OTHER.getType(); diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/info/GroupDefinitionInfo.java b/catalog-be/src/main/java/org/openecomp/sdc/be/info/GroupDefinitionInfo.java index 05af87d789..ea495267bd 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/info/GroupDefinitionInfo.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/info/GroupDefinitionInfo.java @@ -21,6 +21,7 @@ package org.openecomp.sdc.be.info; import java.util.List; + import org.openecomp.sdc.be.model.GroupDefinition; import org.openecomp.sdc.be.model.GroupInstance; import org.openecomp.sdc.be.model.GroupProperty; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/info/MergedArtifactInfo.java b/catalog-be/src/main/java/org/openecomp/sdc/be/info/MergedArtifactInfo.java index 25b6b3564b..62ee5b6f81 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/info/MergedArtifactInfo.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/info/MergedArtifactInfo.java @@ -23,14 +23,12 @@ package org.openecomp.sdc.be.info; import java.util.ArrayList; import java.util.HashSet; import java.util.List; -import java.util.Map; +import java.util.Optional; import java.util.Set; import org.apache.commons.lang3.tuple.ImmutablePair; import org.openecomp.sdc.be.model.ArtifactDefinition; -import java.util.Optional; - public class MergedArtifactInfo { private List createdArtifact; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/listen/BEAppContextListener.java b/catalog-be/src/main/java/org/openecomp/sdc/be/listen/BEAppContextListener.java index fa31989d87..83cda6ef87 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/listen/BEAppContextListener.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/listen/BEAppContextListener.java @@ -20,6 +20,15 @@ package org.openecomp.sdc.be.listen; +import java.io.IOException; +import java.io.InputStream; +import java.util.jar.Attributes; +import java.util.jar.Manifest; + +import javax.servlet.ServletContext; +import javax.servlet.ServletContextEvent; +import javax.servlet.ServletContextListener; + import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.impl.DownloadArtifactLogic; import org.openecomp.sdc.be.impl.WebAppContextWrapper; @@ -29,15 +38,6 @@ import org.openecomp.sdc.common.impl.ExternalConfiguration; import org.openecomp.sdc.common.listener.AppContextListener; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.web.context.WebApplicationContext; - -import javax.servlet.ServletContext; -import javax.servlet.ServletContextEvent; -import javax.servlet.ServletContextListener; -import java.io.IOException; -import java.io.InputStream; -import java.util.jar.Attributes; -import java.util.jar.Manifest; public class BEAppContextListener extends AppContextListener implements ServletContextListener { diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AdditionalInformationServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AdditionalInformationServlet.java index 15b3eb20c6..ae103dbaca 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AdditionalInformationServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AdditionalInformationServlet.java @@ -51,14 +51,14 @@ import org.slf4j.LoggerFactory; import org.springframework.web.context.WebApplicationContext; import com.jcabi.aspects.Loggable; + +import fj.data.Either; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; -import fj.data.Either; - @Loggable(prepend = true, value = Loggable.DEBUG, trim = false) @Path("/v1/catalog") @Api(value = "Additional Information Servlet", description = "Additional Information Servlet") diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ArtifactServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ArtifactServlet.java index 7c7da97ef0..5a26b7c4e6 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ArtifactServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ArtifactServlet.java @@ -53,14 +53,14 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.jcabi.aspects.Loggable; + +import fj.data.Either; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; -import fj.data.Either; - /** * Root resource (exposed at "/" path) */ diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AttributeServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AttributeServlet.java index 049212dd19..1b02e0afa4 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AttributeServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AttributeServlet.java @@ -49,14 +49,14 @@ import org.slf4j.LoggerFactory; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.jcabi.aspects.Loggable; + +import fj.data.Either; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; -import fj.data.Either; - /** * Web Servlet for actions on Attributes * diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/BeGenericServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/BeGenericServlet.java index 4278378bbc..7407a4dff3 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/BeGenericServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/BeGenericServlet.java @@ -20,7 +20,6 @@ package org.openecomp.sdc.be.servlets; -import java.util.EnumMap; import java.util.Map; import java.util.Map.Entry; import java.util.function.Supplier; @@ -57,7 +56,6 @@ import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum; import org.openecomp.sdc.be.user.UserBusinessLogic; import org.openecomp.sdc.common.api.Constants; import org.openecomp.sdc.common.config.EcompErrorName; -import org.openecomp.sdc.common.datastructure.AuditingFieldsKeysEnum; import org.openecomp.sdc.common.servlets.BasicServlet; import org.openecomp.sdc.exception.ResponseFormat; import org.slf4j.Logger; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/BeMonitoringServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/BeMonitoringServlet.java index 8e08ecf600..81f1775a01 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/BeMonitoringServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/BeMonitoringServlet.java @@ -34,6 +34,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; +import org.apache.commons.lang3.tuple.Pair; import org.openecomp.sdc.be.components.impl.HealthCheckBusinessLogic; import org.openecomp.sdc.be.components.impl.MonitoringBusinessLogic; import org.openecomp.sdc.be.config.BeEcompErrorManager; @@ -41,8 +42,6 @@ import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.impl.WebAppContextWrapper; import org.openecomp.sdc.common.api.Constants; import org.openecomp.sdc.common.api.HealthCheckInfo; -import org.openecomp.sdc.common.api.HealthCheckInfo.HealthCheckComponent; -import org.openecomp.sdc.common.api.HealthCheckInfo.HealthCheckStatus; import org.openecomp.sdc.common.api.HealthCheckWrapper; import org.openecomp.sdc.common.config.EcompErrorName; import org.openecomp.sdc.common.monitoring.MonitoringEvent; @@ -54,13 +53,13 @@ import org.springframework.web.context.WebApplicationContext; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.jcabi.aspects.Loggable; + +import fj.data.Either; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; -import fj.data.Either; - @Loggable(prepend = true, value = Loggable.TRACE, trim = false) @Path("/") @Api(value = "BE Monitoring", description = "BE Monitoring") @@ -75,22 +74,20 @@ public class BeMonitoringServlet extends BeGenericServlet { @Path("/healthCheck") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) - @ApiOperation(value = "return aggregate BE health check of Titan, ES and BE", notes = "return BE health check", response = String.class) - @ApiResponses(value = { @ApiResponse(code = 200, message = "Titan, ES and BE are all up"), @ApiResponse(code = 500, message = "One or more BE components (Titan, ES, BE) are down") }) + @ApiOperation(value = "Return aggregate BE health check of SDC BE components", notes = "return BE health check", response = String.class) + @ApiResponses(value = { @ApiResponse(code = 200, message = "SDC BE components are all up"), @ApiResponse(code = 500, message = "One or more SDC BE components are down") }) public Response getHealthCheck(@Context final HttpServletRequest request) { try { HealthCheckBusinessLogic healthCheckBusinessLogic = getHealthCheckBL(request.getSession().getServletContext()); - List beHealthCheckInfos = healthCheckBusinessLogic.getBeHealthCheckInfosStatus(); - - // List beHealthCheckInfos = - // HealthCheckBusinessLogic.getInstance().getBeHealthCheckInfos(request.getSession().getServletContext()); - ActionStatus status = getAggregateBeStatus(beHealthCheckInfos); + Pair> beHealthCheckInfosStatus = healthCheckBusinessLogic.getBeHealthCheckInfosStatus(); + Boolean aggregateStatus = beHealthCheckInfosStatus.getLeft(); + ActionStatus status = aggregateStatus ? ActionStatus.OK : ActionStatus.GENERAL_ERROR; String sdcVersion = getVersionFromContext(request); if (sdcVersion == null || sdcVersion.isEmpty()) { sdcVersion = "UNKNOWN"; } String siteMode = healthCheckBusinessLogic.getSiteMode(); - HealthCheckWrapper healthCheck = new HealthCheckWrapper(beHealthCheckInfos, sdcVersion, siteMode); + HealthCheckWrapper healthCheck = new HealthCheckWrapper(beHealthCheckInfosStatus.getRight(), sdcVersion, siteMode); // The response can be either with 200 or 500 aggregate status - the // body of individual statuses is returned either way @@ -168,17 +165,6 @@ public class BeMonitoringServlet extends BeGenericServlet { return version; } - private ActionStatus getAggregateBeStatus(List beHealthCheckInfos) { - ActionStatus status = ActionStatus.OK; - for (HealthCheckInfo healthCheckInfo : beHealthCheckInfos) { - if (healthCheckInfo.getHealthCheckStatus().equals(HealthCheckStatus.DOWN) && healthCheckInfo.getHealthCheckComponent() != HealthCheckComponent.DE) { - status = ActionStatus.GENERAL_ERROR; - break; - } - } - return status; - } - protected MonitoringEvent convertContentToJson(String content, Class clazz) { MonitoringEvent object = null; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentInstanceServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentInstanceServlet.java index a89d8b109b..b5971670cf 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentInstanceServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentInstanceServlet.java @@ -22,6 +22,7 @@ package org.openecomp.sdc.be.servlets; import java.io.InputStream; import java.lang.reflect.Type; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -42,6 +43,7 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringUtils; import org.codehaus.jackson.map.ObjectMapper; import org.openecomp.sdc.be.components.impl.ComponentInstanceBusinessLogic; import org.openecomp.sdc.be.components.impl.GroupBusinessLogic; @@ -78,12 +80,11 @@ import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; /** - * Root resource (exposed at "/" path) - * .json + * Root resource (exposed at "/" path) .json */ @Loggable(prepend = true, value = Loggable.DEBUG, trim = false) @Path("/v1/catalog") -@Api(value = "Resource Instance Servlet", description = "Resource Instance Servlet") +@Api(value = "Resource Instance Servlet") @Singleton public class ComponentInstanceServlet extends AbstractValidationsServlet { @@ -227,9 +228,6 @@ public class ComponentInstanceServlet extends AbstractValidationsServlet { if (convertResponse.isRight()) { // Using both ECOMP error methods, show to Sofer BeEcompErrorManager.getInstance().logBeSystemError("Resource Instance - updateResourceInstance"); - /* - * BeEcompErrorManager.getInstance().processEcompError( EcompErrorName.BeSystemError, "Resource Instance - updateResourceInstance"); - */ log.debug("Failed to convert received data to BE format."); return buildErrorResponse(convertResponse.right().value()); } @@ -358,8 +356,8 @@ public class ComponentInstanceServlet extends AbstractValidationsServlet { public Response dissociateRIFromRI( @ApiParam(value = "allowed values are resources /services / products", allowableValues = ComponentTypeEnum.RESOURCE_PARAM_NAME + "," + ComponentTypeEnum.SERVICE_PARAM_NAME + "," + ComponentTypeEnum.PRODUCT_PARAM_NAME, required = true) @PathParam("containerComponentType") final String containerComponentType, - @ApiParam(value = "unique id of the container component") @PathParam("componentId") final String componentId, @HeaderParam(value = Constants.USER_ID_HEADER) String userId, @ApiParam(value = "RelationshipInfo", required = true) String data, - @Context final HttpServletRequest request) { + @ApiParam(value = "unique id of the container component") @PathParam("componentId") final String componentId, @HeaderParam(value = Constants.USER_ID_HEADER) String userId, + @ApiParam(value = "RelationshipInfo", required = true) String data, @Context final HttpServletRequest request) { ServletContext context = request.getSession().getServletContext(); String url = request.getMethod() + " " + request.getRequestURI(); @@ -517,7 +515,7 @@ public class ComponentInstanceServlet extends AbstractValidationsServlet { } } - + @POST @Path("/{containerComponentType}/{componentId}/resourceInstance/{componentInstanceId}/input") @Consumes(MediaType.APPLICATION_JSON) @@ -535,8 +533,7 @@ public class ComponentInstanceServlet extends AbstractValidationsServlet { try { Wrapper dataWrapper = new Wrapper<>(); Wrapper errorWrapper = new Wrapper<>(); - Wrapper propertyWrapper = new Wrapper<>(); - + validateInputStream(request, dataWrapper, errorWrapper); ComponentInstanceInput property = null; @@ -544,21 +541,22 @@ public class ComponentInstanceServlet extends AbstractValidationsServlet { User modifier = new User(); modifier.setUserId(userId); log.debug("modifier id is {}", userId); - - Either inputEither = getComponentsUtils().convertJsonToObjectUsingObjectMapper(dataWrapper.getInnerElement(), modifier, ComponentInstanceInput.class, AuditingActionEnum.UPDATE_RESOURCE_METADATA, ComponentTypeEnum.SERVICE);; - if(inputEither.isRight()){ + + Either inputEither = getComponentsUtils().convertJsonToObjectUsingObjectMapper(dataWrapper.getInnerElement(), modifier, ComponentInstanceInput.class, AuditingActionEnum.UPDATE_RESOURCE_METADATA, + ComponentTypeEnum.SERVICE); + ; + if (inputEither.isRight()) { log.debug("Failed to convert data to input definition. Status is {}", inputEither.right().value()); return buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.INVALID_CONTENT)); } property = inputEither.left().value(); - + } if (property == null) { return buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.INVALID_CONTENT)); } - log.debug("Start handle request of updateResourceInstanceProperty. Received property is {}", property); ServletContext context = request.getSession().getServletContext(); @@ -743,7 +741,7 @@ public class ComponentInstanceServlet extends AbstractValidationsServlet { } } - + @POST @Path("/{containerComponentType}/{componentId}/resourceInstance/{componentInstanceId}/groupInstance/{groupInstanceId}/property") @Consumes(MediaType.APPLICATION_JSON) @@ -752,8 +750,8 @@ public class ComponentInstanceServlet extends AbstractValidationsServlet { @ApiResponses(value = { @ApiResponse(code = 201, message = "Resource instance created"), @ApiResponse(code = 403, message = "Restricted operation"), @ApiResponse(code = 400, message = "Invalid content / Missing content") }) public Response updateGroupInstanceProperty(@ApiParam(value = "service id") @PathParam("componentId") final String componentId, @ApiParam(value = "valid values: resources / services", allowableValues = ComponentTypeEnum.RESOURCE_PARAM_NAME + "," + ComponentTypeEnum.SERVICE_PARAM_NAME) @PathParam("containerComponentType") final String containerComponentType, - @ApiParam(value = "resource instance id") @PathParam("componentInstanceId") final String componentInstanceId, @ApiParam(value = "group instance id") @PathParam("groupInstanceId") final String groupInstanceId, @ApiParam(value = "id of user initiating the operation") @HeaderParam(value = Constants.USER_ID_HEADER) String userId, - @Context final HttpServletRequest request) { + @ApiParam(value = "resource instance id") @PathParam("componentInstanceId") final String componentInstanceId, @ApiParam(value = "group instance id") @PathParam("groupInstanceId") final String groupInstanceId, + @ApiParam(value = "id of user initiating the operation") @HeaderParam(value = Constants.USER_ID_HEADER) String userId, @Context final HttpServletRequest request) { String url = request.getMethod() + " " + request.getRequestURI(); log.debug("Start handle request of {}", url); @@ -803,15 +801,15 @@ public class ComponentInstanceServlet extends AbstractValidationsServlet { } } - + @GET @Path("/{containerComponentType}/{componentId}/resourceInstance/{componentInstanceId}/groupInstance/{groupInstId}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @ApiOperation(value = "Get group artifacts ", httpMethod = "GET", notes = "Returns artifacts metadata according to groupInstId", response = Resource.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "group found"), @ApiResponse(code = 403, message = "Restricted operation"), @ApiResponse(code = 404, message = "Group not found") }) - public Response getGroupArtifactById(@PathParam("containerComponentType") final String containerComponentType, @PathParam("componentId") final String componentId, @PathParam("componentInstanceId") final String componentInstanceId, @PathParam("groupInstId") final String groupInstId, - @Context final HttpServletRequest request, @HeaderParam(value = Constants.USER_ID_HEADER) String userId) { + public Response getGroupArtifactById(@PathParam("containerComponentType") final String containerComponentType, @PathParam("componentId") final String componentId, @PathParam("componentInstanceId") final String componentInstanceId, + @PathParam("groupInstId") final String groupInstId, @Context final HttpServletRequest request, @HeaderParam(value = Constants.USER_ID_HEADER) String userId) { ServletContext context = request.getSession().getServletContext(); String url = request.getMethod() + " " + request.getRequestURI(); log.debug("(GET) Start handle request of {}", url); @@ -836,22 +834,17 @@ public class ComponentInstanceServlet extends AbstractValidationsServlet { } } - - //US831698 + + // US831698 @GET @Path("/{containerComponentType}/{containerComponentId}/componentInstances/{componentInstanceUniqueId}/properties") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) - @ApiOperation(value = "Get component instance properties", httpMethod = "GET", - notes = "Returns component instance properties", response = Response.class) - @ApiResponses(value = { @ApiResponse(code = 200, message = "Properties found"), - @ApiResponse(code = 403, message = "Restricted operation"), - @ApiResponse(code = 404, message = "Component/Component Instance - not found") }) - public Response getInstancePropertiesById(@PathParam("containerComponentType") final String containerComponentType, - @PathParam("containerComponentId") final String containerComponentId, - @PathParam("componentInstanceUniqueId") final String componentInstanceUniqueId, - @Context final HttpServletRequest request, @HeaderParam(value = Constants.USER_ID_HEADER) String userId) { - + @ApiOperation(value = "Get component instance properties", httpMethod = "GET", notes = "Returns component instance properties", response = Response.class) + @ApiResponses(value = { @ApiResponse(code = 200, message = "Properties found"), @ApiResponse(code = 403, message = "Restricted operation"), @ApiResponse(code = 404, message = "Component/Component Instance - not found") }) + public Response getInstancePropertiesById(@PathParam("containerComponentType") final String containerComponentType, @PathParam("containerComponentId") final String containerComponentId, + @PathParam("componentInstanceUniqueId") final String componentInstanceUniqueId, @Context final HttpServletRequest request, @HeaderParam(value = Constants.USER_ID_HEADER) String userId) { + ServletContext context = request.getSession().getServletContext(); String url = request.getMethod() + " " + request.getRequestURI(); log.debug("(GET) Start handle request of {}", url); @@ -859,19 +852,15 @@ public class ComponentInstanceServlet extends AbstractValidationsServlet { try { ComponentTypeEnum componentTypeEnum = ComponentTypeEnum.findByParamName(containerComponentType); ComponentInstanceBusinessLogic componentInstanceBL = getComponentInstanceBL(context, componentTypeEnum); - - Either, ResponseFormat> componentInstancePropertiesById = componentInstanceBL - .getComponentInstancePropertiesById(containerComponentType, containerComponentId, - componentInstanceUniqueId, userId); + + Either, ResponseFormat> componentInstancePropertiesById = componentInstanceBL.getComponentInstancePropertiesById(containerComponentType, containerComponentId, componentInstanceUniqueId, userId); if (componentInstancePropertiesById.isRight()) { - log.debug("Failed to get properties of component instance ID: {} in {} with ID: {}", - componentInstanceUniqueId, containerComponentType, containerComponentId); + log.debug("Failed to get properties of component instance ID: {} in {} with ID: {}", componentInstanceUniqueId, containerComponentType, containerComponentId); return buildErrorResponse(componentInstancePropertiesById.right().value()); } - return buildOkResponse(getComponentsUtils(). - getResponseFormat(ActionStatus.OK), componentInstancePropertiesById.left().value()); + return buildOkResponse(getComponentsUtils().getResponseFormat(ActionStatus.OK), componentInstancePropertiesById.left().value()); } catch (Exception e) { BeEcompErrorManager.getInstance().logBeRestApiGeneralError("getGroupArtifactById"); log.debug("getGroupArtifactById unexpected exception", e); @@ -879,7 +868,102 @@ public class ComponentInstanceServlet extends AbstractValidationsServlet { } } - + + // US330353 + @GET + @Path("/{containerComponentType}/{containerComponentId}/componentInstances/{componentInstanceUniqueId}/capability/{capabilityType}/capabilityName/{capabilityName}/properties") + @Consumes(MediaType.APPLICATION_JSON) + @Produces(MediaType.APPLICATION_JSON) + @ApiOperation(value = "Get component instance capability properties", httpMethod = "GET", notes = "Returns component instance capability properties", response = Response.class) + @ApiResponses(value = { @ApiResponse(code = 200, message = "Properties found"), @ApiResponse(code = 403, message = "Restricted operation"), @ApiResponse(code = 404, message = "Component/Component Instance/Capability - not found") }) + public Response getInstanceCapabilityPropertiesById(@PathParam("containerComponentType") final String containerComponentType, @PathParam("containerComponentId") final String containerComponentId, + @PathParam("componentInstanceUniqueId") final String componentInstanceUniqueId, @PathParam("capabilityType") final String capabilityType, @PathParam("capabilityName") final String capabilityName, @Context final HttpServletRequest request, + @HeaderParam(value = Constants.USER_ID_HEADER) String userId) { + + ServletContext context = request.getSession().getServletContext(); + String url = request.getMethod() + " " + request.getRequestURI(); + log.debug("(GET) Start handle request of {}", url); + + try { + ComponentTypeEnum componentTypeEnum = ComponentTypeEnum.findByParamName(containerComponentType); + ComponentInstanceBusinessLogic componentInstanceBL = getComponentInstanceBL(context, componentTypeEnum); + + Either, ResponseFormat> componentInstancePropertiesById = componentInstanceBL.getComponentInstanceCapabilityPropertiesById(containerComponentType, containerComponentId, componentInstanceUniqueId, + capabilityType, capabilityName, userId); + + if (componentInstancePropertiesById.isRight()) { + log.debug("Failed to get properties of component instance ID: {} in {} with ID: {}", componentInstanceUniqueId, containerComponentType, containerComponentId); + return buildErrorResponse(componentInstancePropertiesById.right().value()); + } + + return buildOkResponse(getComponentsUtils().getResponseFormat(ActionStatus.OK), componentInstancePropertiesById.left().value()); + } catch (Exception e) { + BeEcompErrorManager.getInstance().logBeRestApiGeneralError("getGroupArtifactById"); + log.debug("getGroupArtifactById unexpected exception", e); + return buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.GENERAL_ERROR)); + } + + } + + private Either, ResponseFormat> convertMultipleProperties(String dataList) { + if (StringUtils.isEmpty(dataList)) { + return Either.right(getComponentsUtils().getResponseFormat(ActionStatus.INVALID_CONTENT)); + } + Either convertStatus = getComponentsUtils().convertJsonToObjectUsingObjectMapper(dataList, new User(), ComponentInstanceProperty[].class, null, ComponentTypeEnum.RESOURCE_INSTANCE); + if (convertStatus.isRight()) { + return Either.right(convertStatus.right().value()); + } + return Either.left(Arrays.asList(convertStatus.left().value())); + } + + //US 331281 + @PUT + @Path("/{containerComponentType}/{containerComponentId}/componentInstances/{componentInstanceUniqueId}/capability/{capabilityType}/capabilityName/{capabilityName}/properties") + @Consumes(MediaType.APPLICATION_JSON) + @Produces(MediaType.APPLICATION_JSON) + @ApiOperation(value = "Update Instance Capabilty Property", httpMethod = "PUT", notes = "Returns updated property", response = Response.class) + @ApiResponses(value = { @ApiResponse(code = 200, message = "Resource instance capabilty property updated"), @ApiResponse(code = 403, message = "Restricted operation"), @ApiResponse(code = 400, message = "Invalid content / Missing content"), + @ApiResponse(code = 404, message = "Component/Component Instance/Capability - not found") }) + public Response updateInstanceCapabilityProperty(@PathParam("containerComponentType") final String containerComponentType, @PathParam("containerComponentId") final String containerComponentId, + @PathParam("componentInstanceUniqueId") final String componentInstanceUniqueId, @PathParam("capabilityType") final String capabilityType, @PathParam("capabilityName") final String capabilityName, + @ApiParam(value = "Instance capabilty property to update", required = true) String data, @Context final HttpServletRequest request, @HeaderParam(value = Constants.USER_ID_HEADER) String userId) { + ServletContext context = request.getSession().getServletContext(); + String url = request.getMethod() + " " + request.getRequestURI(); + log.debug("(PUT) Start handle request of {}", url); + try { + Wrapper errorWrapper = new Wrapper<>(); + List propertiesToUpdate = new ArrayList<>(); + if (errorWrapper.isEmpty()) { + Either, ResponseFormat> propertiesToUpdateEither = convertMultipleProperties(data); + if (propertiesToUpdateEither.isRight()) { + errorWrapper.setInnerElement(propertiesToUpdateEither.right().value()); + } else { + propertiesToUpdate = propertiesToUpdateEither.left().value(); + } + } + + if (!errorWrapper.isEmpty()) { + return buildErrorResponse(errorWrapper.getInnerElement()); + } + + ComponentTypeEnum componentTypeEnum = ComponentTypeEnum.findByParamName(containerComponentType); + ComponentInstanceBusinessLogic componentInstanceBL = getComponentInstanceBL(context, componentTypeEnum); + + Either, ResponseFormat> updateCICapProperty = componentInstanceBL.updateInstanceCapabilityProperties(componentTypeEnum, containerComponentId, componentInstanceUniqueId, capabilityType, capabilityName, propertiesToUpdate, userId); + + if (updateCICapProperty.isRight()) { + log.debug("Failed to get properties of component instance ID: {} in {} with ID: {}", componentInstanceUniqueId, containerComponentType, containerComponentId); + return buildErrorResponse(updateCICapProperty.right().value()); + } + + return buildOkResponse(getComponentsUtils().getResponseFormat(ActionStatus.OK), updateCICapProperty.left().value()); + } catch (Exception e) { + BeEcompErrorManager.getInstance().logBeRestApiGeneralError("getGroupArtifactById"); + log.debug("getGroupArtifactById unexpected exception", e); + return buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.GENERAL_ERROR)); + } + } + @POST @Path("/{containerComponentType}/{containerComponentId}/serviceProxy") @Consumes(MediaType.APPLICATION_JSON) @@ -897,7 +981,7 @@ public class ComponentInstanceServlet extends AbstractValidationsServlet { ComponentInstance componentInstance = RepresentationUtils.fromRepresentation(data, ComponentInstance.class); componentInstance.setInvariantName(null); ComponentTypeEnum componentTypeEnum = ComponentTypeEnum.findByParamName(containerComponentType); - if(componentTypeEnum != ComponentTypeEnum.SERVICE){ + if (componentTypeEnum != ComponentTypeEnum.SERVICE) { log.debug("Unsupported container component type {}", containerComponentType); return buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.UNSUPPORTED_ERROR, containerComponentType)); } @@ -919,7 +1003,7 @@ public class ComponentInstanceServlet extends AbstractValidationsServlet { return buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.GENERAL_ERROR)); } } - + @DELETE @Path("/{containerComponentType}/{containerComponentId}/serviceProxy/{serviceProxyId}") @Consumes(MediaType.APPLICATION_JSON) @@ -956,7 +1040,7 @@ public class ComponentInstanceServlet extends AbstractValidationsServlet { return buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.GENERAL_ERROR)); } } - + @POST @Path("/{containerComponentType}/{containerComponentId}/serviceProxy/{serviceProxyId}/changeVersion/{newServiceId}") @Consumes(MediaType.APPLICATION_JSON) @@ -981,7 +1065,7 @@ public class ComponentInstanceServlet extends AbstractValidationsServlet { return buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.UNSUPPORTED_ERROR, containerComponentType)); } Either actionResponse = componentInstanceLogic.changeServiceProxyVersion(containerComponentType, containerComponentId, serviceProxyId, userId); - + if (actionResponse.isRight()) { return buildErrorResponse(actionResponse.right().value()); } @@ -993,11 +1077,50 @@ public class ComponentInstanceServlet extends AbstractValidationsServlet { return buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.GENERAL_ERROR)); } } + /** + * REST API GET relation by Id + * Allows to get relation contained in specified component according to received Id + * @param containerComponentType + * @param componentId + * @param relationId + * @param request + * @param userId + * @return Response + */ + @GET + @Path("/{containerComponentType}/{componentId}/relationId/{relationId}") + @Consumes(MediaType.APPLICATION_JSON) + @Produces(MediaType.APPLICATION_JSON) + @ApiOperation(value = "Get relation", httpMethod = "GET", notes = "Returns relation metadata according to relationId", response = Resource.class) + @ApiResponses(value = { @ApiResponse(code = 200, message = "relation found"), @ApiResponse(code = 403, message = "Restricted operation"), @ApiResponse(code = 404, message = "Relation not found") }) + public Response getRelationById(@PathParam("containerComponentType") final String containerComponentType, @PathParam("componentId") final String componentId, + @PathParam("relationId") final String relationId, @Context final HttpServletRequest request, @HeaderParam(value = Constants.USER_ID_HEADER) String userId) { + + ServletContext context = request.getSession().getServletContext(); + String url = request.getMethod() + " " + request.getRequestURI(); + log.debug("(GET) Start handle request of {}", url); + try { + ComponentTypeEnum componentTypeEnum = ComponentTypeEnum.findByParamName(containerComponentType); + ComponentInstanceBusinessLogic componentInstanceLogic = getComponentInstanceBL(context, componentTypeEnum); + if (componentInstanceLogic == null) { + log.debug("Unsupported component type {}", containerComponentType); + return buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.UNSUPPORTED_ERROR, containerComponentType)); + } + + Either actionResponse = componentInstanceLogic.getRelationById(componentId, relationId, userId, componentTypeEnum); + if (actionResponse.isRight()) { + return buildErrorResponse(actionResponse.right().value()); + } + return buildOkResponse(getComponentsUtils().getResponseFormat(ActionStatus.OK), actionResponse.left().value()); + } catch (Exception e) { + BeEcompErrorManager.getInstance().logBeRestApiGeneralError("getRelationById"); + log.debug("getRelationById unexpected exception", e); + return buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.GENERAL_ERROR)); + } + } private Either convertToResourceInstance(String data) { - // Either convertStatus = - // convertJsonToObject(data, ComponentInstance.class); Either convertStatus = getComponentsUtils().convertJsonToObjectUsingObjectMapper(data, new User(), ComponentInstance.class, null, ComponentTypeEnum.RESOURCE_INSTANCE); if (convertStatus.isRight()) { return Either.right(convertStatus.right().value()); diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentServlet.java index dff6cddbbb..0c955f4e5a 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentServlet.java @@ -20,11 +20,8 @@ package org.openecomp.sdc.be.servlets; -import java.io.IOException; import java.util.ArrayList; -import java.util.Collection; import java.util.EnumMap; -import java.util.HashMap; import java.util.List; import java.util.Map; @@ -44,41 +41,33 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.apache.commons.collections.CollectionUtils; -import org.codehaus.jackson.JsonGenerationException; -import org.codehaus.jackson.map.JsonMappingException; import org.openecomp.sdc.be.components.impl.ComponentBusinessLogic; -import org.openecomp.sdc.be.components.impl.ResourceBusinessLogic; import org.openecomp.sdc.be.config.BeEcompErrorManager; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.datamodel.api.HighestFilterEnum; -import org.openecomp.sdc.be.datatypes.components.ComponentMetadataDataDefinition; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.FilterKeyEnum; import org.openecomp.sdc.be.model.CapReqDef; import org.openecomp.sdc.be.model.Component; import org.openecomp.sdc.be.model.ComponentInstance; -import org.openecomp.sdc.be.model.ComponentInstanceProperty; import org.openecomp.sdc.be.model.IComponentInstanceConnectedElement; -import org.openecomp.sdc.be.model.PropertyDefinition; import org.openecomp.sdc.be.model.Resource; import org.openecomp.sdc.be.model.User; -import org.openecomp.sdc.be.resources.data.ComponentMetadataData; import org.openecomp.sdc.be.ui.model.UiComponentDataTransfer; import org.openecomp.sdc.common.api.Constants; -import org.openecomp.sdc.common.config.EcompErrorName; import org.openecomp.sdc.exception.ResponseFormat; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.jcabi.aspects.Loggable; + +import fj.data.Either; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; -import fj.data.Either; - @Loggable(prepend = true, value = Loggable.DEBUG, trim = false) @Path("/v1/catalog") @Api(value = "Component Servlet", description = "Component Servlet") diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ConsumerServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ConsumerServlet.java index c207497a22..943ed59e87 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ConsumerServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ConsumerServlet.java @@ -51,14 +51,14 @@ import org.springframework.web.context.WebApplicationContext; import com.google.gson.Gson; import com.jcabi.aspects.Loggable; + +import fj.data.Either; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; -import fj.data.Either; - @Loggable(prepend = true, value = Loggable.DEBUG, trim = false) @Path("/v1/consumers") @Api(value = "Consumer Servlet", description = "Consumer Servlet") diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/DistributionServiceServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/DistributionServiceServlet.java index f9d6f6c754..4215560020 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/DistributionServiceServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/DistributionServiceServlet.java @@ -48,13 +48,13 @@ import org.slf4j.LoggerFactory; import org.springframework.web.context.WebApplicationContext; import com.jcabi.aspects.Loggable; + +import fj.data.Either; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; -import fj.data.Either; - /** * Root resource (exposed at "/" path) */ diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ElementServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ElementServlet.java index da9b867041..7a42360355 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ElementServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ElementServlet.java @@ -20,8 +20,27 @@ package org.openecomp.sdc.be.servlets; -import com.jcabi.aspects.Loggable; -import fj.data.Either; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.inject.Singleton; +import javax.servlet.ServletContext; +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.Consumes; +import javax.ws.rs.DELETE; +import javax.ws.rs.GET; +import javax.ws.rs.HeaderParam; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + import org.openecomp.sdc.be.components.clean.ComponentsCleanBusinessLogic; import org.openecomp.sdc.be.components.impl.ElementBusinessLogic; import org.openecomp.sdc.be.config.BeEcompErrorManager; @@ -31,7 +50,12 @@ import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; import org.openecomp.sdc.be.datatypes.enums.OriginTypeEnum; import org.openecomp.sdc.be.info.ArtifactTypesInfo; -import org.openecomp.sdc.be.model.*; +import org.openecomp.sdc.be.model.ArtifactType; +import org.openecomp.sdc.be.model.Category; +import org.openecomp.sdc.be.model.Component; +import org.openecomp.sdc.be.model.PropertyScope; +import org.openecomp.sdc.be.model.Tag; +import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.be.model.category.CategoryDefinition; import org.openecomp.sdc.be.model.category.GroupingDefinition; import org.openecomp.sdc.be.model.category.SubCategoryDefinition; @@ -43,21 +67,15 @@ import org.openecomp.sdc.exception.ResponseFormat; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.inject.Singleton; +import com.jcabi.aspects.Loggable; + +import fj.data.Either; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.*; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import java.util.*; - @Path("/v1/") /**** @@ -467,6 +485,7 @@ public class ElementServlet extends BeGenericServlet { configuration.put("componentTypes", elementBL.getAllComponentTypesParamNames()); configuration.put("roles", elementBL.getAllSupportedRoles()); configuration.put("resourceTypes", resourceTypesMap.left().value()); + configuration.put("environmentContext", ConfigurationManager.getConfigurationManager().getConfiguration().getEnvironmentContext()); return buildOkResponse(getComponentsUtils().getResponseFormat(ActionStatus.OK), configuration); } diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/GroupServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/GroupServlet.java index f7e7ae2da1..22391bbdc1 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/GroupServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/GroupServlet.java @@ -46,7 +46,6 @@ import org.openecomp.sdc.be.model.GroupProperty; import org.openecomp.sdc.be.model.Resource; import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.common.api.Constants; -import org.openecomp.sdc.common.config.EcompErrorName; import org.openecomp.sdc.exception.ResponseFormat; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -54,14 +53,14 @@ import org.slf4j.LoggerFactory; import com.google.common.reflect.TypeToken; import com.google.gson.Gson; import com.jcabi.aspects.Loggable; + +import fj.data.Either; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; -import fj.data.Either; - /** * Root resource (exposed at "/" path) */ @@ -106,7 +105,7 @@ public class GroupServlet extends AbstractValidationsServlet { return buildOkResponse(getComponentsUtils().getResponseFormat(ActionStatus.OK), actionResponse.left().value()); - } catch (Throwable e) { + } catch (Exception e) { BeEcompErrorManager.getInstance().logBeRestApiGeneralError("getGroupArtifactById"); log.debug("getGroupArtifactById unexpected exception", e); return buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.GENERAL_ERROR)); diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/InputsServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/InputsServlet.java index 448c31cf63..4de5488351 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/InputsServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/InputsServlet.java @@ -30,7 +30,6 @@ import javax.ws.rs.DELETE; import javax.ws.rs.GET; import javax.ws.rs.HeaderParam; import javax.ws.rs.POST; -import javax.ws.rs.PUT; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; @@ -40,7 +39,6 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.codehaus.jackson.map.ObjectMapper; -import org.openecomp.sdc.be.components.impl.ComponentInstanceBusinessLogic; import org.openecomp.sdc.be.components.impl.InputsBusinessLogic; import org.openecomp.sdc.be.config.BeEcompErrorManager; import org.openecomp.sdc.be.dao.api.ActionStatus; @@ -55,21 +53,20 @@ import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum; import org.openecomp.sdc.common.api.Constants; import org.openecomp.sdc.common.config.EcompErrorName; -import org.openecomp.sdc.common.datastructure.Wrapper; import org.openecomp.sdc.exception.ResponseFormat; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.context.WebApplicationContext; import com.jcabi.aspects.Loggable; + +import fj.data.Either; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; -import fj.data.Either; - @Loggable(prepend = true, value = Loggable.DEBUG, trim = false) @Path("/v1/catalog") @Api(value = "Input Catalog", description = "Input Servlet") diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/LifecycleServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/LifecycleServlet.java index 89b73eb3e4..c2d7c2a6a1 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/LifecycleServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/LifecycleServlet.java @@ -53,14 +53,14 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.jcabi.aspects.Loggable; + +import fj.data.Either; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; -import fj.data.Either; - @Loggable(prepend = true, value = Loggable.DEBUG, trim = false) @Path("/v1/catalog") @Api(value = "Lifecycle Actions Servlet", description = "Lifecycle Actions Servlet") diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ProductServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ProductServlet.java index 209f38d8a4..c0c987b78a 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ProductServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ProductServlet.java @@ -99,7 +99,7 @@ public class ProductServlet extends BeGenericServlet { response = buildOkResponse(getComponentsUtils().getResponseFormat(ActionStatus.CREATED), result); return response; - } catch (Throwable e) { + } catch (Exception e) { BeEcompErrorManager.getInstance().processEcompError(EcompErrorName.BeRestApiGeneralError, "Create Product"); BeEcompErrorManager.getInstance().logBeRestApiGeneralError("Create Product"); log.debug("create product failed with error ", e); @@ -141,7 +141,7 @@ public class ProductServlet extends BeGenericServlet { Object product = RepresentationUtils.toRepresentation(actionResponse.left().value()); return buildOkResponse(getComponentsUtils().getResponseFormat(ActionStatus.OK), product); - } catch (Throwable e) { + } catch (Exception e) { BeEcompErrorManager.getInstance().processEcompError(EcompErrorName.BeRestApiGeneralError, "Get Product"); BeEcompErrorManager.getInstance().logBeRestApiGeneralError("Get Product"); log.debug("get product failed with error ", e); @@ -221,7 +221,7 @@ public class ProductServlet extends BeGenericServlet { response = buildOkResponse(getComponentsUtils().getResponseFormat(ActionStatus.OK), product); return response; - } catch (Throwable e) { + } catch (Exception e) { BeEcompErrorManager.getInstance().processEcompError(EcompErrorName.BeRestApiGeneralError, "Delete Resource"); BeEcompErrorManager.getInstance().logBeRestApiGeneralError("Delete Resource"); log.debug("delete resource failed with error ", e); diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/PropertyServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/PropertyServlet.java index 04428aaa9a..bc5ad35c8f 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/PropertyServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/PropertyServlet.java @@ -68,14 +68,14 @@ import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.reflect.TypeToken; import com.jcabi.aspects.Loggable; + +import fj.data.Either; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; -import fj.data.Either; - @Loggable(prepend = true, value = Loggable.DEBUG, trim = false) @Path("/v1/catalog") @Api(value = "Resource Property Servlet", description = "Resource Property Servlet") diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/RequirementsServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/RequirementsServlet.java index e59987fc55..fb4aba6af7 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/RequirementsServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/RequirementsServlet.java @@ -39,6 +39,7 @@ import org.slf4j.LoggerFactory; import com.google.gson.JsonSyntaxException; import com.jcabi.aspects.Loggable; + import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiResponse; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ResourceUploadServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ResourceUploadServlet.java index 35431c710c..3cf2a69fb5 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ResourceUploadServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ResourceUploadServlet.java @@ -54,6 +54,7 @@ import org.slf4j.LoggerFactory; import org.springframework.web.context.WebApplicationContext; import com.jcabi.aspects.Loggable; + import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ResourcesServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ResourcesServlet.java index 66da1d7150..8aa5093404 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ResourcesServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ResourcesServlet.java @@ -67,14 +67,14 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.jcabi.aspects.Loggable; + +import fj.data.Either; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; -import fj.data.Either; - @Loggable(prepend = true, value = Loggable.DEBUG, trim = false) @Path("/v1/catalog") @Api(value = "Resources Catalog", description = "Resources Servlet") diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ServiceServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ServiceServlet.java index f38cd85026..cb90d89ed9 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ServiceServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ServiceServlet.java @@ -70,14 +70,14 @@ import org.slf4j.LoggerFactory; import com.google.gson.reflect.TypeToken; import com.jcabi.aspects.Loggable; + +import fj.data.Either; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; -import fj.data.Either; - @Loggable(prepend = true, value = Loggable.DEBUG, trim = false) @Path("/v1/catalog") @Api(value = "Service Catalog", description = "Service Servlet") @@ -763,7 +763,6 @@ public class ServiceServlet extends AbstractValidationsServlet { } catch (Exception e) { log.error("Failed runnign the command {}", command, e); - e.printStackTrace(); return Either.right(getComponentsUtils().getResponseFormat(ActionStatus.GENERAL_ERROR)); } diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesFetchServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesFetchServlet.java index 2e961f294b..3ad15961e7 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesFetchServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesFetchServlet.java @@ -20,7 +20,6 @@ package org.openecomp.sdc.be.servlets; -import java.lang.reflect.Type; import java.util.Map; import javax.inject.Singleton; @@ -40,9 +39,7 @@ import org.openecomp.sdc.be.config.BeEcompErrorManager; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.impl.WebAppContextWrapper; import org.openecomp.sdc.be.model.DataTypeDefinition; -import org.openecomp.sdc.be.model.PropertyConstraint; import org.openecomp.sdc.be.model.User; -import org.openecomp.sdc.be.model.operations.impl.PropertyOperation.PropertyConstraintSerialiser; import org.openecomp.sdc.common.api.Constants; import org.openecomp.sdc.common.config.EcompErrorName; import org.openecomp.sdc.common.datastructure.Wrapper; @@ -51,17 +48,14 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.context.WebApplicationContext; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.reflect.TypeToken; import com.jcabi.aspects.Loggable; + +import fj.data.Either; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; -import fj.data.Either; - @Loggable(prepend = true, value = Loggable.DEBUG, trim = false) @Path("/v1/catalog") @Api(value = "Types Fetch Servlet", description = "Types Fetch Servlet") diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesUploadServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesUploadServlet.java index f96d52adb1..bb0be372bf 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesUploadServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/TypesUploadServlet.java @@ -42,8 +42,6 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.apache.commons.lang3.tuple.ImmutablePair; -import org.codehaus.jackson.JsonGenerationException; -import org.codehaus.jackson.map.JsonMappingException; import org.glassfish.jersey.media.multipart.FormDataParam; import org.openecomp.sdc.be.components.impl.CapabilityTypeImportManager; import org.openecomp.sdc.be.components.impl.CategoriesImportManager; @@ -60,22 +58,22 @@ import org.openecomp.sdc.be.model.GroupTypeDefinition; import org.openecomp.sdc.be.model.PolicyTypeDefinition; import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.common.api.Constants; -import org.openecomp.sdc.common.datastructure.Wrapper; import org.openecomp.sdc.common.datastructure.FunctionalInterfaces.ConsumerTwoParam; +import org.openecomp.sdc.common.datastructure.Wrapper; import org.openecomp.sdc.exception.ResponseFormat; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.context.WebApplicationContext; import com.jcabi.aspects.Loggable; + +import fj.data.Either; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; -import fj.data.Either; - @Loggable(prepend = true, value = Loggable.DEBUG, trim = false) @Path("/v1/catalog/uploadType") @Api(value = "Catalog Types Upload", description = "Upload Type from yaml") diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/UserAdminServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/UserAdminServlet.java index 67230470ff..a6f6359ac1 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/UserAdminServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/UserAdminServlet.java @@ -53,14 +53,14 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.jcabi.aspects.Loggable; + +import fj.data.Either; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; -import fj.data.Either; - @Loggable(prepend = true, value = Loggable.DEBUG, trim = false) @Path("/v1/user") @Api(value = "User Administration", description = "User admininstarator operations") diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/switchover/detector/SwitchoverDetector.java b/catalog-be/src/main/java/org/openecomp/sdc/be/switchover/detector/SwitchoverDetector.java index 876066b9ba..faebb7614b 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/switchover/detector/SwitchoverDetector.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/switchover/detector/SwitchoverDetector.java @@ -34,8 +34,8 @@ import javax.annotation.PreDestroy; import org.apache.commons.codec.binary.Base64; import org.openecomp.sdc.be.config.BeEcompErrorManager; -import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.config.Configuration.SwitchoverDetectorConfig; +import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.dao.rest.HttpRestClient; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/CapabiltyRequirementConvertor.java b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/CapabiltyRequirementConvertor.java index 41268188f9..886b654b81 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/CapabiltyRequirementConvertor.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/CapabiltyRequirementConvertor.java @@ -1,5 +1,4 @@ /*- - * ============LICENSE_START======================================================= * SDC * ================================================================================ @@ -81,9 +80,7 @@ public class CapabiltyRequirementConvertor { @Autowired private ToscaOperationFacade toscaOperationFacade; - protected CapabiltyRequirementConvertor() { - - } + protected CapabiltyRequirementConvertor() {} public static synchronized CapabiltyRequirementConvertor getInstance() { if (instance == null) { @@ -117,9 +114,8 @@ public class CapabiltyRequirementConvertor { } private void convertOverridenProperties(ComponentInstance componentInstance, Map dataTypes, Map capabilties, CapabilityDefinition c) { - List properties = c.getProperties(); - if (properties != null && !properties.isEmpty()) { - properties + if (CollectionUtils.isNotEmpty(c.getProperties())) { + c.getProperties() .stream() .filter(p -> p.getValue() != null || p.getDefaultValue() != null) .forEach(p -> convertOverridenProperty(componentInstance, dataTypes, capabilties, c, p)); @@ -331,7 +327,9 @@ public class CapabiltyRequirementConvertor { result = Either.right(false); } if(result == null){ - result = buildSubstitutedName(componentsCache, getOriginRes.left().value(), Lists.newArrayList(path.subList(0, path.size()-1)), name); + List reducedPath = getReducedPath(path); + reducedPath.remove(reducedPath.size()-1); + result = buildSubstitutedName(componentsCache, getOriginRes.left().value(), reducedPath, name); } return result; } @@ -432,12 +430,12 @@ public class CapabiltyRequirementConvertor { */ public Either, ToscaError> convertSubstitutionMappingCapabilities(Map componentsCache, Component component) { Map> capabilities = component.getCapabilities(); - Either, ToscaError> res = null; + Either, ToscaError> res; if (capabilities != null) { res = buildAddSubstitutionMappingsCapabilities(componentsCache, component, capabilities); } else { + res = Either.left(Maps.newHashMap()); logger.debug(NO_CAPABILITIES); - res = Either.left(new HashMap<>()); } return res; } @@ -483,7 +481,7 @@ public class CapabiltyRequirementConvertor { toscaCapability.setValid_source_types(c.getValidSourceTypes()); List properties = c.getProperties(); - if (properties != null && !properties.isEmpty()) { + if (CollectionUtils.isNotEmpty(properties)) { Map toscaProperties = new HashMap<>(); for (PropertyDefinition property : properties) { ToscaProperty toscaProperty = PropertyConvertor.getInstance().convertProperty(dataTypes, property, true); @@ -493,15 +491,22 @@ public class CapabiltyRequirementConvertor { } toscaCapabilities.put(name, toscaCapability); } - - Either buildSubstitutedName(Map originComponents, Component originComponent, List path, String name) { + /** + * Allows to build substituted name of capability\requirement of the origin component instance according to the path + * @param componentsCache + * @param originComponent + * @param path + * @param name + * @return + */ + public Either buildSubstitutedName(Map componentsCache, Component originComponent, List path, String name) { StringBuilder substitutedName = new StringBuilder(); boolean nameBuiltSuccessfully = true; Either result; if(CollectionUtils.isNotEmpty(path) && !ToscaUtils.isComplexVfc(originComponent)){ - Collections.reverse(path); - Iterator instanceIdIter = path.iterator(); - nameBuiltSuccessfully = appendNameRecursively(originComponents, originComponent, instanceIdIter, substitutedName); + List reducedPath = getReducedPath(path); + Collections.reverse(reducedPath); + nameBuiltSuccessfully = appendNameRecursively(componentsCache, originComponent, reducedPath.iterator(), substitutedName); } if(nameBuiltSuccessfully){ result = Either.left(substitutedName.append(name).toString()); @@ -511,43 +516,57 @@ public class CapabiltyRequirementConvertor { return result; } - private boolean appendNameRecursively(Map originComponents, Component originComponent, Iterator instanceIdIter, StringBuilder substitutedName) { - if(CollectionUtils.isNotEmpty(originComponent.getComponentInstances()) && instanceIdIter.hasNext()){ + private List getReducedPath(List path) { + List pathCopy = Lists.newArrayList(); + path.stream().forEach(id -> {if(!pathCopy.contains(id))pathCopy.add(id);}); + return pathCopy; + } + + private boolean appendNameRecursively(Map componentsCache, Component originComponent, Iterator instanceIdIter, StringBuilder substitutedName) { + if(CollectionUtils.isNotEmpty(originComponent.getComponentInstances()) && instanceIdIter.hasNext() && !ToscaUtils.isComplexVfc(originComponent)){ String instanceId = instanceIdIter.next(); Optional instanceOpt = originComponent.getComponentInstances().stream().filter(i -> i.getUniqueId().equals(instanceId)).findFirst(); if(!instanceOpt.isPresent()){ logger.debug("Failed to find an instance with uniqueId {} on a component with uniqueId {}", instanceId, originComponent.getUniqueId()); return false; } - Either getOriginRes = getOriginComponent(originComponents, instanceOpt.get()); + substitutedName.append(instanceOpt.get().getNormalizedName()).append('.'); + Either getOriginRes = getOriginComponent(componentsCache, instanceOpt.get()); if(getOriginRes.isRight()){ return false; } - appendNameRecursively(originComponents, getOriginRes.left().value(), instanceIdIter, substitutedName); - substitutedName.append(instanceOpt.get().getNormalizedName()).append('.'); - return true; + appendNameRecursively(componentsCache, getOriginRes.left().value(), instanceIdIter, substitutedName); } return true; } - private Either getOriginComponent(Map originComponents, ComponentInstance instance) { + Either getOriginComponent(Map componentsCache, ComponentInstance instance) { Either result; Either getOriginRes; - if(originComponents.containsKey(instance.getComponentUid())){ - result = Either.left(originComponents.get(instance.getComponentUid())); + if(componentsCache.containsKey(instance.getActualComponentUid())){ + result = Either.left(componentsCache.get(instance.getActualComponentUid())); } else { - ComponentParametersView filter = new ComponentParametersView(true); - filter.setIgnoreComponentInstances(false); - getOriginRes = toscaOperationFacade.getToscaElement(instance.getComponentUid(), filter); + ComponentParametersView filter = getFilter(instance); + getOriginRes = toscaOperationFacade.getToscaElement(instance.getActualComponentUid(), filter); if(getOriginRes.isRight()){ - logger.debug("Failed to get an origin component with uniqueId {}", instance.getComponentUid()); + logger.debug("Failed to get an origin component with uniqueId {}", instance.getActualComponentUid()); result = Either.right(false); } else { result = Either.left(getOriginRes.left().value()); - originComponents.put(getOriginRes.left().value().getUniqueId(), getOriginRes.left().value()); + componentsCache.put(getOriginRes.left().value().getUniqueId(), getOriginRes.left().value()); } } return result; } + private ComponentParametersView getFilter(ComponentInstance instance) { + ComponentParametersView filter = new ComponentParametersView(true); + filter.setIgnoreComponentInstances(false); + if(instance.getIsProxy()){ + filter.setIgnoreCapabilities(false); + filter.setIgnoreRequirements(false); + } + return filter; + } + } diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/CsarUtils.java b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/CsarUtils.java index 2f4a385f69..f6ae79b26a 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/CsarUtils.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/CsarUtils.java @@ -20,8 +20,26 @@ package org.openecomp.sdc.be.tosca; -import com.google.gson.Gson; -import fj.data.Either; +import java.io.BufferedOutputStream; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.EnumMap; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Collectors; +import java.util.zip.ZipEntry; +import java.util.zip.ZipInputStream; +import java.util.zip.ZipOutputStream; + import org.apache.commons.codec.binary.Base64; import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.io.output.ByteArrayOutputStream; @@ -61,7 +79,6 @@ import org.openecomp.sdc.be.tosca.model.ToscaTemplate; import org.openecomp.sdc.be.utils.CommonBeUtils; import org.openecomp.sdc.common.api.ArtifactGroupTypeEnum; import org.openecomp.sdc.common.api.ArtifactTypeEnum; -import org.openecomp.sdc.common.api.Constants; import org.openecomp.sdc.common.impl.ExternalConfiguration; import org.openecomp.sdc.common.util.GeneralUtility; import org.openecomp.sdc.common.util.ValidationUtils; @@ -75,25 +92,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import java.io.BufferedOutputStream; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.EnumMap; -import java.util.HashMap; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import java.util.stream.Collectors; -import java.util.zip.ZipEntry; -import java.util.zip.ZipInputStream; -import java.util.zip.ZipOutputStream; +import com.google.gson.Gson; + +import fj.data.Either; /** @@ -254,7 +255,8 @@ public class CsarUtils { String cassandraId = artifactDefinition.getEsId(); Either fromCassandra = getFromCassandra(cassandraId); if (fromCassandra.isRight()) { - ResponseFormat responseFormat = componentsUtils.getResponseFormat(fromCassandra.right().value()); + log.debug("ArtifactName {}, unique ID {}", artifactDefinition.getArtifactName(), artifactDefinition.getUniqueId()); + ResponseFormat responseFormat = componentsUtils.getResponseFormat(fromCassandra.right().value()); return Either.right(responseFormat); } mainYaml = fromCassandra.left().value(); @@ -328,6 +330,12 @@ public class CsarUtils { // add component to zip Either entryData = getEntryData(innerComponentTriple.getLeft(), innerComponent); + if (entryData.isRight()) { + ResponseFormat responseFormat = componentsUtils.getResponseFormat(entryData.right().value()); + log.debug("Failed adding to zip component {}, error {}", innerComponentTriple.getLeft(), + entryData.right().value()); + return Either.right(responseFormat); + } byte[] content = entryData.left().value(); zip.putNextEntry(new ZipEntry(DEFINITIONS_PATH + icFileName)); zip.write(content); @@ -394,7 +402,7 @@ public class CsarUtils { final int initSize = 2048; - log.debug("Starting coppy from Schema file zip to CSAR zip"); + log.debug("Starting copy from Schema file zip to CSAR zip"); try (ZipInputStream zipStream = new ZipInputStream(new ByteArrayInputStream(schemaFileZip)); ByteArrayOutputStream out = new ByteArrayOutputStream(); @@ -657,7 +665,7 @@ public class CsarUtils { null, null, user, component, shouldLock, inTransaction, false); if (validateAndHandleArtifact.isRight()) { - if (ArtifactOperationEnum.Create == operationType.getArtifactOperationEnum() || ArtifactOperationEnum.Update == operationType.getArtifactOperationEnum()) { + if (ArtifactOperationEnum.isCreateOrLink(operationType.getArtifactOperationEnum()) || ArtifactOperationEnum.Update == operationType.getArtifactOperationEnum()) { ResponseFormat responseFormat = componentsUtils.getResponseFormat(ActionStatus.AAI_ARTIFACT_GENERATION_FAILED, componentType.getValue(), component.getName(), validateAndHandleArtifact.right().value().toString()); Either.right(responseFormat); @@ -739,7 +747,7 @@ public class CsarUtils { } else { Either fromCassandra = getFromCassandra(cassandraId); if (fromCassandra.isRight()) { - return Either.right(fromCassandra.right().value()); + return Either.right(fromCassandra.right().value()); } else { content = fromCassandra.left().value(); } @@ -773,19 +781,16 @@ public class CsarUtils { Either artifactResponse = artifactCassandraDao.getArtifact(cassandraId); if (artifactResponse.isRight()) { - log.debug("In createCsar fetching of artifact from CS failed"); - log.debug("Failed to fetch from Cassandra by id {} error {} ", cassandraId, artifactResponse.right().value()); + log.debug("Failed to fetch artifact from Cassandra by id {} error {} ", cassandraId, artifactResponse.right().value()); StorageOperationStatus storageStatus = DaoStatusConverter.convertCassandraStatusToStorageStatus(artifactResponse.right().value()); ActionStatus convertedFromStorageResponse = componentsUtils.convertFromStorageResponse(storageStatus); return Either.right(convertedFromStorageResponse); - } else { - ESArtifactData artifactData = artifactResponse.left().value(); - return Either.left(artifactData.getDataAsArray()); - } + ESArtifactData artifactData = artifactResponse.left().value(); + return Either.left(artifactData.getDataAsArray()); } - + private String createCsarBlock0(String metaFileVersion, String toscaConformanceLevel) { final String BLOCK_0_TEMPLATE = "SDC-TOSCA-Meta-File-Version: %s\nSDC-TOSCA-Definitions-Version: %s\n"; @@ -1201,18 +1206,20 @@ public class CsarUtils { for (ArtifactDefinition artifactDefinition : artifactDefinitionList) { if (!isInCertificationRequest && componentType == ComponentTypeEnum.SERVICE - && artifactDefinition.getArtifactType().equals(heatEnvType)){ + && artifactDefinition.getArtifactType().equals(heatEnvType) || + //this is placeholder + (artifactDefinition.getEsId() == null && artifactDefinition.getMandatory())){ continue; } - String esId = artifactDefinition.getEsId(); byte[] payloadData = artifactDefinition.getPayloadData(); String artifactFileName = artifactDefinition.getArtifactName(); if (payloadData == null) { - Either fromCassandra = getFromCassandra(esId); + Either fromCassandra = getFromCassandra(artifactDefinition.getEsId()); if (fromCassandra.isRight()) { + log.debug("ArtifactName {}, unique ID {}", artifactDefinition.getArtifactName(), artifactDefinition.getUniqueId()); log.debug("Failed to get {} payload from DB reason: {}", artifactFileName, fromCassandra.right().value()); continue; } diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/PropertyConvertor.java b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/PropertyConvertor.java index 22f6730eb1..083ea67769 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/PropertyConvertor.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/PropertyConvertor.java @@ -145,7 +145,7 @@ public class PropertyConvertor { } innerConverter = type.getValueConverter(); - if (ToscaPropertyType.STRING.equals(type) && value.startsWith("/")) { + if (ToscaPropertyType.STRING.equals(type) && valueStartsWithNonJsonChar(value)) { return innerConverter.convertToToscaValue(value, innerType, dataTypes); } } @@ -192,4 +192,8 @@ public class PropertyConvertor { } + private boolean valueStartsWithNonJsonChar(String value) { + return value.startsWith("/") || value.startsWith(":"); + } + } diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java index 1f29eb2113..c37c15f694 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java @@ -57,7 +57,7 @@ import org.openecomp.sdc.be.model.GroupInstance; import org.openecomp.sdc.be.model.GroupProperty; import org.openecomp.sdc.be.model.InputDefinition; import org.openecomp.sdc.be.model.PropertyDefinition; -import org.openecomp.sdc.be.model.RequirementAndRelationshipPair; +import org.openecomp.sdc.be.model.RelationshipInfo; import org.openecomp.sdc.be.model.RequirementCapabilityRelDef; import org.openecomp.sdc.be.model.RequirementDefinition; import org.openecomp.sdc.be.model.Resource; @@ -110,7 +110,7 @@ public class ToscaExportHandler { @Autowired private CapabiltyRequirementConvertor capabiltyRequirementConvertor; private PropertyConvertor propertyConvertor = PropertyConvertor.getInstance(); - Map originComponents = new HashMap<>(); + Map originComponents = new HashMap<>(); private static Logger log = LoggerFactory.getLogger(ToscaExportHandler.class.getName()); @@ -127,7 +127,8 @@ public class ToscaExportHandler { public static final String VF_MODULE_TYPE_EXPANSION = "Expansion"; private static final String FAILED_TO_GET_DEFAULT_IMPORTS_CONFIGURATION = "convertToToscaTemplate - failed to get Default Imports section from configuration"; private static final String NOT_SUPPORTED_COMPONENT_TYPE = "Not supported component type {}"; - protected static final List>> DEFAULT_IMPORTS = ConfigurationManager.getConfigurationManager().getConfiguration().getDefaultImports(); + protected static final List>> DEFAULT_IMPORTS = ConfigurationManager + .getConfigurationManager().getConfiguration().getDefaultImports(); public Either exportComponent(Component component) { @@ -229,7 +230,7 @@ public class ToscaExportHandler { return Either.right(importsRes.right().value()); } toscaNode = importsRes.left().value().left; - /*Either, ToscaError> nodeTypesMapEither = createProxyNodeTypes(component); + Either, ToscaError> nodeTypesMapEither = createProxyNodeTypes(component); if (nodeTypesMapEither.isRight()) { log.debug("Failed to fetch normative service proxy resource by tosca name, error {}", nodeTypesMapEither.right().value()); @@ -237,7 +238,7 @@ public class ToscaExportHandler { } Map nodeTypesMap = nodeTypesMapEither.left().value(); if (nodeTypesMap != null && !nodeTypesMap.isEmpty()) - toscaNode.setNode_types(nodeTypesMap);*/ + toscaNode.setNode_types(nodeTypesMap); Map componentCache = importsRes.left().value().right; Either, TitanOperationStatus> dataTypesEither = dataTypeCache.getAll(); @@ -274,8 +275,17 @@ public class ToscaExportHandler { if (groups != null && !groups.isEmpty()) { groupsMap = new HashMap<>(); for (GroupDefinition group : groups) { - ToscaGroupTemplate toscaGroup = convertGroup(group); - groupsMap.put(group.getName(), toscaGroup); + boolean addToTosca = true; + if (group.getType().equals(Constants.DEFAULT_GROUP_VF_MODULE)) { + List artifacts = group.getArtifacts(); + if (artifacts == null || artifacts.isEmpty()) { + addToTosca = false; + } + } + if (addToTosca) { + ToscaGroupTemplate toscaGroup = convertGroup(group); + groupsMap.put(group.getName(), toscaGroup); + } } log.debug("groups converted"); @@ -343,10 +353,10 @@ public class ToscaExportHandler { private ToscaMetadata convertMetadata(Component component, boolean isInstance, ComponentInstance componentInstance) { ToscaMetadata toscaMetadata = new ToscaMetadata(); - toscaMetadata.setName(component.getComponentMetadataDefinition().getMetadataDataDefinition().getName()); toscaMetadata.setInvariantUUID(component.getInvariantUUID()); toscaMetadata.setUUID(component.getUUID()); toscaMetadata.setDescription(component.getDescription()); + toscaMetadata.setName(component.getComponentMetadataDefinition().getMetadataDataDefinition().getName()); List categories = component.getCategories(); CategoryDefinition categoryDefinition = categories.get(0); @@ -355,11 +365,26 @@ public class ToscaExportHandler { if (isInstance) { toscaMetadata.setVersion(component.getVersion()); toscaMetadata.setCustomizationUUID(componentInstance.getCustomizationUUID()); + if (componentInstance.getSourceModelInvariant() != null + && !componentInstance.getSourceModelInvariant().isEmpty()) { + toscaMetadata.setVersion(componentInstance.getComponentVersion()); + toscaMetadata.setSourceModelInvariant(componentInstance.getSourceModelInvariant()); + toscaMetadata.setSourceModelUuid(componentInstance.getSourceModelUuid()); + toscaMetadata.setSourceModelName(componentInstance.getSourceModelName()); + toscaMetadata.setName( + componentInstance.getSourceModelName() + " " + OriginTypeEnum.ServiceProxy.getDisplayValue()); + toscaMetadata.setDescription(componentInstance.getDescription()); + } + } switch (component.getComponentType()) { case RESOURCE: Resource resource = (Resource) component; - toscaMetadata.setType(resource.getResourceType().name()); + + if (isInstance && componentInstance.getOriginType() == OriginTypeEnum.ServiceProxy) { + toscaMetadata.setType(componentInstance.getOriginType().getDisplayValue()); + } else + toscaMetadata.setType(resource.getResourceType().name()); toscaMetadata.setSubcategory(categoryDefinition.getSubcategories().get(0).getName()); toscaMetadata.setResourceVendor(resource.getVendorName()); toscaMetadata.setResourceVendorRelease(resource.getVendorRelease()); @@ -370,15 +395,16 @@ public class ToscaExportHandler { toscaMetadata.setType(component.getComponentType().getValue()); toscaMetadata.setServiceType(service.getServiceType()); toscaMetadata.setServiceRole(service.getServiceRole()); + toscaMetadata.setEnvironmentContext(service.getEnvironmentContext()); if (!isInstance) { // DE268546 - toscaMetadata.setServiceEcompNaming(((Service)component).isEcompGeneratedNaming()); - toscaMetadata.setEcompGeneratedNaming(((Service)component).isEcompGeneratedNaming()); - toscaMetadata.setNamingPolicy(((Service)component).getNamingPolicy()); + toscaMetadata.setServiceEcompNaming(((Service) component).isEcompGeneratedNaming()); + toscaMetadata.setEcompGeneratedNaming(((Service) component).isEcompGeneratedNaming()); + toscaMetadata.setNamingPolicy(((Service) component).getNamingPolicy()); } break; default: - log.debug("Not supported component type {}", component.getComponentType()); + log.debug(NOT_SUPPORTED_COMPONENT_TYPE, component.getComponentType()); } return toscaMetadata; } @@ -472,7 +498,7 @@ public class ToscaExportHandler { } public static String getInterfaceFilename(String artifactName) { - return artifactName.substring(0, artifactName.lastIndexOf('.')) + ToscaExportHandler.TOSCA_INTERFACE_NAME; + return artifactName.substring(0, artifactName.lastIndexOf('.')) + ToscaExportHandler.TOSCA_INTERFACE_NAME; } private Either convertNodeType(Component component, ToscaTemplate toscaNode, @@ -539,7 +565,8 @@ public class ToscaExportHandler { toscaNodeType = capabilities.left().value(); log.debug("Capabilities converted for {}", component.getUniqueId()); - Either requirements = capabiltyRequirementConvertor.convertRequirements(component, toscaNodeType); + Either requirements = capabiltyRequirementConvertor.convertRequirements(component, + toscaNodeType); if (requirements.isRight()) { return Either.right(requirements.right().value()); } @@ -584,9 +611,15 @@ public class ToscaExportHandler { ToscaNodeTemplate nodeTemplate = new ToscaNodeTemplate(); nodeTemplate.setType(componentInstance.getToscaComponentName()); + Either originComponentRes = capabiltyRequirementConvertor + .getOriginComponent(componentCache, componentInstance); + if (originComponentRes.isRight()) { + convertNodeTemplatesRes = Either.right(ToscaError.NODE_TYPE_REQUIREMENT_ERROR); + break; + } Either requirements = convertComponentInstanceRequirements(component, componentInstance, component.getComponentInstancesRelations(), nodeTemplate, - componentCache.get(componentInstance.getComponentUid())); + originComponentRes.left().value()); if (requirements.isRight()) { convertNodeTemplatesRes = Either.right(requirements.right().value()); break; @@ -596,7 +629,7 @@ public class ToscaExportHandler { nodeTemplate = requirements.left().value(); - Component componentOfInstance = componentCache.get(componentInstance.getComponentUid()); + Component componentOfInstance = componentCache.get(componentInstance.getActualComponentUid()); nodeTemplate.setMetadata(convertMetadata(componentOfInstance, true, componentInstance)); Either capabilities = capabiltyRequirementConvertor @@ -634,9 +667,17 @@ public class ToscaExportHandler { groupsMap = new HashMap<>(); } for (GroupInstance groupInst : groupInstances) { - ToscaGroupTemplate toscaGroup = convertGroupInstance(groupInst); + boolean addToTosca = true; + + List artifacts = groupInst.getArtifacts(); + if (artifacts == null || artifacts.isEmpty()) { + addToTosca = false; + } - groupsMap.put(groupInst.getName(), toscaGroup); + if (addToTosca) { + ToscaGroupTemplate toscaGroup = convertGroupInstance(groupInst); + groupsMap.put(groupInst.getName(), toscaGroup); + } } } @@ -729,6 +770,7 @@ public class ToscaExportHandler { } private ToscaGroupTemplate convertGroup(GroupDefinition group) { + ToscaGroupTemplate toscaGroup = new ToscaGroupTemplate(); Map members = group.getMembers(); if (members != null) @@ -845,7 +887,7 @@ public class ToscaExportHandler { return toscaNodeType; } - /*private Either, ToscaError> createProxyNodeTypes(Component container) { + private Either, ToscaError> createProxyNodeTypes(Component container) { Map nodeTypesMap = null; Either, ToscaError> res = Either.left(nodeTypesMap); @@ -855,13 +897,15 @@ public class ToscaExportHandler { if (componetInstances == null || componetInstances.isEmpty()) return res; Map serviceProxyInstanceList = new HashMap<>(); - List proxyInst = componetInstances.stream().filter(p -> p.getOriginType().name().equals(OriginTypeEnum.ServiceProxy.name())).collect(Collectors.toList()); - if(proxyInst != null && !proxyInst.isEmpty()){ - for(ComponentInstance inst: proxyInst){ + List proxyInst = componetInstances.stream() + .filter(p -> p.getOriginType().name().equals(OriginTypeEnum.ServiceProxy.name())) + .collect(Collectors.toList()); + if (proxyInst != null && !proxyInst.isEmpty()) { + for (ComponentInstance inst : proxyInst) { serviceProxyInstanceList.put(inst.getToscaComponentName(), inst); } } - + if (serviceProxyInstanceList.isEmpty()) return res; ComponentParametersView filter = new ComponentParametersView(true); @@ -894,7 +938,7 @@ public class ToscaExportHandler { } return Either.left(nodeTypesMap); - }*/ + } private ToscaNodeType createProxyNodeType(Component origComponent, Component proxyComponent, ComponentInstance instance) { @@ -920,8 +964,9 @@ public class ToscaExportHandler { ToscaNodeTemplate nodeTypeTemplate, Component originComponent) { List> toscaRequirements = new ArrayList<>(); - if(!addRequirements(component, componentInstance, relations, originComponent, toscaRequirements)){ - log.debug("Failed to convert component instance requirements for the component instance {}. ", componentInstance.getName()); + if (!addRequirements(component, componentInstance, relations, originComponent, toscaRequirements)) { + log.debug("Failed to convert component instance requirements for the component instance {}. ", + componentInstance.getName()); return Either.right(ToscaError.NODE_TYPE_REQUIREMENT_ERROR); } if (!toscaRequirements.isEmpty()) { @@ -931,82 +976,114 @@ public class ToscaExportHandler { return Either.left(nodeTypeTemplate); } - private boolean addRequirements(Component component, ComponentInstance componentInstance, List relations, Component originComponent, + private boolean addRequirements(Component component, ComponentInstance componentInstance, + List relations, Component originComponent, List> toscaRequirements) { boolean result; - List filteredRelations = relations.stream().filter(p -> componentInstance.getUniqueId().equals(p.getFromNode())).collect(Collectors.toList()); - if(CollectionUtils.isEmpty(filteredRelations)){ + List filteredRelations = relations.stream() + .filter(p -> componentInstance.getUniqueId().equals(p.getFromNode())).collect(Collectors.toList()); + if (CollectionUtils.isEmpty(filteredRelations)) { result = true; } else { - result = !filteredRelations.stream().filter(rel -> !addRequirement(component,componentInstance, originComponent, component.getComponentInstances(), rel, toscaRequirements)).findFirst().isPresent(); + result = !filteredRelations.stream().filter(rel -> !addRequirement(componentInstance, originComponent, + component.getComponentInstances(), rel, toscaRequirements)).findFirst().isPresent(); } return result; } - - private boolean addRequirement(Component component,ComponentInstance fromInstance, Component originComponent, List instancesList, RequirementCapabilityRelDef rel, List> toscaRequirements){ - + + private boolean addRequirement(ComponentInstance fromInstance, Component fromOriginComponent, + List instancesList, RequirementCapabilityRelDef rel, + List> toscaRequirements) { + boolean result = true; - Map originComponents = new HashMap<>(); - Map> reqMap = originComponent.getRequirements(); - RequirementAndRelationshipPair reqAndRelationshipPair = rel.getRelationships().get(0); + Map> reqMap = fromOriginComponent.getRequirements(); + RelationshipInfo reqAndRelationshipPair = rel.getRelationships().get(0).getRelation(); Either getOriginRes = null; Optional reqOpt = null; Component toOriginComponent = null; Optional cap = null; - Either buildCapNameRes = null; - Either buildReqNameRes = null; - - ComponentInstance toInstance = instancesList.stream().filter(i -> rel.getToNode().equals(i.getUniqueId())).findFirst().orElse(null); + + ComponentInstance toInstance = instancesList.stream().filter(i -> rel.getToNode().equals(i.getUniqueId())) + .findFirst().orElse(null); if (toInstance == null) { - log.debug("Failed to find a relation from the node {} to the node {}", fromInstance.getName(), rel.getToNode()); + log.debug("Failed to find a relation from the node {} to the node {}", fromInstance.getName(), + rel.getToNode()); result = false; } - if(result){ - - if(component.getComponentType().equals(ComponentTypeEnum.SERVICE)) { - reqOpt = findRequirement(reqMap, reqAndRelationshipPair); - } - else { - reqOpt = findRequirement(reqMap, reqAndRelationshipPair.getRequirementUid()); - } - if(!reqOpt.isPresent()){ - log.debug("Failed to find a requirement with uniqueId {} on a component with uniqueId {}", reqAndRelationshipPair.getRequirementUid(), originComponent.getUniqueId()); + if (result) { + reqOpt = findRequirement(fromOriginComponent, reqMap, reqAndRelationshipPair, toInstance.getUniqueId()); + if (!reqOpt.isPresent()) { + log.debug("Failed to find a requirement with uniqueId {} on a component with uniqueId {}", + reqAndRelationshipPair.getRequirementUid(), fromOriginComponent.getUniqueId()); result = false; } } - if(result){ + if (result) { ComponentParametersView filter = new ComponentParametersView(true); filter.setIgnoreComponentInstances(false); filter.setIgnoreCapabilities(false); - getOriginRes = toscaOperationFacade.getToscaElement(toInstance.getComponentUid(), filter); - if(getOriginRes.isRight()){ - log.debug("Failed to build substituted name for the requirement {}. Failed to get an origin component with uniqueId {}", reqOpt.get().getName(), toInstance.getComponentUid()); + getOriginRes = toscaOperationFacade.getToscaElement(toInstance.getActualComponentUid(), filter); + if (getOriginRes.isRight()) { + log.debug("Failed to build substituted name for the requirement {}. Failed to get an origin component with uniqueId {}", + reqOpt.get().getName(), toInstance.getActualComponentUid()); result = false; } } - if(result){ + if (result) { toOriginComponent = getOriginRes.left().value(); - cap = toOriginComponent.getCapabilities().get(reqOpt.get().getCapability()).stream().filter(c -> c.getName().equals(reqAndRelationshipPair.getCapability())).findFirst(); - if(!cap.isPresent()){ - log.debug("Failed to find a capability with name {} on a component with uniqueId {}", reqAndRelationshipPair.getCapability(), originComponent.getUniqueId()); + cap = toOriginComponent.getCapabilities().get(reqOpt.get().getCapability()).stream() + .filter(c -> c.getName().equals(reqAndRelationshipPair.getCapability())).findFirst(); + if (!cap.isPresent()) { + cap = findCapability(reqMap, reqAndRelationshipPair, toOriginComponent, fromOriginComponent, reqOpt.get(), fromInstance); + if(!cap.isPresent()){ result = false; + log.debug("Failed to find a capability with name {} on a component with uniqueId {}", + reqAndRelationshipPair.getCapability(), fromOriginComponent.getUniqueId()); + } } } - if(result){ - buildCapNameRes = capabiltyRequirementConvertor.buildSubstitutedName(originComponents, toOriginComponent, cap.get().getPath(), reqAndRelationshipPair.getCapability()); - if(buildCapNameRes.isRight()){ - log.debug("Failed to build a substituted capability name for the capability with name {} on a component with uniqueId {}", reqAndRelationshipPair.getCapability(), originComponent.getUniqueId()); - result = false; - } + if (result) { + result = buildAndAddRequirement(toscaRequirements, fromOriginComponent, toOriginComponent, cap.get(), + reqOpt.get(), reqAndRelationshipPair, toInstance); } - if(result){ - buildReqNameRes = capabiltyRequirementConvertor.buildSubstitutedName(originComponents, originComponent, reqOpt.get().getPath(), reqAndRelationshipPair.getRequirement()); - if(buildReqNameRes.isRight()){ - log.debug("Failed to build a substituted requirement name for the requirement with name {} on a component with uniqueId {}", reqAndRelationshipPair.getRequirement(), originComponent.getUniqueId()); + return result; + } + + private Optional findCapability(Map> reqMap, RelationshipInfo reqAndRelationshipPair, Component toOriginComponent, Component fromOriginComponent, RequirementDefinition requirement, ComponentInstance fromInstance) { + Optional cap = Optional.empty(); + Optional findAny = reqMap.values().stream().flatMap(e -> e.stream()).filter(e -> e.getName().equals(reqAndRelationshipPair.getRequirement())).findAny(); + if (findAny.isPresent()) { + RequirementDefinition reqDefinition = findAny.get(); + cap = toOriginComponent.getCapabilities().get(requirement.getCapability()).stream().filter(c -> c.getType().equals(reqDefinition.getCapability())).findFirst(); + if (!cap.isPresent()) { + log.debug("Failed to find a capability with name {} on a component with uniqueId {}", reqAndRelationshipPair.getCapability(), fromOriginComponent.getUniqueId()); + } + } + return cap; + } + + private boolean buildAndAddRequirement(List> toscaRequirements, Component fromOriginComponent, Component toOriginComponent, CapabilityDefinition capability, RequirementDefinition requirement, RelationshipInfo reqAndRelationshipPair, ComponentInstance toInstance) { + boolean result = true; + Either buildReqNameRes = null; + Either buildCapNameRes = capabiltyRequirementConvertor.buildSubstitutedName(originComponents, + toOriginComponent, capability.getPath(), reqAndRelationshipPair.getCapability()); + if (buildCapNameRes.isRight()) { + log.debug( + "Failed to build a substituted capability name for the capability with name {} on a component with uniqueId {}", + reqAndRelationshipPair.getCapability(), fromOriginComponent.getUniqueId()); + result = false; + } + if (result) { + buildReqNameRes = capabiltyRequirementConvertor.buildSubstitutedName(originComponents, fromOriginComponent, + requirement.getPath(), reqAndRelationshipPair.getRequirement()); + if (buildReqNameRes.isRight()) { + log.debug( + "Failed to build a substituted requirement name for the requirement with name {} on a component with uniqueId {}", + reqAndRelationshipPair.getRequirement(), fromOriginComponent.getUniqueId()); result = false; } } - if(result){ + if (result) { ToscaTemplateRequirement toscaRequirement = new ToscaTemplateRequirement(); Map toscaReqMap = new HashMap<>(); toscaRequirement.setNode(toInstance.getName()); @@ -1017,39 +1094,49 @@ public class ToscaExportHandler { return result; } - private Optional findRequirement(Map> reqMap, String reqId) { + private Optional findRequirement(Component fromOriginComponent, Map> reqMap, RelationshipInfo reqAndRelationshipPair, String toInstanceId) { for(List reqList: reqMap.values()){ - Optional reqOpt = reqList.stream().filter(r -> r.getUniqueId().equals(reqId)).findFirst(); + Optional reqOpt = reqList.stream().filter(r -> isRequirementBelongToRelation(fromOriginComponent, reqAndRelationshipPair, r, toInstanceId)).findFirst(); if(reqOpt.isPresent()){ return reqOpt; } } return Optional.empty(); } - - private Optional findRequirement(Map> reqMap, RequirementAndRelationshipPair reqAndRelationshipPair) { - for(List reqList: reqMap.values()){ - Optional reqOpt = reqList.stream().filter(r -> - isRequirmentBelongTo(reqAndRelationshipPair, r)) - .findFirst(); - if(reqOpt.isPresent()){ - return reqOpt; - } - } - return Optional.empty(); + + /** + * Allows detecting the requirement belonging to the received relationship + * The detection logic is: A requirement belongs to a relationship IF 1.The + * name of the requirement equals to the "requirement" field of the + * relation; AND 2. In case of a non-atomic resource, OwnerId of the + * requirement equals to requirementOwnerId of the relation OR uniqueId of + * toInstance equals to capabilityOwnerId of the relation + * + * @param fromOriginComponent + * @param reqAndRelationshipPair + * @param requirement + * @param toInstanceId + * @return + */ + private boolean isRequirementBelongToRelation(Component originComponent, RelationshipInfo reqAndRelationshipPair, RequirementDefinition requirement, String toInstanceId) { + if (!StringUtils.equals(requirement.getName(), reqAndRelationshipPair.getRequirement())) + return false; + if (!ModelConverter.isAtomicComponent(originComponent)) + return isRequirementBelongToOwner(reqAndRelationshipPair, requirement, toInstanceId); + return true; } - private boolean isRequirmentBelongTo(RequirementAndRelationshipPair reqAndRelationshipPair, RequirementDefinition r) { - return StringUtils.isNotEmpty(r.getOwnerId()) && r.getOwnerId().equals(reqAndRelationshipPair.getRequirementOwnerId()) - && StringUtils.isNotEmpty(r.getName()) && r.getName().equals(reqAndRelationshipPair.getRequirement()); + private boolean isRequirementBelongToOwner(RelationshipInfo reqAndRelationshipPair, RequirementDefinition requirement, String toInstanceId) { + return StringUtils.equals(requirement.getOwnerId(), reqAndRelationshipPair.getRequirementOwnerId()) || StringUtils.equals(toInstanceId, reqAndRelationshipPair.getCapabilityOwnerId()); } - private Either convertCapabilities(Component component, SubstitutionMapping substitutionMappings) { - - Either result = Either.left(substitutionMappings);; + private Either convertCapabilities(Component component, + SubstitutionMapping substitutionMappings) { + + Either result = Either.left(substitutionMappings); Either, ToscaError> toscaCapabilitiesRes = capabiltyRequirementConvertor .convertSubstitutionMappingCapabilities(originComponents, component); - if(toscaCapabilitiesRes.isRight()){ + if (toscaCapabilitiesRes.isRight()) { result = Either.right(toscaCapabilitiesRes.right().value()); log.error("Failed convert capabilities for the component {}. ", component.getName()); } else if (MapUtils.isNotEmpty(toscaCapabilitiesRes.left().value())) { @@ -1108,6 +1195,7 @@ public class ToscaExportHandler { } private class RepresentNull implements Represent { + @Override public Node representData(Object data) { // possible values are here http://yaml.org/type/null.html return representScalar(Tag.NULL, ""); diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/model/ToscaMetadata.java b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/model/ToscaMetadata.java index 604a52083b..4f91e211cc 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/model/ToscaMetadata.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/model/ToscaMetadata.java @@ -38,7 +38,12 @@ public class ToscaMetadata implements IToscaMetadata { private Boolean serviceEcompNaming; private Boolean ecompGeneratedNaming; private String namingPolicy; - + private String sourceModelInvariant; + private String environmentContext; + private String sourceModelName; + private String sourceModelUuid; + + public String getName() { return name; } @@ -179,4 +184,37 @@ public class ToscaMetadata implements IToscaMetadata { this.customizationUUID = customizationUUID; } + public String getSourceModelInvariant() { + return sourceModelInvariant; + } + + public void setSourceModelInvariant(String sourceModelInvariant) { + this.sourceModelInvariant = sourceModelInvariant; + } + + public String getSourceModelName() { + return sourceModelName; + } + + public void setSourceModelName(String sourceModelName) { + this.sourceModelName = sourceModelName; + } + + public String getSourceModelUuid() { + return sourceModelUuid; + } + + public void setSourceModelUuid(String sourceModelUuid) { + this.sourceModelUuid = sourceModelUuid; + } + + + + public String getEnvironmentContext() { + return environmentContext; + } + + public void setEnvironmentContext(String environmentContext) { + this.environmentContext = environmentContext; + } } diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/user/UserBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/user/UserBusinessLogic.java index 7135bfb62e..90318a6259 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/user/UserBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/user/UserBusinessLogic.java @@ -34,7 +34,6 @@ import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.neo4j.GraphPropertiesDictionary; import org.openecomp.sdc.be.dao.titan.TitanGenericDao; import org.openecomp.sdc.be.dao.utils.UserStatusEnum; -import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum; import org.openecomp.sdc.be.impl.ComponentsUtils; import org.openecomp.sdc.be.model.LifecycleStateEnum; import org.openecomp.sdc.be.model.User; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/common/transaction/mngr/RollbackManager.java b/catalog-be/src/main/java/org/openecomp/sdc/common/transaction/mngr/RollbackManager.java index 7485a8dc43..7098021d1f 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/common/transaction/mngr/RollbackManager.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/common/transaction/mngr/RollbackManager.java @@ -20,16 +20,16 @@ package org.openecomp.sdc.common.transaction.mngr; -import fj.P; -import fj.data.Either; -import fj.data.HashMap; -import fj.data.List; - import org.openecomp.sdc.common.transaction.api.RollbackHandler; import org.openecomp.sdc.common.transaction.api.TransactionUtils.DBActionCodeEnum; import org.openecomp.sdc.common.transaction.api.TransactionUtils.DBTypeEnum; import org.openecomp.sdc.common.util.MethodActivationStatusEnum; +import fj.P; +import fj.data.Either; +import fj.data.HashMap; +import fj.data.List; + public class RollbackManager { private final HashMap rollbackHandlersMap; private final Integer transactionId; diff --git a/catalog-be/src/main/resources/application-context.xml b/catalog-be/src/main/resources/application-context.xml index 6c44b270c2..2b3603ce3b 100644 --- a/catalog-be/src/main/resources/application-context.xml +++ b/catalog-be/src/main/resources/application-context.xml @@ -22,6 +22,7 @@ org.openecomp.sdc.be.impl, org.openecomp.sdc.be.auditing.impl, org.openecomp.sdc.be.components.impl, + org.openecomp.sdc.be.components.merge, org.openecomp.sdc.be.components.distribution.engine, org.openecomp.sdc.be.distribution, org.openecomp.sdc.be.components.clean, diff --git a/catalog-be/src/main/resources/config/configuration.yaml b/catalog-be/src/main/resources/config/configuration.yaml index 2ae2cccb77..190153cb0a 100644 --- a/catalog-be/src/main/resources/config/configuration.yaml +++ b/catalog-be/src/main/resources/config/configuration.yaml @@ -21,9 +21,9 @@ beProtocol: http # catalog backend ssl port beSslPort: 8443 -version: 1.0 +version: 1.1.0 released: 2012-11-30 -toscaConformanceLevel: 4.0 +toscaConformanceLevel: 5.0 minToscaConformanceLevel: 3.0 titanCfgFile: /home/vagrant/catalog-be/config/catalog-be/titan.properties @@ -575,6 +575,12 @@ onboarding: downloadCsarUri: "/onboarding-api/v1.0/vendor-software-products/packages" healthCheckUri: "/onboarding-api/v1.0/healthcheck" +dcae: + protocol: http + host: 127.0.0.1 + port: 8080 + healthCheckUri: "/dcae/healthCheck" + switchoverDetector: gBeFqdn: AIO-BE.ecomp.idns.cip.com gFeFqdn: AIO-FE.ecomp.idns.cip.com @@ -637,3 +643,22 @@ genericAssetNodeTypes: VF : org.openecomp.resource.abstract.nodes.VF PNF: org.openecomp.resource.abstract.nodes.PNF Service: org.openecomp.resource.abstract.nodes.service + +workloadContext: Production +environmentContext: + defaultValue: General_Revenue-Bearing + validValues: + - Critical_Revenue-Bearing + - Vital_Revenue-Bearing + - Essential_Revenue-Bearing + - Important_Revenue-Bearing + - Needed_Revenue-Bearing + - Useful_Revenue-Bearing + - General_Revenue-Bearing + - Critical_Non-Revenue + - Vital_Non-Revenue + - Essential_Non-Revenue + - Important_Non-Revenue + - Needed_Non-Revenue + - Useful_Non-Revenue + - General_Non-Revenue diff --git a/catalog-be/src/main/resources/config/error-configuration.yaml b/catalog-be/src/main/resources/config/error-configuration.yaml index fbf397a999..9dc0355212 100644 --- a/catalog-be/src/main/resources/config/error-configuration.yaml +++ b/catalog-be/src/main/resources/config/error-configuration.yaml @@ -1851,4 +1851,30 @@ errors: code: 400, message: 'Error: VSP %1 cannot be imported. The VSP contains internal loop in VFC %2', messageId: "SVC4671" + } +#---------SVC4672------------------------------ +# %1 - capability uniqueId +# %2 - instance uniqueId +# %3 - container uniqueId + CAPABILITY_OF_INSTANCE_NOT_FOUND_ON_CONTAINER: { + code: 404, + message: "Error: Requested capability %1 of instance %2 was not found on the container %3.", + messageId: "SVC4672" + } +#---------SVC4673------------------------------ +# %1 - requirement uniqueId +# %2 - instance uniqueId +# %3 - container uniqueId + REQUIREMENT_OF_INSTANCE_NOT_FOUND_ON_CONTAINER: { + code: 404, + message: "Error: Requested requirement %1 of instance %2 was not found on the container %3.", + messageId: "SVC4673" + } +#---------SVC4674----------------------------- +# %1 - relation Id +# %2 - container uniqueId + RELATION_NOT_FOUND: { + code: 404, + message: "Error: Requested relation %1 was not found on the container %2.", + messageId: "SVC4674" } \ No newline at end of file diff --git a/catalog-be/src/main/resources/import/tosca/capability-types/capabilityTypes.yml b/catalog-be/src/main/resources/import/tosca/capability-types/capabilityTypes.yml index 45c2b812cf..4e25d735d0 100644 --- a/catalog-be/src/main/resources/import/tosca/capability-types/capabilityTypes.yml +++ b/catalog-be/src/main/resources/import/tosca/capability-types/capabilityTypes.yml @@ -27,6 +27,11 @@ tosca.capabilities.Container: required: false constraints: - greater_or_equal: 0 MB +org.openecomp.capabilities.PortMirroring: + derived_from: tosca.capabilities.Root + properties: + connection_point: + type: org.openecomp.datatypes.PortMirroringConnectionPointDescription tosca.capabilities.Endpoint: derived_from: tosca.capabilities.Root properties: diff --git a/catalog-be/src/main/resources/import/tosca/capability-types/capabilityTypes.zip b/catalog-be/src/main/resources/import/tosca/capability-types/capabilityTypes.zip index 268287a39d..84871d6a07 100644 Binary files a/catalog-be/src/main/resources/import/tosca/capability-types/capabilityTypes.zip and b/catalog-be/src/main/resources/import/tosca/capability-types/capabilityTypes.zip differ diff --git a/catalog-be/src/main/resources/import/tosca/categories/categoryTypes.yml b/catalog-be/src/main/resources/import/tosca/categories/categoryTypes.yml index 5a0c7a4dc1..519d1ee695 100644 --- a/catalog-be/src/main/resources/import/tosca/categories/categoryTypes.yml +++ b/catalog-be/src/main/resources/import/tosca/categories/categoryTypes.yml @@ -99,6 +99,12 @@ resources: VirtualLinks: name: "Virtual Links" icons: ['vl'] + Configuration: + name: "Configuration" + subcategories: + Configuraion: + name: "Configuration" + icons: ['pmc'] DcaeComponent: name: "DCAE Component" subcategories: @@ -123,6 +129,9 @@ resources: Policy: name: "Policy" icons: ['dcae_policy'] + MachineLearning: + name: "Machine Learning" + icons: ['dcae_machineLearning'] Template: name: "Template" subcategories: diff --git a/catalog-be/src/main/resources/import/tosca/categories/categoryTypes.zip b/catalog-be/src/main/resources/import/tosca/categories/categoryTypes.zip index 314a12ea55..de33b5bf89 100644 Binary files a/catalog-be/src/main/resources/import/tosca/categories/categoryTypes.zip and b/catalog-be/src/main/resources/import/tosca/categories/categoryTypes.zip differ diff --git a/catalog-be/src/main/resources/import/tosca/data-types/dataTypes.yml b/catalog-be/src/main/resources/import/tosca/data-types/dataTypes.yml index 43debe6291..449842c2f4 100644 --- a/catalog-be/src/main/resources/import/tosca/data-types/dataTypes.yml +++ b/catalog-be/src/main/resources/import/tosca/data-types/dataTypes.yml @@ -55,6 +55,18 @@ tosca.datatypes.Credential: type: string required: false +org.openecomp.datatypes.PortMirroringConnectionPointDescription: + derived_from: tosca.datatypes.Root + properties: + nf_type: + type: string + nfc_type: + type: string + network_role: + type: string + pps_capacity: + type: string + tosca.datatypes.TimeInterval: derived_from: tosca.datatypes.Root properties: @@ -348,6 +360,11 @@ org.openecomp.datatypes.heat.neutron.port.FixedIps: description: IP address desired in the subnet for this port required: false status: SUPPORTED + subnet_id: + type: string + description: Subnet in which to allocate the IP address for this port + required: false + status: SUPPORTED org.openecomp.datatypes.heat.FileInfo: derived_from: tosca.datatypes.Root diff --git a/catalog-be/src/main/resources/import/tosca/data-types/dataTypes.zip b/catalog-be/src/main/resources/import/tosca/data-types/dataTypes.zip index 506a58f4b1..1f79bf2c2d 100644 Binary files a/catalog-be/src/main/resources/import/tosca/data-types/dataTypes.zip and b/catalog-be/src/main/resources/import/tosca/data-types/dataTypes.zip differ diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/Generic_VF/Generic_VF.yml b/catalog-be/src/main/resources/import/tosca/heat-types/Generic_VF/Generic_VF.yml index 6618650ef3..667ed7484b 100644 --- a/catalog-be/src/main/resources/import/tosca/heat-types/Generic_VF/Generic_VF.yml +++ b/catalog-be/src/main/resources/import/tosca/heat-types/Generic_VF/Generic_VF.yml @@ -23,5 +23,6 @@ node_types: type: integer max_instances: type: integer - - \ No newline at end of file + multi_stage_design: + type: boolean + default: false \ No newline at end of file diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/Generic_VF/Generic_VF.zip b/catalog-be/src/main/resources/import/tosca/heat-types/Generic_VF/Generic_VF.zip index d564813e2f..85adfbc2a1 100644 Binary files a/catalog-be/src/main/resources/import/tosca/heat-types/Generic_VF/Generic_VF.zip and b/catalog-be/src/main/resources/import/tosca/heat-types/Generic_VF/Generic_VF.zip differ diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/extContrailCP/extContrailCP.json b/catalog-be/src/main/resources/import/tosca/heat-types/extContrailCP/extContrailCP.json new file mode 100644 index 0000000000..dd7b9769ee --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/extContrailCP/extContrailCP.json @@ -0,0 +1,21 @@ +{ + "payloadName": "extContrailCP.yml", + "contactId": "DS200P", + "name": "extContrailCP", + "description": "The AT&T Connection Point base type all other CP derive from", + "resourceIconPath": "network", + "resourceType": "CP", + "categories": [ + { + "name": "Generic", + "subcategories": [ + { + "name": "Network Elements" + } + ] + } +], + "tags": [ + "extContrailCP" + ] +} diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/extContrailCP/extContrailCP.yml b/catalog-be/src/main/resources/import/tosca/heat-types/extContrailCP/extContrailCP.yml new file mode 100644 index 0000000000..e97c7ae674 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/extContrailCP/extContrailCP.yml @@ -0,0 +1,59 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +node_types: + org.openecomp.resource.cp.v2.extContrailCP: + derived_from: org.openecomp.resource.cp.v2.extCP + properties: + # copied from the org.openecomp.resource.cp.nodes.heat.network.contrail.Port type + 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: + # copied from the org.openecomp.resource.cp.nodes.heat.network.contrail.Port type + fq_name: + type: string + description: fq_name + status: SUPPORTED diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/extContrailCP/extContrailCP.zip b/catalog-be/src/main/resources/import/tosca/heat-types/extContrailCP/extContrailCP.zip new file mode 100644 index 0000000000..dddadde1ad Binary files /dev/null and b/catalog-be/src/main/resources/import/tosca/heat-types/extContrailCP/extContrailCP.zip differ diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/extCp2/extCp2.json b/catalog-be/src/main/resources/import/tosca/heat-types/extCp2/extCp2.json new file mode 100644 index 0000000000..ff55d80135 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/extCp2/extCp2.json @@ -0,0 +1,21 @@ +{ + "payloadName": "extCP.yml", + "contactId": "DS200P", + "name": "ExtCP2", + "description": "The AT&T Connection Point base type all other CP derive from", + "resourceIconPath": "network", + "resourceType": "CP", + "categories": [ + { + "name": "Generic", + "subcategories": [ + { + "name": "Network Elements" + } + ] + } +], + "tags": [ + "ExtCP2" + ] +} diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/extCp2/extCp2.yml b/catalog-be/src/main/resources/import/tosca/heat-types/extCp2/extCp2.yml new file mode 100644 index 0000000000..beae41d5ca --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/extCp2/extCp2.yml @@ -0,0 +1,8 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +node_types: + org.openecomp.resource.cp.v2.extCP: + derived_from: org.openecomp.resource.cp.nodes.network.Port + description: The SDC External Connection Point base type + capabilities: + port_mirroring: + type: org.openecomp.capabilities.PortMirroring \ No newline at end of file diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/extCp2/extCp2.zip b/catalog-be/src/main/resources/import/tosca/heat-types/extCp2/extCp2.zip new file mode 100644 index 0000000000..81a9259e6d Binary files /dev/null and b/catalog-be/src/main/resources/import/tosca/heat-types/extCp2/extCp2.zip differ diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/extNeutronCP/extNeutronCP.json b/catalog-be/src/main/resources/import/tosca/heat-types/extNeutronCP/extNeutronCP.json new file mode 100644 index 0000000000..84cc8779c7 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/extNeutronCP/extNeutronCP.json @@ -0,0 +1,21 @@ +{ + "payloadName": "extNeutronCP.yml", + "contactId": "DS200P", + "name": "extNeutronCP", + "description": "The AT&T Connection Point base type all other CP derive from", + "resourceIconPath": "network", + "resourceType": "CP", + "categories": [ + { + "name": "Generic", + "subcategories": [ + { + "name": "Network Elements" + } + ] + } +], + "tags": [ + "extNeutronCP" + ] +} diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/extNeutronCP/extNeutronCP.yml b/catalog-be/src/main/resources/import/tosca/heat-types/extNeutronCP/extNeutronCP.yml new file mode 100644 index 0000000000..35306f5b49 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/extNeutronCP/extNeutronCP.yml @@ -0,0 +1,140 @@ + +tosca_definitions_version: tosca_simple_yaml_1_0_0 +node_types: + org.openecomp.resource.cp.v2.extNeutronCP: + derived_from: org.openecomp.resource.cp.v2.extCP + properties: + # copied from the org.openecomp.resource.cp.nodes.heat.network.neutron.Port type + 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: + # copied from the org.openecomp.resource.cp.nodes.heat.network.neutron.Port type + 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: + # copied from the org.openecomp.resource.cp.nodes.heat.network.neutron.Port type + attachment: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + binding: + type: tosca.capabilities.network.Bindable + valid_source_types: + - org.openecomp.resource.cp.nodes.heat.network.contrailV2.VLANSubInterface + occurrences: + - 0 + - UNBOUNDED \ No newline at end of file diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/extNeutronCP/extNeutronCP.zip b/catalog-be/src/main/resources/import/tosca/heat-types/extNeutronCP/extNeutronCP.zip new file mode 100644 index 0000000000..02b62a69da Binary files /dev/null and b/catalog-be/src/main/resources/import/tosca/heat-types/extNeutronCP/extNeutronCP.zip differ diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/extVl/extVl.yml b/catalog-be/src/main/resources/import/tosca/heat-types/extVl/extVl.yml index 3973598acd..53b453c67d 100644 --- a/catalog-be/src/main/resources/import/tosca/heat-types/extVl/extVl.yml +++ b/catalog-be/src/main/resources/import/tosca/heat-types/extVl/extVl.yml @@ -10,7 +10,7 @@ node_types: description: ECOMP supported network types. network_role: type: string - required: ture + required: true description: > Unique label that defines the role that this network performs. example: vce oam network, vnat sr-iov1 network diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/extVl/extVl.zip b/catalog-be/src/main/resources/import/tosca/heat-types/extVl/extVl.zip index 80b1e1a1dd..f69e5b40fb 100644 Binary files a/catalog-be/src/main/resources/import/tosca/heat-types/extVl/extVl.zip and b/catalog-be/src/main/resources/import/tosca/heat-types/extVl/extVl.zip differ diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/portMirroring/portMirroring.json b/catalog-be/src/main/resources/import/tosca/heat-types/portMirroring/portMirroring.json new file mode 100644 index 0000000000..8d809ba354 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/portMirroring/portMirroring.json @@ -0,0 +1,21 @@ +{ + "payloadName": "portMirroring.yml", + "contactId": "jh0003", + "name": "Port Mirroring Configuration", + "description": "A port mirroring configuration object", + "resourceIconPath": "pmc", + "resourceType": "Configuration", + "categories": [ + { + "name": "Configuration", + "subcategories": [ + { + "name": "Configuration" + } + ] + } +], + "tags": [ + "Port Mirroring Configuration" + ] +} \ No newline at end of file diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/portMirroring/portMirroring.yml b/catalog-be/src/main/resources/import/tosca/heat-types/portMirroring/portMirroring.yml new file mode 100644 index 0000000000..125bccce06 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/portMirroring/portMirroring.yml @@ -0,0 +1,11 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +node_types: + org.openecomp.nodes.PortMirroringConfiguration: + derived_from: tosca.nodes.Root + requirements: + - source: + capability: org.openecomp.capabilities.PortMirroring + occurrences: [1,UNBOUNDED] + - collector: + capability: org.openecomp.capabilities.PortMirroring + occurrences: [1,1] \ No newline at end of file diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/portMirroring/portMirroring.zip b/catalog-be/src/main/resources/import/tosca/heat-types/portMirroring/portMirroring.zip new file mode 100644 index 0000000000..cbed61fcf5 Binary files /dev/null and b/catalog-be/src/main/resources/import/tosca/heat-types/portMirroring/portMirroring.zip differ diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/portMirroringByPolicy/portMirroringByPolicy.json b/catalog-be/src/main/resources/import/tosca/heat-types/portMirroringByPolicy/portMirroringByPolicy.json new file mode 100644 index 0000000000..a27717fe5b --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/portMirroringByPolicy/portMirroringByPolicy.json @@ -0,0 +1,21 @@ +{ + "payloadName": "portMirroringByPolicy.yml", + "contactId": "jh0003", + "name": "Port Mirroring Configuration By Policy", + "description": "A port mirroring configuration by policy object", + "resourceIconPath": "pmc", + "resourceType": "Configuration", + "categories": [ + { + "name": "Configuration", + "subcategories": [ + { + "name": "Configuration" + } + ] + } +], + "tags": [ + "Port Mirroring Configuration By Policy" + ] +} \ No newline at end of file diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/portMirroringByPolicy/portMirroringByPolicy.yml b/catalog-be/src/main/resources/import/tosca/heat-types/portMirroringByPolicy/portMirroringByPolicy.yml new file mode 100644 index 0000000000..0da5f689b4 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/portMirroringByPolicy/portMirroringByPolicy.yml @@ -0,0 +1,26 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +node_types: + org.openecomp.nodes.PortMirroringConfigurationByPolicy: + derived_from: tosca.nodes.Root + properties: + collector_node: + type: string + description: The name of the Collector Proxy + required: true + policy_name: + type: string + description: The name of the policy for selection of the collector interfaces + required: true + equip_model: + type: string + description: The name of the equipment type of the collector, i.e. Cisco 4500x + required: true + equip_vendor: + type: string + description: The name of the equipment vendor of the collector, i.e. Cisco + required: true + requirements: + - source: + capability: org.openecomp.capabilities.PortMirroring + occurrences: [1,UNBOUNDED] + diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/portMirroringByPolicy/portMirroringByPolicy.zip b/catalog-be/src/main/resources/import/tosca/heat-types/portMirroringByPolicy/portMirroringByPolicy.zip new file mode 100644 index 0000000000..a11e4f7842 Binary files /dev/null and b/catalog-be/src/main/resources/import/tosca/heat-types/portMirroringByPolicy/portMirroringByPolicy.zip differ diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/serviceProxy/serviceProxy.json b/catalog-be/src/main/resources/import/tosca/heat-types/serviceProxy/serviceProxy.json new file mode 100644 index 0000000000..c34625a3c9 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/serviceProxy/serviceProxy.json @@ -0,0 +1,21 @@ +{ + "payloadName": "serviceProxy.yml", + "contactId": "jh0003", + "name": "serviceProxy", + "description": "Represents a proxy to a service VFC.", + "resourceIconPath": "defaulticon", + "resourceType": "ServiceProxy", + "categories": [ + { + "name": "Generic", + "subcategories": [ + { + "name": "Abstract" + } + ] + } +], + "tags": [ + "serviceProxy" + ] +} \ No newline at end of file diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/serviceProxy/serviceProxy.yml b/catalog-be/src/main/resources/import/tosca/heat-types/serviceProxy/serviceProxy.yml new file mode 100644 index 0000000000..cf7ec5af10 --- /dev/null +++ b/catalog-be/src/main/resources/import/tosca/heat-types/serviceProxy/serviceProxy.yml @@ -0,0 +1,4 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +node_types: + org.openecomp.nodes.ServiceProxy: + derived_from: tosca.nodes.Root \ No newline at end of file diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/serviceProxy/serviceProxy.zip b/catalog-be/src/main/resources/import/tosca/heat-types/serviceProxy/serviceProxy.zip new file mode 100644 index 0000000000..9f0b60d1df Binary files /dev/null and b/catalog-be/src/main/resources/import/tosca/heat-types/serviceProxy/serviceProxy.zip differ diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importHeatTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importHeatTypes.py index c72c2c394f..8b16a72ab3 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/importHeatTypes.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/importHeatTypes.py @@ -42,6 +42,8 @@ def importHeatTypes(beHost, bePort, adminUser, fileDir, updateversion): "Generic_Service", "contrailNetworkRules", "contrailPort", + "portMirroring", + "serviceProxy", "contrailV2NetworkRules", "contrailV2VirtualNetwork", "securityRules", @@ -52,9 +54,10 @@ def importHeatTypes(beHost, bePort, adminUser, fileDir, updateversion): "contrailV2VLANSubInterface", "multiFlavorVFC", "vnfConfiguration", - "underlayVpn", - "overlayTunnel", - "genericNeutronNet" + "extCp2", + "extNeutronCP", + "extContrailCP", + "portMirroringByPolicy" ] responseCodes = [200, 201] diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeAll.py b/catalog-be/src/main/resources/scripts/import/tosca/importNormativeAll.py index 3d7d9a9bbf..b6e390992e 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeAll.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/importNormativeAll.py @@ -122,11 +122,7 @@ def main(argv): fileLocation = baseFileLocation + "heat-types/" resultsHeat = importHeatTypes(beHost, bePort, adminUser, fileLocation, updateversion) handleResults(resultsHeat, updateversion) - - fileLocation = baseFileLocation + "onap-types/" - resultsHeat = importOnapTypes(beHost, bePort, adminUser, fileLocation, updateversion) - handleResults(resultsHeat, updateversion) - + fileLocation = baseFileLocation + "group-types/" importGroupTypes(beHost, bePort, adminUser, False, fileLocation) diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importONAPNormativeAll.py b/catalog-be/src/main/resources/scripts/import/tosca/importONAPNormativeAll.py new file mode 100644 index 0000000000..3d7d9a9bbf --- /dev/null +++ b/catalog-be/src/main/resources/scripts/import/tosca/importONAPNormativeAll.py @@ -0,0 +1,140 @@ +import pycurl +import sys, getopt, os +from StringIO import StringIO +import json +import copy +import time +#from importNormativeElements import createNormativeElement +from importNormativeElements import * +from importNormativeTypes import importNormativeTypes +from importHeatTypes import importHeatTypes +from importOnapTypes import importOnapTypes +from importNormativeCapabilities import importNormativeCapabilities +from importCategoryTypes import importCategories +from importNormativeInterfaceLifecycleTypes import importNormativeInterfaceLifecycleType +from importDataTypes import importDataTypes +from importGroupTypes import importGroupTypes +from importPolicyTypes import importPolicyTypes +from importCommon import * +import importCommon + +################################################################################################################################################################################################# +# # +# Import all users from a given file # +# # +# activation : # +# python importNormativeAll.py [-i | --ip=] [-p | --port= ] [-u | --user= ] [-d | --debug=] # +# [-v | --updateversion=] # +# # +# shortest activation (be host = localhost, be port = 8080, user = jh0003): # # # +# python importNormativeAll.py # +# # +################################################################################################################################################################################################# + +def usage(): + print sys.argv[0], '[-i | --ip=] [-p | --port= ] [-u | --user= ] [-d | --debug=] [-v | --updateversion=]' + +def handleResults(results, updateversion): + printFrameLine() + for result in results: + printNameAndReturnCode(result[0], result[1]) + printFrameLine() + + responseCodes = [200, 201] + + if(updateversion == 'false'): + responseCodes = [200, 201, 409] + + failedResults = filter(lambda x: x[1] == None or x[1] not in responseCodes, results) + if (len(failedResults) > 0): + errorAndExit(1, None) + +def main(argv): + print 'Number of arguments:', len(sys.argv), 'arguments.' + + beHost = 'localhost' + bePort = '8080' + adminUser = 'jh0003' + debugf = None + updateversion = 'true' + importCommon.debugFlag = False + + try: + opts, args = getopt.getopt(argv,"i:p:u:d:v:h",["ip=","port=","user=","debug=","updateversion="]) + except getopt.GetoptError: + usage() + errorAndExit(2, 'Invalid input') + + for opt, arg in opts: + #print opt, arg + if opt == '-h': + usage() + sys.exit(3) + elif opt in ("-i", "--ip"): + beHost = arg + elif opt in ("-p", "--port"): + bePort = arg + elif opt in ("-u", "--user"): + adminUser = arg + elif opt in ("-d", "--debug"): + print arg + debugf = bool(arg.lower() == "true" or arg.lower() == "yes") + elif opt in ("-v", "--updateversion"): + print arg + if (arg.lower() == "false" or arg.lower() == "no"): + updateversion = 'false' + + print 'be host =',beHost,', be port =', bePort,', user =', adminUser, ', debug =', debugf, ', updateversion =', updateversion + + if (debugf != None): + print 'set debug mode to ' + str(debugf) + importCommon.debugFlag = debugf + + if ( beHost == None ): + usage() + sys.exit(3) + + print sys.argv[0] + pathdir = os.path.dirname(os.path.realpath(sys.argv[0])) + debug("path dir =" + pathdir) + + baseFileLocation = pathdir + "/../../../import/tosca/" + + fileLocation = baseFileLocation + "data-types/" + importDataTypes(beHost, bePort, adminUser, False, fileLocation) + + print 'sleep until data type cache is updated' + time.sleep( 70 ) + + fileLocation = baseFileLocation + "capability-types/" + importNormativeCapabilities(beHost, bePort, adminUser, False, fileLocation) + + fileLocation = baseFileLocation + "interface-lifecycle-types/" + importNormativeInterfaceLifecycleType(beHost, bePort, adminUser, False, fileLocation) + + fileLocation = baseFileLocation + "categories/" + importCategories(beHost, bePort, adminUser, False, fileLocation) + + fileLocation = baseFileLocation + "normative-types/" + results = importNormativeTypes(beHost, bePort, adminUser, fileLocation, updateversion) + handleResults(results, updateversion) + + fileLocation = baseFileLocation + "heat-types/" + resultsHeat = importHeatTypes(beHost, bePort, adminUser, fileLocation, updateversion) + handleResults(resultsHeat, updateversion) + + fileLocation = baseFileLocation + "onap-types/" + resultsHeat = importOnapTypes(beHost, bePort, adminUser, fileLocation, updateversion) + handleResults(resultsHeat, updateversion) + + fileLocation = baseFileLocation + "group-types/" + importGroupTypes(beHost, bePort, adminUser, False, fileLocation) + + fileLocation = baseFileLocation + "policy-types/" + importPolicyTypes(beHost, bePort, adminUser, False, fileLocation) + + errorAndExit(0, None) + +if __name__ == "__main__": + main(sys.argv[1:]) + diff --git a/catalog-be/src/main/resources/scripts/import/tosca/typesToUpgrade.json b/catalog-be/src/main/resources/scripts/import/tosca/typesToUpgrade.json index c518855860..d239a15c72 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/typesToUpgrade.json +++ b/catalog-be/src/main/resources/scripts/import/tosca/typesToUpgrade.json @@ -1,54 +1,20 @@ { "heat": [ - "globalNetwork", - "globalPort", - "globalCompute", - "volume", - "cinderVolume", - "contrailVirtualNetwork", - "neutronNet", - "neutronPort", - "novaServer", - "extVl", - "internalVl", - "extCp", - "vl", - "eline", - "abstractSubstitute", - "Generic_VFC", - "Generic_VF", - "Generic_PNF", - "Generic_Service", - "contrailNetworkRules", "contrailPort", - "contrailV2NetworkRules", - "contrailV2VirtualNetwork", - "securityRules", - "contrailAbstractSubstitute", - "contrailCompute", + "extCp", "contrailV2VirtualMachineInterface", - "subInterface", - "contrailV2VLANSubInterface", - "multiFlavorVFC", - "vnfConfiguration", - "underlayVpn", - "overlayTunnel", - "genericNeutronNet" + "neutronPort", + "Generic_PNF", + "portMirroring", + "Generic_VF", + "serviceProxy", + "extCp2", + "extContrailCP", + "vnfConfiguration", + "extVl", + "multiFlavorVFC", + "portMirroringByPolicy" ], "normative": [ - "root", - "compute", - "softwareComponent", - "webServer", - "webApplication", - "DBMS", - "database", - "objectStorage", - "blockStorage", - "containerRuntime", - "containerApplication", - "loadBalancer", - "port", - "network" ] } \ No newline at end of file diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormative.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormative.py index 4d0ec291f5..69a51f41f1 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormative.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormative.py @@ -114,10 +114,6 @@ def main(argv): resultsHeat = upgradeTypesPerConfigFile(beHost, bePort, adminUser, baseFileLocation, updateversion) handleResults(resultsHeat, 'false') - fileLocation = baseFileLocation + "onap-types/" - resultsHeat = importOnapTypes(beHost, bePort, adminUser, fileLocation, updateversion) - handleResults(resultsHeat, updateversion) - errorAndExit(0, None) if __name__ == "__main__": diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPNormative.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPNormative.py new file mode 100644 index 0000000000..4d0ec291f5 --- /dev/null +++ b/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPNormative.py @@ -0,0 +1,124 @@ +import pycurl +import sys, getopt, os +from StringIO import StringIO +import json +import copy +import time +from importCategoryTypes import importCategories +from upgradeHeatAndNormativeTypes import upgradeTypesPerConfigFile +from importDataTypes import importDataTypes +from importPolicyTypes import importPolicyTypes +from importGroupTypes import importGroupTypes +from importNormativeCapabilities import importNormativeCapabilities +from importNormativeInterfaceLifecycleTypes import importNormativeInterfaceLifecycleType +from importOnapTypes import importOnapTypes + + +from importCommon import * +import importCommon + +################################################################################################################################################################################################# +# # +# Upgrades the normative types # +# # +# activation : # +# python upgradeNormative.py [-i | --ip=] [-p | --port= ] [-u | --user= ] [-d | --debug=] # +# # +# # +# shortest activation (be host = localhost, be port = 8080, user = jh0003): # # # +# python upgradeNormative.py # +# # +################################################################################################################################################################################################# + +def usage(): + print sys.argv[0], '[-i | --ip=] [-p | --port= ] [-u | --user= ] [-d | --debug=]' + +def handleResults(results, updateversion): + printFrameLine() + for result in results: + printNameAndReturnCode(result[0], result[1]) + printFrameLine() + + failedResults = filter(lambda x: x[1] == None or x[1] not in [200, 201, 409], results) + if (len(failedResults) > 0): + errorAndExit(1, None) + +def main(argv): + print 'Number of arguments:', len(sys.argv), 'arguments.' + + beHost = 'localhost' + bePort = '8080' + adminUser = 'jh0003' + debugf = None + updateversion = 'true' + importCommon.debugFlag = False + + try: + opts, args = getopt.getopt(argv,"i:p:u:d:h",["ip=","port=","user=","debug="]) + except getopt.GetoptError: + usage() + errorAndExit(2, 'Invalid input') + + for opt, arg in opts: + #print opt, arg + if opt == '-h': + usage() + sys.exit(3) + elif opt in ("-i", "--ip"): + beHost = arg + elif opt in ("-p", "--port"): + bePort = arg + elif opt in ("-u", "--user"): + adminUser = arg + elif opt in ("-d", "--debug"): + print arg + debugf = bool(arg.lower() == "true" or arg.lower() == "yes") + + print 'be host =',beHost,', be port =', bePort,', user =', adminUser, ', debug =', debugf + + if (debugf != None): + print 'set debug mode to ' + str(debugf) + importCommon.debugFlag = debugf + + if ( beHost == None ): + usage() + sys.exit(3) + + print sys.argv[0] + pathdir = os.path.dirname(os.path.realpath(sys.argv[0])) + debug("path dir =" + pathdir) + + baseFileLocation = pathdir + "/../../../import/tosca/" + + fileLocation = baseFileLocation + "categories/" + importCategories(beHost, bePort, adminUser, False, fileLocation) + + fileLocation = baseFileLocation + "data-types/" + importDataTypes(beHost, bePort, adminUser, False, fileLocation) + + fileLocation = baseFileLocation + "policy-types/" + importPolicyTypes(beHost, bePort, adminUser, False, fileLocation) + + fileLocation = baseFileLocation + "group-types/" + importGroupTypes(beHost, bePort, adminUser, False, fileLocation) + + fileLocation = baseFileLocation + "capability-types/" + importNormativeCapabilities(beHost, bePort, adminUser, False, fileLocation) + + fileLocation = baseFileLocation + "interface-lifecycle-types/" + importNormativeInterfaceLifecycleType(beHost, bePort, adminUser, False, fileLocation) + + print 'sleep until data type cache is updated' + time.sleep( 70 ) + + resultsHeat = upgradeTypesPerConfigFile(beHost, bePort, adminUser, baseFileLocation, updateversion) + handleResults(resultsHeat, 'false') + + fileLocation = baseFileLocation + "onap-types/" + resultsHeat = importOnapTypes(beHost, bePort, adminUser, fileLocation, updateversion) + handleResults(resultsHeat, updateversion) + + errorAndExit(0, None) + +if __name__ == "__main__": + main(sys.argv[1:]) diff --git a/catalog-be/src/test/java/org/openecomp/sdc/ZipUtil.java b/catalog-be/src/test/java/org/openecomp/sdc/ZipUtil.java index d55d5752c1..c3f211f7ab 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/ZipUtil.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/ZipUtil.java @@ -21,8 +21,6 @@ package org.openecomp.sdc; import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.FileInputStream; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/DummyConfigurationManager.java b/catalog-be/src/test/java/org/openecomp/sdc/be/DummyConfigurationManager.java new file mode 100644 index 0000000000..a6c8dc4f0c --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/DummyConfigurationManager.java @@ -0,0 +1,40 @@ +package org.openecomp.sdc.be; + +import static org.mockito.Mockito.mock; + +import org.openecomp.sdc.be.config.Configuration; +import org.openecomp.sdc.be.config.ConfigurationManager; +import org.openecomp.sdc.be.config.DistributionEngineConfiguration; +import org.openecomp.sdc.common.api.ConfigurationListener; +import org.openecomp.sdc.common.api.ConfigurationSource; + +public class DummyConfigurationManager { + + private DistributionEngineConfiguration distributionConfigurationMock = mock(DistributionEngineConfiguration.class); + private Configuration configurationMock = mock(Configuration.class); + + public DummyConfigurationManager() { + new ConfigurationManager(new DummyConfigurationSource()); + } + + public class DummyConfigurationSource implements ConfigurationSource { + + @SuppressWarnings("unchecked") + @Override + public T getAndWatchConfiguration(Class className, ConfigurationListener configurationListener) { + if (className.equals(DistributionEngineConfiguration.class)) { + return (T) distributionConfigurationMock; + } + if (className.equals(Configuration.class)) { + return (T) configurationMock; + } + return null; + } + + @Override + public void addWatchConfiguration(Class className, ConfigurationListener configurationListener) { + + } + } + +} diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/AuditingManagerTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/AuditingManagerTest.java index dff0e3c729..87dfbc45de 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/AuditingManagerTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/AuditingManagerTest.java @@ -25,8 +25,6 @@ import static org.mockito.Mockito.when; import java.util.EnumMap; import java.util.UUID; -import junit.framework.Assert; - import org.junit.Before; import org.junit.Test; import org.mockito.InjectMocks; @@ -38,10 +36,8 @@ import org.openecomp.sdc.be.dao.impl.AuditingDao; import org.openecomp.sdc.common.api.Constants; import org.openecomp.sdc.common.datastructure.AuditingFieldsKeysEnum; import org.openecomp.sdc.common.util.ThreadLocalsHolder; -import org.slf4j.LoggerFactory; -import ch.qos.logback.classic.Level; -import ch.qos.logback.classic.Logger; +import junit.framework.Assert; public class AuditingManagerTest extends BaseConfDependentTest{ diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/ComponentBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/ComponentBusinessLogicTest.java index 90f5b19acc..7774b7f412 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/ComponentBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/ComponentBusinessLogicTest.java @@ -20,49 +20,108 @@ package org.openecomp.sdc.be.components; +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.when; + +import java.util.HashMap; import java.util.List; +import java.util.Map; +import org.junit.BeforeClass; import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.runners.MockitoJUnitRunner; +import org.openecomp.sdc.be.DummyConfigurationManager; +import org.openecomp.sdc.be.components.impl.ArtifactsBusinessLogic; import org.openecomp.sdc.be.components.impl.ComponentBusinessLogic; import org.openecomp.sdc.be.components.impl.ComponentInstanceBusinessLogic; +import org.openecomp.sdc.be.components.utils.ResourceBuilder; +import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; +import org.openecomp.sdc.be.model.ArtifactDefinition; import org.openecomp.sdc.be.model.ComponentInstance; +import org.openecomp.sdc.be.model.Resource; +import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.be.ui.model.UiComponentDataTransfer; +import org.openecomp.sdc.common.api.ArtifactGroupTypeEnum; import org.openecomp.sdc.exception.ResponseFormat; import fj.data.Either; +@RunWith(MockitoJUnitRunner.class) public class ComponentBusinessLogicTest { - ComponentBusinessLogic businessLogic = new ComponentBusinessLogic() { + private static final User USER = new User(); + private static final String ARTIFACT_LABEL = "toscaArtifact1"; + private static final String ARTIFACT_LABEL2 = "toscaArtifact2"; + + @InjectMocks + private ComponentBusinessLogic testInstance = new ComponentBusinessLogic() { @Override public Either, ResponseFormat> deleteMarkedComponents() { - // TODO Auto-generated method stub return null; } @Override public ComponentInstanceBusinessLogic getComponentInstanceBL() { - // TODO Auto-generated method stub return null; } @Override public Either, ResponseFormat> getComponentInstancesFilteredByPropertiesAndInputs(String componentId, ComponentTypeEnum componentTypeEnum, String userId, String searchText) { - // TODO Auto-generated method stub return null; } @Override public Either getUiComponentDataTransferByComponentId(String componentId, List dataParamsToReturn) { - // TODO Auto-generated method stub return null; } }; + @Mock + private ArtifactsBusinessLogic artifactsBusinessLogic; + + @BeforeClass + public static void setUp() throws Exception { + new DummyConfigurationManager(); + } + + @SuppressWarnings("unchecked") @Test - public void testGetRequirementsAndCapabilities() { - // businessLogic.getRequirementsAndCapabilities(componentId, - // componentTypeEnum); + public void setToscaArtifactsPlaceHolders_normalizeArtifactName() throws Exception { + Resource resource = new ResourceBuilder().setUniqueId("uid") + .setComponentType(ComponentTypeEnum.RESOURCE) + .setSystemName("myResource") + .build(); + Map artifactsFromConfig = new HashMap<>(); + artifactsFromConfig.put(ARTIFACT_LABEL, buildArtifactMap("artifact:not normalized.yml")); + artifactsFromConfig.put(ARTIFACT_LABEL2, buildArtifactMap("alreadyNormalized.csar")); + when(ConfigurationManager.getConfigurationManager().getConfiguration().getToscaArtifacts()).thenReturn(artifactsFromConfig); + when(artifactsBusinessLogic.createArtifactPlaceHolderInfo(resource.getUniqueId(), ARTIFACT_LABEL, (Map) artifactsFromConfig.get(ARTIFACT_LABEL), USER, ArtifactGroupTypeEnum.TOSCA)) + .thenReturn(buildArtifactDef(ARTIFACT_LABEL)); + when(artifactsBusinessLogic.createArtifactPlaceHolderInfo(resource.getUniqueId(), ARTIFACT_LABEL2, (Map) artifactsFromConfig.get(ARTIFACT_LABEL2), USER, ArtifactGroupTypeEnum.TOSCA)) + .thenReturn(buildArtifactDef(ARTIFACT_LABEL2)); + testInstance.setToscaArtifactsPlaceHolders(resource, USER); + + Map toscaArtifacts = resource.getToscaArtifacts(); + assertThat(toscaArtifacts).hasSize(2); + ArtifactDefinition artifactDefinition = toscaArtifacts.get(ARTIFACT_LABEL); + assertThat(artifactDefinition.getArtifactName()).isEqualTo("resource-myResourceartifactnot-normalized.yml"); + ArtifactDefinition artifactDefinition2 = toscaArtifacts.get(ARTIFACT_LABEL2); + assertThat(artifactDefinition2.getArtifactName()).isEqualTo("resource-myResourcealreadyNormalized.csar"); + } + + private Map buildArtifactMap(String artifactName) { + Map artifact = new HashMap<>(); + artifact.put("artifactName", artifactName); + return artifact; + } + + private ArtifactDefinition buildArtifactDef(String artifactLabel) { + ArtifactDefinition artifactDefinition = new ArtifactDefinition(); + artifactDefinition.setArtifactLabel(artifactLabel); + return artifactDefinition; } } diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/GroupBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/GroupBusinessLogicTest.java index 0dceaed4f2..9bf7f16a50 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/GroupBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/GroupBusinessLogicTest.java @@ -20,15 +20,8 @@ package org.openecomp.sdc.be.components; -import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.when; -import java.lang.reflect.Method; -import java.util.Arrays; -import java.util.EnumMap; -import java.util.List; -import java.util.Map; - import javax.servlet.ServletContext; import org.junit.Before; @@ -43,8 +36,6 @@ import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.impl.ComponentsUtils; import org.openecomp.sdc.be.model.GroupDefinition; -import org.openecomp.sdc.be.model.GroupProperty; -import org.openecomp.sdc.be.model.PropertyDefinition.PropertyNames; import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.be.model.operations.api.IGraphLockOperation; import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; @@ -53,11 +44,8 @@ import org.openecomp.sdc.common.api.ConfigurationSource; import org.openecomp.sdc.common.api.Constants; import org.openecomp.sdc.common.impl.ExternalConfiguration; import org.openecomp.sdc.common.impl.FSConfigurationSource; -import org.openecomp.sdc.exception.ResponseFormat; import org.slf4j.Logger; import org.slf4j.LoggerFactory; - -import fj.data.Either; /** * tests GroupBusinessLogic class * @author ns019t diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/HealthCheckBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/HealthCheckBusinessLogicTest.java index be3bf9b234..2a34baeb0f 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/HealthCheckBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/HealthCheckBusinessLogicTest.java @@ -20,28 +20,17 @@ package org.openecomp.sdc.be.components; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + import java.util.ArrayList; import java.util.List; -import javax.annotation.Resource; - import org.junit.Test; import org.openecomp.sdc.be.components.impl.HealthCheckBusinessLogic; -import org.openecomp.sdc.be.dao.cassandra.schema.SdcSchemaUtils; -import org.openecomp.sdc.be.dao.titan.TitanGenericDao; -import org.openecomp.sdc.be.dao.titan.TitanOperationStatus; -import org.openecomp.sdc.be.dao.utils.UserStatusEnum; -import org.openecomp.sdc.be.resources.data.UserData; +import org.openecomp.sdc.common.api.Constants; import org.openecomp.sdc.common.api.HealthCheckInfo; -import org.openecomp.sdc.common.api.HealthCheckInfo.HealthCheckComponent; import org.openecomp.sdc.common.api.HealthCheckInfo.HealthCheckStatus; - -import com.datastax.driver.core.Cluster; - -import fj.data.Either; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.assertFalse; public class HealthCheckBusinessLogicTest { HealthCheckBusinessLogic healthCheckBusinessLogic = new HealthCheckBusinessLogic(); @@ -58,8 +47,8 @@ public class HealthCheckBusinessLogicTest { statusChanged = healthCheckBusinessLogic.anyStatusChanged(checkInfosLeft, checkInfosRight); assertFalse("check false", statusChanged); - HealthCheckInfo checkInfoTitanUp = new HealthCheckInfo(HealthCheckComponent.TITAN, HealthCheckStatus.UP, null, null); - HealthCheckInfo checkInfoTitanDown = new HealthCheckInfo(HealthCheckComponent.TITAN, HealthCheckStatus.DOWN, null, null); + HealthCheckInfo checkInfoTitanUp = new HealthCheckInfo(Constants.HC_COMPONENT_TITAN, HealthCheckStatus.UP, null, null); + HealthCheckInfo checkInfoTitanDown = new HealthCheckInfo(Constants.HC_COMPONENT_TITAN, HealthCheckStatus.DOWN, null, null); /* * HealthCheckInfo checkInfoUebUp = new HealthCheckInfo(HealthCheckComponent.DE, HealthCheckStatus.UP, null, null); HealthCheckInfo checkInfoUebDown = new HealthCheckInfo(HealthCheckComponent.DE, HealthCheckStatus.DOWN, null, null); diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/PropertyBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/PropertyBusinessLogicTest.java index 1309af8ff7..572804636d 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/PropertyBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/PropertyBusinessLogicTest.java @@ -20,10 +20,17 @@ package org.openecomp.sdc.be.components; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import fj.data.Either; -import junit.framework.Assert; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.when; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +import javax.servlet.ServletContext; + import org.junit.Before; import org.junit.Test; import org.mockito.InjectMocks; @@ -41,7 +48,6 @@ import org.openecomp.sdc.be.model.Resource; import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade; import org.openecomp.sdc.be.model.operations.api.IPropertyOperation; -import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; import org.openecomp.sdc.be.resources.data.EntryData; import org.openecomp.sdc.be.user.Role; import org.openecomp.sdc.be.user.UserBusinessLogic; @@ -54,16 +60,11 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.context.WebApplicationContext; -import javax.servlet.ServletContext; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Map; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; +import fj.data.Either; +import junit.framework.Assert; public class PropertyBusinessLogicTest { @@ -195,7 +196,7 @@ public class PropertyBusinessLogicTest { resource.setUniqueId(resourceId); Mockito.when(toscaOperationFacade.getToscaElement(resourceId)).thenReturn(Either.left(resource)); - Either, ResponseFormat> notFoundProperty = bl.getProperty(resourceId, property1.getUniqueId(), user.getUserId()); + Either, ResponseFormat> notFoundProperty = bl.getProperty(resourceId, "invalidId", user.getUserId()); assertTrue(notFoundProperty.isRight()); Mockito.verify(componentsUtils).getResponseFormat(ActionStatus.PROPERTY_NOT_FOUND, ""); } diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/ResourceImportManagerTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/ResourceImportManagerTest.java index c545474f5d..30e12e85d0 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/ResourceImportManagerTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/ResourceImportManagerTest.java @@ -156,7 +156,7 @@ public class ResourceImportManagerTest { // Mockito.verify(log).error(Mockito.anyString(), Mockito.anyString(), // Mockito.anyString()); - Mockito.verify(resourceBusinessLogic, Mockito.times(0)).createOrUpdateResourceByImport(Mockito.any(Resource.class), Mockito.eq(user), Mockito.eq(true), Mockito.eq(false), Mockito.eq(true), Mockito.eq(null)); + Mockito.verify(resourceBusinessLogic, Mockito.times(0)).createOrUpdateResourceByImport(Mockito.any(Resource.class), Mockito.eq(user), Mockito.eq(true), Mockito.eq(false), Mockito.eq(true), Mockito.eq(null), Mockito.eq(null), Mockito.eq(false)); Mockito.verify(resourceBusinessLogic, Mockito.times(0)).propagateStateToCertified(Mockito.eq(user), Mockito.any(Resource.class), Mockito.any(LifecycleChangeInfoWithAction.class), Mockito.eq(false), Mockito.eq(true), Mockito.eq(false)); @@ -181,7 +181,7 @@ public class ResourceImportManagerTest { testSetCapabilities(resource); Mockito.verify(resourceBusinessLogic, Mockito.times(1)).propagateStateToCertified(Mockito.eq(user), Mockito.eq(resource), Mockito.any(LifecycleChangeInfoWithAction.class), Mockito.eq(false), Mockito.eq(true), Mockito.eq(false)); - Mockito.verify(resourceBusinessLogic, Mockito.times(1)).createOrUpdateResourceByImport(resource, user, true, false, true, null); + Mockito.verify(resourceBusinessLogic, Mockito.times(1)).createOrUpdateResourceByImport(resource, user, true, false, true, null, null, false); } @@ -206,7 +206,7 @@ public class ResourceImportManagerTest { private void setResourceBusinessLogicMock() { when(resourceBusinessLogic.getUserAdmin()).thenReturn(userAdmin); - when(resourceBusinessLogic.createOrUpdateResourceByImport(Mockito.any(Resource.class), Mockito.any(User.class), Mockito.anyBoolean(), Mockito.anyBoolean(), Mockito.anyBoolean(), Mockito.eq(null))) + when(resourceBusinessLogic.createOrUpdateResourceByImport(Mockito.any(Resource.class), Mockito.any(User.class), Mockito.anyBoolean(), Mockito.anyBoolean(), Mockito.anyBoolean(), Mockito.eq(null), Mockito.eq(null), Mockito.eq(false))) .thenAnswer(new Answer, ResponseFormat>>() { public Either, ResponseFormat> answer(InvocationOnMock invocation) throws Throwable { Object[] args = invocation.getArguments(); @@ -250,6 +250,7 @@ public class ResourceImportManagerTest { private UploadResourceInfo createDummyResourceMD() { UploadResourceInfo resourceMD = new UploadResourceInfo(); resourceMD.setName("tosca.nodes.BlockStorage"); + resourceMD.setPayloadName("payLoad"); resourceMD.addSubCategory("Generic", "Infrastructure"); resourceMD.setContactId("ya107f"); resourceMD.setResourceIconPath("defaulticon"); diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/ServiceBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/ServiceBusinessLogicTest.java index 95845c3660..1af1ac3070 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/ServiceBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/ServiceBusinessLogicTest.java @@ -44,6 +44,7 @@ import org.openecomp.sdc.be.auditing.impl.AuditingManager; import org.openecomp.sdc.be.components.impl.ArtifactsBusinessLogic; import org.openecomp.sdc.be.components.impl.ResponseFormatManager; import org.openecomp.sdc.be.components.impl.ServiceBusinessLogic; +import org.openecomp.sdc.be.components.impl.generic.GenericTypeBusinessLogic; import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.cassandra.AuditCassandraDao; @@ -104,6 +105,7 @@ public class ServiceBusinessLogicTest { TitanDao mockTitanDao = Mockito.mock(TitanDao.class); ToscaOperationFacade toscaOperationFacade = Mockito.mock(ToscaOperationFacade.class); CacheMangerOperation cacheManager = Mockito.mock(CacheMangerOperation.class); + GenericTypeBusinessLogic genericTypeBusinessLogic = Mockito.mock(GenericTypeBusinessLogic.class); User user = null; Service serviceResponse = null; @@ -154,7 +156,7 @@ public class ServiceBusinessLogicTest { // artifact bussinesslogic ArtifactDefinition artifactDef = new ArtifactDefinition(); - when(artifactBl.createArtifactPlaceHolderInfo(Mockito.anyString(), Mockito.anyString(), Mockito.anyMap(), Mockito.any(User.class), Mockito.any(ArtifactGroupTypeEnum.class))).thenReturn(artifactDef); + when(artifactBl.createArtifactPlaceHolderInfo(Mockito.any(), Mockito.anyString(), Mockito.anyMap(), Mockito.any(User.class), Mockito.any(ArtifactGroupTypeEnum.class))).thenReturn(artifactDef); // createService serviceResponse = createServiceObject(true); @@ -177,7 +179,7 @@ public class ServiceBusinessLogicTest { bl.setGraphLockOperation(graphLockOperation); bl.setTitanGenericDao(mockTitanDao); bl.setToscaOperationFacade(toscaOperationFacade); - + bl.setGenericTypeBusinessLogic(genericTypeBusinessLogic); componentsUtils.Init(); componentsUtils.setAuditingManager(auditingManager); bl.setComponentsUtils(componentsUtils); @@ -209,6 +211,7 @@ public class ServiceBusinessLogicTest { @Test public void testHappyScenario() { Service service = createServiceObject(false); + when(genericTypeBusinessLogic.fetchDerivedFromGenericType(service)).thenReturn(Either.left(genericService)); Either createResponse = bl.createService(service, user); if (createResponse.isRight()) { @@ -744,8 +747,6 @@ public class ServiceBusinessLogicTest { Either eitherDelete = Either.left(new Resource()); when(toscaOperationFacade.deleteToscaComponent(resourceFree)).thenReturn(eitherDelete); - when(artifactBl.deleteAllComponentArtifactsIfNotOnGraph(artifacts)).thenReturn(StorageOperationStatus.OK); - Either, ResponseFormat> deleteMarkedResources = bl.deleteMarkedComponents(); assertTrue(deleteMarkedResources.isLeft()); List resourceIdList = deleteMarkedResources.left().value(); @@ -753,7 +754,6 @@ public class ServiceBusinessLogicTest { assertTrue(resourceIdList.contains(resourceFree)); assertFalse(resourceIdList.contains(resourceInUse)); - Mockito.verify(artifactBl, Mockito.times(1)).deleteAllComponentArtifactsIfNotOnGraph(artifacts); } private Service createServiceObject(boolean afterCreate) { @@ -1004,6 +1004,7 @@ public class ServiceBusinessLogicTest { public void testDerivedFromGeneric() { Service service = createServiceObject(true); when(toscaOperationFacade.createToscaComponent(service)).thenReturn(Either.left(service)); + when(genericTypeBusinessLogic.fetchDerivedFromGenericType(service)).thenReturn(Either.left(genericService)); Either createResponse = bl.createService(service, user); assertTrue(createResponse.isLeft()); service = createResponse.left().value(); diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/clean/AsdcComponentsCleanerTaskTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/clean/AsdcComponentsCleanerTaskTest.java index be55cbd12a..90a02a2fc5 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/clean/AsdcComponentsCleanerTaskTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/clean/AsdcComponentsCleanerTaskTest.java @@ -1,7 +1,5 @@ package org.openecomp.sdc.be.components.clean; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngineConfigTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngineConfigTest.java index 7ad93226c7..8d48a4c320 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngineConfigTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngineConfigTest.java @@ -20,7 +20,8 @@ package org.openecomp.sdc.be.components.distribution.engine; -import static org.junit.Assert.*; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import java.io.File; import java.util.ArrayList; @@ -28,7 +29,6 @@ import java.util.List; import org.junit.Before; import org.junit.Test; -import org.openecomp.sdc.be.components.distribution.engine.DistributionEngine; import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.config.DistributionEngineConfiguration; import org.openecomp.sdc.be.config.DistributionEngineConfiguration.ComponentArtifactTypesConfig; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngineHealthCheckTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngineHealthCheckTest.java index b3a254f531..990ea4f99b 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngineHealthCheckTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngineHealthCheckTest.java @@ -30,10 +30,6 @@ import org.junit.Test; import org.mockito.Mock; import org.mockito.Mockito; import org.openecomp.sdc.be.components.BaseConfDependentTest; -import org.openecomp.sdc.be.components.distribution.engine.CambriaErrorResponse; -import org.openecomp.sdc.be.components.distribution.engine.CambriaHandler; -import org.openecomp.sdc.be.components.distribution.engine.DistributionEngineClusterHealth; -import org.openecomp.sdc.be.components.distribution.engine.UebHealthCheckCall; import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.distribution.api.client.CambriaOperationStatus; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngineInitTaskTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngineInitTaskTest.java index de7b84fa82..5bf12d56bc 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngineInitTaskTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngineInitTaskTest.java @@ -27,20 +27,15 @@ import static org.mockito.Mockito.when; import java.io.File; import java.util.ArrayList; -import java.util.Collection; import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.concurrent.atomic.AtomicBoolean; -import org.junit.Before; +import org.junit.BeforeClass; import org.junit.Test; import org.mockito.Mock; import org.mockito.Mockito; -import org.openecomp.sdc.be.components.distribution.engine.CambriaErrorResponse; -import org.openecomp.sdc.be.components.distribution.engine.CambriaHandler; -import org.openecomp.sdc.be.components.distribution.engine.DistributionEngineInitTask; -import org.openecomp.sdc.be.components.distribution.engine.SubscriberTypeEnum; import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.config.DistributionEngineConfiguration; import org.openecomp.sdc.be.config.DistributionEngineConfiguration.CreateTopicConfig; @@ -63,8 +58,8 @@ public class DistributionEngineInitTaskTest { // public static final IAuditingDao iAuditingDao = // Mockito.mock(AuditingDao.class); - @Before - public void setup() { + @BeforeClass + public static void setup() { // ExternalConfiguration.setAppName("distribEngine1"); ExternalConfiguration.setAppName("catalog-be"); ExternalConfiguration.setConfigDir("src/test/resources/config"); @@ -128,11 +123,11 @@ public class DistributionEngineInitTaskTest { String realNotifTopic = notifTopic + "-" + envName.toUpperCase(); String realStatusTopic = statusTopic + "-" + envName.toUpperCase(); - when(cambriaHandler.createTopic(Mockito.any(Collection.class), Mockito.any(String.class), Mockito.any(String.class), Mockito.eq(realNotifTopic), Mockito.eq(1), Mockito.eq(1))).thenReturn(cambriaErrorResponse); - when(cambriaHandler.createTopic(Mockito.any(Collection.class), Mockito.any(String.class), Mockito.any(String.class), Mockito.eq(realStatusTopic), Mockito.eq(1), Mockito.eq(1))).thenReturn(cambriaErrorResponse); + when(cambriaHandler.createTopic(Mockito.any(), Mockito.any(), Mockito.any(), Mockito.eq(realNotifTopic), Mockito.eq(1), Mockito.eq(1))).thenReturn(cambriaErrorResponse); + when(cambriaHandler.createTopic(Mockito.any(), Mockito.any(), Mockito.any(), Mockito.eq(realStatusTopic), Mockito.eq(1), Mockito.eq(1))).thenReturn(cambriaErrorResponse); cambriaErrorResponse = new CambriaErrorResponse(CambriaOperationStatus.OK); - when(cambriaHandler.registerToTopic(Mockito.any(Collection.class), Mockito.any(String.class), Mockito.any(String.class), Mockito.any(String.class), Mockito.any(String.class), Mockito.any(SubscriberTypeEnum.class))) + when(cambriaHandler.registerToTopic(Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any())) .thenReturn(cambriaErrorResponse); DistributionEngineInitTask initTask = new DistributionEngineInitTask(0l, deConfiguration, envName, new AtomicBoolean(false), componentsUtils, null); @@ -159,7 +154,6 @@ public class DistributionEngineInitTaskTest { List uebServers = new ArrayList<>(); uebServers.add("server1"); - CambriaErrorResponse cambriaErrorResponse = new CambriaErrorResponse(CambriaOperationStatus.NOT_FOUND); Either, CambriaErrorResponse> left = Either.left(topics); when(cambriaHandler.getTopics(Mockito.any(List.class))).thenReturn(left); @@ -177,8 +171,8 @@ public class DistributionEngineInitTaskTest { createTopic.setReplicationCount(1); deConfiguration.setCreateTopic(createTopic); - cambriaErrorResponse = new CambriaErrorResponse(CambriaOperationStatus.OK); - when(cambriaHandler.registerToTopic(Mockito.any(Collection.class), Mockito.any(String.class), Mockito.any(String.class), Mockito.any(String.class), Mockito.any(String.class), Mockito.any(SubscriberTypeEnum.class))) + CambriaErrorResponse cambriaErrorResponse = new CambriaErrorResponse(CambriaOperationStatus.OK); + when(cambriaHandler.registerToTopic(Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any())) .thenReturn(cambriaErrorResponse); DistributionEngineInitTask initTask = new DistributionEngineInitTask(0l, deConfiguration, envName, new AtomicBoolean(false), componentsUtils, null); @@ -224,15 +218,16 @@ public class DistributionEngineInitTaskTest { String realNotifTopic = notifTopic + "-" + envName.toUpperCase(); String realStatusTopic = statusTopic + "-" + envName.toUpperCase(); - when(cambriaHandler.createTopic(Mockito.any(Collection.class), Mockito.any(String.class), Mockito.any(String.class), Mockito.eq(realNotifTopic), Mockito.eq(1), Mockito.eq(1))).thenReturn(cambriaErrorResponse); - when(cambriaHandler.createTopic(Mockito.any(Collection.class), Mockito.any(String.class), Mockito.any(String.class), Mockito.eq(realStatusTopic), Mockito.eq(1), Mockito.eq(1))).thenReturn(cambriaErrorResponse); + when(cambriaHandler.createTopic(Mockito.any(), Mockito.any(), Mockito.any(), Mockito.eq(realNotifTopic), Mockito.eq(1), Mockito.eq(1))).thenReturn(cambriaErrorResponse); + when(cambriaHandler.createTopic(Mockito.any(), Mockito.any(), Mockito.any(), Mockito.eq(realStatusTopic), Mockito.eq(1), Mockito.eq(1))).thenReturn(cambriaErrorResponse); - when(cambriaHandler.registerToTopic(Mockito.any(Collection.class), Mockito.eq(realNotifTopic), Mockito.any(String.class), Mockito.any(String.class), Mockito.any(String.class), Mockito.any(SubscriberTypeEnum.class))) + when(cambriaHandler.registerToTopic(Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any(SubscriberTypeEnum.class))) .thenReturn(new CambriaErrorResponse(CambriaOperationStatus.OK)); - when(cambriaHandler.registerToTopic(Mockito.any(Collection.class), Mockito.eq(realStatusTopic), Mockito.any(String.class), Mockito.any(String.class), Mockito.any(String.class), Mockito.any(SubscriberTypeEnum.class))) + when(cambriaHandler.registerToTopic(Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any(SubscriberTypeEnum.class))) .thenReturn(new CambriaErrorResponse(CambriaOperationStatus.CONNNECTION_ERROR)); + DistributionEngineInitTask initTask = new DistributionEngineInitTask(0l, deConfiguration, envName, new AtomicBoolean(false), componentsUtils, null); initTask.setCambriaHandler(cambriaHandler); diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/VfModuleArtifactPayloadTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/VfModuleArtifactPayloadTest.java index 1bc8c47f8c..4144dcf620 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/VfModuleArtifactPayloadTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/VfModuleArtifactPayloadTest.java @@ -4,11 +4,8 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import javax.annotation.Generated; - import org.junit.Test; import org.openecomp.sdc.be.model.GroupDefinition; -import org.openecomp.sdc.be.model.GroupInstance; import org.openecomp.sdc.be.model.GroupInstanceProperty; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AdditionalInformationBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AdditionalInformationBusinessLogicTest.java index f2053535ad..e2fceddcf6 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AdditionalInformationBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AdditionalInformationBusinessLogicTest.java @@ -2,7 +2,6 @@ package org.openecomp.sdc.be.components.impl; import java.util.List; -import javax.annotation.Generated; import javax.servlet.ServletContext; import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ArtifactBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ArtifactBusinessLogicTest.java index 5de6762bdd..c57f2a65af 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ArtifactBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ArtifactBusinessLogicTest.java @@ -20,20 +20,36 @@ package org.openecomp.sdc.be.components.impl; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonElement; -import fj.data.Either; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyBoolean; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.when; +import static org.openecomp.sdc.be.components.impl.ArtifactsBusinessLogic.HEAT_ENV_NAME; +import static org.openecomp.sdc.be.components.impl.ArtifactsBusinessLogic.HEAT_VF_ENV_NAME; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + import org.codehaus.jackson.map.DeserializationConfig; import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jackson.map.SerializationConfig.Feature; import org.codehaus.jackson.map.annotate.JsonSerialize; import org.junit.Before; -import org.junit.BeforeClass; import org.junit.Test; import org.mockito.InjectMocks; +import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; +import org.openecomp.sdc.be.components.utils.ArtifactBuilder; +import org.openecomp.sdc.be.components.utils.ObjectGenerator; import org.openecomp.sdc.be.config.Configuration.ArtifactTypeConfig; import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.dao.api.ActionStatus; @@ -45,10 +61,13 @@ import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; import org.openecomp.sdc.be.impl.ComponentsUtils; import org.openecomp.sdc.be.model.ArtifactDefinition; import org.openecomp.sdc.be.model.ArtifactType; +import org.openecomp.sdc.be.model.HeatParameterDefinition; import org.openecomp.sdc.be.model.InterfaceDefinition; import org.openecomp.sdc.be.model.Resource; import org.openecomp.sdc.be.model.Service; import org.openecomp.sdc.be.model.User; +import org.openecomp.sdc.be.model.jsontitan.operations.ArtifactsOperations; +import org.openecomp.sdc.be.model.jsontitan.operations.NodeTemplateOperation; import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade; import org.openecomp.sdc.be.model.operations.api.IElementOperation; import org.openecomp.sdc.be.model.operations.api.IInterfaceLifecycleOperation; @@ -57,6 +76,7 @@ import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; import org.openecomp.sdc.be.model.operations.impl.ArtifactOperation; import org.openecomp.sdc.be.resources.data.ESArtifactData; import org.openecomp.sdc.be.servlets.RepresentationUtils; +import org.openecomp.sdc.be.user.UserBusinessLogic; import org.openecomp.sdc.common.api.ArtifactGroupTypeEnum; import org.openecomp.sdc.common.api.ArtifactTypeEnum; import org.openecomp.sdc.common.api.ConfigurationSource; @@ -64,30 +84,40 @@ import org.openecomp.sdc.common.impl.ExternalConfiguration; import org.openecomp.sdc.common.impl.FSConfigurationSource; import org.openecomp.sdc.exception.ResponseFormat; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonElement; -import static org.junit.Assert.*; -import static org.mockito.Mockito.when; +import fj.data.Either; public class ArtifactBusinessLogicTest { + public static final User USER = new User("John", "Doh", "jh0003", "jh0003@gmail.com", "ADMIN", System.currentTimeMillis()); static ConfigurationSource configurationSource = new FSConfigurationSource(ExternalConfiguration.getChangeListener(), "src/test/resources/config/catalog-be"); static ConfigurationManager configurationManager = new ConfigurationManager(configurationSource); @InjectMocks - static ArtifactsBusinessLogic artifactBL = new ArtifactsBusinessLogic(); - - public static final ArtifactOperation artifactOperation = Mockito.mock(ArtifactOperation.class); - public static final ComponentsUtils componentsUtils = Mockito.mock(ComponentsUtils.class); - public static final IInterfaceLifecycleOperation lifecycleOperation = Mockito.mock(IInterfaceLifecycleOperation.class); - public static final IUserAdminOperation userOperation = Mockito.mock(IUserAdminOperation.class); - public static final IElementOperation elementOperation = Mockito.mock(IElementOperation.class); - public static final ArtifactCassandraDao artifactCassandraDao = Mockito.mock(ArtifactCassandraDao.class); - public static final ToscaOperationFacade toscaOperationFacade = Mockito.mock(ToscaOperationFacade.class); + private static ArtifactsBusinessLogic artifactBL; + @Mock + private ArtifactOperation artifactOperation; + @Mock + public ComponentsUtils componentsUtils; + @Mock + private IInterfaceLifecycleOperation lifecycleOperation; + @Mock + private IUserAdminOperation userOperation; + @Mock + private IElementOperation elementOperation; + @Mock + private ArtifactCassandraDao artifactCassandraDao; + @Mock + public ToscaOperationFacade toscaOperationFacade; + @Mock + private UserBusinessLogic userBusinessLogic; + @Mock + private NodeTemplateOperation nodeTemplateOperation; + @Mock + private ArtifactsOperations artifactsOperations; // public static final InformationDeployedArtifactsBusinessLogic // informationDeployedArtifactsBusinessLogic = @@ -96,31 +126,6 @@ public class ArtifactBusinessLogicTest { public static final Resource resource = Mockito.mock(Resource.class); private Gson gson = new GsonBuilder().setPrettyPrinting().create(); - @BeforeClass - public static void setup() { - - Either NotFoundResult = Either.right(StorageOperationStatus.NOT_FOUND); -// when(artifactOperation.getArtifactById(Mockito.anyString(), Mockito.anyBoolean())).thenReturn(NotFoundResult); - - Either, StorageOperationStatus> NotFoundResult2 = Either.right(StorageOperationStatus.NOT_FOUND); - when(artifactOperation.getArtifacts(Mockito.anyString(), Mockito.eq(NodeTypeEnum.Service), Mockito.anyBoolean())).thenReturn(NotFoundResult2); - when(artifactOperation.getArtifacts(Mockito.anyString(), Mockito.eq(NodeTypeEnum.Resource), Mockito.anyBoolean())).thenReturn(NotFoundResult2); - - Either, StorageOperationStatus> notFoundInterfaces = Either.right(StorageOperationStatus.NOT_FOUND); - when(lifecycleOperation.getAllInterfacesOfResource(Mockito.anyString(), Mockito.anyBoolean())).thenReturn(notFoundInterfaces); - - User userJH = new User("John", "Doh", "jh0003", "jh0003@gmail.com", "ADMIN", System.currentTimeMillis()); - Either getUserResult = Either.left(userJH); - - when(userOperation.getUserData("jh0003", false)).thenReturn(getUserResult); - - Either, ActionStatus> getType = Either.left(getAllTypes()); - when(elementOperation.getAllArtifactTypes()).thenReturn(getType); - - when(resource.getResourceType()).thenReturn(ResourceTypeEnum.VFC); - // when(informationDeployedArtifactsBusinessLogic.getAllDeployableArtifacts(Mockito.any(Resource.class))).thenReturn(new - // ArrayList()); - } private static List getAllTypes() { List artifactTypes = new ArrayList(); @@ -136,6 +141,23 @@ public class ArtifactBusinessLogicTest { @Before public void initMocks() { MockitoAnnotations.initMocks(this); + Either NotFoundResult = Either.right(StorageOperationStatus.NOT_FOUND); + + Either, StorageOperationStatus> NotFoundResult2 = Either.right(StorageOperationStatus.NOT_FOUND); + when(artifactOperation.getArtifacts(Mockito.anyString(), eq(NodeTypeEnum.Service), Mockito.anyBoolean())).thenReturn(NotFoundResult2); + when(artifactOperation.getArtifacts(Mockito.anyString(), eq(NodeTypeEnum.Resource), Mockito.anyBoolean())).thenReturn(NotFoundResult2); + + Either, StorageOperationStatus> notFoundInterfaces = Either.right(StorageOperationStatus.NOT_FOUND); + when(lifecycleOperation.getAllInterfacesOfResource(Mockito.anyString(), Mockito.anyBoolean())).thenReturn(notFoundInterfaces); + + Either getUserResult = Either.left(USER); + + when(userOperation.getUserData("jh0003", false)).thenReturn(getUserResult); + + Either, ActionStatus> getType = Either.left(getAllTypes()); + when(elementOperation.getAllArtifactTypes()).thenReturn(getType); + + when(resource.getResourceType()).thenReturn(ResourceTypeEnum.VFC); } @Test @@ -283,9 +305,59 @@ public class ArtifactBusinessLogicTest { assertTrue(downloadServiceArtifactByNamesRes.isLeft()); assertTrue(downloadServiceArtifactByNamesRes.left().value() !=null && downloadServiceArtifactByNamesRes.left().value().length == payload.length); } - - // @Test + @Test + public void createHeatEnvPlaceHolder_vf_emptyHeatParameters() throws Exception { + ArtifactDefinition heatArtifact = new ArtifactBuilder() + .addHeatParam(ObjectGenerator.buildHeatParam("defVal1", "val1")) + .addHeatParam(ObjectGenerator.buildHeatParam("defVal2", "val2")) + .build(); + + Resource component = new Resource(); + when(userBusinessLogic.getUser(anyString(), anyBoolean())).thenReturn(Either.left(USER)); + when(artifactsOperations.addHeatEnvArtifact(any(ArtifactDefinition.class), any(ArtifactDefinition.class), eq(component.getUniqueId()), eq(NodeTypeEnum.Resource), eq(true), eq("parentId"))) + .thenReturn(Either.left(new ArtifactDefinition())); + Either heatEnvPlaceHolder = artifactBL.createHeatEnvPlaceHolder(heatArtifact, HEAT_VF_ENV_NAME, "parentId", NodeTypeEnum.Resource, "parentName", USER, component, Collections.emptyMap()); + assertTrue(heatEnvPlaceHolder.isLeft()); + assertNull(heatEnvPlaceHolder.left().value().getListHeatParameters()); + } + + @Test + public void createHeatEnvPlaceHolder_resourceInstance_copyHeatParamasCurrValuesToHeatEnvDefaultVal() throws Exception { + HeatParameterDefinition heatParam1 = ObjectGenerator.buildHeatParam("defVal1", "val1"); + HeatParameterDefinition heatParam2 = ObjectGenerator.buildHeatParam("defVal2", "val2"); + HeatParameterDefinition heatParam3 = ObjectGenerator.buildHeatParam("defVal3", "val3"); + ArtifactDefinition heatArtifact = new ArtifactBuilder() + .addHeatParam(heatParam1) + .addHeatParam(heatParam2) + .addHeatParam(heatParam3) + .build(); + + Resource component = new Resource(); + + when(userBusinessLogic.getUser(anyString(), anyBoolean())).thenReturn(Either.left(USER)); + when(artifactsOperations.addHeatEnvArtifact(any(ArtifactDefinition.class), any(ArtifactDefinition.class), eq(component.getUniqueId()), eq(NodeTypeEnum.Resource), eq(true), eq("parentId"))) + .thenReturn(Either.left(new ArtifactDefinition())); + + Either heatEnvPlaceHolder = artifactBL.createHeatEnvPlaceHolder(heatArtifact, HEAT_ENV_NAME, "parentId", NodeTypeEnum.ResourceInstance, "parentName", USER, component, Collections.emptyMap()); + + assertTrue(heatEnvPlaceHolder.isLeft()); + ArtifactDefinition heatEnvArtifact = heatEnvPlaceHolder.left().value(); + List listHeatParameters = heatEnvArtifact.getListHeatParameters(); + assertEquals(listHeatParameters.size(), 3); + verifyHeatParam(listHeatParameters.get(0), heatParam1); + verifyHeatParam(listHeatParameters.get(1), heatParam2); + verifyHeatParam(listHeatParameters.get(2), heatParam3); + } + + private void verifyHeatParam(HeatParameterDefinition heatEnvParam, HeatParameterDefinition heatYamlParam) { + assertEquals(heatEnvParam.getDefaultValue(), heatYamlParam.getCurrentValue()); + assertNull(heatEnvParam.getCurrentValue()); + } + + + +// @Test // public void convertAndValidateDeploymentArtifactNonHeatSuccess(){ // ArtifactDefinition createArtifactDef = createArtifactDef(); // createArtifactDef.setArtifactType(ArtifactTypeEnum.YANG_XML.getType()); diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ArtifactResolverTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ArtifactResolverTest.java index a325817316..8ad9bf80b2 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ArtifactResolverTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ArtifactResolverTest.java @@ -20,6 +20,12 @@ package org.openecomp.sdc.be.components.impl; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; + +import java.util.Collections; +import java.util.Map; + import org.junit.Before; import org.junit.Test; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; @@ -28,12 +34,6 @@ import org.openecomp.sdc.be.model.ComponentInstance; import org.openecomp.sdc.be.model.Resource; import org.openecomp.sdc.be.model.Service; -import java.util.Collections; -import java.util.Map; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; - public class ArtifactResolverTest { private ArtifactResolverImpl testInstance = new ArtifactResolverImpl(); diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AttributeBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AttributeBusinessLogicTest.java index e10c3b41ba..630f41f905 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AttributeBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AttributeBusinessLogicTest.java @@ -2,9 +2,6 @@ package org.openecomp.sdc.be.components.impl; import java.util.List; -import javax.annotation.Generated; - -import org.junit.Assert; import org.junit.Test; import org.openecomp.sdc.be.model.PropertyDefinition; import org.openecomp.sdc.exception.ResponseFormat; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/CapabilityTypeImportManagerTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/CapabilityTypeImportManagerTest.java index 776fe8864e..41835a6cdc 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/CapabilityTypeImportManagerTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/CapabilityTypeImportManagerTest.java @@ -39,8 +39,6 @@ import org.mockito.Mockito; import org.mockito.MockitoAnnotations; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; -import org.openecomp.sdc.be.components.impl.CapabilityTypeImportManager; -import org.openecomp.sdc.be.components.impl.CommonImportManager; import org.openecomp.sdc.be.impl.ComponentsUtils; import org.openecomp.sdc.be.model.CapabilityTypeDefinition; import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/CategoriesImportManagerTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/CategoriesImportManagerTest.java index 05fc6a2948..2c83c60fc6 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/CategoriesImportManagerTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/CategoriesImportManagerTest.java @@ -38,8 +38,6 @@ import org.mockito.Mockito; import org.mockito.MockitoAnnotations; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; -import org.openecomp.sdc.be.components.impl.CategoriesImportManager; -import org.openecomp.sdc.be.components.impl.InterfaceLifecycleTypeImportManager; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; import org.openecomp.sdc.be.impl.ComponentsUtils; @@ -68,13 +66,12 @@ public class CategoriesImportManagerTest { subcategory = new SubCategoryDefinition(); subcategory.setUniqueId("123"); - when(elementOperation.createCategory(Mockito.any(CategoryDefinition.class), Mockito.any(NodeTypeEnum.class))).thenAnswer(new Answer>() { - public Either answer(InvocationOnMock invocation) { - Object[] args = invocation.getArguments(); - Either ans = Either.left((CategoryDefinition) args[0]); - return ans; - } - + when(elementOperation.createCategory(Mockito.any(CategoryDefinition.class), Mockito.any(NodeTypeEnum.class))).thenAnswer((Answer>) invocation -> { + Object[] args = invocation.getArguments(); + CategoryDefinition category = (CategoryDefinition) args[0]; + category.setUniqueId("123"); + Either ans = Either.left(category); + return ans; }); when(elementOperation.createSubCategory(Mockito.any(String.class), Mockito.any(SubCategoryDefinition.class), Mockito.any(NodeTypeEnum.class))).thenAnswer(new Answer>() { public Either answer(InvocationOnMock invocation) { diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogicTest.java new file mode 100644 index 0000000000..65f7ac46b6 --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogicTest.java @@ -0,0 +1,245 @@ +package org.openecomp.sdc.be.components.impl; + +import static org.junit.Assert.assertTrue; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.when; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.BiPredicate; + +import org.assertj.core.util.Lists; +import org.junit.BeforeClass; +import org.junit.Test; +import org.mockito.Mockito; +import org.openecomp.sdc.be.dao.api.ActionStatus; +import org.openecomp.sdc.be.datatypes.elements.CapabilityDataDefinition; +import org.openecomp.sdc.be.datatypes.elements.RequirementDataDefinition; +import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; +import org.openecomp.sdc.be.impl.ComponentsUtils; +import org.openecomp.sdc.be.impl.ServletUtils; +import org.openecomp.sdc.be.model.CapabilityDefinition; +import org.openecomp.sdc.be.model.CapabilityRequirementRelationship; +import org.openecomp.sdc.be.model.Component; +import org.openecomp.sdc.be.model.ComponentInstance; +import org.openecomp.sdc.be.model.ComponentParametersView; +import org.openecomp.sdc.be.model.RelationshipImpl; +import org.openecomp.sdc.be.model.RelationshipInfo; +import org.openecomp.sdc.be.model.RequirementCapabilityRelDef; +import org.openecomp.sdc.be.model.RequirementDefinition; +import org.openecomp.sdc.be.model.Resource; +import org.openecomp.sdc.be.model.Service; +import org.openecomp.sdc.be.model.User; +import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade; +import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; +import org.openecomp.sdc.be.user.UserBusinessLogic; +import org.openecomp.sdc.exception.ResponseFormat; + +import fj.data.Either; + +/** + * The test suite designed for test functionality of ComponentInstanceBusinessLogic class + */ +public class ComponentInstanceBusinessLogicTest { + + private final static String USER_ID = "jh0003"; + private final static String COMPONENT_ID = "componentId"; + private final static String TO_INSTANCE_ID = "toInstanceId"; + private final static String FROM_INSTANCE_ID = "fromInstanceId"; + private final static String RELATION_ID = "relationId"; + private final static String CAPABILITY_OWNER_ID = "capabilityOwnerId"; + private final static String CAPABILITY_UID = "capabilityUid"; + private final static String CAPABILITY_NAME = "capabilityName"; + private final static String REQUIREMENT_OWNER_ID = "requirementOwnerId"; + private final static String REQUIREMENT_UID = "requirementUid"; + private final static String REQUIREMENT_NAME = "requirementName"; + private final static String RELATIONSHIP_TYPE = "relationshipType"; + + private static ComponentsUtils componentsUtils; + private static ServletUtils servletUtils; + private static ResponseFormat responseFormat; + private static ToscaOperationFacade toscaOperationFacade; + private static UserBusinessLogic userAdmin; + + private static ComponentInstanceBusinessLogic serviceBusinessLogic; + private static ComponentInstanceBusinessLogic resourceBusinessLogic; + private static User user; + private static Component service; + private static Component resource; + private static ComponentInstance toInstance; + private static ComponentInstance fromInstance; + private static CapabilityDataDefinition capability; + private static RequirementDataDefinition requirement; + private static RequirementCapabilityRelDef relation; + + @BeforeClass + public static void setup() { + createMocks(); + setMocks(); + stubMethods(); + createComponents(); + } + + @Test + public void testGetRelationByIdSuccess(){ + getServiceRelationByIdSuccess(service); + getServiceRelationByIdSuccess(resource); + } + + @Test + public void testGetRelationByIdUserValidationFailure(){ + getServiceRelationByIdUserValidationFailure(service); + getServiceRelationByIdUserValidationFailure(resource); + } + + @Test + public void testGetRelationByIdComponentNotFoundFailure(){ + getRelationByIdComponentNotFoundFailure(service); + getRelationByIdComponentNotFoundFailure(resource); + } + + @SuppressWarnings("unchecked") + private void getServiceRelationByIdSuccess(Component component){ + Either eitherCreator = Either.left(user); + when(userAdmin.getUser(eq(USER_ID), eq(false))).thenReturn(eitherCreator); + Either getComponentRes = Either.left(component); + when(toscaOperationFacade.getToscaElement(eq(COMPONENT_ID), any(ComponentParametersView.class))).thenReturn(getComponentRes); + + Either getfulfilledRequirementRes = Either.left(requirement); + when(toscaOperationFacade.getFulfilledRequirementByRelation(eq(COMPONENT_ID), eq(FROM_INSTANCE_ID), eq(relation), any(BiPredicate.class))).thenReturn(getfulfilledRequirementRes); + + Either getfulfilledCapabilityRes = Either.left(capability); + when(toscaOperationFacade.getFulfilledCapabilityByRelation(eq(COMPONENT_ID), eq(FROM_INSTANCE_ID), eq(relation), any(BiPredicate.class))).thenReturn(getfulfilledCapabilityRes); + + Either response = serviceBusinessLogic.getRelationById(COMPONENT_ID, RELATION_ID, USER_ID, component.getComponentType()); + assertTrue(response.isLeft()); + } + + private void getServiceRelationByIdUserValidationFailure(Component component){ + Either eitherCreator = Either.right(ActionStatus.USER_NOT_FOUND); + when(userAdmin.getUser(eq(USER_ID), eq(false))).thenReturn(eitherCreator); + + Either response = serviceBusinessLogic.getRelationById(COMPONENT_ID, RELATION_ID, USER_ID, component.getComponentType()); + assertTrue(response.isRight()); + } + + private void getRelationByIdComponentNotFoundFailure(Component component){ + Either eitherCreator = Either.left(user); + when(userAdmin.getUser(eq(USER_ID), eq(false))).thenReturn(eitherCreator); + Either getComponentRes = Either.right(StorageOperationStatus.NOT_FOUND); + when(toscaOperationFacade.getToscaElement(eq(COMPONENT_ID), any(ComponentParametersView.class))).thenReturn(getComponentRes); + + Either response = serviceBusinessLogic.getRelationById(COMPONENT_ID, RELATION_ID, USER_ID, component.getComponentType()); + assertTrue(response.isRight()); + } + + private static void createMocks() { + componentsUtils = Mockito.mock(ComponentsUtils.class); + servletUtils = Mockito.mock(ServletUtils.class); + responseFormat = Mockito.mock(ResponseFormat.class); + toscaOperationFacade = Mockito.mock(ToscaOperationFacade.class); + userAdmin = Mockito.mock(UserBusinessLogic.class); + user = Mockito.mock(User.class); + } + + private static void setMocks() { + serviceBusinessLogic = new ServiceComponentInstanceBusinessLogic(); + serviceBusinessLogic.setToscaOperationFacade(toscaOperationFacade); + serviceBusinessLogic.setUserAdmin(userAdmin); + serviceBusinessLogic.setComponentsUtils(componentsUtils); + + resourceBusinessLogic = new VFComponentInstanceBusinessLogic(); + resourceBusinessLogic.setToscaOperationFacade(toscaOperationFacade); + resourceBusinessLogic.setUserAdmin(userAdmin); + resourceBusinessLogic.setComponentsUtils(componentsUtils); + } + + private static void stubMethods() { + when(servletUtils.getComponentsUtils()).thenReturn(componentsUtils); + when(componentsUtils.getResponseFormat(eq(ActionStatus.RELATION_NOT_FOUND), eq(RELATION_ID), eq(COMPONENT_ID))).thenReturn(responseFormat); + } + + private static void createComponents() { + createRelation(); + createInstances(); + createService(); + createResource(); + } + + private static void createResource() { + resource = new Resource(); + resource.setUniqueId(COMPONENT_ID); + resource.setComponentInstancesRelations(Lists.newArrayList(relation)); + resource.setComponentInstances(Lists.newArrayList(toInstance,fromInstance)); + resource.setCapabilities(toInstance.getCapabilities()); + resource.setRequirements(fromInstance.getRequirements()); + resource.setComponentType(ComponentTypeEnum.RESOURCE); + } + + + private static void createService() { + service = new Service(); + service.setUniqueId(COMPONENT_ID); + service.setComponentInstancesRelations(Lists.newArrayList(relation)); + service.setComponentInstances(Lists.newArrayList(toInstance,fromInstance)); + service.setCapabilities(toInstance.getCapabilities()); + service.setRequirements(fromInstance.getRequirements()); + service.setComponentType(ComponentTypeEnum.SERVICE); + } + + + private static void createInstances() { + toInstance = new ComponentInstance(); + toInstance.setUniqueId(TO_INSTANCE_ID); + + fromInstance = new ComponentInstance(); + fromInstance.setUniqueId(FROM_INSTANCE_ID); + + capability = new CapabilityDataDefinition(); + capability.setOwnerId(CAPABILITY_OWNER_ID); + capability.setUniqueId(CAPABILITY_UID); + capability.setName(CAPABILITY_NAME); + + Map> capabilities = new HashMap<>(); + capabilities.put(capability.getName(), Lists.newArrayList(new CapabilityDefinition(capability))); + + requirement = new RequirementDataDefinition(); + requirement.setOwnerId(REQUIREMENT_OWNER_ID); + requirement.setUniqueId(REQUIREMENT_UID); + requirement.setName(REQUIREMENT_NAME); + requirement.setRelationship(RELATIONSHIP_TYPE); + + + Map> requirements = new HashMap<>(); + requirements.put(requirement.getCapability(), Lists.newArrayList(new RequirementDefinition(requirement))); + + toInstance.setCapabilities(capabilities); + fromInstance.setRequirements(requirements); + } + + + private static void createRelation() { + + relation = new RequirementCapabilityRelDef(); + CapabilityRequirementRelationship relationship = new CapabilityRequirementRelationship(); + RelationshipInfo relationInfo = new RelationshipInfo(); + relationInfo.setId(RELATION_ID); + relationship.setRelation(relationInfo); + + relation.setRelationships(Lists.newArrayList(relationship)); + relation.setToNode(TO_INSTANCE_ID); + relation.setFromNode(FROM_INSTANCE_ID); + + relationInfo.setCapabilityOwnerId(CAPABILITY_OWNER_ID); + relationInfo.setCapabilityUid(CAPABILITY_UID); + relationInfo.setCapability(CAPABILITY_NAME); + relationInfo.setRequirementOwnerId(REQUIREMENT_OWNER_ID); + relationInfo.setRequirementUid(REQUIREMENT_UID); + relationInfo.setRequirement(REQUIREMENT_NAME); + RelationshipImpl relationshipImpl = new RelationshipImpl(); + relationshipImpl.setType(RELATIONSHIP_TYPE); + relationInfo.setRelationships(relationshipImpl); + } +} diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/CompositionBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/CompositionBusinessLogicTest.java index 135caf2c82..4f1f929382 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/CompositionBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/CompositionBusinessLogicTest.java @@ -31,7 +31,6 @@ import java.util.stream.Collectors; import org.apache.commons.lang3.tuple.ImmutablePair; import org.junit.Test; -import org.openecomp.sdc.be.components.impl.CompositionBusinessLogic; import org.openecomp.sdc.be.datatypes.enums.OriginTypeEnum; import org.openecomp.sdc.be.model.ComponentInstance; import org.openecomp.sdc.be.model.RequirementCapabilityRelDef; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ConsumerBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ConsumerBusinessLogicTest.java index 259d47befa..db95ee8827 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ConsumerBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ConsumerBusinessLogicTest.java @@ -1,12 +1,8 @@ package org.openecomp.sdc.be.components.impl; -import javax.annotation.Generated; - -import org.junit.Assert; import org.junit.Test; import org.openecomp.sdc.be.model.ConsumerDefinition; import org.openecomp.sdc.be.model.User; -import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum; import org.openecomp.sdc.exception.ResponseFormat; import fj.data.Either; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/CsarValidationUtilsTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/CsarValidationUtilsTest.java index 84c8286f14..50ad990560 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/CsarValidationUtilsTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/CsarValidationUtilsTest.java @@ -21,9 +21,9 @@ package org.openecomp.sdc.be.components.impl; import java.util.Arrays; + import org.junit.Assert; import org.junit.Test; -import org.openecomp.sdc.be.components.impl.CsarValidationUtils; public class CsarValidationUtilsTest { private String[] invalidExtensions = { null, ".bla", ".yaml", ".yml", ".txt", ".zip" }; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ElementBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ElementBusinessLogicTest.java index 7722c1fdea..bcde49295e 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ElementBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ElementBusinessLogicTest.java @@ -2,48 +2,23 @@ package org.openecomp.sdc.be.components.impl; import java.util.List; import java.util.Map; -import java.util.Optional; -import java.util.Set; -import javax.annotation.Generated; - -import org.apache.commons.httpclient.NameValuePair; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.tinkerpop.gremlin.structure.T; -import org.junit.Assert; import org.junit.Test; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.dao.graph.datatype.GraphEdge; -import org.openecomp.sdc.be.datamodel.api.CategoryTypeEnum; -import org.openecomp.sdc.be.datatypes.components.ComponentMetadataDataDefinition; -import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.FilterKeyEnum; -import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; import org.openecomp.sdc.be.datatypes.enums.OriginTypeEnum; -import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; import org.openecomp.sdc.be.model.ArtifactType; import org.openecomp.sdc.be.model.Component; -import org.openecomp.sdc.be.model.DistributionStatusEnum; -import org.openecomp.sdc.be.model.LifecycleStateEnum; import org.openecomp.sdc.be.model.PropertyScope; -import org.openecomp.sdc.be.model.Resource; import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.be.model.category.CategoryDefinition; import org.openecomp.sdc.be.model.category.GroupingDefinition; import org.openecomp.sdc.be.model.category.SubCategoryDefinition; import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; -import org.openecomp.sdc.be.resources.data.ComponentMetadataData; -import org.openecomp.sdc.be.resources.data.ResourceMetadataData; -import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum; -import org.openecomp.sdc.be.resources.data.category.SubCategoryData; import org.openecomp.sdc.be.ui.model.UiCategories; import org.openecomp.sdc.exception.ResponseFormat; -import com.google.common.util.concurrent.Service; -import com.thinkaurelius.titan.core.TitanGraph; - import fj.data.Either; -import io.swagger.annotations.Tag; public class ElementBusinessLogicTest { diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/GroupBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/GroupBusinessLogicTest.java index df2d2e7fdc..d9ca7b06c2 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/GroupBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/GroupBusinessLogicTest.java @@ -4,8 +4,6 @@ import java.util.Collection; import java.util.List; import java.util.Map; -import javax.annotation.Generated; - import org.apache.commons.lang3.tuple.ImmutablePair; import org.junit.Test; import org.openecomp.sdc.be.dao.titan.TitanOperationStatus; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ImportUtilsTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ImportUtilsTest.java index 59d49de3a3..5edf448cc2 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ImportUtilsTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ImportUtilsTest.java @@ -22,8 +22,9 @@ package org.openecomp.sdc.be.components.impl; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + import java.io.IOException; import java.nio.file.FileSystems; import java.nio.file.Files; @@ -33,10 +34,8 @@ import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Map.Entry; -import java.util.function.Function; import org.junit.Test; -import org.openecomp.sdc.be.components.impl.ImportUtils; import org.openecomp.sdc.be.components.impl.ImportUtils.ResultStatusEnum; import org.openecomp.sdc.be.components.impl.ImportUtils.ToscaElementTypeEnum; import org.openecomp.sdc.be.components.impl.ImportUtils.ToscaTagNamesEnum; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogicTest.java index db5531debf..ac4d37ef76 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogicTest.java @@ -20,7 +20,15 @@ package org.openecomp.sdc.be.components.impl; -import fj.data.Either; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + import org.junit.Before; import org.junit.Test; import org.mockito.InjectMocks; @@ -35,18 +43,10 @@ import org.openecomp.sdc.be.model.ComponentParametersView; import org.openecomp.sdc.be.model.Service; import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade; -import org.openecomp.sdc.be.model.operations.impl.PropertyOperation; import org.openecomp.sdc.be.user.IUserBusinessLogic; import org.openecomp.sdc.exception.ResponseFormat; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import fj.data.Either; public class InputsBusinessLogicTest { diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceLifecycleTypeImportManagerTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceLifecycleTypeImportManagerTest.java index 6ba74ec133..8109e36be1 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceLifecycleTypeImportManagerTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceLifecycleTypeImportManagerTest.java @@ -37,8 +37,6 @@ import org.mockito.Mockito; import org.mockito.MockitoAnnotations; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; -import org.openecomp.sdc.be.components.impl.CommonImportManager; -import org.openecomp.sdc.be.components.impl.InterfaceLifecycleTypeImportManager; import org.openecomp.sdc.be.impl.ComponentsUtils; import org.openecomp.sdc.be.model.InterfaceDefinition; import org.openecomp.sdc.be.model.operations.api.IInterfaceLifecycleOperation; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ProductBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ProductBusinessLogicTest.java index 222bba53d2..cbb5f7b719 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ProductBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ProductBusinessLogicTest.java @@ -3,10 +3,7 @@ package org.openecomp.sdc.be.components.impl; import java.util.List; import java.util.Map; -import javax.annotation.Generated; - import org.apache.commons.math3.stat.descriptive.summary.Product; -import org.junit.Assert; import org.junit.Test; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.model.Component; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogicTest.java index 0e27636901..f7724aaeff 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogicTest.java @@ -32,14 +32,11 @@ import java.util.EnumMap; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Set; -import java.util.regex.Pattern; import java.util.stream.Collectors; import javax.servlet.ServletContext; import org.apache.commons.lang3.tuple.ImmutablePair; -import org.junit.Assert; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; @@ -51,55 +48,31 @@ import org.openecomp.sdc.be.auditing.api.IAuditingManager; import org.openecomp.sdc.be.auditing.impl.AuditingLogFormatUtil; import org.openecomp.sdc.be.auditing.impl.AuditingManager; import org.openecomp.sdc.be.components.impl.ArtifactsBusinessLogic.ArtifactOperationEnum; -import org.openecomp.sdc.be.components.impl.ArtifactsBusinessLogic.ArtifactOperationInfo; +import org.openecomp.sdc.be.components.impl.generic.GenericTypeBusinessLogic; import org.openecomp.sdc.be.components.lifecycle.LifecycleBusinessLogic; import org.openecomp.sdc.be.components.lifecycle.LifecycleChangeInfoWithAction; import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.jsongraph.TitanDao; -import org.openecomp.sdc.be.datamodel.api.HighestFilterEnum; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; import org.openecomp.sdc.be.impl.ComponentsUtils; import org.openecomp.sdc.be.impl.WebAppContextWrapper; -import org.openecomp.sdc.be.info.ArtifactTemplateInfo; -import org.openecomp.sdc.be.info.MergedArtifactInfo; import org.openecomp.sdc.be.model.ArtifactDefinition; -import org.openecomp.sdc.be.model.CapabilityDefinition; import org.openecomp.sdc.be.model.Component; -import org.openecomp.sdc.be.model.ComponentInstance; -import org.openecomp.sdc.be.model.ComponentInstanceInput; -import org.openecomp.sdc.be.model.ComponentInstanceProperty; -import org.openecomp.sdc.be.model.CsarInfo; import org.openecomp.sdc.be.model.DataTypeDefinition; -import org.openecomp.sdc.be.model.GroupDefinition; -import org.openecomp.sdc.be.model.GroupProperty; -import org.openecomp.sdc.be.model.GroupTypeDefinition; -import org.openecomp.sdc.be.model.HeatParameterDefinition; import org.openecomp.sdc.be.model.InputDefinition; import org.openecomp.sdc.be.model.LifeCycleTransitionEnum; import org.openecomp.sdc.be.model.LifecycleStateEnum; -import org.openecomp.sdc.be.model.NodeTypeInfo; -import org.openecomp.sdc.be.model.ParsedToscaYamlInfo; import org.openecomp.sdc.be.model.PropertyDefinition; -import org.openecomp.sdc.be.model.RequirementCapabilityRelDef; -import org.openecomp.sdc.be.model.RequirementDefinition; import org.openecomp.sdc.be.model.Resource; -import org.openecomp.sdc.be.model.UploadCapInfo; -import org.openecomp.sdc.be.model.UploadComponentInstanceInfo; -import org.openecomp.sdc.be.model.UploadPropInfo; -import org.openecomp.sdc.be.model.UploadReqInfo; -import org.openecomp.sdc.be.model.UploadResourceInfo; import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.be.model.cache.ApplicationDataTypeCache; -import org.openecomp.sdc.be.model.category.CategoryDefinition; -import org.openecomp.sdc.be.model.category.SubCategoryDefinition; import org.openecomp.sdc.be.model.jsontitan.operations.NodeTemplateOperation; import org.openecomp.sdc.be.model.jsontitan.operations.NodeTypeOperation; import org.openecomp.sdc.be.model.jsontitan.operations.TopologyTemplateOperation; import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade; -import org.openecomp.sdc.be.model.operations.api.ICacheMangerOperation; import org.openecomp.sdc.be.model.operations.api.ICapabilityTypeOperation; import org.openecomp.sdc.be.model.operations.api.IElementOperation; import org.openecomp.sdc.be.model.operations.api.IPropertyOperation; @@ -110,15 +83,12 @@ import org.openecomp.sdc.be.model.operations.impl.GraphLockOperation; import org.openecomp.sdc.be.model.tosca.ToscaPropertyType; import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum; import org.openecomp.sdc.be.tosca.CsarUtils.NonMetaArtifactInfo; -import org.openecomp.sdc.be.ui.model.UiComponentDataTransfer; -import org.openecomp.sdc.be.user.IUserBusinessLogic; import org.openecomp.sdc.be.user.Role; import org.openecomp.sdc.be.user.UserBusinessLogic; import org.openecomp.sdc.common.api.ArtifactGroupTypeEnum; import org.openecomp.sdc.common.api.ArtifactTypeEnum; import org.openecomp.sdc.common.api.ConfigurationSource; import org.openecomp.sdc.common.api.Constants; -import org.openecomp.sdc.common.datastructure.AuditingFieldsKeysEnum; import org.openecomp.sdc.common.impl.ExternalConfiguration; import org.openecomp.sdc.common.impl.FSConfigurationSource; import org.openecomp.sdc.common.util.GeneralUtility; @@ -128,10 +98,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.context.WebApplicationContext; -import com.att.nsa.cambria.test.support.CambriaBatchingPublisherMock.Entry; -import com.google.common.base.Equivalence.Wrapper; -import com.netflix.astyanax.connectionpool.Operation; - import fj.data.Either; public class ResourceBusinessLogicTest { @@ -145,10 +111,10 @@ public class ResourceBusinessLogicTest { public static final String UPDATED_SUBCATEGORY = "Gateway"; public static final String RESOURCE_NAME = "My-Resource_Name with space"; - private static final String GENERIC_VF_NAME = "org.openecomp.resource.abstract.nodes.VF"; - private static final String GENERIC_VFC_NAME = "org.openecomp.resource.abstract.nodes.VFC"; - private static final String GENERIC_PNF_NAME = "org.openecomp.resource.abstract.nodes.PNF"; - + private static final String GENERIC_VF_NAME = "org.openecomp.resource.abstract.nodes.VF"; + private static final String GENERIC_VFC_NAME = "org.openecomp.resource.abstract.nodes.VFC"; + private static final String GENERIC_PNF_NAME = "org.openecomp.resource.abstract.nodes.PNF"; + final ServletContext servletContext = Mockito.mock(ServletContext.class); IAuditingManager iAuditingManager = null; IElementOperation mockElementDao; @@ -179,9 +145,10 @@ public class ResourceBusinessLogicTest { ArtifactsBusinessLogic artifactManager = new ArtifactsBusinessLogic(); CsarOperation csarOperation = Mockito.mock(CsarOperation.class); Map emptyDataTypes = new HashMap(); - + private GenericTypeBusinessLogic genericTypeBusinessLogic = Mockito.mock(GenericTypeBusinessLogic.class); CacheMangerOperation cacheManager = Mockito.mock(CacheMangerOperation.class); + public ResourceBusinessLogicTest() { } @@ -195,8 +162,7 @@ public class ResourceBusinessLogicTest { // Init Configuration String appConfigDir = "src/test/resources/config/catalog-be"; - ConfigurationSource configurationSource = new FSConfigurationSource(ExternalConfiguration.getChangeListener(), - appConfigDir); + ConfigurationSource configurationSource = new FSConfigurationSource(ExternalConfiguration.getChangeListener(), appConfigDir); ConfigurationManager configurationManager = new ConfigurationManager(configurationSource); // Elements @@ -214,38 +180,30 @@ public class ResourceBusinessLogicTest { // Servlet Context attributes when(servletContext.getAttribute(Constants.CONFIGURATION_MANAGER_ATTR)).thenReturn(configurationManager); - when(servletContext.getAttribute(Constants.WEB_APPLICATION_CONTEXT_WRAPPER_ATTR)) - .thenReturn(webAppContextWrapper); + when(servletContext.getAttribute(Constants.WEB_APPLICATION_CONTEXT_WRAPPER_ATTR)).thenReturn(webAppContextWrapper); when(webAppContextWrapper.getWebAppContext(servletContext)).thenReturn(webAppContext); when(webAppContext.getBean(IElementOperation.class)).thenReturn(mockElementDao); Either eitherCountRoot = Either.left(1); Either eitherFalse = Either.left(true); - when(toscaOperationFacade.validateComponentNameExists("Root", ResourceTypeEnum.VFC, ComponentTypeEnum.RESOURCE)) - .thenReturn(eitherFalse); + when(toscaOperationFacade.validateComponentNameExists("Root", ResourceTypeEnum.VFC, ComponentTypeEnum.RESOURCE)).thenReturn(eitherFalse); Either eitherCountExist = Either.left(true); - when(toscaOperationFacade.validateComponentNameExists("alreadyExists", ResourceTypeEnum.VFC, - ComponentTypeEnum.RESOURCE)).thenReturn(eitherCountExist); - + when(toscaOperationFacade.validateComponentNameExists("alreadyExists", ResourceTypeEnum.VFC, ComponentTypeEnum.RESOURCE)).thenReturn(eitherCountExist); + Either eitherCount = Either.left(false); - when(toscaOperationFacade.validateComponentNameExists(RESOURCE_NAME, ResourceTypeEnum.VFC, - ComponentTypeEnum.RESOURCE)).thenReturn(eitherCount); - when(toscaOperationFacade.validateComponentNameExists(RESOURCE_NAME, ResourceTypeEnum.VF, - ComponentTypeEnum.RESOURCE)).thenReturn(eitherCount); - when(toscaOperationFacade.validateComponentNameExists(RESOURCE_NAME, ResourceTypeEnum.PNF, - ComponentTypeEnum.RESOURCE)).thenReturn(eitherCount); - + when(toscaOperationFacade.validateComponentNameExists(RESOURCE_NAME, ResourceTypeEnum.VFC, ComponentTypeEnum.RESOURCE)).thenReturn(eitherCount); + when(toscaOperationFacade.validateComponentNameExists(RESOURCE_NAME, ResourceTypeEnum.VF, ComponentTypeEnum.RESOURCE)).thenReturn(eitherCount); + when(toscaOperationFacade.validateComponentNameExists(RESOURCE_NAME, ResourceTypeEnum.PNF, ComponentTypeEnum.RESOURCE)).thenReturn(eitherCount); + Either validateDerivedExists = Either.left(true); when(toscaOperationFacade.validateToscaResourceNameExists("Root")).thenReturn(validateDerivedExists); - + Either validateDerivedNotExists = Either.left(false); when(toscaOperationFacade.validateToscaResourceNameExists("kuku")).thenReturn(validateDerivedNotExists); - when(graphLockOperation.lockComponent(Mockito.anyString(), Mockito.eq(NodeTypeEnum.Resource))) - .thenReturn(StorageOperationStatus.OK); - when(graphLockOperation.lockComponentByName(Mockito.anyString(), Mockito.eq(NodeTypeEnum.Resource))) - .thenReturn(StorageOperationStatus.OK); - + when(graphLockOperation.lockComponent(Mockito.anyString(), Mockito.eq(NodeTypeEnum.Resource))).thenReturn(StorageOperationStatus.OK); + when(graphLockOperation.lockComponentByName(Mockito.anyString(), Mockito.eq(NodeTypeEnum.Resource))).thenReturn(StorageOperationStatus.OK); + // createResource resourceResponse = createResourceObject(true); Either eitherCreate = Either.left(resourceResponse); @@ -272,6 +230,7 @@ public class ResourceBusinessLogicTest { bl.setApplicationDataTypeCache(applicationDataTypeCache); bl.setCsarOperation(csarOperation); bl.setCacheManagerOperation(cacheManager); + bl.setGenericTypeBusinessLogic(genericTypeBusinessLogic); toscaOperationFacade.setNodeTypeOperation(nodeTypeOperation); toscaOperationFacade.setTopologyTemplateOperation(topologyTemplateOperation); bl.setToscaOperationFacade(toscaOperationFacade); @@ -334,7 +293,7 @@ public class ResourceBusinessLogicTest { if (afterCreate) { resource.setName(resource.getName()); resource.setVersion("0.1"); - + resource.setUniqueId(resource.getName().toLowerCase() + ":" + resource.getVersion()); resource.setCreatorUserId(user.getUserId()); resource.setCreatorFullName(user.getFirstName() + " " + user.getLastName()); @@ -352,8 +311,7 @@ public class ResourceBusinessLogicTest { @Test public void testHappyScenario() { Resource resource = createResourceObject(false); - Either createResponse = bl.createResource(resource, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resource, AuditingActionEnum.CREATE_RESOURCE, user, null, null); if (createResponse.isRight()) { assertEquals(new Integer(200), createResponse.right().value().getStatus()); @@ -365,17 +323,15 @@ public class ResourceBusinessLogicTest { public void testUpdateHappyScenario() { Resource resource = createResourceObjectCsar(true); setCanWorkOnResource(resource); - + Either resourceLinkedToCsarRes = Either.left(resource); - when(toscaOperationFacade.getLatestComponentByCsarOrName(ComponentTypeEnum.RESOURCE, resource.getCsarUUID(), - resource.getSystemName())).thenReturn(resourceLinkedToCsarRes); + when(toscaOperationFacade.getLatestComponentByCsarOrName(ComponentTypeEnum.RESOURCE, resource.getCsarUUID(), resource.getSystemName())).thenReturn(resourceLinkedToCsarRes); Either validateDerivedExists = Either.left(true); when(toscaOperationFacade.validateToscaResourceNameExists("Root")).thenReturn(validateDerivedExists); - + Either dataModelResponse = Either.left(resource); when(toscaOperationFacade.updateToscaElement(resource)).thenReturn(dataModelResponse); - Either updateResponse = bl.validateAndUpdateResourceFromCsar(resource, user, null, - null, resource.getUniqueId()); + Either updateResponse = bl.validateAndUpdateResourceFromCsar(resource, user, null, null, resource.getUniqueId()); if (updateResponse.isRight()) { assertEquals(new Integer(200), updateResponse.right().value().getStatus()); } @@ -403,7 +359,7 @@ public class ResourceBusinessLogicTest { testTagsExceedsLimitCreate(); testTagsNoServiceName(); testInvalidTag(); - + testContactIdTooLong(); testContactIdWrongFormatCreate(); testResourceContactIdEmpty(); @@ -431,18 +387,15 @@ public class ResourceBusinessLogicTest { resourceExist.setName(resourceName); resourceExist.getTags().add(resourceName); - Either createResponse = bl.createResource(resourceExist, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); - assertResponse(createResponse, ActionStatus.COMPONENT_NAME_ALREADY_EXIST, ComponentTypeEnum.RESOURCE.getValue(), - resourceName); + Either createResponse = bl.createResource(resourceExist, AuditingActionEnum.CREATE_RESOURCE, user, null, null); + assertResponse(createResponse, ActionStatus.COMPONENT_NAME_ALREADY_EXIST, ComponentTypeEnum.RESOURCE.getValue(), resourceName); } private void testResourceNameEmpty() { Resource resourceExist = createResourceObject(false); resourceExist.setName(null); - Either createResponse = bl.createResource(resourceExist, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceExist, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertResponse(createResponse, ActionStatus.MISSING_COMPONENT_NAME, ComponentTypeEnum.RESOURCE.getValue()); } @@ -452,11 +405,9 @@ public class ResourceBusinessLogicTest { String tooLongResourceName = "zCRCAWjqte0DtgcAAMmcJcXeNubeX1p1vOZNTShAHOYNAHvV3iK"; resourceExccedsNameLimit.setName(tooLongResourceName); - Either createResponse = bl.createResource(resourceExccedsNameLimit, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceExccedsNameLimit, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); - assertResponse(createResponse, ActionStatus.COMPONENT_NAME_EXCEEDS_LIMIT, ComponentTypeEnum.RESOURCE.getValue(), - "" + ValidationUtils.COMPONENT_NAME_MAX_LENGTH); + assertResponse(createResponse, ActionStatus.COMPONENT_NAME_EXCEEDS_LIMIT, ComponentTypeEnum.RESOURCE.getValue(), "" + ValidationUtils.COMPONENT_NAME_MAX_LENGTH); } private void testResourceNameWrongFormat() { @@ -465,8 +416,7 @@ public class ResourceBusinessLogicTest { String nameWrongFormat = "ljg?fd"; resource.setName(nameWrongFormat); - Either createResponse = bl.createResource(resource, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resource, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.INVALID_COMPONENT_NAME, ComponentTypeEnum.RESOURCE.getValue()); } @@ -487,11 +437,9 @@ public class ResourceBusinessLogicTest { resourceExccedsDescLimit.setDescription(tooLongResourceDesc); - Either createResponse = bl.createResource(resourceExccedsDescLimit, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceExccedsDescLimit, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); - assertResponse(createResponse, ActionStatus.COMPONENT_DESCRIPTION_EXCEEDS_LIMIT, - ComponentTypeEnum.RESOURCE.getValue(), "" + ValidationUtils.COMPONENT_DESCRIPTION_MAX_LENGTH); + assertResponse(createResponse, ActionStatus.COMPONENT_DESCRIPTION_EXCEEDS_LIMIT, ComponentTypeEnum.RESOURCE.getValue(), "" + ValidationUtils.COMPONENT_DESCRIPTION_MAX_LENGTH); } private void testResourceDescNotEnglish() { @@ -500,35 +448,29 @@ public class ResourceBusinessLogicTest { String notEnglishDesc = "\uC2B5"; notEnglish.setDescription(notEnglishDesc); - Either createResponse = bl.createResource(notEnglish, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(notEnglish, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); - assertResponse(createResponse, ActionStatus.COMPONENT_INVALID_DESCRIPTION, - ComponentTypeEnum.RESOURCE.getValue()); + assertResponse(createResponse, ActionStatus.COMPONENT_INVALID_DESCRIPTION, ComponentTypeEnum.RESOURCE.getValue()); } private void testResourceDescriptionEmpty() { Resource resourceExist = createResourceObject(false); resourceExist.setDescription(""); - Either createResponse = bl.createResource(resourceExist, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceExist, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); - assertResponse(createResponse, ActionStatus.COMPONENT_MISSING_DESCRIPTION, - ComponentTypeEnum.RESOURCE.getValue()); + assertResponse(createResponse, ActionStatus.COMPONENT_MISSING_DESCRIPTION, ComponentTypeEnum.RESOURCE.getValue()); } private void testResourceDescriptionMissing() { Resource resourceExist = createResourceObject(false); resourceExist.setDescription(null); - Either createResponse = bl.createResource(resourceExist, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceExist, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); - assertResponse(createResponse, ActionStatus.COMPONENT_MISSING_DESCRIPTION, - ComponentTypeEnum.RESOURCE.getValue()); + assertResponse(createResponse, ActionStatus.COMPONENT_MISSING_DESCRIPTION, ComponentTypeEnum.RESOURCE.getValue()); } // Resource description - end // Resource icon start @@ -537,8 +479,7 @@ public class ResourceBusinessLogicTest { Resource resourceExist = createResourceObject(false); resourceExist.setIcon(null); - Either createResponse = bl.createResource(resourceExist, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceExist, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.COMPONENT_MISSING_ICON, ComponentTypeEnum.RESOURCE.getValue()); @@ -548,8 +489,7 @@ public class ResourceBusinessLogicTest { Resource resourceExist = createResourceObject(false); resourceExist.setIcon("kjk3453^&"); - Either createResponse = bl.createResource(resourceExist, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceExist, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.COMPONENT_INVALID_ICON, ComponentTypeEnum.RESOURCE.getValue()); @@ -559,12 +499,10 @@ public class ResourceBusinessLogicTest { Resource resourceExist = createResourceObject(false); resourceExist.setIcon("dsjfhskdfhskjdhfskjdhkjdhfkshdfksjsdkfhsdfsdfsdfsfsdfsf"); - Either createResponse = bl.createResource(resourceExist, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceExist, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); - assertResponse(createResponse, ActionStatus.COMPONENT_ICON_EXCEEDS_LIMIT, ComponentTypeEnum.RESOURCE.getValue(), - "" + ValidationUtils.ICON_MAX_LENGTH); + assertResponse(createResponse, ActionStatus.COMPONENT_ICON_EXCEEDS_LIMIT, ComponentTypeEnum.RESOURCE.getValue(), "" + ValidationUtils.ICON_MAX_LENGTH); } // Resource icon end @@ -573,8 +511,7 @@ public class ResourceBusinessLogicTest { Resource resourceExist = createResourceObject(false); resourceExist.setTags(null); - Either createResponse = bl.createResource(resourceExist, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceExist, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.COMPONENT_MISSING_TAGS); @@ -584,8 +521,7 @@ public class ResourceBusinessLogicTest { Resource resourceExist = createResourceObject(false); resourceExist.setTags(new ArrayList()); - Either createResponse = bl.createResource(resourceExist, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceExist, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.COMPONENT_MISSING_TAGS); @@ -641,11 +577,9 @@ public class ResourceBusinessLogicTest { resourceExccedsNameLimit.setTags(tagsList); - Either createResponse = bl.createResource(resourceExccedsNameLimit, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceExccedsNameLimit, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); - assertResponse(createResponse, ActionStatus.COMPONENT_TAGS_EXCEED_LIMIT, - "" + ValidationUtils.TAG_LIST_MAX_LENGTH); + assertResponse(createResponse, ActionStatus.COMPONENT_TAGS_EXCEED_LIMIT, "" + ValidationUtils.TAG_LIST_MAX_LENGTH); } @@ -659,11 +593,9 @@ public class ResourceBusinessLogicTest { resourceExccedsNameLimit.setTags(tagsList); - Either createResponse = bl.createResource(resourceExccedsNameLimit, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceExccedsNameLimit, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); - assertResponse(createResponse, ActionStatus.COMPONENT_SINGLE_TAG_EXCEED_LIMIT, - "" + ValidationUtils.TAG_MAX_LENGTH); + assertResponse(createResponse, ActionStatus.COMPONENT_SINGLE_TAG_EXCEED_LIMIT, "" + ValidationUtils.TAG_MAX_LENGTH); } @@ -674,8 +606,7 @@ public class ResourceBusinessLogicTest { tagsList.add(tag1); serviceExccedsNameLimit.setTags(tagsList); - Either createResponse = bl.createResource(serviceExccedsNameLimit, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(serviceExccedsNameLimit, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.COMPONENT_INVALID_TAGS_NO_COMP_NAME); @@ -688,8 +619,7 @@ public class ResourceBusinessLogicTest { tagsList.add(tag1); serviceExccedsNameLimit.setTags(tagsList); - Either createResponse = bl.createResource(serviceExccedsNameLimit, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(serviceExccedsNameLimit, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.INVALID_FIELD_FORMAT, new String[] { "Resource", "tag" }); @@ -697,15 +627,14 @@ public class ResourceBusinessLogicTest { // Resource tags - stop // Resource contact start - + private void testContactIdTooLong() { Resource resourceContactId = createResourceObject(false); // 59 chars instead of 50 String contactIdTooLong = "thisNameIsVeryLongAndExeccedsTheNormalLengthForContactId"; resourceContactId.setContactId(contactIdTooLong); - Either createResponse = bl.createResource(resourceContactId, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceContactId, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.COMPONENT_INVALID_CONTACT, ComponentTypeEnum.RESOURCE.getValue()); } @@ -716,8 +645,7 @@ public class ResourceBusinessLogicTest { String contactIdFormatWrong = "yrt134!!!"; resourceContactId.setContactId(contactIdFormatWrong); - Either createResponse = bl.createResource(resourceContactId, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceContactId, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.COMPONENT_INVALID_CONTACT, ComponentTypeEnum.RESOURCE.getValue()); } @@ -726,8 +654,7 @@ public class ResourceBusinessLogicTest { Resource resourceExist = createResourceObject(false); resourceExist.setContactId(""); - Either createResponse = bl.createResource(resourceExist, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceExist, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.COMPONENT_MISSING_CONTACT, ComponentTypeEnum.RESOURCE.getValue()); @@ -737,8 +664,7 @@ public class ResourceBusinessLogicTest { Resource resourceExist = createResourceObject(false); resourceExist.setContactId(null); - Either createResponse = bl.createResource(resourceExist, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceExist, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.COMPONENT_MISSING_CONTACT, ComponentTypeEnum.RESOURCE.getValue()); @@ -749,23 +675,19 @@ public class ResourceBusinessLogicTest { String tooLongVendorName = "h1KSyJh9Eh1KSyJh9Eh1KSyJh9Eh1KSyJh9Eh1KSyJh9Eh1KSyJh9Eh1KSyJh9Eh1KSyJh9E"; resourceExccedsVendorNameLimit.setVendorName(tooLongVendorName); - Either createResponse = bl.createResource(resourceExccedsVendorNameLimit, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceExccedsVendorNameLimit, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); - assertResponse(createResponse, ActionStatus.VENDOR_NAME_EXCEEDS_LIMIT, - "" + ValidationUtils.VENDOR_NAME_MAX_LENGTH); + assertResponse(createResponse, ActionStatus.VENDOR_NAME_EXCEEDS_LIMIT, "" + ValidationUtils.VENDOR_NAME_MAX_LENGTH); } - + private void testResourceVendorModelNumberExceedsLimit() { Resource resourceExccedsVendorModelNumberLimit = createResourceObject(false); String tooLongVendorModelNumber = "h1KSyJh9Eh1KSyJh9Eh1KSyJh9Eh1KSyJh9Eh1KSyJh9Eh1KSyJh9Eh1KSyJh9Eh1KSyJh9E"; resourceExccedsVendorModelNumberLimit.setResourceVendorModelNumber(tooLongVendorModelNumber); - Either createResponse = bl.createResource(resourceExccedsVendorModelNumberLimit, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceExccedsVendorModelNumberLimit, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); - assertResponse(createResponse, ActionStatus.RESOURCE_VENDOR_MODEL_NUMBER_EXCEEDS_LIMIT, - "" + ValidationUtils.RESOURCE_VENDOR_MODEL_NUMBER_MAX_LENGTH); + assertResponse(createResponse, ActionStatus.RESOURCE_VENDOR_MODEL_NUMBER_EXCEEDS_LIMIT, "" + ValidationUtils.RESOURCE_VENDOR_MODEL_NUMBER_MAX_LENGTH); } private void testVendorNameWrongFormatCreate() { @@ -774,8 +696,7 @@ public class ResourceBusinessLogicTest { String nameWrongFormat = "ljg*fd"; resource.setVendorName(nameWrongFormat); - Either createResponse = bl.createResource(resource, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resource, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.INVALID_VENDOR_NAME); } @@ -786,8 +707,7 @@ public class ResourceBusinessLogicTest { String nameWrongFormat = "1>2"; resource.setVendorRelease(nameWrongFormat); - Either createResponse = bl.createResource(resource, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resource, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.INVALID_VENDOR_RELEASE); @@ -798,19 +718,16 @@ public class ResourceBusinessLogicTest { String tooLongVendorRelease = "h1KSyJh9Eh1KSyJh9Eh1KSyJh9Eh1KSyJh9E"; resourceExccedsNameLimit.setVendorRelease(tooLongVendorRelease); - Either createResponse = bl.createResource(resourceExccedsNameLimit, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceExccedsNameLimit, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); - assertResponse(createResponse, ActionStatus.VENDOR_RELEASE_EXCEEDS_LIMIT, - "" + ValidationUtils.VENDOR_RELEASE_MAX_LENGTH); + assertResponse(createResponse, ActionStatus.VENDOR_RELEASE_EXCEEDS_LIMIT, "" + ValidationUtils.VENDOR_RELEASE_MAX_LENGTH); } private void testResourceVendorNameMissing() { Resource resourceExist = createResourceObject(false); resourceExist.setVendorName(null); - Either createResponse = bl.createResource(resourceExist, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceExist, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.MISSING_VENDOR_NAME); @@ -820,8 +737,7 @@ public class ResourceBusinessLogicTest { Resource resourceExist = createResourceObject(false); resourceExist.setVendorRelease(null); - Either createResponse = bl.createResource(resourceExist, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceExist, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.MISSING_VENDOR_RELEASE); @@ -833,8 +749,7 @@ public class ResourceBusinessLogicTest { Resource resourceExist = createResourceObject(false); resourceExist.setCategories(null); - Either createResponse = bl.createResource(resourceExist, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceExist, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.COMPONENT_MISSING_CATEGORY, ComponentTypeEnum.RESOURCE.getValue()); @@ -846,8 +761,7 @@ public class ResourceBusinessLogicTest { resourceExist.setCategories(null); resourceExist.addCategory("koko", "koko"); - Either createResponse = bl.createResource(resourceExist, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceExist, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.COMPONENT_INVALID_CATEGORY, ComponentTypeEnum.RESOURCE.getValue()); @@ -866,8 +780,7 @@ public class ResourceBusinessLogicTest { String licenseType = "User"; createResourceObject.setCost(cost); createResourceObject.setLicenseType(licenseType); - Either createResponse = bl.createResource(createResourceObject, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(createResourceObject, AuditingActionEnum.CREATE_RESOURCE, user, null, null); if (createResponse.isRight()) { assertEquals(new Integer(200), createResponse.right().value().getStatus()); @@ -883,8 +796,7 @@ public class ResourceBusinessLogicTest { String cost = "12356,464"; resourceCost.setCost(cost); - Either createResponse = bl.createResource(resourceCost, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceCost, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.INVALID_CONTENT); } @@ -897,8 +809,7 @@ public class ResourceBusinessLogicTest { String licenseType = "cpu"; resourceLicenseType.setLicenseType(licenseType); - Either createResponse = bl.createResource(resourceLicenseType, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceLicenseType, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.INVALID_CONTENT); } @@ -910,8 +821,7 @@ public class ResourceBusinessLogicTest { List list = null; resourceExist.setDerivedFrom(list); - Either createResponse = bl.createResource(resourceExist, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceExist, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.MISSING_DERIVED_FROM_TEMPLATE); @@ -921,8 +831,7 @@ public class ResourceBusinessLogicTest { Resource resourceExist = createResourceObject(false); resourceExist.setDerivedFrom(new ArrayList()); - Either createResponse = bl.createResource(resourceExist, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceExist, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.MISSING_DERIVED_FROM_TEMPLATE); @@ -934,21 +843,18 @@ public class ResourceBusinessLogicTest { derivedFrom.add("kuku"); resourceExist.setDerivedFrom(derivedFrom); - Either createResponse = bl.createResource(resourceExist, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceExist, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.PARENT_RESOURCE_NOT_FOUND); } // Derived from stop - private void assertResponse(Either createResponse, ActionStatus expectedStatus, - String... variables) { + private void assertResponse(Either createResponse, ActionStatus expectedStatus, String... variables) { ResponseFormat expectedResponse = responseManager.getResponseFormat(expectedStatus, variables); ResponseFormat actualResponse = createResponse.right().value(); assertEquals(expectedResponse.getStatus(), actualResponse.getStatus()); - assertEquals("assert error description", expectedResponse.getFormattedMessage(), - actualResponse.getFormattedMessage()); + assertEquals("assert error description", expectedResponse.getFormattedMessage(), actualResponse.getFormattedMessage()); } // UPDATE tests - start @@ -967,9 +873,8 @@ public class ResourceBusinessLogicTest { Either dataModelResponse = Either.left(resource); when(toscaOperationFacade.updateToscaElement(resource)).thenReturn(dataModelResponse); - - Either createResponse = bl.updateResourceMetadata(resource.getUniqueId(), - updatedResource, null, user, false); + + Either createResponse = bl.updateResourceMetadata(resource.getUniqueId(), updatedResource, null, user, false); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.INVALID_COMPONENT_NAME, ComponentTypeEnum.RESOURCE.getValue()); @@ -988,12 +893,11 @@ public class ResourceBusinessLogicTest { String name = "ljg"; updatedResource.setName(name); resource.setVersion("1.0"); - + Either dataModelResponse = Either.left(resource); when(toscaOperationFacade.updateToscaElement(resource)).thenReturn(dataModelResponse); - Either createResponse = bl.updateResourceMetadata(resource.getUniqueId(), - updatedResource, null, user, false); + Either createResponse = bl.updateResourceMetadata(resource.getUniqueId(), updatedResource, null, user, false); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.RESOURCE_NAME_CANNOT_BE_CHANGED); @@ -1014,11 +918,9 @@ public class ResourceBusinessLogicTest { Either dataModelResponse = Either.left(resource); when(toscaOperationFacade.updateToscaElement(resource)).thenReturn(dataModelResponse); - Either createResponse = bl.updateResourceMetadata(resource.getUniqueId(), - updatedResource, null, user, false); + Either createResponse = bl.updateResourceMetadata(resource.getUniqueId(), updatedResource, null, user, false); assertTrue(createResponse.isRight()); - assertResponse(createResponse, ActionStatus.COMPONENT_NAME_EXCEEDS_LIMIT, ComponentTypeEnum.RESOURCE.getValue(), - "" + ValidationUtils.COMPONENT_NAME_MAX_LENGTH); + assertResponse(createResponse, ActionStatus.COMPONENT_NAME_EXCEEDS_LIMIT, ComponentTypeEnum.RESOURCE.getValue(), "" + ValidationUtils.COMPONENT_NAME_MAX_LENGTH); } @Test @@ -1034,11 +936,9 @@ public class ResourceBusinessLogicTest { updatedResource.setName(resourceName); Either dataModelResponse = Either.left(updatedResource); when(toscaOperationFacade.updateToscaElement(updatedResource)).thenReturn(dataModelResponse); - Either createResponse = bl.updateResourceMetadata(resource.getUniqueId(), - updatedResource, null, user, false); + Either createResponse = bl.updateResourceMetadata(resource.getUniqueId(), updatedResource, null, user, false); assertTrue(createResponse.isRight()); - assertResponse(createResponse, ActionStatus.COMPONENT_NAME_ALREADY_EXIST, ComponentTypeEnum.RESOURCE.getValue(), - resourceName); + assertResponse(createResponse, ActionStatus.COMPONENT_NAME_ALREADY_EXIST, ComponentTypeEnum.RESOURCE.getValue(), resourceName); } // @@ -1064,11 +964,9 @@ public class ResourceBusinessLogicTest { updatedResource.setDescription(tooLongResourceDesc); Either dataModelResponse = Either.left(resource); when(toscaOperationFacade.updateToscaElement(resource)).thenReturn(dataModelResponse); - Either createResponse = bl.updateResourceMetadata(resource.getUniqueId(), - updatedResource, null, user, false); + Either createResponse = bl.updateResourceMetadata(resource.getUniqueId(), updatedResource, null, user, false); assertTrue(createResponse.isRight()); - assertResponse(createResponse, ActionStatus.COMPONENT_DESCRIPTION_EXCEEDS_LIMIT, - ComponentTypeEnum.RESOURCE.getValue(), "" + ValidationUtils.COMPONENT_DESCRIPTION_MAX_LENGTH); + assertResponse(createResponse, ActionStatus.COMPONENT_DESCRIPTION_EXCEEDS_LIMIT, ComponentTypeEnum.RESOURCE.getValue(), "" + ValidationUtils.COMPONENT_DESCRIPTION_MAX_LENGTH); } @@ -1087,8 +985,7 @@ public class ResourceBusinessLogicTest { Either dataModelResponse = Either.left(resource); when(toscaOperationFacade.updateToscaElement(resource)).thenReturn(dataModelResponse); - Either createResponse = bl.updateResourceMetadata(resource.getUniqueId(), - updatedResource, null, user, false); + Either createResponse = bl.updateResourceMetadata(resource.getUniqueId(), updatedResource, null, user, false); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.COMPONENT_INVALID_ICON, ComponentTypeEnum.RESOURCE.getValue()); @@ -1111,8 +1008,7 @@ public class ResourceBusinessLogicTest { ; Either dataModelResponse = Either.left(resource); when(toscaOperationFacade.updateToscaElement(resource)).thenReturn(dataModelResponse); - Either createResponse = bl.updateResourceMetadata(resource.getUniqueId(), - updatedResource, null, user, false); + Either createResponse = bl.updateResourceMetadata(resource.getUniqueId(), updatedResource, null, user, false); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.RESOURCE_ICON_CANNOT_BE_CHANGED); @@ -1176,12 +1072,10 @@ public class ResourceBusinessLogicTest { updatedResource.setTags(tagsList); Either dataModelResponse = Either.left(resource); when(toscaOperationFacade.updateToscaElement(resource)).thenReturn(dataModelResponse); - Either createResponse = bl.updateResourceMetadata(resource.getUniqueId(), - updatedResource, null, user, false); + Either createResponse = bl.updateResourceMetadata(resource.getUniqueId(), updatedResource, null, user, false); assertTrue(createResponse.isRight()); - assertResponse(createResponse, ActionStatus.COMPONENT_TAGS_EXCEED_LIMIT, - "" + ValidationUtils.TAG_LIST_MAX_LENGTH); + assertResponse(createResponse, ActionStatus.COMPONENT_TAGS_EXCEED_LIMIT, "" + ValidationUtils.TAG_LIST_MAX_LENGTH); } @Test @@ -1198,8 +1092,7 @@ public class ResourceBusinessLogicTest { updatedResource.setVendorName(nameWrongFormat); Either dataModelResponse = Either.left(resource); when(toscaOperationFacade.updateToscaElement(resource)).thenReturn(dataModelResponse); - Either createResponse = bl.updateResourceMetadata(resource.getUniqueId(), - updatedResource, null, user, false); + Either createResponse = bl.updateResourceMetadata(resource.getUniqueId(), updatedResource, null, user, false); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.INVALID_VENDOR_NAME); @@ -1221,8 +1114,7 @@ public class ResourceBusinessLogicTest { ; Either dataModelResponse = Either.left(resource); when(toscaOperationFacade.updateToscaElement(resource)).thenReturn(dataModelResponse); - Either createResponse = bl.updateResourceMetadata(resource.getUniqueId(), - updatedResource, null, user, false); + Either createResponse = bl.updateResourceMetadata(resource.getUniqueId(), updatedResource, null, user, false); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.RESOURCE_VENDOR_NAME_CANNOT_BE_CHANGED); @@ -1241,11 +1133,9 @@ public class ResourceBusinessLogicTest { updatedResource.setVendorRelease(tooLongVendorRelease); Either dataModelResponse = Either.left(resource); when(toscaOperationFacade.updateToscaElement(resource)).thenReturn(dataModelResponse); - Either createResponse = bl.updateResourceMetadata(resource.getUniqueId(), - updatedResource, null, user, false); + Either createResponse = bl.updateResourceMetadata(resource.getUniqueId(), updatedResource, null, user, false); assertTrue(createResponse.isRight()); - assertResponse(createResponse, ActionStatus.VENDOR_RELEASE_EXCEEDS_LIMIT, - "" + ValidationUtils.VENDOR_RELEASE_MAX_LENGTH); + assertResponse(createResponse, ActionStatus.VENDOR_RELEASE_EXCEEDS_LIMIT, "" + ValidationUtils.VENDOR_RELEASE_MAX_LENGTH); } @Ignore @@ -1263,8 +1153,7 @@ public class ResourceBusinessLogicTest { updatedResource.setContactId(contactIdTooLong); Either dataModelResponse = Either.left(resource); when(toscaOperationFacade.updateToscaElement(resource)).thenReturn(dataModelResponse); - Either createResponse = bl.updateResourceMetadata(resourceId, updatedResource, null, - user, false); + Either createResponse = bl.updateResourceMetadata(resourceId, updatedResource, null, user, false); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.COMPONENT_INVALID_CONTACT, ComponentTypeEnum.RESOURCE.getValue()); @@ -1285,8 +1174,7 @@ public class ResourceBusinessLogicTest { updatedResource.addCategory(badCategory, "fikt"); Either dataModelResponse = Either.left(resource); when(toscaOperationFacade.updateToscaElement(resource)).thenReturn(dataModelResponse); - Either createResponse = bl.updateResourceMetadata(resourceId, updatedResource, null, - user, false); + Either createResponse = bl.updateResourceMetadata(resourceId, updatedResource, null, user, false); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.COMPONENT_INVALID_CATEGORY, ComponentTypeEnum.RESOURCE.getValue()); @@ -1308,8 +1196,7 @@ public class ResourceBusinessLogicTest { ; Either dataModelResponse = Either.left(resource); when(toscaOperationFacade.updateToscaElement(resource)).thenReturn(dataModelResponse); - Either createResponse = bl.updateResourceMetadata(resourceId, updatedResource, null, - user, false); + Either createResponse = bl.updateResourceMetadata(resourceId, updatedResource, null, user, false); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.RESOURCE_CATEGORY_CANNOT_BE_CHANGED); @@ -1330,8 +1217,7 @@ public class ResourceBusinessLogicTest { updatedResource.setDerivedFrom(list); Either dataModelResponse = Either.left(resource); when(toscaOperationFacade.updateToscaElement(resource)).thenReturn(dataModelResponse); - Either createResponse = bl.updateResourceMetadata(resourceId, updatedResource, null, - user, false); + Either createResponse = bl.updateResourceMetadata(resourceId, updatedResource, null, user, false); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.MISSING_DERIVED_FROM_TEMPLATE); @@ -1350,8 +1236,7 @@ public class ResourceBusinessLogicTest { updatedResource.setDerivedFrom(new ArrayList()); Either dataModelResponse = Either.left(resource); when(toscaOperationFacade.updateToscaElement(resource)).thenReturn(dataModelResponse); - Either createResponse = bl.updateResourceMetadata(resourceId, updatedResource, null, - user, false); + Either createResponse = bl.updateResourceMetadata(resourceId, updatedResource, null, user, false); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.MISSING_DERIVED_FROM_TEMPLATE); @@ -1372,8 +1257,7 @@ public class ResourceBusinessLogicTest { updatedResource.setDerivedFrom(derivedFrom); Either dataModelResponse = Either.left(resource); when(toscaOperationFacade.updateToscaElement(resource)).thenReturn(dataModelResponse); - Either createResponse = bl.updateResourceMetadata(resourceId, updatedResource, null, - user, false); + Either createResponse = bl.updateResourceMetadata(resourceId, updatedResource, null, user, false); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.PARENT_RESOURCE_NOT_FOUND); @@ -1388,16 +1272,13 @@ public class ResourceBusinessLogicTest { // this is in order to prevent failing with 403 earlier Either eitherUpdate = Either.left(setCanWorkOnResource(resource)); when(toscaOperationFacade.getToscaElement(resource.getUniqueId())).thenReturn(eitherUpdate); - + Either isToscaNameExtending = Either.left(true); - when(toscaOperationFacade.validateToscaResourceNameExtends(Mockito.anyString(), Mockito.anyString())) - .thenReturn(isToscaNameExtending); - - Either, StorageOperationStatus> findPropertiesOfNode = Either - .left(new HashMap<>()); - when(propertyOperation.deleteAllPropertiesAssociatedToNode(Mockito.any(NodeTypeEnum.class), - Mockito.anyString())).thenReturn(findPropertiesOfNode); - + when(toscaOperationFacade.validateToscaResourceNameExtends(Mockito.anyString(), Mockito.anyString())).thenReturn(isToscaNameExtending); + + Either, StorageOperationStatus> findPropertiesOfNode = Either.left(new HashMap<>()); + when(propertyOperation.deleteAllPropertiesAssociatedToNode(Mockito.any(NodeTypeEnum.class), Mockito.anyString())).thenReturn(findPropertiesOfNode); + resource.setVersion("1.0"); ArrayList derivedFrom = new ArrayList(); @@ -1405,11 +1286,10 @@ public class ResourceBusinessLogicTest { updatedResource.setDerivedFrom(derivedFrom); Either dataModelResponse = Either.left(updatedResource); when(toscaOperationFacade.updateToscaElement(updatedResource)).thenReturn(dataModelResponse); - Either createResponse = bl.updateResourceMetadata(resourceId, updatedResource, null, - user, false); + Either createResponse = bl.updateResourceMetadata(resourceId, updatedResource, null, user, false); assertTrue(createResponse.isLeft()); } - + @Test public void testResourceTemplateCertify_UPDATE_SAD() { Resource resource = createResourceObject(true); @@ -1419,7 +1299,7 @@ public class ResourceBusinessLogicTest { // this is in order to prevent failing with 403 earlier Either eitherUpdate = Either.left(setCanWorkOnResource(resource)); when(toscaOperationFacade.getToscaElement(resource.getUniqueId())).thenReturn(eitherUpdate); - + Either isToscaNameExtending = Either.left(false); when(toscaOperationFacade.validateToscaResourceNameExtends(Mockito.anyString(), Mockito.anyString())) .thenReturn(isToscaNameExtending); @@ -1431,8 +1311,8 @@ public class ResourceBusinessLogicTest { updatedResource.setDerivedFrom(derivedFrom); Either dataModelResponse = Either.left(resource); when(toscaOperationFacade.updateToscaElement(resource)).thenReturn(dataModelResponse); - Either createResponse = bl.updateResourceMetadata(resourceId, updatedResource, null, - user, false); + Either createResponse = bl.updateResourceMetadata(resourceId, updatedResource, null, user, + false); assertTrue(createResponse.isRight()); assertResponse(createResponse, ActionStatus.PARENT_RESOURCE_DOES_NOT_EXTEND); @@ -1443,28 +1323,23 @@ public class ResourceBusinessLogicTest { public void createOrUpdateResourceAlreadyCheckout() { Resource resourceExist = createResourceObject(false); - Either createResponse = bl.createResource(resourceExist, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceExist, AuditingActionEnum.CREATE_RESOURCE, user, null, null); createResponse.left().value().setLastUpdaterUserId(user.getUserId()); assertTrue(createResponse.isLeft()); - Either getLatestResult = Either.left(createResponse.left().value()); - when(toscaOperationFacade.getLatestByName(resourceExist.getName())).thenReturn(getLatestResult); - when(toscaOperationFacade.overrideComponent(Mockito.any(Component.class), Mockito.any(Component.class))) - .thenReturn(getLatestResult); + Either getLatestResult = Either.left(createResponse.left().value()); + Either getCompLatestResult = Either.left(createResponse.left().value()); + when(toscaOperationFacade.getLatestByName(resourceExist.getName())).thenReturn(getCompLatestResult); + when(toscaOperationFacade.overrideComponent(Mockito.any(Resource.class), Mockito.any(Resource.class))).thenReturn(getLatestResult); Resource resourceToUpdtae = createResourceObject(false); - Either, ResponseFormat> createOrUpdateResource = bl - .createOrUpdateResourceByImport(resourceToUpdtae, user, false, false, false, null); + Either, ResponseFormat> createOrUpdateResource = bl.createOrUpdateResourceByImport(resourceToUpdtae, user, false, false, false, null, null, false); assertTrue(createOrUpdateResource.isLeft()); - Mockito.verify(toscaOperationFacade, Mockito.times(1)).overrideComponent(Mockito.any(Resource.class), - Mockito.any(Resource.class)); - Mockito.verify(lifecycleBl, Mockito.times(0)).changeState(Mockito.anyString(), Mockito.eq(user), - Mockito.eq(LifeCycleTransitionEnum.CHECKOUT), Mockito.any(LifecycleChangeInfoWithAction.class), - Mockito.anyBoolean(), Mockito.anyBoolean()); + Mockito.verify(toscaOperationFacade, Mockito.times(1)).overrideComponent(Mockito.any(Resource.class), Mockito.any(Resource.class)); + Mockito.verify(lifecycleBl, Mockito.times(0)).changeState(Mockito.anyString(), Mockito.eq(user), Mockito.eq(LifeCycleTransitionEnum.CHECKOUT), Mockito.any(LifecycleChangeInfoWithAction.class), Mockito.anyBoolean(), Mockito.anyBoolean()); } @@ -1472,34 +1347,28 @@ public class ResourceBusinessLogicTest { public void createOrUpdateResourceCertified() { Resource resourceExist = createResourceObject(false); - Either createResponse = bl.createResource(resourceExist, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + Either createResponse = bl.createResource(resourceExist, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isLeft()); Resource certifiedResource = createResponse.left().value(); certifiedResource.setLifecycleState(LifecycleStateEnum.CERTIFIED); certifiedResource.setVersion("1.0"); + - Either getLatestResult = Either.left(certifiedResource); - when(toscaOperationFacade.getLatestByName(resourceExist.getName())).thenReturn(getLatestResult); - when(toscaOperationFacade.overrideComponent(Mockito.any(Component.class), Mockito.any(Component.class))) - .thenReturn(getLatestResult); + Either getLatestResult = Either.left(certifiedResource); + Either getCompLatestResult = Either.left(createResponse.left().value()); + when(toscaOperationFacade.getLatestByName(resourceExist.getName())).thenReturn(getCompLatestResult); + when(toscaOperationFacade.overrideComponent(Mockito.any(Resource.class), Mockito.any(Resource.class))).thenReturn(getLatestResult); - when(lifecycleBl.changeState(Mockito.anyString(), Mockito.eq(user), - Mockito.eq(LifeCycleTransitionEnum.CHECKOUT), Mockito.any(LifecycleChangeInfoWithAction.class), - Mockito.anyBoolean(), Mockito.anyBoolean())).thenReturn(createResponse); + when(lifecycleBl.changeState(Mockito.anyString(), Mockito.eq(user), Mockito.eq(LifeCycleTransitionEnum.CHECKOUT), Mockito.any(LifecycleChangeInfoWithAction.class), Mockito.anyBoolean(), Mockito.anyBoolean())).thenReturn(createResponse); Resource resourceToUpdtae = createResourceObject(false); - Either, ResponseFormat> createOrUpdateResource = bl - .createOrUpdateResourceByImport(resourceToUpdtae, user, false, false, false, null); + Either, ResponseFormat> createOrUpdateResource = bl.createOrUpdateResourceByImport(resourceToUpdtae, user, false, false, false, null, null, false); assertTrue(createOrUpdateResource.isLeft()); - Mockito.verify(toscaOperationFacade, Mockito.times(1)).overrideComponent(Mockito.any(Component.class), - Mockito.any(Component.class)); - Mockito.verify(lifecycleBl, Mockito.times(1)).changeState(Mockito.anyString(), Mockito.eq(user), - Mockito.eq(LifeCycleTransitionEnum.CHECKOUT), Mockito.any(LifecycleChangeInfoWithAction.class), - Mockito.anyBoolean(), Mockito.anyBoolean()); + Mockito.verify(toscaOperationFacade, Mockito.times(1)).overrideComponent(Mockito.any(Resource.class), Mockito.any(Resource.class)); + Mockito.verify(lifecycleBl, Mockito.times(1)).changeState(Mockito.anyString(), Mockito.eq(user), Mockito.eq(LifeCycleTransitionEnum.CHECKOUT), Mockito.any(LifecycleChangeInfoWithAction.class), Mockito.anyBoolean(), Mockito.anyBoolean()); } @@ -1510,20 +1379,14 @@ public class ResourceBusinessLogicTest { Either getLatestResult = Either.right(StorageOperationStatus.NOT_FOUND); when(toscaOperationFacade.getLatestByName(resourceToUpdtae.getName())).thenReturn(getLatestResult); - Either getLatestToscaNameResult = Either - .right(StorageOperationStatus.NOT_FOUND); - when(toscaOperationFacade.getLatestByToscaResourceName(resourceToUpdtae.getToscaResourceName())) - .thenReturn(getLatestToscaNameResult); + Either getLatestToscaNameResult = Either.right(StorageOperationStatus.NOT_FOUND); + when(toscaOperationFacade.getLatestByToscaResourceName(resourceToUpdtae.getToscaResourceName())).thenReturn(getLatestToscaNameResult); - Either, ResponseFormat> createOrUpdateResource = bl - .createOrUpdateResourceByImport(resourceToUpdtae, user, false, false, false, null); + Either, ResponseFormat> createOrUpdateResource = bl.createOrUpdateResourceByImport(resourceToUpdtae, user, false, false, false, null, null, false); assertTrue(createOrUpdateResource.isLeft()); - Mockito.verify(toscaOperationFacade, Mockito.times(0)).overrideComponent(Mockito.any(Component.class), - Mockito.any(Component.class)); - Mockito.verify(lifecycleBl, Mockito.times(0)).changeState(Mockito.anyString(), Mockito.eq(user), - Mockito.eq(LifeCycleTransitionEnum.CHECKOUT), Mockito.any(LifecycleChangeInfoWithAction.class), - Mockito.anyBoolean(), Mockito.anyBoolean()); + Mockito.verify(toscaOperationFacade, Mockito.times(0)).overrideComponent(Mockito.any(Resource.class), Mockito.any(Resource.class)); + Mockito.verify(lifecycleBl, Mockito.times(0)).changeState(Mockito.anyString(), Mockito.eq(user), Mockito.eq(LifeCycleTransitionEnum.CHECKOUT), Mockito.any(LifecycleChangeInfoWithAction.class), Mockito.anyBoolean(), Mockito.anyBoolean()); } @@ -1567,381 +1430,294 @@ public class ResourceBusinessLogicTest { assertTrue(validatePropertiesDefaultValues.isRight()); } - // @Test - // public void testDeleteMarkedResourcesNoResources() { - // List ids = new ArrayList<>(); - // Either, StorageOperationStatus> eitherNoResources = - // Either.left(ids); - // when(topologyTemplateOperation.getAllComponentsMarkedForDeletion(ComponentTypeEnum.RESOURCE)).thenReturn(eitherNoResources); - // - // Either, ResponseFormat> deleteMarkedResources = - // bl.deleteMarkedComponents(); - // assertTrue(deleteMarkedResources.isLeft()); - // assertTrue(deleteMarkedResources.left().value().isEmpty()); - // - // Mockito.verify(artifactManager, - // Mockito.times(0)).deleteAllComponentArtifactsIfNotOnGraph(Mockito.anyList()); - // - // } - // - // @Test - // public void testDeleteMarkedResources() { - // List ids = new ArrayList(); - // String resourceInUse = "123"; - // ids.add(resourceInUse); - // String resourceFree = "456"; - // ids.add(resourceFree); - // Either, StorageOperationStatus> eitherNoResources = - // Either.left(ids); - // when(toscaOperationFacade.getAllComponentsMarkedForDeletion()).thenReturn(eitherNoResources); - // - // Either resourceInUseResponse = - // Either.left(true); - // Either resourceFreeResponse = - // Either.left(false); - // - // List artifacts = new ArrayList(); - // Either, StorageOperationStatus> - // getArtifactsResponse = Either.left(artifacts); - // when(toscaOperationFacade.getComponentArtifactsForDelete(resourceFree, - // NodeTypeEnum.Resource, true)).thenReturn(getArtifactsResponse); - // - // when(toscaOperationFacade.isComponentInUse(resourceFree)).thenReturn(resourceFreeResponse); - // when(toscaOperationFacade.isComponentInUse(resourceInUse)).thenReturn(resourceInUseResponse); - // - // Either eitherDelete = Either.left(new - // Resource()); - // when(toscaOperationFacade.deleteToscaComponent(resourceFree)).thenReturn(eitherDelete); - // - // when(artifactManager.deleteAllComponentArtifactsIfNotOnGraph(artifacts)).thenReturn(StorageOperationStatus.OK); - // List deletedComponents = new ArrayList<>(); - // deletedComponents.add(resourceFree); - // when(toscaOperationFacade.deleteMarkedElements(ComponentTypeEnum.RESOURCE)).thenReturn(Either.left(deletedComponents)); - // - // Either, ResponseFormat> deleteMarkedResources = - // bl.deleteMarkedComponents(); - // assertTrue(deleteMarkedResources.isLeft()); - // List resourceIdList = deleteMarkedResources.left().value(); - // assertFalse(resourceIdList.isEmpty()); - // assertTrue(resourceIdList.contains(resourceFree)); - // assertFalse(resourceIdList.contains(resourceInUse)); - // - // Mockito.verify(artifactManager, - // Mockito.times(1)).deleteAllComponentArtifactsIfNotOnGraph(artifacts); - // } - +// @Test +// public void testDeleteMarkedResourcesNoResources() { +// List ids = new ArrayList<>(); +// Either, StorageOperationStatus> eitherNoResources = Either.left(ids); +// when(topologyTemplateOperation.getAllComponentsMarkedForDeletion(ComponentTypeEnum.RESOURCE)).thenReturn(eitherNoResources); +// +// Either, ResponseFormat> deleteMarkedResources = bl.deleteMarkedComponents(); +// assertTrue(deleteMarkedResources.isLeft()); +// assertTrue(deleteMarkedResources.left().value().isEmpty()); +// +// Mockito.verify(artifactManager, Mockito.times(0)).deleteAllComponentArtifactsIfNotOnGraph(Mockito.anyList()); +// +// } +// +// @Test +// public void testDeleteMarkedResources() { +// List ids = new ArrayList(); +// String resourceInUse = "123"; +// ids.add(resourceInUse); +// String resourceFree = "456"; +// ids.add(resourceFree); +// Either, StorageOperationStatus> eitherNoResources = Either.left(ids); +// when(toscaOperationFacade.getAllComponentsMarkedForDeletion()).thenReturn(eitherNoResources); +// +// Either resourceInUseResponse = Either.left(true); +// Either resourceFreeResponse = Either.left(false); +// +// List artifacts = new ArrayList(); +// Either, StorageOperationStatus> getArtifactsResponse = Either.left(artifacts); +// when(toscaOperationFacade.getComponentArtifactsForDelete(resourceFree, NodeTypeEnum.Resource, true)).thenReturn(getArtifactsResponse); +// +// when(toscaOperationFacade.isComponentInUse(resourceFree)).thenReturn(resourceFreeResponse); +// when(toscaOperationFacade.isComponentInUse(resourceInUse)).thenReturn(resourceInUseResponse); +// +// Either eitherDelete = Either.left(new Resource()); +// when(toscaOperationFacade.deleteToscaComponent(resourceFree)).thenReturn(eitherDelete); +// +// when(artifactManager.deleteAllComponentArtifactsIfNotOnGraph(artifacts)).thenReturn(StorageOperationStatus.OK); +// List deletedComponents = new ArrayList<>(); +// deletedComponents.add(resourceFree); +// when(toscaOperationFacade.deleteMarkedElements(ComponentTypeEnum.RESOURCE)).thenReturn(Either.left(deletedComponents)); +// +// Either, ResponseFormat> deleteMarkedResources = bl.deleteMarkedComponents(); +// assertTrue(deleteMarkedResources.isLeft()); +// List resourceIdList = deleteMarkedResources.left().value(); +// assertFalse(resourceIdList.isEmpty()); +// assertTrue(resourceIdList.contains(resourceFree)); +// assertFalse(resourceIdList.contains(resourceInUse)); +// +// Mockito.verify(artifactManager, Mockito.times(1)).deleteAllComponentArtifactsIfNotOnGraph(artifacts); +// } @SuppressWarnings("unchecked") @Test public void testFindVfCsarArtifactsToHandle() { - + Class targetClass = ResourceBusinessLogic.class; String methodName = "findVfCsarArtifactsToHandle"; Resource resource = new Resource(); String deploymentArtifactToUpdateFileName = "deploymentArtifactToUpdate.yaml"; String deploymentArtifactToDeleteFileName = "deploymentArtifactToDelete.yaml"; String deploymentArtifactToCreateFileName = "deploymentArtifactToCreate.yaml"; - + String artifactInfoToUpdateFileName = "infoArtifactToUpdate.yaml"; String artifactInfoToDeleteFileName = "infoArtifactToDelete.yaml"; String artifactInfoToCreateFileName = "infoArtifactToCreate.yaml"; - + byte[] oldPayloadData = "oldPayloadData".getBytes(); byte[] newPayloadData = "newPayloadData".getBytes(); - Map deploymentArtifacts = new HashMap<>(); - + Map deploymentArtifacts =new HashMap<>(); + ArtifactDefinition deploymentArtifactToUpdate = new ArtifactDefinition(); deploymentArtifactToUpdate.setMandatory(false); deploymentArtifactToUpdate.setArtifactName(deploymentArtifactToUpdateFileName); deploymentArtifactToUpdate.setArtifactType("SNMP_POLL"); deploymentArtifactToUpdate.setPayload(oldPayloadData); - deploymentArtifactToUpdate - .setArtifactChecksum(GeneralUtility.calculateMD5Base64EncodedByByteArray(oldPayloadData)); - + deploymentArtifactToUpdate.setArtifactChecksum(GeneralUtility.calculateMD5Base64EncodedByByteArray(oldPayloadData)); + ArtifactDefinition deploymentArtifactToDelete = new ArtifactDefinition(); deploymentArtifactToDelete.setMandatory(false); deploymentArtifactToDelete.setArtifactName(deploymentArtifactToDeleteFileName); deploymentArtifactToDelete.setArtifactType("SNMP_TRAP"); deploymentArtifactToDelete.setPayload(oldPayloadData); - deploymentArtifactToDelete - .setArtifactChecksum(GeneralUtility.calculateMD5Base64EncodedByByteArray(oldPayloadData)); - + deploymentArtifactToDelete.setArtifactChecksum(GeneralUtility.calculateMD5Base64EncodedByByteArray(oldPayloadData)); + ArtifactDefinition deploymentArtifactToIgnore = new ArtifactDefinition(); - - deploymentArtifacts.put(ValidationUtils.normalizeArtifactLabel(deploymentArtifactToUpdate.getArtifactName()), - deploymentArtifactToUpdate); - deploymentArtifacts.put(ValidationUtils.normalizeArtifactLabel(deploymentArtifactToDelete.getArtifactName()), - deploymentArtifactToDelete); + + deploymentArtifacts.put(ValidationUtils.normalizeArtifactLabel(deploymentArtifactToUpdate.getArtifactName()), deploymentArtifactToUpdate); + deploymentArtifacts.put(ValidationUtils.normalizeArtifactLabel(deploymentArtifactToDelete.getArtifactName()), deploymentArtifactToDelete); deploymentArtifacts.put("ignore", deploymentArtifactToIgnore); - + Map artifacts = new HashMap<>(); - + ArtifactDefinition artifactToUpdate = new ArtifactDefinition(); artifactToUpdate.setMandatory(false); artifactToUpdate.setArtifactName(artifactInfoToUpdateFileName); artifactToUpdate.setArtifactType("SNMP_POLL"); artifactToUpdate.setPayload(oldPayloadData); artifactToUpdate.setArtifactChecksum(GeneralUtility.calculateMD5Base64EncodedByByteArray(oldPayloadData)); - + ArtifactDefinition artifactToDelete = new ArtifactDefinition(); artifactToDelete.setMandatory(false); artifactToDelete.setArtifactName(artifactInfoToDeleteFileName); artifactToDelete.setArtifactType("SNMP_TRAP"); artifactToDelete.setPayload(oldPayloadData); artifactToDelete.setArtifactChecksum(GeneralUtility.calculateMD5Base64EncodedByByteArray(oldPayloadData)); - + ArtifactDefinition artifactToIgnore = new ArtifactDefinition(); - - artifacts.put(ValidationUtils.normalizeArtifactLabel(artifactToUpdate.getArtifactName()), artifactToUpdate); - artifacts.put(ValidationUtils.normalizeArtifactLabel(artifactToDelete.getArtifactName()), artifactToDelete); - artifacts.put("ignore", artifactToIgnore); - + + artifacts.put(ValidationUtils.normalizeArtifactLabel(artifactToUpdate.getArtifactName()),artifactToUpdate); + artifacts.put(ValidationUtils.normalizeArtifactLabel(artifactToDelete.getArtifactName()),artifactToDelete); + artifacts.put("ignore",artifactToIgnore); + resource.setDeploymentArtifacts(deploymentArtifacts); resource.setArtifacts(artifacts); - + List artifactPathAndNameList = new ArrayList<>(); - NonMetaArtifactInfo deploymentArtifactInfoToUpdate = new NonMetaArtifactInfo( - deploymentArtifactToUpdate.getArtifactName(), null, - ArtifactTypeEnum.findType(deploymentArtifactToUpdate.getArtifactType()), - ArtifactGroupTypeEnum.DEPLOYMENT, newPayloadData, deploymentArtifactToUpdate.getArtifactName()); - - NonMetaArtifactInfo informationalArtifactInfoToUpdate = new NonMetaArtifactInfo( - artifactToUpdate.getArtifactName(), null, ArtifactTypeEnum.findType(artifactToUpdate.getArtifactType()), - ArtifactGroupTypeEnum.DEPLOYMENT, newPayloadData, artifactToUpdate.getArtifactName()); - - NonMetaArtifactInfo deploymentArtifactInfoToCreate = new NonMetaArtifactInfo(deploymentArtifactToCreateFileName, - null, ArtifactTypeEnum.OTHER, ArtifactGroupTypeEnum.DEPLOYMENT, newPayloadData, - deploymentArtifactToCreateFileName); - - NonMetaArtifactInfo informationalArtifactInfoToCreate = new NonMetaArtifactInfo(artifactInfoToCreateFileName, - null, ArtifactTypeEnum.OTHER, ArtifactGroupTypeEnum.DEPLOYMENT, newPayloadData, - artifactInfoToCreateFileName); - + NonMetaArtifactInfo deploymentArtifactInfoToUpdate = new NonMetaArtifactInfo(deploymentArtifactToUpdate.getArtifactName(), null, + ArtifactTypeEnum.findType(deploymentArtifactToUpdate.getArtifactType()), ArtifactGroupTypeEnum.DEPLOYMENT, + newPayloadData, deploymentArtifactToUpdate.getArtifactName()); + + NonMetaArtifactInfo informationalArtifactInfoToUpdate = new NonMetaArtifactInfo(artifactToUpdate.getArtifactName(), null, + ArtifactTypeEnum.findType(artifactToUpdate.getArtifactType()), ArtifactGroupTypeEnum.DEPLOYMENT, + newPayloadData, artifactToUpdate.getArtifactName()); + + NonMetaArtifactInfo deploymentArtifactInfoToCreate = new NonMetaArtifactInfo(deploymentArtifactToCreateFileName, null, + ArtifactTypeEnum.OTHER, ArtifactGroupTypeEnum.DEPLOYMENT, newPayloadData, deploymentArtifactToCreateFileName); + + NonMetaArtifactInfo informationalArtifactInfoToCreate = new NonMetaArtifactInfo(artifactInfoToCreateFileName, null, + ArtifactTypeEnum.OTHER, ArtifactGroupTypeEnum.DEPLOYMENT, + newPayloadData, artifactInfoToCreateFileName); + artifactPathAndNameList.add(deploymentArtifactInfoToUpdate); artifactPathAndNameList.add(informationalArtifactInfoToUpdate); artifactPathAndNameList.add(deploymentArtifactInfoToCreate); artifactPathAndNameList.add(informationalArtifactInfoToCreate); - - Object[] argObjects = { resource, artifactPathAndNameList, user }; - Class[] argClasses = { Resource.class, List.class, User.class }; - try { - Method method = targetClass.getDeclaredMethod(methodName, argClasses); - method.setAccessible(true); - Either>, ResponseFormat> findVfCsarArtifactsToHandleRes = (Either>, ResponseFormat>) method - .invoke(bl, argObjects); - assertTrue(findVfCsarArtifactsToHandleRes.isLeft()); - EnumMap> foundVfArtifacts = findVfCsarArtifactsToHandleRes - .left().value(); - assertTrue(foundVfArtifacts.get(ArtifactOperationEnum.Create).size() == 2); - assertTrue(foundVfArtifacts.get(ArtifactOperationEnum.Update).size() == 2); - assertTrue(foundVfArtifacts.get(ArtifactOperationEnum.Create).size() == 2); - - } catch (Exception e) { - e.printStackTrace(); - } - } - - @SuppressWarnings("rawtypes") - @Test - public void testBuildNestedVfcToscaNamespace() { - - Class targetClass = ResourceBusinessLogic.class; - String methodName = "buildNestedVfcToscaNamespace"; - String nodeTypeFullName = "org.openecomp.resource.abstract.nodes.heat.FEAdd_On_Module_vLBAgentTemplate"; - String expectedNestedVfcToscaNamespace = "org.openecomp.resource.vfc.nodes.heat.FEAdd_On_Module_vLBAgentTemplate"; - Object[] argObjects = { nodeTypeFullName }; - Class[] argClasses = { String.class }; - try { - Method method = targetClass.getDeclaredMethod(methodName, argClasses); - method.setAccessible(true); - String actualNestedVfcToscaNamespace = (String) method.invoke(bl, argObjects); - assertTrue(!actualNestedVfcToscaNamespace.isEmpty()); - assertTrue(actualNestedVfcToscaNamespace.equals(expectedNestedVfcToscaNamespace)); - - } catch (Exception e) { - e.printStackTrace(); - } - } - - @SuppressWarnings("rawtypes") - @Test - public void testBuildNestedVfcToscaResourceName() { - - Class targetClass = ResourceBusinessLogic.class; - String methodName = "buildNestedVfcToscaResourceName"; - String vfResourceName = "vfname"; - String nodeTypeFullName = "org.openecomp.resource.abstract.nodes.heat.FEAdd_On_Module_vLBAgentTemplate"; - String expectedNestedVfcToscaResourceName = "org.openecomp.resource.vfc.vfname.abstract.nodes.heat.FEAdd_On_Module_vLBAgentTemplate"; - Object[] argObjects = { vfResourceName, nodeTypeFullName }; - Class[] argClasses = { String.class, String.class }; - try { - Method method = targetClass.getDeclaredMethod(methodName, argClasses); - method.setAccessible(true); - String actualNestedVfcToscaResourceName = (String) method.invoke(bl, argObjects); - assertTrue(!actualNestedVfcToscaResourceName.isEmpty()); - assertTrue(actualNestedVfcToscaResourceName.equals(expectedNestedVfcToscaResourceName)); - - } catch (Exception e) { - e.printStackTrace(); - } - } - - @SuppressWarnings("rawtypes") - @Test - public void testBuildNestedSubstituteYamlName() { - - Class targetClass = ResourceBusinessLogic.class; - String methodName = "buildNestedSubstituteYamlName"; - String nodeTypeFullName = "org.openecomp.resource.abstract.nodes.heat.FEAdd_On_Module_vLBAgentTemplate"; - String expectedNestedSubstituteYamlName = "Definitions/FEAdd_On_Module_vLBAgentTemplateServiceTemplate.yaml"; - Object[] argObjects = { nodeTypeFullName }; - Class[] argClasses = { String.class }; - try { - Method method = targetClass.getDeclaredMethod(methodName, argClasses); - method.setAccessible(true); - String actualNestedSubstituteYamlName = (String) method.invoke(bl, argObjects); - assertTrue(!actualNestedSubstituteYamlName.isEmpty()); - assertTrue(actualNestedSubstituteYamlName.equals(expectedNestedSubstituteYamlName)); - - } catch (Exception e) { - e.printStackTrace(); - } + + Object[] argObjects = {resource, artifactPathAndNameList, user}; + Class[] argClasses = {Resource.class, List.class, User.class}; + try { + Method method = targetClass.getDeclaredMethod(methodName, argClasses); + method.setAccessible(true); + Either>, ResponseFormat> findVfCsarArtifactsToHandleRes = + (Either>, ResponseFormat>) method.invoke(bl, argObjects); + assertTrue(findVfCsarArtifactsToHandleRes.isLeft()); + EnumMap> foundVfArtifacts = findVfCsarArtifactsToHandleRes.left().value(); + assertTrue(foundVfArtifacts.get(ArtifactOperationEnum.Create).size()==2); + assertTrue(foundVfArtifacts.get(ArtifactOperationEnum.Update).size()==2); + assertTrue(foundVfArtifacts.get(ArtifactOperationEnum.Create).size()==2); + + } + catch (Exception e) { + e.printStackTrace(); + } } - + @Test public void testVFGeneratedInputs() { - + Resource resource = createVF(); List inputs = resource.getInputs(); assertTrue(8 == inputs.size()); - for (InputDefinition input : inputs) { + for(InputDefinition input : inputs){ assertNotNull(input.getOwnerId()); } assertTrue(resource.getDerivedFromGenericType().equals(genericVF.getToscaResourceName())); assertTrue(resource.getDerivedFromGenericVersion().equals(genericVF.getVersion())); } - + @Test public void testVFUpdateGenericInputsToLatestOnCheckout() { - - // create a VF that is derived from generic version 1.0 - Resource resource = createVF(); + + //create a VF that is derived from generic version 1.0 + Resource resource = createVF(); // create a new generic version without properties genericVF.setVersion("2.0"); genericVF.setProperties(null); String currentDerivedFromVersion = resource.getDerivedFromGenericVersion(); List currentInputs = resource.getInputs(); - // verify previous inputs ownerId fields exist - user may not delete - // generated inputs + //verify previous inputs ownerId fields exist - user may not delete generated inputs assertTrue(8 == currentInputs.stream().filter(p -> null != p.getOwnerId()).collect(Collectors.toList()).size()); Either upgradeToLatestGeneric = bl.shouldUpgradeToLatestGeneric(resource); - // verify success + //verify success assertTrue(upgradeToLatestGeneric.isLeft()); - // verify update required and valid + //verify update required and valid assertTrue(upgradeToLatestGeneric.left().value()); - // verify version was upgraded + //verify version was upgraded assertFalse(resource.getDerivedFromGenericVersion().equals(currentDerivedFromVersion)); - // verify inputs were not deleted + //verify inputs were not deleted assertTrue(8 == resource.getInputs().size()); - // verify inputs ownerId fields were removed - user may delete/edit - // inputs - assertTrue(8 == resource.getInputs().stream().filter(p -> null == p.getOwnerId()).collect(Collectors.toList()) - .size()); + //verify inputs ownerId fields were removed - user may delete/edit inputs + assertTrue(8 == resource.getInputs().stream().filter(p -> null == p.getOwnerId()).collect(Collectors.toList()).size()); } - + + @Test public void testVFUpdateGenericInputsToLatestOnCheckoutNotPerformed() { - - // create a VF that is derived from generic version 1.0 + + //create a VF that is derived from generic version 1.0 Resource resource = createVF(); - - // add an input to the VF + + //add an input to the VF PropertyDefinition newProp = new PropertyDefinition(); newProp.setType("integer"); newProp.setName("newProp"); resource.getInputs().add(new InputDefinition(newProp)); - - // create a new generic version with a new property which has the same - // name as a user defined input on the VF with a different type + + //create a new generic version with a new property which has the same name as a user defined input on the VF with a different type genericVF.setVersion("2.0"); newProp.setType("string"); genericVF.setProperties(new ArrayList()); genericVF.getProperties().add(newProp); - + when(genericTypeBusinessLogic.fetchDerivedFromGenericType(resource)).thenReturn(Either.left(genericVF)); + when(genericTypeBusinessLogic.convertGenericTypePropertiesToInputsDefintion(genericVF.getProperties(), genericVF.getUniqueId())).thenCallRealMethod(); String currentDerivedFromVersion = resource.getDerivedFromGenericVersion(); - assertTrue(8 == resource.getInputs().stream().filter(p -> null != p.getOwnerId()).collect(Collectors.toList()) - .size()); + assertTrue(8 == resource.getInputs().stream().filter(p -> null != p.getOwnerId()).collect(Collectors.toList()).size()); Either upgradeToLatestGeneric = bl.shouldUpgradeToLatestGeneric(resource); - // verify success + //verify success assertTrue(upgradeToLatestGeneric.isLeft()); - // verify update is invalid an void + //verify update is invalid an void assertFalse(upgradeToLatestGeneric.left().value()); - // verify version was not upgraded + //verify version was not upgraded assertTrue(resource.getDerivedFromGenericVersion().equals(currentDerivedFromVersion)); - // verify inputs were not removed + //verify inputs were not removed assertTrue(9 == resource.getInputs().size()); - // verify user defined input exists - assertTrue(1 == resource.getInputs().stream().filter(p -> null == p.getOwnerId()).collect(Collectors.toList()) - .size()); - assertTrue(resource.getInputs().stream().filter(p -> null == p.getOwnerId()).findAny().get().getType() - .equals("integer")); + //verify user defined input exists + assertTrue(1 == resource.getInputs().stream().filter(p -> null == p.getOwnerId()).collect(Collectors.toList()).size()); + assertTrue(resource.getInputs().stream().filter(p -> null == p.getOwnerId()).findAny().get().getType().equals("integer")); } - + @Test public void testPNFGeneratedInputsNoGeneratedInformationalArtifacts() { - + Resource resource = createPNF(); List inputs = resource.getInputs(); assertTrue(8 == inputs.size()); - for (InputDefinition input : inputs) { + for(InputDefinition input : inputs){ assertNotNull(input.getOwnerId()); } assertTrue(resource.getDerivedFromGenericType().equals(genericPNF.getToscaResourceName())); assertTrue(resource.getDerivedFromGenericVersion().equals(genericPNF.getVersion())); assertTrue(0 == resource.getArtifacts().size()); } - + + private Resource createVF() { - + genericVF = setupGenericTypeMock(GENERIC_VF_NAME); - when(toscaOperationFacade.getLatestCertifiedNodeTypeByToscaResourceName(GENERIC_VF_NAME)) - .thenReturn(Either.left(genericVF)); + when(toscaOperationFacade.getLatestCertifiedNodeTypeByToscaResourceName(GENERIC_VF_NAME)).thenReturn(Either.left(genericVF)); Resource resource = createResourceObject(true); resource.setDerivedFrom(null); resource.setResourceType(ResourceTypeEnum.VF); when(toscaOperationFacade.createToscaComponent(resource)).thenReturn(Either.left(resource)); - Either createResponse = bl.createResource(resource, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + when(genericTypeBusinessLogic.fetchDerivedFromGenericType(resource)).thenReturn(Either.left(genericVF)); + when(genericTypeBusinessLogic.generateInputsFromGenericTypeProperties(genericVF)).thenCallRealMethod(); + when(genericTypeBusinessLogic.convertGenericTypePropertiesToInputsDefintion(genericVF.getProperties(), resource.getUniqueId())).thenCallRealMethod(); + Either createResponse = bl.createResource(resource, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isLeft()); return createResponse.left().value(); } - - private Resource createPNF() { - + + private Resource createPNF() { + genericPNF = setupGenericTypeMock(GENERIC_PNF_NAME); - when(toscaOperationFacade.getLatestCertifiedNodeTypeByToscaResourceName(GENERIC_PNF_NAME)) - .thenReturn(Either.left(genericPNF)); + when(toscaOperationFacade.getLatestCertifiedNodeTypeByToscaResourceName(GENERIC_PNF_NAME)).thenReturn(Either.left(genericPNF)); Resource resource = createResourceObject(true); resource.setDerivedFrom(null); resource.setResourceType(ResourceTypeEnum.PNF); when(toscaOperationFacade.createToscaComponent(resource)).thenReturn(Either.left(resource)); - Either createResponse = bl.createResource(resource, - AuditingActionEnum.CREATE_RESOURCE, user, null, null); + when(genericTypeBusinessLogic.fetchDerivedFromGenericType(resource)).thenReturn(Either.left(genericPNF)); + when(genericTypeBusinessLogic.generateInputsFromGenericTypeProperties(genericPNF)).thenCallRealMethod(); + when(genericTypeBusinessLogic.convertGenericTypePropertiesToInputsDefintion(genericPNF.getProperties(), resource.getUniqueId())).thenCallRealMethod(); + Either createResponse = bl.createResource(resource, AuditingActionEnum.CREATE_RESOURCE, user, null, null); assertTrue(createResponse.isLeft()); return createResponse.left().value(); } + - private Resource setupGenericTypeMock(String toscaName) { - + + private Resource setupGenericTypeMock(String toscaName) { + Resource genericType = createResourceObject(true); genericType.setVersion("1.0"); genericType.setToscaResourceName(toscaName); - String[] propNames = { "nf_function", "nf_role", "nf_naming_code", "nf_type", "nf_naming", - "availability_zone_max_count", "min_instances", "max_instances" }; - String[] propTypes = { "string", "string", "string", "string", "org.openecomp.datatypes.Naming", "integer", - "integer", "integer" }; + String[] propNames = {"nf_function", "nf_role", "nf_naming_code", "nf_type", "nf_naming", "availability_zone_max_count", "min_instances", "max_instances"}; + String[] propTypes = {"string", "string", "string", "string", "org.openecomp.datatypes.Naming", "integer", "integer", "integer"}; List genericProps = new ArrayList<>(); - for (int i = 0; i < 8; ++i) { + for(int i = 0; i < 8; ++i){ PropertyDefinition prop = new PropertyDefinition(); prop.setName(propNames[i]); prop.setType(propTypes[i]); @@ -1951,427 +1727,6 @@ public class ResourceBusinessLogicTest { return genericType; } - private ResourceBusinessLogic createTestSubject() { - return new ResourceBusinessLogic(); - } - - @Test - public void testGetCsarOperation() throws Exception { - ResourceBusinessLogic testSubject; - CsarOperation result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getCsarOperation(); - } - - @Test - public void testSetCsarOperation() throws Exception { - ResourceBusinessLogic testSubject; - CsarOperation csarOperation = null; - - // default test - testSubject = createTestSubject(); - testSubject.setCsarOperation(csarOperation); - } - - - @Test - public void testGetLifecycleBusinessLogic() throws Exception { - ResourceBusinessLogic testSubject; - LifecycleBusinessLogic result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getLifecycleBusinessLogic(); - } - - - @Test - public void testSetLifecycleManager() throws Exception { - ResourceBusinessLogic testSubject; - LifecycleBusinessLogic lifecycleBusinessLogic = null; - - // default test - testSubject = createTestSubject(); - testSubject.setLifecycleManager(lifecycleBusinessLogic); - } - - - @Test - public void testGetElementDao() throws Exception { - ResourceBusinessLogic testSubject; - IElementOperation result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getElementDao(); - } - - - @Test - public void testSetElementDao() throws Exception { - ResourceBusinessLogic testSubject; - IElementOperation elementDao = null; - - // default test - testSubject = createTestSubject(); - testSubject.setElementDao(elementDao); - } - - - @Test - public void testGetUserAdmin() throws Exception { - ResourceBusinessLogic testSubject; - IUserBusinessLogic result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getUserAdmin(); - } - - - @Test - public void testSetUserAdmin() throws Exception { - ResourceBusinessLogic testSubject; - UserBusinessLogic userAdmin = null; - - // default test - testSubject = createTestSubject(); - testSubject.setUserAdmin(userAdmin); - } - - - @Test - public void testGetComponentsUtils() throws Exception { - ResourceBusinessLogic testSubject; - ComponentsUtils result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getComponentsUtils(); - } - - - @Test - public void testSetComponentsUtils() throws Exception { - ResourceBusinessLogic testSubject; - ComponentsUtils componentsUtils = null; - - // default test - testSubject = createTestSubject(); - testSubject.setComponentsUtils(componentsUtils); - } - - - @Test - public void testGetArtifactsManager() throws Exception { - ResourceBusinessLogic testSubject; - ArtifactsBusinessLogic result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getArtifactsManager(); - } - - - @Test - public void testSetArtifactsManager() throws Exception { - ResourceBusinessLogic testSubject; - ArtifactsBusinessLogic artifactsManager = null; - - // default test - testSubject = createTestSubject(); - testSubject.setArtifactsManager(artifactsManager); - } - - - @Test - public void testSetPropertyOperation() throws Exception { - ResourceBusinessLogic testSubject; - IPropertyOperation propertyOperation = null; - - // default test - testSubject = createTestSubject(); - testSubject.setPropertyOperation(propertyOperation); - } - - - @Test - public void testGetApplicationDataTypeCache() throws Exception { - ResourceBusinessLogic testSubject; - ApplicationDataTypeCache result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getApplicationDataTypeCache(); - } - - - @Test - public void testSetApplicationDataTypeCache() throws Exception { - ResourceBusinessLogic testSubject; - ApplicationDataTypeCache applicationDataTypeCache = null; - - // default test - testSubject = createTestSubject(); - testSubject.setApplicationDataTypeCache(applicationDataTypeCache); - } - - @Test - public void testSetDeploymentArtifactsPlaceHolder() throws Exception { - ResourceBusinessLogic testSubject; - Component component = new Resource() { - }; - User user = null; - - // default test - testSubject = createTestSubject(); - testSubject.setDeploymentArtifactsPlaceHolder(component, user); - } - - - - @Test - public void testValidateVendorReleaseName_1() throws Exception { - ResourceBusinessLogic testSubject; - String vendorRelease = ""; - Either result; - - // test 1 - testSubject = createTestSubject(); - vendorRelease = null; - result = testSubject.validateVendorReleaseName(vendorRelease); - Assert.assertEquals(false, result.left().value()); - - } - - - - - - - @Test - public void testGetCapabilityTypeOperation() throws Exception { - ResourceBusinessLogic testSubject; - ICapabilityTypeOperation result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getCapabilityTypeOperation(); - } - - - @Test - public void testSetCapabilityTypeOperation() throws Exception { - ResourceBusinessLogic testSubject; - ICapabilityTypeOperation capabilityTypeOperation = null; - - // default test - testSubject = createTestSubject(); - testSubject.setCapabilityTypeOperation(capabilityTypeOperation); - } - - - @Test - public void testValidatePropertiesDefaultValues() throws Exception { - ResourceBusinessLogic testSubject; - Resource resource = new Resource(); - Either result; - - // default test - testSubject = createTestSubject(); - result = testSubject.validatePropertiesDefaultValues(resource); - } - - - @Test - public void testGetComponentInstanceBL() throws Exception { - ResourceBusinessLogic testSubject; - ComponentInstanceBusinessLogic result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getComponentInstanceBL(); - } - - - - @Test - public void testGetComponentInstancesFilteredByPropertiesAndInputs() throws Exception { - ResourceBusinessLogic testSubject; - String componentId = ""; - ComponentTypeEnum componentTypeEnum = null; - String userId = ""; - String searchText = ""; - Either, ResponseFormat> result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getComponentInstancesFilteredByPropertiesAndInputs(componentId, componentTypeEnum, userId, - searchText); - } - - - - @Test - public void testGetCacheManagerOperation() throws Exception { - ResourceBusinessLogic testSubject; - ICacheMangerOperation result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getCacheManagerOperation(); - } - - - @Test - public void testSetCacheManagerOperation() throws Exception { - ResourceBusinessLogic testSubject; - ICacheMangerOperation cacheManagerOperation = null; - - // default test - testSubject = createTestSubject(); - testSubject.setCacheManagerOperation(cacheManagerOperation); - } - - - @Test - public void testGetElementDao_1() throws Exception { - ResourceBusinessLogic testSubject;IElementOperation result; - - // default test - testSubject=createTestSubject();result=testSubject.getElementDao(); - } - - - @Test - public void testGetAllCertifiedResources() throws Exception { - ResourceBusinessLogic testSubject;boolean getAbstract = false; - HighestFilterEnum highestFilter = null; - String userId = ""; - Either,ResponseFormat> result; - - // default test - } - - - @Test - public void testValidateResourceNameExists() throws Exception { - ResourceBusinessLogic testSubject;String resourceName = ""; - ResourceTypeEnum resourceTypeEnum = null; - String userId = ""; - Either,ResponseFormat> result; - - // default test - } - - - @Test - public void testCreateResource() throws Exception { - ResourceBusinessLogic testSubject;Resource resource = null; - AuditingActionEnum auditingAction = null; - User user = null; - Map csarUIPayload = null; - String payloadName = ""; - Either result; - - // test 1 - testSubject=createTestSubject();payloadName = null; - - // test 2 - testSubject=createTestSubject();payloadName = ""; - } - - - @Test - public void testValidateAndUpdateResourceFromCsar() throws Exception { - ResourceBusinessLogic testSubject;Resource resource = null; - User user = null; - Map csarUIPayload = null; - String payloadName = ""; - String resourceUniqueId = ""; - Either result; - - // test 1 - testSubject=createTestSubject();payloadName = null; - - // test 2 - testSubject=createTestSubject();payloadName = ""; - } - - - - - - - - - - - - @Test - public void testCreateResourceFromCsar() throws Exception { - ResourceBusinessLogic testSubject;Resource resource = null; - User user = null; - Either,StorageOperationStatus> csarUIPayload = null; - String csarUUID = ""; - Either result; - - // test 1 - testSubject=createTestSubject();csarUIPayload = null; - } - - - - - - - - @Test - public void testCreateResourcesFromYamlNodeTypesList() throws Exception { - ResourceBusinessLogic testSubject;String yamlName = ""; - Resource resource = null; - Map mappedToscaTemplate = null; - boolean needLock = false; - Map>> nodeTypesArtifactsToHandle = null; - List nodeTypesNewCreatedArtifacts = null; - Map nodeTypesInfo = null; - CsarInfo csarInfo = null; - Either,ResponseFormat> result; - - // default test - } - - - - - - - @Test - public void testValidateResourceCreationFromNodeType() throws Exception { - ResourceBusinessLogic testSubject;Resource resource = null; - User creator = null; - Either result; - - // default test - } - - - @Test - public void testCreateResourceFromNodeType() throws Exception { - ResourceBusinessLogic testSubject;String nodeTypeYaml = ""; - UploadResourceInfo resourceMetaData = null; - User creator = null; - boolean isInTransaction = false; - boolean needLock = false; - Map> nodeTypeArtifactsToHandle = null; - List nodeTypesNewCreatedArtifacts = null; - boolean forceCertificationAllowed = false; - CsarInfo csarInfo = null; - Either,ResponseFormat> result; - - // default test - } - + + } diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceInstanceBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceInstanceBusinessLogicTest.java index a3022330a1..581adb28df 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceInstanceBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceInstanceBusinessLogicTest.java @@ -20,7 +20,16 @@ package org.openecomp.sdc.be.components.impl; -import fj.data.Either; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + +import java.util.ArrayList; +import java.util.EnumMap; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + import org.junit.Before; import org.junit.Test; import org.mockito.InjectMocks; @@ -52,13 +61,7 @@ import org.openecomp.sdc.common.impl.ExternalConfiguration; import org.openecomp.sdc.common.impl.FSConfigurationSource; import org.openecomp.sdc.exception.ResponseFormat; -import java.util.ArrayList; -import java.util.EnumMap; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import static org.junit.Assert.*; +import fj.data.Either; public class ResourceInstanceBusinessLogicTest { @@ -141,8 +144,8 @@ public class ResourceInstanceBusinessLogicTest { StorageOperationStatus status = StorageOperationStatus.OK; Mockito.when(toscaOperationFacade.addDeploymentArtifactsToInstance(Mockito.any(String.class), Mockito.any(ComponentInstance.class), Mockito.any(Map.class))).thenReturn(status); - Mockito.when(toscaOperationFacade.addInformationalArtifactsToInstance(Mockito.any(String.class), Mockito.any(ComponentInstance.class), Mockito.any(Map.class))).thenReturn(status); - Mockito.when(toscaOperationFacade.addGroupInstancesToComponentInstance(Mockito.any(Component.class), Mockito.any(ComponentInstance.class), Mockito.any(List.class), Mockito.any(Map.class))).thenReturn(status); + Mockito.when(toscaOperationFacade.addInformationalArtifactsToInstance(Mockito.any(String.class), Mockito.any(ComponentInstance.class), Mockito.any())).thenReturn(status); + Mockito.when(toscaOperationFacade.addGroupInstancesToComponentInstance(Mockito.any(Component.class), Mockito.any(ComponentInstance.class), Mockito.any(), Mockito.any(Map.class))).thenReturn(status); } diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/generic/GenericTypeBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/generic/GenericTypeBusinessLogicTest.java new file mode 100644 index 0000000000..309689af45 --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/generic/GenericTypeBusinessLogicTest.java @@ -0,0 +1,97 @@ +package org.openecomp.sdc.be.components.impl.generic; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.when; + +import java.util.Arrays; +import java.util.List; + +import org.junit.Before; +import org.junit.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.MockitoAnnotations; +import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; +import org.openecomp.sdc.be.model.InputDefinition; +import org.openecomp.sdc.be.model.PropertyDefinition; +import org.openecomp.sdc.be.model.Resource; +import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade; +import org.openecomp.sdc.exception.ResponseFormat; + +import fj.data.Either; + +public class GenericTypeBusinessLogicTest { + + @InjectMocks + private GenericTypeBusinessLogic testInstance; + + @Mock + private ToscaOperationFacade toscaOperationFacadeMock; + + @Before + public void setUp() throws Exception { + testInstance = new GenericTypeBusinessLogic(); + MockitoAnnotations.initMocks(this); + + } + + @Test + public void fetchDerivedFromGenericType_cvfv_getGenericResourceTypeFromDerivedFrom() throws Exception { + Resource cvfc = new Resource(); + cvfc.setResourceType(ResourceTypeEnum.CVFC); + cvfc.setDerivedFrom(Arrays.asList("genericType", "someOtherType")); + Resource genericResource = new Resource(); + when(toscaOperationFacadeMock.getLatestCertifiedNodeTypeByToscaResourceName("genericType")).thenReturn(Either.left(genericResource)); + Either fetchedGenericType = testInstance.fetchDerivedFromGenericType(cvfc); + assertEquals(genericResource, fetchedGenericType.left().value()); + } + + @Test + public void fetchDerivedFromGenericType_getGenericResourceTypeFromConfiguration() throws Exception { + Resource resource = Mockito.mock(Resource.class); + when(resource.getResourceType()).thenReturn(ResourceTypeEnum.VF); + when(resource.fetchGenericTypeToscaNameFromConfig()).thenReturn("genericType"); + Resource genericResource = new Resource(); + when(toscaOperationFacadeMock.getLatestCertifiedNodeTypeByToscaResourceName("genericType")).thenReturn(Either.left(genericResource)); + Either fetchedGenericType = testInstance.fetchDerivedFromGenericType(resource); + assertEquals(genericResource, fetchedGenericType.left().value()); + } + + @Test + public void generateInputsFromGenericTypeProperties() throws Exception { + Resource genericNodeType = new Resource(); + genericNodeType.setUniqueId("genericUid"); + PropertyDefinition propertyDefinition = generatePropDefinition("prop1"); + PropertyDefinition propertyDefinition2 = generatePropDefinition("prop2"); + + genericNodeType.setProperties(Arrays.asList(propertyDefinition, propertyDefinition2)); + + List genericInputs = testInstance.generateInputsFromGenericTypeProperties(genericNodeType); + assertEquals(2, genericInputs.size()); + assertInput(genericInputs.get(0), propertyDefinition); + assertInput(genericInputs.get(1), propertyDefinition2); + } + + @Test + public void generateInputsFromGenericTypeProperties_genericHasNoProps() throws Exception { + Resource genericNodeType = new Resource(); + assertTrue(testInstance.generateInputsFromGenericTypeProperties(genericNodeType).isEmpty()); + } + + private void assertInput(InputDefinition inputDefinition, PropertyDefinition propertyDefinition) { + assertEquals(inputDefinition.getOwnerId(), "genericUid"); + assertEquals(inputDefinition.getValue(), propertyDefinition.getValue()); + assertEquals(inputDefinition.getName(), propertyDefinition.getName()); + } + + private PropertyDefinition generatePropDefinition(String name) { + PropertyDefinition propertyDefinition = new PropertyDefinition(); + propertyDefinition.setName(name); + propertyDefinition.setValue(name + "value"); + return propertyDefinition; + } + + +} \ No newline at end of file diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/lifecycle/CertificationChangeTransitionTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/lifecycle/CertificationChangeTransitionTest.java index 72c58c02f0..31c795478a 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/lifecycle/CertificationChangeTransitionTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/lifecycle/CertificationChangeTransitionTest.java @@ -22,23 +22,16 @@ package org.openecomp.sdc.be.components.lifecycle; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.when; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; -import org.mockito.Mockito; -import org.openecomp.sdc.be.components.impl.ArtifactsBusinessLogic; -import org.openecomp.sdc.be.components.lifecycle.CertificationChangeTransition; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.impl.ComponentsUtils; -import org.openecomp.sdc.be.model.Component; import org.openecomp.sdc.be.model.LifeCycleTransitionEnum; import org.openecomp.sdc.be.model.LifecycleStateEnum; import org.openecomp.sdc.be.model.Resource; import org.openecomp.sdc.be.model.User; -import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; import org.openecomp.sdc.be.user.Role; import org.openecomp.sdc.exception.ResponseFormat; @@ -51,11 +44,8 @@ public class CertificationChangeTransitionTest extends LifecycleTestBase { private CertificationChangeTransition certificationFailObj = null; private ComponentsUtils componentsUtils = new ComponentsUtils(); - private String resourceName = "myResource"; private User owner = null; - protected ArtifactsBusinessLogic artifactsManager = Mockito.mock(ArtifactsBusinessLogic.class); - Resource resource; @SuppressWarnings("unchecked") @@ -79,8 +69,7 @@ public class CertificationChangeTransitionTest extends LifecycleTestBase { owner = new User("cs0008", "Carlos", "Santana", "cs@sdc.com", "DESIGNER", null); - when(artifactsManager.deleteAllComponentArtifactsIfNotOnGraph(Mockito.anyList())).thenReturn(StorageOperationStatus.OK); - resource = createResourceObject(false); + resource = createResourceObject(); } @Test diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/lifecycle/CertificationRequestTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/lifecycle/CertificationRequestTest.java index 6bfd64be41..5530d4c0f5 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/lifecycle/CertificationRequestTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/lifecycle/CertificationRequestTest.java @@ -20,13 +20,20 @@ package org.openecomp.sdc.be.components.lifecycle; -import fj.data.Either; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.when; + +import java.util.ArrayList; +import java.util.List; + import org.apache.http.HttpStatus; import org.junit.Before; import org.junit.Test; -import org.mockito.InjectMocks; +import org.junit.runner.RunWith; +import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.MockitoAnnotations; +import org.mockito.junit.MockitoJUnitRunner; import org.openecomp.sdc.be.components.distribution.engine.ServiceDistributionArtifactsBuilder; import org.openecomp.sdc.be.components.impl.ServiceBusinessLogic; import org.openecomp.sdc.be.dao.api.ActionStatus; @@ -44,46 +51,40 @@ import org.openecomp.sdc.be.model.jsontitan.datamodel.ToscaElement; import org.openecomp.sdc.be.model.jsontitan.utils.ModelConverter; import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; import org.openecomp.sdc.be.model.operations.impl.CapabilityOperation; -import org.openecomp.sdc.be.tosca.ToscaError; import org.openecomp.sdc.be.tosca.ToscaExportHandler; -import org.openecomp.sdc.be.tosca.ToscaRepresentation; import org.openecomp.sdc.be.user.Role; import org.openecomp.sdc.exception.ResponseFormat; -import java.util.ArrayList; -import java.util.List; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.when; +import fj.data.Either; +@RunWith(MockitoJUnitRunner.Silent.class) public class CertificationRequestTest extends LifecycleTestBase { private ComponentsUtils componentsUtils = new ComponentsUtils(); + @Mock + private ServiceDistributionArtifactsBuilder serviceDistributionArtifactsBuilder; + @Mock + private ServiceBusinessLogic serviceBusinessLogic; + @Mock + private CapabilityOperation capabilityOperation; + @Mock + private ToscaExportHandler toscaExportUtils; - protected ServiceDistributionArtifactsBuilder serviceDistributionArtifactsBuilder = Mockito.mock(ServiceDistributionArtifactsBuilder.class); - protected ServiceBusinessLogic serviceBusinessLogic = Mockito.mock(ServiceBusinessLogic.class); - protected CapabilityOperation capabilityOperation = Mockito.mock(CapabilityOperation.class); - protected ToscaExportHandler toscaExportUtils = Mockito.mock(ToscaExportHandler.class); - @InjectMocks - private CertificationRequestTransition rfcObj = new CertificationRequestTransition(componentsUtils, toscaElementLifecycleOperation, serviceDistributionArtifactsBuilder, serviceBusinessLogic, capabilityOperation, toscaExportUtils, toscaOperationFacade, titanDao); + private CertificationRequestTransition rfcObj; - protected ToscaRepresentation toscaRepresentation = Mockito.mock(ToscaRepresentation.class); @Before public void setup() { - MockitoAnnotations.initMocks(this); super.setup(); - + rfcObj = new CertificationRequestTransition(componentsUtils, toscaElementLifecycleOperation, serviceDistributionArtifactsBuilder, serviceBusinessLogic, capabilityOperation, toscaExportUtils, toscaOperationFacade, titanDao); // checkout transition object - rfcObj.setLifeCycleOperation(toscaElementLifecycleOperation); +// rfcObj.setLifeCycleOperation(toscaElementLifecycleOperation); // checkoutObj.setAuditingManager(iAuditingManager); rfcObj.setConfigurationManager(configurationManager); componentsUtils.Init(); - Either either = Either.left(toscaRepresentation); - when(toscaExportUtils.exportComponent(Mockito.anyObject())).thenReturn(either); - +// Either either = Either.left(toscaRepresentation); +// when(toscaExportUtils.exportComponent(Mockito.any())).thenReturn(either); } @Test @@ -109,7 +110,7 @@ public class CertificationRequestTest extends LifecycleTestBase { @Test public void testCheckoutStateValidation() { Either changeStateResult; - Resource resource = createResourceObject(false); + Resource resource = createResourceObject(); resource.setLifecycleState(LifecycleStateEnum.NOT_CERTIFIED_CHECKIN); Either ownerResponse = rfcObj.getComponentOwner(resource, ComponentTypeEnum.RESOURCE); @@ -130,7 +131,7 @@ public class CertificationRequestTest extends LifecycleTestBase { @Test public void testAlreadyRfc() { Either changeStateResult; - Resource resource = createResourceObject(false); + Resource resource = createResourceObject(); resource.setLifecycleState(LifecycleStateEnum.READY_FOR_CERTIFICATION); Either ownerResponse = rfcObj.getComponentOwner(resource, ComponentTypeEnum.RESOURCE); @@ -146,7 +147,7 @@ public class CertificationRequestTest extends LifecycleTestBase { @Test public void testCertificationInProgress() { Either changeStateResult; - Resource resource = createResourceObject(false); + Resource resource = createResourceObject(); resource.setLifecycleState(LifecycleStateEnum.CERTIFICATION_IN_PROGRESS); Either ownerResponse = rfcObj.getComponentOwner(resource, ComponentTypeEnum.RESOURCE); @@ -162,7 +163,7 @@ public class CertificationRequestTest extends LifecycleTestBase { @Test public void testAlreadyCertified() { Either changeStateResult; - Resource resource = createResourceObject(false); + Resource resource = createResourceObject(); resource.setLifecycleState(LifecycleStateEnum.CERTIFIED); Either ownerResponse = rfcObj.getComponentOwner(resource, ComponentTypeEnum.RESOURCE); diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/lifecycle/CheckinTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/lifecycle/CheckinTest.java index 6a009d06c5..21111ef59e 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/lifecycle/CheckinTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/lifecycle/CheckinTest.java @@ -25,9 +25,7 @@ import static org.junit.Assert.assertTrue; import org.junit.Before; import org.junit.Test; -import org.openecomp.sdc.be.components.lifecycle.CheckinTransition; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.dao.jsongraph.TitanDao; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.impl.ComponentsUtils; import org.openecomp.sdc.be.model.LifecycleStateEnum; @@ -59,7 +57,7 @@ public class CheckinTest extends LifecycleTestBase { @Test public void testSimpleCheckin() { Either changeStateResult; - Resource resource = createResourceObject(false); + Resource resource = createResourceObject(); resource.setLifecycleState(LifecycleStateEnum.NOT_CERTIFIED_CHECKOUT); Either ownerResponse = checkinObj.getComponentOwner(resource, ComponentTypeEnum.RESOURCE); @@ -87,7 +85,7 @@ public class CheckinTest extends LifecycleTestBase { @Test public void testCheckinTwiceValidation() { Either changeStateResult; - Resource resource = createResourceObject(false); + Resource resource = createResourceObject(); resource.setLifecycleState(LifecycleStateEnum.NOT_CERTIFIED_CHECKIN); Either owner = checkinObj.getComponentOwner(resource, ComponentTypeEnum.RESOURCE); @@ -122,7 +120,7 @@ public class CheckinTest extends LifecycleTestBase { @Test public void testCheckoutByAnotherUserValidation() { Either changeStateResult; - Resource resource = createResourceObject(false); + Resource resource = createResourceObject(); User modifier = new User(); modifier.setUserId("modifier"); diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/lifecycle/CheckoutTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/lifecycle/CheckoutTest.java index 4a10bbfba4..1e3f6f6ce8 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/lifecycle/CheckoutTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/lifecycle/CheckoutTest.java @@ -27,7 +27,6 @@ import org.junit.Before; import org.junit.Test; import org.mockito.InjectMocks; import org.openecomp.sdc.be.components.impl.ResourceBusinessLogic; -import org.openecomp.sdc.be.components.lifecycle.CheckoutTransition; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.impl.ComponentsUtils; @@ -57,13 +56,15 @@ public class CheckoutTest extends LifecycleTestBase { checkoutObj.setLifeCycleOperation(toscaElementLifecycleOperation); checkoutObj.setConfigurationManager(configurationManager); componentsUtils.Init(); + bl.setToscaOperationFacade(toscaOperationFacade); + bl.setComponentsUtils(componentsUtils); } @Test public void testCheckoutStateValidation() { Either changeStateResult; - Resource resource = createResourceObject(false); + Resource resource = createResourceObject(); resource.setLifecycleState(LifecycleStateEnum.NOT_CERTIFIED_CHECKIN); Either ownerResponse = checkoutObj.getComponentOwner(resource, ComponentTypeEnum.RESOURCE); @@ -81,7 +82,7 @@ public class CheckoutTest extends LifecycleTestBase { @Test public void testAlreadyCheckout() { Either changeStateResult; - Resource resource = createResourceObject(false); + Resource resource = createResourceObject(); resource.setLifecycleState(LifecycleStateEnum.NOT_CERTIFIED_CHECKOUT); Either ownerResponse = checkoutObj.getComponentOwner(resource, ComponentTypeEnum.RESOURCE); @@ -99,7 +100,7 @@ public class CheckoutTest extends LifecycleTestBase { @Test public void testCertificationInProgress() { Either changeStateResult; - Resource resource = createResourceObject(false); + Resource resource = createResourceObject(); resource.setLifecycleState(LifecycleStateEnum.CERTIFICATION_IN_PROGRESS); Either ownerResponse = checkoutObj.getComponentOwner(resource, ComponentTypeEnum.RESOURCE); @@ -119,7 +120,7 @@ public class CheckoutTest extends LifecycleTestBase { @Test public void testReadyForCertification() { Either changeStateResult; - Resource resource = createResourceObject(false); + Resource resource = createResourceObject(); resource.setLifecycleState(LifecycleStateEnum.READY_FOR_CERTIFICATION); @@ -159,7 +160,7 @@ public class CheckoutTest extends LifecycleTestBase { @Test public void testRoles() { Either changeStateResult; - Resource resource = createResourceObject(false); + Resource resource = createResourceObject(); resource.setLifecycleState(LifecycleStateEnum.NOT_CERTIFIED_CHECKIN); diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/lifecycle/LifecycleTestBase.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/lifecycle/LifecycleTestBase.java index ff5c618138..bc131ff39a 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/lifecycle/LifecycleTestBase.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/lifecycle/LifecycleTestBase.java @@ -27,6 +27,7 @@ import java.util.List; import javax.servlet.ServletContext; +import org.junit.BeforeClass; import org.mockito.InjectMocks; import org.mockito.Mockito; import org.mockito.invocation.InvocationOnMock; @@ -39,7 +40,6 @@ import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.jsongraph.TitanDao; import org.openecomp.sdc.be.datatypes.components.ResourceMetadataDataDefinition; -import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; import org.openecomp.sdc.be.impl.WebAppContextWrapper; import org.openecomp.sdc.be.model.ArtifactDefinition; @@ -67,11 +67,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.context.WebApplicationContext; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; - import fj.data.Either; -import junit.framework.Assert; public class LifecycleTestBase { private static Logger log = LoggerFactory.getLogger(LifecycleTestBase.class.getName()); @@ -86,19 +82,22 @@ public class LifecycleTestBase { protected User user = null; protected Resource resourceResponse; protected Service serviceResponse; - protected ConfigurationManager configurationManager = null; + protected static ConfigurationManager configurationManager = null; protected ResponseFormatManager responseManager = null; protected TitanDao titanDao = Mockito.mock(TitanDao.class); protected ToscaOperationFacade toscaOperationFacade = Mockito.mock(ToscaOperationFacade.class); - public void setup() { - + @BeforeClass + public static void setupClass() { ExternalConfiguration.setAppName("catalog-be"); // Init Configuration String appConfigDir = "src/test/resources/config/catalog-be"; ConfigurationSource configurationSource = new FSConfigurationSource(ExternalConfiguration.getChangeListener(), appConfigDir); configurationManager = new ConfigurationManager(configurationSource); + } + + public void setup() { // Auditing iAuditingManager = new AuditingMockManager("lll"); @@ -124,7 +123,7 @@ public class LifecycleTestBase { // getCount // createResource - resourceResponse = createResourceObject(true); + resourceResponse = createResourceObject(); Either eitherComponent = Either.left(ModelConverter.convertToToscaElement(resourceResponse)); when(toscaElementLifecycleOperation.checkoutToscaElement(Mockito.any(String.class), Mockito.any(String.class), Mockito.any(String.class))) .thenAnswer(createAnswer(eitherComponent)); @@ -137,7 +136,10 @@ public class LifecycleTestBase { Either getOwnerResult = Either.left(user); when(toscaElementLifecycleOperation.getToscaElementOwner(Mockito.anyString())).thenReturn(getOwnerResult); - + + Either eitherlatestDerived = Either.right(StorageOperationStatus.OK); + when(toscaOperationFacade.shouldUpgradeToLatestDerived(Mockito.any(Resource.class))).thenReturn(eitherlatestDerived); + responseManager = ResponseFormatManager.getInstance(); } @@ -153,9 +155,10 @@ public class LifecycleTestBase { return dummy; } - protected Resource createResourceObject(boolean afterCreate) { + protected Resource createResourceObject() { Resource resource = new Resource(); resource.setName("MyResourceName"); + resource.setUniqueId("uid"); resource.addCategory("VoIP", "INfra"); resource.setDescription("My short description"); List tgs = new ArrayList(); @@ -179,6 +182,7 @@ public class LifecycleTestBase { ComponentMetadataDefinition cMetadataDataDefinition = new ComponentMetadataDefinition(rMetadataDataDefinition) ; Resource resource = new Resource(cMetadataDataDefinition); + resource.setUniqueId("rid"); resource.setName("MyResourceVFCMTName"); resource.addCategory("VoIP", "INfra"); resource.setDescription("My short description"); @@ -200,6 +204,7 @@ public class LifecycleTestBase { protected Service createServiceObject(boolean b) { Service service = new Service(); service.setName("MyServiceName"); + service.setUniqueId("sid"); service.addCategory("VoIP", null); service.setDescription("My short description"); List tgs = new ArrayList(); diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/lifecycle/UndoCheckoutTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/lifecycle/UndoCheckoutTest.java index 6761721636..11913ad31a 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/lifecycle/UndoCheckoutTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/lifecycle/UndoCheckoutTest.java @@ -25,7 +25,6 @@ import static org.junit.Assert.assertTrue; import org.junit.Before; import org.junit.Test; -import org.openecomp.sdc.be.components.lifecycle.UndoCheckoutTransition; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.impl.ComponentsUtils; @@ -58,7 +57,7 @@ public class UndoCheckoutTest extends LifecycleTestBase { @Test public void testResourceNotCheckedOutValidation() { Either changeStateResult; - Resource resource = createResourceObject(false); + Resource resource = createResourceObject(); resource.setLifecycleState(LifecycleStateEnum.NOT_CERTIFIED_CHECKIN); Either ownerResponse = undoCheckoutObj.getComponentOwner(resource, ComponentTypeEnum.RESOURCE); @@ -102,7 +101,7 @@ public class UndoCheckoutTest extends LifecycleTestBase { @Test public void testDifferentResourceOwnerValidation() { Either changeStateResult; - Resource resource = createResourceObject(false); + Resource resource = createResourceObject(); resource.setLifecycleState(LifecycleStateEnum.NOT_CERTIFIED_CHECKOUT); User modifier = new User(); diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/GlobalInputsFilteringBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/GlobalInputsFilteringBusinessLogicTest.java new file mode 100644 index 0000000000..ab2e865ae0 --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/GlobalInputsFilteringBusinessLogicTest.java @@ -0,0 +1,86 @@ +package org.openecomp.sdc.be.components.merge; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.when; + +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +import org.junit.Before; +import org.junit.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.MockitoAnnotations; +import org.openecomp.sdc.be.components.impl.generic.GenericTypeBusinessLogic; +import org.openecomp.sdc.be.components.utils.ObjectGenerator; +import org.openecomp.sdc.be.dao.api.ActionStatus; +import org.openecomp.sdc.be.impl.ComponentsUtils; +import org.openecomp.sdc.be.model.InputDefinition; +import org.openecomp.sdc.be.model.Resource; +import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade; +import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; + +import com.google.common.collect.Sets; + +import fj.data.Either; + +public class GlobalInputsFilteringBusinessLogicTest { + + private static final String GENERIC_TOSCA_TYPE = "myGenericType"; + + @InjectMocks + private GlobalInputsFilteringBusinessLogic testInstance; + + @Mock + private GenericTypeBusinessLogic genericTypeBusinessLogicMock; + + @Mock + private ToscaOperationFacade toscaOperationFacadeMock; + + @Mock + private ComponentsUtils componentsUtils; + + @Before + public void setUp() throws Exception { + MockitoAnnotations.initMocks(this); + } + + @Test + public void testFilterGlobalInputs() throws Exception { + Resource mockResource = Mockito.mock(Resource.class); + String myGenericType = GENERIC_TOSCA_TYPE; + String[] genericProperties = {"property1", "property2"}; + String[] allInputs = {"property1", "property2", "property3", "property4"}; + when(mockResource.fetchGenericTypeToscaNameFromConfig()).thenReturn(myGenericType); + when(mockResource.getInputs()).thenReturn(ObjectGenerator.buildInputs(allInputs)); + Resource genericNodeType = ObjectGenerator.buildResourceWithProperties(genericProperties); + when(toscaOperationFacadeMock.getLatestCertifiedNodeTypeByToscaResourceName(myGenericType)).thenReturn(Either.left(genericNodeType)); + when(genericTypeBusinessLogicMock.generateInputsFromGenericTypeProperties(genericNodeType)).thenReturn(ObjectGenerator.buildInputs(genericProperties)); + Either, ActionStatus> globalInputsEither = testInstance.filterGlobalInputs(mockResource); + verifyFilteredOnlyGlobalInputs(globalInputsEither, genericProperties); + } + + @Test + public void testFilterGlobalInputs_errorGettingGenericType_convertToActionStatusAndReturn() throws Exception { + Resource mockResource = Mockito.mock(Resource.class); + when(mockResource.fetchGenericTypeToscaNameFromConfig()).thenReturn(GENERIC_TOSCA_TYPE); + when(toscaOperationFacadeMock.getLatestCertifiedNodeTypeByToscaResourceName(GENERIC_TOSCA_TYPE)).thenReturn(Either.right(StorageOperationStatus.GENERAL_ERROR)); + when(componentsUtils.convertFromStorageResponse(StorageOperationStatus.GENERAL_ERROR)).thenReturn(ActionStatus.GENERAL_ERROR); + Either, ActionStatus> globalInputsEither = testInstance.filterGlobalInputs(mockResource); + assertTrue(globalInputsEither.isRight()); + assertEquals(ActionStatus.GENERAL_ERROR, globalInputsEither.right().value()); + verifyZeroInteractions(genericTypeBusinessLogicMock); + } + + private void verifyFilteredOnlyGlobalInputs(Either, ActionStatus> globalInputsEither, String[] genericProperties) { + assertTrue(globalInputsEither.isLeft()); + List globalInputs = globalInputsEither.left().value(); + assertEquals(2, globalInputs.size()); + Set actualGlobalInputNames = globalInputs.stream().map(InputDefinition::getName).collect(Collectors.toSet()); + assertEquals(Sets.newHashSet(genericProperties), actualGlobalInputNames); + } +} \ No newline at end of file diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/GlobalTypesMergeBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/GlobalTypesMergeBusinessLogicTest.java new file mode 100644 index 0000000000..a00b0b8e8a --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/GlobalTypesMergeBusinessLogicTest.java @@ -0,0 +1,62 @@ +package org.openecomp.sdc.be.components.merge; + +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.when; +import static org.openecomp.sdc.be.components.utils.ObjectGenerator.buildResourceWithInputs; + +import java.util.Arrays; +import java.util.List; + +import org.junit.Before; +import org.junit.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; +import org.openecomp.sdc.be.components.merge.input.ComponentInputsMergeBL; +import org.openecomp.sdc.be.dao.api.ActionStatus; +import org.openecomp.sdc.be.model.InputDefinition; +import org.openecomp.sdc.be.model.Resource; + +import fj.data.Either; + +public class GlobalTypesMergeBusinessLogicTest { + + @InjectMocks + private GlobalTypesMergeBusinessLogic testInstance; + + @Mock + private ComponentInputsMergeBL resourceInputsMergeBLMock; + + @Mock + private GlobalInputsFilteringBusinessLogic globalInputsFilteringBusinessLogic; + + @Before + public void setUp() throws Exception { + MockitoAnnotations.initMocks(this); + } + + @Test + public void mergeInstancePropsAndInputs_mergeOnlyNewResourceGenericGlobalTypes() { + Resource oldResource = buildResourceWithInputs("input1", "input2"); + Resource newResource = buildResourceWithInputs("input1", "input2", "global1", "global2"); + List globalInputs = Arrays.asList(newResource.getInputs().get(2), newResource.getInputs().get(3)); + when(globalInputsFilteringBusinessLogic.filterGlobalInputs(newResource)).thenReturn(Either.left(globalInputs)); + when(resourceInputsMergeBLMock.mergeComponentInputs(oldResource, newResource, globalInputs)).thenReturn(ActionStatus.OK); + ActionStatus actionStatus = testInstance.mergeResourceEntities(oldResource, newResource); + assertEquals(ActionStatus.OK, actionStatus); + + } + + @Test + public void mergeInstancePropsAndInputs_failedToFilterGlobalInputs() throws Exception { + Resource oldResource = buildResourceWithInputs("input1", "input2"); + Resource newResource = buildResourceWithInputs("input1", "input2", "global1", "global2"); + when(globalInputsFilteringBusinessLogic.filterGlobalInputs(newResource)).thenReturn(Either.right(ActionStatus.GENERAL_ERROR)); + ActionStatus actionStatus = testInstance.mergeResourceEntities(oldResource, newResource); + assertEquals(actionStatus, ActionStatus.GENERAL_ERROR); + verifyZeroInteractions(resourceInputsMergeBLMock); + } + + +} \ No newline at end of file diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/RelationsComparatorTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/RelationsComparatorTest.java new file mode 100644 index 0000000000..773b068cd7 --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/RelationsComparatorTest.java @@ -0,0 +1,112 @@ +package org.openecomp.sdc.be.components.merge; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import java.util.Arrays; + +import org.junit.Before; +import org.junit.Test; +import org.openecomp.sdc.be.components.utils.ComponentInstanceBuilder; +import org.openecomp.sdc.be.components.utils.ObjectGenerator; +import org.openecomp.sdc.be.components.utils.RelationsBuilder; +import org.openecomp.sdc.be.model.ComponentInstance; +import org.openecomp.sdc.be.model.RequirementCapabilityRelDef; +import org.openecomp.sdc.be.model.Resource; + +public class RelationsComparatorTest { + + public static final String INSTANCE1 = "instance1"; + public static final String INSTANCE2 = "instance2"; + RelationsComparator testInstance; + + private RequirementCapabilityRelDef relation1, relation2, relation3, relation4; + private ComponentInstance componentInstance1, componentInstance2; + + @Before + public void setUp() { + testInstance = new RelationsComparator(); + componentInstance1 = new ComponentInstanceBuilder().setName(INSTANCE1).setId(INSTANCE1).build(); + componentInstance2 = new ComponentInstanceBuilder().setName(INSTANCE2).setId(INSTANCE2).build(); + buildRelations(); + } + + @Test + public void isRelationsChanged_sameRelationships() throws Exception { + Resource oldResource = ObjectGenerator.buildResourceWithRelationships(relation1, relation2, relation3, relation4); + oldResource.setComponentInstances(Arrays.asList(componentInstance1, componentInstance2)); + Resource newResource = ObjectGenerator.buildResourceWithRelationships(relation4, relation3, relation1, relation2); + newResource.setComponentInstances(Arrays.asList(componentInstance1, componentInstance2)); + assertFalse(testInstance.isRelationsChanged(oldResource, newResource)); + } + + @Test + public void isRelationsChanged_notSameAmountOfRelations() { + Resource oldResource = ObjectGenerator.buildResourceWithRelationships(relation1, relation2); + oldResource.setComponentInstances(Arrays.asList(componentInstance1, componentInstance2)); + Resource newResource = ObjectGenerator.buildResourceWithRelationships(relation1, relation2, relation3); + newResource.setComponentInstances(Arrays.asList(componentInstance1, componentInstance2)); + assertTrue(testInstance.isRelationsChanged(oldResource, newResource)); + } + + @Test + public void isRelationsChanged_notSameFromNode() throws Exception { + RequirementCapabilityRelDef relation2DifType = buildRelation("2", INSTANCE1); + relation2DifType.setFromNode(INSTANCE2); + isRelationsChangedTest(relation2DifType); + } + + @Test + public void isRelationsChanged_notSameType() throws Exception { + RequirementCapabilityRelDef relation2DifType = buildRelation("2", INSTANCE1); + relation2DifType.getSingleRelationship().getRelation().getRelationship().setType("someDiffType"); + isRelationsChangedTest(relation2DifType); + } + + @Test + public void isRelationsChanged_notSameCapability() throws Exception { + RequirementCapabilityRelDef relation2DifType = buildRelation("2", INSTANCE1); + relation2DifType.getSingleRelationship().getRelation().setCapabilityUid("someDiffUid"); + isRelationsChangedTest(relation2DifType); + } + + @Test + public void isRelationsChanged_notSameReqName() throws Exception { + RequirementCapabilityRelDef relation2DifType = buildRelation("2", INSTANCE1); + relation2DifType.getSingleRelationship().getRelation().setRequirement("someDiffReq"); + isRelationsChangedTest(relation2DifType); + } + + @Test + public void isRelationsChanged_notSameToNode() throws Exception { + RequirementCapabilityRelDef relation2DifType = buildRelation("2", INSTANCE1); + relation2DifType.setToNode("someDiffNode"); + isRelationsChangedTest(relation2DifType); + } + + private void isRelationsChangedTest(RequirementCapabilityRelDef relation2DifType) { + Resource oldResource = ObjectGenerator.buildResourceWithRelationships(relation1, relation2); + oldResource.setComponentInstances(Arrays.asList(componentInstance1, componentInstance2)); + Resource newResource = ObjectGenerator.buildResourceWithRelationships(relation1, relation2DifType); + newResource.setComponentInstances(Arrays.asList(componentInstance1, componentInstance2)); + assertTrue(testInstance.isRelationsChanged(oldResource, newResource)); + } + + + private void buildRelations() { + relation1 = buildRelation("1", INSTANCE1); + relation2 = buildRelation("2", INSTANCE1); + relation3 = buildRelation("3", INSTANCE2); + relation4 = buildRelation("4", INSTANCE2); + } + + private RequirementCapabilityRelDef buildRelation(String postFix, String instance) { + return new RelationsBuilder() + .setFromNode(instance) + .setCapabilityUID("cap" + postFix) + .setRelationType("type" + postFix) + .setRequirementName("req" + postFix) + .setToNode(instance) + .build(); + } +} \ No newline at end of file diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/TopologyComparatorTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/TopologyComparatorTest.java new file mode 100644 index 0000000000..3b1ed52550 --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/TopologyComparatorTest.java @@ -0,0 +1,119 @@ +package org.openecomp.sdc.be.components.merge; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.when; + +import org.junit.Before; +import org.junit.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; +import org.openecomp.sdc.be.components.utils.ComponentInstanceBuilder; +import org.openecomp.sdc.be.components.utils.ObjectGenerator; +import org.openecomp.sdc.be.components.utils.ResourceBuilder; +import org.openecomp.sdc.be.dao.api.ActionStatus; +import org.openecomp.sdc.be.impl.ComponentsUtils; +import org.openecomp.sdc.be.model.ComponentInstance; +import org.openecomp.sdc.be.model.Resource; +import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade; +import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; + +import fj.data.Either; + +public class TopologyComparatorTest { + + @InjectMocks + private TopologyComparator testInstance; + + @Mock + private RelationsComparator relationsComparator; + + @Mock + private ToscaOperationFacade toscaOperationFacade; + + @Mock + private ComponentsUtils componentsUtils; + + @Before + public void setUp() throws Exception { + MockitoAnnotations.initMocks(this); + } + + @Test + public void compareTopologies_NotSameNumOfInstances() throws Exception { + Resource resourceWith2Instances = ObjectGenerator.buildResourceWithComponentInstance("inst1", "inst2"); + Resource resourceWith1Instances = ObjectGenerator.buildResourceWithComponentInstance("inst1"); + Resource resourceWithNoInstances = new Resource(); + assertTrue(testInstance.isTopologyChanged(resourceWithNoInstances, resourceWith2Instances).left().value()); + assertTrue(testInstance.isTopologyChanged(resourceWithNoInstances, resourceWith1Instances).left().value()); + assertTrue(testInstance.isTopologyChanged(resourceWith1Instances, resourceWith2Instances).left().value()); + } + + @Test + public void compareTopologies_notSameInstanceNames() throws Exception { + Resource resource1 = ObjectGenerator.buildResourceWithComponentInstance("inst1", "inst2"); + Resource resource2 = ObjectGenerator.buildResourceWithComponentInstance("inst1", "inst3"); + assertTrue(testInstance.isTopologyChanged(resource1, resource2).left().value()); + } + + @Test + public void compareTopologies_notSameInstanceTypes_notSameOriginInstanceTypes() throws Exception { + ComponentInstance inst1 = new ComponentInstanceBuilder().setName("inst1").setComponentUid("inst1").setToscaName("a.b.c").build(); + ComponentInstance inst2 = new ComponentInstanceBuilder().setName("inst2").setComponentUid("inst2").setToscaName("a.b.c.d").build(); + ComponentInstance inst2DiffType = new ComponentInstanceBuilder().setName("inst2").setComponentUid("inst2DiffType").setToscaName("a.b.c.d.e").build(); + Resource resource1 = ObjectGenerator.buildResourceWithComponentInstances(inst1, inst2); + Resource resource2 = ObjectGenerator.buildResourceWithComponentInstances(inst1, inst2DiffType); + Resource inst2OriginResource = new ResourceBuilder().setInvariantUUid("inst2Invariant").build(); + Resource inst2DiffTypeOriginResource = new ResourceBuilder().setInvariantUUid("inst2DiffTypeInvariant").build(); + when(toscaOperationFacade.getToscaElement(inst2.getComponentUid())).thenReturn(Either.left(inst2OriginResource)); + when(toscaOperationFacade.getToscaElement(inst2DiffType.getComponentUid())).thenReturn(Either.left(inst2DiffTypeOriginResource)); + assertTrue(testInstance.isTopologyChanged(resource1, resource2).left().value()); + } + + @Test + public void compareTopologies_notSameInstanceTypes_failToFetchOriginComponent() throws Exception { + ComponentInstance inst1 = new ComponentInstanceBuilder().setName("inst1").setComponentUid("inst1").setToscaName("a.b.c").build(); + ComponentInstance inst1DiffOriginCmpt = new ComponentInstanceBuilder().setName("inst1").setComponentUid("inst1Diff").setToscaName("a.b.c.d").build(); + Resource resource1 = ObjectGenerator.buildResourceWithComponentInstances(inst1); + Resource resource2 = ObjectGenerator.buildResourceWithComponentInstances(inst1DiffOriginCmpt); + when(toscaOperationFacade.getToscaElement(inst1.getComponentUid())).thenReturn(Either.right(StorageOperationStatus.GENERAL_ERROR)); + when(componentsUtils.convertFromStorageResponse(StorageOperationStatus.GENERAL_ERROR)).thenReturn(ActionStatus.GENERAL_ERROR); + assertEquals(ActionStatus.GENERAL_ERROR, testInstance.isTopologyChanged(resource1, resource2).right().value()); + } + + @Test + public void compareTopologies_notSameRelations() throws Exception { + ComponentInstance inst1 = new ComponentInstanceBuilder().setName("inst1").setToscaName("a.b.c").build(); + ComponentInstance inst2 = new ComponentInstanceBuilder().setName("inst2").setToscaName("a.b.c.d").build(); + Resource resource1 = ObjectGenerator.buildResourceWithComponentInstances(inst1, inst2); + Resource resource2 = ObjectGenerator.buildResourceWithComponentInstances(inst1, inst2); + when(relationsComparator.isRelationsChanged(resource1, resource2)).thenReturn(true); + assertTrue(testInstance.isTopologyChanged(resource1, resource2).left().value()); + } + + @Test + public void compareTopologies_sameInstances_sameRelations_noTopologyChange() throws Exception { + ComponentInstance inst1 = new ComponentInstanceBuilder().setName("inst1").setToscaName("a.b.c").build(); + ComponentInstance inst2 = new ComponentInstanceBuilder().setName("inst2").setToscaName("a.b.c.d").build(); + Resource resource1 = ObjectGenerator.buildResourceWithComponentInstances(inst1, inst2); + Resource resource2 = ObjectGenerator.buildResourceWithComponentInstances(inst1, inst2); + when(relationsComparator.isRelationsChanged(resource1, resource2)).thenReturn(false); + assertFalse(testInstance.isTopologyChanged(resource1, resource2).left().value()); + } + + @Test + public void compareTopologies_sameInstancesInvariant_sameRelations_noTopologyChange() throws Exception { + ComponentInstance inst1 = new ComponentInstanceBuilder().setName("inst1").setComponentUid("inst1").setToscaName("a.b.c").build(); + ComponentInstance inst2 = new ComponentInstanceBuilder().setName("inst2").setComponentUid("inst2").setToscaName("a.b.c.d").build(); + ComponentInstance inst2DiffType = new ComponentInstanceBuilder().setName("inst2").setComponentUid("inst2DiffType").setToscaName("a.b.c.d.e").build(); + Resource resource1 = ObjectGenerator.buildResourceWithComponentInstances(inst1, inst2); + Resource resource2 = ObjectGenerator.buildResourceWithComponentInstances(inst1, inst2DiffType); + Resource inst2OriginResource = new ResourceBuilder().setInvariantUUid("inst2Invariant").build(); + when(toscaOperationFacade.getToscaElement(inst2.getComponentUid())).thenReturn(Either.left(inst2OriginResource)); + when(toscaOperationFacade.getToscaElement(inst2DiffType.getComponentUid())).thenReturn(Either.left(inst2OriginResource)); + when(relationsComparator.isRelationsChanged(resource1, resource2)).thenReturn(false); + assertFalse(testInstance.isTopologyChanged(resource1, resource2).left().value()); + } +} \ No newline at end of file diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/heat/HeatEnvArtifactsMergeBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/heat/HeatEnvArtifactsMergeBusinessLogicTest.java new file mode 100644 index 0000000000..bcdd08e95b --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/heat/HeatEnvArtifactsMergeBusinessLogicTest.java @@ -0,0 +1,112 @@ +package org.openecomp.sdc.be.components.merge.heat; + +import static org.junit.Assert.assertEquals; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.stream.Stream; + +import org.junit.Before; +import org.junit.Test; +import org.openecomp.sdc.be.components.utils.ArtifactBuilder; +import org.openecomp.sdc.be.components.utils.HeatParameterBuilder; +import org.openecomp.sdc.be.datatypes.elements.HeatParameterDataDefinition; +import org.openecomp.sdc.be.model.ArtifactDefinition; +import org.openecomp.sdc.be.model.HeatParameterDefinition; + +public class HeatEnvArtifactsMergeBusinessLogicTest { + + private HeatEnvArtifactsMergeBusinessLogic testInstance; + + @Before + public void setUp() throws Exception { + testInstance = new HeatEnvArtifactsMergeBusinessLogic(); + } + + @Test + public void mergeHeatEnvParameter_diffArtifactLabel_noMerging() throws Exception { + HeatParameterDefinition newHeatParam1 = buildHeatParameterDefinition("param1", "type1", "param1NewValue"); + HeatParameterDefinition prevHeatParam1 = buildHeatParameterDefinition("param1", "type1", "param1PrevValue"); + + ArtifactDefinition oldArtifact = buildHeatArtifact("artifact1", prevHeatParam1); + ArtifactDefinition newArtifact = buildHeatArtifact("artifact2", newHeatParam1); + List mergedArtifacts = testInstance.mergeInstanceHeatEnvArtifacts(Collections.singletonList(oldArtifact), Collections.singletonList(newArtifact)); + assertEquals(0, mergedArtifacts.size()); + assertEquals("param1NewValue", newArtifact.getHeatParameters().get(0).getCurrentValue()); + } + + @Test + public void mergeHeatEnvParameter_diffHeatParamName_noMerge() throws Exception { + HeatParameterDefinition newHeatParam1 = buildHeatParameterDefinition("param1", "type1", "param1NewValue"); + HeatParameterDefinition prevHeatParam1 = buildHeatParameterDefinition("param2", "type1", "param1PrevValue"); + ArtifactDefinition oldArtifact = buildHeatArtifact("artifact1", prevHeatParam1); + ArtifactDefinition newArtifact = buildHeatArtifact("artifact1", newHeatParam1); + List mergedArtifacts = testInstance.mergeInstanceHeatEnvArtifacts(Collections.singletonList(oldArtifact), Collections.singletonList(newArtifact)); + assertEquals(0, mergedArtifacts.size()); + assertEquals("param1NewValue", newArtifact.getHeatParameters().get(0).getCurrentValue()); + } + + @Test + public void mergeHeatEnvParameter_diffHeatParamType_noMerge() throws Exception { + HeatParameterDefinition newHeatParam1 = buildHeatParameterDefinition("param1", "type1", "param1NewValue"); + HeatParameterDefinition prevHeatParam1 = buildHeatParameterDefinition("param1", "type2", "param1PrevValue"); + ArtifactDefinition oldArtifact = buildHeatArtifact("artifact1", prevHeatParam1); + ArtifactDefinition newArtifact = buildHeatArtifact("artifact1", newHeatParam1); + List mergedArtifacts = testInstance.mergeInstanceHeatEnvArtifacts(Collections.singletonList(oldArtifact), Collections.singletonList(newArtifact)); + assertEquals(0, mergedArtifacts.size()); + assertEquals("param1NewValue", newArtifact.getHeatParameters().get(0).getCurrentValue()); + } + + @Test + public void mergeHeatEnvParameter__diffOldAndNewValues_overrideNewValueWithOldValue() throws Exception { + HeatParameterDefinition newHeatParam1 = buildHeatParameterDefinition("param1", "type1", null); + HeatParameterDefinition newHeatParam2 = buildHeatParameterDefinition("param2", "type1", "param2value"); + + HeatParameterDefinition prevHeatParam1 = buildHeatParameterDefinition("param1", "type1", "param1PrevValue"); + HeatParameterDefinition prevHeatParam2 = buildHeatParameterDefinition("param2", "type1", "param2PrevValue"); + + ArtifactDefinition oldArtifact = buildHeatArtifact("artifact1", prevHeatParam1, prevHeatParam2); + ArtifactDefinition newArtifact = buildHeatArtifact("artifact1", newHeatParam1, newHeatParam2); + + List mergedArtifacts = testInstance.mergeInstanceHeatEnvArtifacts(Collections.singletonList(oldArtifact), Collections.singletonList(newArtifact)); + assertEquals(1, mergedArtifacts.size()); + List heatParameters = mergedArtifacts.get(0).getHeatParameters(); + assertEquals("param1PrevValue", heatParameters.get(0).getCurrentValue()); + assertEquals("param2PrevValue", heatParameters.get(1).getCurrentValue()); + } + + @Test + public void mergeHeatEnvParameter_multipleArtifacts() throws Exception { + HeatParameterDefinition newHeatParam1 = buildHeatParameterDefinition("param1", "type1", "param1Newvalue"); + HeatParameterDefinition newHeatParam2 = buildHeatParameterDefinition("param2", "type1", "param2Newvalue"); + HeatParameterDefinition newHeatParam3 = buildHeatParameterDefinition("param2", "type1", "param3Newvalue"); + + HeatParameterDefinition prevHeatParam1 = buildHeatParameterDefinition("param1", "type1", "param1PrevValue"); + HeatParameterDefinition prevHeatParam2 = buildHeatParameterDefinition("param2", "type1", "param2PrevValue"); + HeatParameterDefinition prevHeatParam3 = buildHeatParameterDefinition("param3", "type2", "param3PrevValue"); + + ArtifactDefinition oldArtifact1 = buildHeatArtifact("artifact1", prevHeatParam1); + ArtifactDefinition oldArtifact2 = buildHeatArtifact("artifact2", prevHeatParam2); + ArtifactDefinition oldArtifact3 = buildHeatArtifact("artifact3", prevHeatParam3); + + ArtifactDefinition newArtifact1 = buildHeatArtifact("artifact1", newHeatParam1); + ArtifactDefinition newArtifact2 = buildHeatArtifact("artifact2New", newHeatParam2); + ArtifactDefinition newArtifact3 = buildHeatArtifact("artifact3", newHeatParam3); + + List mergedArtifacts = testInstance.mergeInstanceHeatEnvArtifacts(Arrays.asList(oldArtifact1, oldArtifact2, oldArtifact3), Arrays.asList(newArtifact1, newArtifact2, newArtifact3)); + assertEquals(1, mergedArtifacts.size());//artifact 2 not merged as it has different label, artifact 3 not merged as the heat parameter has diff types + assertEquals("artifact1", mergedArtifacts.get(0).getArtifactLabel()); + } + + private HeatParameterDefinition buildHeatParameterDefinition(String name, String type, String val) { + return new HeatParameterBuilder().setName(name).setType(type).setCurrentValue(val).build(); + } + + private ArtifactDefinition buildHeatArtifact(String label, HeatParameterDefinition ... heatParameterDefinitions) { + ArtifactBuilder artifactBuilder = new ArtifactBuilder().setLabel(label); + Stream.of(heatParameterDefinitions).forEach(artifactBuilder::addHeatParam); + return artifactBuilder.build(); + } + +} \ No newline at end of file diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/input/ComponentInputsMergeBLTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/input/ComponentInputsMergeBLTest.java new file mode 100644 index 0000000000..26b6782918 --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/input/ComponentInputsMergeBLTest.java @@ -0,0 +1,94 @@ +package org.openecomp.sdc.be.components.merge.input; + +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import java.util.List; +import java.util.Map; +import java.util.function.Function; +import java.util.stream.Collectors; + +import org.apache.commons.collections.ListUtils; +import org.junit.Before; +import org.junit.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; +import org.openecomp.sdc.be.components.utils.ObjectGenerator; +import org.openecomp.sdc.be.components.utils.ResourceBuilder; +import org.openecomp.sdc.be.dao.api.ActionStatus; +import org.openecomp.sdc.be.model.InputDefinition; +import org.openecomp.sdc.be.model.Resource; +import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade; + +import fj.data.Either; + +public class ComponentInputsMergeBLTest { + + @InjectMocks + private ComponentInputsMergeBL testInstance; + + @Mock + private InputsValuesMergingBusinessLogic inputsValuesMergingBusinessLogicMock; + + @Mock + private ToscaOperationFacade toscaOperationFacade; + + @Before + public void setUp() throws Exception { + MockitoAnnotations.initMocks(this); + } + + @Test + public void mergeComponentInputs() { + Resource oldResource = new ResourceBuilder() + .addInput("input1") + .addInput("input2") + .build(); + + Resource newResource = new Resource(); + + List inputsToMerge = ObjectGenerator.buildInputs("input1", "input2", "input3"); + + when(toscaOperationFacade.updateInputsToComponent(inputsToMerge, newResource.getUniqueId())).thenReturn(Either.left(inputsToMerge)); + ActionStatus actionStatus = testInstance.mergeComponentInputs(oldResource, newResource, inputsToMerge); + assertEquals(ActionStatus.OK, actionStatus); + verifyCallToMergeComponentInputs(oldResource, inputsToMerge); + } + + @SuppressWarnings("unchecked") + @Test + public void mergeAndRedeclareComponentInputs() throws Exception { + Resource oldResource = new ResourceBuilder() + .addInput("input1") + .addInput("input2") + .build(); + + Resource newResource = ObjectGenerator.buildBasicResource(); + List inputsToMerge = ObjectGenerator.buildInputs("input1", "input2", "input3"); + List inputsToRedeclare = ObjectGenerator.buildInputs("input4"); + List expectedInputsToUpdate = ListUtils.union(inputsToMerge, inputsToRedeclare); + when(inputsValuesMergingBusinessLogicMock.getPreviouslyDeclaredInputsToMerge(oldResource, newResource)).thenReturn(inputsToRedeclare); + when(toscaOperationFacade.updateInputsToComponent(expectedInputsToUpdate, newResource.getUniqueId())).thenReturn(Either.left(inputsToMerge)); + ActionStatus actionStatus = testInstance.mergeAndRedeclareComponentInputs(oldResource, newResource, inputsToMerge); + assertEquals(ActionStatus.OK, actionStatus); + } + + @Test + public void redeclareResourceInputsForInstance() throws Exception { + List oldInputs = ObjectGenerator.buildInputs("input1", "input2"); + Resource newResource = ObjectGenerator.buildBasicResource(); + List inputsToRedeclare = ObjectGenerator.buildInputs("input1"); + when(inputsValuesMergingBusinessLogicMock.getPreviouslyDeclaredInputsToMerge(oldInputs, newResource, "inst1")).thenReturn(inputsToRedeclare); + when(toscaOperationFacade.updateInputsToComponent(inputsToRedeclare, newResource.getUniqueId())).thenReturn(Either.left(inputsToRedeclare)); + ActionStatus actionStatus = testInstance.redeclareComponentInputsForInstance(oldInputs, newResource, "inst1"); + } + + private void verifyCallToMergeComponentInputs(Resource oldResource, List inputsToMerge) { + Map oldInputsByName = oldResource.getInputs().stream().collect(Collectors.toMap(InputDefinition::getName, Function.identity())); + Map inputsToMergeByName = inputsToMerge.stream().collect(Collectors.toMap(InputDefinition::getName, Function.identity())); + verify(inputsValuesMergingBusinessLogicMock).mergeComponentInputs(oldInputsByName, inputsToMergeByName); + } + +} \ No newline at end of file diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/input/InputsValuesMergingBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/input/InputsValuesMergingBusinessLogicTest.java new file mode 100644 index 0000000000..b0124e4e44 --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/input/InputsValuesMergingBusinessLogicTest.java @@ -0,0 +1,186 @@ +package org.openecomp.sdc.be.components.merge.input; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +import org.junit.Before; +import org.junit.Test; +import org.openecomp.sdc.be.components.utils.PropertyDataDefinitionBuilder; +import org.openecomp.sdc.be.components.utils.ResourceBuilder; +import org.openecomp.sdc.be.dao.utils.MapUtil; +import org.openecomp.sdc.be.datatypes.elements.GetInputValueDataDefinition; +import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition; +import org.openecomp.sdc.be.model.ComponentInstanceInput; +import org.openecomp.sdc.be.model.ComponentInstanceProperty; +import org.openecomp.sdc.be.model.InputDefinition; +import org.openecomp.sdc.be.model.Resource; + +public class InputsValuesMergingBusinessLogicTest { + + public static final String INPUT_DEFUALT_TYPE = "string"; + public static final String INPUT1_ID = "input1"; + public static final String INPUT2_ID = "input2"; + public static final String INPUT3_ID = "input3"; + public static final String INPUT4_ID = "input4"; + private InputsValuesMergingBusinessLogic testInstance; + + @Before + public void setUp() throws Exception { + testInstance = new InputsValuesMergingBusinessLogic(); + } + + @Test + public void testMergeInputs_inputsOfDifferentType_dontCopyOldValue() throws Exception { + InputDefinition oldInput = createUserDefinedInputDefinition(INPUT1_ID, "oldVal1"); + + InputDefinition newInput = createInputDefinition(INPUT1_ID, null); + newInput.setType("int"); + + + Map updatedInputs = Collections.singletonMap(newInput.getName(), newInput); + Map oldInputs = Collections.singletonMap(oldInput.getName(), oldInput); + testInstance.mergeComponentInputs(oldInputs, updatedInputs); + + assertNull(updatedInputs.get(INPUT1_ID).getDefaultValue()); + } + + @Test + public void testMergeInputs_newInputsHaveNoValue_copyOldValues() throws Exception { + InputDefinition oldInputWithCsarDefaultValue = createInputDefinition(INPUT1_ID, "oldVal1"); + InputDefinition oldInputWithUserDefinedValue = createUserDefinedInputDefinition(INPUT2_ID, "oldVal2"); + InputDefinition oldInputNotExistOnNew = createUserDefinedInputDefinition(INPUT3_ID, null); + + InputDefinition newInput1 = createInputDefinition(INPUT1_ID, ""); + InputDefinition newInput2 = createUserDefinedInputDefinition(INPUT2_ID, null); + + Map updatedInputs = mapInputsByName(Arrays.asList(newInput1, newInput2)); + Map oldInputs = mapInputsByName(Arrays.asList(oldInputWithCsarDefaultValue, oldInputWithUserDefinedValue, oldInputNotExistOnNew)); + testInstance.mergeComponentInputs(oldInputs, updatedInputs); + + assertEquals(oldInputWithCsarDefaultValue.getDefaultValue(), updatedInputs.get(INPUT1_ID).getDefaultValue()); + assertEquals(oldInputWithUserDefinedValue.getDefaultValue(), updatedInputs.get(INPUT2_ID).getDefaultValue()); + assertNull(updatedInputs.get(INPUT3_ID)); + } + + @Test + public void testMergeInputs_newInputsHaveValue_dontOverrideNewValue() throws Exception { + InputDefinition oldInputWithCsarDefaultValue = createInputDefinition(INPUT1_ID, "oldVal1"); + InputDefinition oldInputWithUserDefinedValue = createUserDefinedInputDefinition(INPUT2_ID, "oldVal2"); + InputDefinition oldInputWithNoValue = createUserDefinedInputDefinition(INPUT3_ID, null); + + InputDefinition newInput1 = createInputDefinition(INPUT1_ID, "newVal1"); + InputDefinition newInput2 = createUserDefinedInputDefinition(INPUT2_ID, "newVal2"); + InputDefinition newInput3 = createUserDefinedInputDefinition(INPUT3_ID, "newVal3"); + InputDefinition newInput4 = createUserDefinedInputDefinition(INPUT4_ID, "newVal4"); + + Map updatedInputs = mapInputsByName(Arrays.asList(newInput1, newInput2, newInput3, newInput4)); + Map oldInputs = mapInputsByName(Arrays.asList(oldInputWithCsarDefaultValue, oldInputWithUserDefinedValue, oldInputWithNoValue)); + testInstance.mergeComponentInputs(oldInputs, updatedInputs); + + assertEquals(updatedInputs.get(INPUT1_ID).getDefaultValue(), newInput1.getDefaultValue()); + assertEquals(updatedInputs.get(INPUT2_ID).getDefaultValue(), newInput2.getDefaultValue()); + assertEquals(updatedInputs.get(INPUT3_ID).getDefaultValue(), newInput3.getDefaultValue()); + assertEquals(updatedInputs.get(INPUT4_ID).getDefaultValue(), newInput4.getDefaultValue()); + } + + @Test + public void getPrevoislyDeclaredInputsToMerge() throws Exception { + PropertyDataDefinition declaredInputProp1 = new PropertyDataDefinitionBuilder().addGetInputValue(INPUT1_ID).addGetInputValue(INPUT3_ID).setUniqueId("prevDeclaredPropId").build(); + PropertyDataDefinition declaredInputProp2 = new PropertyDataDefinitionBuilder().addGetInputValue(INPUT4_ID).setUniqueId("prevDeclaredPropId2").build(); + + Resource prevResource = new ResourceBuilder().addInput(INPUT1_ID).addInput(INPUT2_ID).addInput(INPUT3_ID).addInput(INPUT4_ID).build(); + + Resource currentResource = new ResourceBuilder() + .addInput(INPUT2_ID) + .addInstanceProperty("inst1", new ComponentInstanceProperty(declaredInputProp1)) + .addInstanceInput("inst2", new ComponentInstanceInput(declaredInputProp2)) + .build(); + + List previouslyDeclaredInputs = testInstance.getPreviouslyDeclaredInputsToMerge(prevResource, currentResource); + assertEquals(3, previouslyDeclaredInputs.size()); + + assertInput(previouslyDeclaredInputs.get(0), INPUT1_ID, declaredInputProp1.getUniqueId(), "inst1"); + assertInput(previouslyDeclaredInputs.get(1), INPUT3_ID, declaredInputProp1.getUniqueId(), "inst1"); + assertInput(previouslyDeclaredInputs.get(2), INPUT4_ID, declaredInputProp2.getUniqueId(), "inst2"); + } + + private void assertInput(InputDefinition inputDefinition, String expectedInputId, String expectedPropertyId, String expectedInstanceUniqueId) { + assertEquals(expectedInputId, inputDefinition.getUniqueId()); + assertEquals(expectedPropertyId, inputDefinition.getPropertyId()); + assertEquals(inputDefinition.getInstanceUniqueId(), expectedInstanceUniqueId); + } + + private Map mapInputsByName(List inputs) { + return MapUtil.toMap(inputs, InputDefinition::getName); + } + + private InputDefinition createInputDefinition(String name, String value) { + InputDefinition inputDef = new InputDefinition(); + inputDef.setName(name); + inputDef.setDefaultValue(value); + inputDef.setType(INPUT_DEFUALT_TYPE); + return inputDef; + } + + private InputDefinition createUserDefinedInputDefinition(String name, String value) { + InputDefinition inputDef = createInputDefinition(name, value); + inputDef.setOwnerId("owner"); + return inputDef; + } + + private void addInstanceProperty(Resource resource, ComponentInstanceProperty prop, String instanceId) { + addInstancePropDefinition(resource.getComponentInstancesProperties(), prop, instanceId); + } + + private void addInstanceInput(Resource resource, ComponentInstanceInput prop, String instanceId) { + addInstancePropDefinition(resource.getComponentInstancesInputs(), prop, instanceId); + } + + private void addInstancePropDefinition(Map> propsDefinitions, T propDef, String instanceId) { + propsDefinitions.computeIfAbsent(instanceId, id -> new ArrayList<>()).add(propDef); + } + + private Resource createResourceWithInputs(String ... inputsIds) { + Resource resource = new Resource(); + List inputs = new ArrayList<>(); + for (String inputId : inputsIds) { + InputDefinition inputDefinition = new InputDefinition(); + inputDefinition.setOwnerId("cs0008"); + inputDefinition.setUniqueId(inputId); + inputs.add(inputDefinition); + } + resource.setInputs(inputs); + return resource; + } + + + private ComponentInstanceProperty createGetInputComponentProperty(String ... declaredToInputId) { + ComponentInstanceProperty prevDeclaredProperty = new ComponentInstanceProperty(); + for (String inputId : declaredToInputId) { + addGetInputValueOnProp(inputId, prevDeclaredProperty); + } + + return prevDeclaredProperty; + } + + private void addGetInputValueOnProp(String declaredToInputId, PropertyDataDefinition declaredProperty) { + GetInputValueDataDefinition getInputDef = new GetInputValueDataDefinition(); + getInputDef.setInputId(declaredToInputId); + if (declaredProperty.getGetInputValues() == null) { + declaredProperty.setGetInputValues(new ArrayList<>()); + } + declaredProperty.getGetInputValues().add(getInputDef); + } + + private ComponentInstanceInput createGetInputComponentInstanceInput(String declaredToInputId) { + ComponentInstanceInput prevDeclaredProp = new ComponentInstanceInput(); + addGetInputValueOnProp(declaredToInputId, prevDeclaredProp); + return prevDeclaredProp; + } +} \ No newline at end of file diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceArtifactsMergeTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceArtifactsMergeTest.java new file mode 100644 index 0000000000..be16bc3621 --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceArtifactsMergeTest.java @@ -0,0 +1,88 @@ +package org.openecomp.sdc.be.components.merge.instance; + +import static junit.framework.TestCase.assertEquals; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Before; +import org.junit.Test; +import org.mockito.InjectMocks; +import org.mockito.MockitoAnnotations; +import org.openecomp.sdc.be.model.ArtifactDefinition; +import org.openecomp.sdc.be.model.Component; +import org.openecomp.sdc.be.model.ComponentInstance; +import org.openecomp.sdc.be.model.Resource; + + +public class ComponentInstanceArtifactsMergeTest { + + @InjectMocks + private ComponentInstanceArtifactsMerge testInstance; + + @Before + public void setUp() throws Exception { + MockitoAnnotations.initMocks(this); + } + + @Test + public void testDeploymentArtifactSaveData() throws Exception { + + Component containerComponent = new Resource(); + Component originComponent = buildOriginalComponentWithOneArtifact(); + ComponentInstance componentInstance = buildComponentInstanceWithTwoArtifacts(); + + DataForMergeHolder dataForMergeHolder = new DataForMergeHolder(); + testInstance.saveDataBeforeMerge(dataForMergeHolder, containerComponent, componentInstance, originComponent); + Map originalComponentDeploymentArtifactsCreatedOnTheInstance = dataForMergeHolder.getOrigComponentDeploymentArtifactsCreatedOnTheInstance(); + + assertEquals(originalComponentDeploymentArtifactsCreatedOnTheInstance.size() , 1); + assert(originalComponentDeploymentArtifactsCreatedOnTheInstance.containsKey("artifactTwo")); + } + + @Test + public void testInformationalArtifactSaveData() throws Exception { + + Component containerComponent = new Resource(); + Component originComponent = buildOriginalComponentWithOneArtifact(); + ComponentInstance componentInstance = buildComponentInstanceWithTwoArtifacts(); + + DataForMergeHolder dataForMergeHolder = new DataForMergeHolder(); + testInstance.saveDataBeforeMerge(dataForMergeHolder, containerComponent, componentInstance, originComponent); + Map originalComponentInformationalArtifactsCreatedOnTheInstance = dataForMergeHolder.getOrigComponentInformationalArtifactsCreatedOnTheInstance(); + + assertEquals(originalComponentInformationalArtifactsCreatedOnTheInstance.size() , 1); + assert(originalComponentInformationalArtifactsCreatedOnTheInstance.containsKey("artifactTwo")); + } + + private ComponentInstance buildComponentInstanceWithTwoArtifacts(){ + ArtifactDefinition artifactFromTheOriginalResource = new ArtifactDefinition(); + artifactFromTheOriginalResource.setArtifactLabel("artifactOne"); + ArtifactDefinition artifactCreatedOnTheInstance = new ArtifactDefinition(); + artifactCreatedOnTheInstance.setArtifactLabel("artifactTwo"); + + Map componentInstanceArtifacts = new HashMap<>(); + componentInstanceArtifacts.put(artifactFromTheOriginalResource.getArtifactLabel(), artifactFromTheOriginalResource); + componentInstanceArtifacts.put(artifactCreatedOnTheInstance.getArtifactLabel(), artifactCreatedOnTheInstance); + + ComponentInstance componentInstance = new ComponentInstance(); + componentInstance.setDeploymentArtifacts(componentInstanceArtifacts); + componentInstance.setArtifacts(componentInstanceArtifacts); + return componentInstance; + } + + private Component buildOriginalComponentWithOneArtifact() { + ArtifactDefinition artifactFromTheOriginalResource = new ArtifactDefinition(); + artifactFromTheOriginalResource.setArtifactLabel("artifactOne"); + + Map originComponentArtifacts = new HashMap<>(); + originComponentArtifacts.put(artifactFromTheOriginalResource.getArtifactLabel(), artifactFromTheOriginalResource); + Component originComponent = new Resource(); + originComponent.setDeploymentArtifacts(originComponentArtifacts); + originComponent.setArtifacts(originComponentArtifacts); + return originComponent; + } + + + +} \ No newline at end of file diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceDataMergingTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceDataMergingTest.java new file mode 100644 index 0000000000..c9310dc1dc --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceDataMergingTest.java @@ -0,0 +1,16 @@ +package org.openecomp.sdc.be.components.merge.instance; + +import org.junit.Test; + +/** + * Created by chaya on 9/19/2017. + */ +public class ComponentInstanceDataMergingTest { + + ComponentInstanceMergeDataBusinessLogic compInstMergeDataBL; + + @Test + public void testMergeInstanceInputs() { + //compInstMergeDataBL.mergeComponentUserOrigData(); + } +} diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceHeatEnvMergeTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceHeatEnvMergeTest.java new file mode 100644 index 0000000000..2101ea49ab --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceHeatEnvMergeTest.java @@ -0,0 +1,101 @@ +package org.openecomp.sdc.be.components.merge.instance; + +import static org.mockito.Mockito.when; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import org.junit.Before; +import org.junit.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.MockitoAnnotations; +import org.openecomp.sdc.be.components.impl.ArtifactsBusinessLogic; +import org.openecomp.sdc.be.components.merge.heat.HeatEnvArtifactsMergeBusinessLogic; +import org.openecomp.sdc.be.components.utils.ArtifactBuilder; +import org.openecomp.sdc.be.components.utils.ComponentInstanceBuilder; +import org.openecomp.sdc.be.components.utils.ResourceBuilder; +import org.openecomp.sdc.be.impl.ComponentsUtils; +import org.openecomp.sdc.be.model.ArtifactDefinition; +import org.openecomp.sdc.be.model.Resource; +import org.openecomp.sdc.be.model.User; +import org.openecomp.sdc.common.api.ArtifactGroupTypeEnum; +import org.openecomp.sdc.common.api.ArtifactTypeEnum; + +import fj.data.Either; + +public class ComponentInstanceHeatEnvMergeTest { + + @InjectMocks + private ComponentInstanceHeatEnvMerge testInstance; + + @Mock + private ArtifactsBusinessLogic artifactsBusinessLogicMock; + + @Mock + private HeatEnvArtifactsMergeBusinessLogic heatEnvArtifactsMergeBusinessLogicMock; + + @Mock + private ComponentsUtils componentsUtils; + + private static final User USER = new User(); + + @Before + public void setUp() throws Exception { + MockitoAnnotations.initMocks(this); + } + + @Test + public void mergeDataAfterCreate_mergeAndPersistArtifacts() throws Exception { + Map nodeTypeArtifactsByName = buildMapOfHeatArtifacts("artifact1", "artifact2"); + DataForMergeHolder dataHolder = new DataForMergeHolder(); + dataHolder.setOrigComponentDeploymentArtifactsCreatedOnTheInstance(nodeTypeArtifactsByName); + String instanceId = "instance1"; + Resource resource = buildResourceWithHeatArtifacts(instanceId, "heatArtifact1", "heatArtifact2"); + List mergedArtifacts = buildListOfArtifacts("artifact1, heatArtifact1"); + when(heatEnvArtifactsMergeBusinessLogicMock.mergeInstanceHeatEnvArtifacts(dataHolder.getOrigComponentInstanceHeatEnvArtifacts(), resource.safeGetComponentInstanceHeatArtifacts(instanceId))) + .thenReturn(mergedArtifacts); + expectMergedArtifactsToBePersisted(mergedArtifacts, instanceId, resource); + testInstance.mergeDataAfterCreate(USER, dataHolder, resource, instanceId); + } + + private void expectMergedArtifactsToBePersisted(List mergedArtifacts, String instanceId, Resource resource) { + for (ArtifactDefinition mergedArtifact : mergedArtifacts) { + Map json = new HashMap<>(); + when(artifactsBusinessLogicMock.buildJsonForUpdateArtifact(mergedArtifact, ArtifactGroupTypeEnum.DEPLOYMENT, null)).thenReturn(json); + ArtifactsBusinessLogic.ArtifactOperationInfo artifactUpdateOperation = artifactsBusinessLogicMock.new ArtifactOperationInfo(false, false, ArtifactsBusinessLogic.ArtifactOperationEnum.Update); + when(artifactsBusinessLogicMock.updateResourceInstanceArtifactNoContent(Mockito.eq(instanceId), Mockito.eq(resource), + Mockito.eq(USER), Mockito.eq(json), + Mockito.refEq(artifactUpdateOperation), + Mockito.isNull(ArtifactDefinition.class))) + .thenReturn(Either.left(Either.left(new ArtifactDefinition()))); + } + } + + private Resource buildResourceWithHeatArtifacts(String instanceId, String ... artifacts) { + ComponentInstanceBuilder componentInstanceBuilder = new ComponentInstanceBuilder().setId(instanceId); + for (String artifact : artifacts) { + ArtifactDefinition heatArtifact = new ArtifactBuilder().setType(ArtifactTypeEnum.HEAT_ARTIFACT.getType()).setName(artifact).build(); + componentInstanceBuilder.addDeploymentArtifact(heatArtifact); + } + return new ResourceBuilder().addComponentInstance(componentInstanceBuilder.build()).build(); + } + + private Map buildMapOfHeatArtifacts(String ... artifacts) { + Map artifactsByName = new HashMap<>(); + for (String artifact : artifacts) { + ArtifactDefinition heatArtifact = new ArtifactBuilder().setType(ArtifactTypeEnum.HEAT_ARTIFACT.getType()).setName(artifact).build(); + artifactsByName.put(artifact, heatArtifact); + } + return artifactsByName; + } + + private List buildListOfArtifacts(String ... artifacts) { + return Stream.of(artifacts).map(artifact -> new ArtifactBuilder().setName(artifact).build()).collect(Collectors.toList()); + } + +} \ No newline at end of file diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceMergeDataBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceMergeDataBusinessLogicTest.java new file mode 100644 index 0000000000..bc3efe423d --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstanceMergeDataBusinessLogicTest.java @@ -0,0 +1,115 @@ +package org.openecomp.sdc.be.components.merge.instance; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.when; + +import java.util.Arrays; + +import org.junit.Before; +import org.junit.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.MockitoAnnotations; +import org.openecomp.sdc.be.components.utils.ResourceBuilder; +import org.openecomp.sdc.be.dao.api.ActionStatus; +import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; +import org.openecomp.sdc.be.impl.ComponentsUtils; +import org.openecomp.sdc.be.model.Component; +import org.openecomp.sdc.be.model.ComponentInstance; +import org.openecomp.sdc.be.model.ComponentParametersView; +import org.openecomp.sdc.be.model.Resource; +import org.openecomp.sdc.be.model.Service; +import org.openecomp.sdc.be.model.User; +import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade; +import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; +import org.openecomp.sdc.exception.ResponseFormat; + +import fj.data.Either; + +public class ComponentInstanceMergeDataBusinessLogicTest { + + @InjectMocks + private ComponentInstanceMergeDataBusinessLogic testInstance; + + @Mock + private ToscaOperationFacade toscaOperationFacade; + + @Mock + private ComponentsUtils componentsUtils; + + @Mock + private ComponentInstanceMergeInterface componentInstanceMergeInterfaceMock1; + + @Mock + private ComponentInstanceMergeInterface componentInstanceMergeInterfaceMock2; + + @Before + public void setUp() throws Exception { + MockitoAnnotations.initMocks(this); + testInstance.setComponentInstancesMergeBLs(Arrays.asList(componentInstanceMergeInterfaceMock1, componentInstanceMergeInterfaceMock2)); + } + + @Test + public void saveAllDataBeforeDeleting_allInstanceMergeInterfacesAreCalled() throws Exception { + Component container = new Service(); + ComponentInstance instance = new ComponentInstance(); + Component instanceOriginResource = new Resource(); + DataForMergeHolder dataForMergeHolder = testInstance.saveAllDataBeforeDeleting(container, instance, instanceOriginResource); + verify(componentInstanceMergeInterfaceMock1).saveDataBeforeMerge(dataForMergeHolder, container, instance, instanceOriginResource); + verify(componentInstanceMergeInterfaceMock2).saveDataBeforeMerge(dataForMergeHolder, container, instance, instanceOriginResource); + } + + @Test + public void mergeComponentUserOrigData_allInstanceMergeInterfacesAreCalled() throws Exception { + ArgumentCaptor componentsFilterCapture = ArgumentCaptor.forClass(ComponentParametersView.class); + Service persistedService = new Service(); + User user = new User(); + DataForMergeHolder dataHolder = new DataForMergeHolder(); + when(toscaOperationFacade.getToscaElement(Mockito.eq("newContainerId"), componentsFilterCapture.capture())).thenReturn(Either.left(persistedService)); + when(componentInstanceMergeInterfaceMock1.mergeDataAfterCreate(user, dataHolder, persistedService, "instId")).thenReturn(Either.left(persistedService)); + when(componentInstanceMergeInterfaceMock2.mergeDataAfterCreate(user, dataHolder, persistedService, "instId")).thenReturn(Either.left(persistedService)); + Either mergeResult = testInstance.mergeComponentUserOrigData(user, dataHolder, new Service(), "newContainerId", "instId"); + assertEquals(persistedService, mergeResult.left().value()); + assertComponentFilter(componentsFilterCapture.getValue()); + } + + @Test + public void mergeComponentUserOrigData_failToGetPersistedComponent_doNotTryToMerge() throws Exception { + User user = new User(); + DataForMergeHolder dataHolder = new DataForMergeHolder(); + ResponseFormat rf = new ResponseFormat(); + Resource container = new ResourceBuilder().setComponentType(ComponentTypeEnum.SERVICE).build(); + when(toscaOperationFacade.getToscaElement(Mockito.eq("newContainerId"), Mockito.any(ComponentParametersView.class))).thenReturn(Either.right(StorageOperationStatus.GENERAL_ERROR)); + when(componentsUtils.convertFromStorageResponse(StorageOperationStatus.GENERAL_ERROR, ComponentTypeEnum.SERVICE)).thenReturn(ActionStatus.GENERAL_ERROR); + when(componentsUtils.getResponseFormat(ActionStatus.GENERAL_ERROR)).thenReturn(rf); + Either mergeResult = testInstance.mergeComponentUserOrigData(user, dataHolder, container, "newContainerId", "instId"); + assertEquals(rf, mergeResult.right().value()); + verifyZeroInteractions(componentInstanceMergeInterfaceMock1, componentInstanceMergeInterfaceMock2); + } + + @Test + public void mergeComponentUserOrigData_failOnOneMerge_doNotCallOtherMerge() throws Exception { + Service persistedService = new Service(); + User user = new User(); + DataForMergeHolder dataHolder = new DataForMergeHolder(); + ResponseFormat rf = new ResponseFormat(); + when(toscaOperationFacade.getToscaElement(Mockito.eq("newContainerId"), Mockito.any(ComponentParametersView.class))).thenReturn(Either.left(persistedService)); + when(componentInstanceMergeInterfaceMock1.mergeDataAfterCreate(user, dataHolder, persistedService, "instId")).thenReturn(Either.right(rf)); + Either mergeResult = testInstance.mergeComponentUserOrigData(user, dataHolder, new Service(), "newContainerId", "instId"); + assertEquals(rf, mergeResult.right().value()); + verifyZeroInteractions(componentInstanceMergeInterfaceMock2); + } + + private void assertComponentFilter(ComponentParametersView value) { + assertFalse(value.isIgnoreComponentInstances()); + assertFalse(value.isIgnoreComponentInstancesProperties()); + assertFalse(value.isIgnoreComponentInstancesInputs()); + assertFalse(value.isIgnoreArtifacts()); + } + +} \ No newline at end of file diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstancePropsAndInputsMergeTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstancePropsAndInputsMergeTest.java new file mode 100644 index 0000000000..cb3d506bfc --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/instance/ComponentInstancePropsAndInputsMergeTest.java @@ -0,0 +1,154 @@ +package org.openecomp.sdc.be.components.merge.instance; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyList; +import static org.mockito.ArgumentMatchers.anyListOf; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.when; + +import java.util.List; + +import org.junit.Before; +import org.junit.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.MockitoAnnotations; +import org.openecomp.sdc.be.components.merge.input.ComponentInputsMergeBL; +import org.openecomp.sdc.be.components.merge.property.ComponentInstanceInputsMergeBL; +import org.openecomp.sdc.be.components.merge.property.ComponentInstancePropertiesMergeBL; +import org.openecomp.sdc.be.components.utils.ObjectGenerator; +import org.openecomp.sdc.be.components.utils.ResourceBuilder; +import org.openecomp.sdc.be.dao.api.ActionStatus; +import org.openecomp.sdc.be.impl.ComponentsUtils; +import org.openecomp.sdc.be.model.Component; +import org.openecomp.sdc.be.model.ComponentInstanceInput; +import org.openecomp.sdc.be.model.ComponentInstanceProperty; +import org.openecomp.sdc.be.model.ComponentParametersView; +import org.openecomp.sdc.be.model.InputDefinition; +import org.openecomp.sdc.be.model.Resource; +import org.openecomp.sdc.be.model.Service; +import org.openecomp.sdc.be.model.User; +import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade; +import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; +import org.openecomp.sdc.exception.ResponseFormat; + +import fj.data.Either; + +public class ComponentInstancePropsAndInputsMergeTest { + + private static final String INSTANCE_ID1 = "inst1"; + private static final User USER = new User(); + + @InjectMocks + private ComponentInstancePropsAndInputsMerge testInstance; + + @Mock + private ToscaOperationFacade toscaOperationFacade; + + @Mock + private ComponentsUtils componentsUtils; + + @Mock + private ComponentInstancePropertiesMergeBL componentInstancePropertiesMergeBL; + + @Mock + private ComponentInstanceInputsMergeBL componentInstanceInputsMergeBL; + + @Mock + private ComponentInputsMergeBL componentInputsMergeBL; + + private Resource resourceToUpdate; + + private DataForMergeHolder oldDataHolder; + + @Before + public void setUp() throws Exception { + MockitoAnnotations.initMocks(this); + resourceToUpdate = new ResourceBuilder().addInstanceInput(INSTANCE_ID1, "instInput1") + .addInstanceInput(INSTANCE_ID1, "instInput2") + .addInstanceProperty(INSTANCE_ID1, "instProp1") + .addInstanceProperty(INSTANCE_ID1, "instProp2") + .addInput("input1") + .addInput("input2") + .setUniqueId("resourceId").build(); + + List oldInputs = ObjectGenerator.buildInputs("input1"); + List oldInstProps = ObjectGenerator.buildInstanceProperties("instProp1", "instProp3"); + List oldInstInputs = ObjectGenerator.buildInstanceInputs("instInput1", "instInput3"); + + oldDataHolder = new DataForMergeHolder(); + oldDataHolder.setOrigComponentInputs(oldInputs); + oldDataHolder.setOrigComponentInstanceProperties(oldInstProps); + oldDataHolder.setOrigComponentInstanceInputs(oldInstInputs); + } + + @Test + public void mergeDataAfterCreate() throws Exception { + List oldInputs = ObjectGenerator.buildInputs("input1"); + List oldInstProps = ObjectGenerator.buildInstanceProperties("instProp1", "instProp3"); + List oldInstInputs = ObjectGenerator.buildInstanceInputs("instInput1", "instInput3"); + + DataForMergeHolder dataForMergeHolder = new DataForMergeHolder(); + dataForMergeHolder.setOrigComponentInputs(oldInputs); + dataForMergeHolder.setOrigComponentInstanceProperties(oldInstProps); + dataForMergeHolder.setOrigComponentInstanceInputs(oldInstInputs); + + ArgumentCaptor parametersViewCaptor = ArgumentCaptor.forClass(ComponentParametersView.class); + + when(toscaOperationFacade.getToscaElement(Mockito.eq("resourceId"), parametersViewCaptor.capture())).thenReturn(Either.left(resourceToUpdate)); + when(componentInstanceInputsMergeBL.mergeComponentInstanceInputs(oldInstInputs, oldInputs, resourceToUpdate, INSTANCE_ID1)).thenReturn(ActionStatus.OK); + when(componentInstancePropertiesMergeBL.mergeComponentInstanceProperties(oldInstProps, oldInputs, resourceToUpdate, INSTANCE_ID1)).thenReturn(ActionStatus.OK); + when(componentInputsMergeBL.redeclareComponentInputsForInstance(oldInputs, resourceToUpdate, INSTANCE_ID1)).thenReturn(ActionStatus.OK); + Either mergeResult = testInstance.mergeDataAfterCreate(USER, dataForMergeHolder, resourceToUpdate, INSTANCE_ID1); + assertEquals(mergeResult.left().value(), resourceToUpdate); + assertComponentFilter(parametersViewCaptor.getValue()); + } + + @Test + public void mergeDataAfterCreate_failedToMergeComponentInstanceInputs() throws Exception { + ResponseFormat errorResponse = new ResponseFormat(); + when(componentsUtils.getResponseFormat(ActionStatus.GENERAL_ERROR)).thenReturn(errorResponse); + when(componentInstanceInputsMergeBL.mergeComponentInstanceInputs(anyListOf(ComponentInstanceInput.class), anyListOf(InputDefinition.class), any(Component.class), anyString())).thenReturn(ActionStatus.GENERAL_ERROR); + Either mergeResult = testInstance.mergeDataAfterCreate(USER, new DataForMergeHolder(), new Service(), "inst1"); + assertEquals(errorResponse, mergeResult.right().value()); + verifyZeroInteractions(componentInputsMergeBL, componentInstancePropertiesMergeBL, toscaOperationFacade); + } + + @Test + public void mergeDataAfterCreate_failedToMergeComponentInstProps() throws Exception { + ResponseFormat errorResponse = new ResponseFormat(); + when(componentInstanceInputsMergeBL.mergeComponentInstanceInputs(anyList(), anyList(), any(Component.class), anyString())).thenReturn(ActionStatus.OK); + when(componentInstancePropertiesMergeBL.mergeComponentInstanceProperties(anyList(), anyList(), any(Component.class), anyString())).thenReturn(ActionStatus.GENERAL_ERROR); + when(componentsUtils.getResponseFormat(ActionStatus.GENERAL_ERROR)).thenReturn(errorResponse); + Either mergeResult = testInstance.mergeDataAfterCreate(USER, new DataForMergeHolder(), new Service(), "inst1"); + assertEquals(errorResponse, mergeResult.right().value()); + verifyZeroInteractions(componentInputsMergeBL, toscaOperationFacade); + } + + @Test + public void mergeDataAfterCreate_mergeInputs_FailedToFetchResource() throws Exception { + ResponseFormat errorResponse = new ResponseFormat(); + when(componentInstanceInputsMergeBL.mergeComponentInstanceInputs(anyList(), anyList(), any(Component.class), anyString())).thenReturn(ActionStatus.OK); + when(componentInstancePropertiesMergeBL.mergeComponentInstanceProperties(anyList(), anyList(), any(Component.class), anyString())).thenReturn(ActionStatus.OK); + when(toscaOperationFacade.getToscaElement(any(), any(ComponentParametersView.class))).thenReturn(Either.right(StorageOperationStatus.GENERAL_ERROR)); + when(componentsUtils.convertFromStorageResponse(StorageOperationStatus.GENERAL_ERROR)).thenReturn(ActionStatus.GENERAL_ERROR); + when(componentsUtils.getResponseFormat(ActionStatus.GENERAL_ERROR)).thenReturn(errorResponse); + DataForMergeHolder dataHolder = new DataForMergeHolder(); + dataHolder.setOrigComponentInputs(ObjectGenerator.buildInputs("input1", "input2")); + Either mergeResult = testInstance.mergeDataAfterCreate(USER, dataHolder, new Service(), "inst1"); + assertEquals(errorResponse, mergeResult.right().value()); + verifyZeroInteractions(componentInputsMergeBL); + } + + private void assertComponentFilter(ComponentParametersView value) { + assertFalse(value.isIgnoreComponentInstances()); + assertFalse(value.isIgnoreComponentInstancesProperties()); + assertFalse(value.isIgnoreComponentInstancesInputs()); + assertFalse(value.isIgnoreArtifacts()); + } +} \ No newline at end of file diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/property/ComponentInstanceInputsMergeBLTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/property/ComponentInstanceInputsMergeBLTest.java new file mode 100644 index 0000000000..0a858c9a29 --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/property/ComponentInstanceInputsMergeBLTest.java @@ -0,0 +1,120 @@ +package org.openecomp.sdc.be.components.merge.property; + +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoMoreInteractions; +import static org.mockito.Mockito.when; + +import java.util.Collections; +import java.util.List; + +import org.junit.Before; +import org.junit.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; +import org.openecomp.sdc.be.components.utils.ComponentInstanceBuilder; +import org.openecomp.sdc.be.components.utils.ResourceBuilder; +import org.openecomp.sdc.be.dao.api.ActionStatus; +import org.openecomp.sdc.be.impl.ComponentsUtils; +import org.openecomp.sdc.be.model.ComponentInstance; +import org.openecomp.sdc.be.model.ComponentInstanceInput; +import org.openecomp.sdc.be.model.Resource; +import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade; +import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; + +import fj.data.Either; + +public class ComponentInstanceInputsMergeBLTest { + + public static final String INSTANCE1 = "instance1"; + public static final String INSTANCE2 = "instance2"; + @InjectMocks + private ComponentInstanceInputsMergeBL testInstance; + + @Mock + private DataDefinitionsValuesMergingBusinessLogic propertyValuesMergingBusinessLogic; + + @Mock + private ToscaOperationFacade toscaOperationFacade; + + @Mock + private ComponentsUtils componentsUtils; + + private Resource oldResource, newResource; + + @Before + public void setUp() throws Exception { + MockitoAnnotations.initMocks(this); + ComponentInstance instance1 = new ComponentInstanceBuilder().setId(INSTANCE1).setName(INSTANCE1).build(); + ComponentInstance instance2 = new ComponentInstanceBuilder().setId(INSTANCE2).setName(INSTANCE2).build(); + + oldResource = new ResourceBuilder() + .addInstanceInput(INSTANCE1, "property1") + .addInstanceInput(INSTANCE1, "property2") + .addInstanceInput(INSTANCE2, "property3") + .addComponentInstance(instance1) + .addComponentInstance(instance2) + .addInput("input1") + .addInput("input2").build(); + + newResource = new ResourceBuilder() + .addInstanceInput(INSTANCE1, "property11") + .addInstanceInput(INSTANCE1, "property12") + .addInstanceInput(INSTANCE2, "property13") + .addComponentInstance(instance1) + .addComponentInstance(instance2) + .addInput("input11") + .addInput("input12").build(); + } + + @Test + public void mergeInstancesInputs() throws Exception { + when(toscaOperationFacade.updateComponentInstanceInputsToComponent(newResource.getComponentInstancesInputs(), newResource.getUniqueId())).thenReturn(Either.left(Collections.emptyMap())); + ActionStatus actionStatus = testInstance.mergeComponentInstancesInputs(oldResource, newResource); + assertEquals(actionStatus, ActionStatus.OK); + verifyMergeBLCalled(oldResource, newResource); + } + + @Test + public void mergeInstancesInputs_failure() throws Exception { + when(toscaOperationFacade.updateComponentInstanceInputsToComponent(newResource.getComponentInstancesInputs(), newResource.getUniqueId())).thenReturn(Either.right(StorageOperationStatus.GENERAL_ERROR)); + when(componentsUtils.convertFromStorageResponse(StorageOperationStatus.GENERAL_ERROR)).thenReturn(ActionStatus.GENERAL_ERROR); + verifyNoMoreInteractions(toscaOperationFacade, propertyValuesMergingBusinessLogic); + ActionStatus actionStatus = testInstance.mergeComponentInstancesInputs(oldResource, newResource); + assertEquals(ActionStatus.GENERAL_ERROR, actionStatus); + } + + @Test + public void mergeInstanceProps() throws Exception { + List newInstanceInputs = newResource.safeGetComponentInstanceInput(INSTANCE1); + List oldInstInputs = oldResource.safeGetComponentInstanceInput(INSTANCE1); + when(toscaOperationFacade.updateComponentInstanceInputs(newResource, INSTANCE1, newInstanceInputs)) + .thenReturn(StorageOperationStatus.OK); + ActionStatus actionStatus = testInstance.mergeComponentInstanceInputs(oldInstInputs, oldResource.getInputs(), newResource, INSTANCE1); + assertEquals(actionStatus, ActionStatus.OK); + verify(propertyValuesMergingBusinessLogic).mergeInstanceDataDefinitions(oldInstInputs, oldResource.getInputs(), newInstanceInputs, newResource.getInputs()); + } + + @Test + public void mergeInstanceProps_failure() throws Exception { + List newInstanceInputs = newResource.safeGetComponentInstanceInput(INSTANCE1); + List oldInstInputs = oldResource.safeGetComponentInstanceInput(INSTANCE1); + when(toscaOperationFacade.updateComponentInstanceInputs(newResource, INSTANCE1, newInstanceInputs)) + .thenReturn(StorageOperationStatus.GENERAL_ERROR); + when(componentsUtils.convertFromStorageResponse(StorageOperationStatus.GENERAL_ERROR)).thenReturn(ActionStatus.GENERAL_ERROR); + ActionStatus actionStatus = testInstance.mergeComponentInstanceInputs(oldInstInputs, oldResource.getInputs(), newResource, INSTANCE1); + assertEquals(actionStatus, ActionStatus.GENERAL_ERROR); + verify(propertyValuesMergingBusinessLogic).mergeInstanceDataDefinitions(oldInstInputs, oldResource.getInputs(), newInstanceInputs, newResource.getInputs()); + } + + private void verifyMergeBLCalled(Resource oldResource, Resource newResource) { + List instance1oldInputs = oldResource.getComponentInstancesInputs().get(INSTANCE1); + List instance1newInputs = newResource.getComponentInstancesInputs().get(INSTANCE1); + List instance2oldInputs = oldResource.getComponentInstancesInputs().get(INSTANCE2); + List instance2newInputs = newResource.getComponentInstancesInputs().get(INSTANCE2); + verify(propertyValuesMergingBusinessLogic).mergeInstanceDataDefinitions(instance1oldInputs, oldResource.getInputs(), instance1newInputs, newResource.getInputs()); + verify(propertyValuesMergingBusinessLogic).mergeInstanceDataDefinitions(instance2oldInputs, oldResource.getInputs(), instance2newInputs, newResource.getInputs()); + } + +} \ No newline at end of file diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/property/ComponentInstancePropertiesMergeBLTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/property/ComponentInstancePropertiesMergeBLTest.java new file mode 100644 index 0000000000..7948ab8a3d --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/property/ComponentInstancePropertiesMergeBLTest.java @@ -0,0 +1,114 @@ +package org.openecomp.sdc.be.components.merge.property; + +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoMoreInteractions; +import static org.mockito.Mockito.when; + +import java.util.Collections; +import java.util.List; + +import org.junit.Before; +import org.junit.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; +import org.openecomp.sdc.be.components.utils.ResourceBuilder; +import org.openecomp.sdc.be.dao.api.ActionStatus; +import org.openecomp.sdc.be.impl.ComponentsUtils; +import org.openecomp.sdc.be.model.ComponentInstanceProperty; +import org.openecomp.sdc.be.model.Resource; +import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade; +import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; + +import fj.data.Either; + +public class ComponentInstancePropertiesMergeBLTest { + + private static final String INSTANCE1 = "instance1"; + private static final String INSTANCE2 = "instance2"; + + @InjectMocks + private ComponentInstancePropertiesMergeBL testInstance; + + @Mock + private DataDefinitionsValuesMergingBusinessLogic propertyValuesMergingBusinessLogic; + + @Mock + private ToscaOperationFacade toscaOperationFacade; + + @Mock + private ComponentsUtils componentsUtils; + + private Resource oldResource, newResource; + + @Before + public void setUp() throws Exception { + MockitoAnnotations.initMocks(this); + oldResource = new ResourceBuilder() + .addInstanceProperty(INSTANCE1, "property1") + .addInstanceProperty(INSTANCE1, "property2") + .addInstanceProperty(INSTANCE2, "property3") + .addInput("input1") + .addInput("input2").build(); + + newResource = new ResourceBuilder() + .addInstanceProperty(INSTANCE1, "property11") + .addInstanceProperty(INSTANCE1, "property12") + .addInstanceProperty(INSTANCE2, "property13") + .addInput("input11") + .addInput("input12").build(); + } + + @Test + public void mergeInstancesPropsAndInputs_mergeInstanceProps() throws Exception { + when(toscaOperationFacade.updateComponentInstancePropsToComponent(newResource.getComponentInstancesProperties(), newResource.getUniqueId())) + .thenReturn(Either.left(Collections.emptyMap())); + ActionStatus actionStatus = testInstance.mergeComponentInstancesProperties(oldResource, newResource); + assertEquals(actionStatus, ActionStatus.OK); + verifyMergeBLCalled(oldResource, newResource); + } + + @Test + public void mergeInstancesProps_failure() throws Exception { + when(toscaOperationFacade.updateComponentInstancePropsToComponent(newResource.getComponentInstancesProperties(), newResource.getUniqueId())) + .thenReturn(Either.right(StorageOperationStatus.GENERAL_ERROR)); + when(componentsUtils.convertFromStorageResponse(StorageOperationStatus.GENERAL_ERROR)).thenReturn(ActionStatus.GENERAL_ERROR); + verifyNoMoreInteractions(toscaOperationFacade, propertyValuesMergingBusinessLogic); + ActionStatus actionStatus = testInstance.mergeComponentInstancesProperties(oldResource, newResource); + assertEquals(ActionStatus.GENERAL_ERROR, actionStatus); + } + + @Test + public void mergeInstanceProps() throws Exception { + List newInstanceProps = newResource.safeGetComponentInstanceProperties(INSTANCE1); + List oldInstProps = oldResource.safeGetComponentInstanceProperties(INSTANCE1); + when(toscaOperationFacade.updateComponentInstanceProperties(newResource, INSTANCE1, newInstanceProps)) + .thenReturn(StorageOperationStatus.OK); + ActionStatus actionStatus = testInstance.mergeComponentInstanceProperties(oldInstProps, oldResource.getInputs(), newResource, INSTANCE1); + assertEquals(actionStatus, ActionStatus.OK); + verify(propertyValuesMergingBusinessLogic).mergeInstanceDataDefinitions(oldInstProps, oldResource.getInputs(), newInstanceProps, newResource.getInputs()); + } + + @Test + public void mergeInstanceProps_failure() throws Exception { + List newInstanceProps = newResource.safeGetComponentInstanceProperties(INSTANCE1); + List oldInstProps = oldResource.safeGetComponentInstanceProperties(INSTANCE1); + when(toscaOperationFacade.updateComponentInstanceProperties(newResource, INSTANCE1, newInstanceProps)) + .thenReturn(StorageOperationStatus.GENERAL_ERROR); + when(componentsUtils.convertFromStorageResponse(StorageOperationStatus.GENERAL_ERROR)).thenReturn(ActionStatus.GENERAL_ERROR); + ActionStatus actionStatus = testInstance.mergeComponentInstanceProperties(oldInstProps, oldResource.getInputs(), newResource, INSTANCE1); + assertEquals(actionStatus, ActionStatus.GENERAL_ERROR); + verify(propertyValuesMergingBusinessLogic).mergeInstanceDataDefinitions(oldInstProps, oldResource.getInputs(), newInstanceProps, newResource.getInputs()); + } + + private void verifyMergeBLCalled(Resource oldResource, Resource newResource) { + List instance1oldProps = oldResource.getComponentInstancesProperties().get(INSTANCE1); + List instance1newProps = newResource.getComponentInstancesProperties().get(INSTANCE1); + List instance2oldProps = oldResource.getComponentInstancesProperties().get(INSTANCE2); + List instance2newProps = newResource.getComponentInstancesProperties().get(INSTANCE2); + verify(propertyValuesMergingBusinessLogic).mergeInstanceDataDefinitions(instance1oldProps, oldResource.getInputs(), instance1newProps, newResource.getInputs()); + verify(propertyValuesMergingBusinessLogic).mergeInstanceDataDefinitions(instance2oldProps, oldResource.getInputs(), instance2newProps, newResource.getInputs()); + } + +} \ No newline at end of file diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/property/DataDefinitionsValuesMergingBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/property/DataDefinitionsValuesMergingBusinessLogicTest.java new file mode 100644 index 0000000000..8669a781b4 --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/property/DataDefinitionsValuesMergingBusinessLogicTest.java @@ -0,0 +1,122 @@ +package org.openecomp.sdc.be.components.merge.property; + +import static org.mockito.Mockito.verify; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.junit.Before; +import org.junit.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.MockitoAnnotations; +import org.openecomp.sdc.be.components.utils.PropertyDataDefinitionBuilder; +import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition; +import org.openecomp.sdc.be.model.InputDefinition; + +public class DataDefinitionsValuesMergingBusinessLogicTest { + + private static final String DEFAULT_PROP_TYPE = "string"; + + @InjectMocks + private DataDefinitionsValuesMergingBusinessLogic testInstance; + + @Mock + private PropertyDataValueMergeBusinessLogic propertyDataValueMergeBusinessLogicMock; + + @Before + public void setUp() throws Exception { + MockitoAnnotations.initMocks(this); + } + + @Test + public void mergePropDataDefinition_propertiesNotOfSameType_dontMerge() throws Exception { + PropertyDataDefinition oldProp1 = createPropertyDataDefinition("prop1", "oldVal1"); + + PropertyDataDefinition newProp1 = createPropertyDataDefinition("prop1", null); + newProp1.setType("int"); + + testInstance.mergeInstanceDataDefinitions(Collections.singletonList(oldProp1), Collections.emptyList(), Collections.singletonList(newProp1), Collections.emptyList()); + Mockito.verifyZeroInteractions(propertyDataValueMergeBusinessLogicMock); + } + + @Test + public void mergePropDataDefinition_propertiesInnerTypesNotSame_dontMerge() throws Exception { + PropertyDataDefinition oldProp1 = new PropertyDataDefinitionBuilder() + .setName("prop1") + .setType("list") + .setSchemaType("string") + .setValue("val1").build(); + + PropertyDataDefinition newProp1 = new PropertyDataDefinitionBuilder() + .setName("prop1") + .setType("list") + .setSchemaType("int") + .setValue("val1").build(); + + testInstance.mergeInstanceDataDefinitions(Collections.singletonList(oldProp1), Collections.emptyList(), Collections.singletonList(newProp1), Collections.emptyList()); + Mockito.verifyZeroInteractions(propertyDataValueMergeBusinessLogicMock); + } + + @Test + public void mergePropDataDefinition_getInputsToMerge_mergeInputsThatExistInNewVersion_mergeInputsThatDeclaredByUserInPrevVersion() throws Exception { + PropertyDataDefinition userDeclaredGetInput = createGetInputPropertyDataDefinition("prop1", "input1"); + PropertyDataDefinition nonUserDeclaredGetInput = createGetInputPropertyDataDefinition("prop2", "input2", "input3"); + + PropertyDataDefinition newProp1 = createPropertyDataDefinition("prop1", ""); + PropertyDataDefinition newProp2 = createPropertyDataDefinition("prop2", null); + + InputDefinition oldDeclaredByUserInput1 = new InputDefinition(); + oldDeclaredByUserInput1.setName("input1"); + oldDeclaredByUserInput1.setInstanceUniqueId("instanceId"); + + InputDefinition oldNotDeclaredByUserInput2 = new InputDefinition(); + oldNotDeclaredByUserInput2.setName("input2"); + + InputDefinition oldNotDeclaredByUserInput3 = new InputDefinition(); + oldNotDeclaredByUserInput3.setName("input3"); + + InputDefinition newInput3 = new InputDefinition(); + newInput3.setName("input3"); + + List oldProps = Arrays.asList(userDeclaredGetInput, nonUserDeclaredGetInput); + List newProps = Arrays.asList(newProp1, newProp2); + + List oldInputs = Arrays.asList(oldDeclaredByUserInput1, oldNotDeclaredByUserInput2, oldNotDeclaredByUserInput3); + List newInputs = Collections.singletonList(newInput3); + + testInstance.mergeInstanceDataDefinitions(oldProps, oldInputs, newProps, newInputs); + //get input prop was declared by user - ok to merge it although its input not exist (it will be added later) + verify(propertyDataValueMergeBusinessLogicMock).mergePropertyValue(userDeclaredGetInput, newProp1, Collections.singletonList("input1")); + //input 2 not exist in new version - dont merge it, input 3 exist in new version - ok to merge it + verify(propertyDataValueMergeBusinessLogicMock).mergePropertyValue(nonUserDeclaredGetInput, newProp2, Collections.singletonList("input3")); + } + + @Test + public void mergePropDataDefinition_dontMergeOldPropsIfNotExistInNewVersion() throws Exception { + PropertyDataDefinition oldProp = createPropertyDataDefinition("prop1", "oldVal1"); + PropertyDataDefinition newProp = createPropertyDataDefinition("prop2", null); + testInstance.mergeInstanceDataDefinitions(Collections.singletonList(oldProp), Collections.emptyList(), Collections.singletonList(newProp), Collections.emptyList()); + Mockito.verifyZeroInteractions(propertyDataValueMergeBusinessLogicMock); + } + + private PropertyDataDefinition createPropertyDataDefinition(String name, String value) { + return new PropertyDataDefinitionBuilder() + .setName(name) + .setType(DEFAULT_PROP_TYPE) + .setValue(value).build(); + } + + private PropertyDataDefinition createGetInputPropertyDataDefinition(String name, String ... inputsNames) { + PropertyDataDefinitionBuilder propertyBuilder = new PropertyDataDefinitionBuilder() + .setName(name) + .setType(DEFAULT_PROP_TYPE); + for (String inputName : inputsNames) { + propertyBuilder.addGetInputValue(inputName); + } + return propertyBuilder.build(); + } + +} \ No newline at end of file diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/property/PropertyDataValueMergeBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/property/PropertyDataValueMergeBusinessLogicTest.java new file mode 100644 index 0000000000..6faee487f4 --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/property/PropertyDataValueMergeBusinessLogicTest.java @@ -0,0 +1,253 @@ +package org.openecomp.sdc.be.components.merge.property; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.when; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.function.Function; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import org.junit.Before; +import org.junit.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; +import org.openecomp.sdc.be.components.utils.PropertyDataDefinitionBuilder; +import org.openecomp.sdc.be.datatypes.elements.GetInputValueDataDefinition; +import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition; +import org.openecomp.sdc.be.model.DataTypeDefinition; +import org.openecomp.sdc.be.model.PropertyDefinition; +import org.openecomp.sdc.be.model.cache.ApplicationDataTypeCache; +import org.openecomp.sdc.be.model.tosca.ToscaPropertyType; + +import fj.data.Either; + +public class PropertyDataValueMergeBusinessLogicTest { + + @InjectMocks + private PropertyDataValueMergeBusinessLogic testInstance; + + @Mock + private ApplicationDataTypeCache applicationDataTypeCache; + + @Before + public void setUp() throws Exception { + MockitoAnnotations.initMocks(this); + } + + @Test + public void mergeProperties_emptyOldAndNewValues() throws Exception { + PropertyDataDefinition oldProp = createProp("prop1", ToscaPropertyType.STRING.getType(), null, null); + PropertyDataDefinition newProp = createProp("prop1", ToscaPropertyType.STRING.getType(), null, null); + testMergeProps(oldProp, newProp, null); + } + + @Test + public void mergeProperties_emptyOldValue() throws Exception { + PropertyDataDefinition oldProp = createProp("prop1", ToscaPropertyType.STRING.getType(), null, null); + PropertyDataDefinition newProp = createProp("prop1", ToscaPropertyType.STRING.getType(), null, "newVal"); + testMergeProps(oldProp, newProp, "newVal"); + } + + @Test + public void mergeSimpleStringType_copyOldValueIfNoNewValue() throws Exception { + PropertyDataDefinition oldProp = createProp("prop1", ToscaPropertyType.STRING.getType(), null, "val1"); + PropertyDataDefinition newProp = createProp("prop1", ToscaPropertyType.STRING.getType(), null, null); + testMergeProps(oldProp, newProp, "val1"); + } + + @Test + public void mergeSimpleStringType_dontCopyOldValIfHasNewVal() throws Exception { + PropertyDataDefinition oldProp = createProp("prop1", ToscaPropertyType.STRING.getType(), null, "val1"); + PropertyDataDefinition newProp = createProp("prop1", ToscaPropertyType.STRING.getType(), null, "newVal"); + testMergeProps(oldProp, newProp, "newVal"); + } + + @Test + public void mergeSimpleIntType_copyOldValueIfNoNewValue() throws Exception { + PropertyDataDefinition oldProp = createProp("prop1", ToscaPropertyType.INTEGER.getType(), null, "44"); + PropertyDataDefinition newProp = createProp("prop1", ToscaPropertyType.STRING.getType(), null, null); + testMergeProps(oldProp, newProp, "44"); + } + + @Test + public void mergeSimpleIntType_dontCopyOldValIfHasNewVal() throws Exception { + PropertyDataDefinition oldProp = createProp("prop1", ToscaPropertyType.INTEGER.getType(), null, "44"); + PropertyDataDefinition newProp = createProp("prop1", ToscaPropertyType.STRING.getType(), null, "45"); + testMergeProps(oldProp, newProp, "45"); + } + + @Test + public void mergeSimpleBooleanType_copyOldValueIfNoNewValue() throws Exception { + PropertyDataDefinition oldProp = createProp("prop1", ToscaPropertyType.BOOLEAN.getType(), null, "false"); + PropertyDataDefinition newProp = createProp("prop1", ToscaPropertyType.BOOLEAN.getType(), null, null); + testMergeProps(oldProp, newProp, "false"); + } + + @Test + public void mergeSimpleBooleanType_dontCopyOldValIfHasNewVal() throws Exception { + PropertyDataDefinition oldProp = createProp("prop1", ToscaPropertyType.BOOLEAN.getType(), null, "false"); + PropertyDataDefinition newProp = createProp("prop1", ToscaPropertyType.BOOLEAN.getType(), null, "true"); + testMergeProps(oldProp, newProp, "true"); + } + + @Test + public void mergeSimpleListType_copyOldValuesByIndex() throws Exception { + PropertyDataDefinition oldProp = createProp("prop1", ToscaPropertyType.LIST.getType(), "string", "[\"a\", \"b\", \"c\"]"); + PropertyDataDefinition newProp = createProp("prop1", ToscaPropertyType.LIST.getType(), "string", "[\"x\", \"\"]"); + testMergeProps(oldProp, newProp, "[\"x\",\"b\",\"c\"]"); + } + + @Test + public void mergeSimpleListType_jsonList() throws Exception { + PropertyDataDefinition oldProp = createProp("prop1", ToscaPropertyType.LIST.getType(), "json", "[[\"a\", \"b\"], \"c\"]"); + PropertyDataDefinition newProp = createProp("prop1", ToscaPropertyType.LIST.getType(), "json", "[[\"a\"], \"\"]"); + testMergeProps(oldProp, newProp, "[[\"a\"],\"c\"]"); + } + + @Test + public void mergeComplexType() throws Exception { + PropertyDataDefinition oldProp = createProp("prop1", "myType", null, "{\"mac_range_plan\":\"y\", \"mac_count_required\":{\"is_required\":true,\"count\":44}}"); + PropertyDataDefinition newProp = createProp("prop1", "myType", null, "{\"mac_count_required\":{\"is_required\":false, \"mac_address\":\"myAddress\"}}"); + testMergeProps(oldProp, newProp, "{\"mac_range_plan\":\"y\",\"mac_count_required\":{\"is_required\":false,\"mac_address\":\"myAddress\",\"count\":44}}"); + } + + @Test + public void mergeListOfComplexType() throws Exception { + PropertyDataDefinition oldProp = createProp("prop1", "list", "myType", "[{\"prop1\":\"val1\", \"prop2\":{\"prop3\":true,\"prop4\":44}}, " + + "{\"prop1\":\"val2\", \"prop2\":{\"prop3\":true}}]"); + PropertyDataDefinition newProp = createProp("prop1", "list", "myType", "[{\"prop2\":{\"prop3\":false}}]"); + + Map dataTypes = buildDataTypes(); + when(applicationDataTypeCache.getAll()).thenReturn(Either.left(dataTypes)); + testInstance.mergePropertyValue(oldProp, newProp, Collections.emptyList()); + String expectedValue = "[{\"prop2\":{\"prop4\":44,\"prop3\":false},\"prop1\":\"\\\"val1\\\"\"}," + + "{\"prop2\":{\"prop3\":true},\"prop1\":\"\\\"val2\\\"\"}]"; + + assertEquals(expectedValue, newProp.getValue()); + } + + @Test + public void mergeMapType() throws Exception { + PropertyDataDefinition oldProp = createProp("prop1", "map", "string", "{\"prop1\":\"val1\", \"prop2\":\"val2\", \"prop3\":\"val3\"}"); + PropertyDataDefinition newProp = createProp("prop1", "map", "string", "{\"prop1\":\"newVal1\", \"prop2\":\"\"}"); + testMergeProps(oldProp, newProp, "{\"prop2\":\"val2\",\"prop1\":\"newVal1\",\"prop3\":\"val3\"}"); + } + + @Test + public void mergeGetInputValue() throws Exception { + PropertyDataDefinition oldProp = createGetInputProp("prop1", "string", null, "input1"); + PropertyDataDefinition newProp = createProp("prop1", "string", null, null); + testMergeProps(oldProp, newProp, oldProp.getValue(), Collections.singletonList("input1")); + assertGetInputValues(newProp, "input1"); + } + + @Test + public void mergeGetInputValue_inputNotForMerging() throws Exception { + PropertyDataDefinition oldProp = createGetInputProp("prop1", "string", null, "input1"); + PropertyDataDefinition newProp = createProp("prop1", "string", null, null); + testMergeProps(oldProp, newProp,null, Collections.singletonList("input2")); + assertTrue(newProp.getGetInputValues().isEmpty()); + } + + @Test + public void mergeComplexGetInputValue_moreThanOneGetInput_copyOnlyInputsForMerging() throws Exception { + PropertyDataDefinition oldProp = new PropertyDataDefinitionBuilder().addGetInputValue("input1").addGetInputValue("input2").setName("prop1").setType("myType").setValue("{\"mac_range_plan\":{\"get_input\": \"input1\"}, \"mac_count_required\":{\"is_required\":true,\"count\":{\"get_input\": \"input2\"}}}").build(); + PropertyDataDefinition newProp = createProp("prop1", "myType", null, "{\"mac_count_required\":{\"is_required\":true}}"); + testMergeProps(oldProp, newProp,"{\"mac_range_plan\":{},\"mac_count_required\":{\"is_required\":true,\"count\":{\"get_input\":\"input2\"}}}", Collections.singletonList("input2")); + assertGetInputValues(newProp, "input2"); + } + + @Test + public void mergeListValueWithMultipleGetInputs() throws Exception { + PropertyDataDefinition oldProp = new PropertyDataDefinitionBuilder() + .addGetInputValue("input1").addGetInputValue("input2").addGetInputValue("input3") + .setName("prop1") + .setType("list").setSchemaType("string") + .setValue("[{\"get_input\": \"input2\"},{\"get_input\": \"input3\"},{\"get_input\": \"input1\"}]") + .build(); + + PropertyDataDefinition newProp = new PropertyDataDefinitionBuilder() + .addGetInputValue("input3") + .setName("prop1") + .setType("list").setSchemaType("string") + .setValue("[\"\", {\"get_input\": \"input3\"}]") + .build(); + + testMergeProps(oldProp, newProp,"[{},{\"get_input\":\"input3\"},{\"get_input\":\"input1\"}]", Arrays.asList("input3", "input1")); + assertGetInputValues(newProp, "input3", "input1"); + } + + private void assertGetInputValues(PropertyDataDefinition newProp, String ... expectedInputNames) { + assertTrue(newProp.isGetInputProperty()); + assertEquals(newProp.getGetInputValues().size(), expectedInputNames.length); + for (int i = 0; i < expectedInputNames.length; i++) { + String expectedInputName = expectedInputNames[i]; + GetInputValueDataDefinition getInputValueDataDefinition = newProp.getGetInputValues().get(i); + assertEquals(getInputValueDataDefinition.getInputName(), expectedInputName); + } + } + + private void testMergeProps(PropertyDataDefinition oldProp, PropertyDataDefinition newProp, String expectedValue) { + testMergeProps(oldProp, newProp, expectedValue, Collections.emptyList()); + } + + private void testMergeProps(PropertyDataDefinition oldProp, PropertyDataDefinition newProp, String expectedValue, List getInputsToMerge) { + when(applicationDataTypeCache.getAll()).thenReturn(Either.left(Collections.emptyMap())); + testInstance.mergePropertyValue(oldProp, newProp, getInputsToMerge); + assertEquals(expectedValue, newProp.getValue()); + } + + private PropertyDataDefinition createProp(String name, String type, String innerType, String val) { + return new PropertyDataDefinitionBuilder() + .setType(type) + .setSchemaType(innerType) + .setValue(val) + .setName(name) + .build(); + } + + private PropertyDataDefinition createGetInputProp(String name, String type, String innerType, String inputName) { + String val = String.format("{\"get_input\":\"%s\"}", inputName); + return new PropertyDataDefinitionBuilder() + .setType(type) + .setSchemaType(innerType) + .setValue(val) + .addGetInputValue(inputName) + .setName(name) + .build(); + + } + + private Map buildDataTypes() { + DataTypeDefinition myType = new DataTypeDefinition(); + myType.setName("myType"); + DataTypeDefinition myInnerType = new DataTypeDefinition(); + myInnerType.setName("myInnerType"); + + PropertyDefinition prop1 = new PropertyDefinition(); + prop1.setName("prop1"); + + PropertyDefinition prop2 = new PropertyDefinition(); + prop2.setName("prop2"); + prop2.setType("myInnerType"); + + PropertyDefinition prop3 = new PropertyDefinition(); + prop3.setName("prop3"); + + PropertyDefinition prop4 = new PropertyDefinition(); + prop4.setName("prop4"); + + myType.setProperties(Arrays.asList(prop1, prop2)); + myInnerType.setProperties(Arrays.asList(prop3, prop4)); + + return Stream.of(myType, myInnerType).collect(Collectors.toMap(DataTypeDefinition::getName, Function.identity())); + } + + +} \ No newline at end of file diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/resource/ResourceDataMergeBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/resource/ResourceDataMergeBusinessLogicTest.java new file mode 100644 index 0000000000..8e7949f108 --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/resource/ResourceDataMergeBusinessLogicTest.java @@ -0,0 +1,82 @@ +package org.openecomp.sdc.be.components.merge.resource; + +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.when; + +import java.util.Collections; + +import org.junit.Before; +import org.junit.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; +import org.openecomp.sdc.be.components.merge.input.ComponentInputsMergeBL; +import org.openecomp.sdc.be.components.merge.property.ComponentInstanceInputsMergeBL; +import org.openecomp.sdc.be.components.merge.property.ComponentInstancePropertiesMergeBL; +import org.openecomp.sdc.be.components.utils.ObjectGenerator; +import org.openecomp.sdc.be.dao.api.ActionStatus; +import org.openecomp.sdc.be.model.Resource; + +public class ResourceDataMergeBusinessLogicTest { + + @InjectMocks + private ResourceDataMergeBusinessLogic testInstance; + + @Mock + private ComponentInstanceInputsMergeBL instanceInputsValueMergeBLMock; + + @Mock + private ComponentInstancePropertiesMergeBL instancePropertiesValueMergeBLMock; + + @Mock + private ComponentInputsMergeBL inputsValueMergeBLMock; + + @Before + public void setUp() throws Exception { + MockitoAnnotations.initMocks(this); + } + + @Test + public void mergeResourceInputs_allMergeClassesAreCalled() throws Exception { + Resource oldResource = ObjectGenerator.buildBasicResource(); + Resource newResource = ObjectGenerator.buildBasicResource(); + when(instancePropertiesValueMergeBLMock.mergeComponentInstancesProperties(oldResource, newResource)).thenReturn(ActionStatus.OK); + when(instanceInputsValueMergeBLMock.mergeComponentInstancesInputs(oldResource, newResource)).thenReturn(ActionStatus.OK); + when(inputsValueMergeBLMock.mergeAndRedeclareComponentInputs(oldResource, newResource, Collections.emptyList())).thenReturn(ActionStatus.OK); + ActionStatus actionStatus = testInstance.mergeResourceEntities(oldResource, newResource); + assertEquals(ActionStatus.OK, actionStatus); + } + + @Test + public void mergeResourceInputs_failToMergeProperties_dontCallOtherMergeMethods() throws Exception { + Resource oldResource = ObjectGenerator.buildBasicResource(); + Resource newResource = ObjectGenerator.buildBasicResource(); + when(instancePropertiesValueMergeBLMock.mergeComponentInstancesProperties(oldResource, newResource)).thenReturn(ActionStatus.GENERAL_ERROR); + ActionStatus actionStatus = testInstance.mergeResourceEntities(oldResource, newResource); + assertEquals(ActionStatus.GENERAL_ERROR, actionStatus); + verifyZeroInteractions(instanceInputsValueMergeBLMock, inputsValueMergeBLMock); + } + + @Test + public void mergeResourceInputs_failToMergeInstanceInputs_dontCallOtherMergeMethods() throws Exception { + Resource oldResource = ObjectGenerator.buildBasicResource(); + Resource newResource = ObjectGenerator.buildBasicResource(); + when(instancePropertiesValueMergeBLMock.mergeComponentInstancesProperties(oldResource, newResource)).thenReturn(ActionStatus.OK); + when(instanceInputsValueMergeBLMock.mergeComponentInstancesInputs(oldResource, newResource)).thenReturn(ActionStatus.GENERAL_ERROR); + ActionStatus actionStatus = testInstance.mergeResourceEntities(oldResource, newResource); + assertEquals(ActionStatus.GENERAL_ERROR, actionStatus); + verifyZeroInteractions(inputsValueMergeBLMock); + } + + @Test + public void mergeResourceInputs_failedToMergeInputs() throws Exception { + Resource oldResource = ObjectGenerator.buildBasicResource(); + Resource newResource = ObjectGenerator.buildBasicResource(); + when(instancePropertiesValueMergeBLMock.mergeComponentInstancesProperties(oldResource, newResource)).thenReturn(ActionStatus.OK); + when(instanceInputsValueMergeBLMock.mergeComponentInstancesInputs(oldResource, newResource)).thenReturn(ActionStatus.OK); + when(inputsValueMergeBLMock.mergeAndRedeclareComponentInputs(oldResource, newResource, Collections.emptyList())).thenReturn(ActionStatus.GENERAL_ERROR); + ActionStatus actionStatus = testInstance.mergeResourceEntities(oldResource, newResource); + assertEquals(ActionStatus.GENERAL_ERROR, actionStatus); + } +} \ No newline at end of file diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/ArtifactBuilder.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/ArtifactBuilder.java new file mode 100644 index 0000000000..55a119e078 --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/ArtifactBuilder.java @@ -0,0 +1,42 @@ +package org.openecomp.sdc.be.components.utils; + +import java.util.ArrayList; + +import org.openecomp.sdc.be.model.ArtifactDefinition; +import org.openecomp.sdc.be.model.HeatParameterDefinition; + +public class ArtifactBuilder { + + private ArtifactDefinition artifactDefinition; + + public ArtifactBuilder() { + this.artifactDefinition = new ArtifactDefinition(); + } + + public ArtifactBuilder setType(String type) { + this.artifactDefinition.setArtifactType(type); + return this; + } + + public ArtifactBuilder setName(String name) { + this.artifactDefinition.setArtifactName(name); + return this; + } + + public ArtifactBuilder setLabel(String label) { + this.artifactDefinition.setArtifactLabel(label); + return this; + } + + public ArtifactBuilder addHeatParam(HeatParameterDefinition heatParam) { + if (this.artifactDefinition.getHeatParameters() == null) { + this.artifactDefinition.setHeatParameters(new ArrayList<>()); + } + this.artifactDefinition.getHeatParameters().add(heatParam); + return this; + } + + public ArtifactDefinition build() { + return artifactDefinition; + } +} diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/ComponentInstanceBuilder.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/ComponentInstanceBuilder.java new file mode 100644 index 0000000000..a99f08c20d --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/ComponentInstanceBuilder.java @@ -0,0 +1,49 @@ +package org.openecomp.sdc.be.components.utils; + +import java.util.HashMap; +import java.util.Map; + +import org.openecomp.sdc.be.model.ArtifactDefinition; +import org.openecomp.sdc.be.model.ComponentInstance; + +public class ComponentInstanceBuilder { + + private ComponentInstance componentInstance; + + public ComponentInstanceBuilder() { + componentInstance = new ComponentInstance(); + } + + public ComponentInstanceBuilder setName(String name) { + componentInstance.setName(name); + return this; + } + + public ComponentInstanceBuilder setComponentUid(String componentUid) { + componentInstance.setComponentUid(componentUid); + return this; + } + + public ComponentInstanceBuilder setId(String id) { + componentInstance.setUniqueId(id); + return this; + } + + public ComponentInstanceBuilder setToscaName(String toscaName) { + componentInstance.setToscaComponentName(toscaName); + return this; + } + + public ComponentInstanceBuilder addDeploymentArtifact(ArtifactDefinition artifactDefinition) { + Map deploymentArtifacts = componentInstance.getDeploymentArtifacts(); + if (deploymentArtifacts == null) { + componentInstance.setDeploymentArtifacts(new HashMap<>()); + } + componentInstance.getDeploymentArtifacts().put(artifactDefinition.getArtifactName(), artifactDefinition); + return this; + } + + public ComponentInstance build() { + return componentInstance; + } +} diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/HeatParameterBuilder.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/HeatParameterBuilder.java new file mode 100644 index 0000000000..d32dc65876 --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/HeatParameterBuilder.java @@ -0,0 +1,36 @@ +package org.openecomp.sdc.be.components.utils; + +import org.openecomp.sdc.be.model.HeatParameterDefinition; + +public class HeatParameterBuilder { + + private HeatParameterDefinition heatParameterDefinition; + + public HeatParameterBuilder() { + heatParameterDefinition = new HeatParameterDefinition(); + } + + public HeatParameterBuilder setName(String name) { + heatParameterDefinition.setName(name); + return this; + } + + public HeatParameterBuilder setType(String type) { + heatParameterDefinition.setType(type); + return this; + } + + public HeatParameterBuilder setCurrentValue(String value) { + heatParameterDefinition.setCurrentValue(value); + return this; + } + + public HeatParameterBuilder setDefaultValue(String value) { + heatParameterDefinition.setDefaultValue(value); + return this; + } + + public HeatParameterDefinition build() { + return heatParameterDefinition; + } +} diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/ObjectGenerator.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/ObjectGenerator.java new file mode 100644 index 0000000000..3a99d54ffa --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/ObjectGenerator.java @@ -0,0 +1,101 @@ +package org.openecomp.sdc.be.components.utils; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import org.openecomp.sdc.be.model.ComponentInstance; +import org.openecomp.sdc.be.model.ComponentInstanceInput; +import org.openecomp.sdc.be.model.ComponentInstanceProperty; +import org.openecomp.sdc.be.model.HeatParameterDefinition; +import org.openecomp.sdc.be.model.InputDefinition; +import org.openecomp.sdc.be.model.PropertyDefinition; +import org.openecomp.sdc.be.model.RequirementCapabilityRelDef; +import org.openecomp.sdc.be.model.Resource; + +public class ObjectGenerator { + + public static Resource buildResourceWithInputs(String ... inputNames) { + Resource resource = buildBasicResource(); + resource.setInputs(ObjectGenerator.buildInputs(inputNames)); + return resource; + } + + public static Resource buildResourceWithProperties(String ... propertiesNames) { + ResourceBuilder resourceBuilder = new ResourceBuilder(); + resourceBuilder.setUniqueId("id"); + for (String propertyName : propertiesNames) { + PropertyDefinition propertyDefinition = new PropertyDefinition(); + propertyDefinition.setName(propertyName); + resourceBuilder.addProperty(propertyDefinition); + } + return resourceBuilder.build(); + } + + public static List buildInstanceProperties(String ... propertiesNames) { + return Stream.of(propertiesNames).map(name -> { + ComponentInstanceProperty instProp = new ComponentInstanceProperty(); + instProp.setName(name); + return instProp; + }).collect(Collectors.toList()); + } + + public static List buildInstanceInputs(String ... inputsNames) { + return Stream.of(inputsNames).map(name -> { + ComponentInstanceInput instProp = new ComponentInstanceInput(); + instProp.setName(name); + return instProp; + }).collect(Collectors.toList()); + } + + public static List buildInputs(String ... inputNames) { + List inputs = new ArrayList<>(); + for (String inputName : inputNames) { + InputDefinition inputDefinition = new InputDefinition(); + inputDefinition.setName(inputName); + inputs.add(inputDefinition); + } + return inputs; + } + + public static Resource buildResourceWithComponentInstance(String ... instanceNames) { + List instances = new ArrayList<>(); + for (String instanceName : instanceNames) { + ComponentInstance componentInstance = new ComponentInstanceBuilder().setName(instanceName).setComponentUid(instanceName).build(); + instances.add(componentInstance); + } + return buildResourceWithComponentInstances(instances); + } + + public static Resource buildResourceWithComponentInstances(List instances) { + Resource resource = buildBasicResource(); + resource.setComponentInstances(instances); + return resource; + } + + public static Resource buildResourceWithComponentInstances(ComponentInstance ... instances) { + return buildResourceWithComponentInstances(Arrays.asList(instances)); + } + + public static Resource buildResourceWithRelationships(RequirementCapabilityRelDef ... relations) { + Resource resource = buildBasicResource(); + ResourceBuilder resourceBuilder = new ResourceBuilder(resource); + for (RequirementCapabilityRelDef relation : relations) { + resourceBuilder.addRelationship(relation); + } + return resourceBuilder.build(); + } + + public static Resource buildBasicResource() { + Resource resource = new Resource(); + resource.setUniqueId("id"); + return resource; + } + + public static HeatParameterDefinition buildHeatParam(String defaultVal, String currValue) { + return new HeatParameterBuilder().setDefaultValue(defaultVal).setCurrentValue(currValue).build(); + } + +} diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/PropertyDataDefinitionBuilder.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/PropertyDataDefinitionBuilder.java new file mode 100644 index 0000000000..e7ed170414 --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/PropertyDataDefinitionBuilder.java @@ -0,0 +1,68 @@ +package org.openecomp.sdc.be.components.utils; + +import java.util.ArrayList; + +import org.openecomp.sdc.be.datatypes.elements.GetInputValueDataDefinition; +import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition; +import org.openecomp.sdc.be.datatypes.elements.SchemaDefinition; +import org.openecomp.sdc.be.model.PropertyDefinition; + +public class PropertyDataDefinitionBuilder { + + private PropertyDefinition propertyDefinition; + + public PropertyDataDefinitionBuilder() { + propertyDefinition = new PropertyDefinition(); + } + + public PropertyDataDefinitionBuilder setUniqueId(String id) { + this.propertyDefinition.setUniqueId(id); + return this; + } + + public PropertyDataDefinitionBuilder setName(String name) { + this.propertyDefinition.setName(name); + return this; + } + + public PropertyDataDefinitionBuilder setValue(String value) { + this.propertyDefinition.setValue(value); + return this; + } + + public PropertyDataDefinitionBuilder setDefaultValue(String value) { + this.propertyDefinition.setDefaultValue(value); + return this; + } + + public PropertyDataDefinitionBuilder setType(String type) { + this.propertyDefinition.setType(type); + return this; + } + + public PropertyDataDefinitionBuilder setSchemaType(String type) { + if (propertyDefinition.getSchema() == null) { + propertyDefinition.setSchema(new SchemaDefinition()); + } + if (propertyDefinition.getSchema().getProperty() == null) { + propertyDefinition.getSchema().setProperty(new PropertyDataDefinition()); + } + propertyDefinition.getSchema().getProperty().setType(type); + return this; + } + + public PropertyDataDefinitionBuilder addGetInputValue(String inputName) { + GetInputValueDataDefinition getInputValueDataDefinition = new GetInputValueDataDefinition(); + getInputValueDataDefinition.setInputName(inputName); + getInputValueDataDefinition.setInputId(inputName); + if (propertyDefinition.getGetInputValues() == null) { + propertyDefinition.setGetInputValues(new ArrayList<>()); + } + propertyDefinition.getGetInputValues().add(getInputValueDataDefinition); + return this; + } + + public PropertyDefinition build() { + return propertyDefinition; + } +} diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/RelationsBuilder.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/RelationsBuilder.java new file mode 100644 index 0000000000..8c457f153f --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/RelationsBuilder.java @@ -0,0 +1,53 @@ +package org.openecomp.sdc.be.components.utils; + +import java.util.Collections; + +import org.openecomp.sdc.be.model.CapabilityRequirementRelationship; +import org.openecomp.sdc.be.model.RelationshipImpl; +import org.openecomp.sdc.be.model.RelationshipInfo; +import org.openecomp.sdc.be.model.RequirementCapabilityRelDef; + +public class RelationsBuilder { + + private RequirementCapabilityRelDef relation; + + public RelationsBuilder() { + relation = new RequirementCapabilityRelDef(); + RelationshipInfo requirementAndRelationshipPair = new RelationshipInfo(); + RelationshipImpl relationship = new RelationshipImpl(); + requirementAndRelationshipPair.setRelationships(relationship); + CapabilityRequirementRelationship capReqRel = new CapabilityRequirementRelationship(); + capReqRel.setRelation(requirementAndRelationshipPair); + relation.setRelationships(Collections.singletonList(capReqRel)); + } + + public RelationsBuilder setFromNode(String fromNode) { + relation.setFromNode(fromNode); + return this; + } + + public RelationsBuilder setRequirementName(String reqName) { + relation.getSingleRelationship().getRelation().setRequirement(reqName); + return this; + } + + public RelationsBuilder setRelationType(String type) { + relation.getSingleRelationship().getRelation().getRelationship().setType(type); + return this; + } + + public RelationsBuilder setCapabilityUID(String uid) { + relation.getSingleRelationship().getRelation().setCapabilityUid(uid); + return this; + } + + public RelationsBuilder setToNode(String toNode) { + relation.setToNode(toNode); + return this; + } + + public RequirementCapabilityRelDef build() { + return relation; + } + +} diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/ResourceBuilder.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/ResourceBuilder.java new file mode 100644 index 0000000000..3d4a29da71 --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/ResourceBuilder.java @@ -0,0 +1,126 @@ +package org.openecomp.sdc.be.components.utils; + +import java.util.ArrayList; +import java.util.HashMap; + +import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; +import org.openecomp.sdc.be.model.ComponentInstance; +import org.openecomp.sdc.be.model.ComponentInstanceInput; +import org.openecomp.sdc.be.model.ComponentInstanceProperty; +import org.openecomp.sdc.be.model.InputDefinition; +import org.openecomp.sdc.be.model.PropertyDefinition; +import org.openecomp.sdc.be.model.RequirementCapabilityRelDef; +import org.openecomp.sdc.be.model.Resource; + +public class ResourceBuilder { + + private Resource resource; + + public ResourceBuilder() { + this.resource = new Resource(); + } + + public ResourceBuilder(Resource resource) { + this.resource = resource; + } + + public ResourceBuilder setUniqueId(String id) { + resource.setUniqueId(id); + return this; + } + + public ResourceBuilder setInvariantUUid(String invariantUUid) { + resource.setInvariantUUID(invariantUUid); + return this; + } + + public ResourceBuilder setName(String name) { + resource.setName(name); + return this; + } + + public ResourceBuilder setComponentType(ComponentTypeEnum type) { + resource.setComponentType(type); + return this; + } + + public ResourceBuilder setSystemName(String systemName) { + resource.setSystemName(systemName); + return this; + } + + public ResourceBuilder addComponentInstance(ComponentInstance componentInstance) { + if (resource.getComponentInstances() == null) { + resource.setComponentInstances(new ArrayList<>()); + } + resource.getComponentInstances().add(componentInstance); + return this; + } + + public ResourceBuilder addInput(InputDefinition input) { + if (resource.getInputs() == null) { + resource.setInputs(new ArrayList<>()); + } + resource.getInputs().add(input); + return this; + } + + public ResourceBuilder addInput(String inputName) { + InputDefinition inputDefinition = new InputDefinition(); + inputDefinition.setName(inputName); + inputDefinition.setUniqueId(inputName); + this.addInput(inputDefinition); + return this; + } + + public ResourceBuilder addProperty(PropertyDefinition propertyDefinition) { + if (resource.getProperties() == null) { + resource.setProperties(new ArrayList<>()); + } + resource.getProperties().add(propertyDefinition); + return this; + } + + public ResourceBuilder addInstanceProperty(String instanceId, ComponentInstanceProperty prop) { + if (resource.getComponentInstancesProperties() == null) { + resource.setComponentInstancesProperties(new HashMap<>()); + } + resource.getComponentInstancesProperties().computeIfAbsent(instanceId, key -> new ArrayList<>()).add(prop); + return this; + } + + public ResourceBuilder addInstanceProperty(String instanceId, String propName) { + ComponentInstanceProperty componentInstanceProperty = new ComponentInstanceProperty(); + componentInstanceProperty.setName(propName); + this.addInstanceProperty(instanceId, componentInstanceProperty); + return this; + } + + public ResourceBuilder addInstanceInput(String instanceId, ComponentInstanceInput prop) { + if (resource.getComponentInstancesInputs() == null) { + resource.setComponentInstancesInputs(new HashMap<>()); + } + resource.getComponentInstancesInputs().computeIfAbsent(instanceId, key -> new ArrayList<>()).add(prop); + return this; + } + + public ResourceBuilder addInstanceInput(String instanceId, String propName) { + ComponentInstanceInput componentInstanceInput = new ComponentInstanceInput(); + componentInstanceInput.setName(propName); + this.addInstanceInput(instanceId, componentInstanceInput); + return this; + } + + public ResourceBuilder addRelationship(RequirementCapabilityRelDef requirementCapabilityRelDef) { + if (resource.getComponentInstancesRelations() == null) { + resource.setComponentInstancesRelations(new ArrayList<>()); + } + resource.getComponentInstancesRelations().add(requirementCapabilityRelDef); + return this; + } + + + public Resource build() { + return resource; + } +} diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/distribution/DistributionBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/distribution/DistributionBusinessLogicTest.java index 104cd14e7a..290a5f4d1d 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/distribution/DistributionBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/distribution/DistributionBusinessLogicTest.java @@ -37,8 +37,6 @@ import org.openecomp.sdc.be.components.distribution.engine.CambriaHandler; import org.openecomp.sdc.be.components.distribution.engine.DistributionEngineInitTask; import org.openecomp.sdc.be.components.distribution.engine.SubscriberTypeEnum; import org.openecomp.sdc.be.config.DistributionEngineConfiguration; -import org.openecomp.sdc.be.distribution.AuditHandler; -import org.openecomp.sdc.be.distribution.DistributionBusinessLogic; import org.openecomp.sdc.be.distribution.api.client.CambriaOperationStatus; import org.openecomp.sdc.be.distribution.api.client.RegistrationRequest; import org.openecomp.sdc.be.distribution.api.client.TopicRegistrationResponse; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/distribution/ServiceDistributionArtifactsBuilderTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/distribution/ServiceDistributionArtifactsBuilderTest.java index 1c84cf6ca6..4e27c30f8a 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/distribution/ServiceDistributionArtifactsBuilderTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/distribution/ServiceDistributionArtifactsBuilderTest.java @@ -26,6 +26,8 @@ import java.lang.reflect.Method; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; + import org.junit.Test; import org.mockito.InjectMocks; import org.openecomp.sdc.be.components.BaseConfDependentTest; @@ -33,6 +35,7 @@ import org.openecomp.sdc.be.components.distribution.engine.ArtifactInfoImpl; import org.openecomp.sdc.be.components.distribution.engine.ServiceDistributionArtifactsBuilder; import org.openecomp.sdc.be.model.ArtifactDefinition; import org.openecomp.sdc.be.model.Service; +import org.openecomp.sdc.common.api.ArtifactGroupTypeEnum; import org.openecomp.sdc.common.api.ArtifactTypeEnum; public class ServiceDistributionArtifactsBuilderTest extends BaseConfDependentTest { @@ -63,12 +66,25 @@ public class ServiceDistributionArtifactsBuilderTest extends BaseConfDependentTe toscaTemplateArtifact.setArtifactType(ArtifactTypeEnum.TOSCA_TEMPLATE.getType()); toscaTemplateArtifact.setArtifactLabel(artifactLabel); toscaTemplateArtifact.setEsId(esArtifactId); + toscaTemplateArtifact.setUniqueId(esArtifactId); toscaTemplateArtifact.setPayload(payload); Map toscaArtifacts = new HashMap<>(); toscaArtifacts.put(artifactLabel, toscaTemplateArtifact); service.setToscaArtifacts(toscaArtifacts); + ArtifactDefinition deploymentArtifact = new ArtifactDefinition(); + deploymentArtifact.setArtifactName("deployment.yaml"); + deploymentArtifact.setArtifactGroupType(ArtifactGroupTypeEnum.DEPLOYMENT); + deploymentArtifact.setArtifactType(ArtifactTypeEnum.OTHER.getType()); + deploymentArtifact.setArtifactLabel("deployment"); + deploymentArtifact.setEsId("deployment007"); + deploymentArtifact.setUniqueId("deployment007"); + deploymentArtifact.setPayload(payload); + Map deploymentArtifacts = new HashMap<>(); + deploymentArtifacts.put("deployment", deploymentArtifact); + service.setDeploymentArtifacts(deploymentArtifacts); + Class targetClass = ServiceDistributionArtifactsBuilder.class; String methodName = "convertServiceArtifactsToArtifactInfo"; Object[] argObjects = {service}; @@ -79,8 +95,9 @@ public class ServiceDistributionArtifactsBuilderTest extends BaseConfDependentTe List convertServiceArtifactsToArtifactInfoRes = (List) method.invoke(serviceDistributionArtifactsBuilder, argObjects); assertTrue(convertServiceArtifactsToArtifactInfoRes != null); - assertTrue(convertServiceArtifactsToArtifactInfoRes.size() == 1); - assertTrue(convertServiceArtifactsToArtifactInfoRes.get(0).getArtifactName().equals(artifactName)); + assertTrue(convertServiceArtifactsToArtifactInfoRes.size() == 2); + List artifactsNames = convertServiceArtifactsToArtifactInfoRes.stream().map(a->a.getArtifactName()).collect(Collectors.toList()); + assertTrue(artifactsNames.contains(artifactName) && artifactsNames.contains("deployment.yaml")); } catch (Exception e) { e.printStackTrace(); diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/distribution/TestQueue.java b/catalog-be/src/test/java/org/openecomp/sdc/be/distribution/TestQueue.java new file mode 100644 index 0000000000..74f0eac5ad --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/distribution/TestQueue.java @@ -0,0 +1,188 @@ +/*- + * ============LICENSE_START======================================================= + * SDC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdc.be.distribution; + +import java.util.ArrayList; +import java.util.List; +import java.util.Timer; +import java.util.TimerTask; +import java.util.concurrent.ArrayBlockingQueue; +import java.util.concurrent.BlockingQueue; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.RejectedExecutionException; +import java.util.concurrent.SynchronousQueue; +import java.util.concurrent.ThreadFactory; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; + +import org.openecomp.sdc.be.components.distribution.engine.CambriaHandler; +import org.openecomp.sdc.be.components.distribution.engine.INotificationData; +import org.openecomp.sdc.be.components.distribution.engine.NotificationDataImpl; + +import com.google.common.util.concurrent.ThreadFactoryBuilder; + +public class TestQueue { + + public static void main(String[] args) { + ThreadFactoryBuilder threadFactoryBuilder = new ThreadFactoryBuilder(); + threadFactoryBuilder.setNameFormat("distribution-notification-thread"); + ThreadFactory threadFactory = threadFactoryBuilder.build(); + // TODO: add the package of google to the pom + + ExecutorService executorService = new ThreadPoolExecutor(0, 10, 60L, TimeUnit.SECONDS, new SynchronousQueue(), threadFactory); + // ExecutorService executorService = new ThreadPoolExecutor(0, 2, 60L, + // TimeUnit.SECONDS, new ArrayBlockingQueue(20)); + + // 2 threads are always up and they handle the tasks. in case core size + // is 0, only one is handles the tasks. + // ExecutorService executorService = new ThreadPoolExecutor(0, 2, 60L, + // TimeUnit.SECONDS, new ArrayBlockingQueue(20)); + + // TODO : check what happen when the number of threads are full. Throw + // RejectedExecutionException + // TODO : check what happen whether the pool is full and the size of + // pool + + ExecutorService newCachedThreadPool = Executors.newCachedThreadPool(threadFactory); + Runnable task = new Runnable() { + + @Override + public void run() { + try { + System.out.println("iN SLEEP" + Thread.currentThread()); + Thread.sleep(10 * 1000); + System.out.println("OUT SLEEP"); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + }; + + for (int i = 0; i < 4; i++) { + try { + executorService.submit(task); + } catch (RejectedExecutionException e) { + e.printStackTrace(); + } + } + + newCachedThreadPool.submit(task); + System.out.println("After submitting the task"); + + MyWorker[] watchThreads = new MyWorker[1]; + BlockingQueue queue = new ArrayBlockingQueue<>(5); + for (int i = 0; i < watchThreads.length; i++) { + MyWorker myWorker = new MyWorker(queue); + myWorker.start(); + } + + for (int i = 0; i < 1; i++) { + try { + queue.put("message " + i); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + } + + public static class MyTimerTask extends TimerTask { + + AtomicBoolean state; + Thread thread; + + public MyTimerTask(AtomicBoolean state, Thread thread) { + super(); + this.state = state; + this.thread = thread; + + System.out.println("After create timer"); + } + + @Override + public void run() { + System.out.println("In running of Timer task"); + if (state.get() == false) { + System.out.println("In running of Timer task. Going to interrupt thread"); + // thread.interrupt(); + } else { + System.out.println("In running of Timer task. Finished."); + } + } + + } + + public static class MyWorker extends Thread { + + boolean active = true; + private final BlockingQueue queue; + + public MyWorker(BlockingQueue queue) { + this.queue = queue; + } + + Timer timer = new Timer(); + + public void run() { + try { + while (active) { + String s = queue.take(); + System.out.println("Thread " + Thread.currentThread() + " fecthed a message " + s); + + AtomicBoolean atomicBoolean = new AtomicBoolean(false); + MyTimerTask myTimerTask = new MyTimerTask(atomicBoolean, this); + timer.schedule(myTimerTask, 10 * 1000); + doWork(s); + atomicBoolean.set(true); + + } + } catch (InterruptedException ie) { + + System.out.println("Interrupted our thread"); + ie.printStackTrace(); + } + } + + private void doWork(String s) { + // TODO Auto-generated method stub + + CambriaHandler cambriaHandler = new CambriaHandler(); + INotificationData data = new NotificationDataImpl(); + List servers = new ArrayList<>(); + servers.add("aaaaaaa"); + cambriaHandler.sendNotification("topicName", "uebPublicKey", "uebSecretKey", servers, data); + + System.out.println("IN WORK " + s); + try { + Thread.sleep(1 * 1000); + } catch (InterruptedException e) { + + for (int i = 0; i < 10; i++) { + System.out.println("*************************************************"); + } + e.printStackTrace(); + } + } + } + +} diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/distribution/servlet/DistributionServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/distribution/servlet/DistributionServletTest.java index d6274ad90e..3aa143a389 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/distribution/servlet/DistributionServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/distribution/servlet/DistributionServletTest.java @@ -46,7 +46,6 @@ import org.openecomp.sdc.be.distribution.AuditHandler; import org.openecomp.sdc.be.distribution.DistributionBusinessLogic; import org.openecomp.sdc.be.distribution.api.client.RegistrationRequest; import org.openecomp.sdc.be.distribution.api.client.TopicRegistrationResponse; -import org.openecomp.sdc.be.distribution.servlet.DistributionServlet; import org.openecomp.sdc.be.impl.WebAppContextWrapper; import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; import org.openecomp.sdc.common.api.Constants; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/ecomp/GenerateEcompErrorFileTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/ecomp/GenerateEcompErrorFileTest.java index e4f46dd4dd..1df88c3686 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/ecomp/GenerateEcompErrorFileTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/ecomp/GenerateEcompErrorFileTest.java @@ -20,21 +20,19 @@ package org.openecomp.sdc.be.ecomp; -import java.io.File; +import static org.junit.Assert.assertTrue; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.junit.Test; -import org.openecomp.sdc.be.config.BeEcompErrorManager.ErrorSeverity; import org.openecomp.sdc.common.config.EcompClassification; import org.openecomp.sdc.common.config.EcompErrorCode; import org.openecomp.sdc.common.config.EcompErrorEnum; import org.openecomp.sdc.common.config.generation.GenerateEcompErrorsCsv; -import static org.junit.Assert.assertTrue; - public class GenerateEcompErrorFileTest { @Test diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServletTest.java index 640a9d2cf6..810da4c10b 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServletTest.java @@ -43,9 +43,7 @@ import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; import org.junit.BeforeClass; import org.junit.Test; -import org.mockito.Matchers; import org.mockito.Mockito; -import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; import org.openecomp.sdc.be.components.impl.ElementBusinessLogic; import org.openecomp.sdc.be.components.impl.ResourceBusinessLogic; @@ -58,10 +56,8 @@ import org.openecomp.sdc.be.impl.ComponentsUtils; import org.openecomp.sdc.be.impl.ServletUtils; import org.openecomp.sdc.be.impl.WebAppContextWrapper; import org.openecomp.sdc.be.model.Resource; -import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.be.model.category.CategoryDefinition; import org.openecomp.sdc.be.model.category.SubCategoryDefinition; -import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum; import org.openecomp.sdc.common.api.Constants; import org.openecomp.sdc.common.datastructure.FunctionalInterfaces; import org.openecomp.sdc.common.impl.ExternalConfiguration; @@ -115,7 +111,7 @@ public class AssetsDataServletTest extends JerseyTest { when(resource.getName()).thenReturn("MockVFCMT"); when(resource.getSystemName()).thenReturn("mockvfcmt"); Either eitherRet = Either.left(resource); - when(componentsUtils.convertJsonToObjectUsingObjectMapper(Mockito.anyString(), Mockito.any(User.class), Mockito.eq(Resource.class), Mockito.any(AuditingActionEnum.class), Mockito.eq(ComponentTypeEnum.RESOURCE))).thenReturn(eitherRet); + when(componentsUtils.convertJsonToObjectUsingObjectMapper(Mockito.any(), Mockito.any(), Mockito.eq(Resource.class), Mockito.any(), Mockito.eq(ComponentTypeEnum.RESOURCE))).thenReturn(eitherRet); when(webApplicationContext.getBean(ResourceImportManager.class)).thenReturn(resourceImportManager); when(webApplicationContext.getBean(ElementBusinessLogic.class)).thenReturn(elementBusinessLogic); @@ -123,7 +119,7 @@ public class AssetsDataServletTest extends JerseyTest { when(subCategoryDefinition.getName()).thenReturn("Monitoring Template"); when(categoryDefinition.getSubcategories()).thenReturn(Arrays.asList(subCategoryDefinition)); when(elementBusinessLogic.getAllResourceCategories()).thenReturn(Either.left(Arrays.asList(categoryDefinition))); - when(resourceBusinessLogic.createResource(Mockito.eq(resource), Mockito.any(AuditingActionEnum.class), Mockito.any(User.class), Mockito.anyMap(), Mockito.anyString())).thenReturn(Either.left(resource)); + when(resourceBusinessLogic.createResource(Mockito.eq(resource), Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any())).thenReturn(Either.left(resource)); when(webApplicationContext.getBean(AssetMetadataConverter.class)).thenReturn(assetMetadataConverter); Mockito.doReturn(Either.left(resourceAssetMetadata)).when(assetMetadataConverter).convertToSingleAssetMetadata(Mockito.eq(resource), Mockito.anyString(), @@ -136,22 +132,21 @@ public class AssetsDataServletTest extends JerseyTest { private static void mockResponseFormat() { - when(componentsUtils.getResponseFormat(Mockito.any(ActionStatus.class), Matchers.anyVararg())).thenAnswer(new Answer(){ - public ResponseFormat answer(InvocationOnMock invocation) throws Throwable { - ResponseFormat ret; - final ActionStatus actionStatus = invocation.getArgumentAt(0, ActionStatus.class); - switch( actionStatus ){ - case CREATED :{ - ret = new ResponseFormat(HttpStatus.SC_CREATED); - break; - } - default :{ - ret = new ResponseFormat(HttpStatus.SC_INTERNAL_SERVER_ERROR); - break; - } - } - return ret; - }}); + when(componentsUtils.getResponseFormat(Mockito.any(ActionStatus.class), Mockito.any(String[].class))).thenAnswer((Answer) invocation -> { + ResponseFormat ret; + final ActionStatus actionStatus = invocation.getArgument(0); + switch( actionStatus ){ + case CREATED :{ + ret = new ResponseFormat(HttpStatus.SC_CREATED); + break; + } + default :{ + ret = new ResponseFormat(HttpStatus.SC_INTERNAL_SERVER_ERROR); + break; + } + } + return ret; + }); } diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ArtifactMetadataTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ArtifactMetadataTest.java index 673964e264..a2eb5336ed 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ArtifactMetadataTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ArtifactMetadataTest.java @@ -1,7 +1,5 @@ package org.openecomp.sdc.be.externalapi.servlet.representation; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ProductAssetMetadataTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ProductAssetMetadataTest.java index 1102dea900..f471e4971a 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ProductAssetMetadataTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ProductAssetMetadataTest.java @@ -2,8 +2,6 @@ package org.openecomp.sdc.be.externalapi.servlet.representation; import java.util.List; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ProductCategoryGroupMetadataTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ProductCategoryGroupMetadataTest.java index 0d931e15df..669f58c675 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ProductCategoryGroupMetadataTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ProductCategoryGroupMetadataTest.java @@ -1,7 +1,5 @@ package org.openecomp.sdc.be.externalapi.servlet.representation; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ResourceAssetDetailedMetadataTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ResourceAssetDetailedMetadataTest.java index 83d048ae6b..b66341b8dd 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ResourceAssetDetailedMetadataTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ResourceAssetDetailedMetadataTest.java @@ -2,8 +2,6 @@ package org.openecomp.sdc.be.externalapi.servlet.representation; import java.util.List; -import javax.annotation.Generated; - import org.junit.Test; public class ResourceAssetDetailedMetadataTest { diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ResourceAssetMetadataTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ResourceAssetMetadataTest.java index d0d784f5a8..e1d276c839 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ResourceAssetMetadataTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ResourceAssetMetadataTest.java @@ -1,7 +1,5 @@ package org.openecomp.sdc.be.externalapi.servlet.representation; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ResourceInstanceMetadataTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ResourceInstanceMetadataTest.java index ba9897c7dc..cd8439e34a 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ResourceInstanceMetadataTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ResourceInstanceMetadataTest.java @@ -2,8 +2,6 @@ package org.openecomp.sdc.be.externalapi.servlet.representation; import java.util.List; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ServiceAssetDetailedMetadataTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ServiceAssetDetailedMetadataTest.java index 29825a6e60..7279436d10 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ServiceAssetDetailedMetadataTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ServiceAssetDetailedMetadataTest.java @@ -2,8 +2,6 @@ package org.openecomp.sdc.be.externalapi.servlet.representation; import java.util.List; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ServiceAssetMetadataTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ServiceAssetMetadataTest.java index 6a4a38a02f..f6022263bd 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ServiceAssetMetadataTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/representation/ServiceAssetMetadataTest.java @@ -1,7 +1,5 @@ package org.openecomp.sdc.be.externalapi.servlet.representation; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/impl/ComponentsUtilsTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/impl/ComponentsUtilsTest.java index b726bee926..811a3031ae 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/impl/ComponentsUtilsTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/impl/ComponentsUtilsTest.java @@ -1,31 +1,15 @@ package org.openecomp.sdc.be.impl; import java.util.EnumMap; -import java.util.List; -import java.util.Map; -import java.util.regex.Pattern; -import javax.servlet.http.HttpServletRequest; - -import org.apache.tinkerpop.gremlin.structure.T; -import org.codehaus.jackson.map.module.SimpleModule; import org.junit.Assert; import org.junit.Test; import org.openecomp.sdc.be.auditing.api.IAuditingManager; import org.openecomp.sdc.be.components.impl.ImportUtils.ResultStatusEnum; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.dao.graph.datatype.AdditionalInformationEnum; -import org.openecomp.sdc.be.datatypes.elements.AdditionalInfoParameterInfo; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields; -import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; -import org.openecomp.sdc.be.model.ArtifactDefinition; -import org.openecomp.sdc.be.model.CapabilityTypeDefinition; import org.openecomp.sdc.be.model.Component; -import org.openecomp.sdc.be.model.ConsumerDefinition; -import org.openecomp.sdc.be.model.DataTypeDefinition; -import org.openecomp.sdc.be.model.GroupTypeDefinition; -import org.openecomp.sdc.be.model.PolicyTypeDefinition; import org.openecomp.sdc.be.model.Resource; import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; @@ -34,10 +18,6 @@ import org.openecomp.sdc.be.tosca.ToscaError; import org.openecomp.sdc.common.datastructure.AuditingFieldsKeysEnum; import org.openecomp.sdc.exception.ResponseFormat; -import com.fasterxml.jackson.databind.JsonDeserializer; - -import fj.data.Either; - public class ComponentsUtilsTest { private ComponentsUtils createTestSubject() { diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactAccessInfoTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactAccessInfoTest.java index 096bb4dca2..4bff2ecdeb 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactAccessInfoTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactAccessInfoTest.java @@ -1,7 +1,5 @@ package org.openecomp.sdc.be.info; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactAccessListTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactAccessListTest.java index 2164b91542..4c8da955ae 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactAccessListTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactAccessListTest.java @@ -2,8 +2,6 @@ package org.openecomp.sdc.be.info; import java.util.List; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactDefinitionInfoTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactDefinitionInfoTest.java index a9b9352673..b73874ea3a 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactDefinitionInfoTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactDefinitionInfoTest.java @@ -1,7 +1,5 @@ package org.openecomp.sdc.be.info; -import javax.annotation.Generated; - import org.junit.Test; import org.openecomp.sdc.be.model.ArtifactDefinition; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactTemplateInfoTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactTemplateInfoTest.java index 379959628c..e16540f523 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactTemplateInfoTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactTemplateInfoTest.java @@ -1,8 +1,7 @@ package org.openecomp.sdc.be.info; -import static org.junit.Assert.*; -import java.util.*; -import org.junit.Assert; +import java.util.List; + import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactTypesInfoTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactTypesInfoTest.java index 4010d9bf86..1474d9433b 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactTypesInfoTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactTypesInfoTest.java @@ -2,8 +2,6 @@ package org.openecomp.sdc.be.info; import java.util.List; -import javax.annotation.Generated; - import org.junit.Test; import org.openecomp.sdc.be.model.ArtifactType; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/CreateAndAssotiateInfoTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/CreateAndAssotiateInfoTest.java index ad8e21bb84..e39e5819d3 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/info/CreateAndAssotiateInfoTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/CreateAndAssotiateInfoTest.java @@ -1,7 +1,5 @@ package org.openecomp.sdc.be.info; -import javax.annotation.Generated; - import org.junit.Test; import org.openecomp.sdc.be.model.ComponentInstance; import org.openecomp.sdc.be.model.RequirementCapabilityRelDef; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusInfoTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusInfoTest.java index dd8a3e6eee..329743f4a7 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusInfoTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusInfoTest.java @@ -1,7 +1,5 @@ package org.openecomp.sdc.be.info; -import javax.annotation.Generated; - import org.junit.Test; import org.openecomp.sdc.common.datastructure.ESTimeBasedEvent; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusListResponseTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusListResponseTest.java index db4d735a7e..488cb31a55 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusListResponseTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusListResponseTest.java @@ -2,8 +2,6 @@ package org.openecomp.sdc.be.info; import java.util.List; -import javax.annotation.Generated; - import org.junit.Test; public class DistributionStatusListResponseTest { diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusOfServiceInfoTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusOfServiceInfoTest.java index 62b1bcbe0f..23abecb67d 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusOfServiceInfoTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusOfServiceInfoTest.java @@ -1,7 +1,5 @@ package org.openecomp.sdc.be.info; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusOfServiceListResponceTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusOfServiceListResponceTest.java index 830292a66f..4a5964aaf6 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusOfServiceListResponceTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusOfServiceListResponceTest.java @@ -2,8 +2,6 @@ package org.openecomp.sdc.be.info; import java.util.List; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/GroupDefinitionInfoTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/GroupDefinitionInfoTest.java index b2895d099c..662b96ccbf 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/info/GroupDefinitionInfoTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/GroupDefinitionInfoTest.java @@ -2,12 +2,8 @@ package org.openecomp.sdc.be.info; import java.util.List; -import javax.annotation.Generated; - import org.junit.Test; import org.openecomp.sdc.be.model.GroupProperty; -import java.util.*; -import org.junit.Assert; public class GroupDefinitionInfoTest { diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/GroupTemplateInfoTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/GroupTemplateInfoTest.java index 727a1f25d4..a77c1385a7 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/info/GroupTemplateInfoTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/GroupTemplateInfoTest.java @@ -1,7 +1,5 @@ package org.openecomp.sdc.be.info; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ServiceInfoTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ServiceInfoTest.java index 569b04d982..e8c9374447 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ServiceInfoTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ServiceInfoTest.java @@ -2,8 +2,6 @@ package org.openecomp.sdc.be.info; import java.util.List; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ServiceVersionInfoTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ServiceVersionInfoTest.java index 2b5e97e86d..d609f8090f 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ServiceVersionInfoTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ServiceVersionInfoTest.java @@ -1,7 +1,5 @@ package org.openecomp.sdc.be.info; -import javax.annotation.Generated; - import org.junit.Test; public class ServiceVersionInfoTest { diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ServicesWrapperTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ServicesWrapperTest.java index 085583aa2d..ca0006d43c 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ServicesWrapperTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ServicesWrapperTest.java @@ -2,8 +2,6 @@ package org.openecomp.sdc.be.info; import java.util.List; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ServletJsonResponseTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ServletJsonResponseTest.java index 43144113ea..9b0c5fc453 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ServletJsonResponseTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ServletJsonResponseTest.java @@ -1,7 +1,5 @@ package org.openecomp.sdc.be.info; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ToscaNodeTypeInfoTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ToscaNodeTypeInfoTest.java index c96f71b8fd..c2a1e82564 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ToscaNodeTypeInfoTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ToscaNodeTypeInfoTest.java @@ -2,8 +2,6 @@ package org.openecomp.sdc.be.info; import java.util.List; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ToscaNodeTypeInterfaceTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ToscaNodeTypeInterfaceTest.java index 80ae443afe..67b0cdfd33 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ToscaNodeTypeInterfaceTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ToscaNodeTypeInterfaceTest.java @@ -2,8 +2,6 @@ package org.openecomp.sdc.be.info; import java.util.List; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AbstractValidationsServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AbstractValidationsServletTest.java index 27963fa8cb..cee856d905 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AbstractValidationsServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AbstractValidationsServletTest.java @@ -23,43 +23,26 @@ package org.openecomp.sdc.be.servlets; import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.mock; -import java.io.File; import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.List; import java.util.Map; import java.util.stream.Stream; -import javax.servlet.http.HttpServletRequest; import javax.ws.rs.core.Response; import org.apache.commons.codec.binary.Base64; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.tinkerpop.gremlin.structure.T; -import org.glassfish.grizzly.servlet.ServletUtils; -import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import org.openecomp.sdc.be.components.impl.ComponentInstanceBusinessLogic; -import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; -import org.openecomp.sdc.be.impl.ComponentsUtils; -import org.openecomp.sdc.be.model.Resource; import org.openecomp.sdc.be.model.UploadResourceInfo; import org.openecomp.sdc.be.model.User; -import org.openecomp.sdc.be.servlets.ResourceUploadServlet.ResourceAuthorityTypeEnum; import org.openecomp.sdc.common.datastructure.Wrapper; import org.openecomp.sdc.exception.ResponseFormat; import org.slf4j.Logger; -import com.google.common.base.Supplier; -import com.google.gson.Gson; - -import aj.org.objectweb.asm.Type; import fj.data.Either; public class AbstractValidationsServletTest { diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AdditionalInformationServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AdditionalInformationServletTest.java index 0cb9906dc4..dbb1f59f62 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AdditionalInformationServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AdditionalInformationServletTest.java @@ -1,13 +1,9 @@ package org.openecomp.sdc.be.servlets; -import javax.annotation.Generated; -import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.core.Response; import org.junit.Test; -import org.openecomp.sdc.be.components.impl.AdditionalInformationBusinessLogic; -import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; public class AdditionalInformationServletTest { diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ApplicationConfig.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ApplicationConfig.java index 2dda0f5d14..6ef8091921 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ApplicationConfig.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ApplicationConfig.java @@ -31,7 +31,6 @@ import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import org.glassfish.jersey.media.multipart.MultiPart; import org.glassfish.jersey.server.ResourceConfig; import org.mockito.Mockito; -import org.openecomp.sdc.be.servlets.ResourceUploadServlet; public class ApplicationConfig extends Application { diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ArtifactServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ArtifactServletTest.java index b4d04f92a9..e546fcca55 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ArtifactServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ArtifactServletTest.java @@ -1,12 +1,9 @@ package org.openecomp.sdc.be.servlets; -import javax.annotation.Generated; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.core.Response; import org.junit.Test; -import org.openecomp.sdc.be.components.impl.ArtifactsBusinessLogic.ArtifactOperationEnum; -import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; public class ArtifactServletTest { diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AttributeServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AttributeServletTest.java index 34a475882a..692158b881 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AttributeServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AttributeServletTest.java @@ -1,6 +1,5 @@ package org.openecomp.sdc.be.servlets; -import javax.annotation.Generated; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.core.Response; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ComponentInstanceServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ComponentInstanceServletTest.java index 52ee33fd74..97b1fe2a81 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ComponentInstanceServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ComponentInstanceServletTest.java @@ -1,309 +1,136 @@ package org.openecomp.sdc.be.servlets; -import java.util.List; +import static org.junit.Assert.assertTrue; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.when; -import javax.annotation.Generated; +import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; +import javax.ws.rs.core.Application; +import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; -import org.apache.tinkerpop.gremlin.structure.T; +import org.glassfish.grizzly.http.util.HttpStatus; +import org.glassfish.hk2.utilities.binding.AbstractBinder; +import org.glassfish.jersey.server.ResourceConfig; +import org.glassfish.jersey.test.JerseyTest; +import org.glassfish.jersey.test.TestProperties; +import org.junit.BeforeClass; import org.junit.Test; +import org.mockito.Mockito; +import org.openecomp.sdc.be.components.impl.ServiceComponentInstanceBusinessLogic; +import org.openecomp.sdc.be.components.impl.VFComponentInstanceBusinessLogic; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.model.ComponentInstance; +import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; +import org.openecomp.sdc.be.impl.ComponentsUtils; +import org.openecomp.sdc.be.impl.ServletUtils; +import org.openecomp.sdc.be.impl.WebAppContextWrapper; import org.openecomp.sdc.be.model.RequirementCapabilityRelDef; +import org.openecomp.sdc.common.api.Constants; import org.openecomp.sdc.exception.ResponseFormat; +import org.springframework.web.context.WebApplicationContext; import fj.data.Either; -public class ComponentInstanceServletTest { - - private ComponentInstanceServlet createTestSubject() { - return new ComponentInstanceServlet(); - } - - - @Test - public void testCreateComponentInstance() throws Exception { - ComponentInstanceServlet testSubject; - String data = ""; - String containerComponentId = ""; - String containerComponentType = ""; - String userId = ""; - HttpServletRequest request = null; - Response result; - - // default test - testSubject = createTestSubject(); - - } - - - @Test - public void testUpdateComponentInstanceMetadata() throws Exception { - ComponentInstanceServlet testSubject; - String componentId = ""; - String componentInstanceId = ""; - String containerComponentType = ""; - HttpServletRequest request = null; - Response result; - - // default test - testSubject = createTestSubject(); - - } - - - @Test - public void testUpdateMultipleComponentInstance() throws Exception { - ComponentInstanceServlet testSubject; - String componentId = ""; - String containerComponentType = ""; - HttpServletRequest request = null; - String componentInstanceJsonArray = ""; - Response result; - - // default test - testSubject = createTestSubject(); - - } - - - @Test - public void testDeleteResourceInstance() throws Exception { - ComponentInstanceServlet testSubject; - String componentId = ""; - String resourceInstanceId = ""; - String containerComponentType = ""; - HttpServletRequest request = null; - Response result; - - // default test - testSubject = createTestSubject(); - - } - - - @Test - public void testAssociateRIToRI() throws Exception { - ComponentInstanceServlet testSubject; - String componentId = ""; - String containerComponentType = ""; - String userId = ""; - String data = ""; - HttpServletRequest request = null; - Response result; - - // default test - testSubject = createTestSubject(); - - } - - - @Test - public void testDissociateRIFromRI() throws Exception { - ComponentInstanceServlet testSubject; - String containerComponentType = ""; - String componentId = ""; - String userId = ""; - String data = ""; - HttpServletRequest request = null; - Response result; - - // default test - testSubject = createTestSubject(); - - } - - - @Test - public void testCreateAndAssociateRIToRI() throws Exception { - ComponentInstanceServlet testSubject; - String componentId = ""; - String containerComponentType = ""; - HttpServletRequest request = null; - Response result; - - // default test - testSubject = createTestSubject(); - - } - - - @Test - public void testUpdateResourceInstanceProperty() throws Exception { - ComponentInstanceServlet testSubject; - String componentId = ""; - String containerComponentType = ""; - String componentInstanceId = ""; - String userId = ""; - HttpServletRequest request = null; - Response result; - - // default test - testSubject = createTestSubject(); - - } - - - @Test - public void testUpdateResourceInstanceInput() throws Exception { - ComponentInstanceServlet testSubject; - String componentId = ""; - String containerComponentType = ""; - String componentInstanceId = ""; - String userId = ""; - HttpServletRequest request = null; - Response result; - - // default test - testSubject = createTestSubject(); - - } - - - @Test - public void testUpdateResourceInstanceAttribute() throws Exception { - ComponentInstanceServlet testSubject; - String componentId = ""; - String containerComponentType = ""; - String componentInstanceId = ""; - String userId = ""; - HttpServletRequest request = null; - Response result; - - // default test - testSubject = createTestSubject(); - - } - - - @Test - public void testDeleteResourceInstanceProperty() throws Exception { - ComponentInstanceServlet testSubject; - String componentId = ""; - String containerComponentType = ""; - String componentInstanceId = ""; - String propertyId = ""; - String userId = ""; - HttpServletRequest request = null; - Response result; - - // default test - testSubject = createTestSubject(); - - } - - - @Test - public void testChangeResourceInstanceVersion() throws Exception { - ComponentInstanceServlet testSubject; - String componentId = ""; - String componentInstanceId = ""; - String containerComponentType = ""; - HttpServletRequest request = null; - Response result; - - // default test - testSubject = createTestSubject(); - - } - - - @Test - public void testUpdateGroupInstanceProperty() throws Exception { - ComponentInstanceServlet testSubject; - String componentId = ""; - String containerComponentType = ""; - String componentInstanceId = ""; - String groupInstanceId = ""; - String userId = ""; - HttpServletRequest request = null; - Response result; - - // default test - testSubject = createTestSubject(); - - } - - - @Test - public void testGetGroupArtifactById() throws Exception { - ComponentInstanceServlet testSubject; - String containerComponentType = ""; - String componentId = ""; - String componentInstanceId = ""; - String groupInstId = ""; - HttpServletRequest request = null; - String userId = ""; - Response result; - - // default test - testSubject = createTestSubject(); - - } - - - @Test - public void testGetInstancePropertiesById() throws Exception { - ComponentInstanceServlet testSubject; - String containerComponentType = ""; - String containerComponentId = ""; - String componentInstanceUniqueId = ""; - HttpServletRequest request = null; - String userId = ""; - Response result; - - // default test - testSubject = createTestSubject(); - - } - - - @Test - public void testCreateServiceProxy() throws Exception { - ComponentInstanceServlet testSubject; - String data = ""; - String containerComponentId = ""; - String containerComponentType = ""; - String userId = ""; - HttpServletRequest request = null; - Response result; - - // default test - testSubject = createTestSubject(); - - } - - - @Test - public void testDeleteServiceProxy() throws Exception { - ComponentInstanceServlet testSubject; - String containerComponentId = ""; - String serviceProxyId = ""; - String containerComponentType = ""; - HttpServletRequest request = null; - Response result; - - // default test - testSubject = createTestSubject(); - - } - - - @Test - public void testChangeServiceProxyVersion() throws Exception { - ComponentInstanceServlet testSubject; - String containerComponentId = ""; - String serviceProxyId = ""; - String containerComponentType = ""; - HttpServletRequest request = null; - Response result; - - // default test - testSubject = createTestSubject(); - - } - - - -} \ No newline at end of file +/** + * The test suite designed for test functionality of ComponentInstanceServlet class + */ +public class ComponentInstanceServletTest extends JerseyTest { + + private final static String USER_ID = "jh0003"; + private static HttpServletRequest request; + private static HttpSession session; + private static ServletContext servletContext; + private static WebAppContextWrapper webAppContextWrapper; + private static WebApplicationContext webApplicationContext; + private static VFComponentInstanceBusinessLogic vfBusinessLogic; + private static ServiceComponentInstanceBusinessLogic serviceBusinessLogic; + private static ComponentsUtils componentsUtils; + private static ServletUtils servletUtils; + private static ResponseFormat responseFormat; + + @BeforeClass + public static void setup() { + createMocks(); + stubMethods(); + } + + @Test + public void testGetRelationByIdSuccess(){ + + String containerComponentType = "resources"; + String componentId = "componentId"; + String relationId = "relationId"; + String path = "/v1/catalog/" + containerComponentType + "/" + componentId + "/" + relationId + "/relationId"; + Either successResponse = Either.left(new RequirementCapabilityRelDef()); + when(vfBusinessLogic.getRelationById(eq(componentId), eq(relationId), eq(USER_ID), eq(ComponentTypeEnum.RESOURCE))).thenReturn(successResponse); + when(responseFormat.getStatus()).thenReturn(HttpStatus.OK_200.getStatusCode()); + when(componentsUtils.getResponseFormat(ActionStatus.OK)).thenReturn(responseFormat); + Response response = target() + .path(path) + .request(MediaType.APPLICATION_JSON) + .header("USER_ID", USER_ID) + .get( Response.class); + + assertTrue(response.getStatus() == HttpStatus.OK_200.getStatusCode()); + } + + @Test + public void testGetRelationByIdFailure(){ + + String containerComponentType = "unknown_type"; + String componentId = "componentId"; + String relationId = "relationId"; + String path = "/v1/catalog/" + containerComponentType + "/" + componentId + "/" + relationId + "/relationId"; + when(responseFormat.getStatus()).thenReturn(HttpStatus.BAD_REQUEST_400.getStatusCode()); + when(componentsUtils.getResponseFormat(eq(ActionStatus.UNSUPPORTED_ERROR), eq(containerComponentType))).thenReturn(responseFormat); + Response response = target() + .path(path) + .request(MediaType.APPLICATION_JSON) + .header("USER_ID", USER_ID) + .get( Response.class); + + assertTrue(response.getStatus() == HttpStatus.BAD_REQUEST_400.getStatusCode()); + } + + @Override + protected Application configure() { + + ResourceConfig resourceConfig = new ResourceConfig(ComponentInstanceServlet.class); + forceSet(TestProperties.CONTAINER_PORT, "0"); + + resourceConfig.register(new AbstractBinder() { + @Override + protected void configure() { + bind(request).to(HttpServletRequest.class); + } + }); + return resourceConfig; + } + + private static void createMocks() { + request = Mockito.mock(HttpServletRequest.class); + session = Mockito.mock(HttpSession.class); + servletContext = Mockito.mock(ServletContext.class); + webAppContextWrapper = Mockito.mock(WebAppContextWrapper.class); + webApplicationContext = Mockito.mock(WebApplicationContext.class); + vfBusinessLogic = Mockito.mock(VFComponentInstanceBusinessLogic.class); + serviceBusinessLogic = Mockito.mock(ServiceComponentInstanceBusinessLogic.class); + componentsUtils = Mockito.mock(ComponentsUtils.class); + servletUtils = Mockito.mock(ServletUtils.class); + responseFormat = Mockito.mock(ResponseFormat.class); + } + + private static void stubMethods() { + when(request.getSession()).thenReturn(session); + when(session.getServletContext()).thenReturn(servletContext); + when(servletContext.getAttribute(Constants.WEB_APPLICATION_CONTEXT_WRAPPER_ATTR)).thenReturn(webAppContextWrapper); + when(webAppContextWrapper.getWebAppContext(servletContext)).thenReturn(webApplicationContext); + when(webApplicationContext.getBean(VFComponentInstanceBusinessLogic.class)).thenReturn(vfBusinessLogic); + when(webApplicationContext.getBean(ServiceComponentInstanceBusinessLogic.class)).thenReturn(serviceBusinessLogic); + when(request.getHeader("USER_ID")).thenReturn(USER_ID); + when(webApplicationContext.getBean(ServletUtils.class)).thenReturn(servletUtils); + when(servletUtils.getComponentsUtils()).thenReturn(componentsUtils); + } +} diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ComponentServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ComponentServletTest.java index 3e97aa4cb0..7159f2e035 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ComponentServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ComponentServletTest.java @@ -2,7 +2,6 @@ package org.openecomp.sdc.be.servlets; import java.util.List; -import javax.annotation.Generated; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.core.Response; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ConfigMgrServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ConfigMgrServletTest.java index 4f2ca19986..4c7caa63e6 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ConfigMgrServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ConfigMgrServletTest.java @@ -1,9 +1,7 @@ package org.openecomp.sdc.be.servlets; -import javax.annotation.Generated; import javax.servlet.http.HttpServletRequest; -import org.junit.Assert; import org.junit.Test; import com.datastax.driver.core.Configuration; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ConfigServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ConfigServletTest.java index adc996eb4c..2593474f2b 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ConfigServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ConfigServletTest.java @@ -1,6 +1,5 @@ package org.openecomp.sdc.be.servlets; -import javax.annotation.Generated; import javax.servlet.http.HttpServletRequest; import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ConsumerServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ConsumerServletTest.java index 6360c5a76e..14b34a206e 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ConsumerServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ConsumerServletTest.java @@ -1,6 +1,5 @@ package org.openecomp.sdc.be.servlets; -import javax.annotation.Generated; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.core.Response; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/CsarBuildServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/CsarBuildServletTest.java index e80016a678..930fe88339 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/CsarBuildServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/CsarBuildServletTest.java @@ -1,15 +1,9 @@ package org.openecomp.sdc.be.servlets; -import javax.annotation.Generated; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.core.Response; import org.junit.Test; -import org.openecomp.sdc.be.resources.data.ESArtifactData; - -import ch.qos.logback.classic.Logger; -import java.util.*; -import org.junit.Assert; public class CsarBuildServletTest { diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/DistributionServiceServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/DistributionServiceServletTest.java index 2233b4ebac..d022faabcd 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/DistributionServiceServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/DistributionServiceServletTest.java @@ -1,6 +1,5 @@ package org.openecomp.sdc.be.servlets; -import javax.annotation.Generated; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.core.Response; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ElementServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ElementServletTest.java index 2fe68d3a90..31068ccd17 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ElementServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ElementServletTest.java @@ -2,7 +2,6 @@ package org.openecomp.sdc.be.servlets; import java.util.List; -import javax.annotation.Generated; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.core.Response; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupServletTest.java index 85b835076b..95f5174580 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupServletTest.java @@ -1,6 +1,5 @@ package org.openecomp.sdc.be.servlets; -import javax.annotation.Generated; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.core.Response; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/InputsServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/InputsServletTest.java index 9cc13d32de..9ff55c22f0 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/InputsServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/InputsServletTest.java @@ -1,6 +1,5 @@ package org.openecomp.sdc.be.servlets; -import javax.annotation.Generated; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.core.Response; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/LifecycleServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/LifecycleServletTest.java index f92e439c9a..8ea39b7443 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/LifecycleServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/LifecycleServletTest.java @@ -1,6 +1,5 @@ package org.openecomp.sdc.be.servlets; -import javax.annotation.Generated; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.core.Response; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ProductServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ProductServletTest.java index 2376ceea32..66208daaf7 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ProductServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ProductServletTest.java @@ -1,6 +1,5 @@ package org.openecomp.sdc.be.servlets; -import javax.annotation.Generated; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.core.Response; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/PropertyServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/PropertyServletTest.java index dd31364868..fe147b19a9 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/PropertyServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/PropertyServletTest.java @@ -2,7 +2,6 @@ package org.openecomp.sdc.be.servlets; import java.util.Map; -import javax.annotation.Generated; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.core.Response; @@ -13,8 +12,6 @@ import org.openecomp.sdc.be.components.impl.PropertyBusinessLogic; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.model.PropertyDefinition; -import com.google.common.collect.Multiset.Entry; - import fj.data.Either; public class PropertyServletTest { diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/RepresentationUtilsTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/RepresentationUtilsTest.java index c56fd474b4..f82fdfc1ef 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/RepresentationUtilsTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/RepresentationUtilsTest.java @@ -1,7 +1,5 @@ package org.openecomp.sdc.be.servlets; -import javax.annotation.Generated; - import org.apache.tinkerpop.gremlin.structure.T; import org.junit.Test; import org.openecomp.sdc.be.model.ArtifactDefinition; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/RequirementsServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/RequirementsServletTest.java index 4407ec6577..a7c23732ee 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/RequirementsServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/RequirementsServletTest.java @@ -1,6 +1,5 @@ package org.openecomp.sdc.be.servlets; -import javax.annotation.Generated; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.core.Response; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourceArtifactDownloadServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourceArtifactDownloadServletTest.java index b88a097412..319e59a5eb 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourceArtifactDownloadServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourceArtifactDownloadServletTest.java @@ -1,6 +1,5 @@ package org.openecomp.sdc.be.servlets; -import javax.annotation.Generated; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.core.Response; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourceServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourceServletTest.java index 107163c520..7e0c6b7647 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourceServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourceServletTest.java @@ -53,7 +53,6 @@ import org.openecomp.sdc.be.impl.WebAppContextWrapper; import org.openecomp.sdc.be.model.Resource; import org.openecomp.sdc.be.model.UploadResourceInfo; import org.openecomp.sdc.be.model.User; -import org.openecomp.sdc.be.servlets.ResourcesServlet; import org.openecomp.sdc.be.user.Role; import org.openecomp.sdc.be.user.UserBusinessLogic; import org.openecomp.sdc.common.api.Constants; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourceUploadServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourceUploadServletTest.java index 252e9d8fbc..ff69241263 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourceUploadServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourceUploadServletTest.java @@ -20,8 +20,8 @@ package org.openecomp.sdc.be.servlets; -import static org.mockito.Matchers.anyObject; -import static org.mockito.Matchers.eq; +import static org.mockito.ArgumentMatchers.anyObject; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.when; import java.io.File; @@ -58,7 +58,6 @@ import org.openecomp.sdc.be.impl.WebAppContextWrapper; import org.openecomp.sdc.be.model.UploadResourceInfo; import org.openecomp.sdc.be.resources.api.IResourceUploader; import org.openecomp.sdc.be.resources.data.ESArtifactData; -import org.openecomp.sdc.be.servlets.ResourceUploadServlet; import org.openecomp.sdc.common.api.ConfigurationSource; import org.openecomp.sdc.common.api.Constants; import org.openecomp.sdc.common.impl.ExternalConfiguration; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourcesServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourcesServletTest.java index 1844cfe188..841254e4dc 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourcesServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ResourcesServletTest.java @@ -3,11 +3,9 @@ package org.openecomp.sdc.be.servlets; import java.util.List; import java.util.Map; -import javax.annotation.Generated; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.core.Response; -import org.junit.Assert; import org.junit.Test; import org.openecomp.sdc.be.model.PropertyDefinition; import org.openecomp.sdc.be.model.Resource; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ServiceServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ServiceServletTest.java index 7a21a231d8..2b4ddfb7b4 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ServiceServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ServiceServletTest.java @@ -1,6 +1,5 @@ package org.openecomp.sdc.be.servlets; -import javax.annotation.Generated; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.core.Response; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/TypesFetchServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/TypesFetchServletTest.java index 94aaee2afc..e512d98ca9 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/TypesFetchServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/TypesFetchServletTest.java @@ -1,6 +1,5 @@ package org.openecomp.sdc.be.servlets; -import javax.annotation.Generated; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.core.Response; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/TypesUploadServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/TypesUploadServletTest.java index 8f4f57e836..37a493de37 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/TypesUploadServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/TypesUploadServletTest.java @@ -35,8 +35,6 @@ import javax.ws.rs.core.Application; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.tinkerpop.gremlin.structure.T; import org.glassfish.grizzly.http.util.HttpStatus; import org.glassfish.hk2.utilities.binding.AbstractBinder; import org.glassfish.jersey.client.ClientConfig; @@ -61,15 +59,11 @@ import org.openecomp.sdc.be.user.Role; import org.openecomp.sdc.be.user.UserBusinessLogic; import org.openecomp.sdc.common.api.ConfigurationSource; import org.openecomp.sdc.common.api.Constants; -import org.openecomp.sdc.common.datastructure.FunctionalInterfaces.ConsumerTwoParam; import org.openecomp.sdc.common.impl.ExternalConfiguration; import org.openecomp.sdc.common.impl.FSConfigurationSource; import org.openecomp.sdc.exception.ResponseFormat; import org.springframework.web.context.WebApplicationContext; -import com.google.common.base.Equivalence.Wrapper; -import com.google.common.base.Supplier; - import fj.data.Either; public class TypesUploadServletTest extends JerseyTest { diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/UserAdminServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/UserAdminServletTest.java index 6fd930c684..afa0907f25 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/UserAdminServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/UserAdminServletTest.java @@ -35,7 +35,6 @@ import javax.ws.rs.core.Response; import org.glassfish.hk2.utilities.binding.AbstractBinder; import org.glassfish.jersey.server.ResourceConfig; import org.glassfish.jersey.test.JerseyTest; -import org.junit.Assert; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/switchover/detector/SwitchoverDetectorTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/switchover/detector/SwitchoverDetectorTest.java index f93819c0a1..0562a1a80c 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/switchover/detector/SwitchoverDetectorTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/switchover/detector/SwitchoverDetectorTest.java @@ -1,7 +1,5 @@ package org.openecomp.sdc.be.switchover.detector; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ArtifactTypesTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ArtifactTypesTest.java index dec4e78008..92fc2fd4cf 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ArtifactTypesTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ArtifactTypesTest.java @@ -2,8 +2,6 @@ package org.openecomp.sdc.be.tosca; import java.util.List; -import javax.annotation.Generated; - import org.junit.Test; import org.openecomp.sdc.generator.data.ArtifactType; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/CsarUtilsTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/CsarUtilsTest.java index 8acfe6cfea..7348156923 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/CsarUtilsTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/CsarUtilsTest.java @@ -32,13 +32,10 @@ import org.junit.Before; import org.junit.Test; import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.model.ArtifactDefinition; -import org.openecomp.sdc.be.model.Component; -import org.openecomp.sdc.be.model.Resource; import org.openecomp.sdc.be.tosca.CsarUtils.NonMetaArtifactInfo; import org.openecomp.sdc.common.api.ConfigurationSource; import org.openecomp.sdc.common.impl.ExternalConfiguration; import org.openecomp.sdc.common.impl.FSConfigurationSource; -import org.openecomp.sdc.exception.ResponseFormat; import fj.data.Either; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/PropertyConvertorTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/PropertyConvertorTest.java index c77c0f10f3..139de137d9 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/PropertyConvertorTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/PropertyConvertorTest.java @@ -1,11 +1,13 @@ package org.openecomp.sdc.be.tosca; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.List; @@ -13,6 +15,7 @@ import java.util.Map; import org.junit.Before; import org.junit.Test; +import org.openecomp.sdc.be.components.utils.PropertyDataDefinitionBuilder; import org.openecomp.sdc.be.model.DataTypeDefinition; import org.openecomp.sdc.be.model.PropertyDefinition; import org.openecomp.sdc.be.model.Resource; @@ -31,7 +34,7 @@ public class PropertyConvertorTest { property = new PropertyDefinition(); property.setName("myProperty"); property.setType(ToscaPropertyType.INTEGER.getType()); - dataTypes = new HashMap(); + dataTypes = new HashMap(); dataTypes.put(property.getName(), new DataTypeDefinition()); } @@ -49,7 +52,7 @@ public class PropertyConvertorTest { property.setDefaultValue(def); ToscaProperty result = PropertyConvertor.getInstance().convertProperty(dataTypes, property, false); assertNotNull(result); - assertEquals(Integer.valueOf(def).intValue(), result.getDefaultp()); + assertEquals(Integer.valueOf(def), result.getDefaultp()); } @Test @@ -60,7 +63,7 @@ public class PropertyConvertorTest { property1.setDefaultValue("2"); dataTypes.put(property1.getName(), new DataTypeDefinition()); Resource resource = new Resource(); - List properties = new ArrayList(); + List properties = new ArrayList(); properties.add(property); properties.add(property1); resource.setProperties(properties); @@ -86,7 +89,7 @@ public class PropertyConvertorTest { property.setDefaultValue("1"); dataTypes.put(property1.getName(), new DataTypeDefinition()); Resource resource = new Resource(); - List properties = new ArrayList(); + List properties = new ArrayList(); properties.add(property); properties.add(property1); resource.setProperties(properties); @@ -106,7 +109,7 @@ public class PropertyConvertorTest { property1.setType(ToscaPropertyType.INTEGER.getType()); dataTypes.put(property1.getName(), new DataTypeDefinition()); Resource resource = new Resource(); - List properties = new ArrayList(); + List properties = new ArrayList(); properties.add(property); properties.add(property1); resource.setProperties(properties); @@ -118,4 +121,25 @@ public class PropertyConvertorTest { assertNull(prop.getDefaultp()); } } + + @Test + public void convertPropertyWhichStartsWithSemiColon() throws Exception { + PropertyDefinition property1 = new PropertyDataDefinitionBuilder() + .setDefaultValue("::") + .setType(ToscaPropertyType.STRING.getType()) + .build(); + ToscaProperty toscaProperty = PropertyConvertor.getInstance().convertProperty(Collections.emptyMap(), property1, false); + assertThat(toscaProperty.getDefaultp()).isEqualTo("::"); + } + + @Test + public void convertPropertyWhichStartsWithSlash() throws Exception { + PropertyDefinition property1 = new PropertyDataDefinitionBuilder() + .setDefaultValue("/") + .setType(ToscaPropertyType.STRING.getType()) + .build(); + ToscaProperty toscaProperty = PropertyConvertor.getInstance().convertProperty(Collections.emptyMap(), property1, false); + assertThat(toscaProperty.getDefaultp()).isEqualTo("/"); + } + } diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/SchemaFiles.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/SchemaFiles.java index fdfd1c725f..acfeaf1abc 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/SchemaFiles.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/SchemaFiles.java @@ -20,7 +20,8 @@ package org.openecomp.sdc.be.tosca; -import static org.junit.Assert.*; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import java.io.FileInputStream; import java.io.IOException; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaExportHandlerTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaExportHandlerTest.java index 7cb2ef7cf8..4399408c5c 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaExportHandlerTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaExportHandlerTest.java @@ -1,7 +1,5 @@ package org.openecomp.sdc.be.tosca; -import javax.annotation.Generated; - import org.junit.Test; import org.openecomp.sdc.be.model.Component; import org.openecomp.sdc.be.tosca.model.ToscaTemplate; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaExportUtilsTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaExportUtilsTest.java new file mode 100644 index 0000000000..4c22cf3599 --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaExportUtilsTest.java @@ -0,0 +1,124 @@ +package org.openecomp.sdc.be.tosca; + +import org.junit.Test; +import org.openecomp.sdc.be.components.impl.ServiceComponentInstanceBusinessLogic; +import org.openecomp.sdc.be.components.impl.VFComponentInstanceBusinessLogic; +import org.openecomp.sdc.be.model.operations.impl.ComponentInstanceOperation; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; + +public class ToscaExportUtilsTest { + private static Logger log = LoggerFactory.getLogger(ToscaExportUtilsTest.class.getName()); + @javax.annotation.Resource + private VFComponentInstanceBusinessLogic componentInstanceBusinessLogic; + @javax.annotation.Resource + private ServiceComponentInstanceBusinessLogic serviceInstanceBusinessLogic; + @Autowired + private ToscaExportHandler exportUtils; + @Autowired + private ComponentInstanceOperation componentInstanceOperation; + + Gson gson = new GsonBuilder().setPrettyPrinting().create(); + + @Test + public void testExportService() { + /* Resource resource1 = ResourceTestUtils.prepareResource(0); + resource1.setResourceType(ResourceTypeEnum.VF); + Either createResource1 = resourceBusinessLogic.createResource(resource1, getAdminUser(), null, null); + assertTrue(createResource1.isLeft()); + Resource certifiedVFC1 = changeResourceStateToCertify(createResource1.left().value()); + + Resource resource2 = ResourceTestUtils.prepareResource(1); + resource2.setResourceType(ResourceTypeEnum.VF); + Either createResource2 = resourceBusinessLogic.createResource(resource2, getAdminUser(), null, null); + assertTrue(createResource2.isLeft()); + Resource certifiedVFC2 = changeResourceStateToCertify(createResource2.left().value()); + + Service service = ResourceTestUtils.prepareService(0); + Either createService = serviceBusinessLogic.createService(service, getAdminUser()); + assertTrue(createService.isLeft()); + + // add VFC instance to VF + ComponentInstance vfcResourceInstance1 = new ComponentInstance(); + vfcResourceInstance1.setDescription("VFC instance 1"); + vfcResourceInstance1.setName(certifiedVFC1.getName()); + vfcResourceInstance1.setComponentUid(certifiedVFC1.getUniqueId()); + + Either createResourceVfcInstance1 = serviceInstanceBusinessLogic.createComponentInstance(ComponentTypeEnum.SERVICE_PARAM_NAME, createService.left().value().getUniqueId(), adminUser.getAttuid(), + vfcResourceInstance1); + assertTrue(createResourceVfcInstance1.isLeft()); + + ComponentInstance vfcResourceInstance2 = new ComponentInstance(); + vfcResourceInstance2.setDescription("VFC instance 2"); + vfcResourceInstance2.setName(certifiedVFC2.getName()); + vfcResourceInstance2.setComponentUid(certifiedVFC2.getUniqueId()); + Either createResourceVfcInstance2 = serviceInstanceBusinessLogic.createComponentInstance(ComponentTypeEnum.SERVICE_PARAM_NAME, createService.left().value().getUniqueId(), adminUser.getAttuid(), + vfcResourceInstance2); + assertTrue(createResourceVfcInstance2.isLeft()); + + Either serviceFetch = serviceBusinessLogic.getService(createService.left().value().getUniqueId(), adminUser); + assertTrue(serviceFetch.isLeft()); + + List componentInstances = serviceFetch.left().value().getComponentInstances(); + String ciname1 = null; + String ciname2 = null; + + for (ComponentInstance ci : componentInstances) { + if (ci.getComponentUid().equals(certifiedVFC1.getUniqueId())) { + ciname1 = ci.getName(); + } + if (ci.getComponentUid().equals(certifiedVFC2.getUniqueId())) { + ciname2 = ci.getName(); + } + } + + Either result = exportUtils.exportComponent(serviceFetch.left().value()); + assertTrue(result.isLeft()); + + String mainYaml = result.left().value().getMainYaml(); + assertNotNull(mainYaml); + + YamlToObjectConverter yamlToObjectConverter = new YamlToObjectConverter(); + assertTrue(yamlToObjectConverter.isValidYaml(mainYaml.getBytes())); + log.debug(mainYaml); + + Yaml yaml = new Yaml(); + + InputStream inputStream = new ByteArrayInputStream(mainYaml.getBytes()); + Map load = (Map) yaml.load(inputStream); + Map imports = (Map) load.get("imports"); + assertNotNull(imports); + assertEquals("Validate imports size in yml", 2, imports.size()); + + Map metadata = (Map) load.get("metadata"); + assertNotNull(metadata); + validateMetadata(metadata, serviceFetch.left().value(), false); + + Map vf1 = (Map) imports.get(certifiedVFC1.getName()); + String fileName = (String) vf1.get(ToscaExportHandler.IMPORTS_FILE_KEY); + ArtifactDefinition artifactDefinition = certifiedVFC1.getToscaArtifacts().get(ToscaExportHandler.ASSET_TOSCA_TEMPLATE); + assertEquals("Validate 1 file name", artifactDefinition.getArtifactName(), fileName); + + Map topology_template = (Map) load.get("topology_template"); + Map node_templates = (Map) topology_template.get("node_templates"); + Map inst1 = (Map) node_templates.get(ciname1); + Map inst2 = (Map) node_templates.get(ciname2); + + Map inst1MD = (Map) inst1.get("metadata"); + Map inst2MD = (Map) inst2.get("metadata"); + + validateMetadata(inst1MD, certifiedVFC1, true); + + Map vf2 = (Map) imports.get(certifiedVFC2.getName()); + fileName = (String) vf2.get(ToscaExportHandler.IMPORTS_FILE_KEY); + artifactDefinition = certifiedVFC2.getToscaArtifacts().get(ToscaExportHandler.ASSET_TOSCA_TEMPLATE); + assertEquals("Validate 2 file name", artifactDefinition.getArtifactName(), fileName); + + validateMetadata(inst2MD, certifiedVFC2, true);*/ + } + +} diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaRepresentationTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaRepresentationTest.java index 9af90bb9e4..f7c6f72932 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaRepresentationTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaRepresentationTest.java @@ -2,8 +2,6 @@ package org.openecomp.sdc.be.tosca; import java.util.List; -import javax.annotation.Generated; - import org.apache.commons.lang3.tuple.Triple; import org.junit.Test; import org.openecomp.sdc.be.model.Component; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaUtilsTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaUtilsTest.java index c3a993596c..a9c87f7f61 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaUtilsTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaUtilsTest.java @@ -3,8 +3,6 @@ package org.openecomp.sdc.be.tosca; import java.util.List; import java.util.Map; -import javax.annotation.Generated; - import org.junit.Test; import org.openecomp.sdc.be.model.Component; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/EntrySchemaTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/EntrySchemaTest.java index ca3cd411dc..f57d17d164 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/EntrySchemaTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/EntrySchemaTest.java @@ -1,7 +1,5 @@ package org.openecomp.sdc.be.tosca.model; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/SubstitutionMappingTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/SubstitutionMappingTest.java index f2e3e167df..661b8ca446 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/SubstitutionMappingTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/SubstitutionMappingTest.java @@ -2,8 +2,6 @@ package org.openecomp.sdc.be.tosca.model; import java.util.Map; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaCapabilityTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaCapabilityTest.java index 01d65939d2..ba4526a68d 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaCapabilityTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaCapabilityTest.java @@ -3,8 +3,6 @@ package org.openecomp.sdc.be.tosca.model; import java.util.List; import java.util.Map; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaGroupTemplateTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaGroupTemplateTest.java index 06ff881988..a62c480505 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaGroupTemplateTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaGroupTemplateTest.java @@ -3,8 +3,6 @@ package org.openecomp.sdc.be.tosca.model; import java.util.List; import java.util.Map; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaMetadataTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaMetadataTest.java index 6a4dc4583d..b7b7ba6514 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaMetadataTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaMetadataTest.java @@ -1,7 +1,5 @@ package org.openecomp.sdc.be.tosca.model; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaNodeTemplateTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaNodeTemplateTest.java index 599f118b32..4dab33ce14 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaNodeTemplateTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaNodeTemplateTest.java @@ -3,8 +3,6 @@ package org.openecomp.sdc.be.tosca.model; import java.util.List; import java.util.Map; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaNodeTypeTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaNodeTypeTest.java index b4cccbdbf5..3bd04f1b92 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaNodeTypeTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaNodeTypeTest.java @@ -3,8 +3,6 @@ package org.openecomp.sdc.be.tosca.model; import java.util.List; import java.util.Map; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaPropertyTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaPropertyTest.java index 75bf7ddd75..52806cc6e6 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaPropertyTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaPropertyTest.java @@ -1,7 +1,5 @@ package org.openecomp.sdc.be.tosca.model; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaRequirementTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaRequirementTest.java index 639f634d7f..9f93675252 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaRequirementTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaRequirementTest.java @@ -3,8 +3,6 @@ package org.openecomp.sdc.be.tosca.model; import java.util.List; import java.util.Map; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaTemplateCapabilityTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaTemplateCapabilityTest.java index 788361862b..224c3084ad 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaTemplateCapabilityTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaTemplateCapabilityTest.java @@ -3,8 +3,6 @@ package org.openecomp.sdc.be.tosca.model; import java.util.List; import java.util.Map; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaTemplateRequirementTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaTemplateRequirementTest.java index 5ae2a37b37..a29be8a56f 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaTemplateRequirementTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaTemplateRequirementTest.java @@ -2,8 +2,6 @@ package org.openecomp.sdc.be.tosca.model; import java.util.Map; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaTemplateTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaTemplateTest.java index 3c60e96ffb..613c7ed457 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaTemplateTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaTemplateTest.java @@ -3,8 +3,6 @@ package org.openecomp.sdc.be.tosca.model; import java.util.List; import java.util.Map; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaTopolgyTemplateTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaTopolgyTemplateTest.java index 71fe9ce8e4..5b5ac82572 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaTopolgyTemplateTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/ToscaTopolgyTemplateTest.java @@ -2,8 +2,6 @@ package org.openecomp.sdc.be.tosca.model; import java.util.Map; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/VfModuleToscaMetadataTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/VfModuleToscaMetadataTest.java index 90be98bc9c..62fb750108 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/VfModuleToscaMetadataTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/model/VfModuleToscaMetadataTest.java @@ -1,7 +1,5 @@ package org.openecomp.sdc.be.tosca.model; -import javax.annotation.Generated; - import org.junit.Test; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/common/transaction/mngr/RollbackManagerTest.java b/catalog-be/src/test/java/org/openecomp/sdc/common/transaction/mngr/RollbackManagerTest.java index 6558b140c7..9124aa3c45 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/common/transaction/mngr/RollbackManagerTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/common/transaction/mngr/RollbackManagerTest.java @@ -1,7 +1,5 @@ package org.openecomp.sdc.common.transaction.mngr; -import javax.annotation.Generated; - import org.junit.Test; import org.openecomp.sdc.common.transaction.api.RollbackHandler; import org.openecomp.sdc.common.transaction.api.TransactionUtils.DBActionCodeEnum; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/common/transaction/mngr/SdncTransactionTest.java b/catalog-be/src/test/java/org/openecomp/sdc/common/transaction/mngr/SdncTransactionTest.java index bf87033bfe..2984d25e20 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/common/transaction/mngr/SdncTransactionTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/common/transaction/mngr/SdncTransactionTest.java @@ -49,8 +49,6 @@ import org.openecomp.sdc.common.transaction.api.TransactionUtils.ESActionTypeEnu import org.openecomp.sdc.common.transaction.api.TransactionUtils.LogMessages; import org.openecomp.sdc.common.transaction.api.TransactionUtils.TransactionCodeEnum; import org.openecomp.sdc.common.transaction.api.TransactionUtils.TransactionStatusEnum; -import org.openecomp.sdc.common.transaction.mngr.CommitManager; -import org.openecomp.sdc.common.transaction.mngr.TransactionSdncImpl; import org.slf4j.Logger; import fj.data.Either; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/common/transaction/mngr/TransactionManagerTest.java b/catalog-be/src/test/java/org/openecomp/sdc/common/transaction/mngr/TransactionManagerTest.java index aca9db39c0..a2259acf02 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/common/transaction/mngr/TransactionManagerTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/common/transaction/mngr/TransactionManagerTest.java @@ -1,7 +1,5 @@ package org.openecomp.sdc.common.transaction.mngr; -import javax.annotation.Generated; - import org.junit.Test; import org.openecomp.sdc.common.transaction.api.ITransactionSdnc; import org.openecomp.sdc.common.transaction.api.TransactionUtils.ActionTypeEnum; diff --git a/catalog-be/src/test/resources/config/catalog-be/configuration.yaml b/catalog-be/src/test/resources/config/catalog-be/configuration.yaml index 8be1322c2c..2ec7124e1c 100644 --- a/catalog-be/src/test/resources/config/catalog-be/configuration.yaml +++ b/catalog-be/src/test/resources/config/catalog-be/configuration.yaml @@ -22,7 +22,7 @@ beSslPort: 8443 version: 1.0 released: 2012-11-30 -toscaConformanceLevel: 4.0 +toscaConformanceLevel: 5.0 minToscaConformanceLevel: 3.0 titanCfgFile: /home/vagrant/catalog-be/config/catalog-be/titan.properties @@ -614,3 +614,21 @@ genericAssetNodeTypes: VF : org.openecomp.resource.abstract.nodes.VF PNF: org.openecomp.resource.abstract.nodes.PNF Service: org.openecomp.resource.abstract.nodes.service + +environmentContext: + defaultValue: General_Revenue-Bearing + validValues: + - Critical_Revenue-Bearing + - Vital_Revenue-Bearing + - Essential_Revenue-Bearing + - Important_Revenue-Bearing + - Needed_Revenue-Bearing + - Useful_Revenue-Bearing + - General_Revenue-Bearing + - Critical_Non-Revenue + - Vital_Non-Revenue + - Essential_Non-Revenue + - Important_Non-Revenue + - Needed_Non-Revenue + - Useful_Non-Revenue + - General_Non-Revenue diff --git a/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeDifferentName.yaml b/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeDifferentName.yaml new file mode 100644 index 0000000000..609741721b --- /dev/null +++ b/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeDifferentName.yaml @@ -0,0 +1,3585 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: Main +imports: +- openecomp_heat_index: + file: openecomp-heat/_index.yml +- GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml +topology_template: + inputs: + vlc4_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc4_Internal2 + default: 00:80:37:0E:04:12 + sctp-a-egress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + sctp-b-ipv6-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: IPV6 start port + default: 0 + constraints: + - in_range: + - 0 + - 65535 + ncb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb1_Internal2 + default: 00:80:37:0E:09:12 + sctp-a-ipv6-ingress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + gpb8_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb8_Internal1 + default: 00:80:37:0E:10:22 + sctp-a-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + sctp-b-display_name: + hidden: false + immutable: false + type: string + description: display_name for the SecurityGroup + default: epc-sctp-b-ipv4v6-sec-group + sctp-a-ingress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-a-egress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + ncb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers ncb + default: nv.c8r32d1 + vlc3_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc3_Internal1 + default: 00:80:37:0E:03:12 + Internal2_net_cidr: + hidden: false + immutable: false + type: string + description: CIDR for internal-2 network + default: 169.255.0.0 + sctp-a-egress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-egress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + gpb4_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb4_Internal2 + default: 00:80:37:0E:0C:22 + sctp-b-ipv6-egress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + vlc8_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc8_Internal1 + default: 00:80:37:0E:08:12 + sctp-b-ipv6-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: IPV6 ending port for destination + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + fsb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb2_Internal1 + default: 00:80:37:0E:0D:12 + sctp-b-name: + hidden: false + immutable: false + type: string + description: name for the SecurityGroup + default: epc-sctp-b-ipv4v6-sec-group + sctp-b-ipv6-egress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + internal_net_id_1: + hidden: false + immutable: false + type: string + description: UUID of Internal2_net + default: e3397c69-a942-49aa-81cb-fb91ff34abc8 + sctp-a-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + internal_net_id_0: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net + default: 871de971-22ac-47b6-befb-50e7d4cb67ea + sctp_b_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN SCTPB + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPB_net_1 + sctp-a-ipv6-ingress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + sctp-b-ipv6-ingress_src_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix length + default: '0' + ncb_name_1: + hidden: false + immutable: false + type: string + description: Name of ncb2 + default: zrdm3mmex59ncb002 + ncb_name_0: + hidden: false + immutable: false + type: string + description: Name of ncb1 + default: zrdm3mmex59ncb001 + vlc_st_virtualization_type: + hidden: false + immutable: false + type: string + description: Indicates virtualization type + default: virtual-machine + vlc2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc2_Internal1 + default: 00:80:37:0E:02:12 + sctp-b-ingress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-display_name: + hidden: false + immutable: false + type: string + description: display_name for the SecurityGroup + default: epc-sctp-a-ipv4v6-sec-group + sctp-b-ingress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + int2_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for internal-2 + default: int2-sec-group + gpb5_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb5_Internal2 + default: 00:80:37:0E:0D:22 + sctp-a-egress-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: dst subnet + default: '::' + OS::stack_name: + type: string + required: false + sctp-b-egress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + Internal2_shared: + hidden: false + immutable: false + type: string + description: Whether Shared or private internal-2 network + default: false + sctp-a-ipv6-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + Internal2_rpf: + hidden: false + immutable: false + type: string + description: Reverse Path Forwarding Enabled/Disabled internal-2 network + default: disable + vlc5_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc5_Internal2 + default: 00:80:37:0E:05:12 + sctp-a-ipv6-egress_src_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + Internal1_forwarding_mode: + hidden: false + immutable: false + type: string + description: L2 or L3 forwarding mode for internal-1 network + default: l2 + gpb3_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb3_Internal1 + default: 00:80:37:0E:0B:22 + vip_oam_management_v4_ip: + hidden: false + immutable: false + type: string + description: IP address of OAM service IP address to be provisioned in A&AI + default: 107.239.72.176 + vmi_oam_preference_primary: + hidden: false + immutable: false + type: float + description: Preference for primary interface/port + default: 200 + sctp-b-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp-a-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + security_group_sctp_b_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 92a4ae54-1733-4d03-b488-f178bb9f7b82 + Internal2_forwarding_mode: + hidden: false + immutable: false + type: string + description: L2 or L3 forwarding mode for internal-2 network + default: l2 + sctp-a-ipv6-egress_dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-b-egress-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: dst subnet + default: '::' + sctp-b-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + security_group_oam_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 4ae4aa74-3e8e-4f2b-8b5f-a8bd262da96b + gpb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb2_Internal1 + default: 00:80:37:0E:0A:22 + security_group_int1_id: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net security group + default: 94c62578-835d-4801-9372-70a2cfb22683 + sctp-a-egress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + oam_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN OAM + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_OAM_net_1 + ncb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb2_Internal2 + default: 00:80:37:0E:0F:12 + vlc_st_interface_type_sctp_a: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: left + gpb3_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb3_Internal2 + default: 00:80:37:0E:0B:22 + vlc_st_interface_type_sctp_b: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: right + gpb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb1_Internal2 + default: 00:80:37:0E:09:22 + oam_net_name: + hidden: false + immutable: false + type: string + description: Network Name OAM + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_OAM_net_1 + sctp-b-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb1_Internal1 + default: 00:80:37:0E:0B:12 + sctp-b-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + vlc_st_interface_type_oam: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: management + shc_monitor_type: + hidden: false + immutable: false + type: string + description: health check + default: PING + oam_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for OAM + default: oam-sec-group + Internal2_net_gateway: + hidden: false + immutable: false + type: string + description: gateway for internal-2 network + default: 169.255.0.3 + evac_policy: + hidden: false + immutable: false + type: string + description: CMHA Policy + default: Evacuate + server_group_id_0: + hidden: false + immutable: false + type: string + description: ID of Anti-Affinity Policy-based Server Group + default: ec99a73d-38f8-4280-8103-ba8ee584629f + vlc8_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc8_Internal2 + default: 00:80:37:0E:08:12 + sctp-b-ipv6-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + gtp_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for GTP + default: gtp-sec-group + vlc_sctp_b_v6_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPB + default: fd00:200:200:5:0:0:0:24 + vlc_sctp_b_v6_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPB + default: fd00:200:200:5:0:0:0:17 + sctp-a-ipv6-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + vlc_sctp_b_v6_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPB + default: fd00:200:200:5:0:0:0:16 + vlc4_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc4_Internal1 + default: 00:80:37:0E:04:12 + vlc_sctp_b_v6_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPB + default: fd00:200:200:5:0:0:0:28 + vlc_sctp_b_v6_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPB + default: fd00:200:200:5:0:0:0:27 + vlc_sctp_b_v6_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPB + default: fd00:200:200:5:0:0:0:26 + vlc_sctp_b_v6_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPB + default: fd00:200:200:5:0:0:0:25 + sctp_b_net_name: + hidden: false + immutable: false + type: string + description: Network Name SCTPB + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPB_net_1 + sctp-b-ipv6-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: '0' + sctp-a-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + Internal1_shared: + hidden: false + immutable: false + type: string + description: Whether Shared or private internal-1 network + default: false + shc_url_path: + hidden: false + immutable: false + type: string + description: health check + default: local-ip + Internal2_net_cidr_len: + hidden: false + immutable: false + type: string + description: CIDR length for internal-2 network + default: 17 + sctp-a-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-b-ipv6-ingress_src_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + sctp-a-egress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-ingress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-b-ipv6-ingress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc_st_service_type: + hidden: false + immutable: false + type: string + description: service type + default: firewall + sctp-b-ipv6-ingress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 starting port for destination + default: 0 + vlc_st_availability_zone: + hidden: false + immutable: false + type: string + description: Indicates availability zone is enabled + default: true + vlc7_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc7_Internal1 + default: 00:80:37:0E:07:12 + fsb_volume_image_name_1: + label: MME_FSB2 + hidden: false + immutable: false + type: string + description: volume name + default: MME_FSB2_1_3_GA.qcow2 + vlc_oam_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 OAM + default: 107.239.72.151 + sctp-a-ipv6-ingress_src_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix length + default: '0' + vlc_oam_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 OAM + default: 107.239.72.152 + Internal1_allow_transit: + hidden: false + immutable: false + type: string + description: Allow/disallow transit internal-1 network + default: true + vlc_oam_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 OAM + default: 107.239.72.157 + vlc_oam_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 OAM + default: 107.239.72.158 + vlc_gtp_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 GTP + default: 107.243.47.208 + vlc_oam_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 OAM + default: 107.239.72.149 + fsb_volume_image_name_0: + label: MME_FSB1 + hidden: false + immutable: false + type: string + description: volume name + default: MME_FSB1_1_3_GA.qcow2 + vlc_gtp_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 GTP + default: 107.243.47.209 + vlc_oam_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 OAM + default: 107.239.72.150 + vlc_gtp_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 GTP + default: 107.243.47.216 + vlc_name_6: + hidden: false + immutable: false + type: string + description: Name of vlc7 + default: zrdm3mmex59vlc007 + vlc_gtp_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 GTP + default: 107.243.47.217 + vlc_name_7: + hidden: false + immutable: false + type: string + description: Name of vlc8 + default: zrdm3mmex59vlc008 + security_group_sctp_a_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 3cd8a524-77ff-4980-ae2a-d19ba70e0511 + vlc_gtp_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 GTP + default: 107.243.47.218 + vlc_gtp_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 GTP + default: 107.243.47.219 + vlc_gtp_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 GTP + default: 107.243.47.220 + vlc_name_2: + hidden: false + immutable: false + type: string + description: Name of vlc3 + default: zrdm3mmex59vlc003 + vlc_gtp_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 GTP + default: 107.243.47.221 + vlc_name_3: + hidden: false + immutable: false + type: string + description: Name of vlc4 + default: zrdm3mmex59vlc004 + vlc_name_4: + hidden: false + immutable: false + type: string + description: Name of vlc5 + default: zrdm3mmex59vlc005 + vlc_name_5: + hidden: false + immutable: false + type: string + description: Name of vlc6 + default: zrdm3mmex59vlc006 + fsb_volume_id_1: + hidden: false + immutable: false + type: string + description: ID of Cinder Volume for FSB2 + default: 5bd0560c-bfd0-47dc-a84a-554e2698c925 + sctp-a-ipv6-ingress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc_name_0: + hidden: false + immutable: false + type: string + description: Name of vlc1 + default: zrdm3mmex59vlc001 + vlc_name_1: + hidden: false + immutable: false + type: string + description: Name of vlc2 + default: zrdm3mmex59vlc002 + vlc_oam_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on OAM + sctp-b-egress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + vlc_oam_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 OAM + default: 107.239.72.155 + vlc_oam_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 OAM + default: 107.239.72.156 + vlc6_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc6_Internal1 + default: 00:80:37:0E:06:12 + fsb_volume_id_0: + hidden: false + immutable: false + type: string + description: ID of Cinder Volume for FSB1 + default: 27baa6a0-b701-4795-bf5e-4f546b350b1f + sctp-b-egress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + gpb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb2_Internal2 + default: 00:80:37:0E:0A:22 + sctp-a-ipv6-egress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + sctp-b-ipv6-egress_src_start_port: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0 + Internal2_allow_transit: + hidden: false + immutable: false + type: string + description: Allow/disallow transit internal-2 network + default: true + fsb_volume_size: + label: volume size + hidden: false + immutable: false + type: float + description: volume size 320GB + default: 320 + constraints: + - in_range: + - 0 + - 340 + sctp-b-IPv6_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv6 + gtp_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN GTP + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_GTP_net_1 + ncb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb2_Internal1 + default: 00:80:37:0E:0F:12 + sctp-b-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + sctp-b-ingress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-b-egress_src_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + gpb7_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb7_Internal2 + default: 00:80:37:0E:0F:22 + sctp-a-ipv6-ingress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 starting port for destination + default: 0 + gtp_net_name: + hidden: false + immutable: false + type: string + description: Network Name GTP + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_GTP_net_1 + sctp-b-ipv6-ingress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + domain_name: + hidden: false + immutable: false + type: string + description: Unique name of vMME contrail domain + default: default-domain + vlc5_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc5_Internal1 + default: 00:80:37:0E:05:12 + sctp-a-egress_src_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + sctp-b-egress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + shc_enabled: + hidden: false + immutable: false + type: string + description: health check + default: true + sctp-b-ipv6-ingress-dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-b-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp_a_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN SCTPA + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPA_net_1 + security_group_gtp_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: e8ad3fe2-5f95-43e4-bbcc-da97b1c22588 + sctp-a-ipv6-ingress_src_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + fsb_name_1: + hidden: false + immutable: false + type: string + description: Name of fsb1 + default: zrdm3mmex59fsb002 + sctp-b-egress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb_name_0: + hidden: false + immutable: false + type: string + description: Name of fsb1 + default: zrdm3mmex59fsb001 + sctp_a_net_name: + hidden: false + immutable: false + type: string + description: Network Name SCTPA + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPA_net_1 + sctp-b-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + gpb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb1_Internal1 + default: 00:80:37:0E:09:22 + sctp-a-ingress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb1_Internal2 + default: 00:80:37:0E:0B:12 + vlc_st_service_mode: + hidden: false + immutable: false + type: string + description: service mode + default: in-network-nat + sctp-a-ipv6-egress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + sctp-a-egress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-b-egress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-a-ingress-src_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + sctp-a-ipv6-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: IPV6 start port + default: 0 + constraints: + - in_range: + - 0 + - 65535 + vf_module_id: + hidden: false + immutable: false + type: string + description: the vf_module_id for this instance. UUID provided by ECOMP + default: TWO + Internal1_net_cidr: + hidden: false + immutable: false + type: string + description: CIDR for internal-1 network + default: 169.253.0.0 + fsb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers fsb1 + default: nv.c8r32d1 + sctp_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: 132 + vnf_name: + hidden: false + immutable: false + type: string + description: the vnf_name for this instance. provided by ECOMP + default: zrdm3mmex59 + sctp-a-IPv6_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv6 + vlc_sctp_b_v6_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPB + default: fd00:200:200:5:0:0:0:29 + vlc6_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc6_Internal2 + default: 00:80:37:0E:06:12 + sctp-b-ingress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc7_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc7_Internal2 + default: 00:80:37:0E:07:12 + sctp-a-ipv6-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: IPV6 ending port for destination + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers vlc + default: nd.c16r64d1 + sctp-b-ipv6-egress_src_addresses: + hidden: false + immutable: false + type: string + description: IPV6 source + default: local + vlc_st_interface_type_int1: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other1 + availability_zone_0: + hidden: false + immutable: false + type: string + description: cluster for spawnning fsb instances + default: rdm3-kvm-az02 + service_instance_id_0: + hidden: false + immutable: false + type: string + description: UUID of service instance for vLCs + default: 77c67cc8-d15f-47bc-aeb1-8d65d09e917a + availability_zone_1: + hidden: false + immutable: false + type: string + description: cluster for spawnning ncb instances + default: rdm3-kvm-az02 + vlc_st_interface_type_int2: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other2 + sctp-a-ipv6-egress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 start port + default: 0 + sctp-a-ipv6-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: '0' + vlc_sctp_a_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPA + default: 107.243.47.144 + vlc_sctp_b_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on SCTPB + vlc1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal1 + default: 00:80:37:0E:01:12 + sctp-b-ipv6-egress_src_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-a-ipv6-egress_src_addresses: + hidden: false + immutable: false + type: string + description: IPV6 source + default: local + vlc_sctp_a_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPA + default: 107.243.47.157 + sctp-a-ingress-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: src subnet + default: '::' + vlc_sctp_a_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPA + default: 107.243.47.156 + vlc_sctp_a_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPA + default: 107.243.47.155 + sctp-a-ingress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc_sctp_a_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPA + default: 107.243.47.154 + vlc_sctp_a_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPA + default: 107.243.47.153 + vlc_sctp_a_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPA + default: 107.243.47.152 + vlc_sctp_a_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPA + default: 107.243.47.145 + gpb6_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb6_Internal2 + default: 00:80:37:0E:0E:22 + security_group_int2_id: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net security group + default: 1361f069-baf2-4b76-b321-7f68ba26c369 + Internal2_dhcp: + hidden: false + immutable: false + type: string + description: Whether DHCP/static IP addressing on internal-2 network + default: false + sctp-a-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + pxe_image_name: + hidden: false + immutable: false + type: string + description: Name of image to use for server ncb + default: MME_PXE-Boot_1_3_GA.qcow2 + vlc_st_interface_type_gtp: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other0 + ncb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb1_Internal1 + default: 00:80:37:0E:09:12 + vlc_gtp_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on GTP + int1_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for internal-1 + default: int1-sec-group + vmi_oam_preference_secondary: + hidden: false + immutable: false + type: float + description: Preference for secondary interface/port + default: 100 + Internal1_dhcp: + hidden: false + immutable: false + type: string + description: Whether DHCP/static IP addressing on internal-1 network + default: false + fsb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb2_Internal2 + default: 00:80:37:0E:0D:12 + Internal1_net_cidr_len: + hidden: false + immutable: false + type: string + description: CIDR length for internal-1 network + default: 17 + sctp-a-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + sctp-b-ingress-src_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + fsb_oam_ip_1: + hidden: false + immutable: false + type: string + description: IP address of OAM vNIC for FSB2 + default: 107.239.72.154 + fsb_oam_ip_0: + hidden: false + immutable: false + type: string + description: IP address of OAM vNIC for FSB1 + default: 107.239.72.153 + shc_timeout: + hidden: false + immutable: false + type: string + description: health check + default: 5 + vlc_st_version: + hidden: false + immutable: false + type: string + description: Indicates service version + default: 2 + sctp-a-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp-a-ingress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + sctp-b-egress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-a-ipv6-egress_src_start_port: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0 + instance_ip_family_v6: + hidden: false + immutable: false + type: string + description: Ipv6 instance type + default: v6 + sctp-b-ingress-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: src subnet + default: '::' + gpb8_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb8_Internal2 + default: 00:80:37:0E:10:22 + gpb4_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb4_Internal1 + default: 00:80:37:0E:0C:22 + sctp-a-ipv6-ingress-dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + Internal1_net_gateway: + hidden: false + immutable: false + type: string + description: gateway for internal-1 network + default: 169.253.0.3 + sctp-b-ipv6-egress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 start port + default: 0 + gpb_name_7: + hidden: false + immutable: false + type: string + description: Name of gpb8 + default: zrdm3mmex59gpb0016 + gpb_name_6: + hidden: false + immutable: false + type: string + description: Name of gpb7 + default: zrdm3mmex59gpb0015 + gpb_name_5: + hidden: false + immutable: false + type: string + description: Name of gpb6 + default: zrdm3mmex59gpb0014 + gpb_name_4: + hidden: false + immutable: false + type: string + description: Name of gpb5 + default: zrdm3mmex59gpb0013 + gpb_name_3: + hidden: false + immutable: false + type: string + description: Name of gpb4 + default: zrdm3mmex59gpb0012 + sctp-a-ipv6-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: IPV6 destination + default: local + gpb_name_2: + hidden: false + immutable: false + type: string + description: Name of gpb3 + default: zrdm3mmex59gpb0011 + shc_delay: + hidden: false + immutable: false + type: string + description: health check + default: 3 + gpb_name_1: + hidden: false + immutable: false + type: string + description: Name of gpb2 + default: zrdm3mmex59gpb0010 + sctp-b-ipv6-egress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc3_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc3_Internal2 + default: 00:80:37:0E:03:12 + gpb_name_0: + hidden: false + immutable: false + type: string + description: Name of gpb1 + default: zrdm3mmex59gpb009 + sctp-a-ipv6-egress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + gpb5_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb5_Internal1 + default: 00:80:37:0E:0D:22 + sctp-b-ipv6-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + shc_max_retries: + hidden: false + immutable: false + type: string + description: health check + default: 2 + fsb_volume_type: + label: volume type + hidden: false + immutable: false + type: string + description: volume type SolidFire + default: SF-Default-SSD + sctp-a-name: + hidden: false + immutable: false + type: string + description: name for the SecurityGroup + default: epc-sctp-a-ipv4v6-sec-group + vlc_sctp_b_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPB + default: 107.243.47.187 + vlc_sctp_b_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPB + default: 107.243.47.186 + vlc_sctp_b_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPB + default: 107.243.47.185 + vlc_sctp_b_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPB + default: 107.243.47.184 + sctp-b-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + vnf_id: + hidden: false + immutable: false + type: string + description: the vf_id for this instance. UUID provided by ECOMP + default: zrdm3mmex59 + vlc_sctp_b_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPB + default: 107.243.47.189 + vlc_sctp_b_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPB + default: 107.243.47.188 + vlc_sctp_b_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPB + default: 107.243.47.177 + gpb6_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb6_Internal1 + default: 00:80:37:0E:0E:22 + sctp-b-ipv6-egress_dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + vlc_sctp_b_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPB + default: 107.243.47.176 + vlc2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc2_Internal2 + default: 00:80:37:0E:02:12 + sctp-b-ingress-src_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + gpb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers gpb + default: nv.c20r64d1 + vlc_sctp_a_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on SCTPA + sctp-b-ipv6-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: IPV6 destination + default: local + sctp-b-ipv6-ingress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + sctp-b-ipv6-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + sctp-a-ingress-src_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + vlc1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal2 + default: 00:80:37:0E:01:12 + Internal1_rpf: + hidden: false + immutable: false + type: string + description: Reverse Path Forwarding Enabled/Disabled internal-1 network + default: disable + sctp-b-ingress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-b-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-ipv6-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + vlc_sctp_a_v6_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPA + default: fd00:200:200:4:0:0:0:29 + vlc_sctp_a_v6_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPA + default: fd00:200:200:4:0:0:0:28 + gpb7_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb7_Internal1 + default: 00:80:37:0E:0F:22 + vlc_sctp_a_v6_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPA + default: fd00:200:200:4:0:0:0:27 + vlc_sctp_a_v6_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPA + default: fd00:200:200:4:0:0:0:26 + vlc_sctp_a_v6_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPA + default: fd00:200:200:4:0:0:0:25 + vlc_sctp_a_v6_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPA + default: fd00:200:200:4:0:0:0:24 + sctp-a-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + vlc_sctp_a_v6_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPA + default: fd00:200:200:4:0:0:0:17 + vlc_sctp_a_v6_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPA + default: fd00:200:200:4:0:0:0:16 + node_templates: + abstract_gpb_1: + type: org.openecomp.resource.abstract.nodes.gpb_1 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_1 + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb2_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb2_Internal2_network: + - get_input: internal_net_id_1 + port_gpb2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_image_name: + get_input: pxe_image_name + port_gpb2_Internal1_replacement_policy: + - AUTO + port_gpb2_Internal1_network: + - get_input: internal_net_id_0 + port_gpb2_Internal2_replacement_policy: + - AUTO + port_gpb2_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb2_Internal1_mac_address: + get_input: gpb2_Internal1_mac + port_gpb2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb2_Internal2_mac_address: + get_input: gpb2_Internal1_mac + port_gpb2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb2_Internal2_security_groups: + - - get_input: security_group_int2_id + service_template_filter: + substitute_service_template: Nested_gpb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_2__different_name: + type: org.openecomp.resource.abstract.nodes.gpb_2 + directives: + - substitutable + properties: + port_gpb3_Internal1_replacement_policy: + - AUTO + compute_gpb_name: + - get_input: gpb_name_2 + port_gpb3_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb3_Internal2_replacement_policy: + - AUTO + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb3_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb3_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb3_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb3_Internal1_network: + - get_input: internal_net_id_0 + port_gpb3_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb3_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb3_Internal1_mac_address: + get_input: gpb3_Internal1_mac + port_gpb3_Internal2_mac_address: + get_input: gpb3_Internal1_mac + port_gpb3_Internal2_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_gpb_2ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb3_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb3_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_vlc: + type: org.openecomp.resource.abstract.nodes.vlc + directives: + - substitutable + properties: + port_template_VMInt_SCTP_A_vlc_virtual_network_refs: + - - get_input: sctp_a_net_fqdn + port_template_VMInt_INT1_vlc_security_group_refs: + - - get_input: security_group_int1_id + vm_flavor_name: + get_input: vlc_flavor_name + port_template_VMInt_INT2_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + vm_image_name: + get_input: pxe_image_name + port_template_VMInt_INT1_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_INT2_vlc_virtual_network_refs: + - - get_input: internal_net_id_1 + port_template_VMInt_OAM_vlc_virtual_network_refs: + - - get_input: oam_net_fqdn + port_template_VMInt_OAM_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_INT2_vlc_virtual_machine_interface_mac_addresses: + - - get_input: vlc4_Internal2_mac + - - get_input: vlc3_Internal2_mac + - - get_input: vlc2_Internal2_mac + - - get_input: vlc1_Internal2_mac + - - get_input: vlc8_Internal2_mac + - - get_input: vlc7_Internal2_mac + - - get_input: vlc6_Internal2_mac + - - get_input: vlc5_Internal2_mac + port_template_VMInt_SCTP_B_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_GTP_vlc_security_group_refs: + - - get_input: security_group_gtp_id + compute_vlc_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_template_VMInt_OAM_vlc_security_group_refs: + - - get_input: security_group_oam_id + compute_vlc_contrail_service_instance_ind: + - true + - true + - true + - true + - true + - true + - true + - true + port_template_VMInt_GTP_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_SCTP_B_vlc_virtual_network_refs: + - - get_input: sctp_b_net_fqdn + port_template_VMInt_INT2_vlc_security_group_refs: + - - get_input: security_group_int2_id + port_template_VMInt_SCTP_B_vlc_security_group_refs: + - - get_input: security_group_sctp_b_id + port_template_VMInt_INT1_vlc_virtual_network_refs: + - - get_input: internal_net_id_0 + port_template_VMInt_SCTP_A_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + compute_vlc_scheduler_hints: + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + compute_vlc_name: + - get_input: vlc_name_3 + - get_input: vlc_name_2 + - get_input: vlc_name_1 + - get_input: vlc_name_0 + - get_input: vlc_name_7 + - get_input: vlc_name_6 + - get_input: vlc_name_5 + - get_input: vlc_name_4 + port_template_VMInt_SCTP_A_vlc_security_group_refs: + - - get_input: security_group_sctp_a_id + compute_vlc_availability_zone: + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + port_template_VMInt_INT1_vlc_virtual_machine_interface_mac_addresses: + - - get_input: vlc4_Internal1_mac + - - get_input: vlc3_Internal1_mac + - - get_input: vlc2_Internal1_mac + - - get_input: vlc1_Internal1_mac + - - get_input: vlc8_Internal1_mac + - - get_input: vlc7_Internal1_mac + - - get_input: vlc6_Internal1_mac + - - get_input: vlc5_Internal1_mac + port_template_VMInt_GTP_vlc_virtual_network_refs: + - - get_input: gtp_net_fqdn + service_template_filter: + substitute_service_template: Nested_vlcServiceTemplate.yaml + count: 8 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: vlc + nfc_naming_code: vlc + requirements: + - link_vlc_template_VMInt_INT2_vlc: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + - link_vlc_template_VMInt_INT1_vlc: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_7: + type: org.openecomp.resource.abstract.nodes.gpb_7 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_7 + port_gpb8_Internal1_mac_address: + get_input: gpb8_Internal1_mac + port_gpb8_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb8_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb8_Internal1_replacement_policy: + - AUTO + port_gpb8_Internal2_replacement_policy: + - AUTO + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb8_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb8_Internal1_network: + - get_input: internal_net_id_0 + port_gpb8_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb8_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb8_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb8_Internal2_network: + - get_input: internal_net_id_1 + port_gpb8_Internal2_mac_address: + get_input: gpb8_Internal1_mac + service_template_filter: + substitute_service_template: Nested_gpb_7ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb8_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb8_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_5: + type: org.openecomp.resource.abstract.nodes.gpb_5 + directives: + - substitutable + properties: + port_gpb6_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_name: + - get_input: gpb_name_5 + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb6_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_image_name: + get_input: pxe_image_name + port_gpb6_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb6_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb6_Internal1_network: + - get_input: internal_net_id_0 + port_gpb6_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb6_Internal2_mac_address: + get_input: gpb6_Internal1_mac + port_gpb6_Internal1_mac_address: + get_input: gpb6_Internal1_mac + port_gpb6_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb6_Internal2_replacement_policy: + - AUTO + port_gpb6_Internal1_replacement_policy: + - AUTO + port_gpb6_Internal2_security_groups: + - - get_input: security_group_int2_id + service_template_filter: + substitute_service_template: Nested_gpb_5ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb6_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb6_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_6: + type: org.openecomp.resource.abstract.nodes.gpb_6 + directives: + - substitutable + properties: + port_gpb7_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb7_Internal1_network: + - get_input: internal_net_id_0 + compute_gpb_name: + - get_input: gpb_name_6 + port_gpb7_Internal2_network: + - get_input: internal_net_id_1 + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb7_Internal1_replacement_policy: + - AUTO + port_gpb7_Internal2_replacement_policy: + - AUTO + port_gpb7_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb7_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb7_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb7_Internal2_mac_address: + get_input: gpb7_Internal1_mac + port_gpb7_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb7_Internal1_mac_address: + get_input: gpb7_Internal1_mac + port_gpb7_Internal2_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_gpb_6ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb7_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb7_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_3: + type: org.openecomp.resource.abstract.nodes.gpb_3 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_3 + port_gpb4_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb4_Internal1_mac_address: + get_input: gpb4_Internal1_mac + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb4_Internal2_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb4_Internal2_mac_address: + get_input: gpb4_Internal1_mac + vm_image_name: + get_input: pxe_image_name + port_gpb4_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb4_Internal2_replacement_policy: + - AUTO + port_gpb4_Internal1_replacement_policy: + - AUTO + port_gpb4_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb4_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb4_Internal2_network: + - get_input: internal_net_id_1 + port_gpb4_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb4_Internal1_network: + - get_input: internal_net_id_0 + service_template_filter: + substitute_service_template: Nested_gpb_3ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb4_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb4_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_4: + type: org.openecomp.resource.abstract.nodes.gpb_4 + directives: + - substitutable + properties: + port_gpb5_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb5_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_name: + - get_input: gpb_name_4 + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb5_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb5_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb5_Internal1_network: + - get_input: internal_net_id_0 + port_gpb5_Internal2_mac_address: + get_input: gpb5_Internal1_mac + port_gpb5_Internal1_mac_address: + get_input: gpb5_Internal1_mac + port_gpb5_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb5_Internal2_replacement_policy: + - AUTO + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb5_Internal1_replacement_policy: + - AUTO + port_gpb5_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb5_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + service_template_filter: + substitute_service_template: Nested_gpb_4ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb5_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb5_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb: + type: org.openecomp.resource.abstract.nodes.gpb + directives: + - substitutable + properties: + port_gpb1_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_name: + - get_input: gpb_name_0 + port_gpb1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb1_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb1_Internal1_mac_address: + get_input: gpb1_Internal1_mac + port_gpb1_Internal2_mac_address: + get_input: gpb1_Internal1_mac + port_gpb1_Internal2_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb1_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb1_Internal1_replacement_policy: + - AUTO + port_gpb1_Internal2_replacement_policy: + - AUTO + port_gpb1_Internal2_network: + - get_input: internal_net_id_1 + port_gpb1_Internal1_network: + - get_input: internal_net_id_0 + service_template_filter: + substitute_service_template: Nested_gpbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + Internal1_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_enable_dhcp: + get_input: Internal1_dhcp + network_ipam_refs_data_ipam_subnets_default_gateway: + get_input: Internal1_net_gateway + network_ipam_refs_data_ipam_subnets_subnet: + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: + get_input: Internal1_net_cidr_len + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: + get_input: Internal1_net_cidr + network_name: + str_replace: + template: $VNF_NAME_int_net_1 + params: + $VNF_NAME: + get_input: vnf_name + network_ipam_refs: + - UNSUPPORTED_RESOURCE_template_NetworkIpam_Internal1 + abstract_fsb: + type: org.openecomp.resource.abstract.nodes.fsb + directives: + - substitutable + properties: + port_FSB1_Internal1_mac_address: + get_input: fsb1_Internal1_mac + port_FSB_OAM_network_role_tag: + - oam + port_FSB1_Internal2_network: + - Internal2_net + port_FSB1_Internal1_network: + - Internal1_net + vm_flavor_name: + get_input: fsb_flavor_name + port_FSB1_Internal2_mac_address: + get_input: fsb1_Internal1_mac + port_FSB_OAM_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: true + floating_ip_count_required: + is_required: false + compute_fsb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_FSB1_Internal1_security_groups: + - - int1_security_group + port_FSB1_Internal2_replacement_policy: + - AUTO + compute_fsb_scheduler_hints: + - group: VM_Affinity_group + port_FSB1_Internal1_replacement_policy: + - AUTO + compute_fsb_name: + - get_input: fsb_name_0 + port_FSB1_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_FSB1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_network: + - get_input: oam_net_name + port_FSB_OAM_security_groups: + - - oam_security_group + port_FSB_OAM_mac_requirements: + mac_count_required: + is_required: false + port_FSB_OAM_replacement_policy: + - AUTO + compute_fsb_availability_zone: + - get_input: availability_zone_0 + port_FSB1_Internal2_security_groups: + - - int2_security_group + port_FSB1_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_FSB1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_fixed_ips: + - ip_address: + get_input: fsb_oam_ip_0 + service_template_filter: + substitute_service_template: Nested_fsbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: fsb + nfc_naming_code: fsb + requirements: + - link_fsb_FSB1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_fsb_FSB1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + gtp_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: gtp_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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 + abstract_ncb_1: + type: org.openecomp.resource.abstract.nodes.ncb_1 + directives: + - substitutable + properties: + port_NCB2_Internal2_security_groups: + - - int2_security_group + port_NCB2_Internal1_replacement_policy: + - AUTO + port_NCB2_Internal2_replacement_policy: + - AUTO + vm_flavor_name: + get_input: ncb_flavor_name + port_NCB2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_NCB2_Internal1_mac_requirements: + mac_count_required: + is_required: true + vm_image_name: + get_input: pxe_image_name + compute_ncb_scheduler_hints: + - group: VM_Affinity_group + compute_ncb_availability_zone: + - get_input: availability_zone_1 + port_NCB2_Internal1_network: + - Internal1_net + port_NCB2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_NCB2_Internal1_security_groups: + - - int1_security_group + port_NCB2_Internal2_network: + - Internal2_net + port_NCB2_Internal1_mac_address: + get_input: ncb2_Internal1_mac + port_NCB2_Internal2_mac_address: + get_input: ncb2_Internal1_mac + compute_ncb_name: + - get_input: ncb_name_1 + compute_ncb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_NCB2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + service_template_filter: + substitute_service_template: Nested_ncb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: ncb + nfc_naming_code: ncb + requirements: + - link_ncb_NCB2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_ncb_NCB2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_ncb: + type: org.openecomp.resource.abstract.nodes.ncb + directives: + - substitutable + properties: + vm_flavor_name: + get_input: ncb_flavor_name + port_NCB1_Internal2_mac_requirements: + mac_count_required: + is_required: true + vm_image_name: + get_input: pxe_image_name + port_NCB1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + compute_ncb_scheduler_hints: + - group: VM_Affinity_group + port_NCB1_Internal1_security_groups: + - - int1_security_group + compute_ncb_availability_zone: + - get_input: availability_zone_0 + port_NCB1_Internal2_mac_address: + get_input: ncb1_Internal1_mac + port_NCB1_Internal1_mac_address: + get_input: ncb1_Internal1_mac + port_NCB1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_NCB1_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_NCB1_Internal2_replacement_policy: + - AUTO + port_NCB1_Internal1_network: + - Internal1_net + port_NCB1_Internal2_security_groups: + - - int2_security_group + port_NCB1_Internal1_replacement_policy: + - AUTO + compute_ncb_name: + - get_input: ncb_name_0 + compute_ncb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_NCB1_Internal2_network: + - Internal2_net + service_template_filter: + substitute_service_template: Nested_ncbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: ncb + nfc_naming_code: ncb + requirements: + - link_ncb_NCB1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_ncb_NCB1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + int1_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: int1_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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_fsb_FSB1_Internal1 + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB2_Internal1 + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB1_Internal1 + node: abstract_ncb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB2_Internal1 + node: abstract_ncb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb1_Internal1 + node: abstract_gpb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb2_Internal1 + node: abstract_gpb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb3_Internal1 + node: abstract_gpb_2 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb4_Internal1 + node: abstract_gpb_3 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb5_Internal1 + node: abstract_gpb_4 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb6_Internal1 + node: abstract_gpb_5 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb7_Internal1 + node: abstract_gpb_6 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb8_Internal1 + node: abstract_gpb_7 + relationship: org.openecomp.relationships.AttachesTo + fsb_volume_0: + type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume + properties: + image: + get_input: fsb_volume_image_name_0 + volume_type: + get_input: fsb_volume_type + size: '(get_input : fsb_volume_size) * 1024' + name: + list_join: + - _ + - - get_input: OS::stack_name + - FSB1_Vol_1 + fsb_volume_1: + type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume + properties: + image: + get_input: fsb_volume_image_name_1 + volume_type: + get_input: fsb_volume_type + size: '(get_input : fsb_volume_size) * 1024' + name: + list_join: + - _ + - - get_input: OS::stack_name + - FSB2_Vol_1 + Internal2_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_enable_dhcp: + get_input: Internal2_dhcp + network_ipam_refs_data_ipam_subnets_default_gateway: + get_input: Internal2_net_gateway + network_ipam_refs_data_ipam_subnets_subnet: + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: + get_input: Internal2_net_cidr_len + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: + get_input: Internal2_net_cidr + network_name: + str_replace: + template: $VNF_NAME_int_net_2 + params: + $VNF_NAME: + get_input: vnf_name + network_ipam_refs: + - UNSUPPORTED_RESOURCE_template_NetworkIpam_Internal2 + int2_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: int2_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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: 132 + 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: 132 + 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: 132 + 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: 132 + 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_fsb_FSB1_Internal2 + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB2_Internal2 + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB1_Internal2 + node: abstract_ncb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB2_Internal2 + node: abstract_ncb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb1_Internal2 + node: abstract_gpb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb2_Internal2 + node: abstract_gpb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb3_Internal2 + node: abstract_gpb_2 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb4_Internal2 + node: abstract_gpb_3 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb5_Internal2 + node: abstract_gpb_4 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb6_Internal2 + node: abstract_gpb_5 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb7_Internal2 + node: abstract_gpb_6 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb8_Internal2 + node: abstract_gpb_7 + relationship: org.openecomp.relationships.AttachesTo + abstract_fsb_1: + type: org.openecomp.resource.abstract.nodes.fsb_1 + directives: + - substitutable + properties: + port_FSB_OAM_network_role_tag: + - oam + vm_flavor_name: + get_input: fsb_flavor_name + port_FSB_OAM_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: true + floating_ip_count_required: + is_required: false + port_FSB2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB2_Internal2_security_groups: + - - int2_security_group + compute_fsb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_FSB2_Internal1_mac_address: + get_input: fsb2_Internal1_mac + compute_fsb_scheduler_hints: + - group: VM_Affinity_group + compute_fsb_name: + - get_input: fsb_name_1 + port_FSB2_Internal1_security_groups: + - - int1_security_group + port_FSB_OAM_network: + - get_input: oam_net_name + port_FSB_OAM_security_groups: + - - oam_security_group + port_FSB2_Internal1_network: + - Internal1_net + port_FSB2_Internal2_mac_address: + get_input: fsb2_Internal1_mac + port_FSB2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_FSB_OAM_mac_requirements: + mac_count_required: + is_required: false + port_FSB2_Internal2_replacement_policy: + - AUTO + port_FSB2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_replacement_policy: + - AUTO + port_FSB2_Internal2_network: + - Internal2_net + port_FSB2_Internal1_replacement_policy: + - AUTO + compute_fsb_availability_zone: + - get_input: availability_zone_1 + port_FSB_OAM_fixed_ips: + - ip_address: + get_input: fsb_oam_ip_1 + port_FSB2_Internal1_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_fsb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: fsb + nfc_naming_code: fsb + requirements: + - link_fsb_FSB2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_fsb_FSB2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + oam_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: oam_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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_fsb_FSB_OAM + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB_OAM + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + groups: + vmme_gpb3_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb3.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + base_vmme_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/base_vmme.yml + description: | + Base HOT template to create vmme 2 fsb 2 ncb + members: + - int2_security_group + - oam_security_group + - gtp_security_group + - Internal2_net + - int1_security_group + - Internal1_net + - abstract_ncb + - abstract_ncb_1 + - abstract_fsb + - abstract_fsb_1 + base_vmme_volume_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/base_vmme_volume.yml + description: HOT template for vMME Cinder Volumes + members: + - fsb_volume_0 + - fsb_volume_1 + vmme_gpb1_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb1.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_gpb4_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb4.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_gpb2_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb2.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + VM_Affinity_group: + type: tosca.groups.Root + members: + - abstract_ncb + - abstract_ncb_1 + - abstract_vlc + - abstract_fsb + - abstract_fsb_1 + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_vlc_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_vlc.yml + description: | + Module HOT template to create vmme 8 vlcs + members: + - abstract_vlc + outputs: + oam_management_v4_address: + description: ID of OAM VIP to be provisioned in A&AI + value: + get_input: vip_oam_management_v4_ip + fsb_volume_id_1: + description: ID of Cinder Volume for FSB2 + value: fsb_volume_1 + security_group_sctp_b_id: + description: ID of sctpb_security_group + value: UNSUPPORTED_RESOURCE_sctpb_security_group + service_instance_id_0: + description: ID of Service Instance used for vLCs + value: UNSUPPORTED_RESOURCE_template_ServiceInstance_VLC + security_group_sctp_a_id: + description: ID of sctpa_security_group + value: UNSUPPORTED_RESOURCE_sctpa_security_group + fsb_volume_id_0: + description: ID of Cinder Volume for FSB1 + value: fsb_volume_0 + policies: + VM_Affinity_policy: + type: org.openecomp.policies.placement.Antilocate + properties: + container_type: host + targets: + - VM_Affinity_group diff --git a/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeDifferentRelationship.yaml b/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeDifferentRelationship.yaml new file mode 100644 index 0000000000..7f5f82139f --- /dev/null +++ b/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeDifferentRelationship.yaml @@ -0,0 +1,3585 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: Main +imports: +- openecomp_heat_index: + file: openecomp-heat/_index.yml +- GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml +topology_template: + inputs: + vlc4_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc4_Internal2 + default: 00:80:37:0E:04:12 + sctp-a-egress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + sctp-b-ipv6-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: IPV6 start port + default: 0 + constraints: + - in_range: + - 0 + - 65535 + ncb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb1_Internal2 + default: 00:80:37:0E:09:12 + sctp-a-ipv6-ingress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + gpb8_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb8_Internal1 + default: 00:80:37:0E:10:22 + sctp-a-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + sctp-b-display_name: + hidden: false + immutable: false + type: string + description: display_name for the SecurityGroup + default: epc-sctp-b-ipv4v6-sec-group + sctp-a-ingress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-a-egress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + ncb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers ncb + default: nv.c8r32d1 + vlc3_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc3_Internal1 + default: 00:80:37:0E:03:12 + Internal2_net_cidr: + hidden: false + immutable: false + type: string + description: CIDR for internal-2 network + default: 169.255.0.0 + sctp-a-egress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-egress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + gpb4_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb4_Internal2 + default: 00:80:37:0E:0C:22 + sctp-b-ipv6-egress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + vlc8_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc8_Internal1 + default: 00:80:37:0E:08:12 + sctp-b-ipv6-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: IPV6 ending port for destination + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + fsb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb2_Internal1 + default: 00:80:37:0E:0D:12 + sctp-b-name: + hidden: false + immutable: false + type: string + description: name for the SecurityGroup + default: epc-sctp-b-ipv4v6-sec-group + sctp-b-ipv6-egress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + internal_net_id_1: + hidden: false + immutable: false + type: string + description: UUID of Internal2_net + default: e3397c69-a942-49aa-81cb-fb91ff34abc8 + sctp-a-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + internal_net_id_0: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net + default: 871de971-22ac-47b6-befb-50e7d4cb67ea + sctp_b_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN SCTPB + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPB_net_1 + sctp-a-ipv6-ingress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + sctp-b-ipv6-ingress_src_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix length + default: '0' + ncb_name_1: + hidden: false + immutable: false + type: string + description: Name of ncb2 + default: zrdm3mmex59ncb002 + ncb_name_0: + hidden: false + immutable: false + type: string + description: Name of ncb1 + default: zrdm3mmex59ncb001 + vlc_st_virtualization_type: + hidden: false + immutable: false + type: string + description: Indicates virtualization type + default: virtual-machine + vlc2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc2_Internal1 + default: 00:80:37:0E:02:12 + sctp-b-ingress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-display_name: + hidden: false + immutable: false + type: string + description: display_name for the SecurityGroup + default: epc-sctp-a-ipv4v6-sec-group + sctp-b-ingress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + int2_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for internal-2 + default: int2-sec-group + gpb5_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb5_Internal2 + default: 00:80:37:0E:0D:22 + sctp-a-egress-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: dst subnet + default: '::' + OS::stack_name: + type: string + required: false + sctp-b-egress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + Internal2_shared: + hidden: false + immutable: false + type: string + description: Whether Shared or private internal-2 network + default: false + sctp-a-ipv6-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + Internal2_rpf: + hidden: false + immutable: false + type: string + description: Reverse Path Forwarding Enabled/Disabled internal-2 network + default: disable + vlc5_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc5_Internal2 + default: 00:80:37:0E:05:12 + sctp-a-ipv6-egress_src_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + Internal1_forwarding_mode: + hidden: false + immutable: false + type: string + description: L2 or L3 forwarding mode for internal-1 network + default: l2 + gpb3_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb3_Internal1 + default: 00:80:37:0E:0B:22 + vip_oam_management_v4_ip: + hidden: false + immutable: false + type: string + description: IP address of OAM service IP address to be provisioned in A&AI + default: 107.239.72.176 + vmi_oam_preference_primary: + hidden: false + immutable: false + type: float + description: Preference for primary interface/port + default: 200 + sctp-b-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp-a-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + security_group_sctp_b_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 92a4ae54-1733-4d03-b488-f178bb9f7b82 + Internal2_forwarding_mode: + hidden: false + immutable: false + type: string + description: L2 or L3 forwarding mode for internal-2 network + default: l2 + sctp-a-ipv6-egress_dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-b-egress-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: dst subnet + default: '::' + sctp-b-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + security_group_oam_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 4ae4aa74-3e8e-4f2b-8b5f-a8bd262da96b + gpb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb2_Internal1 + default: 00:80:37:0E:0A:22 + security_group_int1_id: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net security group + default: 94c62578-835d-4801-9372-70a2cfb22683 + sctp-a-egress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + oam_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN OAM + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_OAM_net_1 + ncb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb2_Internal2 + default: 00:80:37:0E:0F:12 + vlc_st_interface_type_sctp_a: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: left + gpb3_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb3_Internal2 + default: 00:80:37:0E:0B:22 + vlc_st_interface_type_sctp_b: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: right + gpb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb1_Internal2 + default: 00:80:37:0E:09:22 + oam_net_name: + hidden: false + immutable: false + type: string + description: Network Name OAM + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_OAM_net_1 + sctp-b-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb1_Internal1 + default: 00:80:37:0E:0B:12 + sctp-b-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + vlc_st_interface_type_oam: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: management + shc_monitor_type: + hidden: false + immutable: false + type: string + description: health check + default: PING + oam_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for OAM + default: oam-sec-group + Internal2_net_gateway: + hidden: false + immutable: false + type: string + description: gateway for internal-2 network + default: 169.255.0.3 + evac_policy: + hidden: false + immutable: false + type: string + description: CMHA Policy + default: Evacuate + server_group_id_0: + hidden: false + immutable: false + type: string + description: ID of Anti-Affinity Policy-based Server Group + default: ec99a73d-38f8-4280-8103-ba8ee584629f + vlc8_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc8_Internal2 + default: 00:80:37:0E:08:12 + sctp-b-ipv6-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + gtp_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for GTP + default: gtp-sec-group + vlc_sctp_b_v6_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPB + default: fd00:200:200:5:0:0:0:24 + vlc_sctp_b_v6_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPB + default: fd00:200:200:5:0:0:0:17 + sctp-a-ipv6-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + vlc_sctp_b_v6_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPB + default: fd00:200:200:5:0:0:0:16 + vlc4_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc4_Internal1 + default: 00:80:37:0E:04:12 + vlc_sctp_b_v6_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPB + default: fd00:200:200:5:0:0:0:28 + vlc_sctp_b_v6_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPB + default: fd00:200:200:5:0:0:0:27 + vlc_sctp_b_v6_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPB + default: fd00:200:200:5:0:0:0:26 + vlc_sctp_b_v6_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPB + default: fd00:200:200:5:0:0:0:25 + sctp_b_net_name: + hidden: false + immutable: false + type: string + description: Network Name SCTPB + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPB_net_1 + sctp-b-ipv6-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: '0' + sctp-a-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + Internal1_shared: + hidden: false + immutable: false + type: string + description: Whether Shared or private internal-1 network + default: false + shc_url_path: + hidden: false + immutable: false + type: string + description: health check + default: local-ip + Internal2_net_cidr_len: + hidden: false + immutable: false + type: string + description: CIDR length for internal-2 network + default: 17 + sctp-a-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-b-ipv6-ingress_src_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + sctp-a-egress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-ingress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-b-ipv6-ingress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc_st_service_type: + hidden: false + immutable: false + type: string + description: service type + default: firewall + sctp-b-ipv6-ingress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 starting port for destination + default: 0 + vlc_st_availability_zone: + hidden: false + immutable: false + type: string + description: Indicates availability zone is enabled + default: true + vlc7_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc7_Internal1 + default: 00:80:37:0E:07:12 + fsb_volume_image_name_1: + label: MME_FSB2 + hidden: false + immutable: false + type: string + description: volume name + default: MME_FSB2_1_3_GA.qcow2 + vlc_oam_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 OAM + default: 107.239.72.151 + sctp-a-ipv6-ingress_src_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix length + default: '0' + vlc_oam_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 OAM + default: 107.239.72.152 + Internal1_allow_transit: + hidden: false + immutable: false + type: string + description: Allow/disallow transit internal-1 network + default: true + vlc_oam_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 OAM + default: 107.239.72.157 + vlc_oam_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 OAM + default: 107.239.72.158 + vlc_gtp_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 GTP + default: 107.243.47.208 + vlc_oam_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 OAM + default: 107.239.72.149 + fsb_volume_image_name_0: + label: MME_FSB1 + hidden: false + immutable: false + type: string + description: volume name + default: MME_FSB1_1_3_GA.qcow2 + vlc_gtp_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 GTP + default: 107.243.47.209 + vlc_oam_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 OAM + default: 107.239.72.150 + vlc_gtp_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 GTP + default: 107.243.47.216 + vlc_name_6: + hidden: false + immutable: false + type: string + description: Name of vlc7 + default: zrdm3mmex59vlc007 + vlc_gtp_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 GTP + default: 107.243.47.217 + vlc_name_7: + hidden: false + immutable: false + type: string + description: Name of vlc8 + default: zrdm3mmex59vlc008 + security_group_sctp_a_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 3cd8a524-77ff-4980-ae2a-d19ba70e0511 + vlc_gtp_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 GTP + default: 107.243.47.218 + vlc_gtp_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 GTP + default: 107.243.47.219 + vlc_gtp_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 GTP + default: 107.243.47.220 + vlc_name_2: + hidden: false + immutable: false + type: string + description: Name of vlc3 + default: zrdm3mmex59vlc003 + vlc_gtp_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 GTP + default: 107.243.47.221 + vlc_name_3: + hidden: false + immutable: false + type: string + description: Name of vlc4 + default: zrdm3mmex59vlc004 + vlc_name_4: + hidden: false + immutable: false + type: string + description: Name of vlc5 + default: zrdm3mmex59vlc005 + vlc_name_5: + hidden: false + immutable: false + type: string + description: Name of vlc6 + default: zrdm3mmex59vlc006 + fsb_volume_id_1: + hidden: false + immutable: false + type: string + description: ID of Cinder Volume for FSB2 + default: 5bd0560c-bfd0-47dc-a84a-554e2698c925 + sctp-a-ipv6-ingress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc_name_0: + hidden: false + immutable: false + type: string + description: Name of vlc1 + default: zrdm3mmex59vlc001 + vlc_name_1: + hidden: false + immutable: false + type: string + description: Name of vlc2 + default: zrdm3mmex59vlc002 + vlc_oam_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on OAM + sctp-b-egress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + vlc_oam_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 OAM + default: 107.239.72.155 + vlc_oam_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 OAM + default: 107.239.72.156 + vlc6_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc6_Internal1 + default: 00:80:37:0E:06:12 + fsb_volume_id_0: + hidden: false + immutable: false + type: string + description: ID of Cinder Volume for FSB1 + default: 27baa6a0-b701-4795-bf5e-4f546b350b1f + sctp-b-egress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + gpb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb2_Internal2 + default: 00:80:37:0E:0A:22 + sctp-a-ipv6-egress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + sctp-b-ipv6-egress_src_start_port: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0 + Internal2_allow_transit: + hidden: false + immutable: false + type: string + description: Allow/disallow transit internal-2 network + default: true + fsb_volume_size: + label: volume size + hidden: false + immutable: false + type: float + description: volume size 320GB + default: 320 + constraints: + - in_range: + - 0 + - 340 + sctp-b-IPv6_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv6 + gtp_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN GTP + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_GTP_net_1 + ncb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb2_Internal1 + default: 00:80:37:0E:0F:12 + sctp-b-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + sctp-b-ingress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-b-egress_src_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + gpb7_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb7_Internal2 + default: 00:80:37:0E:0F:22 + sctp-a-ipv6-ingress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 starting port for destination + default: 0 + gtp_net_name: + hidden: false + immutable: false + type: string + description: Network Name GTP + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_GTP_net_1 + sctp-b-ipv6-ingress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + domain_name: + hidden: false + immutable: false + type: string + description: Unique name of vMME contrail domain + default: default-domain + vlc5_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc5_Internal1 + default: 00:80:37:0E:05:12 + sctp-a-egress_src_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + sctp-b-egress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + shc_enabled: + hidden: false + immutable: false + type: string + description: health check + default: true + sctp-b-ipv6-ingress-dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-b-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp_a_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN SCTPA + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPA_net_1 + security_group_gtp_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: e8ad3fe2-5f95-43e4-bbcc-da97b1c22588 + sctp-a-ipv6-ingress_src_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + fsb_name_1: + hidden: false + immutable: false + type: string + description: Name of fsb1 + default: zrdm3mmex59fsb002 + sctp-b-egress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb_name_0: + hidden: false + immutable: false + type: string + description: Name of fsb1 + default: zrdm3mmex59fsb001 + sctp_a_net_name: + hidden: false + immutable: false + type: string + description: Network Name SCTPA + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPA_net_1 + sctp-b-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + gpb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb1_Internal1 + default: 00:80:37:0E:09:22 + sctp-a-ingress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb1_Internal2 + default: 00:80:37:0E:0B:12 + vlc_st_service_mode: + hidden: false + immutable: false + type: string + description: service mode + default: in-network-nat + sctp-a-ipv6-egress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + sctp-a-egress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-b-egress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-a-ingress-src_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + sctp-a-ipv6-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: IPV6 start port + default: 0 + constraints: + - in_range: + - 0 + - 65535 + vf_module_id: + hidden: false + immutable: false + type: string + description: the vf_module_id for this instance. UUID provided by ECOMP + default: TWO + Internal1_net_cidr: + hidden: false + immutable: false + type: string + description: CIDR for internal-1 network + default: 169.253.0.0 + fsb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers fsb1 + default: nv.c8r32d1 + sctp_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: 132 + vnf_name: + hidden: false + immutable: false + type: string + description: the vnf_name for this instance. provided by ECOMP + default: zrdm3mmex59 + sctp-a-IPv6_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv6 + vlc_sctp_b_v6_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPB + default: fd00:200:200:5:0:0:0:29 + vlc6_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc6_Internal2 + default: 00:80:37:0E:06:12 + sctp-b-ingress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc7_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc7_Internal2 + default: 00:80:37:0E:07:12 + sctp-a-ipv6-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: IPV6 ending port for destination + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers vlc + default: nd.c16r64d1 + sctp-b-ipv6-egress_src_addresses: + hidden: false + immutable: false + type: string + description: IPV6 source + default: local + vlc_st_interface_type_int1: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other1 + availability_zone_0: + hidden: false + immutable: false + type: string + description: cluster for spawnning fsb instances + default: rdm3-kvm-az02 + service_instance_id_0: + hidden: false + immutable: false + type: string + description: UUID of service instance for vLCs + default: 77c67cc8-d15f-47bc-aeb1-8d65d09e917a + availability_zone_1: + hidden: false + immutable: false + type: string + description: cluster for spawnning ncb instances + default: rdm3-kvm-az02 + vlc_st_interface_type_int2: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other2 + sctp-a-ipv6-egress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 start port + default: 0 + sctp-a-ipv6-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: '0' + vlc_sctp_a_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPA + default: 107.243.47.144 + vlc_sctp_b_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on SCTPB + vlc1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal1 + default: 00:80:37:0E:01:12 + sctp-b-ipv6-egress_src_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-a-ipv6-egress_src_addresses: + hidden: false + immutable: false + type: string + description: IPV6 source + default: local + vlc_sctp_a_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPA + default: 107.243.47.157 + sctp-a-ingress-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: src subnet + default: '::' + vlc_sctp_a_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPA + default: 107.243.47.156 + vlc_sctp_a_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPA + default: 107.243.47.155 + sctp-a-ingress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc_sctp_a_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPA + default: 107.243.47.154 + vlc_sctp_a_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPA + default: 107.243.47.153 + vlc_sctp_a_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPA + default: 107.243.47.152 + vlc_sctp_a_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPA + default: 107.243.47.145 + gpb6_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb6_Internal2 + default: 00:80:37:0E:0E:22 + security_group_int2_id: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net security group + default: 1361f069-baf2-4b76-b321-7f68ba26c369 + Internal2_dhcp: + hidden: false + immutable: false + type: string + description: Whether DHCP/static IP addressing on internal-2 network + default: false + sctp-a-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + pxe_image_name: + hidden: false + immutable: false + type: string + description: Name of image to use for server ncb + default: MME_PXE-Boot_1_3_GA.qcow2 + vlc_st_interface_type_gtp: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other0 + ncb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb1_Internal1 + default: 00:80:37:0E:09:12 + vlc_gtp_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on GTP + int1_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for internal-1 + default: int1-sec-group + vmi_oam_preference_secondary: + hidden: false + immutable: false + type: float + description: Preference for secondary interface/port + default: 100 + Internal1_dhcp: + hidden: false + immutable: false + type: string + description: Whether DHCP/static IP addressing on internal-1 network + default: false + fsb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb2_Internal2 + default: 00:80:37:0E:0D:12 + Internal1_net_cidr_len: + hidden: false + immutable: false + type: string + description: CIDR length for internal-1 network + default: 17 + sctp-a-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + sctp-b-ingress-src_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + fsb_oam_ip_1: + hidden: false + immutable: false + type: string + description: IP address of OAM vNIC for FSB2 + default: 107.239.72.154 + fsb_oam_ip_0: + hidden: false + immutable: false + type: string + description: IP address of OAM vNIC for FSB1 + default: 107.239.72.153 + shc_timeout: + hidden: false + immutable: false + type: string + description: health check + default: 5 + vlc_st_version: + hidden: false + immutable: false + type: string + description: Indicates service version + default: 2 + sctp-a-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp-a-ingress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + sctp-b-egress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-a-ipv6-egress_src_start_port: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0 + instance_ip_family_v6: + hidden: false + immutable: false + type: string + description: Ipv6 instance type + default: v6 + sctp-b-ingress-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: src subnet + default: '::' + gpb8_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb8_Internal2 + default: 00:80:37:0E:10:22 + gpb4_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb4_Internal1 + default: 00:80:37:0E:0C:22 + sctp-a-ipv6-ingress-dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + Internal1_net_gateway: + hidden: false + immutable: false + type: string + description: gateway for internal-1 network + default: 169.253.0.3 + sctp-b-ipv6-egress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 start port + default: 0 + gpb_name_7: + hidden: false + immutable: false + type: string + description: Name of gpb8 + default: zrdm3mmex59gpb0016 + gpb_name_6: + hidden: false + immutable: false + type: string + description: Name of gpb7 + default: zrdm3mmex59gpb0015 + gpb_name_5: + hidden: false + immutable: false + type: string + description: Name of gpb6 + default: zrdm3mmex59gpb0014 + gpb_name_4: + hidden: false + immutable: false + type: string + description: Name of gpb5 + default: zrdm3mmex59gpb0013 + gpb_name_3: + hidden: false + immutable: false + type: string + description: Name of gpb4 + default: zrdm3mmex59gpb0012 + sctp-a-ipv6-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: IPV6 destination + default: local + gpb_name_2: + hidden: false + immutable: false + type: string + description: Name of gpb3 + default: zrdm3mmex59gpb0011 + shc_delay: + hidden: false + immutable: false + type: string + description: health check + default: 3 + gpb_name_1: + hidden: false + immutable: false + type: string + description: Name of gpb2 + default: zrdm3mmex59gpb0010 + sctp-b-ipv6-egress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc3_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc3_Internal2 + default: 00:80:37:0E:03:12 + gpb_name_0: + hidden: false + immutable: false + type: string + description: Name of gpb1 + default: zrdm3mmex59gpb009 + sctp-a-ipv6-egress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + gpb5_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb5_Internal1 + default: 00:80:37:0E:0D:22 + sctp-b-ipv6-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + shc_max_retries: + hidden: false + immutable: false + type: string + description: health check + default: 2 + fsb_volume_type: + label: volume type + hidden: false + immutable: false + type: string + description: volume type SolidFire + default: SF-Default-SSD + sctp-a-name: + hidden: false + immutable: false + type: string + description: name for the SecurityGroup + default: epc-sctp-a-ipv4v6-sec-group + vlc_sctp_b_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPB + default: 107.243.47.187 + vlc_sctp_b_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPB + default: 107.243.47.186 + vlc_sctp_b_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPB + default: 107.243.47.185 + vlc_sctp_b_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPB + default: 107.243.47.184 + sctp-b-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + vnf_id: + hidden: false + immutable: false + type: string + description: the vf_id for this instance. UUID provided by ECOMP + default: zrdm3mmex59 + vlc_sctp_b_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPB + default: 107.243.47.189 + vlc_sctp_b_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPB + default: 107.243.47.188 + vlc_sctp_b_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPB + default: 107.243.47.177 + gpb6_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb6_Internal1 + default: 00:80:37:0E:0E:22 + sctp-b-ipv6-egress_dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + vlc_sctp_b_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPB + default: 107.243.47.176 + vlc2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc2_Internal2 + default: 00:80:37:0E:02:12 + sctp-b-ingress-src_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + gpb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers gpb + default: nv.c20r64d1 + vlc_sctp_a_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on SCTPA + sctp-b-ipv6-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: IPV6 destination + default: local + sctp-b-ipv6-ingress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + sctp-b-ipv6-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + sctp-a-ingress-src_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + vlc1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal2 + default: 00:80:37:0E:01:12 + Internal1_rpf: + hidden: false + immutable: false + type: string + description: Reverse Path Forwarding Enabled/Disabled internal-1 network + default: disable + sctp-b-ingress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-b-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-ipv6-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + vlc_sctp_a_v6_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPA + default: fd00:200:200:4:0:0:0:29 + vlc_sctp_a_v6_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPA + default: fd00:200:200:4:0:0:0:28 + gpb7_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb7_Internal1 + default: 00:80:37:0E:0F:22 + vlc_sctp_a_v6_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPA + default: fd00:200:200:4:0:0:0:27 + vlc_sctp_a_v6_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPA + default: fd00:200:200:4:0:0:0:26 + vlc_sctp_a_v6_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPA + default: fd00:200:200:4:0:0:0:25 + vlc_sctp_a_v6_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPA + default: fd00:200:200:4:0:0:0:24 + sctp-a-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + vlc_sctp_a_v6_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPA + default: fd00:200:200:4:0:0:0:17 + vlc_sctp_a_v6_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPA + default: fd00:200:200:4:0:0:0:16 + node_templates: + abstract_gpb_1: + type: org.openecomp.resource.abstract.nodes.gpb_1 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_1 + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb2_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb2_Internal2_network: + - get_input: internal_net_id_1 + port_gpb2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_image_name: + get_input: pxe_image_name + port_gpb2_Internal1_replacement_policy: + - AUTO + port_gpb2_Internal1_network: + - get_input: internal_net_id_0 + port_gpb2_Internal2_replacement_policy: + - AUTO + port_gpb2_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb2_Internal1_mac_address: + get_input: gpb2_Internal1_mac + port_gpb2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb2_Internal2_mac_address: + get_input: gpb2_Internal1_mac + port_gpb2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb2_Internal2_security_groups: + - - get_input: security_group_int2_id + service_template_filter: + substitute_service_template: Nested_gpb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.BindsTo + abstract_gpb_2: + type: org.openecomp.resource.abstract.nodes.gpb_2 + directives: + - substitutable + properties: + port_gpb3_Internal1_replacement_policy: + - AUTO + compute_gpb_name: + - get_input: gpb_name_2 + port_gpb3_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb3_Internal2_replacement_policy: + - AUTO + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb3_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb3_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb3_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb3_Internal1_network: + - get_input: internal_net_id_0 + port_gpb3_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb3_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb3_Internal1_mac_address: + get_input: gpb3_Internal1_mac + port_gpb3_Internal2_mac_address: + get_input: gpb3_Internal1_mac + port_gpb3_Internal2_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_gpb_2ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb3_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb3_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_vlc: + type: org.openecomp.resource.abstract.nodes.vlc + directives: + - substitutable + properties: + port_template_VMInt_SCTP_A_vlc_virtual_network_refs: + - - get_input: sctp_a_net_fqdn + port_template_VMInt_INT1_vlc_security_group_refs: + - - get_input: security_group_int1_id + vm_flavor_name: + get_input: vlc_flavor_name + port_template_VMInt_INT2_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + vm_image_name: + get_input: pxe_image_name + port_template_VMInt_INT1_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_INT2_vlc_virtual_network_refs: + - - get_input: internal_net_id_1 + port_template_VMInt_OAM_vlc_virtual_network_refs: + - - get_input: oam_net_fqdn + port_template_VMInt_OAM_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_INT2_vlc_virtual_machine_interface_mac_addresses: + - - get_input: vlc4_Internal2_mac + - - get_input: vlc3_Internal2_mac + - - get_input: vlc2_Internal2_mac + - - get_input: vlc1_Internal2_mac + - - get_input: vlc8_Internal2_mac + - - get_input: vlc7_Internal2_mac + - - get_input: vlc6_Internal2_mac + - - get_input: vlc5_Internal2_mac + port_template_VMInt_SCTP_B_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_GTP_vlc_security_group_refs: + - - get_input: security_group_gtp_id + compute_vlc_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_template_VMInt_OAM_vlc_security_group_refs: + - - get_input: security_group_oam_id + compute_vlc_contrail_service_instance_ind: + - true + - true + - true + - true + - true + - true + - true + - true + port_template_VMInt_GTP_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_SCTP_B_vlc_virtual_network_refs: + - - get_input: sctp_b_net_fqdn + port_template_VMInt_INT2_vlc_security_group_refs: + - - get_input: security_group_int2_id + port_template_VMInt_SCTP_B_vlc_security_group_refs: + - - get_input: security_group_sctp_b_id + port_template_VMInt_INT1_vlc_virtual_network_refs: + - - get_input: internal_net_id_0 + port_template_VMInt_SCTP_A_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + compute_vlc_scheduler_hints: + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + compute_vlc_name: + - get_input: vlc_name_3 + - get_input: vlc_name_2 + - get_input: vlc_name_1 + - get_input: vlc_name_0 + - get_input: vlc_name_7 + - get_input: vlc_name_6 + - get_input: vlc_name_5 + - get_input: vlc_name_4 + port_template_VMInt_SCTP_A_vlc_security_group_refs: + - - get_input: security_group_sctp_a_id + compute_vlc_availability_zone: + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + port_template_VMInt_INT1_vlc_virtual_machine_interface_mac_addresses: + - - get_input: vlc4_Internal1_mac + - - get_input: vlc3_Internal1_mac + - - get_input: vlc2_Internal1_mac + - - get_input: vlc1_Internal1_mac + - - get_input: vlc8_Internal1_mac + - - get_input: vlc7_Internal1_mac + - - get_input: vlc6_Internal1_mac + - - get_input: vlc5_Internal1_mac + port_template_VMInt_GTP_vlc_virtual_network_refs: + - - get_input: gtp_net_fqdn + service_template_filter: + substitute_service_template: Nested_vlcServiceTemplate.yaml + count: 8 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: vlc + nfc_naming_code: vlc + requirements: + - link_vlc_template_VMInt_INT2_vlc: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + - link_vlc_template_VMInt_INT1_vlc: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_7: + type: org.openecomp.resource.abstract.nodes.gpb_7 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_7 + port_gpb8_Internal1_mac_address: + get_input: gpb8_Internal1_mac + port_gpb8_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb8_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb8_Internal1_replacement_policy: + - AUTO + port_gpb8_Internal2_replacement_policy: + - AUTO + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb8_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb8_Internal1_network: + - get_input: internal_net_id_0 + port_gpb8_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb8_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb8_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb8_Internal2_network: + - get_input: internal_net_id_1 + port_gpb8_Internal2_mac_address: + get_input: gpb8_Internal1_mac + service_template_filter: + substitute_service_template: Nested_gpb_7ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb8_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb8_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_5: + type: org.openecomp.resource.abstract.nodes.gpb_5 + directives: + - substitutable + properties: + port_gpb6_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_name: + - get_input: gpb_name_5 + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb6_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_image_name: + get_input: pxe_image_name + port_gpb6_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb6_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb6_Internal1_network: + - get_input: internal_net_id_0 + port_gpb6_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb6_Internal2_mac_address: + get_input: gpb6_Internal1_mac + port_gpb6_Internal1_mac_address: + get_input: gpb6_Internal1_mac + port_gpb6_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb6_Internal2_replacement_policy: + - AUTO + port_gpb6_Internal1_replacement_policy: + - AUTO + port_gpb6_Internal2_security_groups: + - - get_input: security_group_int2_id + service_template_filter: + substitute_service_template: Nested_gpb_5ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb6_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb6_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_6: + type: org.openecomp.resource.abstract.nodes.gpb_6 + directives: + - substitutable + properties: + port_gpb7_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb7_Internal1_network: + - get_input: internal_net_id_0 + compute_gpb_name: + - get_input: gpb_name_6 + port_gpb7_Internal2_network: + - get_input: internal_net_id_1 + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb7_Internal1_replacement_policy: + - AUTO + port_gpb7_Internal2_replacement_policy: + - AUTO + port_gpb7_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb7_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb7_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb7_Internal2_mac_address: + get_input: gpb7_Internal1_mac + port_gpb7_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb7_Internal1_mac_address: + get_input: gpb7_Internal1_mac + port_gpb7_Internal2_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_gpb_6ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb7_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb7_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_3: + type: org.openecomp.resource.abstract.nodes.gpb_3 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_3 + port_gpb4_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb4_Internal1_mac_address: + get_input: gpb4_Internal1_mac + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb4_Internal2_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb4_Internal2_mac_address: + get_input: gpb4_Internal1_mac + vm_image_name: + get_input: pxe_image_name + port_gpb4_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb4_Internal2_replacement_policy: + - AUTO + port_gpb4_Internal1_replacement_policy: + - AUTO + port_gpb4_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb4_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb4_Internal2_network: + - get_input: internal_net_id_1 + port_gpb4_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb4_Internal1_network: + - get_input: internal_net_id_0 + service_template_filter: + substitute_service_template: Nested_gpb_3ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb4_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb4_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_4: + type: org.openecomp.resource.abstract.nodes.gpb_4 + directives: + - substitutable + properties: + port_gpb5_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb5_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_name: + - get_input: gpb_name_4 + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb5_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb5_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb5_Internal1_network: + - get_input: internal_net_id_0 + port_gpb5_Internal2_mac_address: + get_input: gpb5_Internal1_mac + port_gpb5_Internal1_mac_address: + get_input: gpb5_Internal1_mac + port_gpb5_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb5_Internal2_replacement_policy: + - AUTO + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb5_Internal1_replacement_policy: + - AUTO + port_gpb5_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb5_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + service_template_filter: + substitute_service_template: Nested_gpb_4ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb5_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb5_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb: + type: org.openecomp.resource.abstract.nodes.gpb + directives: + - substitutable + properties: + port_gpb1_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_name: + - get_input: gpb_name_0 + port_gpb1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb1_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb1_Internal1_mac_address: + get_input: gpb1_Internal1_mac + port_gpb1_Internal2_mac_address: + get_input: gpb1_Internal1_mac + port_gpb1_Internal2_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb1_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb1_Internal1_replacement_policy: + - AUTO + port_gpb1_Internal2_replacement_policy: + - AUTO + port_gpb1_Internal2_network: + - get_input: internal_net_id_1 + port_gpb1_Internal1_network: + - get_input: internal_net_id_0 + service_template_filter: + substitute_service_template: Nested_gpbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + Internal1_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_enable_dhcp: + get_input: Internal1_dhcp + network_ipam_refs_data_ipam_subnets_default_gateway: + get_input: Internal1_net_gateway + network_ipam_refs_data_ipam_subnets_subnet: + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: + get_input: Internal1_net_cidr_len + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: + get_input: Internal1_net_cidr + network_name: + str_replace: + template: $VNF_NAME_int_net_1 + params: + $VNF_NAME: + get_input: vnf_name + network_ipam_refs: + - UNSUPPORTED_RESOURCE_template_NetworkIpam_Internal1 + abstract_fsb: + type: org.openecomp.resource.abstract.nodes.fsb + directives: + - substitutable + properties: + port_FSB1_Internal1_mac_address: + get_input: fsb1_Internal1_mac + port_FSB_OAM_network_role_tag: + - oam + port_FSB1_Internal2_network: + - Internal2_net + port_FSB1_Internal1_network: + - Internal1_net + vm_flavor_name: + get_input: fsb_flavor_name + port_FSB1_Internal2_mac_address: + get_input: fsb1_Internal1_mac + port_FSB_OAM_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: true + floating_ip_count_required: + is_required: false + compute_fsb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_FSB1_Internal1_security_groups: + - - int1_security_group + port_FSB1_Internal2_replacement_policy: + - AUTO + compute_fsb_scheduler_hints: + - group: VM_Affinity_group + port_FSB1_Internal1_replacement_policy: + - AUTO + compute_fsb_name: + - get_input: fsb_name_0 + port_FSB1_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_FSB1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_network: + - get_input: oam_net_name + port_FSB_OAM_security_groups: + - - oam_security_group + port_FSB_OAM_mac_requirements: + mac_count_required: + is_required: false + port_FSB_OAM_replacement_policy: + - AUTO + compute_fsb_availability_zone: + - get_input: availability_zone_0 + port_FSB1_Internal2_security_groups: + - - int2_security_group + port_FSB1_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_FSB1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_fixed_ips: + - ip_address: + get_input: fsb_oam_ip_0 + service_template_filter: + substitute_service_template: Nested_fsbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: fsb + nfc_naming_code: fsb + requirements: + - link_fsb_FSB1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_fsb_FSB1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + gtp_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: gtp_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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 + abstract_ncb_1: + type: org.openecomp.resource.abstract.nodes.ncb_1 + directives: + - substitutable + properties: + port_NCB2_Internal2_security_groups: + - - int2_security_group + port_NCB2_Internal1_replacement_policy: + - AUTO + port_NCB2_Internal2_replacement_policy: + - AUTO + vm_flavor_name: + get_input: ncb_flavor_name + port_NCB2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_NCB2_Internal1_mac_requirements: + mac_count_required: + is_required: true + vm_image_name: + get_input: pxe_image_name + compute_ncb_scheduler_hints: + - group: VM_Affinity_group + compute_ncb_availability_zone: + - get_input: availability_zone_1 + port_NCB2_Internal1_network: + - Internal1_net + port_NCB2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_NCB2_Internal1_security_groups: + - - int1_security_group + port_NCB2_Internal2_network: + - Internal2_net + port_NCB2_Internal1_mac_address: + get_input: ncb2_Internal1_mac + port_NCB2_Internal2_mac_address: + get_input: ncb2_Internal1_mac + compute_ncb_name: + - get_input: ncb_name_1 + compute_ncb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_NCB2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + service_template_filter: + substitute_service_template: Nested_ncb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: ncb + nfc_naming_code: ncb + requirements: + - link_ncb_NCB2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_ncb_NCB2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_ncb: + type: org.openecomp.resource.abstract.nodes.ncb + directives: + - substitutable + properties: + vm_flavor_name: + get_input: ncb_flavor_name + port_NCB1_Internal2_mac_requirements: + mac_count_required: + is_required: true + vm_image_name: + get_input: pxe_image_name + port_NCB1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + compute_ncb_scheduler_hints: + - group: VM_Affinity_group + port_NCB1_Internal1_security_groups: + - - int1_security_group + compute_ncb_availability_zone: + - get_input: availability_zone_0 + port_NCB1_Internal2_mac_address: + get_input: ncb1_Internal1_mac + port_NCB1_Internal1_mac_address: + get_input: ncb1_Internal1_mac + port_NCB1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_NCB1_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_NCB1_Internal2_replacement_policy: + - AUTO + port_NCB1_Internal1_network: + - Internal1_net + port_NCB1_Internal2_security_groups: + - - int2_security_group + port_NCB1_Internal1_replacement_policy: + - AUTO + compute_ncb_name: + - get_input: ncb_name_0 + compute_ncb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_NCB1_Internal2_network: + - Internal2_net + service_template_filter: + substitute_service_template: Nested_ncbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: ncb + nfc_naming_code: ncb + requirements: + - link_ncb_NCB1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_ncb_NCB1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + int1_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: int1_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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_fsb_FSB1_Internal1 + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB2_Internal1 + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB1_Internal1 + node: abstract_ncb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB2_Internal1 + node: abstract_ncb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb1_Internal1 + node: abstract_gpb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb2_Internal1 + node: abstract_gpb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb3_Internal1 + node: abstract_gpb_2 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb4_Internal1 + node: abstract_gpb_3 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb5_Internal1 + node: abstract_gpb_4 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb6_Internal1 + node: abstract_gpb_5 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb7_Internal1 + node: abstract_gpb_6 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb8_Internal1 + node: abstract_gpb_7 + relationship: org.openecomp.relationships.AttachesTo + fsb_volume_0: + type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume + properties: + image: + get_input: fsb_volume_image_name_0 + volume_type: + get_input: fsb_volume_type + size: '(get_input : fsb_volume_size) * 1024' + name: + list_join: + - _ + - - get_input: OS::stack_name + - FSB1_Vol_1 + fsb_volume_1: + type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume + properties: + image: + get_input: fsb_volume_image_name_1 + volume_type: + get_input: fsb_volume_type + size: '(get_input : fsb_volume_size) * 1024' + name: + list_join: + - _ + - - get_input: OS::stack_name + - FSB2_Vol_1 + Internal2_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_enable_dhcp: + get_input: Internal2_dhcp + network_ipam_refs_data_ipam_subnets_default_gateway: + get_input: Internal2_net_gateway + network_ipam_refs_data_ipam_subnets_subnet: + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: + get_input: Internal2_net_cidr_len + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: + get_input: Internal2_net_cidr + network_name: + str_replace: + template: $VNF_NAME_int_net_2 + params: + $VNF_NAME: + get_input: vnf_name + network_ipam_refs: + - UNSUPPORTED_RESOURCE_template_NetworkIpam_Internal2 + int2_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: int2_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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: 132 + 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: 132 + 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: 132 + 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: 132 + 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_fsb_FSB1_Internal2 + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB2_Internal2 + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB1_Internal2 + node: abstract_ncb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB2_Internal2 + node: abstract_ncb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb1_Internal2 + node: abstract_gpb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb2_Internal2 + node: abstract_gpb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb3_Internal2 + node: abstract_gpb_2 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb4_Internal2 + node: abstract_gpb_3 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb5_Internal2 + node: abstract_gpb_4 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb6_Internal2 + node: abstract_gpb_5 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb7_Internal2 + node: abstract_gpb_6 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb8_Internal2 + node: abstract_gpb_7 + relationship: org.openecomp.relationships.AttachesTo + abstract_fsb_1: + type: org.openecomp.resource.abstract.nodes.fsb_1 + directives: + - substitutable + properties: + port_FSB_OAM_network_role_tag: + - oam + vm_flavor_name: + get_input: fsb_flavor_name + port_FSB_OAM_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: true + floating_ip_count_required: + is_required: false + port_FSB2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB2_Internal2_security_groups: + - - int2_security_group + compute_fsb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_FSB2_Internal1_mac_address: + get_input: fsb2_Internal1_mac + compute_fsb_scheduler_hints: + - group: VM_Affinity_group + compute_fsb_name: + - get_input: fsb_name_1 + port_FSB2_Internal1_security_groups: + - - int1_security_group + port_FSB_OAM_network: + - get_input: oam_net_name + port_FSB_OAM_security_groups: + - - oam_security_group + port_FSB2_Internal1_network: + - Internal1_net + port_FSB2_Internal2_mac_address: + get_input: fsb2_Internal1_mac + port_FSB2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_FSB_OAM_mac_requirements: + mac_count_required: + is_required: false + port_FSB2_Internal2_replacement_policy: + - AUTO + port_FSB2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_replacement_policy: + - AUTO + port_FSB2_Internal2_network: + - Internal2_net + port_FSB2_Internal1_replacement_policy: + - AUTO + compute_fsb_availability_zone: + - get_input: availability_zone_1 + port_FSB_OAM_fixed_ips: + - ip_address: + get_input: fsb_oam_ip_1 + port_FSB2_Internal1_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_fsb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: fsb + nfc_naming_code: fsb + requirements: + - link_fsb_FSB2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_fsb_FSB2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + oam_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: oam_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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_fsb_FSB_OAM + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB_OAM + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + groups: + vmme_gpb3_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb3.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + base_vmme_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/base_vmme.yml + description: | + Base HOT template to create vmme 2 fsb 2 ncb + members: + - int2_security_group + - oam_security_group + - gtp_security_group + - Internal2_net + - int1_security_group + - Internal1_net + - abstract_ncb + - abstract_ncb_1 + - abstract_fsb + - abstract_fsb_1 + base_vmme_volume_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/base_vmme_volume.yml + description: HOT template for vMME Cinder Volumes + members: + - fsb_volume_0 + - fsb_volume_1 + vmme_gpb1_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb1.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_gpb4_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb4.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_gpb2_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb2.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + VM_Affinity_group: + type: tosca.groups.Root + members: + - abstract_ncb + - abstract_ncb_1 + - abstract_vlc + - abstract_fsb + - abstract_fsb_1 + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_vlc_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_vlc.yml + description: | + Module HOT template to create vmme 8 vlcs + members: + - abstract_vlc + outputs: + oam_management_v4_address: + description: ID of OAM VIP to be provisioned in A&AI + value: + get_input: vip_oam_management_v4_ip + fsb_volume_id_1: + description: ID of Cinder Volume for FSB2 + value: fsb_volume_1 + security_group_sctp_b_id: + description: ID of sctpb_security_group + value: UNSUPPORTED_RESOURCE_sctpb_security_group + service_instance_id_0: + description: ID of Service Instance used for vLCs + value: UNSUPPORTED_RESOURCE_template_ServiceInstance_VLC + security_group_sctp_a_id: + description: ID of sctpa_security_group + value: UNSUPPORTED_RESOURCE_sctpa_security_group + fsb_volume_id_0: + description: ID of Cinder Volume for FSB1 + value: fsb_volume_0 + policies: + VM_Affinity_policy: + type: org.openecomp.policies.placement.Antilocate + properties: + container_type: host + targets: + - VM_Affinity_group diff --git a/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeDifferentRequirementName.yaml b/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeDifferentRequirementName.yaml new file mode 100644 index 0000000000..3088707250 --- /dev/null +++ b/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeDifferentRequirementName.yaml @@ -0,0 +1,3585 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: Main +imports: +- openecomp_heat_index: + file: openecomp-heat/_index.yml +- GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml +topology_template: + inputs: + vlc4_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc4_Internal2 + default: 00:80:37:0E:04:12 + sctp-a-egress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + sctp-b-ipv6-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: IPV6 start port + default: 0 + constraints: + - in_range: + - 0 + - 65535 + ncb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb1_Internal2 + default: 00:80:37:0E:09:12 + sctp-a-ipv6-ingress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + gpb8_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb8_Internal1 + default: 00:80:37:0E:10:22 + sctp-a-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + sctp-b-display_name: + hidden: false + immutable: false + type: string + description: display_name for the SecurityGroup + default: epc-sctp-b-ipv4v6-sec-group + sctp-a-ingress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-a-egress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + ncb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers ncb + default: nv.c8r32d1 + vlc3_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc3_Internal1 + default: 00:80:37:0E:03:12 + Internal2_net_cidr: + hidden: false + immutable: false + type: string + description: CIDR for internal-2 network + default: 169.255.0.0 + sctp-a-egress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-egress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + gpb4_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb4_Internal2 + default: 00:80:37:0E:0C:22 + sctp-b-ipv6-egress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + vlc8_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc8_Internal1 + default: 00:80:37:0E:08:12 + sctp-b-ipv6-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: IPV6 ending port for destination + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + fsb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb2_Internal1 + default: 00:80:37:0E:0D:12 + sctp-b-name: + hidden: false + immutable: false + type: string + description: name for the SecurityGroup + default: epc-sctp-b-ipv4v6-sec-group + sctp-b-ipv6-egress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + internal_net_id_1: + hidden: false + immutable: false + type: string + description: UUID of Internal2_net + default: e3397c69-a942-49aa-81cb-fb91ff34abc8 + sctp-a-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + internal_net_id_0: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net + default: 871de971-22ac-47b6-befb-50e7d4cb67ea + sctp_b_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN SCTPB + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPB_net_1 + sctp-a-ipv6-ingress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + sctp-b-ipv6-ingress_src_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix length + default: '0' + ncb_name_1: + hidden: false + immutable: false + type: string + description: Name of ncb2 + default: zrdm3mmex59ncb002 + ncb_name_0: + hidden: false + immutable: false + type: string + description: Name of ncb1 + default: zrdm3mmex59ncb001 + vlc_st_virtualization_type: + hidden: false + immutable: false + type: string + description: Indicates virtualization type + default: virtual-machine + vlc2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc2_Internal1 + default: 00:80:37:0E:02:12 + sctp-b-ingress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-display_name: + hidden: false + immutable: false + type: string + description: display_name for the SecurityGroup + default: epc-sctp-a-ipv4v6-sec-group + sctp-b-ingress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + int2_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for internal-2 + default: int2-sec-group + gpb5_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb5_Internal2 + default: 00:80:37:0E:0D:22 + sctp-a-egress-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: dst subnet + default: '::' + OS::stack_name: + type: string + required: false + sctp-b-egress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + Internal2_shared: + hidden: false + immutable: false + type: string + description: Whether Shared or private internal-2 network + default: false + sctp-a-ipv6-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + Internal2_rpf: + hidden: false + immutable: false + type: string + description: Reverse Path Forwarding Enabled/Disabled internal-2 network + default: disable + vlc5_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc5_Internal2 + default: 00:80:37:0E:05:12 + sctp-a-ipv6-egress_src_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + Internal1_forwarding_mode: + hidden: false + immutable: false + type: string + description: L2 or L3 forwarding mode for internal-1 network + default: l2 + gpb3_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb3_Internal1 + default: 00:80:37:0E:0B:22 + vip_oam_management_v4_ip: + hidden: false + immutable: false + type: string + description: IP address of OAM service IP address to be provisioned in A&AI + default: 107.239.72.176 + vmi_oam_preference_primary: + hidden: false + immutable: false + type: float + description: Preference for primary interface/port + default: 200 + sctp-b-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp-a-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + security_group_sctp_b_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 92a4ae54-1733-4d03-b488-f178bb9f7b82 + Internal2_forwarding_mode: + hidden: false + immutable: false + type: string + description: L2 or L3 forwarding mode for internal-2 network + default: l2 + sctp-a-ipv6-egress_dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-b-egress-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: dst subnet + default: '::' + sctp-b-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + security_group_oam_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 4ae4aa74-3e8e-4f2b-8b5f-a8bd262da96b + gpb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb2_Internal1 + default: 00:80:37:0E:0A:22 + security_group_int1_id: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net security group + default: 94c62578-835d-4801-9372-70a2cfb22683 + sctp-a-egress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + oam_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN OAM + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_OAM_net_1 + ncb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb2_Internal2 + default: 00:80:37:0E:0F:12 + vlc_st_interface_type_sctp_a: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: left + gpb3_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb3_Internal2 + default: 00:80:37:0E:0B:22 + vlc_st_interface_type_sctp_b: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: right + gpb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb1_Internal2 + default: 00:80:37:0E:09:22 + oam_net_name: + hidden: false + immutable: false + type: string + description: Network Name OAM + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_OAM_net_1 + sctp-b-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb1_Internal1 + default: 00:80:37:0E:0B:12 + sctp-b-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + vlc_st_interface_type_oam: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: management + shc_monitor_type: + hidden: false + immutable: false + type: string + description: health check + default: PING + oam_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for OAM + default: oam-sec-group + Internal2_net_gateway: + hidden: false + immutable: false + type: string + description: gateway for internal-2 network + default: 169.255.0.3 + evac_policy: + hidden: false + immutable: false + type: string + description: CMHA Policy + default: Evacuate + server_group_id_0: + hidden: false + immutable: false + type: string + description: ID of Anti-Affinity Policy-based Server Group + default: ec99a73d-38f8-4280-8103-ba8ee584629f + vlc8_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc8_Internal2 + default: 00:80:37:0E:08:12 + sctp-b-ipv6-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + gtp_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for GTP + default: gtp-sec-group + vlc_sctp_b_v6_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPB + default: fd00:200:200:5:0:0:0:24 + vlc_sctp_b_v6_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPB + default: fd00:200:200:5:0:0:0:17 + sctp-a-ipv6-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + vlc_sctp_b_v6_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPB + default: fd00:200:200:5:0:0:0:16 + vlc4_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc4_Internal1 + default: 00:80:37:0E:04:12 + vlc_sctp_b_v6_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPB + default: fd00:200:200:5:0:0:0:28 + vlc_sctp_b_v6_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPB + default: fd00:200:200:5:0:0:0:27 + vlc_sctp_b_v6_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPB + default: fd00:200:200:5:0:0:0:26 + vlc_sctp_b_v6_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPB + default: fd00:200:200:5:0:0:0:25 + sctp_b_net_name: + hidden: false + immutable: false + type: string + description: Network Name SCTPB + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPB_net_1 + sctp-b-ipv6-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: '0' + sctp-a-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + Internal1_shared: + hidden: false + immutable: false + type: string + description: Whether Shared or private internal-1 network + default: false + shc_url_path: + hidden: false + immutable: false + type: string + description: health check + default: local-ip + Internal2_net_cidr_len: + hidden: false + immutable: false + type: string + description: CIDR length for internal-2 network + default: 17 + sctp-a-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-b-ipv6-ingress_src_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + sctp-a-egress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-ingress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-b-ipv6-ingress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc_st_service_type: + hidden: false + immutable: false + type: string + description: service type + default: firewall + sctp-b-ipv6-ingress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 starting port for destination + default: 0 + vlc_st_availability_zone: + hidden: false + immutable: false + type: string + description: Indicates availability zone is enabled + default: true + vlc7_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc7_Internal1 + default: 00:80:37:0E:07:12 + fsb_volume_image_name_1: + label: MME_FSB2 + hidden: false + immutable: false + type: string + description: volume name + default: MME_FSB2_1_3_GA.qcow2 + vlc_oam_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 OAM + default: 107.239.72.151 + sctp-a-ipv6-ingress_src_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix length + default: '0' + vlc_oam_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 OAM + default: 107.239.72.152 + Internal1_allow_transit: + hidden: false + immutable: false + type: string + description: Allow/disallow transit internal-1 network + default: true + vlc_oam_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 OAM + default: 107.239.72.157 + vlc_oam_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 OAM + default: 107.239.72.158 + vlc_gtp_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 GTP + default: 107.243.47.208 + vlc_oam_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 OAM + default: 107.239.72.149 + fsb_volume_image_name_0: + label: MME_FSB1 + hidden: false + immutable: false + type: string + description: volume name + default: MME_FSB1_1_3_GA.qcow2 + vlc_gtp_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 GTP + default: 107.243.47.209 + vlc_oam_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 OAM + default: 107.239.72.150 + vlc_gtp_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 GTP + default: 107.243.47.216 + vlc_name_6: + hidden: false + immutable: false + type: string + description: Name of vlc7 + default: zrdm3mmex59vlc007 + vlc_gtp_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 GTP + default: 107.243.47.217 + vlc_name_7: + hidden: false + immutable: false + type: string + description: Name of vlc8 + default: zrdm3mmex59vlc008 + security_group_sctp_a_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 3cd8a524-77ff-4980-ae2a-d19ba70e0511 + vlc_gtp_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 GTP + default: 107.243.47.218 + vlc_gtp_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 GTP + default: 107.243.47.219 + vlc_gtp_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 GTP + default: 107.243.47.220 + vlc_name_2: + hidden: false + immutable: false + type: string + description: Name of vlc3 + default: zrdm3mmex59vlc003 + vlc_gtp_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 GTP + default: 107.243.47.221 + vlc_name_3: + hidden: false + immutable: false + type: string + description: Name of vlc4 + default: zrdm3mmex59vlc004 + vlc_name_4: + hidden: false + immutable: false + type: string + description: Name of vlc5 + default: zrdm3mmex59vlc005 + vlc_name_5: + hidden: false + immutable: false + type: string + description: Name of vlc6 + default: zrdm3mmex59vlc006 + fsb_volume_id_1: + hidden: false + immutable: false + type: string + description: ID of Cinder Volume for FSB2 + default: 5bd0560c-bfd0-47dc-a84a-554e2698c925 + sctp-a-ipv6-ingress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc_name_0: + hidden: false + immutable: false + type: string + description: Name of vlc1 + default: zrdm3mmex59vlc001 + vlc_name_1: + hidden: false + immutable: false + type: string + description: Name of vlc2 + default: zrdm3mmex59vlc002 + vlc_oam_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on OAM + sctp-b-egress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + vlc_oam_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 OAM + default: 107.239.72.155 + vlc_oam_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 OAM + default: 107.239.72.156 + vlc6_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc6_Internal1 + default: 00:80:37:0E:06:12 + fsb_volume_id_0: + hidden: false + immutable: false + type: string + description: ID of Cinder Volume for FSB1 + default: 27baa6a0-b701-4795-bf5e-4f546b350b1f + sctp-b-egress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + gpb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb2_Internal2 + default: 00:80:37:0E:0A:22 + sctp-a-ipv6-egress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + sctp-b-ipv6-egress_src_start_port: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0 + Internal2_allow_transit: + hidden: false + immutable: false + type: string + description: Allow/disallow transit internal-2 network + default: true + fsb_volume_size: + label: volume size + hidden: false + immutable: false + type: float + description: volume size 320GB + default: 320 + constraints: + - in_range: + - 0 + - 340 + sctp-b-IPv6_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv6 + gtp_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN GTP + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_GTP_net_1 + ncb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb2_Internal1 + default: 00:80:37:0E:0F:12 + sctp-b-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + sctp-b-ingress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-b-egress_src_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + gpb7_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb7_Internal2 + default: 00:80:37:0E:0F:22 + sctp-a-ipv6-ingress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 starting port for destination + default: 0 + gtp_net_name: + hidden: false + immutable: false + type: string + description: Network Name GTP + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_GTP_net_1 + sctp-b-ipv6-ingress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + domain_name: + hidden: false + immutable: false + type: string + description: Unique name of vMME contrail domain + default: default-domain + vlc5_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc5_Internal1 + default: 00:80:37:0E:05:12 + sctp-a-egress_src_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + sctp-b-egress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + shc_enabled: + hidden: false + immutable: false + type: string + description: health check + default: true + sctp-b-ipv6-ingress-dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-b-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp_a_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN SCTPA + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPA_net_1 + security_group_gtp_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: e8ad3fe2-5f95-43e4-bbcc-da97b1c22588 + sctp-a-ipv6-ingress_src_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + fsb_name_1: + hidden: false + immutable: false + type: string + description: Name of fsb1 + default: zrdm3mmex59fsb002 + sctp-b-egress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb_name_0: + hidden: false + immutable: false + type: string + description: Name of fsb1 + default: zrdm3mmex59fsb001 + sctp_a_net_name: + hidden: false + immutable: false + type: string + description: Network Name SCTPA + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPA_net_1 + sctp-b-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + gpb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb1_Internal1 + default: 00:80:37:0E:09:22 + sctp-a-ingress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb1_Internal2 + default: 00:80:37:0E:0B:12 + vlc_st_service_mode: + hidden: false + immutable: false + type: string + description: service mode + default: in-network-nat + sctp-a-ipv6-egress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + sctp-a-egress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-b-egress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-a-ingress-src_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + sctp-a-ipv6-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: IPV6 start port + default: 0 + constraints: + - in_range: + - 0 + - 65535 + vf_module_id: + hidden: false + immutable: false + type: string + description: the vf_module_id for this instance. UUID provided by ECOMP + default: TWO + Internal1_net_cidr: + hidden: false + immutable: false + type: string + description: CIDR for internal-1 network + default: 169.253.0.0 + fsb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers fsb1 + default: nv.c8r32d1 + sctp_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: 132 + vnf_name: + hidden: false + immutable: false + type: string + description: the vnf_name for this instance. provided by ECOMP + default: zrdm3mmex59 + sctp-a-IPv6_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv6 + vlc_sctp_b_v6_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPB + default: fd00:200:200:5:0:0:0:29 + vlc6_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc6_Internal2 + default: 00:80:37:0E:06:12 + sctp-b-ingress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc7_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc7_Internal2 + default: 00:80:37:0E:07:12 + sctp-a-ipv6-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: IPV6 ending port for destination + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers vlc + default: nd.c16r64d1 + sctp-b-ipv6-egress_src_addresses: + hidden: false + immutable: false + type: string + description: IPV6 source + default: local + vlc_st_interface_type_int1: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other1 + availability_zone_0: + hidden: false + immutable: false + type: string + description: cluster for spawnning fsb instances + default: rdm3-kvm-az02 + service_instance_id_0: + hidden: false + immutable: false + type: string + description: UUID of service instance for vLCs + default: 77c67cc8-d15f-47bc-aeb1-8d65d09e917a + availability_zone_1: + hidden: false + immutable: false + type: string + description: cluster for spawnning ncb instances + default: rdm3-kvm-az02 + vlc_st_interface_type_int2: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other2 + sctp-a-ipv6-egress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 start port + default: 0 + sctp-a-ipv6-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: '0' + vlc_sctp_a_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPA + default: 107.243.47.144 + vlc_sctp_b_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on SCTPB + vlc1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal1 + default: 00:80:37:0E:01:12 + sctp-b-ipv6-egress_src_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-a-ipv6-egress_src_addresses: + hidden: false + immutable: false + type: string + description: IPV6 source + default: local + vlc_sctp_a_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPA + default: 107.243.47.157 + sctp-a-ingress-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: src subnet + default: '::' + vlc_sctp_a_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPA + default: 107.243.47.156 + vlc_sctp_a_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPA + default: 107.243.47.155 + sctp-a-ingress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc_sctp_a_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPA + default: 107.243.47.154 + vlc_sctp_a_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPA + default: 107.243.47.153 + vlc_sctp_a_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPA + default: 107.243.47.152 + vlc_sctp_a_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPA + default: 107.243.47.145 + gpb6_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb6_Internal2 + default: 00:80:37:0E:0E:22 + security_group_int2_id: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net security group + default: 1361f069-baf2-4b76-b321-7f68ba26c369 + Internal2_dhcp: + hidden: false + immutable: false + type: string + description: Whether DHCP/static IP addressing on internal-2 network + default: false + sctp-a-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + pxe_image_name: + hidden: false + immutable: false + type: string + description: Name of image to use for server ncb + default: MME_PXE-Boot_1_3_GA.qcow2 + vlc_st_interface_type_gtp: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other0 + ncb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb1_Internal1 + default: 00:80:37:0E:09:12 + vlc_gtp_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on GTP + int1_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for internal-1 + default: int1-sec-group + vmi_oam_preference_secondary: + hidden: false + immutable: false + type: float + description: Preference for secondary interface/port + default: 100 + Internal1_dhcp: + hidden: false + immutable: false + type: string + description: Whether DHCP/static IP addressing on internal-1 network + default: false + fsb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb2_Internal2 + default: 00:80:37:0E:0D:12 + Internal1_net_cidr_len: + hidden: false + immutable: false + type: string + description: CIDR length for internal-1 network + default: 17 + sctp-a-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + sctp-b-ingress-src_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + fsb_oam_ip_1: + hidden: false + immutable: false + type: string + description: IP address of OAM vNIC for FSB2 + default: 107.239.72.154 + fsb_oam_ip_0: + hidden: false + immutable: false + type: string + description: IP address of OAM vNIC for FSB1 + default: 107.239.72.153 + shc_timeout: + hidden: false + immutable: false + type: string + description: health check + default: 5 + vlc_st_version: + hidden: false + immutable: false + type: string + description: Indicates service version + default: 2 + sctp-a-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp-a-ingress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + sctp-b-egress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-a-ipv6-egress_src_start_port: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0 + instance_ip_family_v6: + hidden: false + immutable: false + type: string + description: Ipv6 instance type + default: v6 + sctp-b-ingress-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: src subnet + default: '::' + gpb8_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb8_Internal2 + default: 00:80:37:0E:10:22 + gpb4_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb4_Internal1 + default: 00:80:37:0E:0C:22 + sctp-a-ipv6-ingress-dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + Internal1_net_gateway: + hidden: false + immutable: false + type: string + description: gateway for internal-1 network + default: 169.253.0.3 + sctp-b-ipv6-egress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 start port + default: 0 + gpb_name_7: + hidden: false + immutable: false + type: string + description: Name of gpb8 + default: zrdm3mmex59gpb0016 + gpb_name_6: + hidden: false + immutable: false + type: string + description: Name of gpb7 + default: zrdm3mmex59gpb0015 + gpb_name_5: + hidden: false + immutable: false + type: string + description: Name of gpb6 + default: zrdm3mmex59gpb0014 + gpb_name_4: + hidden: false + immutable: false + type: string + description: Name of gpb5 + default: zrdm3mmex59gpb0013 + gpb_name_3: + hidden: false + immutable: false + type: string + description: Name of gpb4 + default: zrdm3mmex59gpb0012 + sctp-a-ipv6-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: IPV6 destination + default: local + gpb_name_2: + hidden: false + immutable: false + type: string + description: Name of gpb3 + default: zrdm3mmex59gpb0011 + shc_delay: + hidden: false + immutable: false + type: string + description: health check + default: 3 + gpb_name_1: + hidden: false + immutable: false + type: string + description: Name of gpb2 + default: zrdm3mmex59gpb0010 + sctp-b-ipv6-egress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc3_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc3_Internal2 + default: 00:80:37:0E:03:12 + gpb_name_0: + hidden: false + immutable: false + type: string + description: Name of gpb1 + default: zrdm3mmex59gpb009 + sctp-a-ipv6-egress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + gpb5_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb5_Internal1 + default: 00:80:37:0E:0D:22 + sctp-b-ipv6-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + shc_max_retries: + hidden: false + immutable: false + type: string + description: health check + default: 2 + fsb_volume_type: + label: volume type + hidden: false + immutable: false + type: string + description: volume type SolidFire + default: SF-Default-SSD + sctp-a-name: + hidden: false + immutable: false + type: string + description: name for the SecurityGroup + default: epc-sctp-a-ipv4v6-sec-group + vlc_sctp_b_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPB + default: 107.243.47.187 + vlc_sctp_b_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPB + default: 107.243.47.186 + vlc_sctp_b_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPB + default: 107.243.47.185 + vlc_sctp_b_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPB + default: 107.243.47.184 + sctp-b-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + vnf_id: + hidden: false + immutable: false + type: string + description: the vf_id for this instance. UUID provided by ECOMP + default: zrdm3mmex59 + vlc_sctp_b_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPB + default: 107.243.47.189 + vlc_sctp_b_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPB + default: 107.243.47.188 + vlc_sctp_b_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPB + default: 107.243.47.177 + gpb6_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb6_Internal1 + default: 00:80:37:0E:0E:22 + sctp-b-ipv6-egress_dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + vlc_sctp_b_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPB + default: 107.243.47.176 + vlc2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc2_Internal2 + default: 00:80:37:0E:02:12 + sctp-b-ingress-src_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + gpb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers gpb + default: nv.c20r64d1 + vlc_sctp_a_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on SCTPA + sctp-b-ipv6-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: IPV6 destination + default: local + sctp-b-ipv6-ingress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + sctp-b-ipv6-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + sctp-a-ingress-src_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + vlc1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal2 + default: 00:80:37:0E:01:12 + Internal1_rpf: + hidden: false + immutable: false + type: string + description: Reverse Path Forwarding Enabled/Disabled internal-1 network + default: disable + sctp-b-ingress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-b-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-ipv6-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + vlc_sctp_a_v6_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPA + default: fd00:200:200:4:0:0:0:29 + vlc_sctp_a_v6_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPA + default: fd00:200:200:4:0:0:0:28 + gpb7_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb7_Internal1 + default: 00:80:37:0E:0F:22 + vlc_sctp_a_v6_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPA + default: fd00:200:200:4:0:0:0:27 + vlc_sctp_a_v6_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPA + default: fd00:200:200:4:0:0:0:26 + vlc_sctp_a_v6_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPA + default: fd00:200:200:4:0:0:0:25 + vlc_sctp_a_v6_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPA + default: fd00:200:200:4:0:0:0:24 + sctp-a-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + vlc_sctp_a_v6_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPA + default: fd00:200:200:4:0:0:0:17 + vlc_sctp_a_v6_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPA + default: fd00:200:200:4:0:0:0:16 + node_templates: + abstract_gpb_1: + type: org.openecomp.resource.abstract.nodes.gpb_1 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_1 + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb2_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb2_Internal2_network: + - get_input: internal_net_id_1 + port_gpb2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_image_name: + get_input: pxe_image_name + port_gpb2_Internal1_replacement_policy: + - AUTO + port_gpb2_Internal1_network: + - get_input: internal_net_id_0 + port_gpb2_Internal2_replacement_policy: + - AUTO + port_gpb2_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb2_Internal1_mac_address: + get_input: gpb2_Internal1_mac + port_gpb2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb2_Internal2_mac_address: + get_input: gpb2_Internal1_mac + port_gpb2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb2_Internal2_security_groups: + - - get_input: security_group_int2_id + service_template_filter: + substitute_service_template: Nested_gpb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_2: + type: org.openecomp.resource.abstract.nodes.gpb_2 + directives: + - substitutable + properties: + port_gpb3_Internal1_replacement_policy: + - AUTO + compute_gpb_name: + - get_input: gpb_name_2 + port_gpb3_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb3_Internal2_replacement_policy: + - AUTO + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb3_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb3_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb3_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb3_Internal1_network: + - get_input: internal_net_id_0 + port_gpb3_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb3_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb3_Internal1_mac_address: + get_input: gpb3_Internal1_mac + port_gpb3_Internal2_mac_address: + get_input: gpb3_Internal1_mac + port_gpb3_Internal2_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_gpb_2ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb3_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb3_Internal2_diferent_name: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_vlc: + type: org.openecomp.resource.abstract.nodes.vlc + directives: + - substitutable + properties: + port_template_VMInt_SCTP_A_vlc_virtual_network_refs: + - - get_input: sctp_a_net_fqdn + port_template_VMInt_INT1_vlc_security_group_refs: + - - get_input: security_group_int1_id + vm_flavor_name: + get_input: vlc_flavor_name + port_template_VMInt_INT2_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + vm_image_name: + get_input: pxe_image_name + port_template_VMInt_INT1_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_INT2_vlc_virtual_network_refs: + - - get_input: internal_net_id_1 + port_template_VMInt_OAM_vlc_virtual_network_refs: + - - get_input: oam_net_fqdn + port_template_VMInt_OAM_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_INT2_vlc_virtual_machine_interface_mac_addresses: + - - get_input: vlc4_Internal2_mac + - - get_input: vlc3_Internal2_mac + - - get_input: vlc2_Internal2_mac + - - get_input: vlc1_Internal2_mac + - - get_input: vlc8_Internal2_mac + - - get_input: vlc7_Internal2_mac + - - get_input: vlc6_Internal2_mac + - - get_input: vlc5_Internal2_mac + port_template_VMInt_SCTP_B_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_GTP_vlc_security_group_refs: + - - get_input: security_group_gtp_id + compute_vlc_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_template_VMInt_OAM_vlc_security_group_refs: + - - get_input: security_group_oam_id + compute_vlc_contrail_service_instance_ind: + - true + - true + - true + - true + - true + - true + - true + - true + port_template_VMInt_GTP_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_SCTP_B_vlc_virtual_network_refs: + - - get_input: sctp_b_net_fqdn + port_template_VMInt_INT2_vlc_security_group_refs: + - - get_input: security_group_int2_id + port_template_VMInt_SCTP_B_vlc_security_group_refs: + - - get_input: security_group_sctp_b_id + port_template_VMInt_INT1_vlc_virtual_network_refs: + - - get_input: internal_net_id_0 + port_template_VMInt_SCTP_A_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + compute_vlc_scheduler_hints: + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + compute_vlc_name: + - get_input: vlc_name_3 + - get_input: vlc_name_2 + - get_input: vlc_name_1 + - get_input: vlc_name_0 + - get_input: vlc_name_7 + - get_input: vlc_name_6 + - get_input: vlc_name_5 + - get_input: vlc_name_4 + port_template_VMInt_SCTP_A_vlc_security_group_refs: + - - get_input: security_group_sctp_a_id + compute_vlc_availability_zone: + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + port_template_VMInt_INT1_vlc_virtual_machine_interface_mac_addresses: + - - get_input: vlc4_Internal1_mac + - - get_input: vlc3_Internal1_mac + - - get_input: vlc2_Internal1_mac + - - get_input: vlc1_Internal1_mac + - - get_input: vlc8_Internal1_mac + - - get_input: vlc7_Internal1_mac + - - get_input: vlc6_Internal1_mac + - - get_input: vlc5_Internal1_mac + port_template_VMInt_GTP_vlc_virtual_network_refs: + - - get_input: gtp_net_fqdn + service_template_filter: + substitute_service_template: Nested_vlcServiceTemplate.yaml + count: 8 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: vlc + nfc_naming_code: vlc + requirements: + - link_vlc_template_VMInt_INT2_vlc: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + - link_vlc_template_VMInt_INT1_vlc: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_7: + type: org.openecomp.resource.abstract.nodes.gpb_7 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_7 + port_gpb8_Internal1_mac_address: + get_input: gpb8_Internal1_mac + port_gpb8_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb8_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb8_Internal1_replacement_policy: + - AUTO + port_gpb8_Internal2_replacement_policy: + - AUTO + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb8_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb8_Internal1_network: + - get_input: internal_net_id_0 + port_gpb8_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb8_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb8_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb8_Internal2_network: + - get_input: internal_net_id_1 + port_gpb8_Internal2_mac_address: + get_input: gpb8_Internal1_mac + service_template_filter: + substitute_service_template: Nested_gpb_7ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb8_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb8_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_5: + type: org.openecomp.resource.abstract.nodes.gpb_5 + directives: + - substitutable + properties: + port_gpb6_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_name: + - get_input: gpb_name_5 + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb6_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_image_name: + get_input: pxe_image_name + port_gpb6_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb6_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb6_Internal1_network: + - get_input: internal_net_id_0 + port_gpb6_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb6_Internal2_mac_address: + get_input: gpb6_Internal1_mac + port_gpb6_Internal1_mac_address: + get_input: gpb6_Internal1_mac + port_gpb6_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb6_Internal2_replacement_policy: + - AUTO + port_gpb6_Internal1_replacement_policy: + - AUTO + port_gpb6_Internal2_security_groups: + - - get_input: security_group_int2_id + service_template_filter: + substitute_service_template: Nested_gpb_5ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb6_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb6_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_6: + type: org.openecomp.resource.abstract.nodes.gpb_6 + directives: + - substitutable + properties: + port_gpb7_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb7_Internal1_network: + - get_input: internal_net_id_0 + compute_gpb_name: + - get_input: gpb_name_6 + port_gpb7_Internal2_network: + - get_input: internal_net_id_1 + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb7_Internal1_replacement_policy: + - AUTO + port_gpb7_Internal2_replacement_policy: + - AUTO + port_gpb7_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb7_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb7_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb7_Internal2_mac_address: + get_input: gpb7_Internal1_mac + port_gpb7_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb7_Internal1_mac_address: + get_input: gpb7_Internal1_mac + port_gpb7_Internal2_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_gpb_6ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb7_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb7_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_3: + type: org.openecomp.resource.abstract.nodes.gpb_3 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_3 + port_gpb4_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb4_Internal1_mac_address: + get_input: gpb4_Internal1_mac + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb4_Internal2_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb4_Internal2_mac_address: + get_input: gpb4_Internal1_mac + vm_image_name: + get_input: pxe_image_name + port_gpb4_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb4_Internal2_replacement_policy: + - AUTO + port_gpb4_Internal1_replacement_policy: + - AUTO + port_gpb4_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb4_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb4_Internal2_network: + - get_input: internal_net_id_1 + port_gpb4_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb4_Internal1_network: + - get_input: internal_net_id_0 + service_template_filter: + substitute_service_template: Nested_gpb_3ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb4_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb4_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_4: + type: org.openecomp.resource.abstract.nodes.gpb_4 + directives: + - substitutable + properties: + port_gpb5_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb5_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_name: + - get_input: gpb_name_4 + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb5_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb5_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb5_Internal1_network: + - get_input: internal_net_id_0 + port_gpb5_Internal2_mac_address: + get_input: gpb5_Internal1_mac + port_gpb5_Internal1_mac_address: + get_input: gpb5_Internal1_mac + port_gpb5_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb5_Internal2_replacement_policy: + - AUTO + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb5_Internal1_replacement_policy: + - AUTO + port_gpb5_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb5_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + service_template_filter: + substitute_service_template: Nested_gpb_4ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb5_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb5_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb: + type: org.openecomp.resource.abstract.nodes.gpb + directives: + - substitutable + properties: + port_gpb1_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_name: + - get_input: gpb_name_0 + port_gpb1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb1_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb1_Internal1_mac_address: + get_input: gpb1_Internal1_mac + port_gpb1_Internal2_mac_address: + get_input: gpb1_Internal1_mac + port_gpb1_Internal2_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb1_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb1_Internal1_replacement_policy: + - AUTO + port_gpb1_Internal2_replacement_policy: + - AUTO + port_gpb1_Internal2_network: + - get_input: internal_net_id_1 + port_gpb1_Internal1_network: + - get_input: internal_net_id_0 + service_template_filter: + substitute_service_template: Nested_gpbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + Internal1_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_enable_dhcp: + get_input: Internal1_dhcp + network_ipam_refs_data_ipam_subnets_default_gateway: + get_input: Internal1_net_gateway + network_ipam_refs_data_ipam_subnets_subnet: + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: + get_input: Internal1_net_cidr_len + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: + get_input: Internal1_net_cidr + network_name: + str_replace: + template: $VNF_NAME_int_net_1 + params: + $VNF_NAME: + get_input: vnf_name + network_ipam_refs: + - UNSUPPORTED_RESOURCE_template_NetworkIpam_Internal1 + abstract_fsb: + type: org.openecomp.resource.abstract.nodes.fsb + directives: + - substitutable + properties: + port_FSB1_Internal1_mac_address: + get_input: fsb1_Internal1_mac + port_FSB_OAM_network_role_tag: + - oam + port_FSB1_Internal2_network: + - Internal2_net + port_FSB1_Internal1_network: + - Internal1_net + vm_flavor_name: + get_input: fsb_flavor_name + port_FSB1_Internal2_mac_address: + get_input: fsb1_Internal1_mac + port_FSB_OAM_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: true + floating_ip_count_required: + is_required: false + compute_fsb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_FSB1_Internal1_security_groups: + - - int1_security_group + port_FSB1_Internal2_replacement_policy: + - AUTO + compute_fsb_scheduler_hints: + - group: VM_Affinity_group + port_FSB1_Internal1_replacement_policy: + - AUTO + compute_fsb_name: + - get_input: fsb_name_0 + port_FSB1_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_FSB1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_network: + - get_input: oam_net_name + port_FSB_OAM_security_groups: + - - oam_security_group + port_FSB_OAM_mac_requirements: + mac_count_required: + is_required: false + port_FSB_OAM_replacement_policy: + - AUTO + compute_fsb_availability_zone: + - get_input: availability_zone_0 + port_FSB1_Internal2_security_groups: + - - int2_security_group + port_FSB1_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_FSB1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_fixed_ips: + - ip_address: + get_input: fsb_oam_ip_0 + service_template_filter: + substitute_service_template: Nested_fsbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: fsb + nfc_naming_code: fsb + requirements: + - link_fsb_FSB1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_fsb_FSB1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + gtp_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: gtp_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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 + abstract_ncb_1: + type: org.openecomp.resource.abstract.nodes.ncb_1 + directives: + - substitutable + properties: + port_NCB2_Internal2_security_groups: + - - int2_security_group + port_NCB2_Internal1_replacement_policy: + - AUTO + port_NCB2_Internal2_replacement_policy: + - AUTO + vm_flavor_name: + get_input: ncb_flavor_name + port_NCB2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_NCB2_Internal1_mac_requirements: + mac_count_required: + is_required: true + vm_image_name: + get_input: pxe_image_name + compute_ncb_scheduler_hints: + - group: VM_Affinity_group + compute_ncb_availability_zone: + - get_input: availability_zone_1 + port_NCB2_Internal1_network: + - Internal1_net + port_NCB2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_NCB2_Internal1_security_groups: + - - int1_security_group + port_NCB2_Internal2_network: + - Internal2_net + port_NCB2_Internal1_mac_address: + get_input: ncb2_Internal1_mac + port_NCB2_Internal2_mac_address: + get_input: ncb2_Internal1_mac + compute_ncb_name: + - get_input: ncb_name_1 + compute_ncb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_NCB2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + service_template_filter: + substitute_service_template: Nested_ncb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: ncb + nfc_naming_code: ncb + requirements: + - link_ncb_NCB2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_ncb_NCB2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_ncb: + type: org.openecomp.resource.abstract.nodes.ncb + directives: + - substitutable + properties: + vm_flavor_name: + get_input: ncb_flavor_name + port_NCB1_Internal2_mac_requirements: + mac_count_required: + is_required: true + vm_image_name: + get_input: pxe_image_name + port_NCB1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + compute_ncb_scheduler_hints: + - group: VM_Affinity_group + port_NCB1_Internal1_security_groups: + - - int1_security_group + compute_ncb_availability_zone: + - get_input: availability_zone_0 + port_NCB1_Internal2_mac_address: + get_input: ncb1_Internal1_mac + port_NCB1_Internal1_mac_address: + get_input: ncb1_Internal1_mac + port_NCB1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_NCB1_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_NCB1_Internal2_replacement_policy: + - AUTO + port_NCB1_Internal1_network: + - Internal1_net + port_NCB1_Internal2_security_groups: + - - int2_security_group + port_NCB1_Internal1_replacement_policy: + - AUTO + compute_ncb_name: + - get_input: ncb_name_0 + compute_ncb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_NCB1_Internal2_network: + - Internal2_net + service_template_filter: + substitute_service_template: Nested_ncbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: ncb + nfc_naming_code: ncb + requirements: + - link_ncb_NCB1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_ncb_NCB1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + int1_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: int1_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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_fsb_FSB1_Internal1 + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB2_Internal1 + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB1_Internal1 + node: abstract_ncb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB2_Internal1 + node: abstract_ncb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb1_Internal1 + node: abstract_gpb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb2_Internal1 + node: abstract_gpb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb3_Internal1 + node: abstract_gpb_2 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb4_Internal1 + node: abstract_gpb_3 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb5_Internal1 + node: abstract_gpb_4 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb6_Internal1 + node: abstract_gpb_5 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb7_Internal1 + node: abstract_gpb_6 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb8_Internal1 + node: abstract_gpb_7 + relationship: org.openecomp.relationships.AttachesTo + fsb_volume_0: + type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume + properties: + image: + get_input: fsb_volume_image_name_0 + volume_type: + get_input: fsb_volume_type + size: '(get_input : fsb_volume_size) * 1024' + name: + list_join: + - _ + - - get_input: OS::stack_name + - FSB1_Vol_1 + fsb_volume_1: + type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume + properties: + image: + get_input: fsb_volume_image_name_1 + volume_type: + get_input: fsb_volume_type + size: '(get_input : fsb_volume_size) * 1024' + name: + list_join: + - _ + - - get_input: OS::stack_name + - FSB2_Vol_1 + Internal2_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_enable_dhcp: + get_input: Internal2_dhcp + network_ipam_refs_data_ipam_subnets_default_gateway: + get_input: Internal2_net_gateway + network_ipam_refs_data_ipam_subnets_subnet: + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: + get_input: Internal2_net_cidr_len + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: + get_input: Internal2_net_cidr + network_name: + str_replace: + template: $VNF_NAME_int_net_2 + params: + $VNF_NAME: + get_input: vnf_name + network_ipam_refs: + - UNSUPPORTED_RESOURCE_template_NetworkIpam_Internal2 + int2_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: int2_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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: 132 + 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: 132 + 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: 132 + 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: 132 + 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_fsb_FSB1_Internal2 + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB2_Internal2 + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB1_Internal2 + node: abstract_ncb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB2_Internal2 + node: abstract_ncb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb1_Internal2 + node: abstract_gpb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb2_Internal2 + node: abstract_gpb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb3_Internal2 + node: abstract_gpb_2 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb4_Internal2 + node: abstract_gpb_3 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb5_Internal2 + node: abstract_gpb_4 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb6_Internal2 + node: abstract_gpb_5 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb7_Internal2 + node: abstract_gpb_6 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb8_Internal2 + node: abstract_gpb_7 + relationship: org.openecomp.relationships.AttachesTo + abstract_fsb_1: + type: org.openecomp.resource.abstract.nodes.fsb_1 + directives: + - substitutable + properties: + port_FSB_OAM_network_role_tag: + - oam + vm_flavor_name: + get_input: fsb_flavor_name + port_FSB_OAM_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: true + floating_ip_count_required: + is_required: false + port_FSB2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB2_Internal2_security_groups: + - - int2_security_group + compute_fsb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_FSB2_Internal1_mac_address: + get_input: fsb2_Internal1_mac + compute_fsb_scheduler_hints: + - group: VM_Affinity_group + compute_fsb_name: + - get_input: fsb_name_1 + port_FSB2_Internal1_security_groups: + - - int1_security_group + port_FSB_OAM_network: + - get_input: oam_net_name + port_FSB_OAM_security_groups: + - - oam_security_group + port_FSB2_Internal1_network: + - Internal1_net + port_FSB2_Internal2_mac_address: + get_input: fsb2_Internal1_mac + port_FSB2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_FSB_OAM_mac_requirements: + mac_count_required: + is_required: false + port_FSB2_Internal2_replacement_policy: + - AUTO + port_FSB2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_replacement_policy: + - AUTO + port_FSB2_Internal2_network: + - Internal2_net + port_FSB2_Internal1_replacement_policy: + - AUTO + compute_fsb_availability_zone: + - get_input: availability_zone_1 + port_FSB_OAM_fixed_ips: + - ip_address: + get_input: fsb_oam_ip_1 + port_FSB2_Internal1_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_fsb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: fsb + nfc_naming_code: fsb + requirements: + - link_fsb_FSB2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_fsb_FSB2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + oam_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: oam_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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_fsb_FSB_OAM + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB_OAM + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + groups: + vmme_gpb3_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb3.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + base_vmme_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/base_vmme.yml + description: | + Base HOT template to create vmme 2 fsb 2 ncb + members: + - int2_security_group + - oam_security_group + - gtp_security_group + - Internal2_net + - int1_security_group + - Internal1_net + - abstract_ncb + - abstract_ncb_1 + - abstract_fsb + - abstract_fsb_1 + base_vmme_volume_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/base_vmme_volume.yml + description: HOT template for vMME Cinder Volumes + members: + - fsb_volume_0 + - fsb_volume_1 + vmme_gpb1_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb1.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_gpb4_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb4.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_gpb2_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb2.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + VM_Affinity_group: + type: tosca.groups.Root + members: + - abstract_ncb + - abstract_ncb_1 + - abstract_vlc + - abstract_fsb + - abstract_fsb_1 + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_vlc_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_vlc.yml + description: | + Module HOT template to create vmme 8 vlcs + members: + - abstract_vlc + outputs: + oam_management_v4_address: + description: ID of OAM VIP to be provisioned in A&AI + value: + get_input: vip_oam_management_v4_ip + fsb_volume_id_1: + description: ID of Cinder Volume for FSB2 + value: fsb_volume_1 + security_group_sctp_b_id: + description: ID of sctpb_security_group + value: UNSUPPORTED_RESOURCE_sctpb_security_group + service_instance_id_0: + description: ID of Service Instance used for vLCs + value: UNSUPPORTED_RESOURCE_template_ServiceInstance_VLC + security_group_sctp_a_id: + description: ID of sctpa_security_group + value: UNSUPPORTED_RESOURCE_sctpa_security_group + fsb_volume_id_0: + description: ID of Cinder Volume for FSB1 + value: fsb_volume_0 + policies: + VM_Affinity_policy: + type: org.openecomp.policies.placement.Antilocate + properties: + container_type: host + targets: + - VM_Affinity_group diff --git a/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeDifferentRequirementNode.yaml b/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeDifferentRequirementNode.yaml new file mode 100644 index 0000000000..d45a07322d --- /dev/null +++ b/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeDifferentRequirementNode.yaml @@ -0,0 +1,3585 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: Main +imports: +- openecomp_heat_index: + file: openecomp-heat/_index.yml +- GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml +topology_template: + inputs: + vlc4_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc4_Internal2 + default: 00:80:37:0E:04:12 + sctp-a-egress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + sctp-b-ipv6-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: IPV6 start port + default: 0 + constraints: + - in_range: + - 0 + - 65535 + ncb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb1_Internal2 + default: 00:80:37:0E:09:12 + sctp-a-ipv6-ingress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + gpb8_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb8_Internal1 + default: 00:80:37:0E:10:22 + sctp-a-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + sctp-b-display_name: + hidden: false + immutable: false + type: string + description: display_name for the SecurityGroup + default: epc-sctp-b-ipv4v6-sec-group + sctp-a-ingress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-a-egress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + ncb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers ncb + default: nv.c8r32d1 + vlc3_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc3_Internal1 + default: 00:80:37:0E:03:12 + Internal2_net_cidr: + hidden: false + immutable: false + type: string + description: CIDR for internal-2 network + default: 169.255.0.0 + sctp-a-egress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-egress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + gpb4_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb4_Internal2 + default: 00:80:37:0E:0C:22 + sctp-b-ipv6-egress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + vlc8_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc8_Internal1 + default: 00:80:37:0E:08:12 + sctp-b-ipv6-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: IPV6 ending port for destination + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + fsb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb2_Internal1 + default: 00:80:37:0E:0D:12 + sctp-b-name: + hidden: false + immutable: false + type: string + description: name for the SecurityGroup + default: epc-sctp-b-ipv4v6-sec-group + sctp-b-ipv6-egress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + internal_net_id_1: + hidden: false + immutable: false + type: string + description: UUID of Internal2_net + default: e3397c69-a942-49aa-81cb-fb91ff34abc8 + sctp-a-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + internal_net_id_0: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net + default: 871de971-22ac-47b6-befb-50e7d4cb67ea + sctp_b_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN SCTPB + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPB_net_1 + sctp-a-ipv6-ingress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + sctp-b-ipv6-ingress_src_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix length + default: '0' + ncb_name_1: + hidden: false + immutable: false + type: string + description: Name of ncb2 + default: zrdm3mmex59ncb002 + ncb_name_0: + hidden: false + immutable: false + type: string + description: Name of ncb1 + default: zrdm3mmex59ncb001 + vlc_st_virtualization_type: + hidden: false + immutable: false + type: string + description: Indicates virtualization type + default: virtual-machine + vlc2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc2_Internal1 + default: 00:80:37:0E:02:12 + sctp-b-ingress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-display_name: + hidden: false + immutable: false + type: string + description: display_name for the SecurityGroup + default: epc-sctp-a-ipv4v6-sec-group + sctp-b-ingress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + int2_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for internal-2 + default: int2-sec-group + gpb5_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb5_Internal2 + default: 00:80:37:0E:0D:22 + sctp-a-egress-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: dst subnet + default: '::' + OS::stack_name: + type: string + required: false + sctp-b-egress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + Internal2_shared: + hidden: false + immutable: false + type: string + description: Whether Shared or private internal-2 network + default: false + sctp-a-ipv6-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + Internal2_rpf: + hidden: false + immutable: false + type: string + description: Reverse Path Forwarding Enabled/Disabled internal-2 network + default: disable + vlc5_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc5_Internal2 + default: 00:80:37:0E:05:12 + sctp-a-ipv6-egress_src_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + Internal1_forwarding_mode: + hidden: false + immutable: false + type: string + description: L2 or L3 forwarding mode for internal-1 network + default: l2 + gpb3_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb3_Internal1 + default: 00:80:37:0E:0B:22 + vip_oam_management_v4_ip: + hidden: false + immutable: false + type: string + description: IP address of OAM service IP address to be provisioned in A&AI + default: 107.239.72.176 + vmi_oam_preference_primary: + hidden: false + immutable: false + type: float + description: Preference for primary interface/port + default: 200 + sctp-b-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp-a-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + security_group_sctp_b_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 92a4ae54-1733-4d03-b488-f178bb9f7b82 + Internal2_forwarding_mode: + hidden: false + immutable: false + type: string + description: L2 or L3 forwarding mode for internal-2 network + default: l2 + sctp-a-ipv6-egress_dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-b-egress-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: dst subnet + default: '::' + sctp-b-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + security_group_oam_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 4ae4aa74-3e8e-4f2b-8b5f-a8bd262da96b + gpb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb2_Internal1 + default: 00:80:37:0E:0A:22 + security_group_int1_id: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net security group + default: 94c62578-835d-4801-9372-70a2cfb22683 + sctp-a-egress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + oam_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN OAM + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_OAM_net_1 + ncb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb2_Internal2 + default: 00:80:37:0E:0F:12 + vlc_st_interface_type_sctp_a: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: left + gpb3_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb3_Internal2 + default: 00:80:37:0E:0B:22 + vlc_st_interface_type_sctp_b: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: right + gpb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb1_Internal2 + default: 00:80:37:0E:09:22 + oam_net_name: + hidden: false + immutable: false + type: string + description: Network Name OAM + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_OAM_net_1 + sctp-b-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb1_Internal1 + default: 00:80:37:0E:0B:12 + sctp-b-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + vlc_st_interface_type_oam: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: management + shc_monitor_type: + hidden: false + immutable: false + type: string + description: health check + default: PING + oam_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for OAM + default: oam-sec-group + Internal2_net_gateway: + hidden: false + immutable: false + type: string + description: gateway for internal-2 network + default: 169.255.0.3 + evac_policy: + hidden: false + immutable: false + type: string + description: CMHA Policy + default: Evacuate + server_group_id_0: + hidden: false + immutable: false + type: string + description: ID of Anti-Affinity Policy-based Server Group + default: ec99a73d-38f8-4280-8103-ba8ee584629f + vlc8_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc8_Internal2 + default: 00:80:37:0E:08:12 + sctp-b-ipv6-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + gtp_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for GTP + default: gtp-sec-group + vlc_sctp_b_v6_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPB + default: fd00:200:200:5:0:0:0:24 + vlc_sctp_b_v6_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPB + default: fd00:200:200:5:0:0:0:17 + sctp-a-ipv6-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + vlc_sctp_b_v6_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPB + default: fd00:200:200:5:0:0:0:16 + vlc4_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc4_Internal1 + default: 00:80:37:0E:04:12 + vlc_sctp_b_v6_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPB + default: fd00:200:200:5:0:0:0:28 + vlc_sctp_b_v6_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPB + default: fd00:200:200:5:0:0:0:27 + vlc_sctp_b_v6_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPB + default: fd00:200:200:5:0:0:0:26 + vlc_sctp_b_v6_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPB + default: fd00:200:200:5:0:0:0:25 + sctp_b_net_name: + hidden: false + immutable: false + type: string + description: Network Name SCTPB + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPB_net_1 + sctp-b-ipv6-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: '0' + sctp-a-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + Internal1_shared: + hidden: false + immutable: false + type: string + description: Whether Shared or private internal-1 network + default: false + shc_url_path: + hidden: false + immutable: false + type: string + description: health check + default: local-ip + Internal2_net_cidr_len: + hidden: false + immutable: false + type: string + description: CIDR length for internal-2 network + default: 17 + sctp-a-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-b-ipv6-ingress_src_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + sctp-a-egress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-ingress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-b-ipv6-ingress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc_st_service_type: + hidden: false + immutable: false + type: string + description: service type + default: firewall + sctp-b-ipv6-ingress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 starting port for destination + default: 0 + vlc_st_availability_zone: + hidden: false + immutable: false + type: string + description: Indicates availability zone is enabled + default: true + vlc7_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc7_Internal1 + default: 00:80:37:0E:07:12 + fsb_volume_image_name_1: + label: MME_FSB2 + hidden: false + immutable: false + type: string + description: volume name + default: MME_FSB2_1_3_GA.qcow2 + vlc_oam_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 OAM + default: 107.239.72.151 + sctp-a-ipv6-ingress_src_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix length + default: '0' + vlc_oam_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 OAM + default: 107.239.72.152 + Internal1_allow_transit: + hidden: false + immutable: false + type: string + description: Allow/disallow transit internal-1 network + default: true + vlc_oam_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 OAM + default: 107.239.72.157 + vlc_oam_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 OAM + default: 107.239.72.158 + vlc_gtp_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 GTP + default: 107.243.47.208 + vlc_oam_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 OAM + default: 107.239.72.149 + fsb_volume_image_name_0: + label: MME_FSB1 + hidden: false + immutable: false + type: string + description: volume name + default: MME_FSB1_1_3_GA.qcow2 + vlc_gtp_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 GTP + default: 107.243.47.209 + vlc_oam_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 OAM + default: 107.239.72.150 + vlc_gtp_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 GTP + default: 107.243.47.216 + vlc_name_6: + hidden: false + immutable: false + type: string + description: Name of vlc7 + default: zrdm3mmex59vlc007 + vlc_gtp_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 GTP + default: 107.243.47.217 + vlc_name_7: + hidden: false + immutable: false + type: string + description: Name of vlc8 + default: zrdm3mmex59vlc008 + security_group_sctp_a_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 3cd8a524-77ff-4980-ae2a-d19ba70e0511 + vlc_gtp_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 GTP + default: 107.243.47.218 + vlc_gtp_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 GTP + default: 107.243.47.219 + vlc_gtp_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 GTP + default: 107.243.47.220 + vlc_name_2: + hidden: false + immutable: false + type: string + description: Name of vlc3 + default: zrdm3mmex59vlc003 + vlc_gtp_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 GTP + default: 107.243.47.221 + vlc_name_3: + hidden: false + immutable: false + type: string + description: Name of vlc4 + default: zrdm3mmex59vlc004 + vlc_name_4: + hidden: false + immutable: false + type: string + description: Name of vlc5 + default: zrdm3mmex59vlc005 + vlc_name_5: + hidden: false + immutable: false + type: string + description: Name of vlc6 + default: zrdm3mmex59vlc006 + fsb_volume_id_1: + hidden: false + immutable: false + type: string + description: ID of Cinder Volume for FSB2 + default: 5bd0560c-bfd0-47dc-a84a-554e2698c925 + sctp-a-ipv6-ingress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc_name_0: + hidden: false + immutable: false + type: string + description: Name of vlc1 + default: zrdm3mmex59vlc001 + vlc_name_1: + hidden: false + immutable: false + type: string + description: Name of vlc2 + default: zrdm3mmex59vlc002 + vlc_oam_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on OAM + sctp-b-egress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + vlc_oam_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 OAM + default: 107.239.72.155 + vlc_oam_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 OAM + default: 107.239.72.156 + vlc6_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc6_Internal1 + default: 00:80:37:0E:06:12 + fsb_volume_id_0: + hidden: false + immutable: false + type: string + description: ID of Cinder Volume for FSB1 + default: 27baa6a0-b701-4795-bf5e-4f546b350b1f + sctp-b-egress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + gpb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb2_Internal2 + default: 00:80:37:0E:0A:22 + sctp-a-ipv6-egress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + sctp-b-ipv6-egress_src_start_port: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0 + Internal2_allow_transit: + hidden: false + immutable: false + type: string + description: Allow/disallow transit internal-2 network + default: true + fsb_volume_size: + label: volume size + hidden: false + immutable: false + type: float + description: volume size 320GB + default: 320 + constraints: + - in_range: + - 0 + - 340 + sctp-b-IPv6_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv6 + gtp_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN GTP + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_GTP_net_1 + ncb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb2_Internal1 + default: 00:80:37:0E:0F:12 + sctp-b-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + sctp-b-ingress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-b-egress_src_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + gpb7_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb7_Internal2 + default: 00:80:37:0E:0F:22 + sctp-a-ipv6-ingress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 starting port for destination + default: 0 + gtp_net_name: + hidden: false + immutable: false + type: string + description: Network Name GTP + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_GTP_net_1 + sctp-b-ipv6-ingress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + domain_name: + hidden: false + immutable: false + type: string + description: Unique name of vMME contrail domain + default: default-domain + vlc5_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc5_Internal1 + default: 00:80:37:0E:05:12 + sctp-a-egress_src_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + sctp-b-egress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + shc_enabled: + hidden: false + immutable: false + type: string + description: health check + default: true + sctp-b-ipv6-ingress-dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-b-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp_a_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN SCTPA + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPA_net_1 + security_group_gtp_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: e8ad3fe2-5f95-43e4-bbcc-da97b1c22588 + sctp-a-ipv6-ingress_src_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + fsb_name_1: + hidden: false + immutable: false + type: string + description: Name of fsb1 + default: zrdm3mmex59fsb002 + sctp-b-egress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb_name_0: + hidden: false + immutable: false + type: string + description: Name of fsb1 + default: zrdm3mmex59fsb001 + sctp_a_net_name: + hidden: false + immutable: false + type: string + description: Network Name SCTPA + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPA_net_1 + sctp-b-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + gpb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb1_Internal1 + default: 00:80:37:0E:09:22 + sctp-a-ingress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb1_Internal2 + default: 00:80:37:0E:0B:12 + vlc_st_service_mode: + hidden: false + immutable: false + type: string + description: service mode + default: in-network-nat + sctp-a-ipv6-egress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + sctp-a-egress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-b-egress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-a-ingress-src_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + sctp-a-ipv6-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: IPV6 start port + default: 0 + constraints: + - in_range: + - 0 + - 65535 + vf_module_id: + hidden: false + immutable: false + type: string + description: the vf_module_id for this instance. UUID provided by ECOMP + default: TWO + Internal1_net_cidr: + hidden: false + immutable: false + type: string + description: CIDR for internal-1 network + default: 169.253.0.0 + fsb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers fsb1 + default: nv.c8r32d1 + sctp_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: 132 + vnf_name: + hidden: false + immutable: false + type: string + description: the vnf_name for this instance. provided by ECOMP + default: zrdm3mmex59 + sctp-a-IPv6_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv6 + vlc_sctp_b_v6_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPB + default: fd00:200:200:5:0:0:0:29 + vlc6_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc6_Internal2 + default: 00:80:37:0E:06:12 + sctp-b-ingress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc7_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc7_Internal2 + default: 00:80:37:0E:07:12 + sctp-a-ipv6-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: IPV6 ending port for destination + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers vlc + default: nd.c16r64d1 + sctp-b-ipv6-egress_src_addresses: + hidden: false + immutable: false + type: string + description: IPV6 source + default: local + vlc_st_interface_type_int1: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other1 + availability_zone_0: + hidden: false + immutable: false + type: string + description: cluster for spawnning fsb instances + default: rdm3-kvm-az02 + service_instance_id_0: + hidden: false + immutable: false + type: string + description: UUID of service instance for vLCs + default: 77c67cc8-d15f-47bc-aeb1-8d65d09e917a + availability_zone_1: + hidden: false + immutable: false + type: string + description: cluster for spawnning ncb instances + default: rdm3-kvm-az02 + vlc_st_interface_type_int2: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other2 + sctp-a-ipv6-egress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 start port + default: 0 + sctp-a-ipv6-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: '0' + vlc_sctp_a_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPA + default: 107.243.47.144 + vlc_sctp_b_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on SCTPB + vlc1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal1 + default: 00:80:37:0E:01:12 + sctp-b-ipv6-egress_src_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-a-ipv6-egress_src_addresses: + hidden: false + immutable: false + type: string + description: IPV6 source + default: local + vlc_sctp_a_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPA + default: 107.243.47.157 + sctp-a-ingress-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: src subnet + default: '::' + vlc_sctp_a_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPA + default: 107.243.47.156 + vlc_sctp_a_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPA + default: 107.243.47.155 + sctp-a-ingress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc_sctp_a_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPA + default: 107.243.47.154 + vlc_sctp_a_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPA + default: 107.243.47.153 + vlc_sctp_a_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPA + default: 107.243.47.152 + vlc_sctp_a_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPA + default: 107.243.47.145 + gpb6_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb6_Internal2 + default: 00:80:37:0E:0E:22 + security_group_int2_id: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net security group + default: 1361f069-baf2-4b76-b321-7f68ba26c369 + Internal2_dhcp: + hidden: false + immutable: false + type: string + description: Whether DHCP/static IP addressing on internal-2 network + default: false + sctp-a-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + pxe_image_name: + hidden: false + immutable: false + type: string + description: Name of image to use for server ncb + default: MME_PXE-Boot_1_3_GA.qcow2 + vlc_st_interface_type_gtp: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other0 + ncb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb1_Internal1 + default: 00:80:37:0E:09:12 + vlc_gtp_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on GTP + int1_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for internal-1 + default: int1-sec-group + vmi_oam_preference_secondary: + hidden: false + immutable: false + type: float + description: Preference for secondary interface/port + default: 100 + Internal1_dhcp: + hidden: false + immutable: false + type: string + description: Whether DHCP/static IP addressing on internal-1 network + default: false + fsb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb2_Internal2 + default: 00:80:37:0E:0D:12 + Internal1_net_cidr_len: + hidden: false + immutable: false + type: string + description: CIDR length for internal-1 network + default: 17 + sctp-a-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + sctp-b-ingress-src_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + fsb_oam_ip_1: + hidden: false + immutable: false + type: string + description: IP address of OAM vNIC for FSB2 + default: 107.239.72.154 + fsb_oam_ip_0: + hidden: false + immutable: false + type: string + description: IP address of OAM vNIC for FSB1 + default: 107.239.72.153 + shc_timeout: + hidden: false + immutable: false + type: string + description: health check + default: 5 + vlc_st_version: + hidden: false + immutable: false + type: string + description: Indicates service version + default: 2 + sctp-a-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp-a-ingress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + sctp-b-egress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-a-ipv6-egress_src_start_port: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0 + instance_ip_family_v6: + hidden: false + immutable: false + type: string + description: Ipv6 instance type + default: v6 + sctp-b-ingress-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: src subnet + default: '::' + gpb8_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb8_Internal2 + default: 00:80:37:0E:10:22 + gpb4_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb4_Internal1 + default: 00:80:37:0E:0C:22 + sctp-a-ipv6-ingress-dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + Internal1_net_gateway: + hidden: false + immutable: false + type: string + description: gateway for internal-1 network + default: 169.253.0.3 + sctp-b-ipv6-egress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 start port + default: 0 + gpb_name_7: + hidden: false + immutable: false + type: string + description: Name of gpb8 + default: zrdm3mmex59gpb0016 + gpb_name_6: + hidden: false + immutable: false + type: string + description: Name of gpb7 + default: zrdm3mmex59gpb0015 + gpb_name_5: + hidden: false + immutable: false + type: string + description: Name of gpb6 + default: zrdm3mmex59gpb0014 + gpb_name_4: + hidden: false + immutable: false + type: string + description: Name of gpb5 + default: zrdm3mmex59gpb0013 + gpb_name_3: + hidden: false + immutable: false + type: string + description: Name of gpb4 + default: zrdm3mmex59gpb0012 + sctp-a-ipv6-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: IPV6 destination + default: local + gpb_name_2: + hidden: false + immutable: false + type: string + description: Name of gpb3 + default: zrdm3mmex59gpb0011 + shc_delay: + hidden: false + immutable: false + type: string + description: health check + default: 3 + gpb_name_1: + hidden: false + immutable: false + type: string + description: Name of gpb2 + default: zrdm3mmex59gpb0010 + sctp-b-ipv6-egress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc3_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc3_Internal2 + default: 00:80:37:0E:03:12 + gpb_name_0: + hidden: false + immutable: false + type: string + description: Name of gpb1 + default: zrdm3mmex59gpb009 + sctp-a-ipv6-egress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + gpb5_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb5_Internal1 + default: 00:80:37:0E:0D:22 + sctp-b-ipv6-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + shc_max_retries: + hidden: false + immutable: false + type: string + description: health check + default: 2 + fsb_volume_type: + label: volume type + hidden: false + immutable: false + type: string + description: volume type SolidFire + default: SF-Default-SSD + sctp-a-name: + hidden: false + immutable: false + type: string + description: name for the SecurityGroup + default: epc-sctp-a-ipv4v6-sec-group + vlc_sctp_b_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPB + default: 107.243.47.187 + vlc_sctp_b_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPB + default: 107.243.47.186 + vlc_sctp_b_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPB + default: 107.243.47.185 + vlc_sctp_b_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPB + default: 107.243.47.184 + sctp-b-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + vnf_id: + hidden: false + immutable: false + type: string + description: the vf_id for this instance. UUID provided by ECOMP + default: zrdm3mmex59 + vlc_sctp_b_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPB + default: 107.243.47.189 + vlc_sctp_b_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPB + default: 107.243.47.188 + vlc_sctp_b_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPB + default: 107.243.47.177 + gpb6_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb6_Internal1 + default: 00:80:37:0E:0E:22 + sctp-b-ipv6-egress_dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + vlc_sctp_b_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPB + default: 107.243.47.176 + vlc2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc2_Internal2 + default: 00:80:37:0E:02:12 + sctp-b-ingress-src_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + gpb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers gpb + default: nv.c20r64d1 + vlc_sctp_a_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on SCTPA + sctp-b-ipv6-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: IPV6 destination + default: local + sctp-b-ipv6-ingress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + sctp-b-ipv6-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + sctp-a-ingress-src_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + vlc1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal2 + default: 00:80:37:0E:01:12 + Internal1_rpf: + hidden: false + immutable: false + type: string + description: Reverse Path Forwarding Enabled/Disabled internal-1 network + default: disable + sctp-b-ingress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-b-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-ipv6-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + vlc_sctp_a_v6_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPA + default: fd00:200:200:4:0:0:0:29 + vlc_sctp_a_v6_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPA + default: fd00:200:200:4:0:0:0:28 + gpb7_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb7_Internal1 + default: 00:80:37:0E:0F:22 + vlc_sctp_a_v6_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPA + default: fd00:200:200:4:0:0:0:27 + vlc_sctp_a_v6_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPA + default: fd00:200:200:4:0:0:0:26 + vlc_sctp_a_v6_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPA + default: fd00:200:200:4:0:0:0:25 + vlc_sctp_a_v6_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPA + default: fd00:200:200:4:0:0:0:24 + sctp-a-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + vlc_sctp_a_v6_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPA + default: fd00:200:200:4:0:0:0:17 + vlc_sctp_a_v6_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPA + default: fd00:200:200:4:0:0:0:16 + node_templates: + abstract_gpb_1: + type: org.openecomp.resource.abstract.nodes.gpb_1 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_1 + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb2_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb2_Internal2_network: + - get_input: internal_net_id_1 + port_gpb2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_image_name: + get_input: pxe_image_name + port_gpb2_Internal1_replacement_policy: + - AUTO + port_gpb2_Internal1_network: + - get_input: internal_net_id_0 + port_gpb2_Internal2_replacement_policy: + - AUTO + port_gpb2_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb2_Internal1_mac_address: + get_input: gpb2_Internal1_mac + port_gpb2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb2_Internal2_mac_address: + get_input: gpb2_Internal1_mac + port_gpb2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb2_Internal2_security_groups: + - - get_input: security_group_int2_id + service_template_filter: + substitute_service_template: Nested_gpb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_2: + type: org.openecomp.resource.abstract.nodes.gpb_2 + directives: + - substitutable + properties: + port_gpb3_Internal1_replacement_policy: + - AUTO + compute_gpb_name: + - get_input: gpb_name_2 + port_gpb3_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb3_Internal2_replacement_policy: + - AUTO + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb3_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb3_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb3_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb3_Internal1_network: + - get_input: internal_net_id_0 + port_gpb3_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb3_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb3_Internal1_mac_address: + get_input: gpb3_Internal1_mac + port_gpb3_Internal2_mac_address: + get_input: gpb3_Internal1_mac + port_gpb3_Internal2_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_gpb_2ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb3_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb3_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_vlc: + type: org.openecomp.resource.abstract.nodes.vlc + directives: + - substitutable + properties: + port_template_VMInt_SCTP_A_vlc_virtual_network_refs: + - - get_input: sctp_a_net_fqdn + port_template_VMInt_INT1_vlc_security_group_refs: + - - get_input: security_group_int1_id + vm_flavor_name: + get_input: vlc_flavor_name + port_template_VMInt_INT2_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + vm_image_name: + get_input: pxe_image_name + port_template_VMInt_INT1_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_INT2_vlc_virtual_network_refs: + - - get_input: internal_net_id_1 + port_template_VMInt_OAM_vlc_virtual_network_refs: + - - get_input: oam_net_fqdn + port_template_VMInt_OAM_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_INT2_vlc_virtual_machine_interface_mac_addresses: + - - get_input: vlc4_Internal2_mac + - - get_input: vlc3_Internal2_mac + - - get_input: vlc2_Internal2_mac + - - get_input: vlc1_Internal2_mac + - - get_input: vlc8_Internal2_mac + - - get_input: vlc7_Internal2_mac + - - get_input: vlc6_Internal2_mac + - - get_input: vlc5_Internal2_mac + port_template_VMInt_SCTP_B_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_GTP_vlc_security_group_refs: + - - get_input: security_group_gtp_id + compute_vlc_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_template_VMInt_OAM_vlc_security_group_refs: + - - get_input: security_group_oam_id + compute_vlc_contrail_service_instance_ind: + - true + - true + - true + - true + - true + - true + - true + - true + port_template_VMInt_GTP_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_SCTP_B_vlc_virtual_network_refs: + - - get_input: sctp_b_net_fqdn + port_template_VMInt_INT2_vlc_security_group_refs: + - - get_input: security_group_int2_id + port_template_VMInt_SCTP_B_vlc_security_group_refs: + - - get_input: security_group_sctp_b_id + port_template_VMInt_INT1_vlc_virtual_network_refs: + - - get_input: internal_net_id_0 + port_template_VMInt_SCTP_A_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + compute_vlc_scheduler_hints: + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + compute_vlc_name: + - get_input: vlc_name_3 + - get_input: vlc_name_2 + - get_input: vlc_name_1 + - get_input: vlc_name_0 + - get_input: vlc_name_7 + - get_input: vlc_name_6 + - get_input: vlc_name_5 + - get_input: vlc_name_4 + port_template_VMInt_SCTP_A_vlc_security_group_refs: + - - get_input: security_group_sctp_a_id + compute_vlc_availability_zone: + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + port_template_VMInt_INT1_vlc_virtual_machine_interface_mac_addresses: + - - get_input: vlc4_Internal1_mac + - - get_input: vlc3_Internal1_mac + - - get_input: vlc2_Internal1_mac + - - get_input: vlc1_Internal1_mac + - - get_input: vlc8_Internal1_mac + - - get_input: vlc7_Internal1_mac + - - get_input: vlc6_Internal1_mac + - - get_input: vlc5_Internal1_mac + port_template_VMInt_GTP_vlc_virtual_network_refs: + - - get_input: gtp_net_fqdn + service_template_filter: + substitute_service_template: Nested_vlcServiceTemplate.yaml + count: 8 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: vlc + nfc_naming_code: vlc + requirements: + - link_vlc_template_VMInt_INT2_vlc: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + - link_vlc_template_VMInt_INT1_vlc: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_7: + type: org.openecomp.resource.abstract.nodes.gpb_7 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_7 + port_gpb8_Internal1_mac_address: + get_input: gpb8_Internal1_mac + port_gpb8_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb8_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb8_Internal1_replacement_policy: + - AUTO + port_gpb8_Internal2_replacement_policy: + - AUTO + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb8_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb8_Internal1_network: + - get_input: internal_net_id_0 + port_gpb8_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb8_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb8_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb8_Internal2_network: + - get_input: internal_net_id_1 + port_gpb8_Internal2_mac_address: + get_input: gpb8_Internal1_mac + service_template_filter: + substitute_service_template: Nested_gpb_7ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb8_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb8_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_5: + type: org.openecomp.resource.abstract.nodes.gpb_5 + directives: + - substitutable + properties: + port_gpb6_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_name: + - get_input: gpb_name_5 + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb6_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_image_name: + get_input: pxe_image_name + port_gpb6_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb6_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb6_Internal1_network: + - get_input: internal_net_id_0 + port_gpb6_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb6_Internal2_mac_address: + get_input: gpb6_Internal1_mac + port_gpb6_Internal1_mac_address: + get_input: gpb6_Internal1_mac + port_gpb6_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb6_Internal2_replacement_policy: + - AUTO + port_gpb6_Internal1_replacement_policy: + - AUTO + port_gpb6_Internal2_security_groups: + - - get_input: security_group_int2_id + service_template_filter: + substitute_service_template: Nested_gpb_5ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb6_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb6_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_6: + type: org.openecomp.resource.abstract.nodes.gpb_6 + directives: + - substitutable + properties: + port_gpb7_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb7_Internal1_network: + - get_input: internal_net_id_0 + compute_gpb_name: + - get_input: gpb_name_6 + port_gpb7_Internal2_network: + - get_input: internal_net_id_1 + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb7_Internal1_replacement_policy: + - AUTO + port_gpb7_Internal2_replacement_policy: + - AUTO + port_gpb7_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb7_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb7_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb7_Internal2_mac_address: + get_input: gpb7_Internal1_mac + port_gpb7_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb7_Internal1_mac_address: + get_input: gpb7_Internal1_mac + port_gpb7_Internal2_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_gpb_6ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb7_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb7_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_3: + type: org.openecomp.resource.abstract.nodes.gpb_3 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_3 + port_gpb4_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb4_Internal1_mac_address: + get_input: gpb4_Internal1_mac + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb4_Internal2_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb4_Internal2_mac_address: + get_input: gpb4_Internal1_mac + vm_image_name: + get_input: pxe_image_name + port_gpb4_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb4_Internal2_replacement_policy: + - AUTO + port_gpb4_Internal1_replacement_policy: + - AUTO + port_gpb4_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb4_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb4_Internal2_network: + - get_input: internal_net_id_1 + port_gpb4_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb4_Internal1_network: + - get_input: internal_net_id_0 + service_template_filter: + substitute_service_template: Nested_gpb_3ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb4_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb4_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_4: + type: org.openecomp.resource.abstract.nodes.gpb_4 + directives: + - substitutable + properties: + port_gpb5_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb5_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_name: + - get_input: gpb_name_4 + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb5_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb5_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb5_Internal1_network: + - get_input: internal_net_id_0 + port_gpb5_Internal2_mac_address: + get_input: gpb5_Internal1_mac + port_gpb5_Internal1_mac_address: + get_input: gpb5_Internal1_mac + port_gpb5_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb5_Internal2_replacement_policy: + - AUTO + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb5_Internal1_replacement_policy: + - AUTO + port_gpb5_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb5_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + service_template_filter: + substitute_service_template: Nested_gpb_4ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb5_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb5_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb: + type: org.openecomp.resource.abstract.nodes.gpb + directives: + - substitutable + properties: + port_gpb1_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_name: + - get_input: gpb_name_0 + port_gpb1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb1_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb1_Internal1_mac_address: + get_input: gpb1_Internal1_mac + port_gpb1_Internal2_mac_address: + get_input: gpb1_Internal1_mac + port_gpb1_Internal2_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb1_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb1_Internal1_replacement_policy: + - AUTO + port_gpb1_Internal2_replacement_policy: + - AUTO + port_gpb1_Internal2_network: + - get_input: internal_net_id_1 + port_gpb1_Internal1_network: + - get_input: internal_net_id_0 + service_template_filter: + substitute_service_template: Nested_gpbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + Internal1_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_enable_dhcp: + get_input: Internal1_dhcp + network_ipam_refs_data_ipam_subnets_default_gateway: + get_input: Internal1_net_gateway + network_ipam_refs_data_ipam_subnets_subnet: + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: + get_input: Internal1_net_cidr_len + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: + get_input: Internal1_net_cidr + network_name: + str_replace: + template: $VNF_NAME_int_net_1 + params: + $VNF_NAME: + get_input: vnf_name + network_ipam_refs: + - UNSUPPORTED_RESOURCE_template_NetworkIpam_Internal1 + abstract_fsb: + type: org.openecomp.resource.abstract.nodes.fsb + directives: + - substitutable + properties: + port_FSB1_Internal1_mac_address: + get_input: fsb1_Internal1_mac + port_FSB_OAM_network_role_tag: + - oam + port_FSB1_Internal2_network: + - Internal2_net + port_FSB1_Internal1_network: + - Internal1_net + vm_flavor_name: + get_input: fsb_flavor_name + port_FSB1_Internal2_mac_address: + get_input: fsb1_Internal1_mac + port_FSB_OAM_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: true + floating_ip_count_required: + is_required: false + compute_fsb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_FSB1_Internal1_security_groups: + - - int1_security_group + port_FSB1_Internal2_replacement_policy: + - AUTO + compute_fsb_scheduler_hints: + - group: VM_Affinity_group + port_FSB1_Internal1_replacement_policy: + - AUTO + compute_fsb_name: + - get_input: fsb_name_0 + port_FSB1_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_FSB1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_network: + - get_input: oam_net_name + port_FSB_OAM_security_groups: + - - oam_security_group + port_FSB_OAM_mac_requirements: + mac_count_required: + is_required: false + port_FSB_OAM_replacement_policy: + - AUTO + compute_fsb_availability_zone: + - get_input: availability_zone_0 + port_FSB1_Internal2_security_groups: + - - int2_security_group + port_FSB1_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_FSB1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_fixed_ips: + - ip_address: + get_input: fsb_oam_ip_0 + service_template_filter: + substitute_service_template: Nested_fsbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: fsb + nfc_naming_code: fsb + requirements: + - link_fsb_FSB1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_fsb_FSB1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + gtp_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: gtp_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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 + abstract_ncb_1: + type: org.openecomp.resource.abstract.nodes.ncb_1 + directives: + - substitutable + properties: + port_NCB2_Internal2_security_groups: + - - int2_security_group + port_NCB2_Internal1_replacement_policy: + - AUTO + port_NCB2_Internal2_replacement_policy: + - AUTO + vm_flavor_name: + get_input: ncb_flavor_name + port_NCB2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_NCB2_Internal1_mac_requirements: + mac_count_required: + is_required: true + vm_image_name: + get_input: pxe_image_name + compute_ncb_scheduler_hints: + - group: VM_Affinity_group + compute_ncb_availability_zone: + - get_input: availability_zone_1 + port_NCB2_Internal1_network: + - Internal1_net + port_NCB2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_NCB2_Internal1_security_groups: + - - int1_security_group + port_NCB2_Internal2_network: + - Internal2_net + port_NCB2_Internal1_mac_address: + get_input: ncb2_Internal1_mac + port_NCB2_Internal2_mac_address: + get_input: ncb2_Internal1_mac + compute_ncb_name: + - get_input: ncb_name_1 + compute_ncb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_NCB2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + service_template_filter: + substitute_service_template: Nested_ncb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: ncb + nfc_naming_code: ncb + requirements: + - link_ncb_NCB2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_ncb_NCB2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_ncb: + type: org.openecomp.resource.abstract.nodes.ncb + directives: + - substitutable + properties: + vm_flavor_name: + get_input: ncb_flavor_name + port_NCB1_Internal2_mac_requirements: + mac_count_required: + is_required: true + vm_image_name: + get_input: pxe_image_name + port_NCB1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + compute_ncb_scheduler_hints: + - group: VM_Affinity_group + port_NCB1_Internal1_security_groups: + - - int1_security_group + compute_ncb_availability_zone: + - get_input: availability_zone_0 + port_NCB1_Internal2_mac_address: + get_input: ncb1_Internal1_mac + port_NCB1_Internal1_mac_address: + get_input: ncb1_Internal1_mac + port_NCB1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_NCB1_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_NCB1_Internal2_replacement_policy: + - AUTO + port_NCB1_Internal1_network: + - Internal1_net + port_NCB1_Internal2_security_groups: + - - int2_security_group + port_NCB1_Internal1_replacement_policy: + - AUTO + compute_ncb_name: + - get_input: ncb_name_0 + compute_ncb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_NCB1_Internal2_network: + - Internal2_net + service_template_filter: + substitute_service_template: Nested_ncbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: ncb + nfc_naming_code: ncb + requirements: + - link_ncb_NCB1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_ncb_NCB1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + int1_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: int1_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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_fsb_FSB1_Internal1 + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB2_Internal1 + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB1_Internal1 + node: abstract_ncb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB2_Internal1 + node: abstract_ncb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb1_Internal1 + node: abstract_gpb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb2_Internal1 + node: abstract_gpb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb3_Internal1 + node: abstract_gpb_2 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb4_Internal1 + node: abstract_gpb_3 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb5_Internal1 + node: abstract_gpb_4 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb6_Internal1 + node: abstract_gpb_5 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb7_Internal1 + node: abstract_gpb_6 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb8_Internal1 + node: abstract_gpb_7 + relationship: org.openecomp.relationships.AttachesTo + fsb_volume_0: + type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume + properties: + image: + get_input: fsb_volume_image_name_0 + volume_type: + get_input: fsb_volume_type + size: '(get_input : fsb_volume_size) * 1024' + name: + list_join: + - _ + - - get_input: OS::stack_name + - FSB1_Vol_1 + fsb_volume_1: + type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume + properties: + image: + get_input: fsb_volume_image_name_1 + volume_type: + get_input: fsb_volume_type + size: '(get_input : fsb_volume_size) * 1024' + name: + list_join: + - _ + - - get_input: OS::stack_name + - FSB2_Vol_1 + Internal2_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_enable_dhcp: + get_input: Internal2_dhcp + network_ipam_refs_data_ipam_subnets_default_gateway: + get_input: Internal2_net_gateway + network_ipam_refs_data_ipam_subnets_subnet: + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: + get_input: Internal2_net_cidr_len + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: + get_input: Internal2_net_cidr + network_name: + str_replace: + template: $VNF_NAME_int_net_2 + params: + $VNF_NAME: + get_input: vnf_name + network_ipam_refs: + - UNSUPPORTED_RESOURCE_template_NetworkIpam_Internal2 + int2_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: int2_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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: 132 + 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: 132 + 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: 132 + 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: 132 + 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_fsb_FSB1_Internal2 + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB2_Internal2 + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB1_Internal2 + node: abstract_ncb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB2_Internal2 + node: abstract_ncb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb1_Internal2 + node: abstract_gpb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb2_Internal2 + node: abstract_gpb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb3_Internal2 + node: abstract_gpb_2 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb4_Internal2 + node: abstract_gpb_3 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb5_Internal2 + node: abstract_gpb_4 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb6_Internal2 + node: abstract_gpb_5 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb7_Internal2 + node: abstract_gpb_6 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb8_Internal2 + node: abstract_gpb_7 + relationship: org.openecomp.relationships.AttachesTo + abstract_fsb_1: + type: org.openecomp.resource.abstract.nodes.fsb_1 + directives: + - substitutable + properties: + port_FSB_OAM_network_role_tag: + - oam + vm_flavor_name: + get_input: fsb_flavor_name + port_FSB_OAM_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: true + floating_ip_count_required: + is_required: false + port_FSB2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB2_Internal2_security_groups: + - - int2_security_group + compute_fsb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_FSB2_Internal1_mac_address: + get_input: fsb2_Internal1_mac + compute_fsb_scheduler_hints: + - group: VM_Affinity_group + compute_fsb_name: + - get_input: fsb_name_1 + port_FSB2_Internal1_security_groups: + - - int1_security_group + port_FSB_OAM_network: + - get_input: oam_net_name + port_FSB_OAM_security_groups: + - - oam_security_group + port_FSB2_Internal1_network: + - Internal1_net + port_FSB2_Internal2_mac_address: + get_input: fsb2_Internal1_mac + port_FSB2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_FSB_OAM_mac_requirements: + mac_count_required: + is_required: false + port_FSB2_Internal2_replacement_policy: + - AUTO + port_FSB2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_replacement_policy: + - AUTO + port_FSB2_Internal2_network: + - Internal2_net + port_FSB2_Internal1_replacement_policy: + - AUTO + compute_fsb_availability_zone: + - get_input: availability_zone_1 + port_FSB_OAM_fixed_ips: + - ip_address: + get_input: fsb_oam_ip_1 + port_FSB2_Internal1_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_fsb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: fsb + nfc_naming_code: fsb + requirements: + - link_fsb_FSB2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_fsb_FSB2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + oam_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: oam_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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_fsb_FSB_OAM + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB_OAM + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + groups: + vmme_gpb3_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb3.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + base_vmme_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/base_vmme.yml + description: | + Base HOT template to create vmme 2 fsb 2 ncb + members: + - int2_security_group + - oam_security_group + - gtp_security_group + - Internal2_net + - int1_security_group + - Internal1_net + - abstract_ncb + - abstract_ncb_1 + - abstract_fsb + - abstract_fsb_1 + base_vmme_volume_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/base_vmme_volume.yml + description: HOT template for vMME Cinder Volumes + members: + - fsb_volume_0 + - fsb_volume_1 + vmme_gpb1_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb1.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_gpb4_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb4.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_gpb2_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb2.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + VM_Affinity_group: + type: tosca.groups.Root + members: + - abstract_ncb + - abstract_ncb_1 + - abstract_vlc + - abstract_fsb + - abstract_fsb_1 + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_vlc_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_vlc.yml + description: | + Module HOT template to create vmme 8 vlcs + members: + - abstract_vlc + outputs: + oam_management_v4_address: + description: ID of OAM VIP to be provisioned in A&AI + value: + get_input: vip_oam_management_v4_ip + fsb_volume_id_1: + description: ID of Cinder Volume for FSB2 + value: fsb_volume_1 + security_group_sctp_b_id: + description: ID of sctpb_security_group + value: UNSUPPORTED_RESOURCE_sctpb_security_group + service_instance_id_0: + description: ID of Service Instance used for vLCs + value: UNSUPPORTED_RESOURCE_template_ServiceInstance_VLC + security_group_sctp_a_id: + description: ID of sctpa_security_group + value: UNSUPPORTED_RESOURCE_sctpa_security_group + fsb_volume_id_0: + description: ID of Cinder Volume for FSB1 + value: fsb_volume_0 + policies: + VM_Affinity_policy: + type: org.openecomp.policies.placement.Antilocate + properties: + container_type: host + targets: + - VM_Affinity_group diff --git a/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeDifferentType.yaml b/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeDifferentType.yaml new file mode 100644 index 0000000000..ec5dc74516 --- /dev/null +++ b/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeDifferentType.yaml @@ -0,0 +1,3585 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: Main +imports: +- openecomp_heat_index: + file: openecomp-heat/_index.yml +- GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml +topology_template: + inputs: + vlc4_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc4_Internal2 + default: 00:80:37:0E:04:12 + sctp-a-egress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + sctp-b-ipv6-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: IPV6 start port + default: 0 + constraints: + - in_range: + - 0 + - 65535 + ncb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb1_Internal2 + default: 00:80:37:0E:09:12 + sctp-a-ipv6-ingress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + gpb8_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb8_Internal1 + default: 00:80:37:0E:10:22 + sctp-a-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + sctp-b-display_name: + hidden: false + immutable: false + type: string + description: display_name for the SecurityGroup + default: epc-sctp-b-ipv4v6-sec-group + sctp-a-ingress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-a-egress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + ncb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers ncb + default: nv.c8r32d1 + vlc3_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc3_Internal1 + default: 00:80:37:0E:03:12 + Internal2_net_cidr: + hidden: false + immutable: false + type: string + description: CIDR for internal-2 network + default: 169.255.0.0 + sctp-a-egress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-egress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + gpb4_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb4_Internal2 + default: 00:80:37:0E:0C:22 + sctp-b-ipv6-egress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + vlc8_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc8_Internal1 + default: 00:80:37:0E:08:12 + sctp-b-ipv6-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: IPV6 ending port for destination + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + fsb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb2_Internal1 + default: 00:80:37:0E:0D:12 + sctp-b-name: + hidden: false + immutable: false + type: string + description: name for the SecurityGroup + default: epc-sctp-b-ipv4v6-sec-group + sctp-b-ipv6-egress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + internal_net_id_1: + hidden: false + immutable: false + type: string + description: UUID of Internal2_net + default: e3397c69-a942-49aa-81cb-fb91ff34abc8 + sctp-a-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + internal_net_id_0: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net + default: 871de971-22ac-47b6-befb-50e7d4cb67ea + sctp_b_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN SCTPB + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPB_net_1 + sctp-a-ipv6-ingress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + sctp-b-ipv6-ingress_src_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix length + default: '0' + ncb_name_1: + hidden: false + immutable: false + type: string + description: Name of ncb2 + default: zrdm3mmex59ncb002 + ncb_name_0: + hidden: false + immutable: false + type: string + description: Name of ncb1 + default: zrdm3mmex59ncb001 + vlc_st_virtualization_type: + hidden: false + immutable: false + type: string + description: Indicates virtualization type + default: virtual-machine + vlc2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc2_Internal1 + default: 00:80:37:0E:02:12 + sctp-b-ingress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-display_name: + hidden: false + immutable: false + type: string + description: display_name for the SecurityGroup + default: epc-sctp-a-ipv4v6-sec-group + sctp-b-ingress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + int2_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for internal-2 + default: int2-sec-group + gpb5_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb5_Internal2 + default: 00:80:37:0E:0D:22 + sctp-a-egress-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: dst subnet + default: '::' + OS::stack_name: + type: string + required: false + sctp-b-egress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + Internal2_shared: + hidden: false + immutable: false + type: string + description: Whether Shared or private internal-2 network + default: false + sctp-a-ipv6-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + Internal2_rpf: + hidden: false + immutable: false + type: string + description: Reverse Path Forwarding Enabled/Disabled internal-2 network + default: disable + vlc5_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc5_Internal2 + default: 00:80:37:0E:05:12 + sctp-a-ipv6-egress_src_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + Internal1_forwarding_mode: + hidden: false + immutable: false + type: string + description: L2 or L3 forwarding mode for internal-1 network + default: l2 + gpb3_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb3_Internal1 + default: 00:80:37:0E:0B:22 + vip_oam_management_v4_ip: + hidden: false + immutable: false + type: string + description: IP address of OAM service IP address to be provisioned in A&AI + default: 107.239.72.176 + vmi_oam_preference_primary: + hidden: false + immutable: false + type: float + description: Preference for primary interface/port + default: 200 + sctp-b-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp-a-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + security_group_sctp_b_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 92a4ae54-1733-4d03-b488-f178bb9f7b82 + Internal2_forwarding_mode: + hidden: false + immutable: false + type: string + description: L2 or L3 forwarding mode for internal-2 network + default: l2 + sctp-a-ipv6-egress_dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-b-egress-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: dst subnet + default: '::' + sctp-b-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + security_group_oam_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 4ae4aa74-3e8e-4f2b-8b5f-a8bd262da96b + gpb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb2_Internal1 + default: 00:80:37:0E:0A:22 + security_group_int1_id: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net security group + default: 94c62578-835d-4801-9372-70a2cfb22683 + sctp-a-egress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + oam_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN OAM + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_OAM_net_1 + ncb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb2_Internal2 + default: 00:80:37:0E:0F:12 + vlc_st_interface_type_sctp_a: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: left + gpb3_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb3_Internal2 + default: 00:80:37:0E:0B:22 + vlc_st_interface_type_sctp_b: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: right + gpb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb1_Internal2 + default: 00:80:37:0E:09:22 + oam_net_name: + hidden: false + immutable: false + type: string + description: Network Name OAM + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_OAM_net_1 + sctp-b-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb1_Internal1 + default: 00:80:37:0E:0B:12 + sctp-b-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + vlc_st_interface_type_oam: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: management + shc_monitor_type: + hidden: false + immutable: false + type: string + description: health check + default: PING + oam_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for OAM + default: oam-sec-group + Internal2_net_gateway: + hidden: false + immutable: false + type: string + description: gateway for internal-2 network + default: 169.255.0.3 + evac_policy: + hidden: false + immutable: false + type: string + description: CMHA Policy + default: Evacuate + server_group_id_0: + hidden: false + immutable: false + type: string + description: ID of Anti-Affinity Policy-based Server Group + default: ec99a73d-38f8-4280-8103-ba8ee584629f + vlc8_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc8_Internal2 + default: 00:80:37:0E:08:12 + sctp-b-ipv6-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + gtp_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for GTP + default: gtp-sec-group + vlc_sctp_b_v6_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPB + default: fd00:200:200:5:0:0:0:24 + vlc_sctp_b_v6_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPB + default: fd00:200:200:5:0:0:0:17 + sctp-a-ipv6-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + vlc_sctp_b_v6_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPB + default: fd00:200:200:5:0:0:0:16 + vlc4_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc4_Internal1 + default: 00:80:37:0E:04:12 + vlc_sctp_b_v6_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPB + default: fd00:200:200:5:0:0:0:28 + vlc_sctp_b_v6_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPB + default: fd00:200:200:5:0:0:0:27 + vlc_sctp_b_v6_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPB + default: fd00:200:200:5:0:0:0:26 + vlc_sctp_b_v6_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPB + default: fd00:200:200:5:0:0:0:25 + sctp_b_net_name: + hidden: false + immutable: false + type: string + description: Network Name SCTPB + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPB_net_1 + sctp-b-ipv6-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: '0' + sctp-a-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + Internal1_shared: + hidden: false + immutable: false + type: string + description: Whether Shared or private internal-1 network + default: false + shc_url_path: + hidden: false + immutable: false + type: string + description: health check + default: local-ip + Internal2_net_cidr_len: + hidden: false + immutable: false + type: string + description: CIDR length for internal-2 network + default: 17 + sctp-a-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-b-ipv6-ingress_src_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + sctp-a-egress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-ingress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-b-ipv6-ingress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc_st_service_type: + hidden: false + immutable: false + type: string + description: service type + default: firewall + sctp-b-ipv6-ingress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 starting port for destination + default: 0 + vlc_st_availability_zone: + hidden: false + immutable: false + type: string + description: Indicates availability zone is enabled + default: true + vlc7_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc7_Internal1 + default: 00:80:37:0E:07:12 + fsb_volume_image_name_1: + label: MME_FSB2 + hidden: false + immutable: false + type: string + description: volume name + default: MME_FSB2_1_3_GA.qcow2 + vlc_oam_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 OAM + default: 107.239.72.151 + sctp-a-ipv6-ingress_src_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix length + default: '0' + vlc_oam_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 OAM + default: 107.239.72.152 + Internal1_allow_transit: + hidden: false + immutable: false + type: string + description: Allow/disallow transit internal-1 network + default: true + vlc_oam_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 OAM + default: 107.239.72.157 + vlc_oam_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 OAM + default: 107.239.72.158 + vlc_gtp_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 GTP + default: 107.243.47.208 + vlc_oam_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 OAM + default: 107.239.72.149 + fsb_volume_image_name_0: + label: MME_FSB1 + hidden: false + immutable: false + type: string + description: volume name + default: MME_FSB1_1_3_GA.qcow2 + vlc_gtp_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 GTP + default: 107.243.47.209 + vlc_oam_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 OAM + default: 107.239.72.150 + vlc_gtp_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 GTP + default: 107.243.47.216 + vlc_name_6: + hidden: false + immutable: false + type: string + description: Name of vlc7 + default: zrdm3mmex59vlc007 + vlc_gtp_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 GTP + default: 107.243.47.217 + vlc_name_7: + hidden: false + immutable: false + type: string + description: Name of vlc8 + default: zrdm3mmex59vlc008 + security_group_sctp_a_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 3cd8a524-77ff-4980-ae2a-d19ba70e0511 + vlc_gtp_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 GTP + default: 107.243.47.218 + vlc_gtp_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 GTP + default: 107.243.47.219 + vlc_gtp_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 GTP + default: 107.243.47.220 + vlc_name_2: + hidden: false + immutable: false + type: string + description: Name of vlc3 + default: zrdm3mmex59vlc003 + vlc_gtp_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 GTP + default: 107.243.47.221 + vlc_name_3: + hidden: false + immutable: false + type: string + description: Name of vlc4 + default: zrdm3mmex59vlc004 + vlc_name_4: + hidden: false + immutable: false + type: string + description: Name of vlc5 + default: zrdm3mmex59vlc005 + vlc_name_5: + hidden: false + immutable: false + type: string + description: Name of vlc6 + default: zrdm3mmex59vlc006 + fsb_volume_id_1: + hidden: false + immutable: false + type: string + description: ID of Cinder Volume for FSB2 + default: 5bd0560c-bfd0-47dc-a84a-554e2698c925 + sctp-a-ipv6-ingress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc_name_0: + hidden: false + immutable: false + type: string + description: Name of vlc1 + default: zrdm3mmex59vlc001 + vlc_name_1: + hidden: false + immutable: false + type: string + description: Name of vlc2 + default: zrdm3mmex59vlc002 + vlc_oam_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on OAM + sctp-b-egress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + vlc_oam_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 OAM + default: 107.239.72.155 + vlc_oam_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 OAM + default: 107.239.72.156 + vlc6_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc6_Internal1 + default: 00:80:37:0E:06:12 + fsb_volume_id_0: + hidden: false + immutable: false + type: string + description: ID of Cinder Volume for FSB1 + default: 27baa6a0-b701-4795-bf5e-4f546b350b1f + sctp-b-egress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + gpb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb2_Internal2 + default: 00:80:37:0E:0A:22 + sctp-a-ipv6-egress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + sctp-b-ipv6-egress_src_start_port: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0 + Internal2_allow_transit: + hidden: false + immutable: false + type: string + description: Allow/disallow transit internal-2 network + default: true + fsb_volume_size: + label: volume size + hidden: false + immutable: false + type: float + description: volume size 320GB + default: 320 + constraints: + - in_range: + - 0 + - 340 + sctp-b-IPv6_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv6 + gtp_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN GTP + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_GTP_net_1 + ncb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb2_Internal1 + default: 00:80:37:0E:0F:12 + sctp-b-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + sctp-b-ingress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-b-egress_src_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + gpb7_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb7_Internal2 + default: 00:80:37:0E:0F:22 + sctp-a-ipv6-ingress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 starting port for destination + default: 0 + gtp_net_name: + hidden: false + immutable: false + type: string + description: Network Name GTP + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_GTP_net_1 + sctp-b-ipv6-ingress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + domain_name: + hidden: false + immutable: false + type: string + description: Unique name of vMME contrail domain + default: default-domain + vlc5_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc5_Internal1 + default: 00:80:37:0E:05:12 + sctp-a-egress_src_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + sctp-b-egress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + shc_enabled: + hidden: false + immutable: false + type: string + description: health check + default: true + sctp-b-ipv6-ingress-dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-b-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp_a_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN SCTPA + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPA_net_1 + security_group_gtp_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: e8ad3fe2-5f95-43e4-bbcc-da97b1c22588 + sctp-a-ipv6-ingress_src_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + fsb_name_1: + hidden: false + immutable: false + type: string + description: Name of fsb1 + default: zrdm3mmex59fsb002 + sctp-b-egress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb_name_0: + hidden: false + immutable: false + type: string + description: Name of fsb1 + default: zrdm3mmex59fsb001 + sctp_a_net_name: + hidden: false + immutable: false + type: string + description: Network Name SCTPA + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPA_net_1 + sctp-b-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + gpb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb1_Internal1 + default: 00:80:37:0E:09:22 + sctp-a-ingress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb1_Internal2 + default: 00:80:37:0E:0B:12 + vlc_st_service_mode: + hidden: false + immutable: false + type: string + description: service mode + default: in-network-nat + sctp-a-ipv6-egress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + sctp-a-egress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-b-egress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-a-ingress-src_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + sctp-a-ipv6-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: IPV6 start port + default: 0 + constraints: + - in_range: + - 0 + - 65535 + vf_module_id: + hidden: false + immutable: false + type: string + description: the vf_module_id for this instance. UUID provided by ECOMP + default: TWO + Internal1_net_cidr: + hidden: false + immutable: false + type: string + description: CIDR for internal-1 network + default: 169.253.0.0 + fsb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers fsb1 + default: nv.c8r32d1 + sctp_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: 132 + vnf_name: + hidden: false + immutable: false + type: string + description: the vnf_name for this instance. provided by ECOMP + default: zrdm3mmex59 + sctp-a-IPv6_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv6 + vlc_sctp_b_v6_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPB + default: fd00:200:200:5:0:0:0:29 + vlc6_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc6_Internal2 + default: 00:80:37:0E:06:12 + sctp-b-ingress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc7_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc7_Internal2 + default: 00:80:37:0E:07:12 + sctp-a-ipv6-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: IPV6 ending port for destination + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers vlc + default: nd.c16r64d1 + sctp-b-ipv6-egress_src_addresses: + hidden: false + immutable: false + type: string + description: IPV6 source + default: local + vlc_st_interface_type_int1: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other1 + availability_zone_0: + hidden: false + immutable: false + type: string + description: cluster for spawnning fsb instances + default: rdm3-kvm-az02 + service_instance_id_0: + hidden: false + immutable: false + type: string + description: UUID of service instance for vLCs + default: 77c67cc8-d15f-47bc-aeb1-8d65d09e917a + availability_zone_1: + hidden: false + immutable: false + type: string + description: cluster for spawnning ncb instances + default: rdm3-kvm-az02 + vlc_st_interface_type_int2: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other2 + sctp-a-ipv6-egress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 start port + default: 0 + sctp-a-ipv6-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: '0' + vlc_sctp_a_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPA + default: 107.243.47.144 + vlc_sctp_b_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on SCTPB + vlc1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal1 + default: 00:80:37:0E:01:12 + sctp-b-ipv6-egress_src_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-a-ipv6-egress_src_addresses: + hidden: false + immutable: false + type: string + description: IPV6 source + default: local + vlc_sctp_a_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPA + default: 107.243.47.157 + sctp-a-ingress-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: src subnet + default: '::' + vlc_sctp_a_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPA + default: 107.243.47.156 + vlc_sctp_a_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPA + default: 107.243.47.155 + sctp-a-ingress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc_sctp_a_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPA + default: 107.243.47.154 + vlc_sctp_a_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPA + default: 107.243.47.153 + vlc_sctp_a_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPA + default: 107.243.47.152 + vlc_sctp_a_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPA + default: 107.243.47.145 + gpb6_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb6_Internal2 + default: 00:80:37:0E:0E:22 + security_group_int2_id: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net security group + default: 1361f069-baf2-4b76-b321-7f68ba26c369 + Internal2_dhcp: + hidden: false + immutable: false + type: string + description: Whether DHCP/static IP addressing on internal-2 network + default: false + sctp-a-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + pxe_image_name: + hidden: false + immutable: false + type: string + description: Name of image to use for server ncb + default: MME_PXE-Boot_1_3_GA.qcow2 + vlc_st_interface_type_gtp: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other0 + ncb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb1_Internal1 + default: 00:80:37:0E:09:12 + vlc_gtp_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on GTP + int1_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for internal-1 + default: int1-sec-group + vmi_oam_preference_secondary: + hidden: false + immutable: false + type: float + description: Preference for secondary interface/port + default: 100 + Internal1_dhcp: + hidden: false + immutable: false + type: string + description: Whether DHCP/static IP addressing on internal-1 network + default: false + fsb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb2_Internal2 + default: 00:80:37:0E:0D:12 + Internal1_net_cidr_len: + hidden: false + immutable: false + type: string + description: CIDR length for internal-1 network + default: 17 + sctp-a-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + sctp-b-ingress-src_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + fsb_oam_ip_1: + hidden: false + immutable: false + type: string + description: IP address of OAM vNIC for FSB2 + default: 107.239.72.154 + fsb_oam_ip_0: + hidden: false + immutable: false + type: string + description: IP address of OAM vNIC for FSB1 + default: 107.239.72.153 + shc_timeout: + hidden: false + immutable: false + type: string + description: health check + default: 5 + vlc_st_version: + hidden: false + immutable: false + type: string + description: Indicates service version + default: 2 + sctp-a-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp-a-ingress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + sctp-b-egress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-a-ipv6-egress_src_start_port: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0 + instance_ip_family_v6: + hidden: false + immutable: false + type: string + description: Ipv6 instance type + default: v6 + sctp-b-ingress-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: src subnet + default: '::' + gpb8_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb8_Internal2 + default: 00:80:37:0E:10:22 + gpb4_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb4_Internal1 + default: 00:80:37:0E:0C:22 + sctp-a-ipv6-ingress-dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + Internal1_net_gateway: + hidden: false + immutable: false + type: string + description: gateway for internal-1 network + default: 169.253.0.3 + sctp-b-ipv6-egress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 start port + default: 0 + gpb_name_7: + hidden: false + immutable: false + type: string + description: Name of gpb8 + default: zrdm3mmex59gpb0016 + gpb_name_6: + hidden: false + immutable: false + type: string + description: Name of gpb7 + default: zrdm3mmex59gpb0015 + gpb_name_5: + hidden: false + immutable: false + type: string + description: Name of gpb6 + default: zrdm3mmex59gpb0014 + gpb_name_4: + hidden: false + immutable: false + type: string + description: Name of gpb5 + default: zrdm3mmex59gpb0013 + gpb_name_3: + hidden: false + immutable: false + type: string + description: Name of gpb4 + default: zrdm3mmex59gpb0012 + sctp-a-ipv6-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: IPV6 destination + default: local + gpb_name_2: + hidden: false + immutable: false + type: string + description: Name of gpb3 + default: zrdm3mmex59gpb0011 + shc_delay: + hidden: false + immutable: false + type: string + description: health check + default: 3 + gpb_name_1: + hidden: false + immutable: false + type: string + description: Name of gpb2 + default: zrdm3mmex59gpb0010 + sctp-b-ipv6-egress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc3_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc3_Internal2 + default: 00:80:37:0E:03:12 + gpb_name_0: + hidden: false + immutable: false + type: string + description: Name of gpb1 + default: zrdm3mmex59gpb009 + sctp-a-ipv6-egress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + gpb5_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb5_Internal1 + default: 00:80:37:0E:0D:22 + sctp-b-ipv6-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + shc_max_retries: + hidden: false + immutable: false + type: string + description: health check + default: 2 + fsb_volume_type: + label: volume type + hidden: false + immutable: false + type: string + description: volume type SolidFire + default: SF-Default-SSD + sctp-a-name: + hidden: false + immutable: false + type: string + description: name for the SecurityGroup + default: epc-sctp-a-ipv4v6-sec-group + vlc_sctp_b_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPB + default: 107.243.47.187 + vlc_sctp_b_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPB + default: 107.243.47.186 + vlc_sctp_b_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPB + default: 107.243.47.185 + vlc_sctp_b_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPB + default: 107.243.47.184 + sctp-b-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + vnf_id: + hidden: false + immutable: false + type: string + description: the vf_id for this instance. UUID provided by ECOMP + default: zrdm3mmex59 + vlc_sctp_b_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPB + default: 107.243.47.189 + vlc_sctp_b_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPB + default: 107.243.47.188 + vlc_sctp_b_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPB + default: 107.243.47.177 + gpb6_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb6_Internal1 + default: 00:80:37:0E:0E:22 + sctp-b-ipv6-egress_dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + vlc_sctp_b_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPB + default: 107.243.47.176 + vlc2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc2_Internal2 + default: 00:80:37:0E:02:12 + sctp-b-ingress-src_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + gpb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers gpb + default: nv.c20r64d1 + vlc_sctp_a_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on SCTPA + sctp-b-ipv6-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: IPV6 destination + default: local + sctp-b-ipv6-ingress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + sctp-b-ipv6-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + sctp-a-ingress-src_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + vlc1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal2 + default: 00:80:37:0E:01:12 + Internal1_rpf: + hidden: false + immutable: false + type: string + description: Reverse Path Forwarding Enabled/Disabled internal-1 network + default: disable + sctp-b-ingress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-b-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-ipv6-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + vlc_sctp_a_v6_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPA + default: fd00:200:200:4:0:0:0:29 + vlc_sctp_a_v6_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPA + default: fd00:200:200:4:0:0:0:28 + gpb7_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb7_Internal1 + default: 00:80:37:0E:0F:22 + vlc_sctp_a_v6_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPA + default: fd00:200:200:4:0:0:0:27 + vlc_sctp_a_v6_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPA + default: fd00:200:200:4:0:0:0:26 + vlc_sctp_a_v6_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPA + default: fd00:200:200:4:0:0:0:25 + vlc_sctp_a_v6_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPA + default: fd00:200:200:4:0:0:0:24 + sctp-a-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + vlc_sctp_a_v6_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPA + default: fd00:200:200:4:0:0:0:17 + vlc_sctp_a_v6_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPA + default: fd00:200:200:4:0:0:0:16 + node_templates: + abstract_gpb_1: + type: org.openecomp.resource.abstract.nodes.gpb_1 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_1 + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb2_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb2_Internal2_network: + - get_input: internal_net_id_1 + port_gpb2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_image_name: + get_input: pxe_image_name + port_gpb2_Internal1_replacement_policy: + - AUTO + port_gpb2_Internal1_network: + - get_input: internal_net_id_0 + port_gpb2_Internal2_replacement_policy: + - AUTO + port_gpb2_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb2_Internal1_mac_address: + get_input: gpb2_Internal1_mac + port_gpb2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb2_Internal2_mac_address: + get_input: gpb2_Internal1_mac + port_gpb2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb2_Internal2_security_groups: + - - get_input: security_group_int2_id + service_template_filter: + substitute_service_template: Nested_gpb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_2: + type: org.openecomp.resource.abstract.nodes.gpb_1 + directives: + - substitutable + properties: + port_gpb3_Internal1_replacement_policy: + - AUTO + compute_gpb_name: + - get_input: gpb_name_2 + port_gpb3_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb3_Internal2_replacement_policy: + - AUTO + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb3_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb3_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb3_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb3_Internal1_network: + - get_input: internal_net_id_0 + port_gpb3_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb3_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb3_Internal1_mac_address: + get_input: gpb3_Internal1_mac + port_gpb3_Internal2_mac_address: + get_input: gpb3_Internal1_mac + port_gpb3_Internal2_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_gpb_2ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb3_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb3_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_vlc: + type: org.openecomp.resource.abstract.nodes.vlc + directives: + - substitutable + properties: + port_template_VMInt_SCTP_A_vlc_virtual_network_refs: + - - get_input: sctp_a_net_fqdn + port_template_VMInt_INT1_vlc_security_group_refs: + - - get_input: security_group_int1_id + vm_flavor_name: + get_input: vlc_flavor_name + port_template_VMInt_INT2_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + vm_image_name: + get_input: pxe_image_name + port_template_VMInt_INT1_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_INT2_vlc_virtual_network_refs: + - - get_input: internal_net_id_1 + port_template_VMInt_OAM_vlc_virtual_network_refs: + - - get_input: oam_net_fqdn + port_template_VMInt_OAM_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_INT2_vlc_virtual_machine_interface_mac_addresses: + - - get_input: vlc4_Internal2_mac + - - get_input: vlc3_Internal2_mac + - - get_input: vlc2_Internal2_mac + - - get_input: vlc1_Internal2_mac + - - get_input: vlc8_Internal2_mac + - - get_input: vlc7_Internal2_mac + - - get_input: vlc6_Internal2_mac + - - get_input: vlc5_Internal2_mac + port_template_VMInt_SCTP_B_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_GTP_vlc_security_group_refs: + - - get_input: security_group_gtp_id + compute_vlc_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_template_VMInt_OAM_vlc_security_group_refs: + - - get_input: security_group_oam_id + compute_vlc_contrail_service_instance_ind: + - true + - true + - true + - true + - true + - true + - true + - true + port_template_VMInt_GTP_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_SCTP_B_vlc_virtual_network_refs: + - - get_input: sctp_b_net_fqdn + port_template_VMInt_INT2_vlc_security_group_refs: + - - get_input: security_group_int2_id + port_template_VMInt_SCTP_B_vlc_security_group_refs: + - - get_input: security_group_sctp_b_id + port_template_VMInt_INT1_vlc_virtual_network_refs: + - - get_input: internal_net_id_0 + port_template_VMInt_SCTP_A_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + compute_vlc_scheduler_hints: + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + compute_vlc_name: + - get_input: vlc_name_3 + - get_input: vlc_name_2 + - get_input: vlc_name_1 + - get_input: vlc_name_0 + - get_input: vlc_name_7 + - get_input: vlc_name_6 + - get_input: vlc_name_5 + - get_input: vlc_name_4 + port_template_VMInt_SCTP_A_vlc_security_group_refs: + - - get_input: security_group_sctp_a_id + compute_vlc_availability_zone: + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + port_template_VMInt_INT1_vlc_virtual_machine_interface_mac_addresses: + - - get_input: vlc4_Internal1_mac + - - get_input: vlc3_Internal1_mac + - - get_input: vlc2_Internal1_mac + - - get_input: vlc1_Internal1_mac + - - get_input: vlc8_Internal1_mac + - - get_input: vlc7_Internal1_mac + - - get_input: vlc6_Internal1_mac + - - get_input: vlc5_Internal1_mac + port_template_VMInt_GTP_vlc_virtual_network_refs: + - - get_input: gtp_net_fqdn + service_template_filter: + substitute_service_template: Nested_vlcServiceTemplate.yaml + count: 8 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: vlc + nfc_naming_code: vlc + requirements: + - link_vlc_template_VMInt_INT2_vlc: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + - link_vlc_template_VMInt_INT1_vlc: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_7: + type: org.openecomp.resource.abstract.nodes.gpb_7 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_7 + port_gpb8_Internal1_mac_address: + get_input: gpb8_Internal1_mac + port_gpb8_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb8_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb8_Internal1_replacement_policy: + - AUTO + port_gpb8_Internal2_replacement_policy: + - AUTO + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb8_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb8_Internal1_network: + - get_input: internal_net_id_0 + port_gpb8_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb8_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb8_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb8_Internal2_network: + - get_input: internal_net_id_1 + port_gpb8_Internal2_mac_address: + get_input: gpb8_Internal1_mac + service_template_filter: + substitute_service_template: Nested_gpb_7ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb8_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb8_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_5: + type: org.openecomp.resource.abstract.nodes.gpb_5 + directives: + - substitutable + properties: + port_gpb6_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_name: + - get_input: gpb_name_5 + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb6_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_image_name: + get_input: pxe_image_name + port_gpb6_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb6_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb6_Internal1_network: + - get_input: internal_net_id_0 + port_gpb6_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb6_Internal2_mac_address: + get_input: gpb6_Internal1_mac + port_gpb6_Internal1_mac_address: + get_input: gpb6_Internal1_mac + port_gpb6_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb6_Internal2_replacement_policy: + - AUTO + port_gpb6_Internal1_replacement_policy: + - AUTO + port_gpb6_Internal2_security_groups: + - - get_input: security_group_int2_id + service_template_filter: + substitute_service_template: Nested_gpb_5ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb6_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb6_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_6: + type: org.openecomp.resource.abstract.nodes.gpb_6 + directives: + - substitutable + properties: + port_gpb7_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb7_Internal1_network: + - get_input: internal_net_id_0 + compute_gpb_name: + - get_input: gpb_name_6 + port_gpb7_Internal2_network: + - get_input: internal_net_id_1 + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb7_Internal1_replacement_policy: + - AUTO + port_gpb7_Internal2_replacement_policy: + - AUTO + port_gpb7_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb7_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb7_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb7_Internal2_mac_address: + get_input: gpb7_Internal1_mac + port_gpb7_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb7_Internal1_mac_address: + get_input: gpb7_Internal1_mac + port_gpb7_Internal2_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_gpb_6ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb7_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb7_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_3: + type: org.openecomp.resource.abstract.nodes.gpb_3 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_3 + port_gpb4_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb4_Internal1_mac_address: + get_input: gpb4_Internal1_mac + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb4_Internal2_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb4_Internal2_mac_address: + get_input: gpb4_Internal1_mac + vm_image_name: + get_input: pxe_image_name + port_gpb4_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb4_Internal2_replacement_policy: + - AUTO + port_gpb4_Internal1_replacement_policy: + - AUTO + port_gpb4_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb4_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb4_Internal2_network: + - get_input: internal_net_id_1 + port_gpb4_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb4_Internal1_network: + - get_input: internal_net_id_0 + service_template_filter: + substitute_service_template: Nested_gpb_3ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb4_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb4_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_4: + type: org.openecomp.resource.abstract.nodes.gpb_4 + directives: + - substitutable + properties: + port_gpb5_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb5_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_name: + - get_input: gpb_name_4 + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb5_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb5_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb5_Internal1_network: + - get_input: internal_net_id_0 + port_gpb5_Internal2_mac_address: + get_input: gpb5_Internal1_mac + port_gpb5_Internal1_mac_address: + get_input: gpb5_Internal1_mac + port_gpb5_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb5_Internal2_replacement_policy: + - AUTO + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb5_Internal1_replacement_policy: + - AUTO + port_gpb5_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb5_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + service_template_filter: + substitute_service_template: Nested_gpb_4ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb5_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb5_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb: + type: org.openecomp.resource.abstract.nodes.gpb + directives: + - substitutable + properties: + port_gpb1_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_name: + - get_input: gpb_name_0 + port_gpb1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb1_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb1_Internal1_mac_address: + get_input: gpb1_Internal1_mac + port_gpb1_Internal2_mac_address: + get_input: gpb1_Internal1_mac + port_gpb1_Internal2_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb1_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb1_Internal1_replacement_policy: + - AUTO + port_gpb1_Internal2_replacement_policy: + - AUTO + port_gpb1_Internal2_network: + - get_input: internal_net_id_1 + port_gpb1_Internal1_network: + - get_input: internal_net_id_0 + service_template_filter: + substitute_service_template: Nested_gpbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + Internal1_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_enable_dhcp: + get_input: Internal1_dhcp + network_ipam_refs_data_ipam_subnets_default_gateway: + get_input: Internal1_net_gateway + network_ipam_refs_data_ipam_subnets_subnet: + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: + get_input: Internal1_net_cidr_len + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: + get_input: Internal1_net_cidr + network_name: + str_replace: + template: $VNF_NAME_int_net_1 + params: + $VNF_NAME: + get_input: vnf_name + network_ipam_refs: + - UNSUPPORTED_RESOURCE_template_NetworkIpam_Internal1 + abstract_fsb: + type: org.openecomp.resource.abstract.nodes.fsb + directives: + - substitutable + properties: + port_FSB1_Internal1_mac_address: + get_input: fsb1_Internal1_mac + port_FSB_OAM_network_role_tag: + - oam + port_FSB1_Internal2_network: + - Internal2_net + port_FSB1_Internal1_network: + - Internal1_net + vm_flavor_name: + get_input: fsb_flavor_name + port_FSB1_Internal2_mac_address: + get_input: fsb1_Internal1_mac + port_FSB_OAM_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: true + floating_ip_count_required: + is_required: false + compute_fsb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_FSB1_Internal1_security_groups: + - - int1_security_group + port_FSB1_Internal2_replacement_policy: + - AUTO + compute_fsb_scheduler_hints: + - group: VM_Affinity_group + port_FSB1_Internal1_replacement_policy: + - AUTO + compute_fsb_name: + - get_input: fsb_name_0 + port_FSB1_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_FSB1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_network: + - get_input: oam_net_name + port_FSB_OAM_security_groups: + - - oam_security_group + port_FSB_OAM_mac_requirements: + mac_count_required: + is_required: false + port_FSB_OAM_replacement_policy: + - AUTO + compute_fsb_availability_zone: + - get_input: availability_zone_0 + port_FSB1_Internal2_security_groups: + - - int2_security_group + port_FSB1_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_FSB1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_fixed_ips: + - ip_address: + get_input: fsb_oam_ip_0 + service_template_filter: + substitute_service_template: Nested_fsbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: fsb + nfc_naming_code: fsb + requirements: + - link_fsb_FSB1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_fsb_FSB1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + gtp_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: gtp_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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 + abstract_ncb_1: + type: org.openecomp.resource.abstract.nodes.ncb_1 + directives: + - substitutable + properties: + port_NCB2_Internal2_security_groups: + - - int2_security_group + port_NCB2_Internal1_replacement_policy: + - AUTO + port_NCB2_Internal2_replacement_policy: + - AUTO + vm_flavor_name: + get_input: ncb_flavor_name + port_NCB2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_NCB2_Internal1_mac_requirements: + mac_count_required: + is_required: true + vm_image_name: + get_input: pxe_image_name + compute_ncb_scheduler_hints: + - group: VM_Affinity_group + compute_ncb_availability_zone: + - get_input: availability_zone_1 + port_NCB2_Internal1_network: + - Internal1_net + port_NCB2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_NCB2_Internal1_security_groups: + - - int1_security_group + port_NCB2_Internal2_network: + - Internal2_net + port_NCB2_Internal1_mac_address: + get_input: ncb2_Internal1_mac + port_NCB2_Internal2_mac_address: + get_input: ncb2_Internal1_mac + compute_ncb_name: + - get_input: ncb_name_1 + compute_ncb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_NCB2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + service_template_filter: + substitute_service_template: Nested_ncb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: ncb + nfc_naming_code: ncb + requirements: + - link_ncb_NCB2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_ncb_NCB2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_ncb: + type: org.openecomp.resource.abstract.nodes.ncb + directives: + - substitutable + properties: + vm_flavor_name: + get_input: ncb_flavor_name + port_NCB1_Internal2_mac_requirements: + mac_count_required: + is_required: true + vm_image_name: + get_input: pxe_image_name + port_NCB1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + compute_ncb_scheduler_hints: + - group: VM_Affinity_group + port_NCB1_Internal1_security_groups: + - - int1_security_group + compute_ncb_availability_zone: + - get_input: availability_zone_0 + port_NCB1_Internal2_mac_address: + get_input: ncb1_Internal1_mac + port_NCB1_Internal1_mac_address: + get_input: ncb1_Internal1_mac + port_NCB1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_NCB1_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_NCB1_Internal2_replacement_policy: + - AUTO + port_NCB1_Internal1_network: + - Internal1_net + port_NCB1_Internal2_security_groups: + - - int2_security_group + port_NCB1_Internal1_replacement_policy: + - AUTO + compute_ncb_name: + - get_input: ncb_name_0 + compute_ncb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_NCB1_Internal2_network: + - Internal2_net + service_template_filter: + substitute_service_template: Nested_ncbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: ncb + nfc_naming_code: ncb + requirements: + - link_ncb_NCB1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_ncb_NCB1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + int1_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: int1_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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_fsb_FSB1_Internal1 + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB2_Internal1 + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB1_Internal1 + node: abstract_ncb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB2_Internal1 + node: abstract_ncb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb1_Internal1 + node: abstract_gpb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb2_Internal1 + node: abstract_gpb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb3_Internal1 + node: abstract_gpb_2 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb4_Internal1 + node: abstract_gpb_3 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb5_Internal1 + node: abstract_gpb_4 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb6_Internal1 + node: abstract_gpb_5 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb7_Internal1 + node: abstract_gpb_6 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb8_Internal1 + node: abstract_gpb_7 + relationship: org.openecomp.relationships.AttachesTo + fsb_volume_0: + type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume + properties: + image: + get_input: fsb_volume_image_name_0 + volume_type: + get_input: fsb_volume_type + size: '(get_input : fsb_volume_size) * 1024' + name: + list_join: + - _ + - - get_input: OS::stack_name + - FSB1_Vol_1 + fsb_volume_1: + type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume + properties: + image: + get_input: fsb_volume_image_name_1 + volume_type: + get_input: fsb_volume_type + size: '(get_input : fsb_volume_size) * 1024' + name: + list_join: + - _ + - - get_input: OS::stack_name + - FSB2_Vol_1 + Internal2_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_enable_dhcp: + get_input: Internal2_dhcp + network_ipam_refs_data_ipam_subnets_default_gateway: + get_input: Internal2_net_gateway + network_ipam_refs_data_ipam_subnets_subnet: + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: + get_input: Internal2_net_cidr_len + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: + get_input: Internal2_net_cidr + network_name: + str_replace: + template: $VNF_NAME_int_net_2 + params: + $VNF_NAME: + get_input: vnf_name + network_ipam_refs: + - UNSUPPORTED_RESOURCE_template_NetworkIpam_Internal2 + int2_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: int2_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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: 132 + 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: 132 + 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: 132 + 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: 132 + 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_fsb_FSB1_Internal2 + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB2_Internal2 + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB1_Internal2 + node: abstract_ncb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB2_Internal2 + node: abstract_ncb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb1_Internal2 + node: abstract_gpb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb2_Internal2 + node: abstract_gpb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb3_Internal2 + node: abstract_gpb_2 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb4_Internal2 + node: abstract_gpb_3 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb5_Internal2 + node: abstract_gpb_4 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb6_Internal2 + node: abstract_gpb_5 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb7_Internal2 + node: abstract_gpb_6 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb8_Internal2 + node: abstract_gpb_7 + relationship: org.openecomp.relationships.AttachesTo + abstract_fsb_1: + type: org.openecomp.resource.abstract.nodes.fsb_1 + directives: + - substitutable + properties: + port_FSB_OAM_network_role_tag: + - oam + vm_flavor_name: + get_input: fsb_flavor_name + port_FSB_OAM_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: true + floating_ip_count_required: + is_required: false + port_FSB2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB2_Internal2_security_groups: + - - int2_security_group + compute_fsb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_FSB2_Internal1_mac_address: + get_input: fsb2_Internal1_mac + compute_fsb_scheduler_hints: + - group: VM_Affinity_group + compute_fsb_name: + - get_input: fsb_name_1 + port_FSB2_Internal1_security_groups: + - - int1_security_group + port_FSB_OAM_network: + - get_input: oam_net_name + port_FSB_OAM_security_groups: + - - oam_security_group + port_FSB2_Internal1_network: + - Internal1_net + port_FSB2_Internal2_mac_address: + get_input: fsb2_Internal1_mac + port_FSB2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_FSB_OAM_mac_requirements: + mac_count_required: + is_required: false + port_FSB2_Internal2_replacement_policy: + - AUTO + port_FSB2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_replacement_policy: + - AUTO + port_FSB2_Internal2_network: + - Internal2_net + port_FSB2_Internal1_replacement_policy: + - AUTO + compute_fsb_availability_zone: + - get_input: availability_zone_1 + port_FSB_OAM_fixed_ips: + - ip_address: + get_input: fsb_oam_ip_1 + port_FSB2_Internal1_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_fsb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: fsb + nfc_naming_code: fsb + requirements: + - link_fsb_FSB2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_fsb_FSB2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + oam_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: oam_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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_fsb_FSB_OAM + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB_OAM + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + groups: + vmme_gpb3_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb3.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + base_vmme_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/base_vmme.yml + description: | + Base HOT template to create vmme 2 fsb 2 ncb + members: + - int2_security_group + - oam_security_group + - gtp_security_group + - Internal2_net + - int1_security_group + - Internal1_net + - abstract_ncb + - abstract_ncb_1 + - abstract_fsb + - abstract_fsb_1 + base_vmme_volume_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/base_vmme_volume.yml + description: HOT template for vMME Cinder Volumes + members: + - fsb_volume_0 + - fsb_volume_1 + vmme_gpb1_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb1.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_gpb4_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb4.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_gpb2_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb2.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + VM_Affinity_group: + type: tosca.groups.Root + members: + - abstract_ncb + - abstract_ncb_1 + - abstract_vlc + - abstract_fsb + - abstract_fsb_1 + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_vlc_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_vlc.yml + description: | + Module HOT template to create vmme 8 vlcs + members: + - abstract_vlc + outputs: + oam_management_v4_address: + description: ID of OAM VIP to be provisioned in A&AI + value: + get_input: vip_oam_management_v4_ip + fsb_volume_id_1: + description: ID of Cinder Volume for FSB2 + value: fsb_volume_1 + security_group_sctp_b_id: + description: ID of sctpb_security_group + value: UNSUPPORTED_RESOURCE_sctpb_security_group + service_instance_id_0: + description: ID of Service Instance used for vLCs + value: UNSUPPORTED_RESOURCE_template_ServiceInstance_VLC + security_group_sctp_a_id: + description: ID of sctpa_security_group + value: UNSUPPORTED_RESOURCE_sctpa_security_group + fsb_volume_id_0: + description: ID of Cinder Volume for FSB1 + value: fsb_volume_0 + policies: + VM_Affinity_policy: + type: org.openecomp.policies.placement.Antilocate + properties: + container_type: host + targets: + - VM_Affinity_group diff --git a/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeLessInstances.yaml b/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeLessInstances.yaml new file mode 100644 index 0000000000..16dbedb9ca --- /dev/null +++ b/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeLessInstances.yaml @@ -0,0 +1,3509 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: Main +imports: +- openecomp_heat_index: + file: openecomp-heat/_index.yml +- GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml +topology_template: + inputs: + vlc4_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc4_Internal2 + default: 00:80:37:0E:04:12 + sctp-a-egress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + sctp-b-ipv6-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: IPV6 start port + default: 0 + constraints: + - in_range: + - 0 + - 65535 + ncb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb1_Internal2 + default: 00:80:37:0E:09:12 + sctp-a-ipv6-ingress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + gpb8_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb8_Internal1 + default: 00:80:37:0E:10:22 + sctp-a-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + sctp-b-display_name: + hidden: false + immutable: false + type: string + description: display_name for the SecurityGroup + default: epc-sctp-b-ipv4v6-sec-group + sctp-a-ingress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-a-egress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + ncb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers ncb + default: nv.c8r32d1 + vlc3_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc3_Internal1 + default: 00:80:37:0E:03:12 + Internal2_net_cidr: + hidden: false + immutable: false + type: string + description: CIDR for internal-2 network + default: 169.255.0.0 + sctp-a-egress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-egress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + gpb4_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb4_Internal2 + default: 00:80:37:0E:0C:22 + sctp-b-ipv6-egress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + vlc8_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc8_Internal1 + default: 00:80:37:0E:08:12 + sctp-b-ipv6-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: IPV6 ending port for destination + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + fsb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb2_Internal1 + default: 00:80:37:0E:0D:12 + sctp-b-name: + hidden: false + immutable: false + type: string + description: name for the SecurityGroup + default: epc-sctp-b-ipv4v6-sec-group + sctp-b-ipv6-egress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + internal_net_id_1: + hidden: false + immutable: false + type: string + description: UUID of Internal2_net + default: e3397c69-a942-49aa-81cb-fb91ff34abc8 + sctp-a-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + internal_net_id_0: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net + default: 871de971-22ac-47b6-befb-50e7d4cb67ea + sctp_b_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN SCTPB + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPB_net_1 + sctp-a-ipv6-ingress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + sctp-b-ipv6-ingress_src_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix length + default: '0' + ncb_name_1: + hidden: false + immutable: false + type: string + description: Name of ncb2 + default: zrdm3mmex59ncb002 + ncb_name_0: + hidden: false + immutable: false + type: string + description: Name of ncb1 + default: zrdm3mmex59ncb001 + vlc_st_virtualization_type: + hidden: false + immutable: false + type: string + description: Indicates virtualization type + default: virtual-machine + vlc2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc2_Internal1 + default: 00:80:37:0E:02:12 + sctp-b-ingress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-display_name: + hidden: false + immutable: false + type: string + description: display_name for the SecurityGroup + default: epc-sctp-a-ipv4v6-sec-group + sctp-b-ingress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + int2_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for internal-2 + default: int2-sec-group + gpb5_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb5_Internal2 + default: 00:80:37:0E:0D:22 + sctp-a-egress-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: dst subnet + default: '::' + OS::stack_name: + type: string + required: false + sctp-b-egress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + Internal2_shared: + hidden: false + immutable: false + type: string + description: Whether Shared or private internal-2 network + default: false + sctp-a-ipv6-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + Internal2_rpf: + hidden: false + immutable: false + type: string + description: Reverse Path Forwarding Enabled/Disabled internal-2 network + default: disable + vlc5_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc5_Internal2 + default: 00:80:37:0E:05:12 + sctp-a-ipv6-egress_src_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + Internal1_forwarding_mode: + hidden: false + immutable: false + type: string + description: L2 or L3 forwarding mode for internal-1 network + default: l2 + gpb3_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb3_Internal1 + default: 00:80:37:0E:0B:22 + vip_oam_management_v4_ip: + hidden: false + immutable: false + type: string + description: IP address of OAM service IP address to be provisioned in A&AI + default: 107.239.72.176 + vmi_oam_preference_primary: + hidden: false + immutable: false + type: float + description: Preference for primary interface/port + default: 200 + sctp-b-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp-a-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + security_group_sctp_b_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 92a4ae54-1733-4d03-b488-f178bb9f7b82 + Internal2_forwarding_mode: + hidden: false + immutable: false + type: string + description: L2 or L3 forwarding mode for internal-2 network + default: l2 + sctp-a-ipv6-egress_dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-b-egress-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: dst subnet + default: '::' + sctp-b-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + security_group_oam_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 4ae4aa74-3e8e-4f2b-8b5f-a8bd262da96b + gpb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb2_Internal1 + default: 00:80:37:0E:0A:22 + security_group_int1_id: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net security group + default: 94c62578-835d-4801-9372-70a2cfb22683 + sctp-a-egress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + oam_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN OAM + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_OAM_net_1 + ncb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb2_Internal2 + default: 00:80:37:0E:0F:12 + vlc_st_interface_type_sctp_a: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: left + gpb3_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb3_Internal2 + default: 00:80:37:0E:0B:22 + vlc_st_interface_type_sctp_b: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: right + gpb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb1_Internal2 + default: 00:80:37:0E:09:22 + oam_net_name: + hidden: false + immutable: false + type: string + description: Network Name OAM + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_OAM_net_1 + sctp-b-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb1_Internal1 + default: 00:80:37:0E:0B:12 + sctp-b-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + vlc_st_interface_type_oam: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: management + shc_monitor_type: + hidden: false + immutable: false + type: string + description: health check + default: PING + oam_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for OAM + default: oam-sec-group + Internal2_net_gateway: + hidden: false + immutable: false + type: string + description: gateway for internal-2 network + default: 169.255.0.3 + evac_policy: + hidden: false + immutable: false + type: string + description: CMHA Policy + default: Evacuate + server_group_id_0: + hidden: false + immutable: false + type: string + description: ID of Anti-Affinity Policy-based Server Group + default: ec99a73d-38f8-4280-8103-ba8ee584629f + vlc8_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc8_Internal2 + default: 00:80:37:0E:08:12 + sctp-b-ipv6-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + gtp_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for GTP + default: gtp-sec-group + vlc_sctp_b_v6_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPB + default: fd00:200:200:5:0:0:0:24 + vlc_sctp_b_v6_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPB + default: fd00:200:200:5:0:0:0:17 + sctp-a-ipv6-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + vlc_sctp_b_v6_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPB + default: fd00:200:200:5:0:0:0:16 + vlc4_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc4_Internal1 + default: 00:80:37:0E:04:12 + vlc_sctp_b_v6_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPB + default: fd00:200:200:5:0:0:0:28 + vlc_sctp_b_v6_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPB + default: fd00:200:200:5:0:0:0:27 + vlc_sctp_b_v6_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPB + default: fd00:200:200:5:0:0:0:26 + vlc_sctp_b_v6_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPB + default: fd00:200:200:5:0:0:0:25 + sctp_b_net_name: + hidden: false + immutable: false + type: string + description: Network Name SCTPB + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPB_net_1 + sctp-b-ipv6-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: '0' + sctp-a-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + Internal1_shared: + hidden: false + immutable: false + type: string + description: Whether Shared or private internal-1 network + default: false + shc_url_path: + hidden: false + immutable: false + type: string + description: health check + default: local-ip + Internal2_net_cidr_len: + hidden: false + immutable: false + type: string + description: CIDR length for internal-2 network + default: 17 + sctp-a-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-b-ipv6-ingress_src_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + sctp-a-egress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-ingress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-b-ipv6-ingress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc_st_service_type: + hidden: false + immutable: false + type: string + description: service type + default: firewall + sctp-b-ipv6-ingress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 starting port for destination + default: 0 + vlc_st_availability_zone: + hidden: false + immutable: false + type: string + description: Indicates availability zone is enabled + default: true + vlc7_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc7_Internal1 + default: 00:80:37:0E:07:12 + fsb_volume_image_name_1: + label: MME_FSB2 + hidden: false + immutable: false + type: string + description: volume name + default: MME_FSB2_1_3_GA.qcow2 + vlc_oam_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 OAM + default: 107.239.72.151 + sctp-a-ipv6-ingress_src_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix length + default: '0' + vlc_oam_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 OAM + default: 107.239.72.152 + Internal1_allow_transit: + hidden: false + immutable: false + type: string + description: Allow/disallow transit internal-1 network + default: true + vlc_oam_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 OAM + default: 107.239.72.157 + vlc_oam_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 OAM + default: 107.239.72.158 + vlc_gtp_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 GTP + default: 107.243.47.208 + vlc_oam_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 OAM + default: 107.239.72.149 + fsb_volume_image_name_0: + label: MME_FSB1 + hidden: false + immutable: false + type: string + description: volume name + default: MME_FSB1_1_3_GA.qcow2 + vlc_gtp_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 GTP + default: 107.243.47.209 + vlc_oam_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 OAM + default: 107.239.72.150 + vlc_gtp_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 GTP + default: 107.243.47.216 + vlc_name_6: + hidden: false + immutable: false + type: string + description: Name of vlc7 + default: zrdm3mmex59vlc007 + vlc_gtp_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 GTP + default: 107.243.47.217 + vlc_name_7: + hidden: false + immutable: false + type: string + description: Name of vlc8 + default: zrdm3mmex59vlc008 + security_group_sctp_a_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 3cd8a524-77ff-4980-ae2a-d19ba70e0511 + vlc_gtp_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 GTP + default: 107.243.47.218 + vlc_gtp_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 GTP + default: 107.243.47.219 + vlc_gtp_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 GTP + default: 107.243.47.220 + vlc_name_2: + hidden: false + immutable: false + type: string + description: Name of vlc3 + default: zrdm3mmex59vlc003 + vlc_gtp_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 GTP + default: 107.243.47.221 + vlc_name_3: + hidden: false + immutable: false + type: string + description: Name of vlc4 + default: zrdm3mmex59vlc004 + vlc_name_4: + hidden: false + immutable: false + type: string + description: Name of vlc5 + default: zrdm3mmex59vlc005 + vlc_name_5: + hidden: false + immutable: false + type: string + description: Name of vlc6 + default: zrdm3mmex59vlc006 + fsb_volume_id_1: + hidden: false + immutable: false + type: string + description: ID of Cinder Volume for FSB2 + default: 5bd0560c-bfd0-47dc-a84a-554e2698c925 + sctp-a-ipv6-ingress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc_name_0: + hidden: false + immutable: false + type: string + description: Name of vlc1 + default: zrdm3mmex59vlc001 + vlc_name_1: + hidden: false + immutable: false + type: string + description: Name of vlc2 + default: zrdm3mmex59vlc002 + vlc_oam_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on OAM + sctp-b-egress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + vlc_oam_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 OAM + default: 107.239.72.155 + vlc_oam_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 OAM + default: 107.239.72.156 + vlc6_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc6_Internal1 + default: 00:80:37:0E:06:12 + fsb_volume_id_0: + hidden: false + immutable: false + type: string + description: ID of Cinder Volume for FSB1 + default: 27baa6a0-b701-4795-bf5e-4f546b350b1f + sctp-b-egress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + gpb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb2_Internal2 + default: 00:80:37:0E:0A:22 + sctp-a-ipv6-egress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + sctp-b-ipv6-egress_src_start_port: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0 + Internal2_allow_transit: + hidden: false + immutable: false + type: string + description: Allow/disallow transit internal-2 network + default: true + fsb_volume_size: + label: volume size + hidden: false + immutable: false + type: float + description: volume size 320GB + default: 320 + constraints: + - in_range: + - 0 + - 340 + sctp-b-IPv6_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv6 + gtp_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN GTP + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_GTP_net_1 + ncb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb2_Internal1 + default: 00:80:37:0E:0F:12 + sctp-b-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + sctp-b-ingress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-b-egress_src_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + gpb7_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb7_Internal2 + default: 00:80:37:0E:0F:22 + sctp-a-ipv6-ingress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 starting port for destination + default: 0 + gtp_net_name: + hidden: false + immutable: false + type: string + description: Network Name GTP + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_GTP_net_1 + sctp-b-ipv6-ingress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + domain_name: + hidden: false + immutable: false + type: string + description: Unique name of vMME contrail domain + default: default-domain + vlc5_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc5_Internal1 + default: 00:80:37:0E:05:12 + sctp-a-egress_src_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + sctp-b-egress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + shc_enabled: + hidden: false + immutable: false + type: string + description: health check + default: true + sctp-b-ipv6-ingress-dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-b-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp_a_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN SCTPA + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPA_net_1 + security_group_gtp_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: e8ad3fe2-5f95-43e4-bbcc-da97b1c22588 + sctp-a-ipv6-ingress_src_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + fsb_name_1: + hidden: false + immutable: false + type: string + description: Name of fsb1 + default: zrdm3mmex59fsb002 + sctp-b-egress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb_name_0: + hidden: false + immutable: false + type: string + description: Name of fsb1 + default: zrdm3mmex59fsb001 + sctp_a_net_name: + hidden: false + immutable: false + type: string + description: Network Name SCTPA + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPA_net_1 + sctp-b-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + gpb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb1_Internal1 + default: 00:80:37:0E:09:22 + sctp-a-ingress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb1_Internal2 + default: 00:80:37:0E:0B:12 + vlc_st_service_mode: + hidden: false + immutable: false + type: string + description: service mode + default: in-network-nat + sctp-a-ipv6-egress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + sctp-a-egress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-b-egress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-a-ingress-src_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + sctp-a-ipv6-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: IPV6 start port + default: 0 + constraints: + - in_range: + - 0 + - 65535 + vf_module_id: + hidden: false + immutable: false + type: string + description: the vf_module_id for this instance. UUID provided by ECOMP + default: TWO + Internal1_net_cidr: + hidden: false + immutable: false + type: string + description: CIDR for internal-1 network + default: 169.253.0.0 + fsb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers fsb1 + default: nv.c8r32d1 + sctp_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: 132 + vnf_name: + hidden: false + immutable: false + type: string + description: the vnf_name for this instance. provided by ECOMP + default: zrdm3mmex59 + sctp-a-IPv6_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv6 + vlc_sctp_b_v6_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPB + default: fd00:200:200:5:0:0:0:29 + vlc6_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc6_Internal2 + default: 00:80:37:0E:06:12 + sctp-b-ingress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc7_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc7_Internal2 + default: 00:80:37:0E:07:12 + sctp-a-ipv6-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: IPV6 ending port for destination + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers vlc + default: nd.c16r64d1 + sctp-b-ipv6-egress_src_addresses: + hidden: false + immutable: false + type: string + description: IPV6 source + default: local + vlc_st_interface_type_int1: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other1 + availability_zone_0: + hidden: false + immutable: false + type: string + description: cluster for spawnning fsb instances + default: rdm3-kvm-az02 + service_instance_id_0: + hidden: false + immutable: false + type: string + description: UUID of service instance for vLCs + default: 77c67cc8-d15f-47bc-aeb1-8d65d09e917a + availability_zone_1: + hidden: false + immutable: false + type: string + description: cluster for spawnning ncb instances + default: rdm3-kvm-az02 + vlc_st_interface_type_int2: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other2 + sctp-a-ipv6-egress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 start port + default: 0 + sctp-a-ipv6-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: '0' + vlc_sctp_a_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPA + default: 107.243.47.144 + vlc_sctp_b_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on SCTPB + vlc1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal1 + default: 00:80:37:0E:01:12 + sctp-b-ipv6-egress_src_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-a-ipv6-egress_src_addresses: + hidden: false + immutable: false + type: string + description: IPV6 source + default: local + vlc_sctp_a_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPA + default: 107.243.47.157 + sctp-a-ingress-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: src subnet + default: '::' + vlc_sctp_a_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPA + default: 107.243.47.156 + vlc_sctp_a_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPA + default: 107.243.47.155 + sctp-a-ingress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc_sctp_a_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPA + default: 107.243.47.154 + vlc_sctp_a_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPA + default: 107.243.47.153 + vlc_sctp_a_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPA + default: 107.243.47.152 + vlc_sctp_a_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPA + default: 107.243.47.145 + gpb6_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb6_Internal2 + default: 00:80:37:0E:0E:22 + security_group_int2_id: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net security group + default: 1361f069-baf2-4b76-b321-7f68ba26c369 + Internal2_dhcp: + hidden: false + immutable: false + type: string + description: Whether DHCP/static IP addressing on internal-2 network + default: false + sctp-a-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + pxe_image_name: + hidden: false + immutable: false + type: string + description: Name of image to use for server ncb + default: MME_PXE-Boot_1_3_GA.qcow2 + vlc_st_interface_type_gtp: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other0 + ncb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb1_Internal1 + default: 00:80:37:0E:09:12 + vlc_gtp_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on GTP + int1_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for internal-1 + default: int1-sec-group + vmi_oam_preference_secondary: + hidden: false + immutable: false + type: float + description: Preference for secondary interface/port + default: 100 + Internal1_dhcp: + hidden: false + immutable: false + type: string + description: Whether DHCP/static IP addressing on internal-1 network + default: false + fsb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb2_Internal2 + default: 00:80:37:0E:0D:12 + Internal1_net_cidr_len: + hidden: false + immutable: false + type: string + description: CIDR length for internal-1 network + default: 17 + sctp-a-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + sctp-b-ingress-src_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + fsb_oam_ip_1: + hidden: false + immutable: false + type: string + description: IP address of OAM vNIC for FSB2 + default: 107.239.72.154 + fsb_oam_ip_0: + hidden: false + immutable: false + type: string + description: IP address of OAM vNIC for FSB1 + default: 107.239.72.153 + shc_timeout: + hidden: false + immutable: false + type: string + description: health check + default: 5 + vlc_st_version: + hidden: false + immutable: false + type: string + description: Indicates service version + default: 2 + sctp-a-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp-a-ingress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + sctp-b-egress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-a-ipv6-egress_src_start_port: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0 + instance_ip_family_v6: + hidden: false + immutable: false + type: string + description: Ipv6 instance type + default: v6 + sctp-b-ingress-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: src subnet + default: '::' + gpb8_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb8_Internal2 + default: 00:80:37:0E:10:22 + gpb4_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb4_Internal1 + default: 00:80:37:0E:0C:22 + sctp-a-ipv6-ingress-dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + Internal1_net_gateway: + hidden: false + immutable: false + type: string + description: gateway for internal-1 network + default: 169.253.0.3 + sctp-b-ipv6-egress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 start port + default: 0 + gpb_name_7: + hidden: false + immutable: false + type: string + description: Name of gpb8 + default: zrdm3mmex59gpb0016 + gpb_name_6: + hidden: false + immutable: false + type: string + description: Name of gpb7 + default: zrdm3mmex59gpb0015 + gpb_name_5: + hidden: false + immutable: false + type: string + description: Name of gpb6 + default: zrdm3mmex59gpb0014 + gpb_name_4: + hidden: false + immutable: false + type: string + description: Name of gpb5 + default: zrdm3mmex59gpb0013 + gpb_name_3: + hidden: false + immutable: false + type: string + description: Name of gpb4 + default: zrdm3mmex59gpb0012 + sctp-a-ipv6-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: IPV6 destination + default: local + gpb_name_2: + hidden: false + immutable: false + type: string + description: Name of gpb3 + default: zrdm3mmex59gpb0011 + shc_delay: + hidden: false + immutable: false + type: string + description: health check + default: 3 + gpb_name_1: + hidden: false + immutable: false + type: string + description: Name of gpb2 + default: zrdm3mmex59gpb0010 + sctp-b-ipv6-egress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc3_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc3_Internal2 + default: 00:80:37:0E:03:12 + gpb_name_0: + hidden: false + immutable: false + type: string + description: Name of gpb1 + default: zrdm3mmex59gpb009 + sctp-a-ipv6-egress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + gpb5_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb5_Internal1 + default: 00:80:37:0E:0D:22 + sctp-b-ipv6-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + shc_max_retries: + hidden: false + immutable: false + type: string + description: health check + default: 2 + fsb_volume_type: + label: volume type + hidden: false + immutable: false + type: string + description: volume type SolidFire + default: SF-Default-SSD + sctp-a-name: + hidden: false + immutable: false + type: string + description: name for the SecurityGroup + default: epc-sctp-a-ipv4v6-sec-group + vlc_sctp_b_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPB + default: 107.243.47.187 + vlc_sctp_b_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPB + default: 107.243.47.186 + vlc_sctp_b_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPB + default: 107.243.47.185 + vlc_sctp_b_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPB + default: 107.243.47.184 + sctp-b-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + vnf_id: + hidden: false + immutable: false + type: string + description: the vf_id for this instance. UUID provided by ECOMP + default: zrdm3mmex59 + vlc_sctp_b_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPB + default: 107.243.47.189 + vlc_sctp_b_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPB + default: 107.243.47.188 + vlc_sctp_b_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPB + default: 107.243.47.177 + gpb6_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb6_Internal1 + default: 00:80:37:0E:0E:22 + sctp-b-ipv6-egress_dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + vlc_sctp_b_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPB + default: 107.243.47.176 + vlc2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc2_Internal2 + default: 00:80:37:0E:02:12 + sctp-b-ingress-src_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + gpb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers gpb + default: nv.c20r64d1 + vlc_sctp_a_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on SCTPA + sctp-b-ipv6-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: IPV6 destination + default: local + sctp-b-ipv6-ingress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + sctp-b-ipv6-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + sctp-a-ingress-src_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + vlc1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal2 + default: 00:80:37:0E:01:12 + Internal1_rpf: + hidden: false + immutable: false + type: string + description: Reverse Path Forwarding Enabled/Disabled internal-1 network + default: disable + sctp-b-ingress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-b-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-ipv6-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + vlc_sctp_a_v6_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPA + default: fd00:200:200:4:0:0:0:29 + vlc_sctp_a_v6_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPA + default: fd00:200:200:4:0:0:0:28 + gpb7_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb7_Internal1 + default: 00:80:37:0E:0F:22 + vlc_sctp_a_v6_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPA + default: fd00:200:200:4:0:0:0:27 + vlc_sctp_a_v6_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPA + default: fd00:200:200:4:0:0:0:26 + vlc_sctp_a_v6_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPA + default: fd00:200:200:4:0:0:0:25 + vlc_sctp_a_v6_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPA + default: fd00:200:200:4:0:0:0:24 + sctp-a-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + vlc_sctp_a_v6_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPA + default: fd00:200:200:4:0:0:0:17 + vlc_sctp_a_v6_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPA + default: fd00:200:200:4:0:0:0:16 + node_templates: + abstract_gpb_2: + type: org.openecomp.resource.abstract.nodes.gpb_2 + directives: + - substitutable + properties: + port_gpb3_Internal1_replacement_policy: + - AUTO + compute_gpb_name: + - get_input: gpb_name_2 + port_gpb3_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb3_Internal2_replacement_policy: + - AUTO + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb3_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb3_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb3_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb3_Internal1_network: + - get_input: internal_net_id_0 + port_gpb3_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb3_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb3_Internal1_mac_address: + get_input: gpb3_Internal1_mac + port_gpb3_Internal2_mac_address: + get_input: gpb3_Internal1_mac + port_gpb3_Internal2_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_gpb_2ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb3_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb3_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_vlc: + type: org.openecomp.resource.abstract.nodes.vlc + directives: + - substitutable + properties: + port_template_VMInt_SCTP_A_vlc_virtual_network_refs: + - - get_input: sctp_a_net_fqdn + port_template_VMInt_INT1_vlc_security_group_refs: + - - get_input: security_group_int1_id + vm_flavor_name: + get_input: vlc_flavor_name + port_template_VMInt_INT2_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + vm_image_name: + get_input: pxe_image_name + port_template_VMInt_INT1_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_INT2_vlc_virtual_network_refs: + - - get_input: internal_net_id_1 + port_template_VMInt_OAM_vlc_virtual_network_refs: + - - get_input: oam_net_fqdn + port_template_VMInt_OAM_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_INT2_vlc_virtual_machine_interface_mac_addresses: + - - get_input: vlc4_Internal2_mac + - - get_input: vlc3_Internal2_mac + - - get_input: vlc2_Internal2_mac + - - get_input: vlc1_Internal2_mac + - - get_input: vlc8_Internal2_mac + - - get_input: vlc7_Internal2_mac + - - get_input: vlc6_Internal2_mac + - - get_input: vlc5_Internal2_mac + port_template_VMInt_SCTP_B_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_GTP_vlc_security_group_refs: + - - get_input: security_group_gtp_id + compute_vlc_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_template_VMInt_OAM_vlc_security_group_refs: + - - get_input: security_group_oam_id + compute_vlc_contrail_service_instance_ind: + - true + - true + - true + - true + - true + - true + - true + - true + port_template_VMInt_GTP_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_SCTP_B_vlc_virtual_network_refs: + - - get_input: sctp_b_net_fqdn + port_template_VMInt_INT2_vlc_security_group_refs: + - - get_input: security_group_int2_id + port_template_VMInt_SCTP_B_vlc_security_group_refs: + - - get_input: security_group_sctp_b_id + port_template_VMInt_INT1_vlc_virtual_network_refs: + - - get_input: internal_net_id_0 + port_template_VMInt_SCTP_A_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + compute_vlc_scheduler_hints: + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + compute_vlc_name: + - get_input: vlc_name_3 + - get_input: vlc_name_2 + - get_input: vlc_name_1 + - get_input: vlc_name_0 + - get_input: vlc_name_7 + - get_input: vlc_name_6 + - get_input: vlc_name_5 + - get_input: vlc_name_4 + port_template_VMInt_SCTP_A_vlc_security_group_refs: + - - get_input: security_group_sctp_a_id + compute_vlc_availability_zone: + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + port_template_VMInt_INT1_vlc_virtual_machine_interface_mac_addresses: + - - get_input: vlc4_Internal1_mac + - - get_input: vlc3_Internal1_mac + - - get_input: vlc2_Internal1_mac + - - get_input: vlc1_Internal1_mac + - - get_input: vlc8_Internal1_mac + - - get_input: vlc7_Internal1_mac + - - get_input: vlc6_Internal1_mac + - - get_input: vlc5_Internal1_mac + port_template_VMInt_GTP_vlc_virtual_network_refs: + - - get_input: gtp_net_fqdn + service_template_filter: + substitute_service_template: Nested_vlcServiceTemplate.yaml + count: 8 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: vlc + nfc_naming_code: vlc + requirements: + - link_vlc_template_VMInt_INT2_vlc: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + - link_vlc_template_VMInt_INT1_vlc: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_7: + type: org.openecomp.resource.abstract.nodes.gpb_7 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_7 + port_gpb8_Internal1_mac_address: + get_input: gpb8_Internal1_mac + port_gpb8_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb8_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb8_Internal1_replacement_policy: + - AUTO + port_gpb8_Internal2_replacement_policy: + - AUTO + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb8_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb8_Internal1_network: + - get_input: internal_net_id_0 + port_gpb8_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb8_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb8_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb8_Internal2_network: + - get_input: internal_net_id_1 + port_gpb8_Internal2_mac_address: + get_input: gpb8_Internal1_mac + service_template_filter: + substitute_service_template: Nested_gpb_7ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb8_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb8_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_5: + type: org.openecomp.resource.abstract.nodes.gpb_5 + directives: + - substitutable + properties: + port_gpb6_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_name: + - get_input: gpb_name_5 + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb6_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_image_name: + get_input: pxe_image_name + port_gpb6_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb6_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb6_Internal1_network: + - get_input: internal_net_id_0 + port_gpb6_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb6_Internal2_mac_address: + get_input: gpb6_Internal1_mac + port_gpb6_Internal1_mac_address: + get_input: gpb6_Internal1_mac + port_gpb6_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb6_Internal2_replacement_policy: + - AUTO + port_gpb6_Internal1_replacement_policy: + - AUTO + port_gpb6_Internal2_security_groups: + - - get_input: security_group_int2_id + service_template_filter: + substitute_service_template: Nested_gpb_5ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb6_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb6_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_6: + type: org.openecomp.resource.abstract.nodes.gpb_6 + directives: + - substitutable + properties: + port_gpb7_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb7_Internal1_network: + - get_input: internal_net_id_0 + compute_gpb_name: + - get_input: gpb_name_6 + port_gpb7_Internal2_network: + - get_input: internal_net_id_1 + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb7_Internal1_replacement_policy: + - AUTO + port_gpb7_Internal2_replacement_policy: + - AUTO + port_gpb7_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb7_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb7_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb7_Internal2_mac_address: + get_input: gpb7_Internal1_mac + port_gpb7_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb7_Internal1_mac_address: + get_input: gpb7_Internal1_mac + port_gpb7_Internal2_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_gpb_6ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb7_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb7_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_3: + type: org.openecomp.resource.abstract.nodes.gpb_3 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_3 + port_gpb4_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb4_Internal1_mac_address: + get_input: gpb4_Internal1_mac + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb4_Internal2_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb4_Internal2_mac_address: + get_input: gpb4_Internal1_mac + vm_image_name: + get_input: pxe_image_name + port_gpb4_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb4_Internal2_replacement_policy: + - AUTO + port_gpb4_Internal1_replacement_policy: + - AUTO + port_gpb4_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb4_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb4_Internal2_network: + - get_input: internal_net_id_1 + port_gpb4_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb4_Internal1_network: + - get_input: internal_net_id_0 + service_template_filter: + substitute_service_template: Nested_gpb_3ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb4_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb4_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_4: + type: org.openecomp.resource.abstract.nodes.gpb_4 + directives: + - substitutable + properties: + port_gpb5_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb5_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_name: + - get_input: gpb_name_4 + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb5_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb5_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb5_Internal1_network: + - get_input: internal_net_id_0 + port_gpb5_Internal2_mac_address: + get_input: gpb5_Internal1_mac + port_gpb5_Internal1_mac_address: + get_input: gpb5_Internal1_mac + port_gpb5_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb5_Internal2_replacement_policy: + - AUTO + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb5_Internal1_replacement_policy: + - AUTO + port_gpb5_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb5_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + service_template_filter: + substitute_service_template: Nested_gpb_4ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb5_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb5_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb: + type: org.openecomp.resource.abstract.nodes.gpb + directives: + - substitutable + properties: + port_gpb1_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_name: + - get_input: gpb_name_0 + port_gpb1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb1_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb1_Internal1_mac_address: + get_input: gpb1_Internal1_mac + port_gpb1_Internal2_mac_address: + get_input: gpb1_Internal1_mac + port_gpb1_Internal2_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb1_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb1_Internal1_replacement_policy: + - AUTO + port_gpb1_Internal2_replacement_policy: + - AUTO + port_gpb1_Internal2_network: + - get_input: internal_net_id_1 + port_gpb1_Internal1_network: + - get_input: internal_net_id_0 + service_template_filter: + substitute_service_template: Nested_gpbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + Internal1_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_enable_dhcp: + get_input: Internal1_dhcp + network_ipam_refs_data_ipam_subnets_default_gateway: + get_input: Internal1_net_gateway + network_ipam_refs_data_ipam_subnets_subnet: + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: + get_input: Internal1_net_cidr_len + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: + get_input: Internal1_net_cidr + network_name: + str_replace: + template: $VNF_NAME_int_net_1 + params: + $VNF_NAME: + get_input: vnf_name + network_ipam_refs: + - UNSUPPORTED_RESOURCE_template_NetworkIpam_Internal1 + abstract_fsb: + type: org.openecomp.resource.abstract.nodes.fsb + directives: + - substitutable + properties: + port_FSB1_Internal1_mac_address: + get_input: fsb1_Internal1_mac + port_FSB_OAM_network_role_tag: + - oam + port_FSB1_Internal2_network: + - Internal2_net + port_FSB1_Internal1_network: + - Internal1_net + vm_flavor_name: + get_input: fsb_flavor_name + port_FSB1_Internal2_mac_address: + get_input: fsb1_Internal1_mac + port_FSB_OAM_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: true + floating_ip_count_required: + is_required: false + compute_fsb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_FSB1_Internal1_security_groups: + - - int1_security_group + port_FSB1_Internal2_replacement_policy: + - AUTO + compute_fsb_scheduler_hints: + - group: VM_Affinity_group + port_FSB1_Internal1_replacement_policy: + - AUTO + compute_fsb_name: + - get_input: fsb_name_0 + port_FSB1_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_FSB1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_network: + - get_input: oam_net_name + port_FSB_OAM_security_groups: + - - oam_security_group + port_FSB_OAM_mac_requirements: + mac_count_required: + is_required: false + port_FSB_OAM_replacement_policy: + - AUTO + compute_fsb_availability_zone: + - get_input: availability_zone_0 + port_FSB1_Internal2_security_groups: + - - int2_security_group + port_FSB1_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_FSB1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_fixed_ips: + - ip_address: + get_input: fsb_oam_ip_0 + service_template_filter: + substitute_service_template: Nested_fsbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: fsb + nfc_naming_code: fsb + requirements: + - link_fsb_FSB1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_fsb_FSB1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + gtp_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: gtp_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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 + abstract_ncb_1: + type: org.openecomp.resource.abstract.nodes.ncb_1 + directives: + - substitutable + properties: + port_NCB2_Internal2_security_groups: + - - int2_security_group + port_NCB2_Internal1_replacement_policy: + - AUTO + port_NCB2_Internal2_replacement_policy: + - AUTO + vm_flavor_name: + get_input: ncb_flavor_name + port_NCB2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_NCB2_Internal1_mac_requirements: + mac_count_required: + is_required: true + vm_image_name: + get_input: pxe_image_name + compute_ncb_scheduler_hints: + - group: VM_Affinity_group + compute_ncb_availability_zone: + - get_input: availability_zone_1 + port_NCB2_Internal1_network: + - Internal1_net + port_NCB2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_NCB2_Internal1_security_groups: + - - int1_security_group + port_NCB2_Internal2_network: + - Internal2_net + port_NCB2_Internal1_mac_address: + get_input: ncb2_Internal1_mac + port_NCB2_Internal2_mac_address: + get_input: ncb2_Internal1_mac + compute_ncb_name: + - get_input: ncb_name_1 + compute_ncb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_NCB2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + service_template_filter: + substitute_service_template: Nested_ncb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: ncb + nfc_naming_code: ncb + requirements: + - link_ncb_NCB2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_ncb_NCB2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_ncb: + type: org.openecomp.resource.abstract.nodes.ncb + directives: + - substitutable + properties: + vm_flavor_name: + get_input: ncb_flavor_name + port_NCB1_Internal2_mac_requirements: + mac_count_required: + is_required: true + vm_image_name: + get_input: pxe_image_name + port_NCB1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + compute_ncb_scheduler_hints: + - group: VM_Affinity_group + port_NCB1_Internal1_security_groups: + - - int1_security_group + compute_ncb_availability_zone: + - get_input: availability_zone_0 + port_NCB1_Internal2_mac_address: + get_input: ncb1_Internal1_mac + port_NCB1_Internal1_mac_address: + get_input: ncb1_Internal1_mac + port_NCB1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_NCB1_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_NCB1_Internal2_replacement_policy: + - AUTO + port_NCB1_Internal1_network: + - Internal1_net + port_NCB1_Internal2_security_groups: + - - int2_security_group + port_NCB1_Internal1_replacement_policy: + - AUTO + compute_ncb_name: + - get_input: ncb_name_0 + compute_ncb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_NCB1_Internal2_network: + - Internal2_net + service_template_filter: + substitute_service_template: Nested_ncbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: ncb + nfc_naming_code: ncb + requirements: + - link_ncb_NCB1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_ncb_NCB1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + int1_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: int1_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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_fsb_FSB1_Internal1 + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB2_Internal1 + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB1_Internal1 + node: abstract_ncb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB2_Internal1 + node: abstract_ncb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb1_Internal1 + node: abstract_gpb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb2_Internal1 + node: abstract_gpb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb3_Internal1 + node: abstract_gpb_2 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb4_Internal1 + node: abstract_gpb_3 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb5_Internal1 + node: abstract_gpb_4 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb6_Internal1 + node: abstract_gpb_5 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb7_Internal1 + node: abstract_gpb_6 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb8_Internal1 + node: abstract_gpb_7 + relationship: org.openecomp.relationships.AttachesTo + fsb_volume_0: + type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume + properties: + image: + get_input: fsb_volume_image_name_0 + volume_type: + get_input: fsb_volume_type + size: '(get_input : fsb_volume_size) * 1024' + name: + list_join: + - _ + - - get_input: OS::stack_name + - FSB1_Vol_1 + fsb_volume_1: + type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume + properties: + image: + get_input: fsb_volume_image_name_1 + volume_type: + get_input: fsb_volume_type + size: '(get_input : fsb_volume_size) * 1024' + name: + list_join: + - _ + - - get_input: OS::stack_name + - FSB2_Vol_1 + Internal2_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_enable_dhcp: + get_input: Internal2_dhcp + network_ipam_refs_data_ipam_subnets_default_gateway: + get_input: Internal2_net_gateway + network_ipam_refs_data_ipam_subnets_subnet: + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: + get_input: Internal2_net_cidr_len + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: + get_input: Internal2_net_cidr + network_name: + str_replace: + template: $VNF_NAME_int_net_2 + params: + $VNF_NAME: + get_input: vnf_name + network_ipam_refs: + - UNSUPPORTED_RESOURCE_template_NetworkIpam_Internal2 + int2_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: int2_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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: 132 + 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: 132 + 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: 132 + 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: 132 + 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_fsb_FSB1_Internal2 + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB2_Internal2 + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB1_Internal2 + node: abstract_ncb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB2_Internal2 + node: abstract_ncb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb1_Internal2 + node: abstract_gpb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb2_Internal2 + node: abstract_gpb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb3_Internal2 + node: abstract_gpb_2 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb4_Internal2 + node: abstract_gpb_3 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb5_Internal2 + node: abstract_gpb_4 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb6_Internal2 + node: abstract_gpb_5 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb7_Internal2 + node: abstract_gpb_6 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb8_Internal2 + node: abstract_gpb_7 + relationship: org.openecomp.relationships.AttachesTo + abstract_fsb_1: + type: org.openecomp.resource.abstract.nodes.fsb_1 + directives: + - substitutable + properties: + port_FSB_OAM_network_role_tag: + - oam + vm_flavor_name: + get_input: fsb_flavor_name + port_FSB_OAM_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: true + floating_ip_count_required: + is_required: false + port_FSB2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB2_Internal2_security_groups: + - - int2_security_group + compute_fsb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_FSB2_Internal1_mac_address: + get_input: fsb2_Internal1_mac + compute_fsb_scheduler_hints: + - group: VM_Affinity_group + compute_fsb_name: + - get_input: fsb_name_1 + port_FSB2_Internal1_security_groups: + - - int1_security_group + port_FSB_OAM_network: + - get_input: oam_net_name + port_FSB_OAM_security_groups: + - - oam_security_group + port_FSB2_Internal1_network: + - Internal1_net + port_FSB2_Internal2_mac_address: + get_input: fsb2_Internal1_mac + port_FSB2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_FSB_OAM_mac_requirements: + mac_count_required: + is_required: false + port_FSB2_Internal2_replacement_policy: + - AUTO + port_FSB2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_replacement_policy: + - AUTO + port_FSB2_Internal2_network: + - Internal2_net + port_FSB2_Internal1_replacement_policy: + - AUTO + compute_fsb_availability_zone: + - get_input: availability_zone_1 + port_FSB_OAM_fixed_ips: + - ip_address: + get_input: fsb_oam_ip_1 + port_FSB2_Internal1_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_fsb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: fsb + nfc_naming_code: fsb + requirements: + - link_fsb_FSB2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_fsb_FSB2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + oam_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: oam_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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_fsb_FSB_OAM + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB_OAM + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + groups: + vmme_gpb3_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb3.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + base_vmme_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/base_vmme.yml + description: | + Base HOT template to create vmme 2 fsb 2 ncb + members: + - int2_security_group + - oam_security_group + - gtp_security_group + - Internal2_net + - int1_security_group + - Internal1_net + - abstract_ncb + - abstract_ncb_1 + - abstract_fsb + - abstract_fsb_1 + base_vmme_volume_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/base_vmme_volume.yml + description: HOT template for vMME Cinder Volumes + members: + - fsb_volume_0 + - fsb_volume_1 + vmme_gpb1_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb1.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_gpb4_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb4.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_gpb2_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb2.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + VM_Affinity_group: + type: tosca.groups.Root + members: + - abstract_ncb + - abstract_ncb_1 + - abstract_vlc + - abstract_fsb + - abstract_fsb_1 + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_vlc_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_vlc.yml + description: | + Module HOT template to create vmme 8 vlcs + members: + - abstract_vlc + outputs: + oam_management_v4_address: + description: ID of OAM VIP to be provisioned in A&AI + value: + get_input: vip_oam_management_v4_ip + fsb_volume_id_1: + description: ID of Cinder Volume for FSB2 + value: fsb_volume_1 + security_group_sctp_b_id: + description: ID of sctpb_security_group + value: UNSUPPORTED_RESOURCE_sctpb_security_group + service_instance_id_0: + description: ID of Service Instance used for vLCs + value: UNSUPPORTED_RESOURCE_template_ServiceInstance_VLC + security_group_sctp_a_id: + description: ID of sctpa_security_group + value: UNSUPPORTED_RESOURCE_sctpa_security_group + fsb_volume_id_0: + description: ID of Cinder Volume for FSB1 + value: fsb_volume_0 + policies: + VM_Affinity_policy: + type: org.openecomp.policies.placement.Antilocate + properties: + container_type: host + targets: + - VM_Affinity_group diff --git a/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeLessRequirements.yaml b/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeLessRequirements.yaml new file mode 100644 index 0000000000..b2b59769ae --- /dev/null +++ b/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeLessRequirements.yaml @@ -0,0 +1,3581 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: Main +imports: +- openecomp_heat_index: + file: openecomp-heat/_index.yml +- GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml +topology_template: + inputs: + vlc4_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc4_Internal2 + default: 00:80:37:0E:04:12 + sctp-a-egress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + sctp-b-ipv6-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: IPV6 start port + default: 0 + constraints: + - in_range: + - 0 + - 65535 + ncb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb1_Internal2 + default: 00:80:37:0E:09:12 + sctp-a-ipv6-ingress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + gpb8_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb8_Internal1 + default: 00:80:37:0E:10:22 + sctp-a-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + sctp-b-display_name: + hidden: false + immutable: false + type: string + description: display_name for the SecurityGroup + default: epc-sctp-b-ipv4v6-sec-group + sctp-a-ingress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-a-egress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + ncb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers ncb + default: nv.c8r32d1 + vlc3_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc3_Internal1 + default: 00:80:37:0E:03:12 + Internal2_net_cidr: + hidden: false + immutable: false + type: string + description: CIDR for internal-2 network + default: 169.255.0.0 + sctp-a-egress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-egress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + gpb4_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb4_Internal2 + default: 00:80:37:0E:0C:22 + sctp-b-ipv6-egress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + vlc8_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc8_Internal1 + default: 00:80:37:0E:08:12 + sctp-b-ipv6-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: IPV6 ending port for destination + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + fsb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb2_Internal1 + default: 00:80:37:0E:0D:12 + sctp-b-name: + hidden: false + immutable: false + type: string + description: name for the SecurityGroup + default: epc-sctp-b-ipv4v6-sec-group + sctp-b-ipv6-egress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + internal_net_id_1: + hidden: false + immutable: false + type: string + description: UUID of Internal2_net + default: e3397c69-a942-49aa-81cb-fb91ff34abc8 + sctp-a-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + internal_net_id_0: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net + default: 871de971-22ac-47b6-befb-50e7d4cb67ea + sctp_b_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN SCTPB + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPB_net_1 + sctp-a-ipv6-ingress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + sctp-b-ipv6-ingress_src_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix length + default: '0' + ncb_name_1: + hidden: false + immutable: false + type: string + description: Name of ncb2 + default: zrdm3mmex59ncb002 + ncb_name_0: + hidden: false + immutable: false + type: string + description: Name of ncb1 + default: zrdm3mmex59ncb001 + vlc_st_virtualization_type: + hidden: false + immutable: false + type: string + description: Indicates virtualization type + default: virtual-machine + vlc2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc2_Internal1 + default: 00:80:37:0E:02:12 + sctp-b-ingress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-display_name: + hidden: false + immutable: false + type: string + description: display_name for the SecurityGroup + default: epc-sctp-a-ipv4v6-sec-group + sctp-b-ingress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + int2_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for internal-2 + default: int2-sec-group + gpb5_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb5_Internal2 + default: 00:80:37:0E:0D:22 + sctp-a-egress-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: dst subnet + default: '::' + OS::stack_name: + type: string + required: false + sctp-b-egress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + Internal2_shared: + hidden: false + immutable: false + type: string + description: Whether Shared or private internal-2 network + default: false + sctp-a-ipv6-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + Internal2_rpf: + hidden: false + immutable: false + type: string + description: Reverse Path Forwarding Enabled/Disabled internal-2 network + default: disable + vlc5_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc5_Internal2 + default: 00:80:37:0E:05:12 + sctp-a-ipv6-egress_src_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + Internal1_forwarding_mode: + hidden: false + immutable: false + type: string + description: L2 or L3 forwarding mode for internal-1 network + default: l2 + gpb3_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb3_Internal1 + default: 00:80:37:0E:0B:22 + vip_oam_management_v4_ip: + hidden: false + immutable: false + type: string + description: IP address of OAM service IP address to be provisioned in A&AI + default: 107.239.72.176 + vmi_oam_preference_primary: + hidden: false + immutable: false + type: float + description: Preference for primary interface/port + default: 200 + sctp-b-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp-a-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + security_group_sctp_b_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 92a4ae54-1733-4d03-b488-f178bb9f7b82 + Internal2_forwarding_mode: + hidden: false + immutable: false + type: string + description: L2 or L3 forwarding mode for internal-2 network + default: l2 + sctp-a-ipv6-egress_dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-b-egress-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: dst subnet + default: '::' + sctp-b-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + security_group_oam_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 4ae4aa74-3e8e-4f2b-8b5f-a8bd262da96b + gpb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb2_Internal1 + default: 00:80:37:0E:0A:22 + security_group_int1_id: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net security group + default: 94c62578-835d-4801-9372-70a2cfb22683 + sctp-a-egress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + oam_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN OAM + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_OAM_net_1 + ncb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb2_Internal2 + default: 00:80:37:0E:0F:12 + vlc_st_interface_type_sctp_a: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: left + gpb3_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb3_Internal2 + default: 00:80:37:0E:0B:22 + vlc_st_interface_type_sctp_b: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: right + gpb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb1_Internal2 + default: 00:80:37:0E:09:22 + oam_net_name: + hidden: false + immutable: false + type: string + description: Network Name OAM + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_OAM_net_1 + sctp-b-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb1_Internal1 + default: 00:80:37:0E:0B:12 + sctp-b-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + vlc_st_interface_type_oam: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: management + shc_monitor_type: + hidden: false + immutable: false + type: string + description: health check + default: PING + oam_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for OAM + default: oam-sec-group + Internal2_net_gateway: + hidden: false + immutable: false + type: string + description: gateway for internal-2 network + default: 169.255.0.3 + evac_policy: + hidden: false + immutable: false + type: string + description: CMHA Policy + default: Evacuate + server_group_id_0: + hidden: false + immutable: false + type: string + description: ID of Anti-Affinity Policy-based Server Group + default: ec99a73d-38f8-4280-8103-ba8ee584629f + vlc8_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc8_Internal2 + default: 00:80:37:0E:08:12 + sctp-b-ipv6-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + gtp_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for GTP + default: gtp-sec-group + vlc_sctp_b_v6_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPB + default: fd00:200:200:5:0:0:0:24 + vlc_sctp_b_v6_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPB + default: fd00:200:200:5:0:0:0:17 + sctp-a-ipv6-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + vlc_sctp_b_v6_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPB + default: fd00:200:200:5:0:0:0:16 + vlc4_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc4_Internal1 + default: 00:80:37:0E:04:12 + vlc_sctp_b_v6_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPB + default: fd00:200:200:5:0:0:0:28 + vlc_sctp_b_v6_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPB + default: fd00:200:200:5:0:0:0:27 + vlc_sctp_b_v6_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPB + default: fd00:200:200:5:0:0:0:26 + vlc_sctp_b_v6_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPB + default: fd00:200:200:5:0:0:0:25 + sctp_b_net_name: + hidden: false + immutable: false + type: string + description: Network Name SCTPB + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPB_net_1 + sctp-b-ipv6-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: '0' + sctp-a-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + Internal1_shared: + hidden: false + immutable: false + type: string + description: Whether Shared or private internal-1 network + default: false + shc_url_path: + hidden: false + immutable: false + type: string + description: health check + default: local-ip + Internal2_net_cidr_len: + hidden: false + immutable: false + type: string + description: CIDR length for internal-2 network + default: 17 + sctp-a-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-b-ipv6-ingress_src_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + sctp-a-egress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-ingress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-b-ipv6-ingress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc_st_service_type: + hidden: false + immutable: false + type: string + description: service type + default: firewall + sctp-b-ipv6-ingress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 starting port for destination + default: 0 + vlc_st_availability_zone: + hidden: false + immutable: false + type: string + description: Indicates availability zone is enabled + default: true + vlc7_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc7_Internal1 + default: 00:80:37:0E:07:12 + fsb_volume_image_name_1: + label: MME_FSB2 + hidden: false + immutable: false + type: string + description: volume name + default: MME_FSB2_1_3_GA.qcow2 + vlc_oam_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 OAM + default: 107.239.72.151 + sctp-a-ipv6-ingress_src_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix length + default: '0' + vlc_oam_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 OAM + default: 107.239.72.152 + Internal1_allow_transit: + hidden: false + immutable: false + type: string + description: Allow/disallow transit internal-1 network + default: true + vlc_oam_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 OAM + default: 107.239.72.157 + vlc_oam_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 OAM + default: 107.239.72.158 + vlc_gtp_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 GTP + default: 107.243.47.208 + vlc_oam_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 OAM + default: 107.239.72.149 + fsb_volume_image_name_0: + label: MME_FSB1 + hidden: false + immutable: false + type: string + description: volume name + default: MME_FSB1_1_3_GA.qcow2 + vlc_gtp_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 GTP + default: 107.243.47.209 + vlc_oam_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 OAM + default: 107.239.72.150 + vlc_gtp_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 GTP + default: 107.243.47.216 + vlc_name_6: + hidden: false + immutable: false + type: string + description: Name of vlc7 + default: zrdm3mmex59vlc007 + vlc_gtp_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 GTP + default: 107.243.47.217 + vlc_name_7: + hidden: false + immutable: false + type: string + description: Name of vlc8 + default: zrdm3mmex59vlc008 + security_group_sctp_a_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 3cd8a524-77ff-4980-ae2a-d19ba70e0511 + vlc_gtp_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 GTP + default: 107.243.47.218 + vlc_gtp_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 GTP + default: 107.243.47.219 + vlc_gtp_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 GTP + default: 107.243.47.220 + vlc_name_2: + hidden: false + immutable: false + type: string + description: Name of vlc3 + default: zrdm3mmex59vlc003 + vlc_gtp_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 GTP + default: 107.243.47.221 + vlc_name_3: + hidden: false + immutable: false + type: string + description: Name of vlc4 + default: zrdm3mmex59vlc004 + vlc_name_4: + hidden: false + immutable: false + type: string + description: Name of vlc5 + default: zrdm3mmex59vlc005 + vlc_name_5: + hidden: false + immutable: false + type: string + description: Name of vlc6 + default: zrdm3mmex59vlc006 + fsb_volume_id_1: + hidden: false + immutable: false + type: string + description: ID of Cinder Volume for FSB2 + default: 5bd0560c-bfd0-47dc-a84a-554e2698c925 + sctp-a-ipv6-ingress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc_name_0: + hidden: false + immutable: false + type: string + description: Name of vlc1 + default: zrdm3mmex59vlc001 + vlc_name_1: + hidden: false + immutable: false + type: string + description: Name of vlc2 + default: zrdm3mmex59vlc002 + vlc_oam_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on OAM + sctp-b-egress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + vlc_oam_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 OAM + default: 107.239.72.155 + vlc_oam_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 OAM + default: 107.239.72.156 + vlc6_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc6_Internal1 + default: 00:80:37:0E:06:12 + fsb_volume_id_0: + hidden: false + immutable: false + type: string + description: ID of Cinder Volume for FSB1 + default: 27baa6a0-b701-4795-bf5e-4f546b350b1f + sctp-b-egress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + gpb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb2_Internal2 + default: 00:80:37:0E:0A:22 + sctp-a-ipv6-egress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + sctp-b-ipv6-egress_src_start_port: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0 + Internal2_allow_transit: + hidden: false + immutable: false + type: string + description: Allow/disallow transit internal-2 network + default: true + fsb_volume_size: + label: volume size + hidden: false + immutable: false + type: float + description: volume size 320GB + default: 320 + constraints: + - in_range: + - 0 + - 340 + sctp-b-IPv6_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv6 + gtp_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN GTP + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_GTP_net_1 + ncb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb2_Internal1 + default: 00:80:37:0E:0F:12 + sctp-b-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + sctp-b-ingress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-b-egress_src_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + gpb7_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb7_Internal2 + default: 00:80:37:0E:0F:22 + sctp-a-ipv6-ingress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 starting port for destination + default: 0 + gtp_net_name: + hidden: false + immutable: false + type: string + description: Network Name GTP + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_GTP_net_1 + sctp-b-ipv6-ingress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + domain_name: + hidden: false + immutable: false + type: string + description: Unique name of vMME contrail domain + default: default-domain + vlc5_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc5_Internal1 + default: 00:80:37:0E:05:12 + sctp-a-egress_src_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + sctp-b-egress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + shc_enabled: + hidden: false + immutable: false + type: string + description: health check + default: true + sctp-b-ipv6-ingress-dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-b-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp_a_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN SCTPA + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPA_net_1 + security_group_gtp_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: e8ad3fe2-5f95-43e4-bbcc-da97b1c22588 + sctp-a-ipv6-ingress_src_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + fsb_name_1: + hidden: false + immutable: false + type: string + description: Name of fsb1 + default: zrdm3mmex59fsb002 + sctp-b-egress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb_name_0: + hidden: false + immutable: false + type: string + description: Name of fsb1 + default: zrdm3mmex59fsb001 + sctp_a_net_name: + hidden: false + immutable: false + type: string + description: Network Name SCTPA + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPA_net_1 + sctp-b-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + gpb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb1_Internal1 + default: 00:80:37:0E:09:22 + sctp-a-ingress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb1_Internal2 + default: 00:80:37:0E:0B:12 + vlc_st_service_mode: + hidden: false + immutable: false + type: string + description: service mode + default: in-network-nat + sctp-a-ipv6-egress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + sctp-a-egress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-b-egress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-a-ingress-src_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + sctp-a-ipv6-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: IPV6 start port + default: 0 + constraints: + - in_range: + - 0 + - 65535 + vf_module_id: + hidden: false + immutable: false + type: string + description: the vf_module_id for this instance. UUID provided by ECOMP + default: TWO + Internal1_net_cidr: + hidden: false + immutable: false + type: string + description: CIDR for internal-1 network + default: 169.253.0.0 + fsb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers fsb1 + default: nv.c8r32d1 + sctp_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: 132 + vnf_name: + hidden: false + immutable: false + type: string + description: the vnf_name for this instance. provided by ECOMP + default: zrdm3mmex59 + sctp-a-IPv6_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv6 + vlc_sctp_b_v6_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPB + default: fd00:200:200:5:0:0:0:29 + vlc6_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc6_Internal2 + default: 00:80:37:0E:06:12 + sctp-b-ingress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc7_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc7_Internal2 + default: 00:80:37:0E:07:12 + sctp-a-ipv6-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: IPV6 ending port for destination + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers vlc + default: nd.c16r64d1 + sctp-b-ipv6-egress_src_addresses: + hidden: false + immutable: false + type: string + description: IPV6 source + default: local + vlc_st_interface_type_int1: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other1 + availability_zone_0: + hidden: false + immutable: false + type: string + description: cluster for spawnning fsb instances + default: rdm3-kvm-az02 + service_instance_id_0: + hidden: false + immutable: false + type: string + description: UUID of service instance for vLCs + default: 77c67cc8-d15f-47bc-aeb1-8d65d09e917a + availability_zone_1: + hidden: false + immutable: false + type: string + description: cluster for spawnning ncb instances + default: rdm3-kvm-az02 + vlc_st_interface_type_int2: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other2 + sctp-a-ipv6-egress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 start port + default: 0 + sctp-a-ipv6-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: '0' + vlc_sctp_a_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPA + default: 107.243.47.144 + vlc_sctp_b_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on SCTPB + vlc1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal1 + default: 00:80:37:0E:01:12 + sctp-b-ipv6-egress_src_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-a-ipv6-egress_src_addresses: + hidden: false + immutable: false + type: string + description: IPV6 source + default: local + vlc_sctp_a_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPA + default: 107.243.47.157 + sctp-a-ingress-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: src subnet + default: '::' + vlc_sctp_a_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPA + default: 107.243.47.156 + vlc_sctp_a_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPA + default: 107.243.47.155 + sctp-a-ingress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc_sctp_a_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPA + default: 107.243.47.154 + vlc_sctp_a_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPA + default: 107.243.47.153 + vlc_sctp_a_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPA + default: 107.243.47.152 + vlc_sctp_a_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPA + default: 107.243.47.145 + gpb6_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb6_Internal2 + default: 00:80:37:0E:0E:22 + security_group_int2_id: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net security group + default: 1361f069-baf2-4b76-b321-7f68ba26c369 + Internal2_dhcp: + hidden: false + immutable: false + type: string + description: Whether DHCP/static IP addressing on internal-2 network + default: false + sctp-a-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + pxe_image_name: + hidden: false + immutable: false + type: string + description: Name of image to use for server ncb + default: MME_PXE-Boot_1_3_GA.qcow2 + vlc_st_interface_type_gtp: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other0 + ncb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb1_Internal1 + default: 00:80:37:0E:09:12 + vlc_gtp_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on GTP + int1_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for internal-1 + default: int1-sec-group + vmi_oam_preference_secondary: + hidden: false + immutable: false + type: float + description: Preference for secondary interface/port + default: 100 + Internal1_dhcp: + hidden: false + immutable: false + type: string + description: Whether DHCP/static IP addressing on internal-1 network + default: false + fsb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb2_Internal2 + default: 00:80:37:0E:0D:12 + Internal1_net_cidr_len: + hidden: false + immutable: false + type: string + description: CIDR length for internal-1 network + default: 17 + sctp-a-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + sctp-b-ingress-src_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + fsb_oam_ip_1: + hidden: false + immutable: false + type: string + description: IP address of OAM vNIC for FSB2 + default: 107.239.72.154 + fsb_oam_ip_0: + hidden: false + immutable: false + type: string + description: IP address of OAM vNIC for FSB1 + default: 107.239.72.153 + shc_timeout: + hidden: false + immutable: false + type: string + description: health check + default: 5 + vlc_st_version: + hidden: false + immutable: false + type: string + description: Indicates service version + default: 2 + sctp-a-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp-a-ingress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + sctp-b-egress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-a-ipv6-egress_src_start_port: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0 + instance_ip_family_v6: + hidden: false + immutable: false + type: string + description: Ipv6 instance type + default: v6 + sctp-b-ingress-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: src subnet + default: '::' + gpb8_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb8_Internal2 + default: 00:80:37:0E:10:22 + gpb4_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb4_Internal1 + default: 00:80:37:0E:0C:22 + sctp-a-ipv6-ingress-dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + Internal1_net_gateway: + hidden: false + immutable: false + type: string + description: gateway for internal-1 network + default: 169.253.0.3 + sctp-b-ipv6-egress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 start port + default: 0 + gpb_name_7: + hidden: false + immutable: false + type: string + description: Name of gpb8 + default: zrdm3mmex59gpb0016 + gpb_name_6: + hidden: false + immutable: false + type: string + description: Name of gpb7 + default: zrdm3mmex59gpb0015 + gpb_name_5: + hidden: false + immutable: false + type: string + description: Name of gpb6 + default: zrdm3mmex59gpb0014 + gpb_name_4: + hidden: false + immutable: false + type: string + description: Name of gpb5 + default: zrdm3mmex59gpb0013 + gpb_name_3: + hidden: false + immutable: false + type: string + description: Name of gpb4 + default: zrdm3mmex59gpb0012 + sctp-a-ipv6-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: IPV6 destination + default: local + gpb_name_2: + hidden: false + immutable: false + type: string + description: Name of gpb3 + default: zrdm3mmex59gpb0011 + shc_delay: + hidden: false + immutable: false + type: string + description: health check + default: 3 + gpb_name_1: + hidden: false + immutable: false + type: string + description: Name of gpb2 + default: zrdm3mmex59gpb0010 + sctp-b-ipv6-egress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc3_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc3_Internal2 + default: 00:80:37:0E:03:12 + gpb_name_0: + hidden: false + immutable: false + type: string + description: Name of gpb1 + default: zrdm3mmex59gpb009 + sctp-a-ipv6-egress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + gpb5_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb5_Internal1 + default: 00:80:37:0E:0D:22 + sctp-b-ipv6-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + shc_max_retries: + hidden: false + immutable: false + type: string + description: health check + default: 2 + fsb_volume_type: + label: volume type + hidden: false + immutable: false + type: string + description: volume type SolidFire + default: SF-Default-SSD + sctp-a-name: + hidden: false + immutable: false + type: string + description: name for the SecurityGroup + default: epc-sctp-a-ipv4v6-sec-group + vlc_sctp_b_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPB + default: 107.243.47.187 + vlc_sctp_b_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPB + default: 107.243.47.186 + vlc_sctp_b_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPB + default: 107.243.47.185 + vlc_sctp_b_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPB + default: 107.243.47.184 + sctp-b-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + vnf_id: + hidden: false + immutable: false + type: string + description: the vf_id for this instance. UUID provided by ECOMP + default: zrdm3mmex59 + vlc_sctp_b_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPB + default: 107.243.47.189 + vlc_sctp_b_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPB + default: 107.243.47.188 + vlc_sctp_b_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPB + default: 107.243.47.177 + gpb6_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb6_Internal1 + default: 00:80:37:0E:0E:22 + sctp-b-ipv6-egress_dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + vlc_sctp_b_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPB + default: 107.243.47.176 + vlc2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc2_Internal2 + default: 00:80:37:0E:02:12 + sctp-b-ingress-src_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + gpb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers gpb + default: nv.c20r64d1 + vlc_sctp_a_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on SCTPA + sctp-b-ipv6-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: IPV6 destination + default: local + sctp-b-ipv6-ingress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + sctp-b-ipv6-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + sctp-a-ingress-src_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + vlc1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal2 + default: 00:80:37:0E:01:12 + Internal1_rpf: + hidden: false + immutable: false + type: string + description: Reverse Path Forwarding Enabled/Disabled internal-1 network + default: disable + sctp-b-ingress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-b-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-ipv6-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + vlc_sctp_a_v6_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPA + default: fd00:200:200:4:0:0:0:29 + vlc_sctp_a_v6_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPA + default: fd00:200:200:4:0:0:0:28 + gpb7_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb7_Internal1 + default: 00:80:37:0E:0F:22 + vlc_sctp_a_v6_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPA + default: fd00:200:200:4:0:0:0:27 + vlc_sctp_a_v6_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPA + default: fd00:200:200:4:0:0:0:26 + vlc_sctp_a_v6_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPA + default: fd00:200:200:4:0:0:0:25 + vlc_sctp_a_v6_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPA + default: fd00:200:200:4:0:0:0:24 + sctp-a-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + vlc_sctp_a_v6_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPA + default: fd00:200:200:4:0:0:0:17 + vlc_sctp_a_v6_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPA + default: fd00:200:200:4:0:0:0:16 + node_templates: + abstract_gpb_1: + type: org.openecomp.resource.abstract.nodes.gpb_1 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_1 + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb2_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb2_Internal2_network: + - get_input: internal_net_id_1 + port_gpb2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_image_name: + get_input: pxe_image_name + port_gpb2_Internal1_replacement_policy: + - AUTO + port_gpb2_Internal1_network: + - get_input: internal_net_id_0 + port_gpb2_Internal2_replacement_policy: + - AUTO + port_gpb2_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb2_Internal1_mac_address: + get_input: gpb2_Internal1_mac + port_gpb2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb2_Internal2_mac_address: + get_input: gpb2_Internal1_mac + port_gpb2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb2_Internal2_security_groups: + - - get_input: security_group_int2_id + service_template_filter: + substitute_service_template: Nested_gpb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_2: + type: org.openecomp.resource.abstract.nodes.gpb_2 + directives: + - substitutable + properties: + port_gpb3_Internal1_replacement_policy: + - AUTO + compute_gpb_name: + - get_input: gpb_name_2 + port_gpb3_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb3_Internal2_replacement_policy: + - AUTO + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb3_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb3_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb3_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb3_Internal1_network: + - get_input: internal_net_id_0 + port_gpb3_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb3_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb3_Internal1_mac_address: + get_input: gpb3_Internal1_mac + port_gpb3_Internal2_mac_address: + get_input: gpb3_Internal1_mac + port_gpb3_Internal2_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_gpb_2ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb3_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb3_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_vlc: + type: org.openecomp.resource.abstract.nodes.vlc + directives: + - substitutable + properties: + port_template_VMInt_SCTP_A_vlc_virtual_network_refs: + - - get_input: sctp_a_net_fqdn + port_template_VMInt_INT1_vlc_security_group_refs: + - - get_input: security_group_int1_id + vm_flavor_name: + get_input: vlc_flavor_name + port_template_VMInt_INT2_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + vm_image_name: + get_input: pxe_image_name + port_template_VMInt_INT1_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_INT2_vlc_virtual_network_refs: + - - get_input: internal_net_id_1 + port_template_VMInt_OAM_vlc_virtual_network_refs: + - - get_input: oam_net_fqdn + port_template_VMInt_OAM_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_INT2_vlc_virtual_machine_interface_mac_addresses: + - - get_input: vlc4_Internal2_mac + - - get_input: vlc3_Internal2_mac + - - get_input: vlc2_Internal2_mac + - - get_input: vlc1_Internal2_mac + - - get_input: vlc8_Internal2_mac + - - get_input: vlc7_Internal2_mac + - - get_input: vlc6_Internal2_mac + - - get_input: vlc5_Internal2_mac + port_template_VMInt_SCTP_B_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_GTP_vlc_security_group_refs: + - - get_input: security_group_gtp_id + compute_vlc_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_template_VMInt_OAM_vlc_security_group_refs: + - - get_input: security_group_oam_id + compute_vlc_contrail_service_instance_ind: + - true + - true + - true + - true + - true + - true + - true + - true + port_template_VMInt_GTP_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_SCTP_B_vlc_virtual_network_refs: + - - get_input: sctp_b_net_fqdn + port_template_VMInt_INT2_vlc_security_group_refs: + - - get_input: security_group_int2_id + port_template_VMInt_SCTP_B_vlc_security_group_refs: + - - get_input: security_group_sctp_b_id + port_template_VMInt_INT1_vlc_virtual_network_refs: + - - get_input: internal_net_id_0 + port_template_VMInt_SCTP_A_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + compute_vlc_scheduler_hints: + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + compute_vlc_name: + - get_input: vlc_name_3 + - get_input: vlc_name_2 + - get_input: vlc_name_1 + - get_input: vlc_name_0 + - get_input: vlc_name_7 + - get_input: vlc_name_6 + - get_input: vlc_name_5 + - get_input: vlc_name_4 + port_template_VMInt_SCTP_A_vlc_security_group_refs: + - - get_input: security_group_sctp_a_id + compute_vlc_availability_zone: + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + port_template_VMInt_INT1_vlc_virtual_machine_interface_mac_addresses: + - - get_input: vlc4_Internal1_mac + - - get_input: vlc3_Internal1_mac + - - get_input: vlc2_Internal1_mac + - - get_input: vlc1_Internal1_mac + - - get_input: vlc8_Internal1_mac + - - get_input: vlc7_Internal1_mac + - - get_input: vlc6_Internal1_mac + - - get_input: vlc5_Internal1_mac + port_template_VMInt_GTP_vlc_virtual_network_refs: + - - get_input: gtp_net_fqdn + service_template_filter: + substitute_service_template: Nested_vlcServiceTemplate.yaml + count: 8 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: vlc + nfc_naming_code: vlc + requirements: + - link_vlc_template_VMInt_INT2_vlc: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + - link_vlc_template_VMInt_INT1_vlc: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_7: + type: org.openecomp.resource.abstract.nodes.gpb_7 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_7 + port_gpb8_Internal1_mac_address: + get_input: gpb8_Internal1_mac + port_gpb8_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb8_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb8_Internal1_replacement_policy: + - AUTO + port_gpb8_Internal2_replacement_policy: + - AUTO + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb8_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb8_Internal1_network: + - get_input: internal_net_id_0 + port_gpb8_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb8_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb8_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb8_Internal2_network: + - get_input: internal_net_id_1 + port_gpb8_Internal2_mac_address: + get_input: gpb8_Internal1_mac + service_template_filter: + substitute_service_template: Nested_gpb_7ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb8_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb8_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_5: + type: org.openecomp.resource.abstract.nodes.gpb_5 + directives: + - substitutable + properties: + port_gpb6_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_name: + - get_input: gpb_name_5 + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb6_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_image_name: + get_input: pxe_image_name + port_gpb6_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb6_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb6_Internal1_network: + - get_input: internal_net_id_0 + port_gpb6_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb6_Internal2_mac_address: + get_input: gpb6_Internal1_mac + port_gpb6_Internal1_mac_address: + get_input: gpb6_Internal1_mac + port_gpb6_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb6_Internal2_replacement_policy: + - AUTO + port_gpb6_Internal1_replacement_policy: + - AUTO + port_gpb6_Internal2_security_groups: + - - get_input: security_group_int2_id + service_template_filter: + substitute_service_template: Nested_gpb_5ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb6_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb6_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_6: + type: org.openecomp.resource.abstract.nodes.gpb_6 + directives: + - substitutable + properties: + port_gpb7_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb7_Internal1_network: + - get_input: internal_net_id_0 + compute_gpb_name: + - get_input: gpb_name_6 + port_gpb7_Internal2_network: + - get_input: internal_net_id_1 + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb7_Internal1_replacement_policy: + - AUTO + port_gpb7_Internal2_replacement_policy: + - AUTO + port_gpb7_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb7_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb7_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb7_Internal2_mac_address: + get_input: gpb7_Internal1_mac + port_gpb7_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb7_Internal1_mac_address: + get_input: gpb7_Internal1_mac + port_gpb7_Internal2_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_gpb_6ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb7_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb7_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_3: + type: org.openecomp.resource.abstract.nodes.gpb_3 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_3 + port_gpb4_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb4_Internal1_mac_address: + get_input: gpb4_Internal1_mac + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb4_Internal2_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb4_Internal2_mac_address: + get_input: gpb4_Internal1_mac + vm_image_name: + get_input: pxe_image_name + port_gpb4_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb4_Internal2_replacement_policy: + - AUTO + port_gpb4_Internal1_replacement_policy: + - AUTO + port_gpb4_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb4_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb4_Internal2_network: + - get_input: internal_net_id_1 + port_gpb4_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb4_Internal1_network: + - get_input: internal_net_id_0 + service_template_filter: + substitute_service_template: Nested_gpb_3ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb4_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb4_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_4: + type: org.openecomp.resource.abstract.nodes.gpb_4 + directives: + - substitutable + properties: + port_gpb5_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb5_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_name: + - get_input: gpb_name_4 + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb5_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb5_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb5_Internal1_network: + - get_input: internal_net_id_0 + port_gpb5_Internal2_mac_address: + get_input: gpb5_Internal1_mac + port_gpb5_Internal1_mac_address: + get_input: gpb5_Internal1_mac + port_gpb5_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb5_Internal2_replacement_policy: + - AUTO + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb5_Internal1_replacement_policy: + - AUTO + port_gpb5_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb5_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + service_template_filter: + substitute_service_template: Nested_gpb_4ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb5_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb5_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb: + type: org.openecomp.resource.abstract.nodes.gpb + directives: + - substitutable + properties: + port_gpb1_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_name: + - get_input: gpb_name_0 + port_gpb1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb1_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb1_Internal1_mac_address: + get_input: gpb1_Internal1_mac + port_gpb1_Internal2_mac_address: + get_input: gpb1_Internal1_mac + port_gpb1_Internal2_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb1_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb1_Internal1_replacement_policy: + - AUTO + port_gpb1_Internal2_replacement_policy: + - AUTO + port_gpb1_Internal2_network: + - get_input: internal_net_id_1 + port_gpb1_Internal1_network: + - get_input: internal_net_id_0 + service_template_filter: + substitute_service_template: Nested_gpbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + Internal1_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_enable_dhcp: + get_input: Internal1_dhcp + network_ipam_refs_data_ipam_subnets_default_gateway: + get_input: Internal1_net_gateway + network_ipam_refs_data_ipam_subnets_subnet: + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: + get_input: Internal1_net_cidr_len + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: + get_input: Internal1_net_cidr + network_name: + str_replace: + template: $VNF_NAME_int_net_1 + params: + $VNF_NAME: + get_input: vnf_name + network_ipam_refs: + - UNSUPPORTED_RESOURCE_template_NetworkIpam_Internal1 + abstract_fsb: + type: org.openecomp.resource.abstract.nodes.fsb + directives: + - substitutable + properties: + port_FSB1_Internal1_mac_address: + get_input: fsb1_Internal1_mac + port_FSB_OAM_network_role_tag: + - oam + port_FSB1_Internal2_network: + - Internal2_net + port_FSB1_Internal1_network: + - Internal1_net + vm_flavor_name: + get_input: fsb_flavor_name + port_FSB1_Internal2_mac_address: + get_input: fsb1_Internal1_mac + port_FSB_OAM_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: true + floating_ip_count_required: + is_required: false + compute_fsb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_FSB1_Internal1_security_groups: + - - int1_security_group + port_FSB1_Internal2_replacement_policy: + - AUTO + compute_fsb_scheduler_hints: + - group: VM_Affinity_group + port_FSB1_Internal1_replacement_policy: + - AUTO + compute_fsb_name: + - get_input: fsb_name_0 + port_FSB1_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_FSB1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_network: + - get_input: oam_net_name + port_FSB_OAM_security_groups: + - - oam_security_group + port_FSB_OAM_mac_requirements: + mac_count_required: + is_required: false + port_FSB_OAM_replacement_policy: + - AUTO + compute_fsb_availability_zone: + - get_input: availability_zone_0 + port_FSB1_Internal2_security_groups: + - - int2_security_group + port_FSB1_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_FSB1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_fixed_ips: + - ip_address: + get_input: fsb_oam_ip_0 + service_template_filter: + substitute_service_template: Nested_fsbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: fsb + nfc_naming_code: fsb + requirements: + - link_fsb_FSB1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_fsb_FSB1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + gtp_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: gtp_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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 + abstract_ncb_1: + type: org.openecomp.resource.abstract.nodes.ncb_1 + directives: + - substitutable + properties: + port_NCB2_Internal2_security_groups: + - - int2_security_group + port_NCB2_Internal1_replacement_policy: + - AUTO + port_NCB2_Internal2_replacement_policy: + - AUTO + vm_flavor_name: + get_input: ncb_flavor_name + port_NCB2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_NCB2_Internal1_mac_requirements: + mac_count_required: + is_required: true + vm_image_name: + get_input: pxe_image_name + compute_ncb_scheduler_hints: + - group: VM_Affinity_group + compute_ncb_availability_zone: + - get_input: availability_zone_1 + port_NCB2_Internal1_network: + - Internal1_net + port_NCB2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_NCB2_Internal1_security_groups: + - - int1_security_group + port_NCB2_Internal2_network: + - Internal2_net + port_NCB2_Internal1_mac_address: + get_input: ncb2_Internal1_mac + port_NCB2_Internal2_mac_address: + get_input: ncb2_Internal1_mac + compute_ncb_name: + - get_input: ncb_name_1 + compute_ncb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_NCB2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + service_template_filter: + substitute_service_template: Nested_ncb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: ncb + nfc_naming_code: ncb + requirements: + - link_ncb_NCB2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_ncb_NCB2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_ncb: + type: org.openecomp.resource.abstract.nodes.ncb + directives: + - substitutable + properties: + vm_flavor_name: + get_input: ncb_flavor_name + port_NCB1_Internal2_mac_requirements: + mac_count_required: + is_required: true + vm_image_name: + get_input: pxe_image_name + port_NCB1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + compute_ncb_scheduler_hints: + - group: VM_Affinity_group + port_NCB1_Internal1_security_groups: + - - int1_security_group + compute_ncb_availability_zone: + - get_input: availability_zone_0 + port_NCB1_Internal2_mac_address: + get_input: ncb1_Internal1_mac + port_NCB1_Internal1_mac_address: + get_input: ncb1_Internal1_mac + port_NCB1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_NCB1_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_NCB1_Internal2_replacement_policy: + - AUTO + port_NCB1_Internal1_network: + - Internal1_net + port_NCB1_Internal2_security_groups: + - - int2_security_group + port_NCB1_Internal1_replacement_policy: + - AUTO + compute_ncb_name: + - get_input: ncb_name_0 + compute_ncb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_NCB1_Internal2_network: + - Internal2_net + service_template_filter: + substitute_service_template: Nested_ncbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: ncb + nfc_naming_code: ncb + requirements: + - link_ncb_NCB1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_ncb_NCB1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + int1_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: int1_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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_fsb_FSB1_Internal1 + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB2_Internal1 + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB1_Internal1 + node: abstract_ncb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB2_Internal1 + node: abstract_ncb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb1_Internal1 + node: abstract_gpb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb2_Internal1 + node: abstract_gpb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb3_Internal1 + node: abstract_gpb_2 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb4_Internal1 + node: abstract_gpb_3 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb5_Internal1 + node: abstract_gpb_4 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb6_Internal1 + node: abstract_gpb_5 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb7_Internal1 + node: abstract_gpb_6 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb8_Internal1 + node: abstract_gpb_7 + relationship: org.openecomp.relationships.AttachesTo + fsb_volume_0: + type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume + properties: + image: + get_input: fsb_volume_image_name_0 + volume_type: + get_input: fsb_volume_type + size: '(get_input : fsb_volume_size) * 1024' + name: + list_join: + - _ + - - get_input: OS::stack_name + - FSB1_Vol_1 + fsb_volume_1: + type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume + properties: + image: + get_input: fsb_volume_image_name_1 + volume_type: + get_input: fsb_volume_type + size: '(get_input : fsb_volume_size) * 1024' + name: + list_join: + - _ + - - get_input: OS::stack_name + - FSB2_Vol_1 + Internal2_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_enable_dhcp: + get_input: Internal2_dhcp + network_ipam_refs_data_ipam_subnets_default_gateway: + get_input: Internal2_net_gateway + network_ipam_refs_data_ipam_subnets_subnet: + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: + get_input: Internal2_net_cidr_len + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: + get_input: Internal2_net_cidr + network_name: + str_replace: + template: $VNF_NAME_int_net_2 + params: + $VNF_NAME: + get_input: vnf_name + network_ipam_refs: + - UNSUPPORTED_RESOURCE_template_NetworkIpam_Internal2 + int2_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: int2_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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: 132 + 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: 132 + 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: 132 + 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: 132 + 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_fsb_FSB1_Internal2 + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB2_Internal2 + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB1_Internal2 + node: abstract_ncb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB2_Internal2 + node: abstract_ncb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb1_Internal2 + node: abstract_gpb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb2_Internal2 + node: abstract_gpb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb3_Internal2 + node: abstract_gpb_2 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb4_Internal2 + node: abstract_gpb_3 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb5_Internal2 + node: abstract_gpb_4 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb6_Internal2 + node: abstract_gpb_5 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb7_Internal2 + node: abstract_gpb_6 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb8_Internal2 + node: abstract_gpb_7 + relationship: org.openecomp.relationships.AttachesTo + abstract_fsb_1: + type: org.openecomp.resource.abstract.nodes.fsb_1 + directives: + - substitutable + properties: + port_FSB_OAM_network_role_tag: + - oam + vm_flavor_name: + get_input: fsb_flavor_name + port_FSB_OAM_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: true + floating_ip_count_required: + is_required: false + port_FSB2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB2_Internal2_security_groups: + - - int2_security_group + compute_fsb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_FSB2_Internal1_mac_address: + get_input: fsb2_Internal1_mac + compute_fsb_scheduler_hints: + - group: VM_Affinity_group + compute_fsb_name: + - get_input: fsb_name_1 + port_FSB2_Internal1_security_groups: + - - int1_security_group + port_FSB_OAM_network: + - get_input: oam_net_name + port_FSB_OAM_security_groups: + - - oam_security_group + port_FSB2_Internal1_network: + - Internal1_net + port_FSB2_Internal2_mac_address: + get_input: fsb2_Internal1_mac + port_FSB2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_FSB_OAM_mac_requirements: + mac_count_required: + is_required: false + port_FSB2_Internal2_replacement_policy: + - AUTO + port_FSB2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_replacement_policy: + - AUTO + port_FSB2_Internal2_network: + - Internal2_net + port_FSB2_Internal1_replacement_policy: + - AUTO + compute_fsb_availability_zone: + - get_input: availability_zone_1 + port_FSB_OAM_fixed_ips: + - ip_address: + get_input: fsb_oam_ip_1 + port_FSB2_Internal1_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_fsb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: fsb + nfc_naming_code: fsb + requirements: + - link_fsb_FSB2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_fsb_FSB2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + oam_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: oam_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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_fsb_FSB_OAM + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB_OAM + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + groups: + vmme_gpb3_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb3.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + base_vmme_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/base_vmme.yml + description: | + Base HOT template to create vmme 2 fsb 2 ncb + members: + - int2_security_group + - oam_security_group + - gtp_security_group + - Internal2_net + - int1_security_group + - Internal1_net + - abstract_ncb + - abstract_ncb_1 + - abstract_fsb + - abstract_fsb_1 + base_vmme_volume_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/base_vmme_volume.yml + description: HOT template for vMME Cinder Volumes + members: + - fsb_volume_0 + - fsb_volume_1 + vmme_gpb1_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb1.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_gpb4_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb4.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_gpb2_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb2.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + VM_Affinity_group: + type: tosca.groups.Root + members: + - abstract_ncb + - abstract_ncb_1 + - abstract_vlc + - abstract_fsb + - abstract_fsb_1 + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_vlc_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_vlc.yml + description: | + Module HOT template to create vmme 8 vlcs + members: + - abstract_vlc + outputs: + oam_management_v4_address: + description: ID of OAM VIP to be provisioned in A&AI + value: + get_input: vip_oam_management_v4_ip + fsb_volume_id_1: + description: ID of Cinder Volume for FSB2 + value: fsb_volume_1 + security_group_sctp_b_id: + description: ID of sctpb_security_group + value: UNSUPPORTED_RESOURCE_sctpb_security_group + service_instance_id_0: + description: ID of Service Instance used for vLCs + value: UNSUPPORTED_RESOURCE_template_ServiceInstance_VLC + security_group_sctp_a_id: + description: ID of sctpa_security_group + value: UNSUPPORTED_RESOURCE_sctpa_security_group + fsb_volume_id_0: + description: ID of Cinder Volume for FSB1 + value: fsb_volume_0 + policies: + VM_Affinity_policy: + type: org.openecomp.policies.placement.Antilocate + properties: + container_type: host + targets: + - VM_Affinity_group diff --git a/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeOrig.yaml b/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeOrig.yaml new file mode 100644 index 0000000000..742590f686 --- /dev/null +++ b/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeOrig.yaml @@ -0,0 +1,3585 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: Main +imports: +- openecomp_heat_index: + file: openecomp-heat/_index.yml +- GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml +topology_template: + inputs: + vlc4_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc4_Internal2 + default: 00:80:37:0E:04:12 + sctp-a-egress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + sctp-b-ipv6-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: IPV6 start port + default: 0 + constraints: + - in_range: + - 0 + - 65535 + ncb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb1_Internal2 + default: 00:80:37:0E:09:12 + sctp-a-ipv6-ingress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + gpb8_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb8_Internal1 + default: 00:80:37:0E:10:22 + sctp-a-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + sctp-b-display_name: + hidden: false + immutable: false + type: string + description: display_name for the SecurityGroup + default: epc-sctp-b-ipv4v6-sec-group + sctp-a-ingress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-a-egress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + ncb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers ncb + default: nv.c8r32d1 + vlc3_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc3_Internal1 + default: 00:80:37:0E:03:12 + Internal2_net_cidr: + hidden: false + immutable: false + type: string + description: CIDR for internal-2 network + default: 169.255.0.0 + sctp-a-egress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-egress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + gpb4_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb4_Internal2 + default: 00:80:37:0E:0C:22 + sctp-b-ipv6-egress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + vlc8_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc8_Internal1 + default: 00:80:37:0E:08:12 + sctp-b-ipv6-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: IPV6 ending port for destination + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + fsb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb2_Internal1 + default: 00:80:37:0E:0D:12 + sctp-b-name: + hidden: false + immutable: false + type: string + description: name for the SecurityGroup + default: epc-sctp-b-ipv4v6-sec-group + sctp-b-ipv6-egress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + internal_net_id_1: + hidden: false + immutable: false + type: string + description: UUID of Internal2_net + default: e3397c69-a942-49aa-81cb-fb91ff34abc8 + sctp-a-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + internal_net_id_0: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net + default: 871de971-22ac-47b6-befb-50e7d4cb67ea + sctp_b_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN SCTPB + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPB_net_1 + sctp-a-ipv6-ingress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + sctp-b-ipv6-ingress_src_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix length + default: '0' + ncb_name_1: + hidden: false + immutable: false + type: string + description: Name of ncb2 + default: zrdm3mmex59ncb002 + ncb_name_0: + hidden: false + immutable: false + type: string + description: Name of ncb1 + default: zrdm3mmex59ncb001 + vlc_st_virtualization_type: + hidden: false + immutable: false + type: string + description: Indicates virtualization type + default: virtual-machine + vlc2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc2_Internal1 + default: 00:80:37:0E:02:12 + sctp-b-ingress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-display_name: + hidden: false + immutable: false + type: string + description: display_name for the SecurityGroup + default: epc-sctp-a-ipv4v6-sec-group + sctp-b-ingress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + int2_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for internal-2 + default: int2-sec-group + gpb5_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb5_Internal2 + default: 00:80:37:0E:0D:22 + sctp-a-egress-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: dst subnet + default: '::' + OS::stack_name: + type: string + required: false + sctp-b-egress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + Internal2_shared: + hidden: false + immutable: false + type: string + description: Whether Shared or private internal-2 network + default: false + sctp-a-ipv6-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + Internal2_rpf: + hidden: false + immutable: false + type: string + description: Reverse Path Forwarding Enabled/Disabled internal-2 network + default: disable + vlc5_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc5_Internal2 + default: 00:80:37:0E:05:12 + sctp-a-ipv6-egress_src_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + Internal1_forwarding_mode: + hidden: false + immutable: false + type: string + description: L2 or L3 forwarding mode for internal-1 network + default: l2 + gpb3_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb3_Internal1 + default: 00:80:37:0E:0B:22 + vip_oam_management_v4_ip: + hidden: false + immutable: false + type: string + description: IP address of OAM service IP address to be provisioned in A&AI + default: 107.239.72.176 + vmi_oam_preference_primary: + hidden: false + immutable: false + type: float + description: Preference for primary interface/port + default: 200 + sctp-b-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp-a-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + security_group_sctp_b_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 92a4ae54-1733-4d03-b488-f178bb9f7b82 + Internal2_forwarding_mode: + hidden: false + immutable: false + type: string + description: L2 or L3 forwarding mode for internal-2 network + default: l2 + sctp-a-ipv6-egress_dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-b-egress-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: dst subnet + default: '::' + sctp-b-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + security_group_oam_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 4ae4aa74-3e8e-4f2b-8b5f-a8bd262da96b + gpb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb2_Internal1 + default: 00:80:37:0E:0A:22 + security_group_int1_id: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net security group + default: 94c62578-835d-4801-9372-70a2cfb22683 + sctp-a-egress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + oam_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN OAM + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_OAM_net_1 + ncb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb2_Internal2 + default: 00:80:37:0E:0F:12 + vlc_st_interface_type_sctp_a: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: left + gpb3_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb3_Internal2 + default: 00:80:37:0E:0B:22 + vlc_st_interface_type_sctp_b: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: right + gpb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb1_Internal2 + default: 00:80:37:0E:09:22 + oam_net_name: + hidden: false + immutable: false + type: string + description: Network Name OAM + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_OAM_net_1 + sctp-b-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb1_Internal1 + default: 00:80:37:0E:0B:12 + sctp-b-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + vlc_st_interface_type_oam: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: management + shc_monitor_type: + hidden: false + immutable: false + type: string + description: health check + default: PING + oam_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for OAM + default: oam-sec-group + Internal2_net_gateway: + hidden: false + immutable: false + type: string + description: gateway for internal-2 network + default: 169.255.0.3 + evac_policy: + hidden: false + immutable: false + type: string + description: CMHA Policy + default: Evacuate + server_group_id_0: + hidden: false + immutable: false + type: string + description: ID of Anti-Affinity Policy-based Server Group + default: ec99a73d-38f8-4280-8103-ba8ee584629f + vlc8_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc8_Internal2 + default: 00:80:37:0E:08:12 + sctp-b-ipv6-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + gtp_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for GTP + default: gtp-sec-group + vlc_sctp_b_v6_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPB + default: fd00:200:200:5:0:0:0:24 + vlc_sctp_b_v6_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPB + default: fd00:200:200:5:0:0:0:17 + sctp-a-ipv6-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + vlc_sctp_b_v6_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPB + default: fd00:200:200:5:0:0:0:16 + vlc4_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc4_Internal1 + default: 00:80:37:0E:04:12 + vlc_sctp_b_v6_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPB + default: fd00:200:200:5:0:0:0:28 + vlc_sctp_b_v6_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPB + default: fd00:200:200:5:0:0:0:27 + vlc_sctp_b_v6_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPB + default: fd00:200:200:5:0:0:0:26 + vlc_sctp_b_v6_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPB + default: fd00:200:200:5:0:0:0:25 + sctp_b_net_name: + hidden: false + immutable: false + type: string + description: Network Name SCTPB + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPB_net_1 + sctp-b-ipv6-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: '0' + sctp-a-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + Internal1_shared: + hidden: false + immutable: false + type: string + description: Whether Shared or private internal-1 network + default: false + shc_url_path: + hidden: false + immutable: false + type: string + description: health check + default: local-ip + Internal2_net_cidr_len: + hidden: false + immutable: false + type: string + description: CIDR length for internal-2 network + default: 17 + sctp-a-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-b-ipv6-ingress_src_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + sctp-a-egress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-ingress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-b-ipv6-ingress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc_st_service_type: + hidden: false + immutable: false + type: string + description: service type + default: firewall + sctp-b-ipv6-ingress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 starting port for destination + default: 0 + vlc_st_availability_zone: + hidden: false + immutable: false + type: string + description: Indicates availability zone is enabled + default: true + vlc7_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc7_Internal1 + default: 00:80:37:0E:07:12 + fsb_volume_image_name_1: + label: MME_FSB2 + hidden: false + immutable: false + type: string + description: volume name + default: MME_FSB2_1_3_GA.qcow2 + vlc_oam_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 OAM + default: 107.239.72.151 + sctp-a-ipv6-ingress_src_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix length + default: '0' + vlc_oam_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 OAM + default: 107.239.72.152 + Internal1_allow_transit: + hidden: false + immutable: false + type: string + description: Allow/disallow transit internal-1 network + default: true + vlc_oam_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 OAM + default: 107.239.72.157 + vlc_oam_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 OAM + default: 107.239.72.158 + vlc_gtp_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 GTP + default: 107.243.47.208 + vlc_oam_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 OAM + default: 107.239.72.149 + fsb_volume_image_name_0: + label: MME_FSB1 + hidden: false + immutable: false + type: string + description: volume name + default: MME_FSB1_1_3_GA.qcow2 + vlc_gtp_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 GTP + default: 107.243.47.209 + vlc_oam_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 OAM + default: 107.239.72.150 + vlc_gtp_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 GTP + default: 107.243.47.216 + vlc_name_6: + hidden: false + immutable: false + type: string + description: Name of vlc7 + default: zrdm3mmex59vlc007 + vlc_gtp_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 GTP + default: 107.243.47.217 + vlc_name_7: + hidden: false + immutable: false + type: string + description: Name of vlc8 + default: zrdm3mmex59vlc008 + security_group_sctp_a_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 3cd8a524-77ff-4980-ae2a-d19ba70e0511 + vlc_gtp_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 GTP + default: 107.243.47.218 + vlc_gtp_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 GTP + default: 107.243.47.219 + vlc_gtp_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 GTP + default: 107.243.47.220 + vlc_name_2: + hidden: false + immutable: false + type: string + description: Name of vlc3 + default: zrdm3mmex59vlc003 + vlc_gtp_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 GTP + default: 107.243.47.221 + vlc_name_3: + hidden: false + immutable: false + type: string + description: Name of vlc4 + default: zrdm3mmex59vlc004 + vlc_name_4: + hidden: false + immutable: false + type: string + description: Name of vlc5 + default: zrdm3mmex59vlc005 + vlc_name_5: + hidden: false + immutable: false + type: string + description: Name of vlc6 + default: zrdm3mmex59vlc006 + fsb_volume_id_1: + hidden: false + immutable: false + type: string + description: ID of Cinder Volume for FSB2 + default: 5bd0560c-bfd0-47dc-a84a-554e2698c925 + sctp-a-ipv6-ingress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc_name_0: + hidden: false + immutable: false + type: string + description: Name of vlc1 + default: zrdm3mmex59vlc001 + vlc_name_1: + hidden: false + immutable: false + type: string + description: Name of vlc2 + default: zrdm3mmex59vlc002 + vlc_oam_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on OAM + sctp-b-egress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + vlc_oam_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 OAM + default: 107.239.72.155 + vlc_oam_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 OAM + default: 107.239.72.156 + vlc6_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc6_Internal1 + default: 00:80:37:0E:06:12 + fsb_volume_id_0: + hidden: false + immutable: false + type: string + description: ID of Cinder Volume for FSB1 + default: 27baa6a0-b701-4795-bf5e-4f546b350b1f + sctp-b-egress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + gpb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb2_Internal2 + default: 00:80:37:0E:0A:22 + sctp-a-ipv6-egress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + sctp-b-ipv6-egress_src_start_port: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0 + Internal2_allow_transit: + hidden: false + immutable: false + type: string + description: Allow/disallow transit internal-2 network + default: true + fsb_volume_size: + label: volume size + hidden: false + immutable: false + type: float + description: volume size 320GB + default: 320 + constraints: + - in_range: + - 0 + - 340 + sctp-b-IPv6_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv6 + gtp_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN GTP + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_GTP_net_1 + ncb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb2_Internal1 + default: 00:80:37:0E:0F:12 + sctp-b-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + sctp-b-ingress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-b-egress_src_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + gpb7_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb7_Internal2 + default: 00:80:37:0E:0F:22 + sctp-a-ipv6-ingress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 starting port for destination + default: 0 + gtp_net_name: + hidden: false + immutable: false + type: string + description: Network Name GTP + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_GTP_net_1 + sctp-b-ipv6-ingress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + domain_name: + hidden: false + immutable: false + type: string + description: Unique name of vMME contrail domain + default: default-domain + vlc5_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc5_Internal1 + default: 00:80:37:0E:05:12 + sctp-a-egress_src_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + sctp-b-egress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + shc_enabled: + hidden: false + immutable: false + type: string + description: health check + default: true + sctp-b-ipv6-ingress-dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-b-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp_a_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN SCTPA + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPA_net_1 + security_group_gtp_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: e8ad3fe2-5f95-43e4-bbcc-da97b1c22588 + sctp-a-ipv6-ingress_src_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + fsb_name_1: + hidden: false + immutable: false + type: string + description: Name of fsb1 + default: zrdm3mmex59fsb002 + sctp-b-egress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb_name_0: + hidden: false + immutable: false + type: string + description: Name of fsb1 + default: zrdm3mmex59fsb001 + sctp_a_net_name: + hidden: false + immutable: false + type: string + description: Network Name SCTPA + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPA_net_1 + sctp-b-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + gpb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb1_Internal1 + default: 00:80:37:0E:09:22 + sctp-a-ingress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb1_Internal2 + default: 00:80:37:0E:0B:12 + vlc_st_service_mode: + hidden: false + immutable: false + type: string + description: service mode + default: in-network-nat + sctp-a-ipv6-egress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + sctp-a-egress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-b-egress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-a-ingress-src_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + sctp-a-ipv6-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: IPV6 start port + default: 0 + constraints: + - in_range: + - 0 + - 65535 + vf_module_id: + hidden: false + immutable: false + type: string + description: the vf_module_id for this instance. UUID provided by ECOMP + default: TWO + Internal1_net_cidr: + hidden: false + immutable: false + type: string + description: CIDR for internal-1 network + default: 169.253.0.0 + fsb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers fsb1 + default: nv.c8r32d1 + sctp_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: 132 + vnf_name: + hidden: false + immutable: false + type: string + description: the vnf_name for this instance. provided by ECOMP + default: zrdm3mmex59 + sctp-a-IPv6_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv6 + vlc_sctp_b_v6_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPB + default: fd00:200:200:5:0:0:0:29 + vlc6_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc6_Internal2 + default: 00:80:37:0E:06:12 + sctp-b-ingress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc7_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc7_Internal2 + default: 00:80:37:0E:07:12 + sctp-a-ipv6-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: IPV6 ending port for destination + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers vlc + default: nd.c16r64d1 + sctp-b-ipv6-egress_src_addresses: + hidden: false + immutable: false + type: string + description: IPV6 source + default: local + vlc_st_interface_type_int1: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other1 + availability_zone_0: + hidden: false + immutable: false + type: string + description: cluster for spawnning fsb instances + default: rdm3-kvm-az02 + service_instance_id_0: + hidden: false + immutable: false + type: string + description: UUID of service instance for vLCs + default: 77c67cc8-d15f-47bc-aeb1-8d65d09e917a + availability_zone_1: + hidden: false + immutable: false + type: string + description: cluster for spawnning ncb instances + default: rdm3-kvm-az02 + vlc_st_interface_type_int2: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other2 + sctp-a-ipv6-egress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 start port + default: 0 + sctp-a-ipv6-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: '0' + vlc_sctp_a_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPA + default: 107.243.47.144 + vlc_sctp_b_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on SCTPB + vlc1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal1 + default: 00:80:37:0E:01:12 + sctp-b-ipv6-egress_src_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-a-ipv6-egress_src_addresses: + hidden: false + immutable: false + type: string + description: IPV6 source + default: local + vlc_sctp_a_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPA + default: 107.243.47.157 + sctp-a-ingress-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: src subnet + default: '::' + vlc_sctp_a_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPA + default: 107.243.47.156 + vlc_sctp_a_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPA + default: 107.243.47.155 + sctp-a-ingress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc_sctp_a_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPA + default: 107.243.47.154 + vlc_sctp_a_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPA + default: 107.243.47.153 + vlc_sctp_a_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPA + default: 107.243.47.152 + vlc_sctp_a_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPA + default: 107.243.47.145 + gpb6_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb6_Internal2 + default: 00:80:37:0E:0E:22 + security_group_int2_id: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net security group + default: 1361f069-baf2-4b76-b321-7f68ba26c369 + Internal2_dhcp: + hidden: false + immutable: false + type: string + description: Whether DHCP/static IP addressing on internal-2 network + default: false + sctp-a-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + pxe_image_name: + hidden: false + immutable: false + type: string + description: Name of image to use for server ncb + default: MME_PXE-Boot_1_3_GA.qcow2 + vlc_st_interface_type_gtp: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other0 + ncb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb1_Internal1 + default: 00:80:37:0E:09:12 + vlc_gtp_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on GTP + int1_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for internal-1 + default: int1-sec-group + vmi_oam_preference_secondary: + hidden: false + immutable: false + type: float + description: Preference for secondary interface/port + default: 100 + Internal1_dhcp: + hidden: false + immutable: false + type: string + description: Whether DHCP/static IP addressing on internal-1 network + default: false + fsb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb2_Internal2 + default: 00:80:37:0E:0D:12 + Internal1_net_cidr_len: + hidden: false + immutable: false + type: string + description: CIDR length for internal-1 network + default: 17 + sctp-a-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + sctp-b-ingress-src_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + fsb_oam_ip_1: + hidden: false + immutable: false + type: string + description: IP address of OAM vNIC for FSB2 + default: 107.239.72.154 + fsb_oam_ip_0: + hidden: false + immutable: false + type: string + description: IP address of OAM vNIC for FSB1 + default: 107.239.72.153 + shc_timeout: + hidden: false + immutable: false + type: string + description: health check + default: 5 + vlc_st_version: + hidden: false + immutable: false + type: string + description: Indicates service version + default: 2 + sctp-a-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp-a-ingress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + sctp-b-egress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-a-ipv6-egress_src_start_port: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0 + instance_ip_family_v6: + hidden: false + immutable: false + type: string + description: Ipv6 instance type + default: v6 + sctp-b-ingress-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: src subnet + default: '::' + gpb8_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb8_Internal2 + default: 00:80:37:0E:10:22 + gpb4_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb4_Internal1 + default: 00:80:37:0E:0C:22 + sctp-a-ipv6-ingress-dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + Internal1_net_gateway: + hidden: false + immutable: false + type: string + description: gateway for internal-1 network + default: 169.253.0.3 + sctp-b-ipv6-egress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 start port + default: 0 + gpb_name_7: + hidden: false + immutable: false + type: string + description: Name of gpb8 + default: zrdm3mmex59gpb0016 + gpb_name_6: + hidden: false + immutable: false + type: string + description: Name of gpb7 + default: zrdm3mmex59gpb0015 + gpb_name_5: + hidden: false + immutable: false + type: string + description: Name of gpb6 + default: zrdm3mmex59gpb0014 + gpb_name_4: + hidden: false + immutable: false + type: string + description: Name of gpb5 + default: zrdm3mmex59gpb0013 + gpb_name_3: + hidden: false + immutable: false + type: string + description: Name of gpb4 + default: zrdm3mmex59gpb0012 + sctp-a-ipv6-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: IPV6 destination + default: local + gpb_name_2: + hidden: false + immutable: false + type: string + description: Name of gpb3 + default: zrdm3mmex59gpb0011 + shc_delay: + hidden: false + immutable: false + type: string + description: health check + default: 3 + gpb_name_1: + hidden: false + immutable: false + type: string + description: Name of gpb2 + default: zrdm3mmex59gpb0010 + sctp-b-ipv6-egress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc3_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc3_Internal2 + default: 00:80:37:0E:03:12 + gpb_name_0: + hidden: false + immutable: false + type: string + description: Name of gpb1 + default: zrdm3mmex59gpb009 + sctp-a-ipv6-egress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + gpb5_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb5_Internal1 + default: 00:80:37:0E:0D:22 + sctp-b-ipv6-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + shc_max_retries: + hidden: false + immutable: false + type: string + description: health check + default: 2 + fsb_volume_type: + label: volume type + hidden: false + immutable: false + type: string + description: volume type SolidFire + default: SF-Default-SSD + sctp-a-name: + hidden: false + immutable: false + type: string + description: name for the SecurityGroup + default: epc-sctp-a-ipv4v6-sec-group + vlc_sctp_b_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPB + default: 107.243.47.187 + vlc_sctp_b_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPB + default: 107.243.47.186 + vlc_sctp_b_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPB + default: 107.243.47.185 + vlc_sctp_b_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPB + default: 107.243.47.184 + sctp-b-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + vnf_id: + hidden: false + immutable: false + type: string + description: the vf_id for this instance. UUID provided by ECOMP + default: zrdm3mmex59 + vlc_sctp_b_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPB + default: 107.243.47.189 + vlc_sctp_b_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPB + default: 107.243.47.188 + vlc_sctp_b_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPB + default: 107.243.47.177 + gpb6_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb6_Internal1 + default: 00:80:37:0E:0E:22 + sctp-b-ipv6-egress_dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + vlc_sctp_b_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPB + default: 107.243.47.176 + vlc2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc2_Internal2 + default: 00:80:37:0E:02:12 + sctp-b-ingress-src_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + gpb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers gpb + default: nv.c20r64d1 + vlc_sctp_a_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on SCTPA + sctp-b-ipv6-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: IPV6 destination + default: local + sctp-b-ipv6-ingress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + sctp-b-ipv6-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + sctp-a-ingress-src_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + vlc1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal2 + default: 00:80:37:0E:01:12 + Internal1_rpf: + hidden: false + immutable: false + type: string + description: Reverse Path Forwarding Enabled/Disabled internal-1 network + default: disable + sctp-b-ingress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-b-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-ipv6-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + vlc_sctp_a_v6_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPA + default: fd00:200:200:4:0:0:0:29 + vlc_sctp_a_v6_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPA + default: fd00:200:200:4:0:0:0:28 + gpb7_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb7_Internal1 + default: 00:80:37:0E:0F:22 + vlc_sctp_a_v6_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPA + default: fd00:200:200:4:0:0:0:27 + vlc_sctp_a_v6_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPA + default: fd00:200:200:4:0:0:0:26 + vlc_sctp_a_v6_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPA + default: fd00:200:200:4:0:0:0:25 + vlc_sctp_a_v6_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPA + default: fd00:200:200:4:0:0:0:24 + sctp-a-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + vlc_sctp_a_v6_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPA + default: fd00:200:200:4:0:0:0:17 + vlc_sctp_a_v6_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPA + default: fd00:200:200:4:0:0:0:16 + node_templates: + abstract_gpb_1: + type: org.openecomp.resource.abstract.nodes.gpb_1 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_1 + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb2_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb2_Internal2_network: + - get_input: internal_net_id_1 + port_gpb2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_image_name: + get_input: pxe_image_name + port_gpb2_Internal1_replacement_policy: + - AUTO + port_gpb2_Internal1_network: + - get_input: internal_net_id_0 + port_gpb2_Internal2_replacement_policy: + - AUTO + port_gpb2_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb2_Internal1_mac_address: + get_input: gpb2_Internal1_mac + port_gpb2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb2_Internal2_mac_address: + get_input: gpb2_Internal1_mac + port_gpb2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb2_Internal2_security_groups: + - - get_input: security_group_int2_id + service_template_filter: + substitute_service_template: Nested_gpb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_2: + type: org.openecomp.resource.abstract.nodes.gpb_2 + directives: + - substitutable + properties: + port_gpb3_Internal1_replacement_policy: + - AUTO + compute_gpb_name: + - get_input: gpb_name_2 + port_gpb3_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb3_Internal2_replacement_policy: + - AUTO + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb3_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb3_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb3_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb3_Internal1_network: + - get_input: internal_net_id_0 + port_gpb3_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb3_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb3_Internal1_mac_address: + get_input: gpb3_Internal1_mac + port_gpb3_Internal2_mac_address: + get_input: gpb3_Internal1_mac + port_gpb3_Internal2_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_gpb_2ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb3_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb3_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_vlc: + type: org.openecomp.resource.abstract.nodes.vlc + directives: + - substitutable + properties: + port_template_VMInt_SCTP_A_vlc_virtual_network_refs: + - - get_input: sctp_a_net_fqdn + port_template_VMInt_INT1_vlc_security_group_refs: + - - get_input: security_group_int1_id + vm_flavor_name: + get_input: vlc_flavor_name + port_template_VMInt_INT2_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + vm_image_name: + get_input: pxe_image_name + port_template_VMInt_INT1_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_INT2_vlc_virtual_network_refs: + - - get_input: internal_net_id_1 + port_template_VMInt_OAM_vlc_virtual_network_refs: + - - get_input: oam_net_fqdn + port_template_VMInt_OAM_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_INT2_vlc_virtual_machine_interface_mac_addresses: + - - get_input: vlc4_Internal2_mac + - - get_input: vlc3_Internal2_mac + - - get_input: vlc2_Internal2_mac + - - get_input: vlc1_Internal2_mac + - - get_input: vlc8_Internal2_mac + - - get_input: vlc7_Internal2_mac + - - get_input: vlc6_Internal2_mac + - - get_input: vlc5_Internal2_mac + port_template_VMInt_SCTP_B_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_GTP_vlc_security_group_refs: + - - get_input: security_group_gtp_id + compute_vlc_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_template_VMInt_OAM_vlc_security_group_refs: + - - get_input: security_group_oam_id + compute_vlc_contrail_service_instance_ind: + - true + - true + - true + - true + - true + - true + - true + - true + port_template_VMInt_GTP_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_SCTP_B_vlc_virtual_network_refs: + - - get_input: sctp_b_net_fqdn + port_template_VMInt_INT2_vlc_security_group_refs: + - - get_input: security_group_int2_id + port_template_VMInt_SCTP_B_vlc_security_group_refs: + - - get_input: security_group_sctp_b_id + port_template_VMInt_INT1_vlc_virtual_network_refs: + - - get_input: internal_net_id_0 + port_template_VMInt_SCTP_A_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + compute_vlc_scheduler_hints: + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + compute_vlc_name: + - get_input: vlc_name_3 + - get_input: vlc_name_2 + - get_input: vlc_name_1 + - get_input: vlc_name_0 + - get_input: vlc_name_7 + - get_input: vlc_name_6 + - get_input: vlc_name_5 + - get_input: vlc_name_4 + port_template_VMInt_SCTP_A_vlc_security_group_refs: + - - get_input: security_group_sctp_a_id + compute_vlc_availability_zone: + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + port_template_VMInt_INT1_vlc_virtual_machine_interface_mac_addresses: + - - get_input: vlc4_Internal1_mac + - - get_input: vlc3_Internal1_mac + - - get_input: vlc2_Internal1_mac + - - get_input: vlc1_Internal1_mac + - - get_input: vlc8_Internal1_mac + - - get_input: vlc7_Internal1_mac + - - get_input: vlc6_Internal1_mac + - - get_input: vlc5_Internal1_mac + port_template_VMInt_GTP_vlc_virtual_network_refs: + - - get_input: gtp_net_fqdn + service_template_filter: + substitute_service_template: Nested_vlcServiceTemplate.yaml + count: 8 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: vlc + nfc_naming_code: vlc + requirements: + - link_vlc_template_VMInt_INT2_vlc: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + - link_vlc_template_VMInt_INT1_vlc: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_7: + type: org.openecomp.resource.abstract.nodes.gpb_7 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_7 + port_gpb8_Internal1_mac_address: + get_input: gpb8_Internal1_mac + port_gpb8_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb8_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb8_Internal1_replacement_policy: + - AUTO + port_gpb8_Internal2_replacement_policy: + - AUTO + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb8_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb8_Internal1_network: + - get_input: internal_net_id_0 + port_gpb8_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb8_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb8_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb8_Internal2_network: + - get_input: internal_net_id_1 + port_gpb8_Internal2_mac_address: + get_input: gpb8_Internal1_mac + service_template_filter: + substitute_service_template: Nested_gpb_7ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb8_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb8_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_5: + type: org.openecomp.resource.abstract.nodes.gpb_5 + directives: + - substitutable + properties: + port_gpb6_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_name: + - get_input: gpb_name_5 + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb6_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_image_name: + get_input: pxe_image_name + port_gpb6_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb6_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb6_Internal1_network: + - get_input: internal_net_id_0 + port_gpb6_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb6_Internal2_mac_address: + get_input: gpb6_Internal1_mac + port_gpb6_Internal1_mac_address: + get_input: gpb6_Internal1_mac + port_gpb6_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb6_Internal2_replacement_policy: + - AUTO + port_gpb6_Internal1_replacement_policy: + - AUTO + port_gpb6_Internal2_security_groups: + - - get_input: security_group_int2_id + service_template_filter: + substitute_service_template: Nested_gpb_5ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb6_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb6_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_6: + type: org.openecomp.resource.abstract.nodes.gpb_6 + directives: + - substitutable + properties: + port_gpb7_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb7_Internal1_network: + - get_input: internal_net_id_0 + compute_gpb_name: + - get_input: gpb_name_6 + port_gpb7_Internal2_network: + - get_input: internal_net_id_1 + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb7_Internal1_replacement_policy: + - AUTO + port_gpb7_Internal2_replacement_policy: + - AUTO + port_gpb7_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb7_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb7_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb7_Internal2_mac_address: + get_input: gpb7_Internal1_mac + port_gpb7_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb7_Internal1_mac_address: + get_input: gpb7_Internal1_mac + port_gpb7_Internal2_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_gpb_6ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb7_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb7_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_3: + type: org.openecomp.resource.abstract.nodes.gpb_3 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_3 + port_gpb4_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb4_Internal1_mac_address: + get_input: gpb4_Internal1_mac + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb4_Internal2_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb4_Internal2_mac_address: + get_input: gpb4_Internal1_mac + vm_image_name: + get_input: pxe_image_name + port_gpb4_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb4_Internal2_replacement_policy: + - AUTO + port_gpb4_Internal1_replacement_policy: + - AUTO + port_gpb4_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb4_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb4_Internal2_network: + - get_input: internal_net_id_1 + port_gpb4_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb4_Internal1_network: + - get_input: internal_net_id_0 + service_template_filter: + substitute_service_template: Nested_gpb_3ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb4_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb4_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_4: + type: org.openecomp.resource.abstract.nodes.gpb_4 + directives: + - substitutable + properties: + port_gpb5_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb5_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_name: + - get_input: gpb_name_4 + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb5_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb5_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb5_Internal1_network: + - get_input: internal_net_id_0 + port_gpb5_Internal2_mac_address: + get_input: gpb5_Internal1_mac + port_gpb5_Internal1_mac_address: + get_input: gpb5_Internal1_mac + port_gpb5_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb5_Internal2_replacement_policy: + - AUTO + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb5_Internal1_replacement_policy: + - AUTO + port_gpb5_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb5_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + service_template_filter: + substitute_service_template: Nested_gpb_4ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb5_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb5_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb: + type: org.openecomp.resource.abstract.nodes.gpb + directives: + - substitutable + properties: + port_gpb1_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_name: + - get_input: gpb_name_0 + port_gpb1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb1_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb1_Internal1_mac_address: + get_input: gpb1_Internal1_mac + port_gpb1_Internal2_mac_address: + get_input: gpb1_Internal1_mac + port_gpb1_Internal2_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb1_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb1_Internal1_replacement_policy: + - AUTO + port_gpb1_Internal2_replacement_policy: + - AUTO + port_gpb1_Internal2_network: + - get_input: internal_net_id_1 + port_gpb1_Internal1_network: + - get_input: internal_net_id_0 + service_template_filter: + substitute_service_template: Nested_gpbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + Internal1_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_enable_dhcp: + get_input: Internal1_dhcp + network_ipam_refs_data_ipam_subnets_default_gateway: + get_input: Internal1_net_gateway + network_ipam_refs_data_ipam_subnets_subnet: + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: + get_input: Internal1_net_cidr_len + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: + get_input: Internal1_net_cidr + network_name: + str_replace: + template: $VNF_NAME_int_net_1 + params: + $VNF_NAME: + get_input: vnf_name + network_ipam_refs: + - UNSUPPORTED_RESOURCE_template_NetworkIpam_Internal1 + abstract_fsb: + type: org.openecomp.resource.abstract.nodes.fsb + directives: + - substitutable + properties: + port_FSB1_Internal1_mac_address: + get_input: fsb1_Internal1_mac + port_FSB_OAM_network_role_tag: + - oam + port_FSB1_Internal2_network: + - Internal2_net + port_FSB1_Internal1_network: + - Internal1_net + vm_flavor_name: + get_input: fsb_flavor_name + port_FSB1_Internal2_mac_address: + get_input: fsb1_Internal1_mac + port_FSB_OAM_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: true + floating_ip_count_required: + is_required: false + compute_fsb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_FSB1_Internal1_security_groups: + - - int1_security_group + port_FSB1_Internal2_replacement_policy: + - AUTO + compute_fsb_scheduler_hints: + - group: VM_Affinity_group + port_FSB1_Internal1_replacement_policy: + - AUTO + compute_fsb_name: + - get_input: fsb_name_0 + port_FSB1_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_FSB1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_network: + - get_input: oam_net_name + port_FSB_OAM_security_groups: + - - oam_security_group + port_FSB_OAM_mac_requirements: + mac_count_required: + is_required: false + port_FSB_OAM_replacement_policy: + - AUTO + compute_fsb_availability_zone: + - get_input: availability_zone_0 + port_FSB1_Internal2_security_groups: + - - int2_security_group + port_FSB1_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_FSB1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_fixed_ips: + - ip_address: + get_input: fsb_oam_ip_0 + service_template_filter: + substitute_service_template: Nested_fsbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: fsb + nfc_naming_code: fsb + requirements: + - link_fsb_FSB1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_fsb_FSB1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + gtp_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: gtp_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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 + abstract_ncb_1: + type: org.openecomp.resource.abstract.nodes.ncb_1 + directives: + - substitutable + properties: + port_NCB2_Internal2_security_groups: + - - int2_security_group + port_NCB2_Internal1_replacement_policy: + - AUTO + port_NCB2_Internal2_replacement_policy: + - AUTO + vm_flavor_name: + get_input: ncb_flavor_name + port_NCB2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_NCB2_Internal1_mac_requirements: + mac_count_required: + is_required: true + vm_image_name: + get_input: pxe_image_name + compute_ncb_scheduler_hints: + - group: VM_Affinity_group + compute_ncb_availability_zone: + - get_input: availability_zone_1 + port_NCB2_Internal1_network: + - Internal1_net + port_NCB2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_NCB2_Internal1_security_groups: + - - int1_security_group + port_NCB2_Internal2_network: + - Internal2_net + port_NCB2_Internal1_mac_address: + get_input: ncb2_Internal1_mac + port_NCB2_Internal2_mac_address: + get_input: ncb2_Internal1_mac + compute_ncb_name: + - get_input: ncb_name_1 + compute_ncb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_NCB2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + service_template_filter: + substitute_service_template: Nested_ncb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: ncb + nfc_naming_code: ncb + requirements: + - link_ncb_NCB2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_ncb_NCB2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_ncb: + type: org.openecomp.resource.abstract.nodes.ncb + directives: + - substitutable + properties: + vm_flavor_name: + get_input: ncb_flavor_name + port_NCB1_Internal2_mac_requirements: + mac_count_required: + is_required: true + vm_image_name: + get_input: pxe_image_name + port_NCB1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + compute_ncb_scheduler_hints: + - group: VM_Affinity_group + port_NCB1_Internal1_security_groups: + - - int1_security_group + compute_ncb_availability_zone: + - get_input: availability_zone_0 + port_NCB1_Internal2_mac_address: + get_input: ncb1_Internal1_mac + port_NCB1_Internal1_mac_address: + get_input: ncb1_Internal1_mac + port_NCB1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_NCB1_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_NCB1_Internal2_replacement_policy: + - AUTO + port_NCB1_Internal1_network: + - Internal1_net + port_NCB1_Internal2_security_groups: + - - int2_security_group + port_NCB1_Internal1_replacement_policy: + - AUTO + compute_ncb_name: + - get_input: ncb_name_0 + compute_ncb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_NCB1_Internal2_network: + - Internal2_net + service_template_filter: + substitute_service_template: Nested_ncbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: ncb + nfc_naming_code: ncb + requirements: + - link_ncb_NCB1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_ncb_NCB1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + int1_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: int1_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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_fsb_FSB1_Internal1 + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB2_Internal1 + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB1_Internal1 + node: abstract_ncb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB2_Internal1 + node: abstract_ncb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb1_Internal1 + node: abstract_gpb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb2_Internal1 + node: abstract_gpb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb3_Internal1 + node: abstract_gpb_2 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb4_Internal1 + node: abstract_gpb_3 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb5_Internal1 + node: abstract_gpb_4 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb6_Internal1 + node: abstract_gpb_5 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb7_Internal1 + node: abstract_gpb_6 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb8_Internal1 + node: abstract_gpb_7 + relationship: org.openecomp.relationships.AttachesTo + fsb_volume_0: + type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume + properties: + image: + get_input: fsb_volume_image_name_0 + volume_type: + get_input: fsb_volume_type + size: '(get_input : fsb_volume_size) * 1024' + name: + list_join: + - _ + - - get_input: OS::stack_name + - FSB1_Vol_1 + fsb_volume_1: + type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume + properties: + image: + get_input: fsb_volume_image_name_1 + volume_type: + get_input: fsb_volume_type + size: '(get_input : fsb_volume_size) * 1024' + name: + list_join: + - _ + - - get_input: OS::stack_name + - FSB2_Vol_1 + Internal2_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_enable_dhcp: + get_input: Internal2_dhcp + network_ipam_refs_data_ipam_subnets_default_gateway: + get_input: Internal2_net_gateway + network_ipam_refs_data_ipam_subnets_subnet: + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: + get_input: Internal2_net_cidr_len + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: + get_input: Internal2_net_cidr + network_name: + str_replace: + template: $VNF_NAME_int_net_2 + params: + $VNF_NAME: + get_input: vnf_name + network_ipam_refs: + - UNSUPPORTED_RESOURCE_template_NetworkIpam_Internal2 + int2_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: int2_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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: 132 + 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: 132 + 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: 132 + 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: 132 + 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_fsb_FSB1_Internal2 + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB2_Internal2 + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB1_Internal2 + node: abstract_ncb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB2_Internal2 + node: abstract_ncb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb1_Internal2 + node: abstract_gpb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb2_Internal2 + node: abstract_gpb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb3_Internal2 + node: abstract_gpb_2 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb4_Internal2 + node: abstract_gpb_3 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb5_Internal2 + node: abstract_gpb_4 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb6_Internal2 + node: abstract_gpb_5 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb7_Internal2 + node: abstract_gpb_6 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb8_Internal2 + node: abstract_gpb_7 + relationship: org.openecomp.relationships.AttachesTo + abstract_fsb_1: + type: org.openecomp.resource.abstract.nodes.fsb_1 + directives: + - substitutable + properties: + port_FSB_OAM_network_role_tag: + - oam + vm_flavor_name: + get_input: fsb_flavor_name + port_FSB_OAM_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: true + floating_ip_count_required: + is_required: false + port_FSB2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB2_Internal2_security_groups: + - - int2_security_group + compute_fsb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_FSB2_Internal1_mac_address: + get_input: fsb2_Internal1_mac + compute_fsb_scheduler_hints: + - group: VM_Affinity_group + compute_fsb_name: + - get_input: fsb_name_1 + port_FSB2_Internal1_security_groups: + - - int1_security_group + port_FSB_OAM_network: + - get_input: oam_net_name + port_FSB_OAM_security_groups: + - - oam_security_group + port_FSB2_Internal1_network: + - Internal1_net + port_FSB2_Internal2_mac_address: + get_input: fsb2_Internal1_mac + port_FSB2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_FSB_OAM_mac_requirements: + mac_count_required: + is_required: false + port_FSB2_Internal2_replacement_policy: + - AUTO + port_FSB2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_replacement_policy: + - AUTO + port_FSB2_Internal2_network: + - Internal2_net + port_FSB2_Internal1_replacement_policy: + - AUTO + compute_fsb_availability_zone: + - get_input: availability_zone_1 + port_FSB_OAM_fixed_ips: + - ip_address: + get_input: fsb_oam_ip_1 + port_FSB2_Internal1_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_fsb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: fsb + nfc_naming_code: fsb + requirements: + - link_fsb_FSB2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_fsb_FSB2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + oam_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: oam_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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_fsb_FSB_OAM + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB_OAM + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + groups: + vmme_gpb3_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb3.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + base_vmme_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/base_vmme.yml + description: | + Base HOT template to create vmme 2 fsb 2 ncb + members: + - int2_security_group + - oam_security_group + - gtp_security_group + - Internal2_net + - int1_security_group + - Internal1_net + - abstract_ncb + - abstract_ncb_1 + - abstract_fsb + - abstract_fsb_1 + base_vmme_volume_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/base_vmme_volume.yml + description: HOT template for vMME Cinder Volumes + members: + - fsb_volume_0 + - fsb_volume_1 + vmme_gpb1_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb1.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_gpb4_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb4.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_gpb2_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb2.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + VM_Affinity_group: + type: tosca.groups.Root + members: + - abstract_ncb + - abstract_ncb_1 + - abstract_vlc + - abstract_fsb + - abstract_fsb_1 + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_vlc_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_vlc.yml + description: | + Module HOT template to create vmme 8 vlcs + members: + - abstract_vlc + outputs: + oam_management_v4_address: + description: ID of OAM VIP to be provisioned in A&AI + value: + get_input: vip_oam_management_v4_ip + fsb_volume_id_1: + description: ID of Cinder Volume for FSB2 + value: fsb_volume_1 + security_group_sctp_b_id: + description: ID of sctpb_security_group + value: UNSUPPORTED_RESOURCE_sctpb_security_group + service_instance_id_0: + description: ID of Service Instance used for vLCs + value: UNSUPPORTED_RESOURCE_template_ServiceInstance_VLC + security_group_sctp_a_id: + description: ID of sctpa_security_group + value: UNSUPPORTED_RESOURCE_sctpa_security_group + fsb_volume_id_0: + description: ID of Cinder Volume for FSB1 + value: fsb_volume_0 + policies: + VM_Affinity_policy: + type: org.openecomp.policies.placement.Antilocate + properties: + container_type: host + targets: + - VM_Affinity_group diff --git a/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeReuirementWithDifferentCapability.yaml b/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeReuirementWithDifferentCapability.yaml new file mode 100644 index 0000000000..11383eddbc --- /dev/null +++ b/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeReuirementWithDifferentCapability.yaml @@ -0,0 +1,3585 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: Main +imports: +- openecomp_heat_index: + file: openecomp-heat/_index.yml +- GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml +topology_template: + inputs: + vlc4_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc4_Internal2 + default: 00:80:37:0E:04:12 + sctp-a-egress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + sctp-b-ipv6-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: IPV6 start port + default: 0 + constraints: + - in_range: + - 0 + - 65535 + ncb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb1_Internal2 + default: 00:80:37:0E:09:12 + sctp-a-ipv6-ingress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + gpb8_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb8_Internal1 + default: 00:80:37:0E:10:22 + sctp-a-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + sctp-b-display_name: + hidden: false + immutable: false + type: string + description: display_name for the SecurityGroup + default: epc-sctp-b-ipv4v6-sec-group + sctp-a-ingress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-a-egress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + ncb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers ncb + default: nv.c8r32d1 + vlc3_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc3_Internal1 + default: 00:80:37:0E:03:12 + Internal2_net_cidr: + hidden: false + immutable: false + type: string + description: CIDR for internal-2 network + default: 169.255.0.0 + sctp-a-egress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-egress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + gpb4_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb4_Internal2 + default: 00:80:37:0E:0C:22 + sctp-b-ipv6-egress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + vlc8_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc8_Internal1 + default: 00:80:37:0E:08:12 + sctp-b-ipv6-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: IPV6 ending port for destination + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + fsb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb2_Internal1 + default: 00:80:37:0E:0D:12 + sctp-b-name: + hidden: false + immutable: false + type: string + description: name for the SecurityGroup + default: epc-sctp-b-ipv4v6-sec-group + sctp-b-ipv6-egress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + internal_net_id_1: + hidden: false + immutable: false + type: string + description: UUID of Internal2_net + default: e3397c69-a942-49aa-81cb-fb91ff34abc8 + sctp-a-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + internal_net_id_0: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net + default: 871de971-22ac-47b6-befb-50e7d4cb67ea + sctp_b_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN SCTPB + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPB_net_1 + sctp-a-ipv6-ingress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + sctp-b-ipv6-ingress_src_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix length + default: '0' + ncb_name_1: + hidden: false + immutable: false + type: string + description: Name of ncb2 + default: zrdm3mmex59ncb002 + ncb_name_0: + hidden: false + immutable: false + type: string + description: Name of ncb1 + default: zrdm3mmex59ncb001 + vlc_st_virtualization_type: + hidden: false + immutable: false + type: string + description: Indicates virtualization type + default: virtual-machine + vlc2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc2_Internal1 + default: 00:80:37:0E:02:12 + sctp-b-ingress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-display_name: + hidden: false + immutable: false + type: string + description: display_name for the SecurityGroup + default: epc-sctp-a-ipv4v6-sec-group + sctp-b-ingress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + int2_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for internal-2 + default: int2-sec-group + gpb5_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb5_Internal2 + default: 00:80:37:0E:0D:22 + sctp-a-egress-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: dst subnet + default: '::' + OS::stack_name: + type: string + required: false + sctp-b-egress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + Internal2_shared: + hidden: false + immutable: false + type: string + description: Whether Shared or private internal-2 network + default: false + sctp-a-ipv6-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + Internal2_rpf: + hidden: false + immutable: false + type: string + description: Reverse Path Forwarding Enabled/Disabled internal-2 network + default: disable + vlc5_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc5_Internal2 + default: 00:80:37:0E:05:12 + sctp-a-ipv6-egress_src_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + Internal1_forwarding_mode: + hidden: false + immutable: false + type: string + description: L2 or L3 forwarding mode for internal-1 network + default: l2 + gpb3_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb3_Internal1 + default: 00:80:37:0E:0B:22 + vip_oam_management_v4_ip: + hidden: false + immutable: false + type: string + description: IP address of OAM service IP address to be provisioned in A&AI + default: 107.239.72.176 + vmi_oam_preference_primary: + hidden: false + immutable: false + type: float + description: Preference for primary interface/port + default: 200 + sctp-b-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp-a-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + security_group_sctp_b_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 92a4ae54-1733-4d03-b488-f178bb9f7b82 + Internal2_forwarding_mode: + hidden: false + immutable: false + type: string + description: L2 or L3 forwarding mode for internal-2 network + default: l2 + sctp-a-ipv6-egress_dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-b-egress-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: dst subnet + default: '::' + sctp-b-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + security_group_oam_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 4ae4aa74-3e8e-4f2b-8b5f-a8bd262da96b + gpb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb2_Internal1 + default: 00:80:37:0E:0A:22 + security_group_int1_id: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net security group + default: 94c62578-835d-4801-9372-70a2cfb22683 + sctp-a-egress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + oam_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN OAM + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_OAM_net_1 + ncb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb2_Internal2 + default: 00:80:37:0E:0F:12 + vlc_st_interface_type_sctp_a: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: left + gpb3_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb3_Internal2 + default: 00:80:37:0E:0B:22 + vlc_st_interface_type_sctp_b: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: right + gpb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb1_Internal2 + default: 00:80:37:0E:09:22 + oam_net_name: + hidden: false + immutable: false + type: string + description: Network Name OAM + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_OAM_net_1 + sctp-b-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb1_Internal1 + default: 00:80:37:0E:0B:12 + sctp-b-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + vlc_st_interface_type_oam: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: management + shc_monitor_type: + hidden: false + immutable: false + type: string + description: health check + default: PING + oam_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for OAM + default: oam-sec-group + Internal2_net_gateway: + hidden: false + immutable: false + type: string + description: gateway for internal-2 network + default: 169.255.0.3 + evac_policy: + hidden: false + immutable: false + type: string + description: CMHA Policy + default: Evacuate + server_group_id_0: + hidden: false + immutable: false + type: string + description: ID of Anti-Affinity Policy-based Server Group + default: ec99a73d-38f8-4280-8103-ba8ee584629f + vlc8_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc8_Internal2 + default: 00:80:37:0E:08:12 + sctp-b-ipv6-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + gtp_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for GTP + default: gtp-sec-group + vlc_sctp_b_v6_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPB + default: fd00:200:200:5:0:0:0:24 + vlc_sctp_b_v6_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPB + default: fd00:200:200:5:0:0:0:17 + sctp-a-ipv6-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + vlc_sctp_b_v6_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPB + default: fd00:200:200:5:0:0:0:16 + vlc4_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc4_Internal1 + default: 00:80:37:0E:04:12 + vlc_sctp_b_v6_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPB + default: fd00:200:200:5:0:0:0:28 + vlc_sctp_b_v6_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPB + default: fd00:200:200:5:0:0:0:27 + vlc_sctp_b_v6_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPB + default: fd00:200:200:5:0:0:0:26 + vlc_sctp_b_v6_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPB + default: fd00:200:200:5:0:0:0:25 + sctp_b_net_name: + hidden: false + immutable: false + type: string + description: Network Name SCTPB + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPB_net_1 + sctp-b-ipv6-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: '0' + sctp-a-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + Internal1_shared: + hidden: false + immutable: false + type: string + description: Whether Shared or private internal-1 network + default: false + shc_url_path: + hidden: false + immutable: false + type: string + description: health check + default: local-ip + Internal2_net_cidr_len: + hidden: false + immutable: false + type: string + description: CIDR length for internal-2 network + default: 17 + sctp-a-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-b-ipv6-ingress_src_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + sctp-a-egress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-ingress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-b-ipv6-ingress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc_st_service_type: + hidden: false + immutable: false + type: string + description: service type + default: firewall + sctp-b-ipv6-ingress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 starting port for destination + default: 0 + vlc_st_availability_zone: + hidden: false + immutable: false + type: string + description: Indicates availability zone is enabled + default: true + vlc7_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc7_Internal1 + default: 00:80:37:0E:07:12 + fsb_volume_image_name_1: + label: MME_FSB2 + hidden: false + immutable: false + type: string + description: volume name + default: MME_FSB2_1_3_GA.qcow2 + vlc_oam_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 OAM + default: 107.239.72.151 + sctp-a-ipv6-ingress_src_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix length + default: '0' + vlc_oam_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 OAM + default: 107.239.72.152 + Internal1_allow_transit: + hidden: false + immutable: false + type: string + description: Allow/disallow transit internal-1 network + default: true + vlc_oam_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 OAM + default: 107.239.72.157 + vlc_oam_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 OAM + default: 107.239.72.158 + vlc_gtp_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 GTP + default: 107.243.47.208 + vlc_oam_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 OAM + default: 107.239.72.149 + fsb_volume_image_name_0: + label: MME_FSB1 + hidden: false + immutable: false + type: string + description: volume name + default: MME_FSB1_1_3_GA.qcow2 + vlc_gtp_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 GTP + default: 107.243.47.209 + vlc_oam_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 OAM + default: 107.239.72.150 + vlc_gtp_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 GTP + default: 107.243.47.216 + vlc_name_6: + hidden: false + immutable: false + type: string + description: Name of vlc7 + default: zrdm3mmex59vlc007 + vlc_gtp_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 GTP + default: 107.243.47.217 + vlc_name_7: + hidden: false + immutable: false + type: string + description: Name of vlc8 + default: zrdm3mmex59vlc008 + security_group_sctp_a_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 3cd8a524-77ff-4980-ae2a-d19ba70e0511 + vlc_gtp_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 GTP + default: 107.243.47.218 + vlc_gtp_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 GTP + default: 107.243.47.219 + vlc_gtp_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 GTP + default: 107.243.47.220 + vlc_name_2: + hidden: false + immutable: false + type: string + description: Name of vlc3 + default: zrdm3mmex59vlc003 + vlc_gtp_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 GTP + default: 107.243.47.221 + vlc_name_3: + hidden: false + immutable: false + type: string + description: Name of vlc4 + default: zrdm3mmex59vlc004 + vlc_name_4: + hidden: false + immutable: false + type: string + description: Name of vlc5 + default: zrdm3mmex59vlc005 + vlc_name_5: + hidden: false + immutable: false + type: string + description: Name of vlc6 + default: zrdm3mmex59vlc006 + fsb_volume_id_1: + hidden: false + immutable: false + type: string + description: ID of Cinder Volume for FSB2 + default: 5bd0560c-bfd0-47dc-a84a-554e2698c925 + sctp-a-ipv6-ingress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc_name_0: + hidden: false + immutable: false + type: string + description: Name of vlc1 + default: zrdm3mmex59vlc001 + vlc_name_1: + hidden: false + immutable: false + type: string + description: Name of vlc2 + default: zrdm3mmex59vlc002 + vlc_oam_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on OAM + sctp-b-egress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + vlc_oam_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 OAM + default: 107.239.72.155 + vlc_oam_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 OAM + default: 107.239.72.156 + vlc6_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc6_Internal1 + default: 00:80:37:0E:06:12 + fsb_volume_id_0: + hidden: false + immutable: false + type: string + description: ID of Cinder Volume for FSB1 + default: 27baa6a0-b701-4795-bf5e-4f546b350b1f + sctp-b-egress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + gpb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb2_Internal2 + default: 00:80:37:0E:0A:22 + sctp-a-ipv6-egress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + sctp-b-ipv6-egress_src_start_port: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0 + Internal2_allow_transit: + hidden: false + immutable: false + type: string + description: Allow/disallow transit internal-2 network + default: true + fsb_volume_size: + label: volume size + hidden: false + immutable: false + type: float + description: volume size 320GB + default: 320 + constraints: + - in_range: + - 0 + - 340 + sctp-b-IPv6_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv6 + gtp_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN GTP + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_GTP_net_1 + ncb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb2_Internal1 + default: 00:80:37:0E:0F:12 + sctp-b-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + sctp-b-ingress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-b-egress_src_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + gpb7_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb7_Internal2 + default: 00:80:37:0E:0F:22 + sctp-a-ipv6-ingress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 starting port for destination + default: 0 + gtp_net_name: + hidden: false + immutable: false + type: string + description: Network Name GTP + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_GTP_net_1 + sctp-b-ipv6-ingress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + domain_name: + hidden: false + immutable: false + type: string + description: Unique name of vMME contrail domain + default: default-domain + vlc5_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc5_Internal1 + default: 00:80:37:0E:05:12 + sctp-a-egress_src_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + sctp-b-egress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + shc_enabled: + hidden: false + immutable: false + type: string + description: health check + default: true + sctp-b-ipv6-ingress-dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-b-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp_a_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN SCTPA + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPA_net_1 + security_group_gtp_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: e8ad3fe2-5f95-43e4-bbcc-da97b1c22588 + sctp-a-ipv6-ingress_src_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + fsb_name_1: + hidden: false + immutable: false + type: string + description: Name of fsb1 + default: zrdm3mmex59fsb002 + sctp-b-egress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb_name_0: + hidden: false + immutable: false + type: string + description: Name of fsb1 + default: zrdm3mmex59fsb001 + sctp_a_net_name: + hidden: false + immutable: false + type: string + description: Network Name SCTPA + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPA_net_1 + sctp-b-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + gpb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb1_Internal1 + default: 00:80:37:0E:09:22 + sctp-a-ingress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb1_Internal2 + default: 00:80:37:0E:0B:12 + vlc_st_service_mode: + hidden: false + immutable: false + type: string + description: service mode + default: in-network-nat + sctp-a-ipv6-egress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + sctp-a-egress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-b-egress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-a-ingress-src_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + sctp-a-ipv6-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: IPV6 start port + default: 0 + constraints: + - in_range: + - 0 + - 65535 + vf_module_id: + hidden: false + immutable: false + type: string + description: the vf_module_id for this instance. UUID provided by ECOMP + default: TWO + Internal1_net_cidr: + hidden: false + immutable: false + type: string + description: CIDR for internal-1 network + default: 169.253.0.0 + fsb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers fsb1 + default: nv.c8r32d1 + sctp_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: 132 + vnf_name: + hidden: false + immutable: false + type: string + description: the vnf_name for this instance. provided by ECOMP + default: zrdm3mmex59 + sctp-a-IPv6_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv6 + vlc_sctp_b_v6_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPB + default: fd00:200:200:5:0:0:0:29 + vlc6_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc6_Internal2 + default: 00:80:37:0E:06:12 + sctp-b-ingress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc7_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc7_Internal2 + default: 00:80:37:0E:07:12 + sctp-a-ipv6-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: IPV6 ending port for destination + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers vlc + default: nd.c16r64d1 + sctp-b-ipv6-egress_src_addresses: + hidden: false + immutable: false + type: string + description: IPV6 source + default: local + vlc_st_interface_type_int1: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other1 + availability_zone_0: + hidden: false + immutable: false + type: string + description: cluster for spawnning fsb instances + default: rdm3-kvm-az02 + service_instance_id_0: + hidden: false + immutable: false + type: string + description: UUID of service instance for vLCs + default: 77c67cc8-d15f-47bc-aeb1-8d65d09e917a + availability_zone_1: + hidden: false + immutable: false + type: string + description: cluster for spawnning ncb instances + default: rdm3-kvm-az02 + vlc_st_interface_type_int2: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other2 + sctp-a-ipv6-egress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 start port + default: 0 + sctp-a-ipv6-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: '0' + vlc_sctp_a_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPA + default: 107.243.47.144 + vlc_sctp_b_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on SCTPB + vlc1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal1 + default: 00:80:37:0E:01:12 + sctp-b-ipv6-egress_src_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-a-ipv6-egress_src_addresses: + hidden: false + immutable: false + type: string + description: IPV6 source + default: local + vlc_sctp_a_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPA + default: 107.243.47.157 + sctp-a-ingress-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: src subnet + default: '::' + vlc_sctp_a_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPA + default: 107.243.47.156 + vlc_sctp_a_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPA + default: 107.243.47.155 + sctp-a-ingress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc_sctp_a_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPA + default: 107.243.47.154 + vlc_sctp_a_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPA + default: 107.243.47.153 + vlc_sctp_a_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPA + default: 107.243.47.152 + vlc_sctp_a_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPA + default: 107.243.47.145 + gpb6_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb6_Internal2 + default: 00:80:37:0E:0E:22 + security_group_int2_id: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net security group + default: 1361f069-baf2-4b76-b321-7f68ba26c369 + Internal2_dhcp: + hidden: false + immutable: false + type: string + description: Whether DHCP/static IP addressing on internal-2 network + default: false + sctp-a-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + pxe_image_name: + hidden: false + immutable: false + type: string + description: Name of image to use for server ncb + default: MME_PXE-Boot_1_3_GA.qcow2 + vlc_st_interface_type_gtp: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other0 + ncb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb1_Internal1 + default: 00:80:37:0E:09:12 + vlc_gtp_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on GTP + int1_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for internal-1 + default: int1-sec-group + vmi_oam_preference_secondary: + hidden: false + immutable: false + type: float + description: Preference for secondary interface/port + default: 100 + Internal1_dhcp: + hidden: false + immutable: false + type: string + description: Whether DHCP/static IP addressing on internal-1 network + default: false + fsb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb2_Internal2 + default: 00:80:37:0E:0D:12 + Internal1_net_cidr_len: + hidden: false + immutable: false + type: string + description: CIDR length for internal-1 network + default: 17 + sctp-a-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + sctp-b-ingress-src_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + fsb_oam_ip_1: + hidden: false + immutable: false + type: string + description: IP address of OAM vNIC for FSB2 + default: 107.239.72.154 + fsb_oam_ip_0: + hidden: false + immutable: false + type: string + description: IP address of OAM vNIC for FSB1 + default: 107.239.72.153 + shc_timeout: + hidden: false + immutable: false + type: string + description: health check + default: 5 + vlc_st_version: + hidden: false + immutable: false + type: string + description: Indicates service version + default: 2 + sctp-a-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp-a-ingress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + sctp-b-egress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-a-ipv6-egress_src_start_port: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0 + instance_ip_family_v6: + hidden: false + immutable: false + type: string + description: Ipv6 instance type + default: v6 + sctp-b-ingress-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: src subnet + default: '::' + gpb8_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb8_Internal2 + default: 00:80:37:0E:10:22 + gpb4_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb4_Internal1 + default: 00:80:37:0E:0C:22 + sctp-a-ipv6-ingress-dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + Internal1_net_gateway: + hidden: false + immutable: false + type: string + description: gateway for internal-1 network + default: 169.253.0.3 + sctp-b-ipv6-egress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 start port + default: 0 + gpb_name_7: + hidden: false + immutable: false + type: string + description: Name of gpb8 + default: zrdm3mmex59gpb0016 + gpb_name_6: + hidden: false + immutable: false + type: string + description: Name of gpb7 + default: zrdm3mmex59gpb0015 + gpb_name_5: + hidden: false + immutable: false + type: string + description: Name of gpb6 + default: zrdm3mmex59gpb0014 + gpb_name_4: + hidden: false + immutable: false + type: string + description: Name of gpb5 + default: zrdm3mmex59gpb0013 + gpb_name_3: + hidden: false + immutable: false + type: string + description: Name of gpb4 + default: zrdm3mmex59gpb0012 + sctp-a-ipv6-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: IPV6 destination + default: local + gpb_name_2: + hidden: false + immutable: false + type: string + description: Name of gpb3 + default: zrdm3mmex59gpb0011 + shc_delay: + hidden: false + immutable: false + type: string + description: health check + default: 3 + gpb_name_1: + hidden: false + immutable: false + type: string + description: Name of gpb2 + default: zrdm3mmex59gpb0010 + sctp-b-ipv6-egress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc3_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc3_Internal2 + default: 00:80:37:0E:03:12 + gpb_name_0: + hidden: false + immutable: false + type: string + description: Name of gpb1 + default: zrdm3mmex59gpb009 + sctp-a-ipv6-egress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + gpb5_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb5_Internal1 + default: 00:80:37:0E:0D:22 + sctp-b-ipv6-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + shc_max_retries: + hidden: false + immutable: false + type: string + description: health check + default: 2 + fsb_volume_type: + label: volume type + hidden: false + immutable: false + type: string + description: volume type SolidFire + default: SF-Default-SSD + sctp-a-name: + hidden: false + immutable: false + type: string + description: name for the SecurityGroup + default: epc-sctp-a-ipv4v6-sec-group + vlc_sctp_b_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPB + default: 107.243.47.187 + vlc_sctp_b_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPB + default: 107.243.47.186 + vlc_sctp_b_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPB + default: 107.243.47.185 + vlc_sctp_b_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPB + default: 107.243.47.184 + sctp-b-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + vnf_id: + hidden: false + immutable: false + type: string + description: the vf_id for this instance. UUID provided by ECOMP + default: zrdm3mmex59 + vlc_sctp_b_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPB + default: 107.243.47.189 + vlc_sctp_b_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPB + default: 107.243.47.188 + vlc_sctp_b_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPB + default: 107.243.47.177 + gpb6_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb6_Internal1 + default: 00:80:37:0E:0E:22 + sctp-b-ipv6-egress_dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + vlc_sctp_b_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPB + default: 107.243.47.176 + vlc2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc2_Internal2 + default: 00:80:37:0E:02:12 + sctp-b-ingress-src_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + gpb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers gpb + default: nv.c20r64d1 + vlc_sctp_a_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on SCTPA + sctp-b-ipv6-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: IPV6 destination + default: local + sctp-b-ipv6-ingress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + sctp-b-ipv6-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + sctp-a-ingress-src_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + vlc1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal2 + default: 00:80:37:0E:01:12 + Internal1_rpf: + hidden: false + immutable: false + type: string + description: Reverse Path Forwarding Enabled/Disabled internal-1 network + default: disable + sctp-b-ingress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-b-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-ipv6-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + vlc_sctp_a_v6_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPA + default: fd00:200:200:4:0:0:0:29 + vlc_sctp_a_v6_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPA + default: fd00:200:200:4:0:0:0:28 + gpb7_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb7_Internal1 + default: 00:80:37:0E:0F:22 + vlc_sctp_a_v6_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPA + default: fd00:200:200:4:0:0:0:27 + vlc_sctp_a_v6_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPA + default: fd00:200:200:4:0:0:0:26 + vlc_sctp_a_v6_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPA + default: fd00:200:200:4:0:0:0:25 + vlc_sctp_a_v6_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPA + default: fd00:200:200:4:0:0:0:24 + sctp-a-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + vlc_sctp_a_v6_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPA + default: fd00:200:200:4:0:0:0:17 + vlc_sctp_a_v6_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPA + default: fd00:200:200:4:0:0:0:16 + node_templates: + abstract_gpb_1: + type: org.openecomp.resource.abstract.nodes.gpb_1 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_1 + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb2_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb2_Internal2_network: + - get_input: internal_net_id_1 + port_gpb2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_image_name: + get_input: pxe_image_name + port_gpb2_Internal1_replacement_policy: + - AUTO + port_gpb2_Internal1_network: + - get_input: internal_net_id_0 + port_gpb2_Internal2_replacement_policy: + - AUTO + port_gpb2_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb2_Internal1_mac_address: + get_input: gpb2_Internal1_mac + port_gpb2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb2_Internal2_mac_address: + get_input: gpb2_Internal1_mac + port_gpb2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb2_Internal2_security_groups: + - - get_input: security_group_int2_id + service_template_filter: + substitute_service_template: Nested_gpb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_2: + type: org.openecomp.resource.abstract.nodes.gpb_2 + directives: + - substitutable + properties: + port_gpb3_Internal1_replacement_policy: + - AUTO + compute_gpb_name: + - get_input: gpb_name_2 + port_gpb3_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb3_Internal2_replacement_policy: + - AUTO + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb3_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb3_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb3_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb3_Internal1_network: + - get_input: internal_net_id_0 + port_gpb3_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb3_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb3_Internal1_mac_address: + get_input: gpb3_Internal1_mac + port_gpb3_Internal2_mac_address: + get_input: gpb3_Internal1_mac + port_gpb3_Internal2_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_gpb_2ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb3_Internal1: + capability: tosca.capabilities.network.Bindable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb3_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_vlc: + type: org.openecomp.resource.abstract.nodes.vlc + directives: + - substitutable + properties: + port_template_VMInt_SCTP_A_vlc_virtual_network_refs: + - - get_input: sctp_a_net_fqdn + port_template_VMInt_INT1_vlc_security_group_refs: + - - get_input: security_group_int1_id + vm_flavor_name: + get_input: vlc_flavor_name + port_template_VMInt_INT2_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + vm_image_name: + get_input: pxe_image_name + port_template_VMInt_INT1_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_INT2_vlc_virtual_network_refs: + - - get_input: internal_net_id_1 + port_template_VMInt_OAM_vlc_virtual_network_refs: + - - get_input: oam_net_fqdn + port_template_VMInt_OAM_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_INT2_vlc_virtual_machine_interface_mac_addresses: + - - get_input: vlc4_Internal2_mac + - - get_input: vlc3_Internal2_mac + - - get_input: vlc2_Internal2_mac + - - get_input: vlc1_Internal2_mac + - - get_input: vlc8_Internal2_mac + - - get_input: vlc7_Internal2_mac + - - get_input: vlc6_Internal2_mac + - - get_input: vlc5_Internal2_mac + port_template_VMInt_SCTP_B_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_GTP_vlc_security_group_refs: + - - get_input: security_group_gtp_id + compute_vlc_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_template_VMInt_OAM_vlc_security_group_refs: + - - get_input: security_group_oam_id + compute_vlc_contrail_service_instance_ind: + - true + - true + - true + - true + - true + - true + - true + - true + port_template_VMInt_GTP_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_SCTP_B_vlc_virtual_network_refs: + - - get_input: sctp_b_net_fqdn + port_template_VMInt_INT2_vlc_security_group_refs: + - - get_input: security_group_int2_id + port_template_VMInt_SCTP_B_vlc_security_group_refs: + - - get_input: security_group_sctp_b_id + port_template_VMInt_INT1_vlc_virtual_network_refs: + - - get_input: internal_net_id_0 + port_template_VMInt_SCTP_A_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + compute_vlc_scheduler_hints: + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + compute_vlc_name: + - get_input: vlc_name_3 + - get_input: vlc_name_2 + - get_input: vlc_name_1 + - get_input: vlc_name_0 + - get_input: vlc_name_7 + - get_input: vlc_name_6 + - get_input: vlc_name_5 + - get_input: vlc_name_4 + port_template_VMInt_SCTP_A_vlc_security_group_refs: + - - get_input: security_group_sctp_a_id + compute_vlc_availability_zone: + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + port_template_VMInt_INT1_vlc_virtual_machine_interface_mac_addresses: + - - get_input: vlc4_Internal1_mac + - - get_input: vlc3_Internal1_mac + - - get_input: vlc2_Internal1_mac + - - get_input: vlc1_Internal1_mac + - - get_input: vlc8_Internal1_mac + - - get_input: vlc7_Internal1_mac + - - get_input: vlc6_Internal1_mac + - - get_input: vlc5_Internal1_mac + port_template_VMInt_GTP_vlc_virtual_network_refs: + - - get_input: gtp_net_fqdn + service_template_filter: + substitute_service_template: Nested_vlcServiceTemplate.yaml + count: 8 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: vlc + nfc_naming_code: vlc + requirements: + - link_vlc_template_VMInt_INT2_vlc: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + - link_vlc_template_VMInt_INT1_vlc: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_7: + type: org.openecomp.resource.abstract.nodes.gpb_7 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_7 + port_gpb8_Internal1_mac_address: + get_input: gpb8_Internal1_mac + port_gpb8_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb8_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb8_Internal1_replacement_policy: + - AUTO + port_gpb8_Internal2_replacement_policy: + - AUTO + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb8_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb8_Internal1_network: + - get_input: internal_net_id_0 + port_gpb8_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb8_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb8_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb8_Internal2_network: + - get_input: internal_net_id_1 + port_gpb8_Internal2_mac_address: + get_input: gpb8_Internal1_mac + service_template_filter: + substitute_service_template: Nested_gpb_7ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb8_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb8_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_5: + type: org.openecomp.resource.abstract.nodes.gpb_5 + directives: + - substitutable + properties: + port_gpb6_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_name: + - get_input: gpb_name_5 + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb6_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_image_name: + get_input: pxe_image_name + port_gpb6_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb6_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb6_Internal1_network: + - get_input: internal_net_id_0 + port_gpb6_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb6_Internal2_mac_address: + get_input: gpb6_Internal1_mac + port_gpb6_Internal1_mac_address: + get_input: gpb6_Internal1_mac + port_gpb6_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb6_Internal2_replacement_policy: + - AUTO + port_gpb6_Internal1_replacement_policy: + - AUTO + port_gpb6_Internal2_security_groups: + - - get_input: security_group_int2_id + service_template_filter: + substitute_service_template: Nested_gpb_5ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb6_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb6_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_6: + type: org.openecomp.resource.abstract.nodes.gpb_6 + directives: + - substitutable + properties: + port_gpb7_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb7_Internal1_network: + - get_input: internal_net_id_0 + compute_gpb_name: + - get_input: gpb_name_6 + port_gpb7_Internal2_network: + - get_input: internal_net_id_1 + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb7_Internal1_replacement_policy: + - AUTO + port_gpb7_Internal2_replacement_policy: + - AUTO + port_gpb7_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb7_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb7_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb7_Internal2_mac_address: + get_input: gpb7_Internal1_mac + port_gpb7_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb7_Internal1_mac_address: + get_input: gpb7_Internal1_mac + port_gpb7_Internal2_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_gpb_6ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb7_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb7_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_3: + type: org.openecomp.resource.abstract.nodes.gpb_3 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_3 + port_gpb4_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb4_Internal1_mac_address: + get_input: gpb4_Internal1_mac + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb4_Internal2_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb4_Internal2_mac_address: + get_input: gpb4_Internal1_mac + vm_image_name: + get_input: pxe_image_name + port_gpb4_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb4_Internal2_replacement_policy: + - AUTO + port_gpb4_Internal1_replacement_policy: + - AUTO + port_gpb4_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb4_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb4_Internal2_network: + - get_input: internal_net_id_1 + port_gpb4_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb4_Internal1_network: + - get_input: internal_net_id_0 + service_template_filter: + substitute_service_template: Nested_gpb_3ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb4_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb4_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_4: + type: org.openecomp.resource.abstract.nodes.gpb_4 + directives: + - substitutable + properties: + port_gpb5_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb5_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_name: + - get_input: gpb_name_4 + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb5_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb5_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb5_Internal1_network: + - get_input: internal_net_id_0 + port_gpb5_Internal2_mac_address: + get_input: gpb5_Internal1_mac + port_gpb5_Internal1_mac_address: + get_input: gpb5_Internal1_mac + port_gpb5_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb5_Internal2_replacement_policy: + - AUTO + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb5_Internal1_replacement_policy: + - AUTO + port_gpb5_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb5_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + service_template_filter: + substitute_service_template: Nested_gpb_4ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb5_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb5_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb: + type: org.openecomp.resource.abstract.nodes.gpb + directives: + - substitutable + properties: + port_gpb1_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_name: + - get_input: gpb_name_0 + port_gpb1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb1_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb1_Internal1_mac_address: + get_input: gpb1_Internal1_mac + port_gpb1_Internal2_mac_address: + get_input: gpb1_Internal1_mac + port_gpb1_Internal2_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb1_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb1_Internal1_replacement_policy: + - AUTO + port_gpb1_Internal2_replacement_policy: + - AUTO + port_gpb1_Internal2_network: + - get_input: internal_net_id_1 + port_gpb1_Internal1_network: + - get_input: internal_net_id_0 + service_template_filter: + substitute_service_template: Nested_gpbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + Internal1_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_enable_dhcp: + get_input: Internal1_dhcp + network_ipam_refs_data_ipam_subnets_default_gateway: + get_input: Internal1_net_gateway + network_ipam_refs_data_ipam_subnets_subnet: + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: + get_input: Internal1_net_cidr_len + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: + get_input: Internal1_net_cidr + network_name: + str_replace: + template: $VNF_NAME_int_net_1 + params: + $VNF_NAME: + get_input: vnf_name + network_ipam_refs: + - UNSUPPORTED_RESOURCE_template_NetworkIpam_Internal1 + abstract_fsb: + type: org.openecomp.resource.abstract.nodes.fsb + directives: + - substitutable + properties: + port_FSB1_Internal1_mac_address: + get_input: fsb1_Internal1_mac + port_FSB_OAM_network_role_tag: + - oam + port_FSB1_Internal2_network: + - Internal2_net + port_FSB1_Internal1_network: + - Internal1_net + vm_flavor_name: + get_input: fsb_flavor_name + port_FSB1_Internal2_mac_address: + get_input: fsb1_Internal1_mac + port_FSB_OAM_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: true + floating_ip_count_required: + is_required: false + compute_fsb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_FSB1_Internal1_security_groups: + - - int1_security_group + port_FSB1_Internal2_replacement_policy: + - AUTO + compute_fsb_scheduler_hints: + - group: VM_Affinity_group + port_FSB1_Internal1_replacement_policy: + - AUTO + compute_fsb_name: + - get_input: fsb_name_0 + port_FSB1_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_FSB1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_network: + - get_input: oam_net_name + port_FSB_OAM_security_groups: + - - oam_security_group + port_FSB_OAM_mac_requirements: + mac_count_required: + is_required: false + port_FSB_OAM_replacement_policy: + - AUTO + compute_fsb_availability_zone: + - get_input: availability_zone_0 + port_FSB1_Internal2_security_groups: + - - int2_security_group + port_FSB1_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_FSB1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_fixed_ips: + - ip_address: + get_input: fsb_oam_ip_0 + service_template_filter: + substitute_service_template: Nested_fsbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: fsb + nfc_naming_code: fsb + requirements: + - link_fsb_FSB1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_fsb_FSB1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + gtp_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: gtp_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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 + abstract_ncb_1: + type: org.openecomp.resource.abstract.nodes.ncb_1 + directives: + - substitutable + properties: + port_NCB2_Internal2_security_groups: + - - int2_security_group + port_NCB2_Internal1_replacement_policy: + - AUTO + port_NCB2_Internal2_replacement_policy: + - AUTO + vm_flavor_name: + get_input: ncb_flavor_name + port_NCB2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_NCB2_Internal1_mac_requirements: + mac_count_required: + is_required: true + vm_image_name: + get_input: pxe_image_name + compute_ncb_scheduler_hints: + - group: VM_Affinity_group + compute_ncb_availability_zone: + - get_input: availability_zone_1 + port_NCB2_Internal1_network: + - Internal1_net + port_NCB2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_NCB2_Internal1_security_groups: + - - int1_security_group + port_NCB2_Internal2_network: + - Internal2_net + port_NCB2_Internal1_mac_address: + get_input: ncb2_Internal1_mac + port_NCB2_Internal2_mac_address: + get_input: ncb2_Internal1_mac + compute_ncb_name: + - get_input: ncb_name_1 + compute_ncb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_NCB2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + service_template_filter: + substitute_service_template: Nested_ncb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: ncb + nfc_naming_code: ncb + requirements: + - link_ncb_NCB2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_ncb_NCB2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_ncb: + type: org.openecomp.resource.abstract.nodes.ncb + directives: + - substitutable + properties: + vm_flavor_name: + get_input: ncb_flavor_name + port_NCB1_Internal2_mac_requirements: + mac_count_required: + is_required: true + vm_image_name: + get_input: pxe_image_name + port_NCB1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + compute_ncb_scheduler_hints: + - group: VM_Affinity_group + port_NCB1_Internal1_security_groups: + - - int1_security_group + compute_ncb_availability_zone: + - get_input: availability_zone_0 + port_NCB1_Internal2_mac_address: + get_input: ncb1_Internal1_mac + port_NCB1_Internal1_mac_address: + get_input: ncb1_Internal1_mac + port_NCB1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_NCB1_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_NCB1_Internal2_replacement_policy: + - AUTO + port_NCB1_Internal1_network: + - Internal1_net + port_NCB1_Internal2_security_groups: + - - int2_security_group + port_NCB1_Internal1_replacement_policy: + - AUTO + compute_ncb_name: + - get_input: ncb_name_0 + compute_ncb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_NCB1_Internal2_network: + - Internal2_net + service_template_filter: + substitute_service_template: Nested_ncbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: ncb + nfc_naming_code: ncb + requirements: + - link_ncb_NCB1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_ncb_NCB1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + int1_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: int1_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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_fsb_FSB1_Internal1 + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB2_Internal1 + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB1_Internal1 + node: abstract_ncb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB2_Internal1 + node: abstract_ncb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb1_Internal1 + node: abstract_gpb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb2_Internal1 + node: abstract_gpb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb3_Internal1 + node: abstract_gpb_2 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb4_Internal1 + node: abstract_gpb_3 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb5_Internal1 + node: abstract_gpb_4 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb6_Internal1 + node: abstract_gpb_5 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb7_Internal1 + node: abstract_gpb_6 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb8_Internal1 + node: abstract_gpb_7 + relationship: org.openecomp.relationships.AttachesTo + fsb_volume_0: + type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume + properties: + image: + get_input: fsb_volume_image_name_0 + volume_type: + get_input: fsb_volume_type + size: '(get_input : fsb_volume_size) * 1024' + name: + list_join: + - _ + - - get_input: OS::stack_name + - FSB1_Vol_1 + fsb_volume_1: + type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume + properties: + image: + get_input: fsb_volume_image_name_1 + volume_type: + get_input: fsb_volume_type + size: '(get_input : fsb_volume_size) * 1024' + name: + list_join: + - _ + - - get_input: OS::stack_name + - FSB2_Vol_1 + Internal2_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_enable_dhcp: + get_input: Internal2_dhcp + network_ipam_refs_data_ipam_subnets_default_gateway: + get_input: Internal2_net_gateway + network_ipam_refs_data_ipam_subnets_subnet: + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: + get_input: Internal2_net_cidr_len + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: + get_input: Internal2_net_cidr + network_name: + str_replace: + template: $VNF_NAME_int_net_2 + params: + $VNF_NAME: + get_input: vnf_name + network_ipam_refs: + - UNSUPPORTED_RESOURCE_template_NetworkIpam_Internal2 + int2_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: int2_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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: 132 + 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: 132 + 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: 132 + 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: 132 + 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_fsb_FSB1_Internal2 + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB2_Internal2 + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB1_Internal2 + node: abstract_ncb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB2_Internal2 + node: abstract_ncb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb1_Internal2 + node: abstract_gpb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb2_Internal2 + node: abstract_gpb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb3_Internal2 + node: abstract_gpb_2 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb4_Internal2 + node: abstract_gpb_3 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb5_Internal2 + node: abstract_gpb_4 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb6_Internal2 + node: abstract_gpb_5 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb7_Internal2 + node: abstract_gpb_6 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb8_Internal2 + node: abstract_gpb_7 + relationship: org.openecomp.relationships.AttachesTo + abstract_fsb_1: + type: org.openecomp.resource.abstract.nodes.fsb_1 + directives: + - substitutable + properties: + port_FSB_OAM_network_role_tag: + - oam + vm_flavor_name: + get_input: fsb_flavor_name + port_FSB_OAM_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: true + floating_ip_count_required: + is_required: false + port_FSB2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB2_Internal2_security_groups: + - - int2_security_group + compute_fsb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_FSB2_Internal1_mac_address: + get_input: fsb2_Internal1_mac + compute_fsb_scheduler_hints: + - group: VM_Affinity_group + compute_fsb_name: + - get_input: fsb_name_1 + port_FSB2_Internal1_security_groups: + - - int1_security_group + port_FSB_OAM_network: + - get_input: oam_net_name + port_FSB_OAM_security_groups: + - - oam_security_group + port_FSB2_Internal1_network: + - Internal1_net + port_FSB2_Internal2_mac_address: + get_input: fsb2_Internal1_mac + port_FSB2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_FSB_OAM_mac_requirements: + mac_count_required: + is_required: false + port_FSB2_Internal2_replacement_policy: + - AUTO + port_FSB2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_replacement_policy: + - AUTO + port_FSB2_Internal2_network: + - Internal2_net + port_FSB2_Internal1_replacement_policy: + - AUTO + compute_fsb_availability_zone: + - get_input: availability_zone_1 + port_FSB_OAM_fixed_ips: + - ip_address: + get_input: fsb_oam_ip_1 + port_FSB2_Internal1_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_fsb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: fsb + nfc_naming_code: fsb + requirements: + - link_fsb_FSB2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_fsb_FSB2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + oam_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: oam_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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_fsb_FSB_OAM + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB_OAM + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + groups: + vmme_gpb3_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb3.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + base_vmme_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/base_vmme.yml + description: | + Base HOT template to create vmme 2 fsb 2 ncb + members: + - int2_security_group + - oam_security_group + - gtp_security_group + - Internal2_net + - int1_security_group + - Internal1_net + - abstract_ncb + - abstract_ncb_1 + - abstract_fsb + - abstract_fsb_1 + base_vmme_volume_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/base_vmme_volume.yml + description: HOT template for vMME Cinder Volumes + members: + - fsb_volume_0 + - fsb_volume_1 + vmme_gpb1_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb1.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_gpb4_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb4.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_gpb2_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb2.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + VM_Affinity_group: + type: tosca.groups.Root + members: + - abstract_ncb + - abstract_ncb_1 + - abstract_vlc + - abstract_fsb + - abstract_fsb_1 + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_vlc_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_vlc.yml + description: | + Module HOT template to create vmme 8 vlcs + members: + - abstract_vlc + outputs: + oam_management_v4_address: + description: ID of OAM VIP to be provisioned in A&AI + value: + get_input: vip_oam_management_v4_ip + fsb_volume_id_1: + description: ID of Cinder Volume for FSB2 + value: fsb_volume_1 + security_group_sctp_b_id: + description: ID of sctpb_security_group + value: UNSUPPORTED_RESOURCE_sctpb_security_group + service_instance_id_0: + description: ID of Service Instance used for vLCs + value: UNSUPPORTED_RESOURCE_template_ServiceInstance_VLC + security_group_sctp_a_id: + description: ID of sctpa_security_group + value: UNSUPPORTED_RESOURCE_sctpa_security_group + fsb_volume_id_0: + description: ID of Cinder Volume for FSB1 + value: fsb_volume_0 + policies: + VM_Affinity_policy: + type: org.openecomp.policies.placement.Antilocate + properties: + container_type: host + targets: + - VM_Affinity_group diff --git a/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeWithMissingRelationship.yaml b/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeWithMissingRelationship.yaml new file mode 100644 index 0000000000..ea58ae9fc6 --- /dev/null +++ b/catalog-be/src/test/resources/yamlValidation/csarComparer/vmmeWithMissingRelationship.yaml @@ -0,0 +1,3584 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: Main +imports: +- openecomp_heat_index: + file: openecomp-heat/_index.yml +- GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml +topology_template: + inputs: + vlc4_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc4_Internal2 + default: 00:80:37:0E:04:12 + sctp-a-egress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + sctp-b-ipv6-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: IPV6 start port + default: 0 + constraints: + - in_range: + - 0 + - 65535 + ncb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb1_Internal2 + default: 00:80:37:0E:09:12 + sctp-a-ipv6-ingress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + gpb8_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb8_Internal1 + default: 00:80:37:0E:10:22 + sctp-a-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + sctp-b-display_name: + hidden: false + immutable: false + type: string + description: display_name for the SecurityGroup + default: epc-sctp-b-ipv4v6-sec-group + sctp-a-ingress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-a-egress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + ncb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers ncb + default: nv.c8r32d1 + vlc3_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc3_Internal1 + default: 00:80:37:0E:03:12 + Internal2_net_cidr: + hidden: false + immutable: false + type: string + description: CIDR for internal-2 network + default: 169.255.0.0 + sctp-a-egress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-egress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + gpb4_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb4_Internal2 + default: 00:80:37:0E:0C:22 + sctp-b-ipv6-egress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + vlc8_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc8_Internal1 + default: 00:80:37:0E:08:12 + sctp-b-ipv6-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: IPV6 ending port for destination + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + fsb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb2_Internal1 + default: 00:80:37:0E:0D:12 + sctp-b-name: + hidden: false + immutable: false + type: string + description: name for the SecurityGroup + default: epc-sctp-b-ipv4v6-sec-group + sctp-b-ipv6-egress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + internal_net_id_1: + hidden: false + immutable: false + type: string + description: UUID of Internal2_net + default: e3397c69-a942-49aa-81cb-fb91ff34abc8 + sctp-a-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + internal_net_id_0: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net + default: 871de971-22ac-47b6-befb-50e7d4cb67ea + sctp_b_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN SCTPB + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPB_net_1 + sctp-a-ipv6-ingress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + sctp-b-ipv6-ingress_src_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix length + default: '0' + ncb_name_1: + hidden: false + immutable: false + type: string + description: Name of ncb2 + default: zrdm3mmex59ncb002 + ncb_name_0: + hidden: false + immutable: false + type: string + description: Name of ncb1 + default: zrdm3mmex59ncb001 + vlc_st_virtualization_type: + hidden: false + immutable: false + type: string + description: Indicates virtualization type + default: virtual-machine + vlc2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc2_Internal1 + default: 00:80:37:0E:02:12 + sctp-b-ingress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-display_name: + hidden: false + immutable: false + type: string + description: display_name for the SecurityGroup + default: epc-sctp-a-ipv4v6-sec-group + sctp-b-ingress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + int2_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for internal-2 + default: int2-sec-group + gpb5_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb5_Internal2 + default: 00:80:37:0E:0D:22 + sctp-a-egress-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: dst subnet + default: '::' + OS::stack_name: + type: string + required: false + sctp-b-egress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + Internal2_shared: + hidden: false + immutable: false + type: string + description: Whether Shared or private internal-2 network + default: false + sctp-a-ipv6-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + Internal2_rpf: + hidden: false + immutable: false + type: string + description: Reverse Path Forwarding Enabled/Disabled internal-2 network + default: disable + vlc5_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc5_Internal2 + default: 00:80:37:0E:05:12 + sctp-a-ipv6-egress_src_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + Internal1_forwarding_mode: + hidden: false + immutable: false + type: string + description: L2 or L3 forwarding mode for internal-1 network + default: l2 + gpb3_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb3_Internal1 + default: 00:80:37:0E:0B:22 + vip_oam_management_v4_ip: + hidden: false + immutable: false + type: string + description: IP address of OAM service IP address to be provisioned in A&AI + default: 107.239.72.176 + vmi_oam_preference_primary: + hidden: false + immutable: false + type: float + description: Preference for primary interface/port + default: 200 + sctp-b-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp-a-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + security_group_sctp_b_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 92a4ae54-1733-4d03-b488-f178bb9f7b82 + Internal2_forwarding_mode: + hidden: false + immutable: false + type: string + description: L2 or L3 forwarding mode for internal-2 network + default: l2 + sctp-a-ipv6-egress_dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-b-egress-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: dst subnet + default: '::' + sctp-b-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + security_group_oam_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 4ae4aa74-3e8e-4f2b-8b5f-a8bd262da96b + gpb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb2_Internal1 + default: 00:80:37:0E:0A:22 + security_group_int1_id: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net security group + default: 94c62578-835d-4801-9372-70a2cfb22683 + sctp-a-egress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + oam_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN OAM + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_OAM_net_1 + ncb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb2_Internal2 + default: 00:80:37:0E:0F:12 + vlc_st_interface_type_sctp_a: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: left + gpb3_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb3_Internal2 + default: 00:80:37:0E:0B:22 + vlc_st_interface_type_sctp_b: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: right + gpb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb1_Internal2 + default: 00:80:37:0E:09:22 + oam_net_name: + hidden: false + immutable: false + type: string + description: Network Name OAM + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_OAM_net_1 + sctp-b-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb1_Internal1 + default: 00:80:37:0E:0B:12 + sctp-b-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + vlc_st_interface_type_oam: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: management + shc_monitor_type: + hidden: false + immutable: false + type: string + description: health check + default: PING + oam_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for OAM + default: oam-sec-group + Internal2_net_gateway: + hidden: false + immutable: false + type: string + description: gateway for internal-2 network + default: 169.255.0.3 + evac_policy: + hidden: false + immutable: false + type: string + description: CMHA Policy + default: Evacuate + server_group_id_0: + hidden: false + immutable: false + type: string + description: ID of Anti-Affinity Policy-based Server Group + default: ec99a73d-38f8-4280-8103-ba8ee584629f + vlc8_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc8_Internal2 + default: 00:80:37:0E:08:12 + sctp-b-ipv6-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + gtp_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for GTP + default: gtp-sec-group + vlc_sctp_b_v6_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPB + default: fd00:200:200:5:0:0:0:24 + vlc_sctp_b_v6_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPB + default: fd00:200:200:5:0:0:0:17 + sctp-a-ipv6-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + vlc_sctp_b_v6_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPB + default: fd00:200:200:5:0:0:0:16 + vlc4_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc4_Internal1 + default: 00:80:37:0E:04:12 + vlc_sctp_b_v6_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPB + default: fd00:200:200:5:0:0:0:28 + vlc_sctp_b_v6_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPB + default: fd00:200:200:5:0:0:0:27 + vlc_sctp_b_v6_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPB + default: fd00:200:200:5:0:0:0:26 + vlc_sctp_b_v6_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPB + default: fd00:200:200:5:0:0:0:25 + sctp_b_net_name: + hidden: false + immutable: false + type: string + description: Network Name SCTPB + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPB_net_1 + sctp-b-ipv6-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: '0' + sctp-a-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + Internal1_shared: + hidden: false + immutable: false + type: string + description: Whether Shared or private internal-1 network + default: false + shc_url_path: + hidden: false + immutable: false + type: string + description: health check + default: local-ip + Internal2_net_cidr_len: + hidden: false + immutable: false + type: string + description: CIDR length for internal-2 network + default: 17 + sctp-a-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-b-ipv6-ingress_src_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + sctp-a-egress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-ingress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-b-ipv6-ingress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc_st_service_type: + hidden: false + immutable: false + type: string + description: service type + default: firewall + sctp-b-ipv6-ingress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 starting port for destination + default: 0 + vlc_st_availability_zone: + hidden: false + immutable: false + type: string + description: Indicates availability zone is enabled + default: true + vlc7_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc7_Internal1 + default: 00:80:37:0E:07:12 + fsb_volume_image_name_1: + label: MME_FSB2 + hidden: false + immutable: false + type: string + description: volume name + default: MME_FSB2_1_3_GA.qcow2 + vlc_oam_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 OAM + default: 107.239.72.151 + sctp-a-ipv6-ingress_src_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix length + default: '0' + vlc_oam_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 OAM + default: 107.239.72.152 + Internal1_allow_transit: + hidden: false + immutable: false + type: string + description: Allow/disallow transit internal-1 network + default: true + vlc_oam_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 OAM + default: 107.239.72.157 + vlc_oam_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 OAM + default: 107.239.72.158 + vlc_gtp_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 GTP + default: 107.243.47.208 + vlc_oam_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 OAM + default: 107.239.72.149 + fsb_volume_image_name_0: + label: MME_FSB1 + hidden: false + immutable: false + type: string + description: volume name + default: MME_FSB1_1_3_GA.qcow2 + vlc_gtp_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 GTP + default: 107.243.47.209 + vlc_oam_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 OAM + default: 107.239.72.150 + vlc_gtp_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 GTP + default: 107.243.47.216 + vlc_name_6: + hidden: false + immutable: false + type: string + description: Name of vlc7 + default: zrdm3mmex59vlc007 + vlc_gtp_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 GTP + default: 107.243.47.217 + vlc_name_7: + hidden: false + immutable: false + type: string + description: Name of vlc8 + default: zrdm3mmex59vlc008 + security_group_sctp_a_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: 3cd8a524-77ff-4980-ae2a-d19ba70e0511 + vlc_gtp_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 GTP + default: 107.243.47.218 + vlc_gtp_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 GTP + default: 107.243.47.219 + vlc_gtp_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 GTP + default: 107.243.47.220 + vlc_name_2: + hidden: false + immutable: false + type: string + description: Name of vlc3 + default: zrdm3mmex59vlc003 + vlc_gtp_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 GTP + default: 107.243.47.221 + vlc_name_3: + hidden: false + immutable: false + type: string + description: Name of vlc4 + default: zrdm3mmex59vlc004 + vlc_name_4: + hidden: false + immutable: false + type: string + description: Name of vlc5 + default: zrdm3mmex59vlc005 + vlc_name_5: + hidden: false + immutable: false + type: string + description: Name of vlc6 + default: zrdm3mmex59vlc006 + fsb_volume_id_1: + hidden: false + immutable: false + type: string + description: ID of Cinder Volume for FSB2 + default: 5bd0560c-bfd0-47dc-a84a-554e2698c925 + sctp-a-ipv6-ingress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc_name_0: + hidden: false + immutable: false + type: string + description: Name of vlc1 + default: zrdm3mmex59vlc001 + vlc_name_1: + hidden: false + immutable: false + type: string + description: Name of vlc2 + default: zrdm3mmex59vlc002 + vlc_oam_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on OAM + sctp-b-egress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + vlc_oam_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 OAM + default: 107.239.72.155 + vlc_oam_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 OAM + default: 107.239.72.156 + vlc6_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc6_Internal1 + default: 00:80:37:0E:06:12 + fsb_volume_id_0: + hidden: false + immutable: false + type: string + description: ID of Cinder Volume for FSB1 + default: 27baa6a0-b701-4795-bf5e-4f546b350b1f + sctp-b-egress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + gpb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb2_Internal2 + default: 00:80:37:0E:0A:22 + sctp-a-ipv6-egress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + sctp-b-ipv6-egress_src_start_port: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0 + Internal2_allow_transit: + hidden: false + immutable: false + type: string + description: Allow/disallow transit internal-2 network + default: true + fsb_volume_size: + label: volume size + hidden: false + immutable: false + type: float + description: volume size 320GB + default: 320 + constraints: + - in_range: + - 0 + - 340 + sctp-b-IPv6_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv6 + gtp_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN GTP + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_GTP_net_1 + ncb2_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb2_Internal1 + default: 00:80:37:0E:0F:12 + sctp-b-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + sctp-b-ingress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-b-egress_src_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + gpb7_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb7_Internal2 + default: 00:80:37:0E:0F:22 + sctp-a-ipv6-ingress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 starting port for destination + default: 0 + gtp_net_name: + hidden: false + immutable: false + type: string + description: Network Name GTP + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_GTP_net_1 + sctp-b-ipv6-ingress_rule_application: + hidden: false + immutable: false + type: string + description: IPV6 Rule-application + default: any + domain_name: + hidden: false + immutable: false + type: string + description: Unique name of vMME contrail domain + default: default-domain + vlc5_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc5_Internal1 + default: 00:80:37:0E:05:12 + sctp-a-egress_src_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + sctp-b-egress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + shc_enabled: + hidden: false + immutable: false + type: string + description: health check + default: true + sctp-b-ipv6-ingress-dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-b-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp_a_net_fqdn: + hidden: false + immutable: false + type: string + description: Network FQDN SCTPA + default: default-domain:vMME-24474-Ericsson-WTC-Lab-vLCP1-4:vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPA_net_1 + security_group_gtp_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + default: e8ad3fe2-5f95-43e4-bbcc-da97b1c22588 + sctp-a-ipv6-ingress_src_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + fsb_name_1: + hidden: false + immutable: false + type: string + description: Name of fsb1 + default: zrdm3mmex59fsb002 + sctp-b-egress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb_name_0: + hidden: false + immutable: false + type: string + description: Name of fsb1 + default: zrdm3mmex59fsb001 + sctp_a_net_name: + hidden: false + immutable: false + type: string + description: Network Name SCTPA + default: vMME-24474-Ericsson-WTC-Lab-vLCP1-4_gn_SCTPA_net_1 + sctp-b-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + gpb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb1_Internal1 + default: 00:80:37:0E:09:22 + sctp-a-ingress-dst_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + fsb1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb1_Internal2 + default: 00:80:37:0E:0B:12 + vlc_st_service_mode: + hidden: false + immutable: false + type: string + description: service mode + default: in-network-nat + sctp-a-ipv6-egress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + sctp-a-egress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-b-egress_action: + hidden: false + immutable: false + type: string + description: simple_action for the SecurityGroup + default: pass + sctp-a-ingress-src_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + sctp-a-ipv6-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: IPV6 start port + default: 0 + constraints: + - in_range: + - 0 + - 65535 + vf_module_id: + hidden: false + immutable: false + type: string + description: the vf_module_id for this instance. UUID provided by ECOMP + default: TWO + Internal1_net_cidr: + hidden: false + immutable: false + type: string + description: CIDR for internal-1 network + default: 169.253.0.0 + fsb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers fsb1 + default: nv.c8r32d1 + sctp_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: 132 + vnf_name: + hidden: false + immutable: false + type: string + description: the vnf_name for this instance. provided by ECOMP + default: zrdm3mmex59 + sctp-a-IPv6_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv6 + vlc_sctp_b_v6_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPB + default: fd00:200:200:5:0:0:0:29 + vlc6_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc6_Internal2 + default: 00:80:37:0E:06:12 + sctp-b-ingress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc7_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc7_Internal2 + default: 00:80:37:0E:07:12 + sctp-a-ipv6-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: IPV6 ending port for destination + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers vlc + default: nd.c16r64d1 + sctp-b-ipv6-egress_src_addresses: + hidden: false + immutable: false + type: string + description: IPV6 source + default: local + vlc_st_interface_type_int1: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other1 + availability_zone_0: + hidden: false + immutable: false + type: string + description: cluster for spawnning fsb instances + default: rdm3-kvm-az02 + service_instance_id_0: + hidden: false + immutable: false + type: string + description: UUID of service instance for vLCs + default: 77c67cc8-d15f-47bc-aeb1-8d65d09e917a + availability_zone_1: + hidden: false + immutable: false + type: string + description: cluster for spawnning ncb instances + default: rdm3-kvm-az02 + vlc_st_interface_type_int2: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other2 + sctp-a-ipv6-egress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 start port + default: 0 + sctp-a-ipv6-egress_dst_subnet_prefix_len: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: '0' + vlc_sctp_a_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPA + default: 107.243.47.144 + vlc_sctp_b_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on SCTPB + vlc1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal1 + default: 00:80:37:0E:01:12 + sctp-b-ipv6-egress_src_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + sctp-a-ipv6-egress_src_addresses: + hidden: false + immutable: false + type: string + description: IPV6 source + default: local + vlc_sctp_a_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPA + default: 107.243.47.157 + sctp-a-ingress-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: src subnet + default: '::' + vlc_sctp_a_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPA + default: 107.243.47.156 + vlc_sctp_a_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPA + default: 107.243.47.155 + sctp-a-ingress-dst_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + vlc_sctp_a_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPA + default: 107.243.47.154 + vlc_sctp_a_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPA + default: 107.243.47.153 + vlc_sctp_a_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPA + default: 107.243.47.152 + vlc_sctp_a_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPA + default: 107.243.47.145 + gpb6_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb6_Internal2 + default: 00:80:37:0E:0E:22 + security_group_int2_id: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net security group + default: 1361f069-baf2-4b76-b321-7f68ba26c369 + Internal2_dhcp: + hidden: false + immutable: false + type: string + description: Whether DHCP/static IP addressing on internal-2 network + default: false + sctp-a-dst_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + pxe_image_name: + hidden: false + immutable: false + type: string + description: Name of image to use for server ncb + default: MME_PXE-Boot_1_3_GA.qcow2 + vlc_st_interface_type_gtp: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + default: other0 + ncb1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to ncb1_Internal1 + default: 00:80:37:0E:09:12 + vlc_gtp_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on GTP + int1_sec_group_name: + hidden: false + immutable: false + type: string + description: SecurityGroup name for internal-1 + default: int1-sec-group + vmi_oam_preference_secondary: + hidden: false + immutable: false + type: float + description: Preference for secondary interface/port + default: 100 + Internal1_dhcp: + hidden: false + immutable: false + type: string + description: Whether DHCP/static IP addressing on internal-1 network + default: false + fsb2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to fsb2_Internal2 + default: 00:80:37:0E:0D:12 + Internal1_net_cidr_len: + hidden: false + immutable: false + type: string + description: CIDR length for internal-1 network + default: 17 + sctp-a-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: security_group for the SecurityGroup + default: local + sctp-b-ingress-src_subnet_prefix_len: + hidden: false + immutable: false + type: float + description: ip_prefix_len for the SecurityGroup + default: '0' + constraints: + - in_range: + - 0 + - 32 + fsb_oam_ip_1: + hidden: false + immutable: false + type: string + description: IP address of OAM vNIC for FSB2 + default: 107.239.72.154 + fsb_oam_ip_0: + hidden: false + immutable: false + type: string + description: IP address of OAM vNIC for FSB1 + default: 107.239.72.153 + shc_timeout: + hidden: false + immutable: false + type: string + description: health check + default: 5 + vlc_st_version: + hidden: false + immutable: false + type: string + description: Indicates service version + default: 2 + sctp-a-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: '::' + sctp-a-ingress_rule_application: + hidden: false + immutable: false + type: string + description: application for the SecurityGroup + default: any + sctp-b-egress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-a-ipv6-egress_src_start_port: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0 + instance_ip_family_v6: + hidden: false + immutable: false + type: string + description: Ipv6 instance type + default: v6 + sctp-b-ingress-src_subnet_prefix_v6: + hidden: false + immutable: false + type: string + description: src subnet + default: '::' + gpb8_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb8_Internal2 + default: 00:80:37:0E:10:22 + gpb4_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb4_Internal1 + default: 00:80:37:0E:0C:22 + sctp-a-ipv6-ingress-dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + Internal1_net_gateway: + hidden: false + immutable: false + type: string + description: gateway for internal-1 network + default: 169.253.0.3 + sctp-b-ipv6-egress-dst_start_port: + hidden: false + immutable: false + type: string + description: IPV6 start port + default: 0 + gpb_name_7: + hidden: false + immutable: false + type: string + description: Name of gpb8 + default: zrdm3mmex59gpb0016 + gpb_name_6: + hidden: false + immutable: false + type: string + description: Name of gpb7 + default: zrdm3mmex59gpb0015 + gpb_name_5: + hidden: false + immutable: false + type: string + description: Name of gpb6 + default: zrdm3mmex59gpb0014 + gpb_name_4: + hidden: false + immutable: false + type: string + description: Name of gpb5 + default: zrdm3mmex59gpb0013 + gpb_name_3: + hidden: false + immutable: false + type: string + description: Name of gpb4 + default: zrdm3mmex59gpb0012 + sctp-a-ipv6-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: IPV6 destination + default: local + gpb_name_2: + hidden: false + immutable: false + type: string + description: Name of gpb3 + default: zrdm3mmex59gpb0011 + shc_delay: + hidden: false + immutable: false + type: string + description: health check + default: 3 + gpb_name_1: + hidden: false + immutable: false + type: string + description: Name of gpb2 + default: zrdm3mmex59gpb0010 + sctp-b-ipv6-egress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + vlc3_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc3_Internal2 + default: 00:80:37:0E:03:12 + gpb_name_0: + hidden: false + immutable: false + type: string + description: Name of gpb1 + default: zrdm3mmex59gpb009 + sctp-a-ipv6-egress_action: + hidden: false + immutable: false + type: string + description: IPV6 action + default: pass + gpb5_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb5_Internal1 + default: 00:80:37:0E:0D:22 + sctp-b-ipv6-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + shc_max_retries: + hidden: false + immutable: false + type: string + description: health check + default: 2 + fsb_volume_type: + label: volume type + hidden: false + immutable: false + type: string + description: volume type SolidFire + default: SF-Default-SSD + sctp-a-name: + hidden: false + immutable: false + type: string + description: name for the SecurityGroup + default: epc-sctp-a-ipv4v6-sec-group + vlc_sctp_b_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPB + default: 107.243.47.187 + vlc_sctp_b_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPB + default: 107.243.47.186 + vlc_sctp_b_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPB + default: 107.243.47.185 + vlc_sctp_b_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPB + default: 107.243.47.184 + sctp-b-egress_rule_protocol: + hidden: false + immutable: false + type: string + description: protocol for the SecurityGroup + default: any + vnf_id: + hidden: false + immutable: false + type: string + description: the vf_id for this instance. UUID provided by ECOMP + default: zrdm3mmex59 + vlc_sctp_b_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPB + default: 107.243.47.189 + vlc_sctp_b_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPB + default: 107.243.47.188 + vlc_sctp_b_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPB + default: 107.243.47.177 + gpb6_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb6_Internal1 + default: 00:80:37:0E:0E:22 + sctp-b-ipv6-egress_dst_end_port: + hidden: false + immutable: false + type: string + description: IPV6 end port + default: 65535 + vlc_sctp_b_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPB + default: 107.243.47.176 + vlc2_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc2_Internal2 + default: 00:80:37:0E:02:12 + sctp-b-ingress-src_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + gpb_flavor_name: + hidden: false + immutable: false + type: string + description: Flavor to use for servers gpb + default: nv.c20r64d1 + vlc_sctp_a_route_prefixes: + hidden: false + immutable: false + type: json + description: Route prefixes for static routing on SCTPA + sctp-b-ipv6-ingress_dst_addresses: + hidden: false + immutable: false + type: string + description: IPV6 destination + default: local + sctp-b-ipv6-ingress_ethertype: + hidden: false + immutable: false + type: string + description: IPV6 ethertype + default: IPv4 + sctp-b-ipv6-egress_dst_subnet_prefix: + hidden: false + immutable: false + type: string + description: IPV6 subnet prefix + default: 0.0.0.0 + sctp-a-ingress-src_subnet_prefix: + hidden: false + immutable: false + type: string + description: ip_prefix for the SecurityGroup + default: 0.0.0.0 + vlc1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal2 + default: 00:80:37:0E:01:12 + Internal1_rpf: + hidden: false + immutable: false + type: string + description: Reverse Path Forwarding Enabled/Disabled internal-1 network + default: disable + sctp-b-ingress_ethertype: + hidden: false + immutable: false + type: string + description: ethertype for the SecurityGroup + default: IPv4 + sctp-b-ingress-src_end_port: + hidden: false + immutable: false + type: float + description: end_port for the SecurityGroup + default: 65535 + constraints: + - in_range: + - 0 + - 65535 + sctp-a-ipv6-ingress_rule_protocol: + hidden: false + immutable: false + type: string + description: IPV6 Rule-protocol + default: any + vlc_sctp_a_v6_ip_7: + hidden: false + immutable: false + type: string + description: Static IP vlc8 SCTPA + default: fd00:200:200:4:0:0:0:29 + vlc_sctp_a_v6_ip_6: + hidden: false + immutable: false + type: string + description: Static IP vlc7 SCTPA + default: fd00:200:200:4:0:0:0:28 + gpb7_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to gpb7_Internal1 + default: 00:80:37:0E:0F:22 + vlc_sctp_a_v6_ip_5: + hidden: false + immutable: false + type: string + description: Static IP vlc6 SCTPA + default: fd00:200:200:4:0:0:0:27 + vlc_sctp_a_v6_ip_4: + hidden: false + immutable: false + type: string + description: Static IP vlc5 SCTPA + default: fd00:200:200:4:0:0:0:26 + vlc_sctp_a_v6_ip_3: + hidden: false + immutable: false + type: string + description: Static IP vlc4 SCTPA + default: fd00:200:200:4:0:0:0:25 + vlc_sctp_a_v6_ip_2: + hidden: false + immutable: false + type: string + description: Static IP vlc3 SCTPA + default: fd00:200:200:4:0:0:0:24 + sctp-a-ingress-src_start_port: + hidden: false + immutable: false + type: float + description: start_port for the SecurityGroup + default: 0 + constraints: + - in_range: + - 0 + - 65535 + vlc_sctp_a_v6_ip_1: + hidden: false + immutable: false + type: string + description: Static IP vlc2 SCTPA + default: fd00:200:200:4:0:0:0:17 + vlc_sctp_a_v6_ip_0: + hidden: false + immutable: false + type: string + description: Static IP vlc1 SCTPA + default: fd00:200:200:4:0:0:0:16 + node_templates: + abstract_gpb_1: + type: org.openecomp.resource.abstract.nodes.gpb_1 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_1 + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb2_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb2_Internal2_network: + - get_input: internal_net_id_1 + port_gpb2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_image_name: + get_input: pxe_image_name + port_gpb2_Internal1_replacement_policy: + - AUTO + port_gpb2_Internal1_network: + - get_input: internal_net_id_0 + port_gpb2_Internal2_replacement_policy: + - AUTO + port_gpb2_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb2_Internal1_mac_address: + get_input: gpb2_Internal1_mac + port_gpb2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb2_Internal2_mac_address: + get_input: gpb2_Internal1_mac + port_gpb2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb2_Internal2_security_groups: + - - get_input: security_group_int2_id + service_template_filter: + substitute_service_template: Nested_gpb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + abstract_gpb_2: + type: org.openecomp.resource.abstract.nodes.gpb_2 + directives: + - substitutable + properties: + port_gpb3_Internal1_replacement_policy: + - AUTO + compute_gpb_name: + - get_input: gpb_name_2 + port_gpb3_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb3_Internal2_replacement_policy: + - AUTO + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb3_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb3_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb3_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb3_Internal1_network: + - get_input: internal_net_id_0 + port_gpb3_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb3_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb3_Internal1_mac_address: + get_input: gpb3_Internal1_mac + port_gpb3_Internal2_mac_address: + get_input: gpb3_Internal1_mac + port_gpb3_Internal2_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_gpb_2ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb3_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb3_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_vlc: + type: org.openecomp.resource.abstract.nodes.vlc + directives: + - substitutable + properties: + port_template_VMInt_SCTP_A_vlc_virtual_network_refs: + - - get_input: sctp_a_net_fqdn + port_template_VMInt_INT1_vlc_security_group_refs: + - - get_input: security_group_int1_id + vm_flavor_name: + get_input: vlc_flavor_name + port_template_VMInt_INT2_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + vm_image_name: + get_input: pxe_image_name + port_template_VMInt_INT1_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_INT2_vlc_virtual_network_refs: + - - get_input: internal_net_id_1 + port_template_VMInt_OAM_vlc_virtual_network_refs: + - - get_input: oam_net_fqdn + port_template_VMInt_OAM_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_INT2_vlc_virtual_machine_interface_mac_addresses: + - - get_input: vlc4_Internal2_mac + - - get_input: vlc3_Internal2_mac + - - get_input: vlc2_Internal2_mac + - - get_input: vlc1_Internal2_mac + - - get_input: vlc8_Internal2_mac + - - get_input: vlc7_Internal2_mac + - - get_input: vlc6_Internal2_mac + - - get_input: vlc5_Internal2_mac + port_template_VMInt_SCTP_B_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_GTP_vlc_security_group_refs: + - - get_input: security_group_gtp_id + compute_vlc_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_template_VMInt_OAM_vlc_security_group_refs: + - - get_input: security_group_oam_id + compute_vlc_contrail_service_instance_ind: + - true + - true + - true + - true + - true + - true + - true + - true + port_template_VMInt_GTP_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + port_template_VMInt_SCTP_B_vlc_virtual_network_refs: + - - get_input: sctp_b_net_fqdn + port_template_VMInt_INT2_vlc_security_group_refs: + - - get_input: security_group_int2_id + port_template_VMInt_SCTP_B_vlc_security_group_refs: + - - get_input: security_group_sctp_b_id + port_template_VMInt_INT1_vlc_virtual_network_refs: + - - get_input: internal_net_id_0 + port_template_VMInt_SCTP_A_vlc_port_tuple_refs: + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc4 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc3 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc2 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc1 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc8 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc7 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc6 + - - UNSUPPORTED_RESOURCE_template_PortTuple_vlc5 + compute_vlc_scheduler_hints: + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + - group: + get_input: server_group_id_0 + compute_vlc_name: + - get_input: vlc_name_3 + - get_input: vlc_name_2 + - get_input: vlc_name_1 + - get_input: vlc_name_0 + - get_input: vlc_name_7 + - get_input: vlc_name_6 + - get_input: vlc_name_5 + - get_input: vlc_name_4 + port_template_VMInt_SCTP_A_vlc_security_group_refs: + - - get_input: security_group_sctp_a_id + compute_vlc_availability_zone: + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + - get_input: availability_zone_1 + - get_input: availability_zone_0 + port_template_VMInt_INT1_vlc_virtual_machine_interface_mac_addresses: + - - get_input: vlc4_Internal1_mac + - - get_input: vlc3_Internal1_mac + - - get_input: vlc2_Internal1_mac + - - get_input: vlc1_Internal1_mac + - - get_input: vlc8_Internal1_mac + - - get_input: vlc7_Internal1_mac + - - get_input: vlc6_Internal1_mac + - - get_input: vlc5_Internal1_mac + port_template_VMInt_GTP_vlc_virtual_network_refs: + - - get_input: gtp_net_fqdn + service_template_filter: + substitute_service_template: Nested_vlcServiceTemplate.yaml + count: 8 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: vlc + nfc_naming_code: vlc + requirements: + - link_vlc_template_VMInt_INT2_vlc: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + - link_vlc_template_VMInt_INT1_vlc: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_7: + type: org.openecomp.resource.abstract.nodes.gpb_7 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_7 + port_gpb8_Internal1_mac_address: + get_input: gpb8_Internal1_mac + port_gpb8_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb8_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb8_Internal1_replacement_policy: + - AUTO + port_gpb8_Internal2_replacement_policy: + - AUTO + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb8_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb8_Internal1_network: + - get_input: internal_net_id_0 + port_gpb8_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb8_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb8_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb8_Internal2_network: + - get_input: internal_net_id_1 + port_gpb8_Internal2_mac_address: + get_input: gpb8_Internal1_mac + service_template_filter: + substitute_service_template: Nested_gpb_7ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb8_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb8_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_5: + type: org.openecomp.resource.abstract.nodes.gpb_5 + directives: + - substitutable + properties: + port_gpb6_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_name: + - get_input: gpb_name_5 + vm_flavor_name: + get_input: gpb_flavor_name + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb6_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_image_name: + get_input: pxe_image_name + port_gpb6_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb6_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb6_Internal1_network: + - get_input: internal_net_id_0 + port_gpb6_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb6_Internal2_mac_address: + get_input: gpb6_Internal1_mac + port_gpb6_Internal1_mac_address: + get_input: gpb6_Internal1_mac + port_gpb6_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb6_Internal2_replacement_policy: + - AUTO + port_gpb6_Internal1_replacement_policy: + - AUTO + port_gpb6_Internal2_security_groups: + - - get_input: security_group_int2_id + service_template_filter: + substitute_service_template: Nested_gpb_5ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb6_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb6_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_6: + type: org.openecomp.resource.abstract.nodes.gpb_6 + directives: + - substitutable + properties: + port_gpb7_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb7_Internal1_network: + - get_input: internal_net_id_0 + compute_gpb_name: + - get_input: gpb_name_6 + port_gpb7_Internal2_network: + - get_input: internal_net_id_1 + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb7_Internal1_replacement_policy: + - AUTO + port_gpb7_Internal2_replacement_policy: + - AUTO + port_gpb7_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb7_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb7_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb7_Internal2_mac_address: + get_input: gpb7_Internal1_mac + port_gpb7_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb7_Internal1_mac_address: + get_input: gpb7_Internal1_mac + port_gpb7_Internal2_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_gpb_6ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb7_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb7_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_3: + type: org.openecomp.resource.abstract.nodes.gpb_3 + directives: + - substitutable + properties: + compute_gpb_name: + - get_input: gpb_name_3 + port_gpb4_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb4_Internal1_mac_address: + get_input: gpb4_Internal1_mac + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb4_Internal2_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_gpb4_Internal2_mac_address: + get_input: gpb4_Internal1_mac + vm_image_name: + get_input: pxe_image_name + port_gpb4_Internal2_security_groups: + - - get_input: security_group_int2_id + compute_gpb_availability_zone: + - get_input: availability_zone_1 + port_gpb4_Internal2_replacement_policy: + - AUTO + port_gpb4_Internal1_replacement_policy: + - AUTO + port_gpb4_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb4_Internal1_security_groups: + - - get_input: security_group_int1_id + port_gpb4_Internal2_network: + - get_input: internal_net_id_1 + port_gpb4_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_gpb4_Internal1_network: + - get_input: internal_net_id_0 + service_template_filter: + substitute_service_template: Nested_gpb_3ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb4_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb4_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb_4: + type: org.openecomp.resource.abstract.nodes.gpb_4 + directives: + - substitutable + properties: + port_gpb5_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_gpb5_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_name: + - get_input: gpb_name_4 + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb5_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + port_gpb5_Internal2_network: + - get_input: internal_net_id_1 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb5_Internal1_network: + - get_input: internal_net_id_0 + port_gpb5_Internal2_mac_address: + get_input: gpb5_Internal1_mac + port_gpb5_Internal1_mac_address: + get_input: gpb5_Internal1_mac + port_gpb5_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb5_Internal2_replacement_policy: + - AUTO + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb5_Internal1_replacement_policy: + - AUTO + port_gpb5_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb5_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + service_template_filter: + substitute_service_template: Nested_gpb_4ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb5_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb5_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_gpb: + type: org.openecomp.resource.abstract.nodes.gpb + directives: + - substitutable + properties: + port_gpb1_Internal1_security_groups: + - - get_input: security_group_int1_id + compute_gpb_name: + - get_input: gpb_name_0 + port_gpb1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + vm_flavor_name: + get_input: gpb_flavor_name + port_gpb1_Internal1_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_scheduler_hints: + - group: + get_input: server_group_id_0 + compute_gpb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vm_image_name: + get_input: pxe_image_name + port_gpb1_Internal1_mac_address: + get_input: gpb1_Internal1_mac + port_gpb1_Internal2_mac_address: + get_input: gpb1_Internal1_mac + port_gpb1_Internal2_mac_requirements: + mac_count_required: + is_required: true + compute_gpb_availability_zone: + - get_input: availability_zone_0 + port_gpb1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_gpb1_Internal2_security_groups: + - - get_input: security_group_int2_id + port_gpb1_Internal1_replacement_policy: + - AUTO + port_gpb1_Internal2_replacement_policy: + - AUTO + port_gpb1_Internal2_network: + - get_input: internal_net_id_1 + port_gpb1_Internal1_network: + - get_input: internal_net_id_0 + service_template_filter: + substitute_service_template: Nested_gpbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: gpb + nfc_naming_code: gpb + requirements: + - link_gpb_gpb1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_gpb_gpb1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + Internal1_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_enable_dhcp: + get_input: Internal1_dhcp + network_ipam_refs_data_ipam_subnets_default_gateway: + get_input: Internal1_net_gateway + network_ipam_refs_data_ipam_subnets_subnet: + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: + get_input: Internal1_net_cidr_len + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: + get_input: Internal1_net_cidr + network_name: + str_replace: + template: $VNF_NAME_int_net_1 + params: + $VNF_NAME: + get_input: vnf_name + network_ipam_refs: + - UNSUPPORTED_RESOURCE_template_NetworkIpam_Internal1 + abstract_fsb: + type: org.openecomp.resource.abstract.nodes.fsb + directives: + - substitutable + properties: + port_FSB1_Internal1_mac_address: + get_input: fsb1_Internal1_mac + port_FSB_OAM_network_role_tag: + - oam + port_FSB1_Internal2_network: + - Internal2_net + port_FSB1_Internal1_network: + - Internal1_net + vm_flavor_name: + get_input: fsb_flavor_name + port_FSB1_Internal2_mac_address: + get_input: fsb1_Internal1_mac + port_FSB_OAM_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: true + floating_ip_count_required: + is_required: false + compute_fsb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_FSB1_Internal1_security_groups: + - - int1_security_group + port_FSB1_Internal2_replacement_policy: + - AUTO + compute_fsb_scheduler_hints: + - group: VM_Affinity_group + port_FSB1_Internal1_replacement_policy: + - AUTO + compute_fsb_name: + - get_input: fsb_name_0 + port_FSB1_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_FSB1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_network: + - get_input: oam_net_name + port_FSB_OAM_security_groups: + - - oam_security_group + port_FSB_OAM_mac_requirements: + mac_count_required: + is_required: false + port_FSB_OAM_replacement_policy: + - AUTO + compute_fsb_availability_zone: + - get_input: availability_zone_0 + port_FSB1_Internal2_security_groups: + - - int2_security_group + port_FSB1_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_FSB1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_fixed_ips: + - ip_address: + get_input: fsb_oam_ip_0 + service_template_filter: + substitute_service_template: Nested_fsbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: fsb + nfc_naming_code: fsb + requirements: + - link_fsb_FSB1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_fsb_FSB1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + gtp_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: gtp_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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 + abstract_ncb_1: + type: org.openecomp.resource.abstract.nodes.ncb_1 + directives: + - substitutable + properties: + port_NCB2_Internal2_security_groups: + - - int2_security_group + port_NCB2_Internal1_replacement_policy: + - AUTO + port_NCB2_Internal2_replacement_policy: + - AUTO + vm_flavor_name: + get_input: ncb_flavor_name + port_NCB2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_NCB2_Internal1_mac_requirements: + mac_count_required: + is_required: true + vm_image_name: + get_input: pxe_image_name + compute_ncb_scheduler_hints: + - group: VM_Affinity_group + compute_ncb_availability_zone: + - get_input: availability_zone_1 + port_NCB2_Internal1_network: + - Internal1_net + port_NCB2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_NCB2_Internal1_security_groups: + - - int1_security_group + port_NCB2_Internal2_network: + - Internal2_net + port_NCB2_Internal1_mac_address: + get_input: ncb2_Internal1_mac + port_NCB2_Internal2_mac_address: + get_input: ncb2_Internal1_mac + compute_ncb_name: + - get_input: ncb_name_1 + compute_ncb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_NCB2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + service_template_filter: + substitute_service_template: Nested_ncb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: ncb + nfc_naming_code: ncb + requirements: + - link_ncb_NCB2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_ncb_NCB2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + abstract_ncb: + type: org.openecomp.resource.abstract.nodes.ncb + directives: + - substitutable + properties: + vm_flavor_name: + get_input: ncb_flavor_name + port_NCB1_Internal2_mac_requirements: + mac_count_required: + is_required: true + vm_image_name: + get_input: pxe_image_name + port_NCB1_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + compute_ncb_scheduler_hints: + - group: VM_Affinity_group + port_NCB1_Internal1_security_groups: + - - int1_security_group + compute_ncb_availability_zone: + - get_input: availability_zone_0 + port_NCB1_Internal2_mac_address: + get_input: ncb1_Internal1_mac + port_NCB1_Internal1_mac_address: + get_input: ncb1_Internal1_mac + port_NCB1_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_NCB1_Internal1_mac_requirements: + mac_count_required: + is_required: true + port_NCB1_Internal2_replacement_policy: + - AUTO + port_NCB1_Internal1_network: + - Internal1_net + port_NCB1_Internal2_security_groups: + - - int2_security_group + port_NCB1_Internal1_replacement_policy: + - AUTO + compute_ncb_name: + - get_input: ncb_name_0 + compute_ncb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_NCB1_Internal2_network: + - Internal2_net + service_template_filter: + substitute_service_template: Nested_ncbServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: ncb + nfc_naming_code: ncb + requirements: + - link_ncb_NCB1_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_ncb_NCB1_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + int1_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: int1_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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_fsb_FSB1_Internal1 + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB2_Internal1 + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB1_Internal1 + node: abstract_ncb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB2_Internal1 + node: abstract_ncb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb1_Internal1 + node: abstract_gpb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb2_Internal1 + node: abstract_gpb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb3_Internal1 + node: abstract_gpb_2 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb4_Internal1 + node: abstract_gpb_3 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb5_Internal1 + node: abstract_gpb_4 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb6_Internal1 + node: abstract_gpb_5 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb7_Internal1 + node: abstract_gpb_6 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb8_Internal1 + node: abstract_gpb_7 + relationship: org.openecomp.relationships.AttachesTo + fsb_volume_0: + type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume + properties: + image: + get_input: fsb_volume_image_name_0 + volume_type: + get_input: fsb_volume_type + size: '(get_input : fsb_volume_size) * 1024' + name: + list_join: + - _ + - - get_input: OS::stack_name + - FSB1_Vol_1 + fsb_volume_1: + type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume + properties: + image: + get_input: fsb_volume_image_name_1 + volume_type: + get_input: fsb_volume_type + size: '(get_input : fsb_volume_size) * 1024' + name: + list_join: + - _ + - - get_input: OS::stack_name + - FSB2_Vol_1 + Internal2_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_enable_dhcp: + get_input: Internal2_dhcp + network_ipam_refs_data_ipam_subnets_default_gateway: + get_input: Internal2_net_gateway + network_ipam_refs_data_ipam_subnets_subnet: + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: + get_input: Internal2_net_cidr_len + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: + get_input: Internal2_net_cidr + network_name: + str_replace: + template: $VNF_NAME_int_net_2 + params: + $VNF_NAME: + get_input: vnf_name + network_ipam_refs: + - UNSUPPORTED_RESOURCE_template_NetworkIpam_Internal2 + int2_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: int2_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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: 132 + 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: 132 + 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: 132 + 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: 132 + 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_fsb_FSB1_Internal2 + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB2_Internal2 + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB1_Internal2 + node: abstract_ncb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_ncb_NCB2_Internal2 + node: abstract_ncb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb1_Internal2 + node: abstract_gpb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb2_Internal2 + node: abstract_gpb_1 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb3_Internal2 + node: abstract_gpb_2 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb4_Internal2 + node: abstract_gpb_3 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb5_Internal2 + node: abstract_gpb_4 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb6_Internal2 + node: abstract_gpb_5 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb7_Internal2 + node: abstract_gpb_6 + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_gpb_gpb8_Internal2 + node: abstract_gpb_7 + relationship: org.openecomp.relationships.AttachesTo + abstract_fsb_1: + type: org.openecomp.resource.abstract.nodes.fsb_1 + directives: + - substitutable + properties: + port_FSB_OAM_network_role_tag: + - oam + vm_flavor_name: + get_input: fsb_flavor_name + port_FSB_OAM_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: true + floating_ip_count_required: + is_required: false + port_FSB2_Internal1_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB2_Internal2_security_groups: + - - int2_security_group + compute_fsb_metadata: + - vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + port_FSB2_Internal1_mac_address: + get_input: fsb2_Internal1_mac + compute_fsb_scheduler_hints: + - group: VM_Affinity_group + compute_fsb_name: + - get_input: fsb_name_1 + port_FSB2_Internal1_security_groups: + - - int1_security_group + port_FSB_OAM_network: + - get_input: oam_net_name + port_FSB_OAM_security_groups: + - - oam_security_group + port_FSB2_Internal1_network: + - Internal1_net + port_FSB2_Internal2_mac_address: + get_input: fsb2_Internal1_mac + port_FSB2_Internal2_mac_requirements: + mac_count_required: + is_required: true + port_FSB_OAM_mac_requirements: + mac_count_required: + is_required: false + port_FSB2_Internal2_replacement_policy: + - AUTO + port_FSB2_Internal2_ip_requirements: + - ip_version: 4 + ip_count_required: + is_required: false + floating_ip_count_required: + is_required: false + port_FSB_OAM_replacement_policy: + - AUTO + port_FSB2_Internal2_network: + - Internal2_net + port_FSB2_Internal1_replacement_policy: + - AUTO + compute_fsb_availability_zone: + - get_input: availability_zone_1 + port_FSB_OAM_fixed_ips: + - ip_address: + get_input: fsb_oam_ip_1 + port_FSB2_Internal1_mac_requirements: + mac_count_required: + is_required: true + service_template_filter: + substitute_service_template: Nested_fsb_1ServiceTemplate.yaml + count: 1 + index_value: + get_property: + - SELF + - service_template_filter + - index_value + vm_type_tag: fsb + nfc_naming_code: fsb + requirements: + - link_fsb_FSB2_Internal1: + capability: tosca.capabilities.network.Linkable + node: Internal1_net + relationship: tosca.relationships.network.LinksTo + - link_fsb_FSB2_Internal2: + capability: tosca.capabilities.network.Linkable + node: Internal2_net + relationship: tosca.relationships.network.LinksTo + oam_security_group: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: $VNF_NAME_$SECGROUPNAME + params: + $SECGROUPNAME: + get_input: oam_sec_group_name + $VNF_NAME: + get_input: vnf_name + 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_fsb_FSB_OAM + node: abstract_fsb + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_fsb_FSB_OAM + node: abstract_fsb_1 + relationship: org.openecomp.relationships.AttachesTo + groups: + vmme_gpb3_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb3.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + base_vmme_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/base_vmme.yml + description: | + Base HOT template to create vmme 2 fsb 2 ncb + members: + - int2_security_group + - oam_security_group + - gtp_security_group + - Internal2_net + - int1_security_group + - Internal1_net + - abstract_ncb + - abstract_ncb_1 + - abstract_fsb + - abstract_fsb_1 + base_vmme_volume_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/base_vmme_volume.yml + description: HOT template for vMME Cinder Volumes + members: + - fsb_volume_0 + - fsb_volume_1 + vmme_gpb1_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb1.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_gpb4_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb4.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_gpb2_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_gpb2.yml + description: | + Module HOT template to create vmme 1-8 gpb + members: + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + VM_Affinity_group: + type: tosca.groups.Root + members: + - abstract_ncb + - abstract_ncb_1 + - abstract_vlc + - abstract_fsb + - abstract_fsb_1 + - abstract_gpb + - abstract_gpb_1 + - abstract_gpb_2 + - abstract_gpb_3 + - abstract_gpb_4 + - abstract_gpb_5 + - abstract_gpb_6 + - abstract_gpb_7 + vmme_vlc_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_vlc.yml + description: | + Module HOT template to create vmme 8 vlcs + members: + - abstract_vlc + outputs: + oam_management_v4_address: + description: ID of OAM VIP to be provisioned in A&AI + value: + get_input: vip_oam_management_v4_ip + fsb_volume_id_1: + description: ID of Cinder Volume for FSB2 + value: fsb_volume_1 + security_group_sctp_b_id: + description: ID of sctpb_security_group + value: UNSUPPORTED_RESOURCE_sctpb_security_group + service_instance_id_0: + description: ID of Service Instance used for vLCs + value: UNSUPPORTED_RESOURCE_template_ServiceInstance_VLC + security_group_sctp_a_id: + description: ID of sctpa_security_group + value: UNSUPPORTED_RESOURCE_sctpa_security_group + fsb_volume_id_0: + description: ID of Cinder Volume for FSB1 + value: fsb_volume_0 + policies: + VM_Affinity_policy: + type: org.openecomp.policies.placement.Antilocate + properties: + container_type: host + targets: + - VM_Affinity_group -- cgit 1.2.3-korg