aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/ArtifactUuidFix.java2
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/GraphMLConverter.java2
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/ArtifactToolBL.java4
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/ValidationToolBL.java4
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executers/TopologyTemplateValidatorExecuter.java3
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/tasks/artifacts/VfArtifactValidationTask.java3
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/main/ArtifactValidatorTool.java2
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/main/DataSchemaMenu.java2
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/main/EsToCassandraDataMigrationMenu.java2
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/main/RemoveUtils.java2
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/main/UpdateIsVnfMenu.java2
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/main/ValidationTool.java2
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1710/UpgradeMigration1710.java15
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/servlets/ExportImportTitanServlet.java2
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/config/ValidationConfigManagerTest.java10
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/config/ValidationToolConfigurationTest.java40
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executers/ServiceValidatorExecuterTest.java2
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executers/TopologyTemplateValidatorExecuterTest.java4
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executers/VfValidatorExecuterTest.java2
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/tasks/artifacts/ArtifactsVertexResultTest.java4
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/utils/ElementTypeEnumTest.java12
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/utils/ValidationTaskResultTest.java12
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/utils/VertexResultTest.java6
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/core/DBVersionTest.java2
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/core/SdcMigrationToolTest.java8
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/core/execution/MigrationExecutorImplTest.java2
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/core/task/MigrationResultTest.java8
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/resolver/SpringBeansMigrationResolverTest.java8
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/service/SdcRepoServiceTest.java8
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/task/MigrationTasksTest.java6
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/servlets/EntryPointTest.java2
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java4
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/GroupBusinessLogic.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/lifecycle/LifecycleBusinessLogic.java12
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GraphLockOperation.java2
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupInstanceOperation.java68
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/PropertyOperation.java31
-rw-r--r--openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/src/main/java/org/openecomp/sdc/generator/core/services/ManualVspToscaGenerationService.java20
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersionCalculatorImpl.java78
40 files changed, 75 insertions, 333 deletions
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 5d4610c91f..d413c3f23a 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
@@ -330,7 +330,7 @@ public class ArtifactUuidFix {
return true;
}
- private boolean isProblematicService( Service service, String serviceName) throws IOException {
+ private boolean isProblematicService( Service service, String serviceName) {
List<ComponentInstance> componentInstances = service.getComponentInstances();
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/GraphMLConverter.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/GraphMLConverter.java
index 7bea2eaa4a..b6925416e6 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/GraphMLConverter.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/GraphMLConverter.java
@@ -457,8 +457,6 @@ public class GraphMLConverter {
} catch (Exception e) {
e.printStackTrace();
- GraphPropertiesDictionary[] values = GraphPropertiesDictionary.values();
-
Object property1 = vertex.value(GraphPropertiesDictionary.HEALTH_CHECK.getProperty());
System.out.println(property1);
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/ArtifactToolBL.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/ArtifactToolBL.java
index 341a56f68a..f70236432d 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/ArtifactToolBL.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/ArtifactToolBL.java
@@ -16,12 +16,8 @@ public class ArtifactToolBL {
@Autowired
protected List<IArtifactValidatorExecuter> validators;
- @Autowired
- protected ReportManager reportManager;
-
private boolean allValid = true;
-
public boolean validateAll() {
for (IArtifactValidatorExecuter validatorExec: validators) {
System.out.println("ValidatorExecuter "+validatorExec.getName()+" started");
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/ValidationToolBL.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/ValidationToolBL.java
index e373107081..9406351a6c 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/ValidationToolBL.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/ValidationToolBL.java
@@ -20,12 +20,8 @@ public class ValidationToolBL {
@Autowired
protected List<ValidatorExecuter> validators;
- @Autowired
- protected ReportManager reportManager;
-
private boolean allValid = true;
-
public boolean validateAll() {
for (ValidatorExecuter validatorExec: validators) {
System.out.println("ValidatorExecuter "+validatorExec.getName()+" started");
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executers/TopologyTemplateValidatorExecuter.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executers/TopologyTemplateValidatorExecuter.java
index 04f014fbc9..f875aa4742 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executers/TopologyTemplateValidatorExecuter.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executers/TopologyTemplateValidatorExecuter.java
@@ -34,9 +34,6 @@ public class TopologyTemplateValidatorExecuter {
@Autowired
protected TitanDao titanDao;
- @Autowired
- protected TopologyTemplateOperation topologyTemplateOperation;
-
protected String name;
public void setName(String name) {
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/tasks/artifacts/VfArtifactValidationTask.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/tasks/artifacts/VfArtifactValidationTask.java
index bb25d25e2b..1c18fb751e 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/tasks/artifacts/VfArtifactValidationTask.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/tasks/artifacts/VfArtifactValidationTask.java
@@ -15,9 +15,6 @@ public class VfArtifactValidationTask extends VfValidationTask {
@Autowired
ArtifactValidationUtils artifactValidationUtils;
- @Autowired
- protected TopologyTemplateOperation topologyTemplateOperation;
-
public VfArtifactValidationTask() {
this.name = "VF Artifact Validation Task";
}
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/ArtifactValidatorTool.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/ArtifactValidatorTool.java
index 5ae543cb73..b1180f9483 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/ArtifactValidatorTool.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/ArtifactValidatorTool.java
@@ -15,7 +15,7 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext
public class ArtifactValidatorTool {
private static Logger log = LoggerFactory.getLogger(ValidationTool.class.getName());
- public static void main(String[] args) throws Exception {
+ public static void main(String[] args) {
String outputPath = args[0];
ValidationConfigManager.setOutputFullFilePath(outputPath);
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/DataSchemaMenu.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/DataSchemaMenu.java
index 2fb3270bf3..b0e3dbea6d 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/DataSchemaMenu.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/DataSchemaMenu.java
@@ -33,7 +33,7 @@ public class DataSchemaMenu {
private static Logger log = LoggerFactory.getLogger(DataSchemaMenu.class.getName());
- public static void main(String[] args) throws Exception {
+ public static void main(String[] args) {
String operation = args[0];
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/EsToCassandraDataMigrationMenu.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/EsToCassandraDataMigrationMenu.java
index 0bac1df353..f791098493 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/EsToCassandraDataMigrationMenu.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/EsToCassandraDataMigrationMenu.java
@@ -34,7 +34,7 @@ public class EsToCassandraDataMigrationMenu {
private static Logger log = LoggerFactory.getLogger(EsToCassandraDataMigrationMenu.class.getName());
- public static void main(String[] args) throws Exception {
+ public static void main(String[] args) {
if (args == null || args.length < 2) {
usageAndExit();
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/RemoveUtils.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/RemoveUtils.java
index ddece759c0..5546300740 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/RemoveUtils.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/RemoveUtils.java
@@ -27,7 +27,7 @@ import org.openecomp.sdc.asdctool.impl.ProductLogic;
*/
public class RemoveUtils {
- public static void main(String[] args) throws Exception {
+ public static void main(String[] args) {
if (args == null || args.length < 1) {
removeUsage();
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/UpdateIsVnfMenu.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/UpdateIsVnfMenu.java
index dce9f9c072..b9a1e1741b 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/UpdateIsVnfMenu.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/UpdateIsVnfMenu.java
@@ -45,7 +45,7 @@ public class UpdateIsVnfMenu {
"Usage: updateIsVnfTrue <titan.properties> <systemServiceName1,systemServiceName2,...,systemServiceNameN>");
}
- public static void main(String[] args) throws Exception {
+ public static void main(String[] args) {
if (args == null || args.length < 1) {
usageAndExit();
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/ValidationTool.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/ValidationTool.java
index 51e2d500da..e07b3af551 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/ValidationTool.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/ValidationTool.java
@@ -19,7 +19,7 @@ public class ValidationTool {
private static Logger log = LoggerFactory.getLogger(ValidationTool.class.getName());
- public static void main(String[] args) throws Exception {
+ public static void main(String[] args) {
String outputPath = args[0];
ValidationConfigManager.setOutputFullFilePath(outputPath);
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1710/UpgradeMigration1710.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1710/UpgradeMigration1710.java
index ca8c4c8a3c..e6acb7a1d4 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1710/UpgradeMigration1710.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1710/UpgradeMigration1710.java
@@ -803,21 +803,6 @@ public class UpgradeMigration1710 implements PostMigration {
return titanDao.getByCriteria(vertexType, propertiesToMatch, propertiesNotToMatch, JsonParseFlagEnum.ParseMetadata);
}
- protected Either<List<String>, TitanOperationStatus> findResourcesPathRecursively(GraphVertex nodeTypeV, List<String> allCertifiedUids) {
- Either<List<GraphVertex>, TitanOperationStatus> parentResourceRes = titanDao.getParentVertecies(nodeTypeV, EdgeLabelEnum.DERIVED_FROM, JsonParseFlagEnum.ParseMetadata);
- if (parentResourceRes.isRight()) {
- return Either.right(parentResourceRes.right().value());
- }
- List<GraphVertex> derivedResourcesUid = new ArrayList<>();
- for (GraphVertex chV : parentResourceRes.left().value()) {
- Optional<String> op = allCertifiedUids.stream().filter(id -> id.equals((String) chV.getJsonMetadataField(JsonPresentationFields.UNIQUE_ID))).findAny();
- if (op.isPresent()) {
- derivedResourcesUid.add(chV);
- }
- }
- return null;
- }
-
private Either<List<GraphVertex>, StorageOperationStatus> getLatestByName(GraphPropertyEnum property, String nodeName) {
Map<GraphPropertyEnum, Object> propertiesToMatch = new EnumMap<>(GraphPropertyEnum.class);
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/servlets/ExportImportTitanServlet.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/servlets/ExportImportTitanServlet.java
index 898bd96177..9d40354651 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/servlets/ExportImportTitanServlet.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/servlets/ExportImportTitanServlet.java
@@ -161,8 +161,6 @@ public class ExportImportTitanServlet {
// graph.commit();
graph.tx().commit();
- String exportedGraph = out.toString();
-
result = outputFile;
} catch (Exception e) {
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/config/ValidationConfigManagerTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/config/ValidationConfigManagerTest.java
index 6adbdccf1d..1dd5926cc5 100644
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/config/ValidationConfigManagerTest.java
+++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/config/ValidationConfigManagerTest.java
@@ -13,7 +13,7 @@ public class ValidationConfigManagerTest {
@Test
- public void testGetOutputFilePath() throws Exception {
+ public void testGetOutputFilePath() {
String result;
// default test
@@ -21,7 +21,7 @@ public class ValidationConfigManagerTest {
}
@Test
- public void testGetCsvReportFilePath() throws Exception {
+ public void testGetCsvReportFilePath() {
String result;
// default test
@@ -30,7 +30,7 @@ public class ValidationConfigManagerTest {
@Test
- public void testSetCsvReportFilePath() throws Exception {
+ public void testSetCsvReportFilePath() {
String outputPath = "";
// default test
@@ -39,7 +39,7 @@ public class ValidationConfigManagerTest {
@Test
- public void testSetValidationConfiguration() throws Exception {
+ public void testSetValidationConfiguration() {
String path = "";
Properties result;
@@ -49,7 +49,7 @@ public class ValidationConfigManagerTest {
@Test
- public void testGetValidationConfiguration() throws Exception {
+ public void testGetValidationConfiguration() {
Properties result;
// default test
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 fb916541c0..8dc2c4f0ec 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
@@ -32,7 +32,7 @@ public class ValidationToolConfigurationTest {
@Test
- public void testBasicServiceValidator() throws Exception {
+ public void testBasicServiceValidator() {
ValidationToolConfiguration testSubject;
ServiceValidatorExecuter result;
@@ -43,7 +43,7 @@ public class ValidationToolConfigurationTest {
@Test
- public void testVfArtifactValidationTask() throws Exception {
+ public void testVfArtifactValidationTask() {
ValidationToolConfiguration testSubject;
VfArtifactValidationTask result;
@@ -54,7 +54,7 @@ public class ValidationToolConfigurationTest {
@Test
- public void testServiceArtifactValidationTask() throws Exception {
+ public void testServiceArtifactValidationTask() {
ValidationToolConfiguration testSubject;
ServiceArtifactValidationTask result;
@@ -65,7 +65,7 @@ public class ValidationToolConfigurationTest {
@Test
- public void testModuleJsonTask() throws Exception {
+ public void testModuleJsonTask() {
ValidationToolConfiguration testSubject;
ModuleJsonTask result;
@@ -76,7 +76,7 @@ public class ValidationToolConfigurationTest {
@Test
- public void testValidationToolBL() throws Exception {
+ public void testValidationToolBL() {
ValidationToolConfiguration testSubject;
ValidationToolBL result;
@@ -87,7 +87,7 @@ public class ValidationToolConfigurationTest {
@Test
- public void testBasicVfValidator() throws Exception {
+ public void testBasicVfValidator() {
ValidationToolConfiguration testSubject;
VfValidatorExecuter result;
@@ -97,7 +97,7 @@ public class ValidationToolConfigurationTest {
}
@Test
- public void testArtifactCassandraDao() throws Exception {
+ public void testArtifactCassandraDao() {
ValidationToolConfiguration testSubject;
ArtifactCassandraDao result;
@@ -108,7 +108,7 @@ public class ValidationToolConfigurationTest {
@Test
- public void testArtifactValidationUtils() throws Exception {
+ public void testArtifactValidationUtils() {
ValidationToolConfiguration testSubject;
ArtifactValidationUtils result;
@@ -119,7 +119,7 @@ public class ValidationToolConfigurationTest {
@Test
- public void testJsonGroupsOperation() throws Exception {
+ public void testJsonGroupsOperation() {
ValidationToolConfiguration testSubject;
GroupsOperation result;
@@ -130,7 +130,7 @@ public class ValidationToolConfigurationTest {
@Test
- public void testCassandraClient() throws Exception {
+ public void testCassandraClient() {
ValidationToolConfiguration testSubject;
CassandraClient result;
@@ -141,7 +141,7 @@ public class ValidationToolConfigurationTest {
@Test
- public void testDaoStrategy() throws Exception {
+ public void testDaoStrategy() {
ValidationToolConfiguration testSubject;
TitanClientStrategy result;
@@ -155,7 +155,7 @@ public class ValidationToolConfigurationTest {
@Test
- public void testToscaOperationFacade() throws Exception {
+ public void testToscaOperationFacade() {
ValidationToolConfiguration testSubject;
ToscaOperationFacade result;
@@ -166,7 +166,7 @@ public class ValidationToolConfigurationTest {
@Test
- public void testNodeTypeOperation() throws Exception {
+ public void testNodeTypeOperation() {
ValidationToolConfiguration testSubject;
DerivedNodeTypeResolver migrationDerivedNodeTypeResolver = null;
NodeTypeOperation result;
@@ -178,7 +178,7 @@ public class ValidationToolConfigurationTest {
@Test
- public void testTopologyTemplateOperation() throws Exception {
+ public void testTopologyTemplateOperation() {
ValidationToolConfiguration testSubject;
TopologyTemplateOperation result;
@@ -192,7 +192,7 @@ public class ValidationToolConfigurationTest {
@Test
- public void testMigrationDerivedNodeTypeResolver() throws Exception {
+ public void testMigrationDerivedNodeTypeResolver() {
ValidationToolConfiguration testSubject;
DerivedNodeTypeResolver result;
@@ -203,7 +203,7 @@ public class ValidationToolConfigurationTest {
@Test
- public void testTitanDao() throws Exception {
+ public void testTitanDao() {
ValidationToolConfiguration testSubject;
TitanGraphClient titanGraphClient = null;
TitanDao result;
@@ -215,7 +215,7 @@ public class ValidationToolConfigurationTest {
@Test
- public void testCategoryOperation() throws Exception {
+ public void testCategoryOperation() {
ValidationToolConfiguration testSubject;
CategoryOperation result;
@@ -226,7 +226,7 @@ public class ValidationToolConfigurationTest {
@Test
- public void testArtifactsOperation() throws Exception {
+ public void testArtifactsOperation() {
ValidationToolConfiguration testSubject;
ArtifactsOperations result;
@@ -237,7 +237,7 @@ public class ValidationToolConfigurationTest {
@Test
- public void testToscaDataOperation() throws Exception {
+ public void testToscaDataOperation() {
ValidationToolConfiguration testSubject;
ToscaDataOperation result;
@@ -248,7 +248,7 @@ public class ValidationToolConfigurationTest {
@Test
- public void testToscaElementLifecycleOperation() throws Exception {
+ public void testToscaElementLifecycleOperation() {
ValidationToolConfiguration testSubject;
ToscaElementLifecycleOperation result;
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executers/ServiceValidatorExecuterTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executers/ServiceValidatorExecuterTest.java
index 05acd9aa6f..890bdfd002 100644
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executers/ServiceValidatorExecuterTest.java
+++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executers/ServiceValidatorExecuterTest.java
@@ -14,7 +14,7 @@ public class ServiceValidatorExecuterTest {
@Test
- public void testGetName() throws Exception {
+ public void testGetName() {
ServiceValidatorExecuter testSubject;
String result;
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executers/TopologyTemplateValidatorExecuterTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executers/TopologyTemplateValidatorExecuterTest.java
index 3747d7fd09..f3fdebe8e9 100644
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executers/TopologyTemplateValidatorExecuterTest.java
+++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executers/TopologyTemplateValidatorExecuterTest.java
@@ -11,7 +11,7 @@ public class TopologyTemplateValidatorExecuterTest {
@Test
- public void testSetName() throws Exception {
+ public void testSetName() {
TopologyTemplateValidatorExecuter testSubject;
String name = "";
@@ -22,7 +22,7 @@ public class TopologyTemplateValidatorExecuterTest {
@Test
- public void testGetName() throws Exception {
+ public void testGetName() {
TopologyTemplateValidatorExecuter testSubject;
String result;
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executers/VfValidatorExecuterTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executers/VfValidatorExecuterTest.java
index 12136df609..83dac8a35a 100644
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executers/VfValidatorExecuterTest.java
+++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/executers/VfValidatorExecuterTest.java
@@ -12,7 +12,7 @@ public class VfValidatorExecuterTest {
@Test
- public void testGetName() throws Exception {
+ public void testGetName() {
VfValidatorExecuter testSubject;
String result;
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/tasks/artifacts/ArtifactsVertexResultTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/tasks/artifacts/ArtifactsVertexResultTest.java
index 8ba509cf9c..d16c3fc555 100644
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/tasks/artifacts/ArtifactsVertexResultTest.java
+++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/tasks/artifacts/ArtifactsVertexResultTest.java
@@ -11,7 +11,7 @@ public class ArtifactsVertexResultTest {
@Test
- public void testAddNotFoundArtifact() throws Exception {
+ public void testAddNotFoundArtifact() {
ArtifactsVertexResult testSubject;
String artifactId = "";
@@ -22,7 +22,7 @@ public class ArtifactsVertexResultTest {
@Test
- public void testGetResult() throws Exception {
+ public void testGetResult() {
ArtifactsVertexResult testSubject;
String result;
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/utils/ElementTypeEnumTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/utils/ElementTypeEnumTest.java
index 7467699fc0..e6e564e709 100644
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/utils/ElementTypeEnumTest.java
+++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/utils/ElementTypeEnumTest.java
@@ -13,7 +13,7 @@ public class ElementTypeEnumTest {
@Test
- public void testGetByType() throws Exception {
+ public void testGetByType() {
String elementType = "";
ElementTypeEnum result;
@@ -23,7 +23,7 @@ public class ElementTypeEnumTest {
@Test
- public void testGetAllTypes() throws Exception {
+ public void testGetAllTypes() {
List<String> result;
// default test
@@ -32,7 +32,7 @@ public class ElementTypeEnumTest {
@Test
- public void testGetElementType() throws Exception {
+ public void testGetElementType() {
ElementTypeEnum testSubject;
String result;
@@ -43,7 +43,7 @@ public class ElementTypeEnumTest {
@Test
- public void testSetElementType() throws Exception {
+ public void testSetElementType() {
ElementTypeEnum testSubject;
String elementType = "";
@@ -54,7 +54,7 @@ public class ElementTypeEnumTest {
@Test
- public void testGetClazz() throws Exception {
+ public void testGetClazz() {
ElementTypeEnum testSubject;
Class result;
@@ -65,7 +65,7 @@ public class ElementTypeEnumTest {
@Test
- public void testSetClazz() throws Exception {
+ public void testSetClazz() {
ElementTypeEnum testSubject;
Class clazz = null;
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/utils/ValidationTaskResultTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/utils/ValidationTaskResultTest.java
index d51075bc89..78ef2e629f 100644
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/utils/ValidationTaskResultTest.java
+++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/utils/ValidationTaskResultTest.java
@@ -12,7 +12,7 @@ public class ValidationTaskResultTest {
@Test
- public void testGetName() throws Exception {
+ public void testGetName() {
ValidationTaskResult testSubject;
String result;
@@ -23,7 +23,7 @@ public class ValidationTaskResultTest {
@Test
- public void testSetName() throws Exception {
+ public void testSetName() {
ValidationTaskResult testSubject;
String name = "";
@@ -34,7 +34,7 @@ public class ValidationTaskResultTest {
@Test
- public void testGetResultMessage() throws Exception {
+ public void testGetResultMessage() {
ValidationTaskResult testSubject;
String result;
@@ -45,7 +45,7 @@ public class ValidationTaskResultTest {
@Test
- public void testSetResultMessage() throws Exception {
+ public void testSetResultMessage() {
ValidationTaskResult testSubject;
String resultMessage = "";
@@ -56,7 +56,7 @@ public class ValidationTaskResultTest {
@Test
- public void testIsSuccessful() throws Exception {
+ public void testIsSuccessful() {
ValidationTaskResult testSubject;
boolean result;
@@ -67,7 +67,7 @@ public class ValidationTaskResultTest {
@Test
- public void testSetSuccessful() throws Exception {
+ public void testSetSuccessful() {
ValidationTaskResult testSubject;
boolean successful = false;
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/utils/VertexResultTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/utils/VertexResultTest.java
index 9b44eef1f5..d65fb001f8 100644
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/utils/VertexResultTest.java
+++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/validator/utils/VertexResultTest.java
@@ -11,7 +11,7 @@ public class VertexResultTest {
@Test
- public void testGetStatus() throws Exception {
+ public void testGetStatus() {
VertexResult testSubject;
boolean result;
@@ -22,7 +22,7 @@ public class VertexResultTest {
@Test
- public void testSetStatus() throws Exception {
+ public void testSetStatus() {
VertexResult testSubject;
boolean status = false;
@@ -33,7 +33,7 @@ public class VertexResultTest {
@Test
- public void testGetResult() throws Exception {
+ public void testGetResult() {
VertexResult testSubject;
String result;
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/core/DBVersionTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/core/DBVersionTest.java
index afdd0d6da8..d5473cd121 100644
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/core/DBVersionTest.java
+++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/core/DBVersionTest.java
@@ -51,7 +51,7 @@ public class DBVersionTest {
}
@Test(dataProvider = "versionComparisionProvider")
- public void testVersionCompareTo2(String firstVersion, String otherVersion, int expectedComparisionResult) throws Exception {
+ public void testVersionCompareTo2(String firstVersion, String otherVersion, int expectedComparisionResult) {
assertEquals(DBVersion.fromString(firstVersion).compareTo(DBVersion.fromString(otherVersion)), expectedComparisionResult);
}
}
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/core/SdcMigrationToolTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/core/SdcMigrationToolTest.java
index fe74891950..8783071842 100644
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/core/SdcMigrationToolTest.java
+++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/core/SdcMigrationToolTest.java
@@ -31,12 +31,12 @@ public class SdcMigrationToolTest {
private SdcRepoService sdcRepoServiceMock;
@BeforeMethod
- public void setUp() throws Exception {
+ public void setUp() {
MockitoAnnotations.initMocks(this);
}
@Test
- public void testMigrate_noMigrations() throws Exception {
+ public void testMigrate_noMigrations() {
when(migrationResolverMock.resolveMigrations()).thenReturn(Collections.emptyList());
testInstance.migrate(false);
verify(sdcRepoServiceMock, new Times(0)).clearTasksForCurrentMajor();
@@ -44,14 +44,14 @@ public class SdcMigrationToolTest {
}
@Test
- public void testMigrate_enforceFlag_removeAllMigrationTasksForCurrentVersion() throws Exception {
+ public void testMigrate_enforceFlag_removeAllMigrationTasksForCurrentVersion() {
when(migrationResolverMock.resolveMigrations()).thenReturn(Collections.emptyList());
testInstance.migrate(true);
verify(sdcRepoServiceMock, new Times(1)).clearTasksForCurrentMajor();
}
@Test
- public void testMigrate_stopAfterFirstFailure() throws Exception {
+ public void testMigrate_stopAfterFirstFailure() {
when(migrationResolverMock.resolveMigrations()).thenReturn(Arrays.asList(new SuccessfulMigration(), new FailedMigration(), new SuccessfulMigration()));
testInstance.migrate(false);
verify(sdcRepoServiceMock, new Times(0)).clearTasksForCurrentMajor();
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/core/execution/MigrationExecutorImplTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/core/execution/MigrationExecutorImplTest.java
index 9547abc00f..3f9766d9c5 100644
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/core/execution/MigrationExecutorImplTest.java
+++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/core/execution/MigrationExecutorImplTest.java
@@ -11,7 +11,7 @@ import org.testng.annotations.Test;
public class MigrationExecutorImplTest {
@Test
- public void testExecuteMigration() throws Exception {
+ public void testExecuteMigration() {
MigrationExecutionResult execute = new MigrationExecutorImpl().execute(DummyMigrationFactory.SUCCESSFUL_MIGRATION);
assertMigrationTaskEntryByMigrationExecutionResult(execute, DummyMigrationFactory.SUCCESSFUL_MIGRATION);
}
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/core/task/MigrationResultTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/core/task/MigrationResultTest.java
index 04a8bd213b..8167b927e9 100644
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/core/task/MigrationResultTest.java
+++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/core/task/MigrationResultTest.java
@@ -12,7 +12,7 @@ public class MigrationResultTest {
@Test
- public void testGetMsg() throws Exception {
+ public void testGetMsg() {
MigrationResult testSubject;
String result;
@@ -23,7 +23,7 @@ public class MigrationResultTest {
@Test
- public void testSetMsg() throws Exception {
+ public void testSetMsg() {
MigrationResult testSubject;
String msg = "";
@@ -34,7 +34,7 @@ public class MigrationResultTest {
@Test
- public void testGetMigrationStatus() throws Exception {
+ public void testGetMigrationStatus() {
MigrationResult testSubject;
MigrationStatus result;
@@ -45,7 +45,7 @@ public class MigrationResultTest {
@Test
- public void testSetMigrationStatus() throws Exception {
+ public void testSetMigrationStatus() {
MigrationResult testSubject;
MigrationStatus migrationStatus = null;
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/resolver/SpringBeansMigrationResolverTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/resolver/SpringBeansMigrationResolverTest.java
index 360b3aab40..636b1c6744 100644
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/resolver/SpringBeansMigrationResolverTest.java
+++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/resolver/SpringBeansMigrationResolverTest.java
@@ -31,13 +31,13 @@ public class SpringBeansMigrationResolverTest {
@BeforeMethod
- public void setUp() throws Exception {
+ public void setUp() {
MockitoAnnotations.initMocks(this);
testInstance.setMigrations(migrations);
}
@Test
- public void testResolveMigrations_getMigrationsWithVersionGreaterThanLatest() throws Exception {
+ public void testResolveMigrations_getMigrationsWithVersionGreaterThanLatest() {
when(sdcRepoServiceMock.getLatestDBVersion()).thenReturn(DBVersion.fromString("1710.2"));
testInstance.setPostMigrations(Collections.emptyList());
List<IMigrationStage> resolvedMigrations = testInstance.resolveMigrations();
@@ -47,7 +47,7 @@ public class SpringBeansMigrationResolverTest {
}
@Test
- public void testResolveMigration_noLatestVersionForCurrentMajorVersion() throws Exception {
+ public void testResolveMigration_noLatestVersionForCurrentMajorVersion() {
when(sdcRepoServiceMock.getLatestDBVersion()).thenReturn(DBVersion.fromString("1710.-1"));
testInstance.setPostMigrations(Collections.emptyList());
List<IMigrationStage> resolvedMigrations = testInstance.resolveMigrations();
@@ -58,7 +58,7 @@ public class SpringBeansMigrationResolverTest {
}
@Test
- public void testResolveMigrations_emptyMigrationsList() throws Exception {
+ public void testResolveMigrations_emptyMigrationsList() {
testInstance.setMigrations(Collections.emptyList());
testInstance.setPostMigrations(Collections.emptyList());
when(sdcRepoServiceMock.getLatestDBVersion()).thenReturn(DBVersion.fromString("1710.-1"));
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/service/SdcRepoServiceTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/service/SdcRepoServiceTest.java
index 31e1a63689..2745f59006 100644
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/service/SdcRepoServiceTest.java
+++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/service/SdcRepoServiceTest.java
@@ -25,12 +25,12 @@ public class SdcRepoServiceTest {
private MigrationTasksDao migrationTasksDaoMock;
@BeforeMethod
- public void setUp() throws Exception {
+ public void setUp() {
MockitoAnnotations.initMocks(this);
}
@Test
- public void testGetLatestVersion_noMinorVersionForCurrentVersion() throws Exception {
+ public void testGetLatestVersion_noMinorVersionForCurrentVersion() {
when(migrationTasksDaoMock.getLatestMinorVersion(DBVersion.CURRENT_VERSION.getMajor())).thenReturn(null);
DBVersion latestDBVersion = testInstance.getLatestDBVersion();
assertEquals(latestDBVersion.getMajor(), DBVersion.CURRENT_VERSION.getMajor());
@@ -38,7 +38,7 @@ public class SdcRepoServiceTest {
}
@Test
- public void testGetLatestVersion() throws Exception {
+ public void testGetLatestVersion() {
when(migrationTasksDaoMock.getLatestMinorVersion(DBVersion.CURRENT_VERSION.getMajor())).thenReturn(BigInteger.TEN);
DBVersion latestDBVersion = testInstance.getLatestDBVersion();
assertEquals(latestDBVersion.getMajor(), DBVersion.CURRENT_VERSION.getMajor());
@@ -46,7 +46,7 @@ public class SdcRepoServiceTest {
}
@Test
- public void testCreateMigrationTask() throws Exception {
+ public void testCreateMigrationTask() {
MigrationTaskEntry taskEntry = new MigrationTaskEntry();
testInstance.createMigrationTask(taskEntry);
verify(migrationTasksDaoMock, new Times(1)).createMigrationTask(taskEntry);
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/task/MigrationTasksTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/task/MigrationTasksTest.java
index fa61b7e19e..52dc7c9fcd 100644
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/task/MigrationTasksTest.java
+++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/task/MigrationTasksTest.java
@@ -21,13 +21,13 @@ public class MigrationTasksTest {
private List<Migration> migrations;
@BeforeMethod
- public void setUp() throws Exception {
+ public void setUp() {
ClassScanner classScanner = new ClassScanner();
migrations = classScanner.getAllClassesOfType(MIGRATIONS_BASE_PACKAGE, Migration.class);
}
@Test
- public void testNoTasksWithSameVersion() throws Exception {
+ public void testNoTasksWithSameVersion() {
Map<DBVersion, List<Migration>> migrationsByVersion = migrations.stream().collect(Collectors.groupingBy(Migration::getVersion));
migrationsByVersion.forEach((version, migrations) -> {
if (migrations.size() > 1) {
@@ -38,7 +38,7 @@ public class MigrationTasksTest {
}
@Test
- public void testNoTaskWithVersionGreaterThanCurrentVersion() throws Exception {
+ public void testNoTaskWithVersionGreaterThanCurrentVersion() {
Set<Migration> migrationsWithVersionsGreaterThanCurrent = migrations.stream().filter(mig -> mig.getVersion().compareTo(DBVersion.CURRENT_VERSION) > 0)
.collect(Collectors.toSet());
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/servlets/EntryPointTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/servlets/EntryPointTest.java
index 217bc3919f..4b0b398a81 100644
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/servlets/EntryPointTest.java
+++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/servlets/EntryPointTest.java
@@ -11,7 +11,7 @@ public class EntryPointTest {
@Test
- public void testTest() throws Exception {
+ public void testTest() {
EntryPoint testSubject;
String result;
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java
index 2eca73c560..9d9d00818c 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java
@@ -1390,10 +1390,6 @@ public class ComponentInstanceBusinessLogic extends BaseBusinessLogic {
&& ComponentTypeEnum.SERVICE == componentTypeEnum;
}
- private StorageOperationStatus concatServiceNameToVLINetworkRolePropertyValue(ToscaOperationFacade toscaOperationFacade, ComponentTypeEnum componentTypeEnum, String componentId, String resourceInstanceId, ComponentInstanceProperty property) {
- return concatServiceNameToVLINetworkRolePropertiesValues(toscaOperationFacade, componentTypeEnum, componentId, resourceInstanceId, Arrays.asList(property));
- }
-
// US833308 VLI in service - specific network_role property value logic
private StorageOperationStatus concatServiceNameToVLINetworkRolePropertiesValues(ToscaOperationFacade toscaOperationFacade, ComponentTypeEnum componentTypeEnum, String componentId, String resourceInstanceId, List<ComponentInstanceProperty> properties) {
for (ComponentInstanceProperty property: properties) {
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/GroupBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/GroupBusinessLogic.java
index 63b72b932e..a2fd6c4953 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/GroupBusinessLogic.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/GroupBusinessLogic.java
@@ -1465,11 +1465,6 @@ public class GroupBusinessLogic extends BaseBusinessLogic {
component.getComponentType().toString());
}
- private Boolean onFailedToLockComponent(ResponseFormat responseFormat) {
- throw new ComponentException(responseFormat);
- }
-
-
public Either<List<GroupDefinition>, ResponseFormat> createGroups(Component component, final List<GroupDefinition> groupDefinitions) {
Map<String, GroupDataDefinition> groups = new HashMap<>();
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 bbdb14f1c8..bac9bb62a5 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
@@ -4816,11 +4816,6 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
}
}
- private void auditCreateResource(User user, Resource persistedResource, AuditingActionEnum actionEnum) {
- ResponseFormat responseFormat = componentsUtils.getResponseFormat(ActionStatus.CREATED);
- componentsUtils.auditResource(responseFormat, user, persistedResource, actionEnum);
- }
-
private Either<Resource, ResponseFormat> createResourceTransaction(Resource resource, User user,
boolean isNormative, boolean inTransaction) {
// validate resource name uniqueness
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 75b0bd934a..5e65edecbb 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
@@ -344,18 +344,6 @@ public class LifecycleBusinessLogic {
return Either.left(eitherResourceResponse.left().value());
}
- private Either<Boolean, ResponseFormat> validateHighestVersion(User modifier, LifeCycleTransition lifeCycleTransition, Resource resource, String resourceCurrVersion) {
- ResponseFormat errorResponse;
- if (!resource.isHighestVersion()) {
- log.debug("resource version {} is not the last version of resource {}", resource.getVersion(), resource.getName());
- errorResponse = componentUtils.getResponseFormat(ActionStatus.COMPONENT_HAS_NEWER_VERSION, resource.getName(), ComponentTypeEnum.RESOURCE.name().toLowerCase());
- componentUtils.auditResource(errorResponse, modifier, resource, lifeCycleTransition.getAuditingAction(), ResourceAuditData.newBuilder()
- .state(resource.getLifecycleState().name()).version(resourceCurrVersion).build());
- return Either.right(errorResponse);
- }
- return Either.left(true);
- }
-
private Either<Boolean, ResponseFormat> validateHighestVersion(User modifier, LifeCycleTransition lifeCycleTransition, Component component, String resourceCurrVersion, ComponentTypeEnum componentType) {
ResponseFormat errorResponse;
if (!component.isHighestVersion()) {
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GraphLockOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GraphLockOperation.java
index 776012ac43..e5a743af8f 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GraphLockOperation.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GraphLockOperation.java
@@ -50,9 +50,7 @@ public class GraphLockOperation implements IGraphLockOperation {
log.info("lock resource with id {}", componentId);
TitanOperationStatus lockElementStatus = null;
try {
-
lockElementStatus = titanGenericDao.lockElement(componentId, nodeType);
-
} catch (Exception e) {
lockElementStatus = TitanOperationStatus.ALREADY_LOCKED;
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupInstanceOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupInstanceOperation.java
index 662e2ecf70..3b7b5def2e 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupInstanceOperation.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupInstanceOperation.java
@@ -432,7 +432,6 @@ public class GroupInstanceOperation extends AbstractOperation implements IGroupI
}
-
/**
* update value of attribute on resource instance
*
@@ -661,73 +660,6 @@ public class GroupInstanceOperation extends AbstractOperation implements IGroupI
}
}
- private Either<GroupInstance, TitanOperationStatus> getGroupInstanceFromGraph(String uniqueId, boolean skipProperties, boolean skipArtifacts) {
-
- Either<GroupInstance, TitanOperationStatus> result = null;
-
- Either<GroupInstanceData, TitanOperationStatus> groupInstRes = titanGenericDao.getNode(UniqueIdBuilder.getKeyByNodeType(NodeTypeEnum.GroupInstance), uniqueId, GroupInstanceData.class);
- if (groupInstRes.isRight()) {
- TitanOperationStatus status = groupInstRes.right().value();
- log.debug("Failed to retrieve group {} from graph. Status is {}", uniqueId, status);
- BeEcompErrorManager.getInstance().logBeFailedRetrieveNodeError("Fetch Group", uniqueId, String.valueOf(status));
- result = Either.right(status);
- return result;
- }
-
- GroupInstanceData groupInstData = groupInstRes.left().value();
-
- GroupInstance groupInstance = new GroupInstance(groupInstData.getGroupDataDefinition());
- String instOriginGroupId = groupInstance.getGroupUid();
- Either<GroupDefinition, TitanOperationStatus> groupRes = groupOperation.getGroupFromGraph(instOriginGroupId, false, true, false);
-
- if (groupRes.isRight()) {
- TitanOperationStatus status = groupRes.right().value();
- result = Either.right(status);
-
- }
- GroupDefinition groupDefinition = groupRes.left().value();
- Either<Map<String, PropertyValueData>, TitanOperationStatus> groupInstancePropertyValuesRes = getAllGroupInstancePropertyValuesData(groupInstData);
- if(groupInstancePropertyValuesRes.isRight()){
- result = Either.right(groupInstancePropertyValuesRes.right().value());
- }
- buildGroupInstanceFromGroup(groupInstance, groupDefinition, groupInstancePropertyValuesRes.left().value());
-
- /*
- * if (false == skipProperties) { Either<List<GroupProperty>, TitanOperationStatus> propertiesRes = getGroupProperties(uniqueId); if (propertiesRes.isRight()) { TitanOperationStatus status = propertiesRes.right().value(); if (status !=
- * TitanOperationStatus.OK) { result = Either.right(status); return result; } } else { List<GroupProperty> properties = propertiesRes.left().value(); groupDefinition.setProperties(properties); } }
- */
-
- if (false == skipArtifacts) {
- Either<List<ImmutablePair<String, String>>, TitanOperationStatus> artifactsRes = getGroupArtifactsPairs(uniqueId);
- if (artifactsRes.isRight()) {
- TitanOperationStatus status = artifactsRes.right().value();
- if (status != TitanOperationStatus.OK) {
- result = Either.right(status);
- return result;
- }
- } else {
- List<String> artifactsUid = new ArrayList<>();
- List<String> artifactsUUID = new ArrayList<>();
-
- List<ImmutablePair<String, String>> list = artifactsRes.left().value();
- if (list != null) {
- for (ImmutablePair<String, String> pair : list) {
- String uid = pair.left;
- String UUID = pair.right;
- artifactsUid.add(uid);
- artifactsUUID.add(UUID);
- }
- groupInstance.setGroupInstanceArtifacts(artifactsUid);
- groupInstance.setGroupInstanceArtifactsUuid(artifactsUUID);
- }
- }
- }
- result = Either.left(groupInstance);
-
- return result;
-
- }
-
private void buildGroupInstanceFromGroup(GroupInstance groupInstance, GroupDefinition groupDefinition, Map<String, PropertyValueData> groupInstancePropertyValues) {
groupInstance.setGroupName(groupDefinition.getName());
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/PropertyOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/PropertyOperation.java
index a2996ac152..f0d0b514ab 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/PropertyOperation.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/PropertyOperation.java
@@ -1297,37 +1297,6 @@ public class PropertyOperation extends AbstractOperation implements IPropertyOpe
}
- private Either<Map<String, DataTypeDefinition>, TitanOperationStatus> findAllDataTypeDefinition(DataTypeDefinition dataTypeDefinition) {
-
- Map<String, DataTypeDefinition> nameToDataTypeDef = new HashMap<>();
-
- DataTypeDefinition typeDefinition = dataTypeDefinition;
-
- while (typeDefinition != null) {
-
- List<PropertyDefinition> properties = typeDefinition.getProperties();
- if (properties != null) {
- for (PropertyDefinition propertyDefinition : properties) {
- String type = propertyDefinition.getType();
- Either<DataTypeDefinition, TitanOperationStatus> dataTypeByName = this.getDataTypeUsingName(type);
- if (dataTypeByName.isRight()) {
- return Either.right(dataTypeByName.right().value());
- } else {
- DataTypeDefinition value = dataTypeByName.left().value();
- if (false == nameToDataTypeDef.containsKey(type)) {
- nameToDataTypeDef.put(type, value);
- }
- }
-
- }
- }
-
- typeDefinition = typeDefinition.getDerivedFrom();
- }
-
- return Either.left(nameToDataTypeDef);
- }
-
public Either<List<ComponentInstanceProperty>, TitanOperationStatus> getAllPropertiesOfResourceInstanceOnlyPropertyDefId(String resourceInstanceUid, NodeTypeEnum instanceNodeType) {
Either<TitanVertex, TitanOperationStatus> findResInstanceRes = titanGenericDao.getVertexByProperty(UniqueIdBuilder.getKeyByNodeType(instanceNodeType), resourceInstanceUid);
diff --git a/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/src/main/java/org/openecomp/sdc/generator/core/services/ManualVspToscaGenerationService.java b/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/src/main/java/org/openecomp/sdc/generator/core/services/ManualVspToscaGenerationService.java
index 76717f37e3..24a344ae92 100644
--- a/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/src/main/java/org/openecomp/sdc/generator/core/services/ManualVspToscaGenerationService.java
+++ b/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/src/main/java/org/openecomp/sdc/generator/core/services/ManualVspToscaGenerationService.java
@@ -189,14 +189,6 @@ public class ManualVspToscaGenerationService {
return componentName + GeneratorConstants.TOSCA_SERVICE_TEMPLATE_FILE_NAME_SUFFIX;
}
- private String getNodeTemplateId(String componentName, String idPrefix, String idSuffix) {
- StringBuilder builder = new StringBuilder();
- //builder.append(idPrefix);
- builder.append(componentName);
- builder.append(idSuffix);
- return builder.toString();
- }
-
private ServiceTemplate createInitMainServiceTemplate(String releaseVendor) {
ServiceTemplate mainServiceTemplate = new ServiceTemplate();
Map<String, String> templateMetadata = new HashMap<>();
@@ -349,18 +341,6 @@ public class ManualVspToscaGenerationService {
//*************** CREATE GLOBAL SUBSTITUTION SERVICE TEMPLATE **********************
- private ServiceTemplate createGlobalSubstitutionServiceTemplate(ServiceTemplate
- substitutionServiceTemplate,
- String componentName) {
- ServiceTemplate globalSubstitutionServiceTemplate = fetchGlobalSubstitutionServiceTemplate();
- NodeType substitutionNodeType =
- createGlobalSubstitutionNodeType(substitutionServiceTemplate, componentName);
- String substitutionNodeTypeId = getSubstitutionNodeTypeId(componentName);
- DataModelUtil.addNodeType(globalSubstitutionServiceTemplate, substitutionNodeTypeId,
- substitutionNodeType);
- return globalSubstitutionServiceTemplate;
- }
-
private ServiceTemplate createInitGlobalSubstitutionServiceTemplate() {
ServiceTemplate globalSubstitutionServiceTemplate = new ServiceTemplate();
Map<String, String> templateMetadata = new HashMap<>();
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersionCalculatorImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersionCalculatorImpl.java
index b7008de867..df52cdd076 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersionCalculatorImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersionCalculatorImpl.java
@@ -54,75 +54,6 @@ public class VersionCalculatorImpl implements VersionCalculator {
return CommonMethods.arrayToSeparatedString(versionLevels, '.');
}
-
- // version calculator when there are no version restrictions
- /* @Override
- public String calculate(String baseVersion, VersionCreationMethod creationMethod) {
-
- return calculate(baseVersion,creationMethod,2);
- }
-
- private String calculate(String baseVersion, VersionCreationMethod creationMethod,int
- maxVersionLevels) {
- if (baseVersion == null) {
- return INITIAL_VERSION;
- }
-
- String[] versionLevels = baseVersion.split("\\.");
- if (versionLevels.length > maxVersionLevels) {
- throw new IllegalArgumentException(VERSION_STRING_VIOLATION_MSG);
- }
-
- int index;
- int versionLevel = calcVersionLevel(versionLevels);
- if (versionLevel == -1) {
- throw new IllegalArgumentException(
- VERSION_STRING_VIOLATION_MSG + " given version:" + baseVersion);
- }
- int requiredVersionLevelIncrease;
- switch (creationMethod) {
- case parent_level:
- if (versionLevel == 0) {
- throw new IllegalArgumentException(
- PARENT_LEVEL_VERSION_CANNOT_BE_CREATED_FROM_TOP_LEVEL + " version:" + baseVersion);
-
- }
- requiredVersionLevelIncrease = versionLevel - 1;
- versionLevels[versionLevel] = "0";
- index = Integer.getInteger(versionLevels[requiredVersionLevelIncrease]);
- index++;
- versionLevels[requiredVersionLevelIncrease] = Integer.toString(index);
- break;
- case same_level:
- requiredVersionLevelIncrease = versionLevel;
- index = Integer.valueOf(versionLevels[requiredVersionLevelIncrease]);
- index++;
- versionLevels[requiredVersionLevelIncrease] = Integer.toString(index);
- break;
- case sub_level:
- if (versionLevel == versionLevels.length - 1) {
- throw new IllegalArgumentException(
- SUB_LEVEL_VERSION_CANNOT_BE_CREATED_FROM_LOWEST_LEVEL + " version:" + baseVersion);
- }
- requiredVersionLevelIncrease = versionLevel + 1;
- if(requiredVersionLevelIncrease>maxVersionLevels){
- throw new IllegalArgumentException(INVALID_CREATION_METHOD_MSG+" max " +
- "levels:"+maxVersionLevels + "requested level:"+requiredVersionLevelIncrease);
- }
- String newVersion = baseVersion + ".1";
- versionLevels = newVersion.split("\\.");
-
- break;
- default:
- throw new IllegalArgumentException(VERSION_CALCULATION_ERROR_MSG + " base " +
- "version:" + baseVersion + " creation method:" + creationMethod);
-
- }
-
- return CommonMethods.arrayToSeparatedString(versionLevels, '.');
- }*/
-
-
@Override
public void injectAdditionalInfo(Version version, Set<String> existingVersions) {
String optionalVersion;
@@ -143,13 +74,4 @@ public class VersionCalculatorImpl implements VersionCalculator {
}
-
- private int calcVersionLevel(String[] versionLevels) {
- for (int i = versionLevels.length - 1; i >= 0; i--) {
- if (!versionLevels[i].equals("0")) {
- return i;
- }
- }
- return -1;
- }
}