summaryrefslogtreecommitdiffstats
path: root/dcaedt_tools
diff options
context:
space:
mode:
authorEran (ev672n), Vosk <ev672n@att.com>2018-10-29 18:10:13 +0200
committerEran (ev672n), Vosk <ev672n@att.com>2018-10-29 18:15:30 +0200
commitf94a95f9db9e843671f480efd6227f7c72d47532 (patch)
treee7a9043a0bff3c0da258cec4f9fe299c7c83b1fd /dcaedt_tools
parentb4b7410445f359ad265c5e912d092bd275ba19e7 (diff)
Sync the code between repositories Change-Id: I3e570c9c8b090adc5520381019a22e8a46d66beb Issue-ID: SDC-1874 Signed-off-by: Eran (ev672n), Vosk <ev672n@att.com>
Diffstat (limited to 'dcaedt_tools')
-rw-r--r--dcaedt_tools/pom.xml9
-rw-r--r--dcaedt_tools/src/main/java/tools/DeployTemplate.java1
-rw-r--r--dcaedt_tools/src/main/resources/conf/config.json245
-rw-r--r--dcaedt_tools/src/main/resources/conf/environment.json2
-rw-r--r--dcaedt_tools/src/test/java/BaseTest.java3
-rw-r--r--dcaedt_tools/src/test/java/DeployTemplateTest.java3
-rw-r--r--dcaedt_tools/src/test/java/TemplateContainerTest.java2
7 files changed, 15 insertions, 250 deletions
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;