Sync code 04/71404/2 casablanca 1.3.0 3.0.0-ONAP
authorEran (ev672n), Vosk <ev672n@att.com>
Mon, 29 Oct 2018 16:10:13 +0000 (18:10 +0200)
committerEran (ev672n), Vosk <ev672n@att.com>
Mon, 29 Oct 2018 16:15:30 +0000 (18:15 +0200)
Sync the code between repositories

Change-Id: I3e570c9c8b090adc5520381019a22e8a46d66beb
Issue-ID: SDC-1874
Signed-off-by: Eran (ev672n), Vosk <ev672n@att.com>
22 files changed:
dcaedt_be/pom.xml
dcaedt_be/src/main/java/org/onap/sdc/dcae/composition/CompositionEngine.java
dcaedt_be/src/main/java/org/onap/sdc/dcae/composition/impl/CompositionBusinessLogic.java
dcaedt_be/src/main/java/org/onap/sdc/dcae/rule/editor/translators/StringTransformTranslator.java
dcaedt_be/src/test/java/org/onap/sdc/dcae/composition/impl/BlueprintBusinessLogicTest.java
dcaedt_be/src/test/java/org/onap/sdc/dcae/composition/impl/CompositionBusinessLogicTest.java
dcaedt_be/src/test/java/org/onap/sdc/dcae/composition/impl/ServiceBusinessLogicTest.java
dcaedt_be/src/test/java/org/onap/sdc/dcae/composition/impl/VfcmtBusinessLogicTest.java
dcaedt_catalog/api/pom.xml
dcaedt_catalog/asdc/pom.xml
dcaedt_catalog/commons/pom.xml
dcaedt_catalog/db/pom.xml
dcaedt_catalog/service/pom.xml
dcaedt_tools/pom.xml
dcaedt_tools/src/main/java/tools/DeployTemplate.java
dcaedt_tools/src/main/resources/conf/config.json
dcaedt_tools/src/main/resources/conf/environment.json
dcaedt_tools/src/test/java/BaseTest.java
dcaedt_tools/src/test/java/DeployTemplateTest.java
dcaedt_tools/src/test/java/TemplateContainerTest.java
dcaedt_validator/checker/pom.xml
pom.xml

index a33306a..950af26 100644 (file)
@@ -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>
                <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>
                <dependency>
                        <groupId>io.springfox</groupId>
                        <artifactId>springfox-swagger2</artifactId>
-                       <version>2.6.1</version>
+                       <version>2.8.0</version>
                        <scope>compile</scope>
                </dependency>
                <dependency>
                                <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>
index f07358a..c633c59 100644 (file)
@@ -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;
index 43674fe..2791028 100644 (file)
@@ -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 {
index de326d1..146fc53 100644 (file)
@@ -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();
                }
        }
 
index d04a92e..9480de0 100644 (file)
@@ -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;
 
index fbecd71..60ab07c 100644 (file)
@@ -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;
index 671927c..69f940d 100644 (file)
@@ -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 {
index bf1cbbe..c8f7287 100644 (file)
@@ -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\"}");
index 950ced8..4f2ed0f 100644 (file)
                <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>
                </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>
 
index 2ecf3ff..6340f8c 100644 (file)
                                        </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>
                <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>
                <dependency>
                        <groupId>com.google.code.gson</groupId>
                        <artifactId>gson</artifactId>
-                       <version>2.7</version>
+                       <version>2.8.5</version>
                </dependency>
                <dependency>
                        <groupId>junit</groupId>
                        <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>
index 6da23c2..e783d33 100644 (file)
                                </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>
                <dependency>
                        <groupId>com.google.guava</groupId>
                        <artifactId>guava</artifactId>
-                       <version>17.0</version>
+                       <version>20.0</version>
                </dependency>
                <dependency>
                        <groupId>org.yaml</groupId>
                <dependency>
                        <groupId>org.json</groupId>
                        <artifactId>json</artifactId>
-                       <version>20160212</version>
+                       <version>20160810</version>
                </dependency>
                <dependency>
                        <groupId>com.fasterxml.jackson.core</groupId>
                        <artifactId>spring-web</artifactId>
                        <version>5.0.9.RELEASE</version>
                </dependency>
-       </dependencies>
+  </dependencies>
        <properties>
                <sonar.skip>true</sonar.skip>
        </properties>
index 2870d04..1c92e6e 100644 (file)
                <dependency>
                        <groupId>com.google.guava</groupId>
                        <artifactId>guava</artifactId>
-                       <version>17.0</version>
+                       <version>20.0</version>
                </dependency>
                <dependency>
                        <groupId>org.yaml</groupId>
                <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>
index 85a3019..ccde7ad 100644 (file)
@@ -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>
index 96f641a..9817335 100644 (file)
         <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>
         <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>
             <groupId>org.springframework</groupId>
             <artifactId>spring-web</artifactId>
             <version>5.0.9.RELEASE</version>
-            <scope>compile</scope>
         </dependency>
     </dependencies>
 </project>
index 41e5b6a..556316b 100644 (file)
@@ -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;
 
index f7c07d7..7168853 100644 (file)
 
 {
        "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
index abf66b9..c5dd846 100644 (file)
@@ -5,7 +5,7 @@
   "credential" :{
     "editor": "Carlos_Santana",
     "username": "cs0008",
-    "password": "",
+    "password": "123123a",
     "firstName": "",
     "lastName": ""
   }
index 16372e0..8d163a4 100644 (file)
@@ -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();
     }
 
index 0dc35f9..78d27c7 100644 (file)
@@ -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);
index 906d32e..a68323a 100644 (file)
@@ -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;
 
index 2cf5943..985c88f 100644 (file)
                <dependency>
                        <groupId>com.google.guava</groupId>
                        <artifactId>guava</artifactId>
-                       <version>17.0</version>
+                       <version>20.0</version>
                </dependency>
                <dependency>
                        <groupId>org.yaml</groupId>
diff --git a/pom.xml b/pom.xml
index 4598d24..f304f16 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -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>