From f94a95f9db9e843671f480efd6227f7c72d47532 Mon Sep 17 00:00:00 2001 From: "Eran (ev672n), Vosk" Date: Mon, 29 Oct 2018 18:10:13 +0200 Subject: Sync code Sync the code between repositories Change-Id: I3e570c9c8b090adc5520381019a22e8a46d66beb Issue-ID: SDC-1874 Signed-off-by: Eran (ev672n), Vosk --- dcaedt_tools/pom.xml | 9 +- .../src/main/java/tools/DeployTemplate.java | 1 + dcaedt_tools/src/main/resources/conf/config.json | 245 +-------------------- .../src/main/resources/conf/environment.json | 2 +- dcaedt_tools/src/test/java/BaseTest.java | 3 +- dcaedt_tools/src/test/java/DeployTemplateTest.java | 3 +- .../src/test/java/TemplateContainerTest.java | 2 +- 7 files changed, 15 insertions(+), 250 deletions(-) (limited to 'dcaedt_tools') 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 @@ com.google.code.gson gson - 2.8.0 + 2.8.5 org.onap.sdc.dcae-d.dt-be-property @@ -217,13 +217,13 @@ org.powermock powermock-module-junit4 - 2.0.0-beta.5 + 1.6.4 test org.powermock - powermock-api-mockito2 - 2.0.0-beta.5 + powermock-api-mockito + 1.6.4 test @@ -265,7 +265,6 @@ org.springframework spring-web 5.0.9.RELEASE - compile 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; -- cgit 1.2.3-korg