diff options
22 files changed, 76 insertions, 357 deletions
diff --git a/dcaedt_be/pom.xml b/dcaedt_be/pom.xml index a33306a..950af26 100644 --- a/dcaedt_be/pom.xml +++ b/dcaedt_be/pom.xml @@ -36,7 +36,7 @@ <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> - <version>3.5</version> + <version>3.7</version> </dependency> <dependency> <groupId>commons-net</groupId> @@ -51,7 +51,7 @@ <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> - <version>2.8.0</version> + <version>2.8.5</version> </dependency> <dependency> <groupId>org.json</groupId> @@ -86,13 +86,13 @@ <dependency> <groupId>org.powermock</groupId> <artifactId>powermock-module-junit4</artifactId> - <version>2.0.0-beta.5</version> + <version>1.6.4</version> <scope>test</scope> </dependency> <dependency> <groupId>org.powermock</groupId> - <artifactId>powermock-api-mockito2</artifactId> - <version>2.0.0-beta.5</version> + <artifactId>powermock-api-mockito</artifactId> + <version>1.6.4</version> <scope>test</scope> </dependency> <dependency> @@ -109,7 +109,7 @@ <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> - <version>2.6.1</version> + <version>2.8.0</version> <scope>compile</scope> </dependency> <dependency> @@ -135,7 +135,7 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jetty</artifactId> - <version>2.0.5.RELEASE</version> + <version>2.0.6.RELEASE</version> <exclusions> <exclusion> <groupId>org.eclipse.jetty.websocket</groupId> diff --git a/dcaedt_be/src/main/java/org/onap/sdc/dcae/composition/CompositionEngine.java b/dcaedt_be/src/main/java/org/onap/sdc/dcae/composition/CompositionEngine.java index f07358a..c633c59 100644 --- a/dcaedt_be/src/main/java/org/onap/sdc/dcae/composition/CompositionEngine.java +++ b/dcaedt_be/src/main/java/org/onap/sdc/dcae/composition/CompositionEngine.java @@ -14,7 +14,7 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.servlet.FilterRegistrationBean; -import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; +import org.springframework.boot.web.support.SpringBootServletInitializer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; diff --git a/dcaedt_be/src/main/java/org/onap/sdc/dcae/composition/impl/CompositionBusinessLogic.java b/dcaedt_be/src/main/java/org/onap/sdc/dcae/composition/impl/CompositionBusinessLogic.java index 43674fe..2791028 100644 --- a/dcaedt_be/src/main/java/org/onap/sdc/dcae/composition/impl/CompositionBusinessLogic.java +++ b/dcaedt_be/src/main/java/org/onap/sdc/dcae/composition/impl/CompositionBusinessLogic.java @@ -148,7 +148,7 @@ public class CompositionBusinessLogic extends BaseBusinessLogic { if (null != vfiRefs && 1 < vfiRefs.size()) { debugLogger.log(LogLevel.DEBUG, this.getClass().getName(), "Found {} external monitoring references for vfi {} on service {}:{}", vfiRefs.size(), newReferencedMc.getVfiName(), service.getUuid(), vfiRefs); Collections.synchronizedList(vfiRefs).parallelStream() - .filter(p -> !newReferencedMc.getUuid().equals(p)) + .filter(p -> !newReferencedMc.getUuid().equals(p) && !p.endsWith(REVERTED_REF)) .filter(p -> newReferencedMc.getInvariantUUID().equals(sdcRestClient.getResource(p, requestId).getInvariantUUID())) .forEach(id -> sdcRestClient.deleteExternalMonitoringReference(userId, context, service.getUuid(), normalizedInstanceName, id, requestId)); } else { diff --git a/dcaedt_be/src/main/java/org/onap/sdc/dcae/rule/editor/translators/StringTransformTranslator.java b/dcaedt_be/src/main/java/org/onap/sdc/dcae/rule/editor/translators/StringTransformTranslator.java index de326d1..146fc53 100644 --- a/dcaedt_be/src/main/java/org/onap/sdc/dcae/rule/editor/translators/StringTransformTranslator.java +++ b/dcaedt_be/src/main/java/org/onap/sdc/dcae/rule/editor/translators/StringTransformTranslator.java @@ -24,7 +24,7 @@ public class StringTransformTranslator extends ActionTranslator<StringTransformA targetCase = action.targetCase(); trim = String.valueOf(action.trim()); toField = action.getTarget(); - value = action.fromValue(); + value = action.startValue(); } } diff --git a/dcaedt_be/src/test/java/org/onap/sdc/dcae/composition/impl/BlueprintBusinessLogicTest.java b/dcaedt_be/src/test/java/org/onap/sdc/dcae/composition/impl/BlueprintBusinessLogicTest.java index d04a92e..9480de0 100644 --- a/dcaedt_be/src/test/java/org/onap/sdc/dcae/composition/impl/BlueprintBusinessLogicTest.java +++ b/dcaedt_be/src/test/java/org/onap/sdc/dcae/composition/impl/BlueprintBusinessLogicTest.java @@ -13,7 +13,7 @@ import org.springframework.http.ResponseEntity; import org.mockito.MockitoAnnotations; import java.util.ArrayList; -import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Matchers.eq; import static org.mockito.Mockito.when; import static org.onap.sdc.dcae.composition.util.DcaeBeConstants.Composition.fileNames.COMPOSITION_YML; diff --git a/dcaedt_be/src/test/java/org/onap/sdc/dcae/composition/impl/CompositionBusinessLogicTest.java b/dcaedt_be/src/test/java/org/onap/sdc/dcae/composition/impl/CompositionBusinessLogicTest.java index fbecd71..60ab07c 100644 --- a/dcaedt_be/src/test/java/org/onap/sdc/dcae/composition/impl/CompositionBusinessLogicTest.java +++ b/dcaedt_be/src/test/java/org/onap/sdc/dcae/composition/impl/CompositionBusinessLogicTest.java @@ -21,8 +21,8 @@ import java.util.Arrays; import java.util.List; import static org.junit.Assert.assertEquals; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.Matchers.any; +import static org.mockito.Matchers.anyString; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; diff --git a/dcaedt_be/src/test/java/org/onap/sdc/dcae/composition/impl/ServiceBusinessLogicTest.java b/dcaedt_be/src/test/java/org/onap/sdc/dcae/composition/impl/ServiceBusinessLogicTest.java index 671927c..69f940d 100644 --- a/dcaedt_be/src/test/java/org/onap/sdc/dcae/composition/impl/ServiceBusinessLogicTest.java +++ b/dcaedt_be/src/test/java/org/onap/sdc/dcae/composition/impl/ServiceBusinessLogicTest.java @@ -28,9 +28,9 @@ import java.util.stream.Collectors; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertEquals; -import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.Matchers.any; +import static org.mockito.Matchers.anyString; import static org.mockito.Mockito.when; -import static org.mockito.ArgumentMatchers.any; import static org.testng.Assert.assertNotEquals; public class ServiceBusinessLogicTest { diff --git a/dcaedt_be/src/test/java/org/onap/sdc/dcae/composition/impl/VfcmtBusinessLogicTest.java b/dcaedt_be/src/test/java/org/onap/sdc/dcae/composition/impl/VfcmtBusinessLogicTest.java index bf1cbbe..c8f7287 100644 --- a/dcaedt_be/src/test/java/org/onap/sdc/dcae/composition/impl/VfcmtBusinessLogicTest.java +++ b/dcaedt_be/src/test/java/org/onap/sdc/dcae/composition/impl/VfcmtBusinessLogicTest.java @@ -21,7 +21,6 @@ import org.onap.sdc.dcae.errormng.RequestError; import org.onap.sdc.dcae.errormng.ResponseFormat; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; -import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; import java.util.ArrayList; import java.util.Arrays; @@ -30,13 +29,14 @@ import java.util.List; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyString; import static org.mockito.Mockito.*; +import static org.mockito.MockitoAnnotations.initMocks; import static org.onap.sdc.dcae.composition.util.DcaeBeConstants.LifecycleStateEnum.CERTIFIED; import static org.onap.sdc.dcae.composition.util.DcaeBeConstants.LifecycleStateEnum.NOT_CERTIFIED_CHECKOUT; public class VfcmtBusinessLogicTest { - private ISdcClient sdcClientMock = Mockito.mock(ISdcClient.class); - private ResourceDetailed templateMC = Mockito.mock(ResourceDetailed.class); + private ISdcClient sdcClientMock = mock(ISdcClient.class); + private ResourceDetailed templateMC = mock(ResourceDetailed.class); private VfcmtBusinessLogic vfcmtBusinessLogic = new VfcmtBusinessLogic(); private ImportVFCMTRequest request = new ImportVFCMTRequest(); @@ -46,7 +46,7 @@ public class VfcmtBusinessLogicTest { @Before public void setup(){ - MockitoAnnotations.initMocks(this); + initMocks(this); new ErrorConfigurationLoader(System.getProperty("user.dir")+"/src/main/webapp/WEB-INF"); vfcmtBusinessLogic.setSdcRestClient(sdcClientMock); request.setTemplateUuid("577"); @@ -91,7 +91,7 @@ public class VfcmtBusinessLogicTest { public void successfulCreationAndAttachmentOfVfcmt() throws Exception { when(templateMC.getUuid()).thenReturn("3"); when(sdcClientMock.getResource(anyString(),anyString())).thenReturn(templateMC); - ResourceDetailed mockedVfcmt = Mockito.mock(ResourceDetailed.class); + ResourceDetailed mockedVfcmt = mock(ResourceDetailed.class); when(mockedVfcmt.getUuid()).thenReturn("5"); when(sdcClientMock.createResource(anyString(),any(),anyString())).thenReturn(mockedVfcmt); when(sdcClientMock.getResourceArtifact(anyString(),anyString(),anyString())).thenReturn("3243324"); @@ -292,7 +292,7 @@ public class VfcmtBusinessLogicTest { private void emulateListOfArtifactsWithCompositionYml() { List<Artifact> listOfArtifactCompositionYml = new ArrayList<>(); - Artifact compositionArtifact = Mockito.mock(Artifact.class); + Artifact compositionArtifact = mock(Artifact.class); when(compositionArtifact.getArtifactName()).thenReturn(DcaeBeConstants.Composition.fileNames.COMPOSITION_YML); when(compositionArtifact.getArtifactUUID()).thenReturn("compositionArtifactUuid"); when(compositionArtifact.getPayloadData()).thenReturn("{\"flowType\":\"don't override\"}"); @@ -303,7 +303,7 @@ public class VfcmtBusinessLogicTest { private void emulateCdumpArtifactWithoutFlowtype() { List<Artifact> listOfArtifactCompositionYml = new ArrayList<>(); - Artifact compositionArtifact = Mockito.mock(Artifact.class); + Artifact compositionArtifact = mock(Artifact.class); when(compositionArtifact.getArtifactName()).thenReturn(DcaeBeConstants.Composition.fileNames.COMPOSITION_YML); when(compositionArtifact.getArtifactUUID()).thenReturn("compositionArtifactUuid"); when(compositionArtifact.getPayloadData()).thenReturn("{\"cid\":\"xsssdaerrwr\"}\""); @@ -313,8 +313,8 @@ public class VfcmtBusinessLogicTest { private void emulateListOfArtifactsWithCompositionYmlAndSvcRef() { List<Artifact> listOfArtifactCompositionYml = new ArrayList<>(); - Artifact compositionArtifact = Mockito.mock(Artifact.class); - Artifact svcRefArtifact = Mockito.mock(Artifact.class); + Artifact compositionArtifact = mock(Artifact.class); + Artifact svcRefArtifact = mock(Artifact.class); when(compositionArtifact.getArtifactName()).thenReturn(DcaeBeConstants.Composition.fileNames.COMPOSITION_YML); when(compositionArtifact.getArtifactUUID()).thenReturn("compositionArtifactUuid"); when(compositionArtifact.getPayloadData()).thenReturn("{\"flowType\":\"don't override\"}"); diff --git a/dcaedt_catalog/api/pom.xml b/dcaedt_catalog/api/pom.xml index 950ced8..4f2ed0f 100644 --- a/dcaedt_catalog/api/pom.xml +++ b/dcaedt_catalog/api/pom.xml @@ -127,12 +127,12 @@ <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> - <version>3.5</version> + <version>3.7</version> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpasyncclient</artifactId> - <version>4.1</version> + <version>4.1.4</version> </dependency> <dependency> <groupId>commons-io</groupId> @@ -169,27 +169,9 @@ </dependency> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-all</artifactId> - <version>2.0.2-beta</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>net.bytebuddy</groupId> - <artifactId>byte-buddy</artifactId> - <version>1.8.16</version> - </dependency> - <dependency> - <groupId>net.bytebuddy</groupId> - <artifactId>byte-buddy-agent</artifactId> - <version>1.8.16</version> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <version>1.10.19</version> <scope>test</scope> </dependency> diff --git a/dcaedt_catalog/asdc/pom.xml b/dcaedt_catalog/asdc/pom.xml index 2ecf3ff..6340f8c 100644 --- a/dcaedt_catalog/asdc/pom.xml +++ b/dcaedt_catalog/asdc/pom.xml @@ -41,22 +41,6 @@ </execution> </executions> </plugin> - <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - <version>2.0.5.RELEASE</version> - <configuration> - <mainClass>org.onap.sdc.dcae.catalog.asdc.ASDCEngine</mainClass> - <classifier>exec</classifier> - </configuration> - <executions> - <execution> - <goals> - <goal>repackage</goal> - </goals> - </execution> - </executions> - </plugin> </plugins> </build> <dependencies> @@ -79,7 +63,7 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> - <version>2.0.5.RELEASE</version> + <version>2.0.6.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> @@ -89,12 +73,12 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-autoconfigure</artifactId> - <version>2.0.5.RELEASE</version> + <version>2.0.6.RELEASE</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> - <version>3.5</version> + <version>3.7</version> </dependency> <dependency> <groupId>commons-cli</groupId> @@ -114,7 +98,7 @@ <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> - <version>2.7</version> + <version>2.8.5</version> </dependency> <dependency> <groupId>junit</groupId> @@ -126,22 +110,10 @@ <artifactId>assertj-core</artifactId> <scope>test</scope> </dependency> - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-all</artifactId> - <version>2.0.2-beta</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>net.bytebuddy</groupId> - <artifactId>byte-buddy</artifactId> - <version>1.8.16</version> - </dependency> - <dependency> - <groupId>net.bytebuddy</groupId> - <artifactId>byte-buddy-agent</artifactId> - <version>1.8.16</version> - <scope>test</scope> - </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <scope>test</scope> + </dependency> </dependencies> </project> diff --git a/dcaedt_catalog/commons/pom.xml b/dcaedt_catalog/commons/pom.xml index 6da23c2..e783d33 100644 --- a/dcaedt_catalog/commons/pom.xml +++ b/dcaedt_catalog/commons/pom.xml @@ -75,12 +75,12 @@ </configuration> </plugin> </plugins> - </build> - <dependencies> - <dependency> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpasyncclient</artifactId> - <version>4.1</version> + </build> + <dependencies> + <dependency> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpasyncclient</artifactId> + <version>4.1.4</version> </dependency> <dependency> <groupId>commons-io</groupId> @@ -93,9 +93,9 @@ <version>1.3</version> </dependency> <dependency> - <groupId>commons-beanutils</groupId> - <artifactId>commons-beanutils</artifactId> - <version>1.9.3</version> + <groupId>commons-beanutils</groupId> + <artifactId>commons-beanutils</artifactId> + <version>1.9.3</version> </dependency> <dependency> <groupId>commons-jxpath</groupId> @@ -105,7 +105,7 @@ <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> - <version>17.0</version> + <version>20.0</version> </dependency> <dependency> <groupId>org.yaml</groupId> @@ -115,7 +115,7 @@ <dependency> <groupId>org.json</groupId> <artifactId>json</artifactId> - <version>20160212</version> + <version>20160810</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> @@ -132,7 +132,7 @@ <artifactId>spring-web</artifactId> <version>5.0.9.RELEASE</version> </dependency> - </dependencies> + </dependencies> <properties> <sonar.skip>true</sonar.skip> </properties> diff --git a/dcaedt_catalog/db/pom.xml b/dcaedt_catalog/db/pom.xml index 2870d04..1c92e6e 100644 --- a/dcaedt_catalog/db/pom.xml +++ b/dcaedt_catalog/db/pom.xml @@ -128,7 +128,7 @@ <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> - <version>17.0</version> + <version>20.0</version> </dependency> <dependency> <groupId>org.yaml</groupId> @@ -138,14 +138,14 @@ <dependency> <groupId>org.json</groupId> <artifactId>json</artifactId> - <version>20160212</version> + <version>20160810</version> </dependency> <dependency> - <groupId>com.github.wnameless</groupId> - <artifactId>json-flattener</artifactId> - <version>0.2.2</version> + <groupId>com.github.wnameless</groupId> + <artifactId>json-flattener</artifactId> + <version>0.2.2</version> </dependency> - </dependencies> + </dependencies> <properties> <sonar.skip>true</sonar.skip> </properties> diff --git a/dcaedt_catalog/service/pom.xml b/dcaedt_catalog/service/pom.xml index 85a3019..ccde7ad 100644 --- a/dcaedt_catalog/service/pom.xml +++ b/dcaedt_catalog/service/pom.xml @@ -26,7 +26,7 @@ <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> - <version>2.0.5.RELEASE</version> + <version>2.0.6.RELEASE</version> <configuration> <classifier>exec</classifier> </configuration> @@ -60,7 +60,7 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> - <version>2.0.5.RELEASE</version> + <version>2.0.6.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> @@ -70,7 +70,7 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-autoconfigure</artifactId> - <version>2.0.5.RELEASE</version> + <version>2.0.6.RELEASE</version> </dependency> <dependency> <groupId>org.onap.sdc.dcae-d.dt-be-main</groupId> diff --git a/dcaedt_tools/pom.xml b/dcaedt_tools/pom.xml index 96f641a..9817335 100644 --- a/dcaedt_tools/pom.xml +++ b/dcaedt_tools/pom.xml @@ -207,7 +207,7 @@ <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> - <version>2.8.0</version> + <version>2.8.5</version> </dependency> <dependency> <groupId>org.onap.sdc.dcae-d.dt-be-property</groupId> @@ -217,13 +217,13 @@ <dependency> <groupId>org.powermock</groupId> <artifactId>powermock-module-junit4</artifactId> - <version>2.0.0-beta.5</version> + <version>1.6.4</version> <scope>test</scope> </dependency> <dependency> <groupId>org.powermock</groupId> - <artifactId>powermock-api-mockito2</artifactId> - <version>2.0.0-beta.5</version> + <artifactId>powermock-api-mockito</artifactId> + <version>1.6.4</version> <scope>test</scope> </dependency> <dependency> @@ -265,7 +265,6 @@ <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>5.0.9.RELEASE</version> - <scope>compile</scope> </dependency> </dependencies> </project> diff --git a/dcaedt_tools/src/main/java/tools/DeployTemplate.java b/dcaedt_tools/src/main/java/tools/DeployTemplate.java index 41e5b6a..556316b 100644 --- a/dcaedt_tools/src/main/java/tools/DeployTemplate.java +++ b/dcaedt_tools/src/main/java/tools/DeployTemplate.java @@ -4,6 +4,7 @@ import json.templateInfo.TemplateInfo; import org.onap.sdc.dcae.composition.restmodels.CreateVFCMTRequest; import org.onap.sdc.dcae.composition.restmodels.sdc.ResourceDetailed; import org.onap.sdc.dcae.composition.util.DcaeBeConstants; +import org.springframework.web.client.HttpServerErrorException; import utilities.IDcaeRestClient; import utilities.IReport; diff --git a/dcaedt_tools/src/main/resources/conf/config.json b/dcaedt_tools/src/main/resources/conf/config.json index f7c07d7..7168853 100644 --- a/dcaedt_tools/src/main/resources/conf/config.json +++ b/dcaedt_tools/src/main/resources/conf/config.json @@ -1,250 +1,15 @@ { "templateInfo": [{ - "name": "Syslog Collector", - "flowType": "Syslog Collector", - "description": "Syslog Collector", + "name": "Tcadocker complex", + "flowType": "Tcadocker complex", + "description": "Tcadocker complex", "category": "Template", "subCategory":"Base Monitoring Template", "updateIfExist": "false", "composition": [{ - "type": "SyslogCollector", + "type": "tcadocker spec complex", "alias": "" }] - },{ - "name": "Syslog MSEA", - "flowType": "Syslog MSEA", - "description": "Syslog MSEA", - "category": "Template", - "subCategory":"Base Monitoring Template", - "updateIfExist": "false", - "composition": [{ - "type": "Map", - "alias": "" - }, { - "type": "Supplement", - "alias": "" - }, { - "type": "Enrich", - "alias": "" - }, { - "type": "Alert", - "alias": "" - }], - "relations": [{ - "fromComponent": "Supplement", - "fromRequirement": "dependency", - "toComponent": "Map", - "toCapability": "feature" - },{ - "fromComponent": "Enrich", - "fromRequirement": "dependency", - "toComponent": "Supplement", - "toCapability": "feature" - },{ - "fromComponent": "Alert", - "fromRequirement": "dependency", - "toComponent": "Enrich", - "toCapability": "feature" - }] - }, - - { - "name": "Status Poller MSE", - "flowType": "Status Poller MSE", - "description": "Status Poller MSE", - "category": "Template", - "subCategory":"Base Monitoring Template", - "updateIfExist": "false", - "composition": [{ - "type": "Map", - "alias": "" - }, { - "type": "Supplement", - "alias": "" - }, { - "type": "Enrich", - "alias": "" - }], - "relations": [{ - "fromComponent": "Supplement", - "fromRequirement": "dependency", - "toComponent": "Map", - "toCapability": "feature" - },{ - "fromComponent": "Enrich", - "fromRequirement": "dependency", - "toComponent": "Supplement", - "toCapability": "feature" - }] - }, { - "name": "FOI Collector", - "flowType": "FOI Collector", - "description": "FOI Collector", - "category": "Template", - "subCategory":"Base Monitoring Template", - "updateIfExist": "false", - "composition": [{ - "type": "FOICollector", - "alias": "" - }] - - }, { - "name": "SNMP MSE", - "flowType": "SNMP MSE", - "description": "SNMP MSE", - "category": "Template", - "subCategory":"Base Monitoring Template", - "updateIfExist": "false", - "composition": [{ - "type": "Map", - "alias": "" - }, { - "type": "Supplement", - "alias": "" - }, { - "type": "Enrich", - "alias": "" - }], - "relations": [{ - "fromComponent": "Supplement", - "fromRequirement": "dependency", - "toComponent": "Map", - "toCapability": "feature" - },{ - "fromComponent": "Enrich", - "fromRequirement": "dependency", - "toComponent": "Supplement", - "toCapability": "feature" - }] - }, { - "name": "Docker Map", - "flowType": "Docker Map", - "description": "Docker Map", - "category": "Template", - "subCategory":"Base Monitoring Template", - "updateIfExist": "false", - "composition": [{ - "type": "DockerMap", - "alias": "" - }] - }, - { - "name": "SAM Collector", - "flowType": "SAM Collector", - "description": "SAM Collector", - "category": "Template", - "subCategory":"Base Monitoring Template", - "updateIfExist": "false", - "composition": [{ - "type": "SAMCollector1806", - "alias": "" - }] - }, - { - "name": "SNMP PM Poller", - "flowType": "SNMP PM Poller", - "description": "SNMP PM Poller", - "category": "Template", - "subCategory":"Base Monitoring Template", - "updateIfExist": "false", - "composition": [{ - "type": "PM Poller", - "alias": "" - }] - }, - { - "name": "Status Poller Collector", - "flowType": "Status Poller Collector", - "description": "Status Poller Collector", - "category": "Template", - "subCategory": "Base Monitoring Template", - "updateIfExist": "false", - "composition": [ - { - "type": "StatusPoller", - "alias": "" - }] - }, - { - "name": "VES Collector", - "flowType": "VES Collector", - "description": "VES Collector", - "category": "Template", - "subCategory":"Base Monitoring Template", - "updateIfExist": "false", - "composition": [{ - "type": "VES Collector", - "alias": "" - }] - }, - { - "name": "VES Fault SE", - "flowType": "VES Fault SE", - "description": "VES Fault SE", - "category": "Template", - "subCategory":"Base Monitoring Template", - "updateIfExist": "false", - "composition": [{ - "type": "Supplement", - "alias": "" - }, { - "type": "Enrich", - "alias": "" - }], - "relations": [{ - "fromComponent": "Enrich", - "fromRequirement": "dependency", - "toComponent": "Supplement", - "toCapability": "feature" - }] - }, - { - "name": "Docker Supplement", - "flowType": "Docker Supplement", - "description": "Docker Supplement", - "category": "Template", - "subCategory":"Base Monitoring Template", - "updateIfExist": "false", - "composition": [{ - "type": "Docker_Supplement", - "alias": "" - }] - }, - { - "name": "Docker Enrich", - "flowType": "Docker Enrich", - "description": "Docker Enrich", - "category": "Template", - "subCategory":"Base Monitoring Template", - "updateIfExist": "false", - "composition": [{ - "type": "DockerEnrich", - "alias": "" - }] - }, - { - "name": "MIB Poller", - "flowType": "MIB Poller", - "description": "MIB Poller", - "category": "Template", - "subCategory":"Base Monitoring Template", - "updateIfExist": "false", - "composition": [{ - "type": "MIBPoller", - "alias": "" - }] - }, - { - "name": "Discovery Poller", - "flowType": "Discovery Poller", - "description": "Discovery Poller", - "category": "Template", - "subCategory":"Base Monitoring Template", - "updateIfExist": "false", - "composition": [{ - "type": "Discovery", - "alias": "" - }] - }] + }] }
\ No newline at end of file diff --git a/dcaedt_tools/src/main/resources/conf/environment.json b/dcaedt_tools/src/main/resources/conf/environment.json index abf66b9..c5dd846 100644 --- a/dcaedt_tools/src/main/resources/conf/environment.json +++ b/dcaedt_tools/src/main/resources/conf/environment.json @@ -5,7 +5,7 @@ "credential" :{ "editor": "Carlos_Santana", "username": "cs0008", - "password": "", + "password": "123123a", "firstName": "", "lastName": "" } diff --git a/dcaedt_tools/src/test/java/BaseTest.java b/dcaedt_tools/src/test/java/BaseTest.java index 16372e0..8d163a4 100644 --- a/dcaedt_tools/src/test/java/BaseTest.java +++ b/dcaedt_tools/src/test/java/BaseTest.java @@ -11,7 +11,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Matchers.any; import static org.mockito.Mockito.when; abstract class BaseTest { @@ -42,7 +42,6 @@ abstract class BaseTest { @Before public void setup() { MockitoAnnotations.initMocks(this); - mockGetCatalog(); } diff --git a/dcaedt_tools/src/test/java/DeployTemplateTest.java b/dcaedt_tools/src/test/java/DeployTemplateTest.java index 0dc35f9..78d27c7 100644 --- a/dcaedt_tools/src/test/java/DeployTemplateTest.java +++ b/dcaedt_tools/src/test/java/DeployTemplateTest.java @@ -7,7 +7,7 @@ import tools.DeployTemplate; import java.util.*; -import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyString; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; @@ -28,6 +28,7 @@ public class DeployTemplateTest extends BaseTest { super.mockCheckoutVfcmtAndCreateResource(); when(dcaeRestClient.getUserId()).thenReturn(USER_ID); when(dcaeRestClient.saveComposition(any(), any())).thenReturn("Composition Created"); + templateInfoToJsonObjectMap = new HashMap<>(); TemplateInfo templateInfo = new TemplateInfo(); templateInfo.setName(VFCMT_NAME1); diff --git a/dcaedt_tools/src/test/java/TemplateContainerTest.java b/dcaedt_tools/src/test/java/TemplateContainerTest.java index 906d32e..a68323a 100644 --- a/dcaedt_tools/src/test/java/TemplateContainerTest.java +++ b/dcaedt_tools/src/test/java/TemplateContainerTest.java @@ -11,7 +11,7 @@ import tools.TemplateContainer; import java.util.*; -import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.Matchers.anyString; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; diff --git a/dcaedt_validator/checker/pom.xml b/dcaedt_validator/checker/pom.xml index 2cf5943..985c88f 100644 --- a/dcaedt_validator/checker/pom.xml +++ b/dcaedt_validator/checker/pom.xml @@ -125,7 +125,7 @@ <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> - <version>17.0</version> + <version>20.0</version> </dependency> <dependency> <groupId>org.yaml</groupId> @@ -11,7 +11,7 @@ <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> - <version>2.0.5.RELEASE</version> + <version>1.5.9.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> |