aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xvid-app-common/pom.xml5
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html4
-rw-r--r--vid-automation/src/main/java/vid/automation/test/test/ChangeManagementTest.java3
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/ServiceInstanceMsoApiTest.java22
4 files changed, 26 insertions, 8 deletions
diff --git a/vid-app-common/pom.xml b/vid-app-common/pom.xml
index 21a67695e..fc267a62d 100755
--- a/vid-app-common/pom.xml
+++ b/vid-app-common/pom.xml
@@ -34,6 +34,7 @@
<hibernate.version>4.3.11.Final</hibernate.version>
<jackson.version>2.9.9</jackson.version>
<jackson.databind.version>2.9.9.3</jackson.databind.version>
+ <onap.logging.version>1.5.1</onap.logging.version>
<jersey.version>2.29</jersey.version>
<surefire.version>2.22.1</surefire.version>
<selenium.version>3.141.59</selenium.version>
@@ -610,12 +611,12 @@
<dependency>
<groupId>org.onap.logging-analytics</groupId>
<artifactId>logging-filter-base</artifactId>
- <version>1.5.1</version>
+ <version>${onap.logging.version}</version>
</dependency>
<dependency>
<groupId>org.onap.logging-analytics</groupId>
<artifactId>logging-filter-spring</artifactId>
- <version>1.5.1</version>
+ <version>${onap.logging.version}</version>
</dependency>
<dependency>
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html
index d3cb239e6..1e06df262 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html
@@ -132,9 +132,7 @@
class="vnf-versions-select-as-text"
id="{{vnfName['invariant-id']}}-target-version-select">
<option value="" disabled="" selected="selected">Select Target VNF Model Version</option>
- <option ng-repeat="version in vnfName.availableVersions">
- {{version.modelInfo.modelVersion}}
- </option>
+ <option ng-repeat="version in vnfName.availableVersions">{{version.modelInfo.modelVersion}}</option>
</select>
</td>
<td class="col-md-1 vnf-versions-file">
diff --git a/vid-automation/src/main/java/vid/automation/test/test/ChangeManagementTest.java b/vid-automation/src/main/java/vid/automation/test/test/ChangeManagementTest.java
index ef13fcea5..351e5b03f 100644
--- a/vid-automation/src/main/java/vid/automation/test/test/ChangeManagementTest.java
+++ b/vid-automation/src/main/java/vid/automation/test/test/ChangeManagementTest.java
@@ -640,7 +640,8 @@ public class ChangeManagementTest extends VidBaseTestCase {
"widgetData", ImmutableMap.builder()
.put("vnfNames", ImmutableList.of(ImmutableMap.of(
"id", vnfInstanceId,
- "invariant-id", modelInvariantId
+ "invariant-id", modelInvariantId,
+ "version", "5.0"
)))
.put("workflowParameters", emptyMap())
.put("subscriberId", "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb")
diff --git a/vid-automation/src/test/java/org/onap/vid/api/ServiceInstanceMsoApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/ServiceInstanceMsoApiTest.java
index ef582099d..28b407697 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/ServiceInstanceMsoApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/ServiceInstanceMsoApiTest.java
@@ -1,19 +1,25 @@
package org.onap.vid.api;
+import static vid.automation.test.services.SimulatorApi.registerExpectationFromPresets;
+
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
+import java.io.IOException;
+import java.net.URISyntaxException;
import org.apache.commons.text.StringEscapeUtils;
import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetCloudOwnersByCloudRegionId;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubscribersGet;
import org.onap.simulator.presetGenerator.presets.mso.PresetMSOActivateFabricConfiguration;
import org.onap.simulator.presetGenerator.presets.mso.PresetMSOActivateFabricConfigurationErrorResponse;
import org.onap.simulator.presetGenerator.presets.mso.PresetMSODeactivateAndCloudDelete;
import org.onap.simulator.presetGenerator.presets.mso.PresetMSODeactivateAndCloudDeleteErrorResponse;
+import org.onap.vid.more.LoggerFormatTest;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
import org.testng.annotations.Test;
+import vid.automation.test.services.SimulatorApi.RegistrationStrategy;
-import java.io.IOException;
-import java.net.URISyntaxException;
public class ServiceInstanceMsoApiTest extends BaseMsoApiTest{
@@ -123,6 +129,18 @@ public class ServiceInstanceMsoApiTest extends BaseMsoApiTest{
HttpStatus.ACCEPTED.value(), EXPECTED_SUCCESS_MSO_RESPONSE, HttpMethod.POST);
}
+ @Test
+ public void testWhenCallMsoRequestLoggedInMetrics() {
+ String msoRootPath = "/mso/serviceInstantiation/v7";
+ String requestBody = TestUtils.convertRequest(objectMapper, ACTIVATE_FABRIC_CONFIGURATION_REQUEST_DETAILS);
+ registerExpectationFromPresets(ImmutableList.of(
+ new PresetMSOActivateFabricConfiguration("f36f5734-e9df-4fbf-9f35-61be13f028a1", "b6dc9806-b094-42f7-9386-a48de8218ce8"),
+ new PresetAAIGetSubscribersGet()), RegistrationStrategy.CLEAR_THEN_SET);
+ ResponseEntity<String> responseEntity = restTemplate.postForEntity(buildUri(MSO_ACTIVATE_FABRIC_CONFIGURATION), requestBody, String.class);
+ String requestId = responseEntity.getHeaders().getFirst("X-ECOMP-RequestID-echo");
+ LoggerFormatTest.assertHeadersAndMetricLogs(restTemplate, uri, requestId, msoRootPath, 1);
+ }
+
@Test(dataProvider = "errorCodes")
public void testActivateFabricConfigurationFailed(int errorCode) throws IOException, URISyntaxException {
String requestBody = TestUtils.convertRequest(objectMapper, ACTIVATE_FABRIC_CONFIGURATION_REQUEST_DETAILS);