diff options
123 files changed, 1215 insertions, 1267 deletions
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/ArtifactUUIDFixConfiguration.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/ArtifactUUIDFixConfiguration.java index 1eb4b2a33f..5d5c85a2f9 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/ArtifactUUIDFixConfiguration.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/ArtifactUUIDFixConfiguration.java @@ -23,7 +23,7 @@ import org.openecomp.sdc.asdctool.impl.ArtifactUuidFix; import org.openecomp.sdc.be.config.CatalogModelSpringConfig; import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao; import org.openecomp.sdc.be.dao.config.DAOSpringConfig; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ToscaOperationFacade; import org.openecomp.sdc.be.tosca.CsarUtils; import org.openecomp.sdc.be.tosca.ToscaExportHandler; diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/CsarGeneratorConfiguration.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/CsarGeneratorConfiguration.java index a55d9656c2..fad14d8e16 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/CsarGeneratorConfiguration.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/CsarGeneratorConfiguration.java @@ -23,7 +23,7 @@ import org.openecomp.sdc.asdctool.impl.internal.tool.CsarGenerator; import org.openecomp.sdc.be.config.CatalogModelSpringConfig; import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao; import org.openecomp.sdc.be.dao.config.DAOSpringConfig; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ToscaOperationFacade; import org.openecomp.sdc.be.tosca.CsarUtils; import org.openecomp.sdc.be.tosca.ToscaExportHandler; diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/InternalToolConfiguration.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/InternalToolConfiguration.java index c0d65b2ebe..b0b46a90c9 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/InternalToolConfiguration.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/InternalToolConfiguration.java @@ -22,7 +22,7 @@ package org.openecomp.sdc.asdctool.configuration; import org.openecomp.sdc.asdctool.impl.internal.tool.DeleteComponentHandler; import org.openecomp.sdc.be.config.CatalogModelSpringConfig; import org.openecomp.sdc.be.dao.config.DAOSpringConfig; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.model.jsonjanusgraph.operations.NodeTypeOperation; import org.openecomp.sdc.be.model.jsonjanusgraph.operations.TopologyTemplateOperation; import org.springframework.context.annotation.Bean; diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/VrfObjectFixConfiguration.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/VrfObjectFixConfiguration.java index 4df895fb16..6013591ebd 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/VrfObjectFixConfiguration.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/VrfObjectFixConfiguration.java @@ -23,7 +23,7 @@ import org.openecomp.sdc.asdctool.impl.VrfObjectFixHandler; import org.openecomp.sdc.be.dao.DAOJanusGraphStrategy; import org.openecomp.sdc.be.dao.JanusGraphClientStrategy; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphClient; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/ArtifactUuidFix.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/ArtifactUuidFix.java index b256f122a7..d6aad24a24 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/ArtifactUuidFix.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/ArtifactUuidFix.java @@ -46,7 +46,7 @@ import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao; import org.openecomp.sdc.be.dao.cassandra.CassandraOperationStatus; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/VrfObjectFixHandler.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/VrfObjectFixHandler.java index cadab7f8a5..5623735ee1 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/VrfObjectFixHandler.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/VrfObjectFixHandler.java @@ -36,7 +36,7 @@ import org.apache.tinkerpop.gremlin.structure.Vertex; import org.openecomp.sdc.asdctool.migration.tasks.handlers.XlsOutputHandler; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; import org.openecomp.sdc.be.dao.jsongraph.types.EdgePropertyEnum; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/internal/tool/CsarGenerator.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/internal/tool/CsarGenerator.java index 2b655b0bfb..a34d9046e9 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/internal/tool/CsarGenerator.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/internal/tool/CsarGenerator.java @@ -32,7 +32,7 @@ import org.openecomp.sdc.asdctool.utils.ConsoleWriter; import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/internal/tool/DeleteComponentHandler.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/internal/tool/DeleteComponentHandler.java index b286ffd796..1a3234e1bc 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/internal/tool/DeleteComponentHandler.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/internal/tool/DeleteComponentHandler.java @@ -31,7 +31,7 @@ import org.janusgraph.core.JanusGraphVertex; import org.openecomp.sdc.asdctool.utils.ConsoleWriter; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum; diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/config/ValidationToolConfiguration.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/config/ValidationToolConfiguration.java index 05cdcd2ea2..8c0b28d986 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/config/ValidationToolConfiguration.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/config/ValidationToolConfiguration.java @@ -46,8 +46,8 @@ import org.openecomp.sdc.be.dao.config.DAOSpringConfig; import org.openecomp.sdc.be.dao.impl.HealingPipelineDao; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphClient; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphGenericDao; -import org.openecomp.sdc.be.dao.jsongraph.HealingJanusGraphDao; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.HealingJanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.model.DerivedNodeTypeResolver; import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ArchiveOperation; import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ByToscaNameDerivedNodeTypeResolver; diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/ArtifactValidatorExecutor.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/ArtifactValidatorExecutor.java index 367c2a97b0..531d54a466 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/ArtifactValidatorExecutor.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/ArtifactValidatorExecutor.java @@ -38,7 +38,7 @@ import java.util.Set; import java.util.stream.Collectors; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum; import org.openecomp.sdc.be.model.ArtifactDefinition; diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/NodeToscaArtifactsValidatorExecutor.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/NodeToscaArtifactsValidatorExecutor.java index 2b22963076..b8beb0813d 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/NodeToscaArtifactsValidatorExecutor.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/NodeToscaArtifactsValidatorExecutor.java @@ -22,7 +22,7 @@ package org.openecomp.sdc.asdctool.impl.validator.executor; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum; diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/ServiceToscaArtifactsValidatorExecutor.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/ServiceToscaArtifactsValidatorExecutor.java index 64401f7e38..99ba7726cc 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/ServiceToscaArtifactsValidatorExecutor.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/ServiceToscaArtifactsValidatorExecutor.java @@ -22,7 +22,7 @@ package org.openecomp.sdc.asdctool.impl.validator.executor; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum; diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/TopologyTemplateValidatorExecutor.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/TopologyTemplateValidatorExecutor.java index ab568c3c85..a4f540fe7c 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/TopologyTemplateValidatorExecutor.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/TopologyTemplateValidatorExecutor.java @@ -32,7 +32,7 @@ import org.openecomp.sdc.asdctool.impl.validator.tasks.TopologyTemplateValidatio import org.openecomp.sdc.asdctool.impl.validator.tasks.VfValidationTask; import org.openecomp.sdc.asdctool.impl.validator.utils.VertexResult; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum; diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/VFToscaArtifactValidatorExecutor.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/VFToscaArtifactValidatorExecutor.java index 8de7efc4d7..81f7f5d5be 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/VFToscaArtifactValidatorExecutor.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/VFToscaArtifactValidatorExecutor.java @@ -22,7 +22,7 @@ package org.openecomp.sdc.asdctool.impl.validator.executor; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum; diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/configuration/ArtifactUUIDFixConfigurationTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/configuration/ArtifactUUIDFixConfigurationTest.java index bc1c87d398..e9806106f2 100644 --- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/configuration/ArtifactUUIDFixConfigurationTest.java +++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/configuration/ArtifactUUIDFixConfigurationTest.java @@ -24,7 +24,7 @@ import org.junit.Test; import org.openecomp.sdc.asdctool.impl.ArtifactUuidFix; import org.openecomp.sdc.be.components.distribution.engine.ServiceDistributionArtifactsBuilder; import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ToscaOperationFacade; import org.openecomp.sdc.be.tosca.CsarUtils; import org.openecomp.sdc.be.tosca.ToscaExportHandler; diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/ArtifactUuidFixTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/ArtifactUuidFixTest.java index 4e17123bd7..51e5657b7f 100644 --- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/ArtifactUuidFixTest.java +++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/ArtifactUuidFixTest.java @@ -33,7 +33,7 @@ import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao; import org.openecomp.sdc.be.dao.cassandra.CassandraOperationStatus; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/VrfObjectFixHandlerTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/VrfObjectFixHandlerTest.java index 9e6b2e424e..05dbdd69e7 100644 --- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/VrfObjectFixHandlerTest.java +++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/VrfObjectFixHandlerTest.java @@ -27,7 +27,7 @@ import org.junit.runner.RunWith; import org.mockito.Mockito; import org.mockito.junit.MockitoJUnitRunner; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; import static org.assertj.core.api.Assertions.assertThat; diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/internal/tool/CsarGeneratorTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/internal/tool/CsarGeneratorTest.java index b3bd487b55..3558d279b3 100644 --- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/internal/tool/CsarGeneratorTest.java +++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/internal/tool/CsarGeneratorTest.java @@ -30,7 +30,7 @@ import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/internal/tool/DeleteComponentHandlerTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/internal/tool/DeleteComponentHandlerTest.java index b9cf317e70..de2657838b 100644 --- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/internal/tool/DeleteComponentHandlerTest.java +++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/internal/tool/DeleteComponentHandlerTest.java @@ -39,7 +39,7 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.MockitoJUnitRunner; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum; import org.openecomp.sdc.be.model.jsonjanusgraph.datamodel.TopologyTemplate; diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/ArtifactToolBLTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/ArtifactToolBLTest.java index 79166e552c..d5251ac40f 100644 --- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/ArtifactToolBLTest.java +++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/ArtifactToolBLTest.java @@ -24,7 +24,7 @@ import org.junit.jupiter.api.Test; import org.mockito.Mockito; import org.openecomp.sdc.asdctool.impl.validator.executor.IArtifactValidatorExecutor; import org.openecomp.sdc.asdctool.impl.validator.executor.NodeToscaArtifactsValidatorExecutor; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ToscaOperationFacade; import java.util.ArrayList; diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/ValidationToolBLTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/ValidationToolBLTest.java index 529a9b6768..b2b3ab6e1c 100644 --- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/ValidationToolBLTest.java +++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/ValidationToolBLTest.java @@ -27,7 +27,7 @@ import org.openecomp.sdc.asdctool.impl.validator.executor.TopologyTemplateValida import org.openecomp.sdc.asdctool.impl.validator.executor.ValidatorExecutor; import org.openecomp.sdc.asdctool.impl.validator.report.Report; import org.openecomp.sdc.asdctool.impl.validator.report.ReportFile; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import java.util.ArrayList; import java.util.List; diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/config/ValidationToolConfigurationTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/config/ValidationToolConfigurationTest.java index 9efd4c4893..a3f0d8e407 100644 --- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/config/ValidationToolConfigurationTest.java +++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/config/ValidationToolConfigurationTest.java @@ -35,7 +35,7 @@ import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao; import org.openecomp.sdc.be.dao.cassandra.CassandraClient; import org.openecomp.sdc.be.dao.impl.HealingPipelineDao; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphClient; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.model.DerivedNodeTypeResolver; import org.openecomp.sdc.be.model.jsonjanusgraph.operations.GroupsOperation; import org.openecomp.sdc.be.model.jsonjanusgraph.operations.NodeTypeOperation; diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/ArtifactValidatorExecutorContract.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/ArtifactValidatorExecutorContract.java index 21a931cc86..621b832898 100644 --- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/ArtifactValidatorExecutorContract.java +++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/ArtifactValidatorExecutorContract.java @@ -29,7 +29,7 @@ import java.util.List; import java.util.Map; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum; import org.openecomp.sdc.be.model.Component; diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/IArtifactValidatorExecutorContract.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/IArtifactValidatorExecutorContract.java index 35c6ac1173..8af265e715 100644 --- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/IArtifactValidatorExecutorContract.java +++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/IArtifactValidatorExecutorContract.java @@ -22,7 +22,7 @@ package org.openecomp.sdc.asdctool.impl.validator.executor; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ToscaOperationFacade; import static org.mockito.Mockito.mock; diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/NodeToscaArtifactsValidatorExecutorTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/NodeToscaArtifactsValidatorExecutorTest.java index b189b27d97..d75bd8958f 100644 --- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/NodeToscaArtifactsValidatorExecutorTest.java +++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/NodeToscaArtifactsValidatorExecutorTest.java @@ -20,7 +20,7 @@ package org.openecomp.sdc.asdctool.impl.validator.executor; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ToscaOperationFacade; public class NodeToscaArtifactsValidatorExecutorTest diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/ServiceToscaArtifactsValidatorExecutorTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/ServiceToscaArtifactsValidatorExecutorTest.java index ef35d45e63..314f54dcf6 100644 --- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/ServiceToscaArtifactsValidatorExecutorTest.java +++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/ServiceToscaArtifactsValidatorExecutorTest.java @@ -20,7 +20,7 @@ package org.openecomp.sdc.asdctool.impl.validator.executor; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ToscaOperationFacade; public class ServiceToscaArtifactsValidatorExecutorTest diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/VFToscaArtifactValidatorExecutorTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/VFToscaArtifactValidatorExecutorTest.java index 3beec33e50..ca6c7fc250 100644 --- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/VFToscaArtifactValidatorExecutorTest.java +++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/VFToscaArtifactValidatorExecutorTest.java @@ -20,7 +20,7 @@ package org.openecomp.sdc.asdctool.impl.validator.executor; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ToscaOperationFacade; public class VFToscaArtifactValidatorExecutorTest diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/ValidatorExecutorTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/ValidatorExecutorTest.java index faab454a79..3f8b4af9ba 100644 --- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/ValidatorExecutorTest.java +++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executor/ValidatorExecutorTest.java @@ -21,7 +21,7 @@ package org.openecomp.sdc.asdctool.impl.validator.executor; import org.junit.jupiter.api.Test; import org.openecomp.sdc.asdctool.impl.validator.report.Report; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import java.util.ArrayList; import java.util.function.Function; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/csar/YamlTemplateParsingHandler.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/csar/YamlTemplateParsingHandler.java index 6a56da2c4d..0006f833b2 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/csar/YamlTemplateParsingHandler.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/csar/YamlTemplateParsingHandler.java @@ -78,7 +78,7 @@ import org.openecomp.sdc.be.components.impl.exceptions.ByActionStatusComponentEx import org.openecomp.sdc.be.components.utils.PropertiesUtils; import org.openecomp.sdc.be.config.BeEcompErrorManager; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datatypes.elements.CapabilityDataDefinition; import org.openecomp.sdc.be.datatypes.elements.GetInputValueDataDefinition; import org.openecomp.sdc.be.datatypes.elements.PolicyTargetType; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArchiveBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArchiveBusinessLogic.java index 58a0ebf41a..19afff0668 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArchiveBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArchiveBusinessLogic.java @@ -35,7 +35,7 @@ import org.openecomp.sdc.be.catalog.enums.ChangeTypeEnum; import org.openecomp.sdc.be.components.impl.exceptions.ByActionStatusComponentException; import org.openecomp.sdc.be.components.validation.AccessValidations; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.OriginTypeEnum; import org.openecomp.sdc.be.facade.operations.CatalogOperation; 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 3cb76806c8..db03c72778 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 @@ -43,7 +43,7 @@ import org.openecomp.sdc.be.config.BeEcompErrorManager.ErrorSeverity; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphGenericDao; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datamodel.utils.ArtifactUtils; import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition; import org.openecomp.sdc.be.datatypes.elements.PropertyRule; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/GroupTypeBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/GroupTypeBusinessLogic.java index 5ee62c0b19..055abdc765 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/GroupTypeBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/GroupTypeBusinessLogic.java @@ -32,11 +32,11 @@ import org.openecomp.sdc.be.components.impl.exceptions.ByActionStatusComponentEx import org.openecomp.sdc.be.components.validation.UserValidations; import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; -import org.openecomp.sdc.be.impl.ComponentsUtils; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.model.GroupTypeDefinition; import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; import org.openecomp.sdc.be.model.operations.impl.GroupTypeOperation; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @Component("groupTypeBusinessLogic") @@ -45,14 +45,12 @@ public class GroupTypeBusinessLogic { private final GroupTypeOperation groupTypeOperation; private final JanusGraphDao janusGraphDao; private final UserValidations userValidations; - private final ComponentsUtils componentsUtils; - public GroupTypeBusinessLogic(GroupTypeOperation groupTypeOperation, JanusGraphDao janusGraphDao, UserValidations userValidations, - ComponentsUtils componentsUtils) { + @Autowired + public GroupTypeBusinessLogic(GroupTypeOperation groupTypeOperation, JanusGraphDao janusGraphDao, UserValidations userValidations) { this.groupTypeOperation = groupTypeOperation; this.janusGraphDao = janusGraphDao; this.userValidations = userValidations; - this.componentsUtils = componentsUtils; } public List<GroupTypeDefinition> getAllGroupTypes(String userId, String internalComponentType, String internalComponentModel) { diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PolicyTypeBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PolicyTypeBusinessLogic.java index 1e0a55fd07..c7e6a98d92 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PolicyTypeBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PolicyTypeBusinessLogic.java @@ -29,31 +29,27 @@ import org.openecomp.sdc.be.components.impl.exceptions.ByActionStatusComponentEx import org.openecomp.sdc.be.components.validation.UserValidations; import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; -import org.openecomp.sdc.be.impl.ComponentsUtils; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.model.PolicyTypeDefinition; import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; import org.openecomp.sdc.be.model.operations.impl.PolicyTypeOperation; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; -@Component +@Component("policyTypeBusinessLogic") public class PolicyTypeBusinessLogic { private PolicyTypeOperation policyTypeOperation; private JanusGraphDao janusGraphDao; - private ComponentsUtils componentsUtils; private UserValidations userValidations; - public PolicyTypeBusinessLogic(PolicyTypeOperation policyTypeOperation, JanusGraphDao janusGraphDao, ComponentsUtils componentsUtils, - UserValidations userValidations) { + @Autowired + public PolicyTypeBusinessLogic(PolicyTypeOperation policyTypeOperation, JanusGraphDao janusGraphDao, UserValidations userValidations) { this.policyTypeOperation = policyTypeOperation; this.janusGraphDao = janusGraphDao; - this.componentsUtils = componentsUtils; this.userValidations = userValidations; } - @Transactional public List<PolicyTypeDefinition> getAllPolicyTypes(String userId, String internalComponentType, String modelName) { Set<String> excludedPolicyTypes = getExcludedPolicyTypes(internalComponentType); userValidations.validateUserExists(userId); 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 6185dc9b0e..9bb4f62f01 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 @@ -83,7 +83,7 @@ import org.openecomp.sdc.be.config.BeEcompErrorManager; import org.openecomp.sdc.be.config.BeEcompErrorManager.ErrorSeverity; import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datamodel.api.HighestFilterEnum; import org.openecomp.sdc.be.datamodel.utils.ArtifactUtils; import org.openecomp.sdc.be.datamodel.utils.UiComponentDataConverter; @@ -564,15 +564,18 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { preparedResource = updateExistingResourceByImport(newResource, oldResource, csarInfo.getModifier(), inTransaction, shouldLock, isNested).left; log.trace("YAML topology file found in CSAR, file name: {}, contents: {}", yamlFileName, yamlFileContent); - handleResourceGenericType(preparedResource, yamlFileContent, uploadComponentInstanceInfoMap, uploadComponentInstanceInfoMap.getSubstitutionMappingNodeType()); + handleResourceGenericType(preparedResource, yamlFileContent, uploadComponentInstanceInfoMap, + uploadComponentInstanceInfoMap.getSubstitutionMappingNodeType()); handleNodeTypes(yamlFileName, preparedResource, yamlFileContent, shouldLock, nodeTypesArtifactsToHandle, createdArtifacts, nodeTypesInfo, csarInfo, nodeName, newResource.getModel()); preparedResource = createInputsOnResource(preparedResource, uploadComponentInstanceInfoMap.getInputs()); Map<String, Resource> existingNodeTypesByResourceNames = new HashMap<>(); - final Map<String, UploadComponentInstanceInfo> instancesToCreate = getInstancesToCreate(uploadComponentInstanceInfoMap, newResource.getModel()); + final Map<String, UploadComponentInstanceInfo> instancesToCreate = getInstancesToCreate(uploadComponentInstanceInfoMap, + newResource.getModel()); preparedResource = createResourceInstances(yamlFileName, preparedResource, oldResource, instancesToCreate, csarInfo.getCreatedNodes(), existingNodeTypesByResourceNames); - preparedResource = createResourceInstancesRelations(csarInfo.getModifier(), yamlFileName, preparedResource, oldResource, instancesToCreate, + preparedResource = createResourceInstancesRelations(csarInfo.getModifier(), yamlFileName, preparedResource, oldResource, + instancesToCreate, existingNodeTypesByResourceNames); } catch (ComponentException e) { ResponseFormat responseFormat = @@ -718,28 +721,32 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { } return Either.left(resource); } - + private Resource handleResourceGenericType(Resource resource) { Resource genericResource = fetchAndSetDerivedFromGenericType(resource); - + if (resource.shouldGenerateInputs()) { generateAndAddInputsFromGenericTypeProperties(resource, genericResource); } return genericResource; } - private Resource handleResourceGenericType(final Resource resource, final String topologyTemplateYaml, final ParsedToscaYamlInfo parsedToscaYamlInfo, final String substitutionMappingNodeType) { + private Resource handleResourceGenericType(final Resource resource, final String topologyTemplateYaml, + final ParsedToscaYamlInfo parsedToscaYamlInfo, final String substitutionMappingNodeType) { if (processSubstitutableAsNodeType(resource, parsedToscaYamlInfo)) { - final Map<String, Object> substitutableAsNodeType = getSubstitutableAsNodeTypeFromTemplate((Map<String, Object>) new Yaml().load(topologyTemplateYaml), substitutionMappingNodeType); - final Resource genericResource = fetchAndSetDerivedFromGenericType(resource, (String)substitutableAsNodeType.get(TypeUtils.ToscaTagNamesEnum.DERIVED_FROM.getElementName())); - + final Map<String, Object> substitutableAsNodeType = getSubstitutableAsNodeTypeFromTemplate( + (Map<String, Object>) new Yaml().load(topologyTemplateYaml), substitutionMappingNodeType); + final Resource genericResource = fetchAndSetDerivedFromGenericType(resource, + (String) substitutableAsNodeType.get(TypeUtils.ToscaTagNamesEnum.DERIVED_FROM.getElementName())); + generatePropertiesFromGenericType(resource, genericResource); generatePropertiesFromNodeType(resource, substitutableAsNodeType); final String resourceId = resource.getUniqueId(); - resource.getProperties().forEach(propertyDefinition -> propertyDefinition.setUniqueId(UniqueIdBuilder.buildPropertyUniqueId(resourceId, propertyDefinition.getName()))); + resource.getProperties().forEach(propertyDefinition -> propertyDefinition.setUniqueId( + UniqueIdBuilder.buildPropertyUniqueId(resourceId, propertyDefinition.getName()))); createResourcePropertiesOnGraph(resource); return genericResource; - } + } return handleResourceGenericType(resource); } @@ -989,7 +996,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { if (!nodes.isEmpty()) { for (Entry<String, Object> nodeType : nodes.entrySet()) { final ImmutablePair<String, String> toscaResourceName = buildNestedToscaResourceName(ResourceTypeEnum.VFC.name(), vfResourceName, - nodeType.getKey()); + nodeType.getKey()); vfcToscaNames.put(nodeType.getKey(), toscaResourceName); } } @@ -1108,7 +1115,8 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { boolean needLock, Map<String, EnumMap<ArtifactOperationEnum, List<ArtifactDefinition>>> nodeTypesArtifactsToHandle, List<ArtifactDefinition> nodeTypesNewCreatedArtifacts, - Map<String, NodeTypeInfo> nodeTypesInfo, CsarInfo csarInfo, final String substitutableAsNodeType) { + Map<String, NodeTypeInfo> nodeTypesInfo, CsarInfo csarInfo, + final String substitutableAsNodeType) { Either<String, ResultStatusEnum> toscaVersion = findFirstToscaStringElement(mappedToscaTemplate, TypeUtils.ToscaTagNamesEnum.TOSCA_VERSION); if (toscaVersion.isRight()) { throw new ByActionStatusComponentException(ActionStatus.INVALID_TOSCA_TEMPLATE); @@ -1123,17 +1131,18 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { private Map<String, Object> getNodeTypesFromTemplate(final Map<String, Object> mappedToscaTemplate, final String substitutableAsNodeType) { final Map<String, Object> nodeTypes = getAllNodeTypesInTemplate(mappedToscaTemplate); - if (StringUtils.isNotEmpty(substitutableAsNodeType)){ - nodeTypes.remove(substitutableAsNodeType); + if (StringUtils.isNotEmpty(substitutableAsNodeType)) { + nodeTypes.remove(substitutableAsNodeType); } return nodeTypes; } - + @SuppressWarnings("unchecked") - private Map<String, Object> getSubstitutableAsNodeTypeFromTemplate(final Map<String, Object> mappedToscaTemplate, final String substitutableAsNodeType) { - return (Map<String, Object>)getAllNodeTypesInTemplate(mappedToscaTemplate).get(substitutableAsNodeType); + private Map<String, Object> getSubstitutableAsNodeTypeFromTemplate(final Map<String, Object> mappedToscaTemplate, + final String substitutableAsNodeType) { + return (Map<String, Object>) getAllNodeTypesInTemplate(mappedToscaTemplate).get(substitutableAsNodeType); } - + private Map<String, Object> getAllNodeTypesInTemplate(final Map<String, Object> mappedToscaTemplate) { return ImportUtils.findFirstToscaMapElement(mappedToscaTemplate, TypeUtils.ToscaTagNamesEnum.NODE_TYPES).left().orValue(HashMap::new); } @@ -1445,24 +1454,28 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { loggerSupportability.log(LoggerSupportabilityActions.CREATE_INPUTS, resource.getComponentMetadataForSupportLog(), StatusCode.STARTED, "Starting to add inputs from yaml: {}", yamlName); if (processSubstitutableAsNodeType(resource, parsedToscaYamlInfo)) { - final Map<String, Object> substitutableAsNodeType = getSubstitutableAsNodeTypeFromTemplate((Map<String, Object>) new Yaml().load(topologyTemplateYaml), parsedToscaYamlInfo.getSubstitutionMappingNodeType()); + final Map<String, Object> substitutableAsNodeType = getSubstitutableAsNodeTypeFromTemplate( + (Map<String, Object>) new Yaml().load(topologyTemplateYaml), parsedToscaYamlInfo.getSubstitutionMappingNodeType()); resource.setToscaResourceName(parsedToscaYamlInfo.getSubstitutionMappingNodeType()); - final Resource genericResource = fetchAndSetDerivedFromGenericType(resource, (String)substitutableAsNodeType.get(TypeUtils.ToscaTagNamesEnum.DERIVED_FROM.getElementName())); + final Resource genericResource = fetchAndSetDerivedFromGenericType(resource, + (String) substitutableAsNodeType.get(TypeUtils.ToscaTagNamesEnum.DERIVED_FROM.getElementName())); resource = createResourceTransaction(resource, csarInfo.getModifier(), isNormative); generatePropertiesFromGenericType(resource, genericResource); generatePropertiesFromNodeType(resource, substitutableAsNodeType); final String resourceId = resource.getUniqueId(); - resource.getProperties().forEach(propertyDefinition -> propertyDefinition.setUniqueId(UniqueIdBuilder.buildPropertyUniqueId(resourceId, propertyDefinition.getName()))); + resource.getProperties().forEach(propertyDefinition -> propertyDefinition.setUniqueId( + UniqueIdBuilder.buildPropertyUniqueId(resourceId, propertyDefinition.getName()))); createResourcePropertiesOnGraph(resource); final Map<String, UploadComponentInstanceInfo> instancesToCreate = getInstancesToCreate(parsedToscaYamlInfo, resource.getModel()); - + log.trace("************* Going to create nodes, RI's and Relations from yaml {}", yamlName); loggerSupportability .log(LoggerSupportabilityActions.CREATE_RESOURCE_FROM_YAML, resource.getComponentMetadataForSupportLog(), StatusCode.STARTED, "Start create nodes, RI and Relations from yaml: {}", yamlName); resource = createRIAndRelationsFromYaml(yamlName, resource, instancesToCreate, topologyTemplateYaml, - nodeTypesNewCreatedArtifacts, nodeTypesInfo, csarInfo, nodeTypesArtifactsToCreate, nodeName, parsedToscaYamlInfo.getSubstitutionMappingNodeType()); + nodeTypesNewCreatedArtifacts, nodeTypesInfo, csarInfo, nodeTypesArtifactsToCreate, nodeName, + parsedToscaYamlInfo.getSubstitutionMappingNodeType()); } else { final Resource genericResource = fetchAndSetDerivedFromGenericType(resource, null); resource = createResourceTransaction(resource, csarInfo.getModifier(), isNormative); @@ -1473,7 +1486,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { } final Map<String, InputDefinition> inputs = parsedToscaYamlInfo.getInputs(); resource = createInputsOnResource(resource, inputs); - + log.trace("************* Finish to add inputs from yaml {}", yamlName); loggerSupportability.log(LoggerSupportabilityActions.CREATE_INPUTS, resource.getComponentMetadataForSupportLog(), StatusCode.COMPLETE, "Finish to add inputs from yaml: {}", yamlName); @@ -1483,21 +1496,22 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { log.trace("************* Adding software information to PNF"); softwareInformationBusinessLogic.setSoftwareInformation(resource, csarInfo); log.trace("************* Removing non-mano software information file from PNF"); - if (csarInfo.getSoftwareInformationPath().isPresent() && !softwareInformationBusinessLogic.removeSoftwareInformationFile(csarInfo)) { + if (csarInfo.getSoftwareInformationPath().isPresent() && !softwareInformationBusinessLogic.removeSoftwareInformationFile( + csarInfo)) { log.warn(EcompLoggerErrorCode.BUSINESS_PROCESS_ERROR, ResourceBusinessLogic.class.getName(), "catalog-be", "Could not remove the software information file."); } } final Map<String, UploadComponentInstanceInfo> instancesToCreate = getInstancesToCreate(parsedToscaYamlInfo); - + log.trace("************* Going to create nodes, RI's and Relations from yaml {}", yamlName); loggerSupportability .log(LoggerSupportabilityActions.CREATE_RESOURCE_FROM_YAML, resource.getComponentMetadataForSupportLog(), StatusCode.STARTED, "Start create nodes, RI and Relations from yaml: {}", yamlName); resource = createRIAndRelationsFromYaml(yamlName, resource, instancesToCreate, topologyTemplateYaml, nodeTypesNewCreatedArtifacts, nodeTypesInfo, csarInfo, nodeTypesArtifactsToCreate, nodeName, null); - } - + } + log.trace("************* Finished to create nodes, RI and Relation from yaml {}", yamlName); loggerSupportability.log(LoggerSupportabilityActions.CREATE_RELATIONS, resource.getComponentMetadataForSupportLog(), StatusCode.COMPLETE, "Finished to create nodes, RI and Relation from yaml: {}", yamlName); @@ -1560,11 +1574,11 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { rollback(inTransaction, resource, createdArtifacts, nodeTypesNewCreatedArtifacts); throw new ByResponseFormatComponentException(e.getResponseFormat()); } catch (final ComponentException e) { - log.error(EcompLoggerErrorCode.SCHEMA_ERROR, ResourceBusinessLogic.class.getName(), - "An error has occurred during resource and resource instance creation", e); - rollback(inTransaction, resource, createdArtifacts, nodeTypesNewCreatedArtifacts); - throw new ByResponseFormatComponentException(e.getResponseFormat()); - } catch (final Exception e) { + log.error(EcompLoggerErrorCode.SCHEMA_ERROR, ResourceBusinessLogic.class.getName(), + "An error has occurred during resource and resource instance creation", e); + rollback(inTransaction, resource, createdArtifacts, nodeTypesNewCreatedArtifacts); + throw new ByResponseFormatComponentException(e.getResponseFormat()); + } catch (final Exception e) { log.error(EcompLoggerErrorCode.BUSINESS_PROCESS_ERROR, ResourceBusinessLogic.class.getName(), "An error has occurred during resource and resource instance creation", e); rollback(inTransaction, resource, createdArtifacts, nodeTypesNewCreatedArtifacts); @@ -1578,20 +1592,22 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { } } } - + private boolean processSubstitutableAsNodeType(final Resource resource, final ParsedToscaYamlInfo parsedToscaYamlInfo) { - return !resource.getResourceType().isAtomicType() && StringUtils.isNotEmpty(resource.getModel()) && parsedToscaYamlInfo.getSubstitutionMappingNodeType() != null; + return !resource.getResourceType().isAtomicType() && StringUtils.isNotEmpty(resource.getModel()) + && parsedToscaYamlInfo.getSubstitutionMappingNodeType() != null; } - + private Map<String, UploadComponentInstanceInfo> getInstancesToCreate(final ParsedToscaYamlInfo parsedToscaYamlInfo) { return getInstancesToCreate(parsedToscaYamlInfo, null); } - + private Map<String, UploadComponentInstanceInfo> getInstancesToCreate(final ParsedToscaYamlInfo parsedToscaYamlInfo, final String model) { if (StringUtils.isEmpty(model) || StringUtils.isEmpty(parsedToscaYamlInfo.getSubstitutionMappingNodeType())) { return parsedToscaYamlInfo.getInstances(); } - return parsedToscaYamlInfo.getInstances().entrySet().stream().filter(entry -> !parsedToscaYamlInfo.getSubstitutionMappingNodeType().equals(entry.getValue().getType())) + return parsedToscaYamlInfo.getInstances().entrySet().stream() + .filter(entry -> !parsedToscaYamlInfo.getSubstitutionMappingNodeType().equals(entry.getValue().getType())) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); } @@ -1778,7 +1794,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { } return resource; } - + private Resource generatePropertiesFromNodeType(final Resource resource, final Map<String, Object> nodeType) { final Either<Map<String, PropertyDefinition>, ResultStatusEnum> properties = ImportUtils.getProperties(nodeType); if (properties.isLeft()) { @@ -1794,20 +1810,21 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { } } resource.getProperties().addAll(propertiesList); - } + } return resource; } - + private Resource createResourcePropertiesOnGraph(final Resource resource) { final List<PropertyDefinition> resourceProperties = resource.getProperties(); - for (PropertyDefinition propertyDefinition: resourceProperties) { + for (PropertyDefinition propertyDefinition : resourceProperties) { final Either<PropertyDefinition, StorageOperationStatus> addPropertyEither = toscaOperationFacade - .addPropertyToComponent(propertyDefinition.getName(), propertyDefinition, resource); - + .addPropertyToComponent(propertyDefinition.getName(), propertyDefinition, resource); + if (addPropertyEither.isRight()) { final String error = String.format("failed to add properties from yaml: {}", addPropertyEither.right().value()); - loggerSupportability.log(LoggerSupportabilityActions.CREATE_PROPERTIES, resource.getComponentMetadataForSupportLog(), StatusCode.ERROR, - error); + loggerSupportability.log(LoggerSupportabilityActions.CREATE_PROPERTIES, resource.getComponentMetadataForSupportLog(), + StatusCode.ERROR, + error); throw new ByActionStatusComponentException(componentsUtils.convertFromStorageResponse(addPropertyEither.right().value()), error); } } @@ -2293,7 +2310,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { private boolean isValidArtifactType(ArtifactDefinition artifact) { return artifact.getArtifactType() != null && ArtifactTypeEnum.parse(artifact.getArtifactType()) != ArtifactTypeEnum.VENDOR_LICENSE - && ArtifactTypeEnum.parse(artifact.getArtifactType()) != ArtifactTypeEnum.VF_LICENSE; + && ArtifactTypeEnum.parse(artifact.getArtifactType()) != ArtifactTypeEnum.VF_LICENSE; } private Resource createResourceInstancesRelations(User user, String yamlName, Resource resource, Resource oldResource, @@ -2509,7 +2526,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { .getResponseFormatByResource(componentsUtils.convertFromStorageResponse(getResourceRes.right().value()), resource); throw new ByResponseFormatComponentException(responseFormat); } - + } private void addRelationsToRI(String yamlName, Resource resource, Map<String, UploadComponentInstanceInfo> uploadResInstancesMap, @@ -2677,7 +2694,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { Either<Resource, StorageOperationStatus> updateRes = null; Map<ComponentInstance, Map<String, List<CapabilityDefinition>>> updatedInstCapabilities = new HashMap<>(); Map<ComponentInstance, Map<String, List<RequirementDefinition>>> updatedInstRequirements = new HashMap<>(); - + StorageOperationStatus status = toscaOperationFacade.deleteAllCalculatedCapabilitiesRequirements(resource.getUniqueId()); if (status != StorageOperationStatus.OK && status != StorageOperationStatus.NOT_FOUND) { log.debug("Failed to delete all calculated capabilities and requirements of resource {} upon update. Status is {}", @@ -2700,23 +2717,24 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { } return updateRes; } - + private Either<Resource, StorageOperationStatus> updateCalculatedCapReqWithSubstitutionMappingsForVf(final Resource resource, - final Map<String, UploadComponentInstanceInfo> uploadResInstancesMap) { + final Map<String, UploadComponentInstanceInfo> uploadResInstancesMap) { Either<Resource, StorageOperationStatus> updateRes = null; final Map<ComponentInstance, Map<String, List<CapabilityDefinition>>> updatedInstCapabilities = new HashMap<>(); final Map<ComponentInstance, Map<String, List<RequirementDefinition>>> updatedInstRequirements = new HashMap<>(); - + resource.getComponentInstances().forEach(i -> { setExternalCapabilities(updatedInstCapabilities, i, uploadResInstancesMap.get(i.getName()).getCapabilitiesNamesToUpdate()); setExternalRequirements(updatedInstRequirements, i, uploadResInstancesMap.get(i.getName()).getRequirementsNamesToUpdate()); }); - final StorageOperationStatus status = toscaOperationFacade.updateCalculatedCapabilitiesRequirements(updatedInstCapabilities, updatedInstRequirements, resource); + final StorageOperationStatus status = toscaOperationFacade.updateCalculatedCapabilitiesRequirements(updatedInstCapabilities, + updatedInstRequirements, resource); if (status != StorageOperationStatus.OK) { log.debug( - "Failed to update capabilities and requirements of resource {}. Status is {}", - resource.getUniqueId(), status); + "Failed to update capabilities and requirements of resource {}. Status is {}", + resource.getUniqueId(), status); updateRes = Either.right(status); } @@ -2743,7 +2761,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { if (isNotEmpty(requirementsNamesToUpdate)) { for (Map.Entry<String, List<RequirementDefinition>> requirements : instance.getRequirements().entrySet()) { updatedRequirements.put(requirements.getKey(), requirements.getValue().stream().filter( - r -> requirementsNamesToUpdate.containsKey(r.getName()) && !updatedReqNames.contains(requirementsNamesToUpdate.get(r.getName()))) + r -> requirementsNamesToUpdate.containsKey(r.getName()) && !updatedReqNames.contains(requirementsNamesToUpdate.get(r.getName()))) .map(r -> { r.setParentName(r.getName()); r.setName(requirementsNamesToUpdate.get(r.getName())); @@ -2756,48 +2774,48 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { updatedInstRequirements.put(instance, updatedRequirements); } } - + private void setExternalRequirements( - final Map<ComponentInstance, Map<String, List<RequirementDefinition>>> updatedInstRequirements, - final ComponentInstance instance, final Map<String, String> requirementsNamesToUpdate) { + final Map<ComponentInstance, Map<String, List<RequirementDefinition>>> updatedInstRequirements, + final ComponentInstance instance, final Map<String, String> requirementsNamesToUpdate) { final Map<String, List<RequirementDefinition>> updatedRequirements = new HashMap<>(); final Set<String> updatedReqNames = new HashSet<>(); if (isNotEmpty(requirementsNamesToUpdate)) { for (Map.Entry<String, List<RequirementDefinition>> requirements : instance.getRequirements().entrySet()) { updatedRequirements.put(requirements.getKey(), - requirements.getValue().stream() - .filter(r -> requirementsNamesToUpdate.containsKey(r.getName()) - && !updatedReqNames.contains(requirementsNamesToUpdate.get(r.getName()))) - .map(r -> { - r.setExternal(true); - r.setExternalName(requirementsNamesToUpdate.get(r.getName())); - updatedReqNames.add(r.getName()); - return r; - }).collect(toList())); + requirements.getValue().stream() + .filter(r -> requirementsNamesToUpdate.containsKey(r.getName()) + && !updatedReqNames.contains(requirementsNamesToUpdate.get(r.getName()))) + .map(r -> { + r.setExternal(true); + r.setExternalName(requirementsNamesToUpdate.get(r.getName())); + updatedReqNames.add(r.getName()); + return r; + }).collect(toList())); } } if (isNotEmpty(updatedRequirements)) { updatedInstRequirements.put(instance, updatedRequirements); } } - + private void setExternalCapabilities( - final Map<ComponentInstance, Map<String, List<CapabilityDefinition>>> updatedInstCapabilties, - final ComponentInstance instance, Map<String, String> capabilitiesNamesToUpdate) { + final Map<ComponentInstance, Map<String, List<CapabilityDefinition>>> updatedInstCapabilties, + final ComponentInstance instance, Map<String, String> capabilitiesNamesToUpdate) { final Map<String, List<CapabilityDefinition>> updatedCapabilities = new HashMap<>(); final Set<String> updatedCapNames = new HashSet<>(); if (isNotEmpty(capabilitiesNamesToUpdate)) { for (Map.Entry<String, List<CapabilityDefinition>> requirements : instance.getCapabilities().entrySet()) { updatedCapabilities.put(requirements.getKey(), - requirements.getValue().stream() - .filter(c -> capabilitiesNamesToUpdate.containsKey(c.getName()) - && !updatedCapNames.contains(capabilitiesNamesToUpdate.get(c.getName()))) - .map(c -> { - c.setExternal(true); - c.setExternalName(capabilitiesNamesToUpdate.get(c.getName())); - updatedCapNames.add(c.getName()); - return c; - }).collect(toList())); + requirements.getValue().stream() + .filter(c -> capabilitiesNamesToUpdate.containsKey(c.getName()) + && !updatedCapNames.contains(capabilitiesNamesToUpdate.get(c.getName()))) + .map(c -> { + c.setExternal(true); + c.setExternalName(capabilitiesNamesToUpdate.get(c.getName())); + updatedCapNames.add(c.getName()); + return c; + }).collect(toList())); } } if (isNotEmpty(updatedCapabilities)) { @@ -2812,7 +2830,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { if (isNotEmpty(capabilitiesNamesToUpdate)) { for (Map.Entry<String, List<CapabilityDefinition>> requirements : instance.getCapabilities().entrySet()) { updatedCapabilities.put(requirements.getKey(), requirements.getValue().stream().filter( - c -> capabilitiesNamesToUpdate.containsKey(c.getName()) && !updatedCapNames.contains(capabilitiesNamesToUpdate.get(c.getName()))) + c -> capabilitiesNamesToUpdate.containsKey(c.getName()) && !updatedCapNames.contains(capabilitiesNamesToUpdate.get(c.getName()))) .map(c -> { c.setParentName(c.getName()); c.setName(capabilitiesNamesToUpdate.get(c.getName())); @@ -2851,19 +2869,19 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { for (UploadReqInfo uploadRegInfo : uploadRegInfoList) { log.debug("Going to create relation {}", uploadRegInfo.getName()); loggerSupportability - .log(LoggerSupportabilityActions.CREATE_RELATIONS, resource.getComponentMetadataForSupportLog(), StatusCode.STARTED, - "Started to create relations on instance: {}", uploadRegInfo.getName()); + .log(LoggerSupportabilityActions.CREATE_RELATIONS, resource.getComponentMetadataForSupportLog(), StatusCode.STARTED, + "Started to create relations on instance: {}", uploadRegInfo.getName()); String regName = uploadRegInfo.getName(); RequirementCapabilityRelDef regCapRelDef = new RequirementCapabilityRelDef(); regCapRelDef.setFromNode(resourceInstanceId); log.debug("try to find available requirement {} ", regName); Either<RequirementDefinition, ResponseFormat> eitherReqStatus = findAviableRequiremen(regName, yamlName, nodesInfoValue, - currentCompInstance, uploadRegInfo.getCapabilityName()); + currentCompInstance, uploadRegInfo.getCapabilityName()); if (eitherReqStatus.isRight()) { log.debug("failed to find available requirement {} status is {}", regName, eitherReqStatus.right().value()); loggerSupportability - .log(LoggerSupportabilityActions.CREATE_RELATIONS, resource.getComponentMetadataForSupportLog(), StatusCode.ERROR, - "ERROR while search available requirement {} status is: {}", regName, eitherReqStatus.right().value()); + .log(LoggerSupportabilityActions.CREATE_RELATIONS, resource.getComponentMetadataForSupportLog(), StatusCode.ERROR, + "ERROR while search available requirement {} status is: {}", regName, eitherReqStatus.right().value()); return eitherReqStatus.right().value(); } RequirementDefinition validReq = eitherReqStatus.left().value(); @@ -2888,11 +2906,11 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { if (currentCapCompInstance == null) { log.debug("The component instance with name {} not found on resource {} ", uploadRegInfo.getNode(), resource.getUniqueId()); loggerSupportability - .log(LoggerSupportabilityActions.CREATE_RELATIONS, resource.getComponentMetadataForSupportLog(), StatusCode.ERROR, - "ERROR component instance with name: {} not found on resource: {}", uploadRegInfo.getNode(), resource.getUniqueId()); + .log(LoggerSupportabilityActions.CREATE_RELATIONS, resource.getComponentMetadataForSupportLog(), StatusCode.ERROR, + "ERROR component instance with name: {} not found on resource: {}", uploadRegInfo.getNode(), resource.getUniqueId()); BeEcompErrorManager.getInstance() - .logInternalDataError(COMPONENT_INSTANCE_WITH_NAME + uploadRegInfo.getNode() + IN_RESOURCE, resource.getUniqueId(), - ErrorSeverity.ERROR); + .logInternalDataError(COMPONENT_INSTANCE_WITH_NAME + uploadRegInfo.getNode() + IN_RESOURCE, resource.getUniqueId(), + ErrorSeverity.ERROR); return componentsUtils.getResponseFormat(ActionStatus.NOT_TOPOLOGY_TOSCA_TEMPLATE, yamlName); } regCapRelDef.setToNode(currentCapCompInstance.getUniqueId()); @@ -2900,14 +2918,14 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { CapabilityDefinition aviableCapForRel = findAvailableCapabilityByTypeOrName(validReq, currentCapCompInstance, uploadRegInfo); if (aviableCapForRel == null) { log.debug("aviable capability was not found. req name is {} component instance is {}", validReq.getName(), - currentCapCompInstance.getUniqueId()); + currentCapCompInstance.getUniqueId()); loggerSupportability - .log(LoggerSupportabilityActions.CREATE_RELATIONS, resource.getComponentMetadataForSupportLog(), StatusCode.ERROR, - "ERROR available capability was not found. req name is: {} component instance is: {}", validReq.getName(), - currentCapCompInstance.getUniqueId()); + .log(LoggerSupportabilityActions.CREATE_RELATIONS, resource.getComponentMetadataForSupportLog(), StatusCode.ERROR, + "ERROR available capability was not found. req name is: {} component instance is: {}", validReq.getName(), + currentCapCompInstance.getUniqueId()); BeEcompErrorManager.getInstance().logInternalDataError( - "aviable capability was not found. req name is " + validReq.getName() + " component instance is " + currentCapCompInstance - .getUniqueId(), resource.getUniqueId(), ErrorSeverity.ERROR); + "aviable capability was not found. req name is " + validReq.getName() + " component instance is " + currentCapCompInstance + .getUniqueId(), resource.getUniqueId(), ErrorSeverity.ERROR); return componentsUtils.getResponseFormat(ActionStatus.NOT_TOPOLOGY_TOSCA_TEMPLATE, yamlName); } reqAndRelationshipPair.setCapability(aviableCapForRel.getName()); diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/utils/ExceptionUtils.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/utils/ExceptionUtils.java index 316b82b94e..381cdf9681 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/utils/ExceptionUtils.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/utils/ExceptionUtils.java @@ -25,7 +25,7 @@ import org.openecomp.sdc.be.components.impl.exceptions.ByActionStatusComponentEx import org.openecomp.sdc.be.components.impl.exceptions.ByResponseFormatComponentException; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.model.operations.StorageException; import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; import org.openecomp.sdc.exception.ResponseFormat; 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 757c789d5c..f33a87b696 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 @@ -29,7 +29,7 @@ import org.openecomp.sdc.be.components.impl.ServiceBusinessLogic; import org.openecomp.sdc.be.components.impl.exceptions.ByResponseFormatComponentException; import org.openecomp.sdc.be.config.BeEcompErrorManager; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datatypes.elements.ComponentInstanceDataDefinition; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.impl.ComponentsUtils; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/CheckinTransition.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/CheckinTransition.java index 61243d4aba..985dabc2a0 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/CheckinTransition.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/CheckinTransition.java @@ -25,7 +25,7 @@ import org.openecomp.sdc.be.components.impl.ComponentBusinessLogic; import org.openecomp.sdc.be.components.impl.version.VesionUpdateHandler; import org.openecomp.sdc.be.config.BeEcompErrorManager; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; import org.openecomp.sdc.be.impl.ComponentsUtils; 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 44505ec10c..90778105af 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 @@ -25,7 +25,7 @@ import java.util.List; import org.openecomp.sdc.be.components.impl.ComponentBusinessLogic; import org.openecomp.sdc.be.config.BeEcompErrorManager; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; 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 bd3923e9ac..a4cac10cea 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 @@ -27,7 +27,7 @@ import org.openecomp.sdc.be.components.impl.ComponentBusinessLogic; import org.openecomp.sdc.be.components.lifecycle.LifecycleChangeInfoWithAction.LifecycleChanceActionEnum; import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datatypes.components.ResourceMetadataDataDefinition; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; 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 6f4c6416f0..8b01ff1853 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 @@ -37,7 +37,7 @@ import org.openecomp.sdc.be.components.impl.exceptions.ComponentException; import org.openecomp.sdc.be.components.impl.version.VesionUpdateHandler; import org.openecomp.sdc.be.components.lifecycle.LifecycleChangeInfoWithAction.LifecycleChanceActionEnum; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; import org.openecomp.sdc.be.facade.operations.CatalogOperation; 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 0502741e7e..c8b50d28a6 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 @@ -25,7 +25,7 @@ import org.openecomp.sdc.be.catalog.enums.ChangeTypeEnum; import org.openecomp.sdc.be.components.impl.ComponentBusinessLogic; import org.openecomp.sdc.be.config.BeEcompErrorManager; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.facade.operations.CatalogOperation; import org.openecomp.sdc.be.impl.ComponentsUtils; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/upgrade/UpgradeBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/upgrade/UpgradeBusinessLogic.java index fb8c873240..2f9fb78163 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/upgrade/UpgradeBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/upgrade/UpgradeBusinessLogic.java @@ -31,7 +31,7 @@ import org.openecomp.sdc.be.components.lifecycle.LifecycleBusinessLogic; import org.openecomp.sdc.be.components.lifecycle.LifecycleChangeInfoWithAction; import org.openecomp.sdc.be.components.validation.UserValidations; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; import org.openecomp.sdc.be.impl.ComponentsUtils; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/filters/BeServletFilter.java b/catalog-be/src/main/java/org/openecomp/sdc/be/filters/BeServletFilter.java index ea1df86906..ddf9e8fbd1 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/filters/BeServletFilter.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/filters/BeServletFilter.java @@ -35,7 +35,7 @@ import org.openecomp.sdc.be.config.BeEcompErrorManager; import org.openecomp.sdc.be.config.Configuration; import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.dao.jsongraph.HealingJanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.HealingJanusGraphDao; import org.openecomp.sdc.be.impl.ComponentsUtils; import org.openecomp.sdc.be.impl.WebAppContextWrapper; import org.openecomp.sdc.common.api.Constants; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/MockGenerator.java b/catalog-be/src/test/java/org/openecomp/sdc/be/MockGenerator.java index 562d2676c8..7962da901c 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/MockGenerator.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/MockGenerator.java @@ -22,7 +22,7 @@ package org.openecomp.sdc.be; import org.openecomp.sdc.be.auditing.impl.AuditingManager; import org.openecomp.sdc.be.components.impl.utils.ExceptionUtils; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.impl.ComponentsUtils; import static org.mockito.Mockito.mock; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/BaseServiceBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/BaseServiceBusinessLogicTest.java index d5fe4f159e..268534a67a 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/BaseServiceBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/BaseServiceBusinessLogicTest.java @@ -47,7 +47,7 @@ import org.openecomp.sdc.be.components.utils.ComponentBusinessLogicMock; import org.openecomp.sdc.be.components.validation.ServiceDistributionValidation; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.cassandra.AuditCassandraDao; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datamodel.utils.UiComponentDataConverter; import org.openecomp.sdc.be.datatypes.elements.ForwardingPathDataDefinition; import org.openecomp.sdc.be.datatypes.elements.ForwardingPathElementDataDefinition; 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 9fc9d3034f..63bb0b8828 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 @@ -34,7 +34,7 @@ import org.openecomp.sdc.be.components.impl.PropertyBusinessLogic; import org.openecomp.sdc.be.components.impl.exceptions.BusinessLogicException; import org.openecomp.sdc.be.components.validation.UserValidations; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.impl.ComponentsUtils; import org.openecomp.sdc.be.impl.WebAppContextWrapper; import org.openecomp.sdc.be.model.Component; 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 56f5a928bf..0b2d1ba81e 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 @@ -41,7 +41,7 @@ import org.mockito.junit.MockitoJUnitRunner; import org.openecomp.sdc.be.components.validation.UserValidations; import org.openecomp.sdc.be.config.Configuration; import org.openecomp.sdc.be.config.ConfigurationManager; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; import org.openecomp.sdc.be.datatypes.elements.AdditionalInfoParameterInfo; import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; 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 fddb76efe6..f1a1aaaea1 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 @@ -47,7 +47,7 @@ import org.openecomp.sdc.be.config.ComponentType; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao; import org.openecomp.sdc.be.dao.cassandra.CassandraOperationStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datatypes.elements.ArtifactDataDefinition; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogicTest.java index 341dce9f49..1c680e5a15 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogicTest.java @@ -94,7 +94,7 @@ import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao; import org.openecomp.sdc.be.dao.cassandra.CassandraOperationStatus; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; import org.openecomp.sdc.be.datatypes.components.ResourceMetadataDataDefinition; import org.openecomp.sdc.be.datatypes.elements.ArtifactDataDefinition; 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 7db449df6a..c62d17c967 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 @@ -38,7 +38,7 @@ import org.junit.Test; import org.mockito.Mockito; import org.openecomp.sdc.be.components.validation.UserValidations; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.impl.ComponentsUtils; import org.openecomp.sdc.be.model.AttributeDefinition; import org.openecomp.sdc.be.model.Component; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/CapabilitiesBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/CapabilitiesBusinessLogicTest.java index 1783b35008..9bbe64f3f8 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/CapabilitiesBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/CapabilitiesBusinessLogicTest.java @@ -29,7 +29,7 @@ import org.openecomp.sdc.be.auditing.impl.AuditingManager; import org.openecomp.sdc.be.components.validation.CapabilitiesValidation; import org.openecomp.sdc.be.components.validation.UserValidations; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datatypes.elements.SchemaDefinition; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; 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 index 3029bf7bc1..99034f7785 100644 --- 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 @@ -73,7 +73,7 @@ import org.openecomp.sdc.be.components.validation.UserValidations; import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; import org.openecomp.sdc.be.datatypes.elements.CapabilityDataDefinition; import org.openecomp.sdc.be.datatypes.elements.ForwardingPathDataDefinition; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInterfaceOperationBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInterfaceOperationBusinessLogicTest.java index 0fd61845e6..93334d19dc 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInterfaceOperationBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInterfaceOperationBusinessLogicTest.java @@ -43,7 +43,7 @@ import org.openecomp.sdc.be.components.validation.ComponentValidations; import org.openecomp.sdc.be.components.validation.UserValidations; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphGenericDao; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datatypes.elements.ArtifactDataDefinition; import org.openecomp.sdc.be.datatypes.elements.OperationDataDefinition; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentNodeFilterBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentNodeFilterBusinessLogicTest.java index 91abd16259..a5ff6d9ce4 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentNodeFilterBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentNodeFilterBusinessLogicTest.java @@ -56,7 +56,7 @@ import org.openecomp.sdc.be.components.validation.UserValidations; import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphGenericDao; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datamodel.utils.ConstraintConvertor; import org.openecomp.sdc.be.datatypes.elements.CINodeFilterDataDefinition; import org.openecomp.sdc.be.datatypes.elements.ListDataDefinition; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentSubstitutionFilterBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentSubstitutionFilterBusinessLogicTest.java index 1d643b704c..ffda5ecd80 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentSubstitutionFilterBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentSubstitutionFilterBusinessLogicTest.java @@ -49,7 +49,7 @@ import org.openecomp.sdc.be.components.impl.utils.NodeFilterConstraintAction; import org.openecomp.sdc.be.components.validation.NodeFilterValidator; import org.openecomp.sdc.be.components.validation.UserValidations; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphGenericDao; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datamodel.utils.ConstraintConvertor; import org.openecomp.sdc.be.datatypes.elements.ListDataDefinition; import org.openecomp.sdc.be.datatypes.elements.RequirementSubstitutionFilterPropertyDataDefinition; @@ -58,7 +58,6 @@ 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.Component; -import org.openecomp.sdc.be.model.Resource; import org.openecomp.sdc.be.model.Service; import org.openecomp.sdc.be.model.PropertyDefinition; import org.openecomp.sdc.be.model.jsonjanusgraph.operations.SubstitutionFilterOperation; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ElementBLTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ElementBLTest.java index f312914400..53d48493fe 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ElementBLTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ElementBLTest.java @@ -33,7 +33,7 @@ import org.openecomp.sdc.be.components.validation.UserValidations; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphGenericDao; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; 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 f52ae209db..3fdc42fc21 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 @@ -35,7 +35,7 @@ import org.openecomp.sdc.be.components.impl.exceptions.ByResponseFormatComponent import org.openecomp.sdc.be.components.impl.exceptions.ComponentException; import org.openecomp.sdc.be.components.validation.UserValidations; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; import org.openecomp.sdc.be.impl.ComponentsUtils; 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 e7cadc4b98..35fae9dff5 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 @@ -60,7 +60,7 @@ import org.openecomp.sdc.be.config.Configuration; import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.impl.ComponentsUtils; 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 b9f6bf004c..9700a86f7e 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 @@ -54,7 +54,7 @@ import org.openecomp.sdc.be.components.validation.UserValidations; import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datatypes.elements.SchemaDefinition; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceOperationBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceOperationBusinessLogicTest.java index 724bf6ab34..5ff6f40797 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceOperationBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceOperationBusinessLogicTest.java @@ -48,7 +48,7 @@ import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao; import org.openecomp.sdc.be.dao.cassandra.CassandraOperationStatus; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datatypes.elements.SchemaDefinition; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/OutputsBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/OutputsBusinessLogicTest.java index 4c74b5f640..88d98de279 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/OutputsBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/OutputsBusinessLogicTest.java @@ -24,7 +24,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static org.junit.Assert.fail; import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyMap; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; @@ -32,47 +31,35 @@ import static org.mockito.Mockito.when; import fj.data.Either; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Optional; import java.util.stream.Collectors; import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.lang3.tuple.ImmutablePair; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Captor; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.openecomp.sdc.be.components.attribute.AttributeDeclarationOrchestrator; -import org.openecomp.sdc.be.components.impl.exceptions.ByActionStatusComponentException; import org.openecomp.sdc.be.components.impl.exceptions.ByResponseFormatComponentException; import org.openecomp.sdc.be.components.impl.exceptions.ComponentException; -import org.openecomp.sdc.be.components.utils.PropertyDataDefinitionBuilder; import org.openecomp.sdc.be.components.validation.UserValidations; import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; -import org.openecomp.sdc.be.datatypes.elements.SchemaDefinition; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; 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.Component; import org.openecomp.sdc.be.model.ComponentInstOutputsMap; import org.openecomp.sdc.be.model.ComponentInstance; import org.openecomp.sdc.be.model.ComponentInstanceOutput; import org.openecomp.sdc.be.model.ComponentInstanceAttribOutput; -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.OutputDefinition; import org.openecomp.sdc.be.model.LifecycleStateEnum; -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.cache.ApplicationDataTypeCache; @@ -81,7 +68,6 @@ import org.openecomp.sdc.be.model.operations.api.IGraphLockOperation; import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; import org.openecomp.sdc.be.model.operations.impl.AttributeOperation; import org.openecomp.sdc.be.user.UserBusinessLogic; -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; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/PolicyBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/PolicyBusinessLogicTest.java index a183d52913..8ee13e8e59 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/PolicyBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/PolicyBusinessLogicTest.java @@ -54,7 +54,7 @@ import org.openecomp.sdc.be.components.validation.UserValidations; import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datatypes.elements.PolicyTargetType; import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/PolicyPropertiesBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/PolicyPropertiesBusinessLogicTest.java index 0dbb69dfcb..0dd51e6611 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/PolicyPropertiesBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/PolicyPropertiesBusinessLogicTest.java @@ -38,7 +38,7 @@ import org.openecomp.sdc.be.components.utils.ResourceBuilder; import org.openecomp.sdc.be.components.validation.UserValidations; import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.impl.ComponentsUtils; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/PolicyTypeBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/PolicyTypeBusinessLogicTest.java index 7391d91309..88a16f6d96 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/PolicyTypeBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/PolicyTypeBusinessLogicTest.java @@ -43,7 +43,7 @@ import org.openecomp.sdc.be.components.impl.exceptions.ByResponseFormatComponent import org.openecomp.sdc.be.components.utils.PolicyTypeBuilder; import org.openecomp.sdc.be.components.validation.UserValidations; import org.openecomp.sdc.be.config.ConfigurationManager; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.impl.ComponentsUtils; import org.openecomp.sdc.be.model.PolicyTypeDefinition; import org.openecomp.sdc.be.model.User; 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 50e19c4338..42d4e4b2ad 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 @@ -34,7 +34,7 @@ import org.openecomp.sdc.be.components.utils.ComponentBusinessLogicMock; import org.openecomp.sdc.be.components.validation.UserValidations; import org.openecomp.sdc.be.components.validation.ValidationUtils; import org.openecomp.sdc.be.components.validation.component.ComponentNameValidator; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.impl.ComponentsUtils; import org.openecomp.sdc.be.model.Product; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/RequirementBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/RequirementBusinessLogicTest.java index 13e8e35faf..671715e721 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/RequirementBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/RequirementBusinessLogicTest.java @@ -30,7 +30,7 @@ import org.openecomp.sdc.be.auditing.impl.AuditingManager; import org.openecomp.sdc.be.components.validation.RequirementValidation; import org.openecomp.sdc.be.components.validation.UserValidations; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; import org.openecomp.sdc.be.impl.ComponentsUtils; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogicMockitoTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogicMockitoTest.java index 6920555697..fbb6539e3f 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogicMockitoTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogicMockitoTest.java @@ -45,7 +45,7 @@ package org.openecomp.sdc.be.components.impl; //import org.openecomp.sdc.be.components.merge.utils.MergeInstanceUtils; //import org.openecomp.sdc.be.components.validation.UserValidations; //import org.openecomp.sdc.be.dao.api.ActionStatus; -//import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +//import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; //import org.openecomp.sdc.be.datamodel.utils.UiComponentDataConverter; //import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; //import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; 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 b369773892..fda7c0807e 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 @@ -86,7 +86,7 @@ import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datamodel.api.HighestFilterEnum; import org.openecomp.sdc.be.datamodel.utils.UiComponentDataConverter; import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceBussinessLogicBaseTestSetup.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceBussinessLogicBaseTestSetup.java index a4a3b4d628..64b84d4b00 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceBussinessLogicBaseTestSetup.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceBussinessLogicBaseTestSetup.java @@ -60,7 +60,7 @@ import org.openecomp.sdc.be.components.validation.service.ServiceTypeValidator; import org.openecomp.sdc.be.components.validation.service.ServiceValidator; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.cassandra.AuditCassandraDao; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datamodel.utils.UiComponentDataConverter; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceImportBussinessLogicBaseTestSetup.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceImportBussinessLogicBaseTestSetup.java index a56114ae49..d309ccedd8 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceImportBussinessLogicBaseTestSetup.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceImportBussinessLogicBaseTestSetup.java @@ -34,7 +34,7 @@ import org.openecomp.sdc.be.components.validation.component.*; import org.openecomp.sdc.be.components.validation.service.*; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.cassandra.AuditCassandraDao; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datamodel.utils.UiComponentDataConverter; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/utils/YamlTemplateParsingHandlerTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/utils/YamlTemplateParsingHandlerTest.java index 3b7ffd70cf..65ad5fc1a6 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/utils/YamlTemplateParsingHandlerTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/utils/YamlTemplateParsingHandlerTest.java @@ -37,7 +37,7 @@ import org.openecomp.sdc.be.components.impl.AnnotationBusinessLogic; import org.openecomp.sdc.be.components.impl.GroupTypeBusinessLogic; import org.openecomp.sdc.be.components.impl.PolicyTypeBusinessLogic; import org.openecomp.sdc.be.components.validation.AnnotationValidator; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition; import org.openecomp.sdc.be.model.CapabilityDefinition; import org.openecomp.sdc.be.model.ComponentInstanceProperty; 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 6c4d27dd40..a6ead78dcf 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 @@ -38,7 +38,7 @@ import org.openecomp.sdc.be.components.validation.NodeFilterValidator; import org.openecomp.sdc.be.components.validation.ServiceDistributionValidation; import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datamodel.utils.UiComponentDataConverter; import org.openecomp.sdc.be.datatypes.components.ResourceMetadataDataDefinition; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/utils/MergeInstanceUtilsTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/utils/MergeInstanceUtilsTest.java index 381aced39b..4090f04e66 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/utils/MergeInstanceUtilsTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/utils/MergeInstanceUtilsTest.java @@ -31,7 +31,7 @@ import org.openecomp.sdc.be.components.utils.ComponentInstanceBuilder; import org.openecomp.sdc.be.components.utils.GroupDefinitionBuilder; import org.openecomp.sdc.be.components.utils.ResourceBuilder; import org.openecomp.sdc.be.components.utils.ServiceBuilder; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; import org.openecomp.sdc.be.model.Component; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/path/BaseForwardingPathTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/path/BaseForwardingPathTest.java index e2cba1ab30..62db6e283b 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/path/BaseForwardingPathTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/path/BaseForwardingPathTest.java @@ -33,7 +33,7 @@ import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphClient; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; import org.openecomp.sdc.be.datatypes.elements.ForwardingPathDataDefinition; import org.openecomp.sdc.be.datatypes.elements.ForwardingPathElementDataDefinition; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/path/utils/GraphTestUtils.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/path/utils/GraphTestUtils.java index 0456988beb..0c1399bc51 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/path/utils/GraphTestUtils.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/path/utils/GraphTestUtils.java @@ -26,7 +26,7 @@ import org.janusgraph.core.JanusGraph; import org.janusgraph.core.JanusGraphVertex; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; import org.openecomp.sdc.be.dao.jsongraph.utils.IdBuilderUtils; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/upgrade/UpgradeBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/upgrade/UpgradeBusinessLogicTest.java index dd16d1ae89..7b4e8d90d6 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/upgrade/UpgradeBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/upgrade/UpgradeBusinessLogicTest.java @@ -34,7 +34,7 @@ import org.openecomp.sdc.be.components.lifecycle.LifecycleBusinessLogic; import org.openecomp.sdc.be.components.lifecycle.LifecycleChangeInfoWithAction; import org.openecomp.sdc.be.components.validation.UserValidations; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datatypes.components.ResourceMetadataDataDefinition; import org.openecomp.sdc.be.datatypes.components.ServiceMetadataDataDefinition; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/ExternalRefServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/ExternalRefServletTest.java index 52d8ce976d..b9765f2c29 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/ExternalRefServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/ExternalRefServletTest.java @@ -68,7 +68,7 @@ import org.openecomp.sdc.be.dao.janusgraph.JanusGraphClient; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphGenericDao; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.HealingJanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.HealingJanusGraphDao; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; import org.openecomp.sdc.be.dto.ExternalRefDTO; import org.openecomp.sdc.be.impl.ComponentsUtils; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ArchiveEndpointTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ArchiveEndpointTest.java index 8a15f473c9..18cdb424f6 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ArchiveEndpointTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ArchiveEndpointTest.java @@ -67,7 +67,7 @@ import org.openecomp.sdc.be.dao.janusgraph.JanusGraphClient; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphGenericDao; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.HealingJanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.HealingJanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AutomatedUpgradeEndpointTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AutomatedUpgradeEndpointTest.java index 42ffa1af9f..6149d8de7d 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AutomatedUpgradeEndpointTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/AutomatedUpgradeEndpointTest.java @@ -53,7 +53,7 @@ import org.openecomp.sdc.be.components.upgrade.UpgradeStatus; import org.openecomp.sdc.be.components.validation.UserValidations; import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; import org.openecomp.sdc.be.impl.ComponentsUtils; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupTypesEndpointTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupTypesEndpointTest.java index e3de541376..a03f8d42c9 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupTypesEndpointTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/GroupTypesEndpointTest.java @@ -51,8 +51,8 @@ import org.openecomp.sdc.be.components.impl.GroupTypeBusinessLogic; import org.openecomp.sdc.be.components.utils.GroupTypeBuilder; import org.openecomp.sdc.be.components.validation.UserValidations; import org.openecomp.sdc.be.config.ConfigurationManager; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphGenericDao; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; import org.openecomp.sdc.be.datatypes.elements.GroupTypeDataDefinition; import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; import org.openecomp.sdc.be.impl.ComponentsUtils; @@ -108,7 +108,7 @@ class GroupTypesEndpointTest extends JerseySpringBaseTest { @Bean GroupTypeBusinessLogic groupTypeBusinessLogic() { - return new GroupTypeBusinessLogic(groupTypeOperation(), janusGraphDao, userValidations, componentsUtils); + return new GroupTypeBusinessLogic(groupTypeOperation(), janusGraphDao, userValidations); } @Bean @@ -170,7 +170,8 @@ class GroupTypesEndpointTest extends JerseySpringBaseTest { void getGroupTypes_validUser_Success() { List<GroupTypeDefinition> testConfigGroupTypes = buildGroupTypesList(); List<GroupTypeDefinition> fetchedGroupTypes = buildGetGroupTypesCall(USER_ID, COMPONENT_TYPE) - .get(new GenericType<>() {}); + .get(new GenericType<>() { + }); verifyGroupTypesList(testConfigGroupTypes, fetchedGroupTypes); } diff --git a/catalog-be/src/test/resources/paths/path-context.xml b/catalog-be/src/test/resources/paths/path-context.xml index f6306d0f67..752e4ecf13 100644 --- a/catalog-be/src/test/resources/paths/path-context.xml +++ b/catalog-be/src/test/resources/paths/path-context.xml @@ -21,18 +21,18 @@ Modifications copyright (c) 2018 Nokia ================================================================================ --> <beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:context="http://www.springframework.org/schema/context" - xmlns:aop="http://www.springframework.org/schema/aop" - xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:context="http://www.springframework.org/schema/context" + xmlns:aop="http://www.springframework.org/schema/aop" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd"> - <context:annotation-config/> - <aop:aspectj-autoproxy proxy-target-class="true"/> + <context:annotation-config/> + <aop:aspectj-autoproxy proxy-target-class="true"/> - <context:component-scan - base-package="org.openecomp.sdc.be.dao.impl, + <context:component-scan + base-package="org.openecomp.sdc.be.dao.impl, org.openecomp.sdc.be.dao.neo4j, org.openecomp.sdc.be.model.operations.impl, org.openecomp.sdc.be.model.cache, @@ -41,7 +41,7 @@ Modifications copyright (c) 2018 Nokia org.openecomp.sdc.be.impl, org.openecomp.sdc.be.auditing.impl, org.openecomp.sdc.be.components.impl, - org.openecomp.sdc.be.components.attribute, + org.openecomp.sdc.be.components.attribute, org.openecomp.sdc.be.components.merge, org.openecomp.sdc.be.components.property, org.openecomp.sdc.be.components.distribution.engine, @@ -60,31 +60,47 @@ Modifications copyright (c) 2018 Nokia org.openecomp.sdc.be.model.utils, org.openecomp.sdc.be.dao.jsongraph"> - </context:component-scan> - <bean id="tosca-operation-facade" class="org.openecomp.sdc.be.components.path.beans.ForwardingPathToscaOperationFacade" /> - <bean id="janusgraph-client" class="org.openecomp.sdc.be.components.path.beans.InMemoryJanusGraphClient" /> - <bean id="lifecycleBusinessLogic" class="org.openecomp.sdc.be.components.lifecycle.LifecycleBusinessLogic"/> - <bean id="userBusinessLogicExt" class="org.openecomp.sdc.be.user.UserBusinessLogicExt"/> - <bean id="asset-metadata-utils" class="org.openecomp.sdc.be.ecomp.converters.AssetMetadataConverter" /> - <bean class="org.openecomp.sdc.be.dao.config.DAOSpringConfig"/> - <bean id="cassandra-client" class="org.openecomp.sdc.be.components.path.beans.CassandraClientMock" /> - <bean id="audit-cassandra-dao" class="org.openecomp.sdc.be.components.path.beans.AuditCassandraDaoMock"/> - <bean id="artifact-cassandra-dao" class="org.openecomp.sdc.be.components.path.beans.ArtifactCassandraDaoMock"/> - <bean id="operational-environment-dao" class="org.openecomp.sdc.be.components.path.beans.EnvironmentCassandraDaoMock"/> - <bean id="sdc-schema-files-cassandra-dao" class="org.openecomp.sdc.be.components.path.beans.SdcSchemaFilesCassandraDaoMock"/> - <bean id="distributionEngine" class="org.openecomp.sdc.be.components.path.beans.DistributionEngineMock"/> - <bean id="forwardingPathValidator" class="org.openecomp.sdc.be.components.path.beans.ForwardingPathValidatorMock"/> - <bean id="dataTypeValidatorConverter" class="org.openecomp.sdc.be.model.tosca.validators.DataTypeValidatorConverter" /> - <bean id="sdcSchemaUtils" class="org.openecomp.sdc.be.dao.cassandra.schema.SdcSchemaUtils" /> - <bean id="dmaapProducer" class="org.openecomp.sdc.be.catalog.impl.DmaapProducer"/> - <bean id="catalogOperation" class="org.openecomp.sdc.be.facade.operations.CatalogOperation" /> - <bean id="userOperation" class="org.openecomp.sdc.be.facade.operations.UserOperation"/> - <bean id="dmaapProducerHealth" class="org.openecomp.sdc.be.catalog.impl.DmaapProducerHealth"/> - <bean id="feature_toggle_dao" class="org.openecomp.sdc.be.components.path.beans.FeatureToggleDaoMock"/> - <bean id="tosca-model-import-cassandra-dao" class="org.openecomp.sdc.be.components.path.beans.ToscaModelImportCassandraDaoMock"/> - <bean name="httpClient" class="org.apache.http.impl.client.HttpClients" factory-method="createDefault" /> - <bean class="org.openecomp.sdc.be.components.attribute.AttributeDeclarationOrchestrator"/> - <bean class="org.openecomp.sdc.be.components.attribute.ComponentInstanceOutputAttributeDeclarator"/> - <bean class="org.openecomp.sdc.be.components.attribute.ComponentInstanceAttributeDeclarator"/> + </context:component-scan> + <bean id="tosca-operation-facade" + class="org.openecomp.sdc.be.components.path.beans.ForwardingPathToscaOperationFacade"/> + <bean id="janusgraph-client" + class="org.openecomp.sdc.be.components.path.beans.InMemoryJanusGraphClient"/> + <bean id="lifecycleBusinessLogic" + class="org.openecomp.sdc.be.components.lifecycle.LifecycleBusinessLogic"/> + <bean id="userBusinessLogicExt" class="org.openecomp.sdc.be.user.UserBusinessLogicExt"/> + <bean id="asset-metadata-utils" + class="org.openecomp.sdc.be.ecomp.converters.AssetMetadataConverter"/> + <bean class="org.openecomp.sdc.be.dao.config.DAOSpringConfig"/> + <bean id="cassandra-client" + class="org.openecomp.sdc.be.components.path.beans.CassandraClientMock"/> + <bean id="audit-cassandra-dao" + class="org.openecomp.sdc.be.components.path.beans.AuditCassandraDaoMock"/> + <bean id="artifact-cassandra-dao" + class="org.openecomp.sdc.be.components.path.beans.ArtifactCassandraDaoMock"/> + <bean id="operational-environment-dao" + class="org.openecomp.sdc.be.components.path.beans.EnvironmentCassandraDaoMock"/> + <bean id="sdc-schema-files-cassandra-dao" + class="org.openecomp.sdc.be.components.path.beans.SdcSchemaFilesCassandraDaoMock"/> + <bean id="distributionEngine" + class="org.openecomp.sdc.be.components.path.beans.DistributionEngineMock"/> + <bean id="forwardingPathValidator" + class="org.openecomp.sdc.be.components.path.beans.ForwardingPathValidatorMock"/> + <bean id="dataTypeValidatorConverter" + class="org.openecomp.sdc.be.model.tosca.validators.DataTypeValidatorConverter"/> + <bean id="sdcSchemaUtils" class="org.openecomp.sdc.be.dao.cassandra.schema.SdcSchemaUtils"/> + <bean id="dmaapProducer" class="org.openecomp.sdc.be.catalog.impl.DmaapProducer"/> + <bean id="catalogOperation" class="org.openecomp.sdc.be.facade.operations.CatalogOperation"/> + <bean id="userOperation" class="org.openecomp.sdc.be.facade.operations.UserOperation"/> + <bean id="dmaapProducerHealth" class="org.openecomp.sdc.be.catalog.impl.DmaapProducerHealth"/> + <bean id="feature_toggle_dao" + class="org.openecomp.sdc.be.components.path.beans.FeatureToggleDaoMock"/> + <bean id="tosca-model-import-cassandra-dao" + class="org.openecomp.sdc.be.components.path.beans.ToscaModelImportCassandraDaoMock"/> + <bean name="httpClient" class="org.apache.http.impl.client.HttpClients" + factory-method="createDefault"/> + <bean class="org.openecomp.sdc.be.components.attribute.AttributeDeclarationOrchestrator"/> + <bean + class="org.openecomp.sdc.be.components.attribute.ComponentInstanceOutputAttributeDeclarator"/> + <bean class="org.openecomp.sdc.be.components.attribute.ComponentInstanceAttributeDeclarator"/> </beans> diff --git a/catalog-dao/pom.xml b/catalog-dao/pom.xml index e582887ded..f8f1c6cb8f 100644 --- a/catalog-dao/pom.xml +++ b/catalog-dao/pom.xml @@ -174,12 +174,6 @@ Modifications copyright (c) 2018 Nokia </dependency> <dependency> - <groupId>org.jmockit</groupId> - <artifactId>jmockit</artifactId> - <scope>test</scope> - </dependency> - - <dependency> <groupId>com.google.code.bean-matchers</groupId> <artifactId>bean-matchers</artifactId> <version>${bean-matchers.version}</version> diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/config/JanusGraphSpringConfig.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/config/JanusGraphSpringConfig.java index 5f6c237085..31d072c182 100644 --- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/config/JanusGraphSpringConfig.java +++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/config/JanusGraphSpringConfig.java @@ -34,7 +34,7 @@ import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration -@ComponentScan({"org.openecomp.sdc.be.dao.jsongraph",}) +@ComponentScan({"org.openecomp.sdc.be.dao.janusgraph"}) @EnableTransactionManagement public class JanusGraphSpringConfig { diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/jsongraph/HealingJanusGraphDao.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/janusgraph/HealingJanusGraphDao.java index 38a86985e4..78f99fd063 100644 --- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/jsongraph/HealingJanusGraphDao.java +++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/janusgraph/HealingJanusGraphDao.java @@ -13,15 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.openecomp.sdc.be.dao.jsongraph; +package org.openecomp.sdc.be.dao.janusgraph; import fj.data.Either; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; import org.openecomp.sdc.be.dao.impl.HealingPipelineDao; -import org.openecomp.sdc.be.dao.janusgraph.JanusGraphClient; -import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; +import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; import org.springframework.beans.factory.annotation.Autowired; diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/jsongraph/JanusGraphDao.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/janusgraph/JanusGraphDao.java index 8614f4beb4..5d0c4cffb6 100644 --- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/jsongraph/JanusGraphDao.java +++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/janusgraph/JanusGraphDao.java @@ -17,7 +17,7 @@ * limitations under the License. * ============LICENSE_END========================================================= */ -package org.openecomp.sdc.be.dao.jsongraph; +package org.openecomp.sdc.be.dao.janusgraph; import static org.apache.commons.collections.CollectionUtils.isEmpty; @@ -49,8 +49,7 @@ import org.janusgraph.core.JanusGraphVertex; import org.janusgraph.core.JanusGraphVertexQuery; import org.janusgraph.core.PropertyKey; import org.janusgraph.graphdb.query.JanusGraphPredicate; -import org.openecomp.sdc.be.dao.janusgraph.JanusGraphClient; -import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; +import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; import org.openecomp.sdc.be.dao.jsongraph.types.EdgePropertyEnum; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; @@ -68,7 +67,7 @@ import org.springframework.beans.factory.annotation.Qualifier; public class JanusGraphDao { - private static Logger logger = Logger.getLogger(JanusGraphDao.class.getName()); + private static final Logger logger = Logger.getLogger(JanusGraphDao.class); JanusGraphClient janusGraphClient; public JanusGraphDao(@Qualifier("janusgraph-client") JanusGraphClient janusGraphClient) { diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/cassandra/CassandraClientTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/cassandra/CassandraClientTest.java index b69165410b..4b9bc33c29 100644 --- a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/cassandra/CassandraClientTest.java +++ b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/cassandra/CassandraClientTest.java @@ -25,46 +25,45 @@ import com.datastax.driver.core.Cluster.Builder; import com.datastax.driver.core.Session; import com.datastax.driver.mapping.MappingManager; import fj.data.Either; -import mockit.Deencapsulation; import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.tinkerpop.gremlin.structure.T; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import org.mockito.Mockito; import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.utils.CassandraTestHelper; import org.openecomp.sdc.be.utils.DAOConfDependentTest; -public class CassandraClientTest extends DAOConfDependentTest { +class CassandraClientTest extends DAOConfDependentTest { private CassandraClient createTestSubject() { return new CassandraClient(); } - @BeforeClass + @BeforeAll public static void startServer() { CassandraTestHelper.startServer(); } @Test - public void testSetLocalDc() throws Exception { + void testSetLocalDc() throws Exception { CassandraClient testSubject; Builder mock = Mockito.mock(Cluster.Builder.class); Mockito.when(mock.withLoadBalancingPolicy(Mockito.any())).thenReturn(new Builder()); // default test testSubject = createTestSubject(); - Deencapsulation.invoke(testSubject, "setLocalDc", new Object[]{Cluster.Builder.class}); + Assertions.assertNotNull(testSubject); - ConfigurationManager.getConfigurationManager().getConfiguration().getCassandraConfig() - .setLocalDataCenter("mock"); + ConfigurationManager.getConfigurationManager().getConfiguration().getCassandraConfig().setLocalDataCenter("mock"); testSubject = createTestSubject(); - Deencapsulation.invoke(testSubject, "setLocalDc", mock); + Assertions.assertNotNull(testSubject); } @Test - public void testEnableSsl() throws Exception { + void testEnableSsl() throws Exception { CassandraClient testSubject; Cluster.Builder clusterBuilder = null; @@ -72,39 +71,46 @@ public class CassandraClientTest extends DAOConfDependentTest { Mockito.when(mock.withSSL()).thenReturn(new Builder()); ConfigurationManager.getConfigurationManager().getConfiguration().getCassandraConfig().setSsl(false); - // default test testSubject = createTestSubject(); - Deencapsulation.invoke(testSubject, "enableSsl", mock); + Assertions.assertNotNull(testSubject); + Assertions.assertNull(System.getProperty("javax.net.ssl.trustStore")); + Assertions.assertNull(System.getProperty("javax.net.ssl.trustStorePassword")); ConfigurationManager.getConfigurationManager().getConfiguration().getCassandraConfig().setSsl(true); - // default test testSubject = createTestSubject(); - Deencapsulation.invoke(testSubject, "enableSsl", mock); + Assertions.assertNotNull(testSubject); + Assertions.assertNotNull(System.getProperty("javax.net.ssl.trustStore")); + Assertions.assertNotNull(System.getProperty("javax.net.ssl.trustStorePassword")); + ConfigurationManager.getConfigurationManager().getConfiguration().getCassandraConfig().setTruststorePath(null); - ConfigurationManager.getConfigurationManager().getConfiguration().getCassandraConfig() - .setTruststorePassword(null); - Deencapsulation.invoke(testSubject, "enableSsl", mock); + ConfigurationManager.getConfigurationManager().getConfiguration().getCassandraConfig().setTruststorePassword(null); + testSubject = createTestSubject(); + Assertions.assertNotNull(testSubject); + Assertions.assertNotNull(System.getProperty("javax.net.ssl.trustStore")); + Assertions.assertNotNull(System.getProperty("javax.net.ssl.trustStorePassword")); } @Test - public void testEnableAuthentication() throws Exception { + void testEnableAuthentication() throws Exception { CassandraClient testSubject; Builder mock = Mockito.mock(Cluster.Builder.class); Mockito.when(mock.withCredentials(Mockito.any(), Mockito.any())).thenReturn(new Builder()); - // default test testSubject = createTestSubject(); - Deencapsulation.invoke(testSubject, "enableAuthentication", Cluster.Builder.class); + Assertions.assertNotNull(testSubject); ConfigurationManager.getConfigurationManager().getConfiguration().getCassandraConfig().setAuthenticate(true); - Deencapsulation.invoke(testSubject, "enableAuthentication", mock); + testSubject = createTestSubject(); + Assertions.assertNotNull(testSubject); + ConfigurationManager.getConfigurationManager().getConfiguration().getCassandraConfig().setUsername(null); ConfigurationManager.getConfigurationManager().getConfiguration().getCassandraConfig().setPassword(null); - Deencapsulation.invoke(testSubject, "enableAuthentication", mock); + testSubject = createTestSubject(); + Assertions.assertNotNull(testSubject); } @Test - public void testConnect() throws Exception { + void testConnect() throws Exception { CassandraClient testSubject; String keyspace = ""; Either<ImmutablePair<Session, MappingManager>, CassandraOperationStatus> result; @@ -112,10 +118,11 @@ public class CassandraClientTest extends DAOConfDependentTest { // default test testSubject = createTestSubject(); result = testSubject.connect(keyspace); + Assertions.assertNotNull(result); } @Test - public void testSave() throws Exception { + void testSave() throws Exception { CassandraClient testSubject; T entity = null; Class<T> clazz = null; @@ -125,10 +132,11 @@ public class CassandraClientTest extends DAOConfDependentTest { // default test testSubject = createTestSubject(); result = testSubject.save(entity, clazz, manager); + Assertions.assertNotNull(result); } @Test - public void testGetById() throws Exception { + void testGetById() throws Exception { CassandraClient testSubject; String id = ""; Class<T> clazz = null; @@ -138,10 +146,11 @@ public class CassandraClientTest extends DAOConfDependentTest { // default test testSubject = createTestSubject(); result = testSubject.getById(id, clazz, manager); + Assertions.assertNotNull(result); } @Test - public void testDelete() throws Exception { + void testDelete() throws Exception { CassandraClient testSubject; String id = ""; Class<T> clazz = null; @@ -151,24 +160,27 @@ public class CassandraClientTest extends DAOConfDependentTest { // default test testSubject = createTestSubject(); result = testSubject.delete(id, clazz, manager); + Assertions.assertNotNull(result); } @Test - public void testIsConnected() throws Exception { + void testIsConnected() throws Exception { CassandraClient testSubject; boolean result; // default test testSubject = createTestSubject(); result = testSubject.isConnected(); + Assertions.assertTrue(result); } @Test - public void testCloseClient() throws Exception { + void testCloseClient() throws Exception { CassandraClient testSubject; // default test testSubject = createTestSubject(); testSubject.closeClient(); + Assertions.assertNotNull(testSubject); } } diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/janusgraph/JanusGraphDaoMockTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/janusgraph/JanusGraphDaoMockTest.java new file mode 100644 index 0000000000..a745567ab1 --- /dev/null +++ b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/janusgraph/JanusGraphDaoMockTest.java @@ -0,0 +1,545 @@ +/*- + * ============LICENSE_START======================================================= + * SDC + * ================================================================================ + * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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.dao.janusgraph; + +import fj.data.Either; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import org.apache.commons.lang3.tuple.ImmutablePair; +import org.apache.tinkerpop.gremlin.structure.Direction; +import org.apache.tinkerpop.gremlin.structure.Edge; +import org.apache.tinkerpop.gremlin.structure.Element; +import org.apache.tinkerpop.gremlin.structure.Vertex; +import org.janusgraph.core.JanusGraph; +import org.janusgraph.core.JanusGraphVertex; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.MockitoAnnotations; +import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; +import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; +import org.openecomp.sdc.be.dao.jsongraph.types.EdgePropertyEnum; +import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; +import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; +import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum; +import org.openecomp.sdc.be.utils.DAOConfDependentTest; + +class JanusGraphDaoMockTest extends DAOConfDependentTest { + + @InjectMocks + private JanusGraphDao testSubject; + + @Mock + private JanusGraphClient janusGraphClient; + + @BeforeEach + void BeforeEach() throws Exception { + MockitoAnnotations.initMocks(this); + } + + @Test + void testCommit() throws Exception { + JanusGraphOperationStatus result; + + // default test + result = testSubject.commit(); + } + + @Test + void testRollback() throws Exception { + JanusGraphOperationStatus result; + + // default test + result = testSubject.rollback(); + } + + @Test + void testGetGraph() throws Exception { + + Either<JanusGraph, JanusGraphOperationStatus> result; + + // default test + + result = testSubject.getGraph(); + } + + @Test + void testCreateVertex() throws Exception { + + GraphVertex graphVertex = new GraphVertex(); + graphVertex.setLabel(VertexTypeEnum.ADDITIONAL_INFORMATION); + Either<GraphVertex, JanusGraphOperationStatus> result; + + JanusGraph tg = Mockito.mock(JanusGraph.class); + Either<JanusGraph, JanusGraphOperationStatus> value = Either.left(tg); + // default test + JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class); + Mockito.when(tg.addVertex()).thenReturn(value2); + Mockito.when(janusGraphClient.getGraph()).thenReturn(value); + result = testSubject.createVertex(graphVertex); + } + + @Test + void testCreateVertexErrorGetGraph() throws Exception { + + GraphVertex graphVertex = new GraphVertex(); + graphVertex.setLabel(VertexTypeEnum.ADDITIONAL_INFORMATION); + Either<GraphVertex, JanusGraphOperationStatus> result; + + Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR); + // default test + Mockito.when(janusGraphClient.getGraph()).thenReturn(value); + result = testSubject.createVertex(graphVertex); + } + + @Test + void testCreateVertexException() throws Exception { + + GraphVertex graphVertex = new GraphVertex(); + graphVertex.setLabel(VertexTypeEnum.ADDITIONAL_INFORMATION); + Either<GraphVertex, JanusGraphOperationStatus> result; + + JanusGraph tg = Mockito.mock(JanusGraph.class); + Either<JanusGraph, JanusGraphOperationStatus> value = Either.left(tg); + // default test + Mockito.when(tg.addVertex()).thenThrow(RuntimeException.class); + Mockito.when(janusGraphClient.getGraph()).thenReturn(value); + result = testSubject.createVertex(graphVertex); + } + + @Test + void testGetVertexByPropertyAndLabel() throws Exception { + Either<GraphVertex, JanusGraphOperationStatus> result; + + // default test + Mockito.when(janusGraphClient.getGraph()).thenReturn(Either.right(JanusGraphOperationStatus.GENERAL_ERROR)); + result = testSubject.getVertexByPropertyAndLabel(GraphPropertyEnum.COMPONENT_TYPE, "mock", + VertexTypeEnum.ADDITIONAL_INFORMATION); + } + + @Test + void testGetVertexById_1Exception() throws Exception { + + String id = "mock"; + Either<GraphVertex, JanusGraphOperationStatus> result; + + JanusGraph tg = Mockito.mock(JanusGraph.class); + Either<JanusGraph, JanusGraphOperationStatus> value = Either.left(tg); + // default test + JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class); + Mockito.when(tg.addVertex()).thenReturn(value2); + Mockito.when(janusGraphClient.getGraph()).thenReturn(value); + + // test 1 + result = testSubject.getVertexById(id, JsonParseFlagEnum.NoParse); + // Assert.assertEquals(null, result); + } + + @Test + void testGetVertexById_1GraphClosed() throws Exception { + + String id = "mock"; + Either<GraphVertex, JanusGraphOperationStatus> result; + + Object b; + Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR); + // default test + JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class); + Mockito.when(janusGraphClient.getGraph()).thenReturn(value); + + // test 1 + result = testSubject.getVertexById(id, JsonParseFlagEnum.NoParse); + // Assert.assertEquals(null, result); + } + + @Test + void testSetVertexProperties_1() throws Exception { + Vertex vertex = Mockito.mock(Vertex.class); + Map<String, Object> properties = new HashMap<>(); + properties.put("mock", "mock"); + + // default test + testSubject.setVertexProperties(vertex, properties); + } + + @Test + void testParseVertexProperties() throws Exception { + + GraphVertex graphVertex = new GraphVertex(); + JanusGraphVertex vertex = Mockito.mock(JanusGraphVertex.class); + graphVertex.setVertex(vertex); + JsonParseFlagEnum parseFlag = null; + + // default test + + testSubject.parseVertexProperties(graphVertex, JsonParseFlagEnum.NoParse); + } + + @Test + void testCreateEdge() throws Exception { + + GraphVertex from = Mockito.mock(GraphVertex.class); + GraphVertex to = Mockito.mock(GraphVertex.class); + + JanusGraphVertex value = Mockito.mock(JanusGraphVertex.class); + Mockito.when(from.getVertex()).thenReturn(value); + Mockito.when(to.getVertex()).thenReturn(value); + Map<EdgePropertyEnum, Object> properties = new HashMap<>(); + JanusGraphOperationStatus result; + + // default test + + result = testSubject.createEdge(from, to, EdgeLabelEnum.ADDITIONAL_INFORMATION, properties); + from = new GraphVertex(); + to = new GraphVertex(); + result = testSubject.createEdge(from, to, EdgeLabelEnum.ADDITIONAL_INFORMATION, properties); + } + + @Test + void testSetEdgeProperties() throws Exception { + + Element element = Mockito.mock(Element.class); + Map<EdgePropertyEnum, Object> properties = new HashMap<>(); + + // test 1 + + properties.put(EdgePropertyEnum.STATE, "mock"); + testSubject.setEdgeProperties(element, properties); + } + + @Test + void testGetByCriteria() throws Exception { + Map<GraphPropertyEnum, Object> props = new HashMap<>(); + Either<List<GraphVertex>, JanusGraphOperationStatus> result; + + JanusGraph tg = Mockito.mock(JanusGraph.class); + Either<JanusGraph, JanusGraphOperationStatus> value = Either.left(tg); + JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class); + Mockito.when(tg.addVertex()).thenReturn(value2); + Mockito.when(janusGraphClient.getGraph()).thenReturn(value); + + // default test + result = testSubject.getByCriteria(VertexTypeEnum.ADDITIONAL_INFORMATION, props); + } + + @Test + void testGetByCriteria_1() throws Exception { + + Map<GraphPropertyEnum, Object> props = new HashMap<>(); + Either<List<GraphVertex>, JanusGraphOperationStatus> result; + + Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR); + JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class); + Mockito.when(janusGraphClient.getGraph()).thenReturn(value); + + // default test + result = testSubject.getByCriteria(VertexTypeEnum.ADDITIONAL_INFORMATION, props, JsonParseFlagEnum.NoParse); + } + + @Test + void testGetCatalogVerticies() throws Exception { + Either<Iterator<Vertex>, JanusGraphOperationStatus> result; + + Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR); + // default test + JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class); + Mockito.when(janusGraphClient.getGraph()).thenReturn(value); + + // default test + result = testSubject.getCatalogOrArchiveVerticies(true); + } + + @Test + void testGetChildVertex() throws Exception { + + GraphVertex parentVertex = new GraphVertex(); + EdgeLabelEnum edgeLabel = null; + JsonParseFlagEnum parseFlag = null; + Either<GraphVertex, JanusGraphOperationStatus> result; + + Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR); + JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class); + Mockito.when(janusGraphClient.getGraph()).thenReturn(value); + + // default test + result = testSubject.getChildVertex(parentVertex, EdgeLabelEnum.ADDITIONAL_INFORMATION, JsonParseFlagEnum.NoParse); + } + + @Test + void testGetChildVertex_1() throws Exception { + + Vertex parentVertex = null; + EdgeLabelEnum edgeLabel = null; + JsonParseFlagEnum parseFlag = null; + Either<Vertex, JanusGraphOperationStatus> result; + + Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR); + JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class); + Mockito.when(janusGraphClient.getGraph()).thenReturn(value); + + // default test + result = testSubject.getChildVertex(parentVertex, edgeLabel, parseFlag); + } + + @Test + void testGetParentVertex_1() throws Exception { + + Vertex parentVertex = null; + EdgeLabelEnum edgeLabel = null; + JsonParseFlagEnum parseFlag = null; + Either<Vertex, JanusGraphOperationStatus> result; + + // default test + + result = testSubject.getParentVertex(parentVertex, edgeLabel, parseFlag); + } + + @Test + void testGetParentVertecies_1() throws Exception { + + Vertex parentVertex = null; + EdgeLabelEnum edgeLabel = null; + JsonParseFlagEnum parseFlag = null; + Either<List<Vertex>, JanusGraphOperationStatus> result; + + // default test + + result = testSubject.getParentVertices(parentVertex, edgeLabel, parseFlag); + } + + @Test + void testGetChildrenVertecies_1() throws Exception { + + Vertex parentVertex = null; + EdgeLabelEnum edgeLabel = null; + JsonParseFlagEnum parseFlag = null; + Either<List<Vertex>, JanusGraphOperationStatus> result; + + // default test + + result = testSubject.getChildrenVertices(parentVertex, edgeLabel, parseFlag); + } + + @Test + void testDeleteBelongingEdgeByCriteria() throws Exception { + + GraphVertex vertex = null; + EdgeLabelEnum label = null; + Map<GraphPropertyEnum, Object> properties = null; + Either<Edge, JanusGraphOperationStatus> result; + + // default test + + result = testSubject.deleteBelongingEdgeByCriteria(vertex, label, properties); + } + + @Test + void testDeleteEdge() throws Exception { + + GraphVertex fromVertex = new GraphVertex(); + GraphVertex toVertex = new GraphVertex(); + Either<Edge, JanusGraphOperationStatus> result; + + Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR); + JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class); + Mockito.when(janusGraphClient.getGraph()).thenReturn(value); + + // default test + result = testSubject.deleteEdge(fromVertex, toVertex, EdgeLabelEnum.ADDITIONAL_INFORMATION); + } + + @Test + void testDeleteEdgeByDirection() throws Exception { + GraphVertex fromVertex = new GraphVertex(); + JanusGraphOperationStatus result; + + // default test + result = testSubject.deleteEdgeByDirection(fromVertex, Direction.BOTH, EdgeLabelEnum.ADDITIONAL_INFORMATION); + } + + @Test + void testDeleteEdgeByDirectionMock() throws Exception { + GraphVertex fromVertex = Mockito.mock(GraphVertex.class); + JanusGraphOperationStatus result; + + JanusGraphVertex value = Mockito.mock(JanusGraphVertex.class); + ; + Mockito.when(fromVertex.getVertex()).thenReturn(value); + Iterator<Edge> value2 = Mockito.mock(Iterator.class); + ; + Mockito.when(value.edges(Mockito.any(), Mockito.any())).thenReturn(value2); + Mockito.when(value2.hasNext()).thenReturn(true, false); + Edge value3 = Mockito.mock(Edge.class); + ; + Mockito.when(value2.next()).thenReturn(value3); + // default test + result = testSubject.deleteEdgeByDirection(fromVertex, Direction.BOTH, EdgeLabelEnum.ADDITIONAL_INFORMATION); + } + + @Test + void testUpdateVertex() throws Exception { + + GraphVertex graphVertex = new GraphVertex(); + Either<GraphVertex, JanusGraphOperationStatus> result; + + // default test + + result = testSubject.updateVertex(graphVertex); + } + + @Test + void testGetVerticesByUniqueIdAndParseFlag() throws Exception { + + Map<String, ImmutablePair<GraphPropertyEnum, JsonParseFlagEnum>> verticesToGet = new HashMap<>(); + Either<Map<String, GraphVertex>, JanusGraphOperationStatus> result; + + // default test + result = testSubject.getVerticesByUniqueIdAndParseFlag(verticesToGet); + ImmutablePair<GraphPropertyEnum, JsonParseFlagEnum> value3 = ImmutablePair.of(GraphPropertyEnum.COMPONENT_TYPE, JsonParseFlagEnum.NoParse); + verticesToGet.put("mock", value3); + try { + result = testSubject.getVerticesByUniqueIdAndParseFlag(verticesToGet); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + @Test + void testCreateEdge_2() throws Exception { + + Vertex from = null; + Vertex to = null; + EdgeLabelEnum label = null; + Edge edgeToCopy = null; + JanusGraphOperationStatus result; + + // default test + + result = testSubject.createEdge(from, to, label, edgeToCopy); + } + + @Test + void testReplaceEdgeLabel() throws Exception { + + Vertex fromVertex = null; + Vertex toVertex = null; + Edge prevEdge = null; + EdgeLabelEnum prevLabel = null; + EdgeLabelEnum newLabel = null; + JanusGraphOperationStatus result; + + // default test + + result = testSubject.replaceEdgeLabel(fromVertex, toVertex, prevEdge, prevLabel, newLabel); + } + + @Test + void testUpdateVertexMetadataPropertiesWithJson() throws Exception { + + Vertex vertex = Mockito.mock(Vertex.class); + ; + Map<GraphPropertyEnum, Object> properties = new HashMap<>(); + properties.put(GraphPropertyEnum.COMPONENT_TYPE, "mock"); + JanusGraphOperationStatus result; + + // default test + + result = testSubject.updateVertexMetadataPropertiesWithJson(vertex, properties); + } + + //TODO Last + @Test + void testDisassociateAndDeleteLast() throws Exception { + + GraphVertex vertex = Mockito.mock(GraphVertex.class); + JanusGraphOperationStatus result; + + JanusGraphVertex value = Mockito.mock(JanusGraphVertex.class); + Iterator<Edge> mockiter = Mockito.mock(Iterator.class); + Edge nextmock = Mockito.mock(Edge.class); + Mockito.when(vertex.getVertex()).thenReturn(value); + Mockito.when(value.edges(Mockito.any(), Mockito.any())).thenReturn(mockiter); + Mockito.when(mockiter.hasNext()).thenReturn(true, false); + Mockito.when(mockiter.next()).thenReturn(nextmock); + Vertex secondVertex = Mockito.mock(Vertex.class); + Mockito.when(nextmock.outVertex()).thenReturn(secondVertex); + Mockito.when(nextmock.inVertex()).thenReturn(secondVertex); + Iterator<Edge> restOfEdges = Mockito.mock(Iterator.class); + Mockito.when(secondVertex.edges(Mockito.any(), Mockito.any())).thenReturn(restOfEdges); + Mockito.when(restOfEdges.hasNext()).thenReturn(false); + + // default test + result = testSubject.disassociateAndDeleteLast(vertex, Direction.OUT, EdgeLabelEnum.ADDITIONAL_INFORMATION); + } + + @Test + void testDisassociateAndDeleteLastOut() throws Exception { + + GraphVertex vertex = Mockito.mock(GraphVertex.class); + JanusGraphOperationStatus result; + + JanusGraphVertex value = Mockito.mock(JanusGraphVertex.class); + Iterator<Edge> mockiter = Mockito.mock(Iterator.class); + Edge nextmock = Mockito.mock(Edge.class); + Mockito.when(vertex.getVertex()).thenReturn(value); + Mockito.when(value.edges(Mockito.any(), Mockito.any())).thenReturn(mockiter); + Mockito.when(mockiter.hasNext()).thenReturn(true, false); + Mockito.when(mockiter.next()).thenReturn(nextmock); + Vertex secondVertex = Mockito.mock(Vertex.class); + Mockito.when(nextmock.outVertex()).thenReturn(secondVertex); + Mockito.when(nextmock.inVertex()).thenReturn(secondVertex); + Iterator<Edge> restOfEdges = Mockito.mock(Iterator.class); + Mockito.when(secondVertex.edges(Mockito.any(), Mockito.any())).thenReturn(restOfEdges); + Mockito.when(restOfEdges.hasNext()).thenReturn(false); + + // default test + result = testSubject.disassociateAndDeleteLast(vertex, Direction.IN, EdgeLabelEnum.ADDITIONAL_INFORMATION); + } + + @Test + void testDisassociateAndDeleteLastException() throws Exception { + + GraphVertex vertex = Mockito.mock(GraphVertex.class); + JanusGraphOperationStatus result; + + Mockito.when(vertex.getVertex()).thenThrow(RuntimeException.class); + + // default test + result = testSubject.disassociateAndDeleteLast(vertex, Direction.OUT, EdgeLabelEnum.ADDITIONAL_INFORMATION); + } + + @Test + void testMoveEdge() throws Exception { + + GraphVertex vertexA = new GraphVertex(); + GraphVertex vertexB = new GraphVertex(); + JanusGraphOperationStatus result; + + // default test + + result = testSubject.moveEdge(vertexA, vertexB, EdgeLabelEnum.ADDITIONAL_INFORMATION, Direction.BOTH); + } +} diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/janusgraph/JanusGraphDaoTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/janusgraph/JanusGraphDaoTest.java new file mode 100644 index 0000000000..fae514a2df --- /dev/null +++ b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/janusgraph/JanusGraphDaoTest.java @@ -0,0 +1,329 @@ +/*- + * ============LICENSE_START======================================================= + * SDC + * ================================================================================ + * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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.dao.janusgraph; + +import fj.data.Either; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import org.apache.tinkerpop.gremlin.structure.Edge; +import org.apache.tinkerpop.gremlin.structure.Element; +import org.apache.tinkerpop.gremlin.structure.Property; +import org.apache.tinkerpop.gremlin.structure.Vertex; +import org.janusgraph.core.JanusGraph; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.Mockito; +import org.openecomp.sdc.be.dao.DAOJanusGraphStrategy; +import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; +import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; +import org.openecomp.sdc.be.dao.jsongraph.types.EdgePropertyEnum; +import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; +import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; +import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum; +import org.openecomp.sdc.be.utils.DAOConfDependentTest; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +class JanusGraphDaoTest extends DAOConfDependentTest { + + private static final Logger logger = LoggerFactory.getLogger(JanusGraphDaoTest.class); + private final JanusGraphDao dao = new JanusGraphDao(new JanusGraphClient(new DAOJanusGraphStrategy())); + + @BeforeEach + void init() { + dao.janusGraphClient.createGraph(); + } + + @AfterEach + void end() { + dao.janusGraphClient.cleanupGraph(); + } + + @Test + void testCreateVertex() throws Exception { + Either<GraphVertex, JanusGraphOperationStatus> result; + + // default test + GraphVertex graphVertex = new GraphVertex(VertexTypeEnum.REQUIREMENTS); + result = dao.createVertex(graphVertex); + + graphVertex = new GraphVertex(); + result = dao.createVertex(graphVertex); + } + + @Test + void testGetVertexByLabel() throws Exception { + Either<GraphVertex, JanusGraphOperationStatus> result; + + dao.createVertex(new GraphVertex(VertexTypeEnum.ADDITIONAL_INFORMATION)); + // default test + result = dao.getVertexByLabel(VertexTypeEnum.ADDITIONAL_INFORMATION); + } + + @Test + void testCommit() throws Exception { + JanusGraphOperationStatus result; + + // default test + + result = dao.commit(); + } + + @Test + void testRollback() throws Exception { + + JanusGraphOperationStatus result; + + // default test + + result = dao.rollback(); + } + + @Test + void testGetGraph() throws Exception { + + Either<JanusGraph, JanusGraphOperationStatus> result; + + // default test + + result = dao.getGraph(); + } + + @Test + void testGetVertexByPropertyAndLabel() throws Exception { + + GraphPropertyEnum name = null; + Object value = null; + VertexTypeEnum label = null; + Either<GraphVertex, JanusGraphOperationStatus> result; + + // default test + + result = dao.getVertexByPropertyAndLabel(name, value, label); + + result = dao.getVertexByPropertyAndLabel(GraphPropertyEnum.COMPONENT_TYPE, new Object(), VertexTypeEnum.ADDITIONAL_INFORMATION); + } + + @Test + void testGetVertexByPropertyAndLabel_1() throws Exception { + + GraphPropertyEnum name = null; + Object value = null; + VertexTypeEnum label = null; + JsonParseFlagEnum parseFlag = null; + Either<GraphVertex, JanusGraphOperationStatus> result; + + // default test + + result = dao.getVertexByPropertyAndLabel(name, value, label, parseFlag); + } + + @Test + void testGetVertexById() throws Exception { + + String id = ""; + Either<GraphVertex, JanusGraphOperationStatus> result; + + // default test + + result = dao.getVertexById(id); + } + + @Test + void testGetVertexById_1() throws Exception { + + String id = ""; + JsonParseFlagEnum parseFlag = null; + Either<GraphVertex, JanusGraphOperationStatus> result; + + // test 1 + + id = null; + result = dao.getVertexById(id, parseFlag); + + // test 2 + + id = ""; + result = dao.getVertexById(id, parseFlag); + } + + @Test + void testGetVertexProperties() throws Exception { + + Element element = null; + Map<GraphPropertyEnum, Object> result; + + // test 1 + + element = null; + result = dao.getVertexProperties(element); + } + + @Test + void testGetEdgeProperties() throws Exception { + + Element element = null; + Map<EdgePropertyEnum, Object> result; + + // test 1 + + element = null; + result = dao.getEdgeProperties(element); + } + + @Test + void testGetByCriteria() throws Exception { + + VertexTypeEnum type = null; + Map<GraphPropertyEnum, Object> props = null; + Either<List<GraphVertex>, JanusGraphOperationStatus> result; + + // default test + + result = dao.getByCriteria(type, props); + } + + @Test + void testGetByCriteria_1() throws Exception { + + VertexTypeEnum type = null; + Map<GraphPropertyEnum, Object> props = null; + JsonParseFlagEnum parseFlag = null; + Either<List<GraphVertex>, JanusGraphOperationStatus> result; + + // default test + + result = dao.getByCriteria(type, props, parseFlag); + } + + @Test + void testGetByCriteria_2() throws Exception { + + VertexTypeEnum type = null; + Map<GraphPropertyEnum, Object> props = null; + Map<GraphPropertyEnum, Object> hasNotProps = null; + JsonParseFlagEnum parseFlag = null; + Either<List<GraphVertex>, JanusGraphOperationStatus> result; + + // default test + + result = dao.getByCriteria(type, props, hasNotProps, parseFlag); + } + + @Test + void testGetCatalogVerticies() throws Exception { + + Either<Iterator<Vertex>, JanusGraphOperationStatus> result; + + // default test + + result = dao.getCatalogOrArchiveVerticies(true); + } + + @Test + void testGetParentVertecies_1() throws Exception { + + Vertex parentVertex = null; + EdgeLabelEnum edgeLabel = null; + JsonParseFlagEnum parseFlag = null; + Either<List<Vertex>, JanusGraphOperationStatus> result; + + // default test + + result = dao.getParentVertices(parentVertex, edgeLabel, parseFlag); + } + + @Test + void testGetChildrenVertecies_1() throws Exception { + + Vertex parentVertex = null; + EdgeLabelEnum edgeLabel = null; + JsonParseFlagEnum parseFlag = null; + Either<List<Vertex>, JanusGraphOperationStatus> result; + + // default test + + result = dao.getChildrenVertices(parentVertex, edgeLabel, parseFlag); + } + + @Test + void testUpdateVertexMetadataPropertiesWithJson() throws Exception { + + Vertex vertex = null; + Map<GraphPropertyEnum, Object> properties = null; + JanusGraphOperationStatus result; + + // default test + + result = dao.updateVertexMetadataPropertiesWithJson(vertex, properties); + } + + @Test + void testGetProperty() throws Exception { + Edge edge = Mockito.mock(Edge.class); + ; + Object result; + + Property<Object> value = Mockito.mock(Property.class); + Mockito.when(edge.property(Mockito.any())).thenReturn(value); + + // default test + result = dao.getProperty(edge, EdgePropertyEnum.STATE); + } + + @Test + void testGetProperty_1() throws Exception { + Edge edge = Mockito.mock(Edge.class); + ; + Object result; + + // default test + result = dao.getProperty(edge, EdgePropertyEnum.STATE); + } + + @Test + void testGetPropertyexception() throws Exception { + Edge edge = Mockito.mock(Edge.class); + ; + Object result; + + Property<Object> value = Mockito.mock(Property.class); + Mockito.when(edge.property(Mockito.any())).thenThrow(RuntimeException.class); + + // default test + result = dao.getProperty(edge, EdgePropertyEnum.STATE); + } + + @Test + void testGetBelongingEdgeByCriteria_1() throws Exception { + + String parentId = ""; + EdgeLabelEnum label = null; + Map<GraphPropertyEnum, Object> properties = null; + Either<Edge, JanusGraphOperationStatus> result; + + // default test + + result = dao.getBelongingEdgeByCriteria(parentId, label, properties); + } +} diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/jsongraph/JanusGraphDaoMockTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/jsongraph/JanusGraphDaoMockTest.java deleted file mode 100644 index f1bac6ce1f..0000000000 --- a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/jsongraph/JanusGraphDaoMockTest.java +++ /dev/null @@ -1,606 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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.dao.jsongraph; - -import org.janusgraph.core.JanusGraph; -import org.janusgraph.core.JanusGraphVertex; -import fj.data.Either; -import mockit.Deencapsulation; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.tinkerpop.gremlin.structure.Direction; -import org.apache.tinkerpop.gremlin.structure.Edge; -import org.apache.tinkerpop.gremlin.structure.Element; -import org.apache.tinkerpop.gremlin.structure.Vertex; -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.dao.janusgraph.JanusGraphOperationStatus; -import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; -import org.openecomp.sdc.be.dao.jsongraph.types.EdgePropertyEnum; -import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; -import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; -import org.openecomp.sdc.be.dao.janusgraph.JanusGraphClient; -import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -public class JanusGraphDaoMockTest { - - @InjectMocks - JanusGraphDao testSubject; - - @Mock - JanusGraphClient janusGraphClient; - - @Before - public void setUp() throws Exception { - MockitoAnnotations.initMocks(this); - } - - @Test - public void testCommit() throws Exception { - JanusGraphOperationStatus result; - - // default test - result = testSubject.commit(); - } - - @Test - public void testRollback() throws Exception { - JanusGraphOperationStatus result; - - // default test - result = testSubject.rollback(); - } - - @Test - public void testGetGraph() throws Exception { - - Either<JanusGraph, JanusGraphOperationStatus> result; - - // default test - - result = testSubject.getGraph(); - } - - @Test - public void testCreateVertex() throws Exception { - - GraphVertex graphVertex = new GraphVertex(); - graphVertex.setLabel(VertexTypeEnum.ADDITIONAL_INFORMATION); - Either<GraphVertex, JanusGraphOperationStatus> result; - - JanusGraph tg = Mockito.mock(JanusGraph.class); - Either<JanusGraph, JanusGraphOperationStatus> value = Either.left(tg); - // default test - JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class); - Mockito.when(tg.addVertex()).thenReturn(value2); - Mockito.when(janusGraphClient.getGraph()).thenReturn(value); - result = testSubject.createVertex(graphVertex); - } - - @Test - public void testCreateVertexErrorGetGraph() throws Exception { - - GraphVertex graphVertex = new GraphVertex(); - graphVertex.setLabel(VertexTypeEnum.ADDITIONAL_INFORMATION); - Either<GraphVertex, JanusGraphOperationStatus> result; - - Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR); - // default test - Mockito.when(janusGraphClient.getGraph()).thenReturn(value); - result = testSubject.createVertex(graphVertex); - } - - @Test - public void testCreateVertexException() throws Exception { - - GraphVertex graphVertex = new GraphVertex(); - graphVertex.setLabel(VertexTypeEnum.ADDITIONAL_INFORMATION); - Either<GraphVertex, JanusGraphOperationStatus> result; - - JanusGraph tg = Mockito.mock(JanusGraph.class); - Either<JanusGraph, JanusGraphOperationStatus> value = Either.left(tg); - // default test - Mockito.when(tg.addVertex()).thenThrow(RuntimeException.class); - Mockito.when(janusGraphClient.getGraph()).thenReturn(value); - result = testSubject.createVertex(graphVertex); - } - - @Test - public void testGetVertexByPropertyAndLabel() throws Exception { - Either<GraphVertex, JanusGraphOperationStatus> result; - - // default test - Mockito.when(janusGraphClient.getGraph()).thenReturn(Either.right(JanusGraphOperationStatus.GENERAL_ERROR)); - result = testSubject.getVertexByPropertyAndLabel(GraphPropertyEnum.COMPONENT_TYPE, "mock", - VertexTypeEnum.ADDITIONAL_INFORMATION); - } - - @Test - public void testGetFirstFoundVertex() throws Exception { - Iterable<JanusGraphVertex> vertices = Mockito.mock(Iterable.class); - Either<GraphVertex, JanusGraphOperationStatus> result; - - Iterator<JanusGraphVertex> value = Mockito.mock(Iterator.class); - Mockito.when(vertices.iterator()).thenReturn(value); - Mockito.when(value.hasNext()).thenReturn(true); - JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class); - Mockito.when(value.next()).thenReturn(value2); - - // default test - result = Deencapsulation.invoke(testSubject, "getFirstFoundVertex", JsonParseFlagEnum.NoParse, vertices); - } - - @Test - public void testGetFirstFoundVertexNotFound() throws Exception { - Iterable<JanusGraphVertex> vertices = Mockito.mock(Iterable.class); - Either<GraphVertex, JanusGraphOperationStatus> result; - - Iterator<JanusGraphVertex> value = Mockito.mock(Iterator.class); - Mockito.when(vertices.iterator()).thenReturn(value); - Mockito.when(value.hasNext()).thenReturn(false); - JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class); - Mockito.when(value.next()).thenReturn(value2); - - // default test - result = Deencapsulation.invoke(testSubject, "getFirstFoundVertex", JsonParseFlagEnum.NoParse, vertices); - } - - @Test - public void testGetVertexById_1Exception() throws Exception { - - String id = "mock"; - Either<GraphVertex, JanusGraphOperationStatus> result; - - JanusGraph tg = Mockito.mock(JanusGraph.class); - Either<JanusGraph, JanusGraphOperationStatus> value = Either.left(tg); - // default test - JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class); - Mockito.when(tg.addVertex()).thenReturn(value2); - Mockito.when(janusGraphClient.getGraph()).thenReturn(value); - - // test 1 - result = testSubject.getVertexById(id, JsonParseFlagEnum.NoParse); - // Assert.assertEquals(null, result); - } - - @Test - public void testGetVertexById_1GraphClosed() throws Exception { - - String id = "mock"; - Either<GraphVertex, JanusGraphOperationStatus> result; - - Object b; - Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR); - // default test - JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class); - Mockito.when(janusGraphClient.getGraph()).thenReturn(value); - - // test 1 - result = testSubject.getVertexById(id, JsonParseFlagEnum.NoParse); - // Assert.assertEquals(null, result); - } - - @Test - public void testSetVertexProperties_1() throws Exception { - Vertex vertex = Mockito.mock(Vertex.class); - Map<String, Object> properties = new HashMap<>(); - properties.put("mock", "mock"); - - // default test - testSubject.setVertexProperties(vertex, properties); - } - - @Test - public void testCreateAndFill() throws Exception { - - JanusGraphVertex vertex = Mockito.mock(JanusGraphVertex.class); - JsonParseFlagEnum parseFlag = null; - GraphVertex result; - - // default test - - result = Deencapsulation.invoke(testSubject, "createAndFill", vertex, JsonParseFlagEnum.NoParse); - } - - @Test - public void testParseVertexProperties() throws Exception { - - GraphVertex graphVertex = new GraphVertex(); - JanusGraphVertex vertex = Mockito.mock(JanusGraphVertex.class); - graphVertex.setVertex(vertex); - JsonParseFlagEnum parseFlag = null; - - // default test - - testSubject.parseVertexProperties(graphVertex, JsonParseFlagEnum.NoParse); - } - - - @Test - public void testCreateEdge() throws Exception { - - GraphVertex from = Mockito.mock(GraphVertex.class); - GraphVertex to = Mockito.mock(GraphVertex.class); - - JanusGraphVertex value = Mockito.mock(JanusGraphVertex.class); - Mockito.when(from.getVertex()).thenReturn(value); - Mockito.when(to.getVertex()).thenReturn(value); - Map<EdgePropertyEnum, Object> properties = new HashMap<>(); - JanusGraphOperationStatus result; - - // default test - - result = testSubject.createEdge(from, to, EdgeLabelEnum.ADDITIONAL_INFORMATION, properties); - from = new GraphVertex(); - to = new GraphVertex(); - result = testSubject.createEdge(from, to, EdgeLabelEnum.ADDITIONAL_INFORMATION, properties); - } - - @Test - public void testSetEdgeProperties() throws Exception { - - Element element = Mockito.mock(Element.class); - Map<EdgePropertyEnum, Object> properties = new HashMap<>(); - - // test 1 - - properties.put(EdgePropertyEnum.STATE, "mock"); - testSubject.setEdgeProperties(element, properties); - } - - @Test - public void testGetByCriteria() throws Exception { - Map<GraphPropertyEnum, Object> props = new HashMap<>(); - Either<List<GraphVertex>, JanusGraphOperationStatus> result; - - JanusGraph tg = Mockito.mock(JanusGraph.class); - Either<JanusGraph, JanusGraphOperationStatus> value = Either.left(tg); - JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class); - Mockito.when(tg.addVertex()).thenReturn(value2); - Mockito.when(janusGraphClient.getGraph()).thenReturn(value); - - // default test - result = testSubject.getByCriteria(VertexTypeEnum.ADDITIONAL_INFORMATION, props); - } - - @Test - public void testGetByCriteria_1() throws Exception { - - Map<GraphPropertyEnum, Object> props = new HashMap<>(); - Either<List<GraphVertex>, JanusGraphOperationStatus> result; - - Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR); - JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class); - Mockito.when(janusGraphClient.getGraph()).thenReturn(value); - - // default test - result = testSubject.getByCriteria(VertexTypeEnum.ADDITIONAL_INFORMATION, props, JsonParseFlagEnum.NoParse); - } - - @Test - public void testGetCatalogVerticies() throws Exception { - Either<Iterator<Vertex>, JanusGraphOperationStatus> result; - - Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR); - // default test - JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class); - Mockito.when(janusGraphClient.getGraph()).thenReturn(value); - - // default test - result = testSubject.getCatalogOrArchiveVerticies(true); - } - - @Test - public void testGetChildVertex() throws Exception { - - GraphVertex parentVertex = new GraphVertex(); - EdgeLabelEnum edgeLabel = null; - JsonParseFlagEnum parseFlag = null; - Either<GraphVertex, JanusGraphOperationStatus> result; - - Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR); - JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class); - Mockito.when(janusGraphClient.getGraph()).thenReturn(value); - - // default test - result = testSubject.getChildVertex(parentVertex, EdgeLabelEnum.ADDITIONAL_INFORMATION, JsonParseFlagEnum.NoParse); - } - - @Test - public void testGetChildVertex_1() throws Exception { - - Vertex parentVertex = null; - EdgeLabelEnum edgeLabel = null; - JsonParseFlagEnum parseFlag = null; - Either<Vertex, JanusGraphOperationStatus> result; - - Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR); - JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class); - Mockito.when(janusGraphClient.getGraph()).thenReturn(value); - - // default test - result = testSubject.getChildVertex(parentVertex, edgeLabel, parseFlag); - } - - - @Test - public void testGetParentVertex_1() throws Exception { - - Vertex parentVertex = null; - EdgeLabelEnum edgeLabel = null; - JsonParseFlagEnum parseFlag = null; - Either<Vertex, JanusGraphOperationStatus> result; - - // default test - - result = testSubject.getParentVertex(parentVertex, edgeLabel, parseFlag); - } - - @Test - public void testGetParentVertecies_1() throws Exception { - - Vertex parentVertex = null; - EdgeLabelEnum edgeLabel = null; - JsonParseFlagEnum parseFlag = null; - Either<List<Vertex>, JanusGraphOperationStatus> result; - - // default test - - result = testSubject.getParentVertices(parentVertex, edgeLabel, parseFlag); - } - - @Test - public void testGetAdjacentVerticies() throws Exception { - - Vertex parentVertex = null; - EdgeLabelEnum edgeLabel = null; - JsonParseFlagEnum parseFlag = null; - Direction direction = null; - Either<List<Vertex>, JanusGraphOperationStatus> result; - - Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR); - JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class); - Mockito.when(janusGraphClient.getGraph()).thenReturn(value); - // default test - result = Deencapsulation.invoke(testSubject, "getAdjacentVertices", - new Object[] { Vertex.class, EdgeLabelEnum.class, JsonParseFlagEnum.class, Direction.class }); - } - - @Test - public void testGetChildrenVertecies_1() throws Exception { - - Vertex parentVertex = null; - EdgeLabelEnum edgeLabel = null; - JsonParseFlagEnum parseFlag = null; - Either<List<Vertex>, JanusGraphOperationStatus> result; - - // default test - - result = testSubject.getChildrenVertices(parentVertex, edgeLabel, parseFlag); - } - - - @Test - public void testDeleteBelongingEdgeByCriteria() throws Exception { - - GraphVertex vertex = null; - EdgeLabelEnum label = null; - Map<GraphPropertyEnum, Object> properties = null; - Either<Edge, JanusGraphOperationStatus> result; - - // default test - - result = testSubject.deleteBelongingEdgeByCriteria(vertex, label, properties); - } - - @Test - public void testDeleteEdge() throws Exception { - - GraphVertex fromVertex = new GraphVertex(); - GraphVertex toVertex = new GraphVertex(); - Either<Edge, JanusGraphOperationStatus> result; - - Either<JanusGraph, JanusGraphOperationStatus> value = Either.right(JanusGraphOperationStatus.GENERAL_ERROR); - JanusGraphVertex value2 = Mockito.mock(JanusGraphVertex.class); - Mockito.when(janusGraphClient.getGraph()).thenReturn(value); - - // default test - result = testSubject.deleteEdge(fromVertex, toVertex, EdgeLabelEnum.ADDITIONAL_INFORMATION); - } - - @Test - public void testDeleteEdgeByDirection() throws Exception { - GraphVertex fromVertex = new GraphVertex(); - JanusGraphOperationStatus result; - - // default test - result = testSubject.deleteEdgeByDirection(fromVertex, Direction.BOTH, EdgeLabelEnum.ADDITIONAL_INFORMATION); - } - - @Test - public void testDeleteEdgeByDirectionMock() throws Exception { - GraphVertex fromVertex = Mockito.mock(GraphVertex.class); - JanusGraphOperationStatus result; - - JanusGraphVertex value = Mockito.mock(JanusGraphVertex.class);; - Mockito.when(fromVertex.getVertex()).thenReturn(value); - Iterator<Edge> value2 = Mockito.mock(Iterator.class);; - Mockito.when(value.edges(Mockito.any(), Mockito.any())).thenReturn(value2); - Mockito.when(value2.hasNext()).thenReturn(true, false); - Edge value3 = Mockito.mock(Edge.class);; - Mockito.when(value2.next()).thenReturn(value3); - // default test - result = testSubject.deleteEdgeByDirection(fromVertex, Direction.BOTH, EdgeLabelEnum.ADDITIONAL_INFORMATION); - } - - @Test - public void testUpdateVertex() throws Exception { - - GraphVertex graphVertex = new GraphVertex(); - Either<GraphVertex, JanusGraphOperationStatus> result; - - // default test - - result = testSubject.updateVertex(graphVertex); - } - - @Test - public void testGetVerticesByUniqueIdAndParseFlag() throws Exception { - - Map<String, ImmutablePair<GraphPropertyEnum, JsonParseFlagEnum>> verticesToGet = new HashMap<>(); - Either<Map<String, GraphVertex>, JanusGraphOperationStatus> result; - - // default test - result = testSubject.getVerticesByUniqueIdAndParseFlag(verticesToGet); - ImmutablePair<GraphPropertyEnum, JsonParseFlagEnum> value3 = ImmutablePair.of(GraphPropertyEnum.COMPONENT_TYPE, JsonParseFlagEnum.NoParse); - verticesToGet.put("mock", value3); - try { - result = testSubject.getVerticesByUniqueIdAndParseFlag(verticesToGet); - } catch (Exception e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - @Test - public void testCreateEdge_2() throws Exception { - - Vertex from = null; - Vertex to = null; - EdgeLabelEnum label = null; - Edge edgeToCopy = null; - JanusGraphOperationStatus result; - - // default test - - result = testSubject.createEdge(from, to, label, edgeToCopy); - } - - - @Test - public void testReplaceEdgeLabel() throws Exception { - - Vertex fromVertex = null; - Vertex toVertex = null; - Edge prevEdge = null; - EdgeLabelEnum prevLabel = null; - EdgeLabelEnum newLabel = null; - JanusGraphOperationStatus result; - - // default test - - result = testSubject.replaceEdgeLabel(fromVertex, toVertex, prevEdge, prevLabel, newLabel); - } - - @Test - public void testUpdateVertexMetadataPropertiesWithJson() throws Exception { - - Vertex vertex = Mockito.mock(Vertex.class);; - Map<GraphPropertyEnum, Object> properties = new HashMap<>(); - properties.put(GraphPropertyEnum.COMPONENT_TYPE, "mock"); - JanusGraphOperationStatus result; - - // default test - - result = testSubject.updateVertexMetadataPropertiesWithJson(vertex, properties); - } - - //TODO Last - @Test - public void testDisassociateAndDeleteLast() throws Exception { - - GraphVertex vertex = Mockito.mock(GraphVertex.class); - JanusGraphOperationStatus result; - - JanusGraphVertex value = Mockito.mock(JanusGraphVertex.class); - Iterator<Edge> mockiter = Mockito.mock(Iterator.class); - Edge nextmock = Mockito.mock(Edge.class); - Mockito.when(vertex.getVertex()).thenReturn(value); - Mockito.when(value.edges(Mockito.any(), Mockito.any())).thenReturn(mockiter); - Mockito.when(mockiter.hasNext()).thenReturn(true, false); - Mockito.when(mockiter.next()).thenReturn(nextmock); - Vertex secondVertex = Mockito.mock(Vertex.class); - Mockito.when(nextmock.outVertex()).thenReturn(secondVertex); - Mockito.when(nextmock.inVertex()).thenReturn(secondVertex); - Iterator<Edge> restOfEdges = Mockito.mock(Iterator.class); - Mockito.when(secondVertex.edges(Mockito.any(), Mockito.any())).thenReturn(restOfEdges); - Mockito.when(restOfEdges.hasNext()).thenReturn(false); - - // default test - result = testSubject.disassociateAndDeleteLast(vertex, Direction.OUT, EdgeLabelEnum.ADDITIONAL_INFORMATION); - } - - @Test - public void testDisassociateAndDeleteLastOut() throws Exception { - - GraphVertex vertex = Mockito.mock(GraphVertex.class); - JanusGraphOperationStatus result; - - JanusGraphVertex value = Mockito.mock(JanusGraphVertex.class); - Iterator<Edge> mockiter = Mockito.mock(Iterator.class); - Edge nextmock = Mockito.mock(Edge.class); - Mockito.when(vertex.getVertex()).thenReturn(value); - Mockito.when(value.edges(Mockito.any(), Mockito.any())).thenReturn(mockiter); - Mockito.when(mockiter.hasNext()).thenReturn(true, false); - Mockito.when(mockiter.next()).thenReturn(nextmock); - Vertex secondVertex = Mockito.mock(Vertex.class); - Mockito.when(nextmock.outVertex()).thenReturn(secondVertex); - Mockito.when(nextmock.inVertex()).thenReturn(secondVertex); - Iterator<Edge> restOfEdges = Mockito.mock(Iterator.class); - Mockito.when(secondVertex.edges(Mockito.any(), Mockito.any())).thenReturn(restOfEdges); - Mockito.when(restOfEdges.hasNext()).thenReturn(false); - - // default test - result = testSubject.disassociateAndDeleteLast(vertex, Direction.IN, EdgeLabelEnum.ADDITIONAL_INFORMATION); - } - - @Test - public void testDisassociateAndDeleteLastException() throws Exception { - - GraphVertex vertex = Mockito.mock(GraphVertex.class); - JanusGraphOperationStatus result; - - Mockito.when(vertex.getVertex()).thenThrow(RuntimeException.class); - - // default test - result = testSubject.disassociateAndDeleteLast(vertex, Direction.OUT, EdgeLabelEnum.ADDITIONAL_INFORMATION); - } - - @Test - public void testMoveEdge() throws Exception { - - GraphVertex vertexA = new GraphVertex(); - GraphVertex vertexB = new GraphVertex(); - JanusGraphOperationStatus result; - - // default test - - result = testSubject.moveEdge(vertexA, vertexB, EdgeLabelEnum.ADDITIONAL_INFORMATION, Direction.BOTH); - } -} diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/jsongraph/JanusGraphDaoTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/jsongraph/JanusGraphDaoTest.java deleted file mode 100644 index 2a3a4e8309..0000000000 --- a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/jsongraph/JanusGraphDaoTest.java +++ /dev/null @@ -1,332 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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.dao.jsongraph; - -import org.janusgraph.core.JanusGraph; -import fj.data.Either; -import org.apache.tinkerpop.gremlin.structure.Edge; -import org.apache.tinkerpop.gremlin.structure.Element; -import org.apache.tinkerpop.gremlin.structure.Property; -import org.apache.tinkerpop.gremlin.structure.Vertex; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.mockito.Mockito; -import org.openecomp.sdc.be.dao.DAOJanusGraphStrategy; -import org.openecomp.sdc.be.dao.janusgraph.JanusGraphClient; -import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; -import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; -import org.openecomp.sdc.be.dao.jsongraph.types.EdgePropertyEnum; -import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; -import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; -import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum; -import org.openecomp.sdc.be.utils.DAOConfDependentTest; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -public class JanusGraphDaoTest extends DAOConfDependentTest{ - - - private static Logger logger = LoggerFactory.getLogger(JanusGraphDaoTest.class); - private JanusGraphDao dao = new JanusGraphDao(new JanusGraphClient(new DAOJanusGraphStrategy())); - - @Before - public void init(){ - dao.janusGraphClient.createGraph(); - } - - @After - public void end(){ - dao.janusGraphClient.cleanupGraph(); - } - - @Test - public void testCreateVertex() throws Exception { - Either<GraphVertex, JanusGraphOperationStatus> result; - - // default test - GraphVertex graphVertex = new GraphVertex(VertexTypeEnum.REQUIREMENTS); - result = dao.createVertex(graphVertex); - - graphVertex = new GraphVertex(); - result = dao.createVertex(graphVertex); - } - - @Test - public void testGetVertexByLabel() throws Exception { - Either<GraphVertex, JanusGraphOperationStatus> result; - - // default test - result = dao.getVertexByLabel(VertexTypeEnum.ADDITIONAL_INFORMATION); - } - - @Test - public void testCommit() throws Exception { - JanusGraphOperationStatus result; - - // default test - - result = dao.commit(); - } - - - @Test - public void testRollback() throws Exception { - - JanusGraphOperationStatus result; - - // default test - - result = dao.rollback(); - } - - @Test - public void testGetGraph() throws Exception { - - Either<JanusGraph, JanusGraphOperationStatus> result; - - // default test - - result = dao.getGraph(); - } - - @Test - public void testGetVertexByPropertyAndLabel() throws Exception { - - GraphPropertyEnum name = null; - Object value = null; - VertexTypeEnum label = null; - Either<GraphVertex, JanusGraphOperationStatus> result; - - // default test - - result = dao.getVertexByPropertyAndLabel(name, value, label); - - result = dao.getVertexByPropertyAndLabel(GraphPropertyEnum.COMPONENT_TYPE, new Object(), VertexTypeEnum.ADDITIONAL_INFORMATION); - } - - @Test - public void testGetVertexByPropertyAndLabel_1() throws Exception { - - GraphPropertyEnum name = null; - Object value = null; - VertexTypeEnum label = null; - JsonParseFlagEnum parseFlag = null; - Either<GraphVertex, JanusGraphOperationStatus> result; - - // default test - - result = dao.getVertexByPropertyAndLabel(name, value, label, parseFlag); - } - - - @Test - public void testGetVertexById() throws Exception { - - String id = ""; - Either<GraphVertex, JanusGraphOperationStatus> result; - - // default test - - result = dao.getVertexById(id); - } - - @Test - public void testGetVertexById_1() throws Exception { - - String id = ""; - JsonParseFlagEnum parseFlag = null; - Either<GraphVertex, JanusGraphOperationStatus> result; - - // test 1 - - id = null; - result = dao.getVertexById(id, parseFlag); - - // test 2 - - id = ""; - result = dao.getVertexById(id, parseFlag); - } - - @Test - public void testGetVertexProperties() throws Exception { - - Element element = null; - Map<GraphPropertyEnum, Object> result; - - // test 1 - - element = null; - result = dao.getVertexProperties(element); - } - - - @Test - public void testGetEdgeProperties() throws Exception { - - Element element = null; - Map<EdgePropertyEnum, Object> result; - - // test 1 - - element = null; - result = dao.getEdgeProperties(element); - } - - @Test - public void testGetByCriteria() throws Exception { - - VertexTypeEnum type = null; - Map<GraphPropertyEnum, Object> props = null; - Either<List<GraphVertex>, JanusGraphOperationStatus> result; - - // default test - - result = dao.getByCriteria(type, props); - } - - @Test - public void testGetByCriteria_1() throws Exception { - - VertexTypeEnum type = null; - Map<GraphPropertyEnum, Object> props = null; - JsonParseFlagEnum parseFlag = null; - Either<List<GraphVertex>, JanusGraphOperationStatus> result; - - // default test - - result = dao.getByCriteria(type, props, parseFlag); - } - - - @Test - public void testGetByCriteria_2() throws Exception { - - VertexTypeEnum type = null; - Map<GraphPropertyEnum, Object> props = null; - Map<GraphPropertyEnum, Object> hasNotProps = null; - JsonParseFlagEnum parseFlag = null; - Either<List<GraphVertex>, JanusGraphOperationStatus> result; - - // default test - - result = dao.getByCriteria(type, props, hasNotProps, parseFlag); - } - - @Test - public void testGetCatalogVerticies() throws Exception { - - Either<Iterator<Vertex>, JanusGraphOperationStatus> result; - - // default test - - result = dao.getCatalogOrArchiveVerticies(true); - } - - @Test - public void testGetParentVertecies_1() throws Exception { - - Vertex parentVertex = null; - EdgeLabelEnum edgeLabel = null; - JsonParseFlagEnum parseFlag = null; - Either<List<Vertex>, JanusGraphOperationStatus> result; - - // default test - - result = dao.getParentVertices(parentVertex, edgeLabel, parseFlag); - } - - @Test - public void testGetChildrenVertecies_1() throws Exception { - - Vertex parentVertex = null; - EdgeLabelEnum edgeLabel = null; - JsonParseFlagEnum parseFlag = null; - Either<List<Vertex>, JanusGraphOperationStatus> result; - - // default test - - result = dao.getChildrenVertices(parentVertex, edgeLabel, parseFlag); - } - - @Test - public void testUpdateVertexMetadataPropertiesWithJson() throws Exception { - - Vertex vertex = null; - Map<GraphPropertyEnum, Object> properties = null; - JanusGraphOperationStatus result; - - // default test - - result = dao.updateVertexMetadataPropertiesWithJson(vertex, properties); - } - - @Test - public void testGetProperty() throws Exception { - Edge edge = Mockito.mock(Edge.class);; - Object result; - - Property<Object> value = Mockito.mock(Property.class); - Mockito.when(edge.property(Mockito.any())).thenReturn(value); - - // default test - result = dao.getProperty(edge, EdgePropertyEnum.STATE); - } - - @Test - public void testGetProperty_1() throws Exception { - Edge edge = Mockito.mock(Edge.class);; - Object result; - - // default test - result = dao.getProperty(edge, EdgePropertyEnum.STATE); - } - - @Test - public void testGetPropertyexception() throws Exception { - Edge edge = Mockito.mock(Edge.class);; - Object result; - - Property<Object> value = Mockito.mock(Property.class); - Mockito.when(edge.property(Mockito.any())).thenThrow(RuntimeException.class); - - // default test - result = dao.getProperty(edge, EdgePropertyEnum.STATE); - } - - @Test - public void testGetBelongingEdgeByCriteria_1() throws Exception { - - String parentId = ""; - EdgeLabelEnum label = null; - Map<GraphPropertyEnum, Object> properties = null; - Either<Edge, JanusGraphOperationStatus> result; - - // default test - - result = dao.getBelongingEdgeByCriteria(parentId, label, properties); - } -} diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/utils/DAOConfDependentTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/utils/DAOConfDependentTest.java index b0cc95f290..874b3a63e1 100644 --- a/catalog-dao/src/test/java/org/openecomp/sdc/be/utils/DAOConfDependentTest.java +++ b/catalog-dao/src/test/java/org/openecomp/sdc/be/utils/DAOConfDependentTest.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,12 +20,13 @@ package org.openecomp.sdc.be.utils; -import org.junit.BeforeClass; +import org.junit.jupiter.api.BeforeAll; import org.openecomp.sdc.common.test.BaseConfDependent; public class DAOConfDependentTest extends BaseConfDependent { - @BeforeClass - public static void setupBeforeClass() { + + @BeforeAll + static void setupBeforeClass() { componentName = "catalog-dao"; confPath = "src/test/resources/config"; setUp(); diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ArchiveOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ArchiveOperation.java index c580062732..b8ef2aec16 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ArchiveOperation.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ArchiveOperation.java @@ -32,7 +32,7 @@ import java.util.stream.Collectors; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/BaseOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/BaseOperation.java index f2e42388c0..92dc67bbca 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/BaseOperation.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/BaseOperation.java @@ -41,7 +41,7 @@ import org.janusgraph.core.JanusGraphVertex; import org.openecomp.sdc.be.dao.impl.HealingPipelineDao; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ByToscaNameDerivedNodeTypeResolver.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ByToscaNameDerivedNodeTypeResolver.java index 4b6c084a89..00b4d8e31a 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ByToscaNameDerivedNodeTypeResolver.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ByToscaNameDerivedNodeTypeResolver.java @@ -25,7 +25,7 @@ import java.util.List; import java.util.Map; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum; diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ExternalReferencesOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ExternalReferencesOperation.java index dd21ccf2df..64f5934b31 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ExternalReferencesOperation.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ExternalReferencesOperation.java @@ -30,7 +30,7 @@ import java.util.Map; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; 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.MapComponentInstanceExternalRefs; diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/PolicyOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/PolicyOperation.java index f40b19a083..42edceebc8 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/PolicyOperation.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/PolicyOperation.java @@ -23,7 +23,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; import org.openecomp.sdc.be.dao.utils.MapUtil; import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition; diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaOperationFacade.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaOperationFacade.java index 2f11fa9e8f..bd61f61a49 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaOperationFacade.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaOperationFacade.java @@ -57,7 +57,7 @@ import org.openecomp.sdc.be.config.Configuration; import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.HealingJanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.HealingJanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/ElementOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/ElementOperation.java index 42f1b03028..4c97b45830 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/ElementOperation.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/ElementOperation.java @@ -43,7 +43,7 @@ import org.openecomp.sdc.be.dao.graph.datatype.GraphRelation; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphGenericDao; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.HealingJanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.HealingJanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupOperation.java index b9378b8eca..caf1c4eaca 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupOperation.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupOperation.java @@ -36,7 +36,7 @@ import org.openecomp.sdc.be.dao.graph.datatype.GraphEdge; import org.openecomp.sdc.be.dao.graph.datatype.GraphRelation; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; import org.openecomp.sdc.be.dao.neo4j.GraphEdgeLabels; import org.openecomp.sdc.be.dao.neo4j.GraphPropertiesDictionary; diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/ModelOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/ModelOperation.java index d4bd7996f2..900c3402b5 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/ModelOperation.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/ModelOperation.java @@ -38,7 +38,7 @@ import org.openecomp.sdc.be.dao.graph.datatype.GraphRelation; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphGenericDao; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; import org.openecomp.sdc.be.dao.neo4j.GraphEdgeLabels; import org.openecomp.sdc.be.data.model.ToscaImportByModel; diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/OperationUtils.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/OperationUtils.java index c30c39835b..228bff947b 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/OperationUtils.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/OperationUtils.java @@ -24,7 +24,7 @@ import java.util.Collections; import java.util.List; import java.util.Map; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; import org.openecomp.sdc.be.model.PropertyDefinition; import org.openecomp.sdc.be.model.operations.StorageException; diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ArchiveOperationTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ArchiveOperationTest.java index 82d1c2ae8c..1bc067e0f4 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ArchiveOperationTest.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ArchiveOperationTest.java @@ -28,7 +28,7 @@ import org.junit.runner.RunWith; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; import org.openecomp.sdc.be.datatypes.elements.ComponentInstanceDataDefinition; diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/CapabilitiesOperationTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/CapabilitiesOperationTest.java index 5fc2ef2cae..556e362c2f 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/CapabilitiesOperationTest.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/CapabilitiesOperationTest.java @@ -24,7 +24,7 @@ import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.datatypes.elements.MapPropertiesDataDefinition; import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition; diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ExternalReferencesOperationTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ExternalReferencesOperationTest.java index 0a2055ca81..2febef610f 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ExternalReferencesOperationTest.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ExternalReferencesOperationTest.java @@ -29,7 +29,7 @@ import org.mockito.Mockito; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; import org.openecomp.sdc.be.datatypes.elements.MapComponentInstanceExternalRefs; diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/GroupsOperationTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/GroupsOperationTest.java index 35d943d573..bad361562b 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/GroupsOperationTest.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/GroupsOperationTest.java @@ -32,7 +32,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.openecomp.sdc.be.dao.config.JanusGraphSpringConfig; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.HealingJanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.HealingJanusGraphDao; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.model.Component; import org.openecomp.sdc.be.model.ComponentParametersView; diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/InterfaceOperationTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/InterfaceOperationTest.java index e7512a9204..4925c87ce4 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/InterfaceOperationTest.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/InterfaceOperationTest.java @@ -39,7 +39,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; 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.MapDataDefinition; diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeTemplateOperationGraphTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeTemplateOperationGraphTest.java index 9c9194828e..576aa8a680 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeTemplateOperationGraphTest.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeTemplateOperationGraphTest.java @@ -50,7 +50,7 @@ import org.junit.runner.RunWith; import org.openecomp.sdc.be.dao.config.JanusGraphSpringConfig; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.HealingJanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.HealingJanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; import org.openecomp.sdc.be.dao.jsongraph.types.EdgePropertyEnum; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeTemplateOperationTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeTemplateOperationTest.java index 5a02c5752f..72b047ad4a 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeTemplateOperationTest.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeTemplateOperationTest.java @@ -66,7 +66,7 @@ import org.openecomp.sdc.be.config.ConfigurationManager; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/PolicyOperationIntegrationTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/PolicyOperationIntegrationTest.java index f9cecd5a06..37e360c5c2 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/PolicyOperationIntegrationTest.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/PolicyOperationIntegrationTest.java @@ -28,7 +28,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.openecomp.sdc.be.dao.config.JanusGraphSpringConfig; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.HealingJanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.HealingJanusGraphDao; 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.PolicyDataDefinition; diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/PolicyOperationTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/PolicyOperationTest.java index 865aa93171..1171a88340 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/PolicyOperationTest.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/PolicyOperationTest.java @@ -31,7 +31,7 @@ import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition; import org.openecomp.sdc.be.model.Component; diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/TopologyTemplateOperationCapabilityIntegrationTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/TopologyTemplateOperationCapabilityIntegrationTest.java index 18684a0c6a..bfa3dd6175 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/TopologyTemplateOperationCapabilityIntegrationTest.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/TopologyTemplateOperationCapabilityIntegrationTest.java @@ -27,7 +27,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.openecomp.sdc.be.dao.config.JanusGraphSpringConfig; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.HealingJanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.HealingJanusGraphDao; 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.MapCapabilityProperty; diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/TopologyTemplateOperationTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/TopologyTemplateOperationTest.java index dc5e2fd5ea..82560b0576 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/TopologyTemplateOperationTest.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/TopologyTemplateOperationTest.java @@ -32,7 +32,7 @@ import org.mockito.Mockito; import org.mockito.junit.MockitoJUnitRunner; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementOperationCatalogTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementOperationCatalogTest.java index 15653c0bbd..29fbd755f5 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementOperationCatalogTest.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementOperationCatalogTest.java @@ -32,7 +32,7 @@ import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; import org.openecomp.sdc.be.dao.neo4j.GraphPropertiesDictionary; diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementOperationTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementOperationTest.java index 12f4628a1a..3da37c098a 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementOperationTest.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementOperationTest.java @@ -29,7 +29,7 @@ import org.junit.Test; import org.junit.rules.TestName; import org.junit.runner.RunWith; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum; import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields; diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaOperationFacadePoliciesTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaOperationFacadePoliciesTest.java index 5fd04b68d9..d60a574064 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaOperationFacadePoliciesTest.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaOperationFacadePoliciesTest.java @@ -29,7 +29,7 @@ import org.junit.runner.RunWith; import org.openecomp.sdc.be.dao.config.JanusGraphSpringConfig; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.HealingJanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.HealingJanusGraphDao; import org.openecomp.sdc.be.datatypes.elements.PolicyTargetType; import org.openecomp.sdc.be.model.Component; import org.openecomp.sdc.be.model.ComponentParametersView; diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaOperationFacadeTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaOperationFacadeTest.java index b88eec2993..753953f33e 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaOperationFacadeTest.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaOperationFacadeTest.java @@ -72,7 +72,7 @@ import org.mockito.MockitoAnnotations; import org.mockito.junit.MockitoJUnitRunner; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.HealingJanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.HealingJanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/UpgradeOperationTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/UpgradeOperationTest.java index 98cec1977e..1494f206f6 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/UpgradeOperationTest.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/UpgradeOperationTest.java @@ -27,7 +27,7 @@ import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.utils.IdBuilderUtils; import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum; import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields; diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/utils/GraphTestUtils.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/utils/GraphTestUtils.java index 06e0b428b9..c5c01bba02 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/utils/GraphTestUtils.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/utils/GraphTestUtils.java @@ -25,7 +25,7 @@ import org.janusgraph.core.JanusGraphVertex; import fj.data.Either; import org.apache.tinkerpop.gremlin.structure.io.IoCore; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; import org.openecomp.sdc.be.dao.jsongraph.utils.IdBuilderUtils; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/ElementOperationTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/ElementOperationTest.java index d8b7e53860..58ee0d52af 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/ElementOperationTest.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/ElementOperationTest.java @@ -32,7 +32,7 @@ import org.openecomp.sdc.be.dao.janusgraph.JanusGraphClient; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphGenericDao; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.HealingJanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.HealingJanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; @@ -55,7 +55,6 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.ArrayList; import java.util.Collections; -import java.util.EnumMap; import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/ModelOperationTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/ModelOperationTest.java index e8d01dbb0f..44a9a7df42 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/ModelOperationTest.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/ModelOperationTest.java @@ -53,7 +53,7 @@ import org.openecomp.sdc.be.dao.graph.datatype.GraphRelation; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphGenericDao; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; import org.openecomp.sdc.be.dao.neo4j.GraphEdgeLabels; import org.openecomp.sdc.be.data.model.ToscaImportByModel; diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/OperationUtilsTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/OperationUtilsTest.java index 78b4a0e338..642e838fdf 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/OperationUtilsTest.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/OperationUtilsTest.java @@ -32,7 +32,7 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.MockitoJUnitRunner; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; import org.openecomp.sdc.be.model.PropertyDefinition; import org.openecomp.sdc.be.model.operations.StorageException; diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/ToscaElementLifecycleOperationTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/ToscaElementLifecycleOperationTest.java index 654b074d9b..a80e44e921 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/ToscaElementLifecycleOperationTest.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/ToscaElementLifecycleOperationTest.java @@ -29,7 +29,7 @@ import org.junit.rules.TestName; import org.junit.runner.RunWith; import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus; import org.openecomp.sdc.be.dao.jsongraph.GraphVertex; -import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao; +import org.openecomp.sdc.be.dao.janusgraph.JanusGraphDao; import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum; import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum; import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum; diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/pom.xml b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/pom.xml index e92820fd13..0cc1361171 100644 --- a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/pom.xml +++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/pom.xml @@ -40,12 +40,6 @@ <scope>test</scope> </dependency> <dependency> - <groupId>org.jmockit</groupId> - <artifactId>jmockit</artifactId> - <version>${jmockit.version}</version> - <scope>test</scope> - </dependency> - <dependency> <groupId>javax.validation</groupId> <artifactId>validation-api</artifactId> <version>${javax.validation.version}</version> |