diff options
Diffstat (limited to 'dcaedt_tools/src')
6 files changed, 11 insertions, 245 deletions
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; |