summaryrefslogtreecommitdiffstats
path: root/asdctool
diff options
context:
space:
mode:
Diffstat (limited to 'asdctool')
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/ArtifactUUIDFixConfiguration.java6
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/configuration/CsarGeneratorConfiguration.java5
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/config/ValidationToolConfiguration.java4
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/config/MigrationSpringConfig.java30
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/config/mocks/HealthCheckBusinessLogicMock.java41
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/config/MigrationSpringConfigTest.java10
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/config/mocks/HealthCheckBusinessLogicMockTest.java39
7 files changed, 25 insertions, 110 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 317bd26107..608c6a6dd7 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
@@ -52,12 +52,6 @@ public class ArtifactUUIDFixConfiguration {
return new ArtifactUuidFix(janusGraphDao, toscaOperationFacade, toscaExportHandler, artifactCassandraDao, csarUtils);
}
-
- @Bean(name = "serviceDistributionArtifactsBuilder")
- public ServiceDistributionArtifactsBuilder serviceDistributionArtifactsBuilder() {
- return new ServiceDistributionArtifactsBuilder();
- }
-
@Bean(name = "elasticsearchConfig")
public PropertiesFactoryBean mapper() {
String configHome = System.getProperty("config.home");
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 4768a62f6c..32c37a36b3 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
@@ -58,10 +58,5 @@ public class CsarGeneratorConfiguration {
bean.setLocation(new FileSystemResource(configHome + "/elasticsearch.yml"));
return bean;
}
- @Bean(name = "serviceDistributionArtifactsBuilder")
- public ServiceDistributionArtifactsBuilder serviceDistributionArtifactsBuilder() {
- return new ServiceDistributionArtifactsBuilder();
- }
-
}
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 764e6d93b1..d59a9aae6a 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
@@ -236,7 +236,7 @@ public class ValidationToolConfiguration {
}
@Bean
- public ServiceDistributionArtifactsBuilder serviceDistributionArtifactsBuilder() {
- return new ServiceDistributionArtifactsBuilder();
+ public ServiceDistributionArtifactsBuilder serviceDistributionArtifactsBuilder(ToscaOperationFacade toscaOperationFacade) {
+ return new ServiceDistributionArtifactsBuilder(toscaOperationFacade);
}
}
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/config/MigrationSpringConfig.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/config/MigrationSpringConfig.java
index 91cce7485d..e5e0740794 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/config/MigrationSpringConfig.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/config/MigrationSpringConfig.java
@@ -27,11 +27,19 @@ import org.openecomp.sdc.asdctool.migration.dao.MigrationTasksDao;
import org.openecomp.sdc.asdctool.migration.resolver.MigrationResolver;
import org.openecomp.sdc.asdctool.migration.resolver.SpringBeansMigrationResolver;
import org.openecomp.sdc.asdctool.migration.service.SdcRepoService;
-import org.openecomp.sdc.be.components.distribution.engine.ServiceDistributionArtifactsBuilder;
+import org.openecomp.sdc.be.components.impl.ResourceBusinessLogic;
+import org.openecomp.sdc.be.components.impl.ServiceBusinessLogic;
import org.openecomp.sdc.be.components.scheduledtasks.ComponentsCleanBusinessLogic;
import org.openecomp.sdc.be.config.CatalogModelSpringConfig;
import org.openecomp.sdc.be.dao.cassandra.CassandraClient;
import org.openecomp.sdc.be.dao.config.DAOSpringConfig;
+import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ArtifactsOperations;
+import org.openecomp.sdc.be.model.jsonjanusgraph.operations.InterfaceOperation;
+import org.openecomp.sdc.be.model.operations.api.IElementOperation;
+import org.openecomp.sdc.be.model.operations.api.IGroupInstanceOperation;
+import org.openecomp.sdc.be.model.operations.api.IGroupOperation;
+import org.openecomp.sdc.be.model.operations.api.IGroupTypeOperation;
+import org.openecomp.sdc.be.model.operations.impl.InterfaceLifecycleOperation;
import org.openecomp.sdc.config.CatalogBESpringConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.PropertiesFactoryBean;
@@ -77,11 +85,6 @@ public class MigrationSpringConfig {
return new MigrationTasksDao(cassandraClient);
}
- @Bean(name = "serviceDistributionArtifactsBuilder")
- public ServiceDistributionArtifactsBuilder serviceDistributionArtifactsBuilder() {
- return new ServiceDistributionArtifactsBuilder();
- }
-
@Bean(name = "elasticsearchConfig")
public PropertiesFactoryBean mapper() {
String configHome = System.getProperty("config.home");
@@ -91,6 +94,19 @@ public class MigrationSpringConfig {
}
@Bean(name = "componentsCleanBusinessLogic")
- public ComponentsCleanBusinessLogic componentsCleanBusinessLogic() {return new ComponentsCleanBusinessLogic(); }
+ public ComponentsCleanBusinessLogic componentsCleanBusinessLogic(
+ IElementOperation elementDao,
+ IGroupOperation groupOperation,
+ IGroupInstanceOperation groupInstanceOperation,
+ IGroupTypeOperation groupTypeOperation,
+ InterfaceOperation interfaceOperation,
+ InterfaceLifecycleOperation interfaceLifecycleTypeOperation,
+ ResourceBusinessLogic resourceBusinessLogic,
+ ServiceBusinessLogic serviceBusinessLogic,
+ ArtifactsOperations artifactToscaOperation) {
+ return new ComponentsCleanBusinessLogic(elementDao, groupOperation,
+ groupInstanceOperation, groupTypeOperation, interfaceOperation, interfaceLifecycleTypeOperation, resourceBusinessLogic,
+ serviceBusinessLogic, artifactToscaOperation);
+ }
}
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/config/mocks/HealthCheckBusinessLogicMock.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/config/mocks/HealthCheckBusinessLogicMock.java
deleted file mode 100644
index 183ca543da..0000000000
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/config/mocks/HealthCheckBusinessLogicMock.java
+++ /dev/null
@@ -1,41 +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.asdctool.migration.config.mocks;
-
-import org.openecomp.sdc.be.components.health.HealthCheckBusinessLogic;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.PostConstruct;
-
-@Component("healthCheckBusinessLogic")
-public class HealthCheckBusinessLogicMock extends HealthCheckBusinessLogic {
-
- @Override
- @PostConstruct
- public void init() {
-
- }
-
- @Override
- protected void destroy() {
-
- }
-}
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/config/MigrationSpringConfigTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/config/MigrationSpringConfigTest.java
index 41e0ac8a0e..ac5fa6eda3 100644
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/config/MigrationSpringConfigTest.java
+++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/config/MigrationSpringConfigTest.java
@@ -83,16 +83,6 @@ public class MigrationSpringConfigTest {
}
@Test
- public void testServiceDistributionArtifactsBuilder() throws Exception {
- MigrationSpringConfig testSubject;
- ServiceDistributionArtifactsBuilder result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.serviceDistributionArtifactsBuilder();
- }
-
- @Test
public void testMapper() throws Exception {
MigrationSpringConfig testSubject;
PropertiesFactoryBean result;
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/config/mocks/HealthCheckBusinessLogicMockTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/config/mocks/HealthCheckBusinessLogicMockTest.java
deleted file mode 100644
index ee34e4b844..0000000000
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/config/mocks/HealthCheckBusinessLogicMockTest.java
+++ /dev/null
@@ -1,39 +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.asdctool.migration.config.mocks;
-
-import org.junit.Test;
-
-public class HealthCheckBusinessLogicMockTest {
-
- private HealthCheckBusinessLogicMock createTestSubject() {
- return new HealthCheckBusinessLogicMock();
- }
-
- @Test
- public void testInit() throws Exception {
- HealthCheckBusinessLogicMock testSubject;
-
- // default test
- testSubject = createTestSubject();
- testSubject.init();
- }
-}