summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWojciech Sliwka <wojciech.sliwka@nokia.com>2018-09-27 13:54:22 +0200
committerWojciech Sliwka <wojciech.sliwka@nokia.com>2018-10-01 15:18:57 +0200
commit64b1d076e9081637833c4af6d4c3f296d8121c0a (patch)
treef25eba2ed26e60f8b2b79481723f5a2b2ad1264b
parent52cb6586c32cb99b1aab99bebfa51b01d98beba4 (diff)
Fix service instantiation error
Fix error during service instantiation (unknown field during call to SO) Fix endpoit used durign creating vf module instance Add separate endpoint for scale out Issue-ID: VID-317 Change-Id: I34c25ae9d1ee1afe71ac340ef71c2572686bee2b Signed-off-by: Wojciech Sliwka <wojciech.sliwka@nokia.com>
-rwxr-xr-xepsdk-app-onap/src/main/webapp/WEB-INF/conf/system.properties3
-rwxr-xr-xepsdk-app-onap/src/main/webapp/WEB-INF/conf/system_template.properties3
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java2
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java13
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/mso/MsoProperties.java2
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/mso/rest/RequestDetails.java24
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/services/ChangeManagementServiceImpl.java2
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js3
-rw-r--r--vid-app-common/src/test/resources/payload_jsons/activateOperationalEnvironmentsPayloadToMso.json1
-rw-r--r--vid-app-common/src/test/resources/payload_jsons/deactivateOperationalEnvironmentsPayloadToMso.json1
10 files changed, 39 insertions, 15 deletions
diff --git a/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system.properties b/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system.properties
index 34ae55f67..266ca96b0 100755
--- a/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system.properties
+++ b/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system.properties
@@ -166,7 +166,8 @@ mso.restapi.svc.instance.deleteAndUnassign=/serviceInstantiation/v7/serviceInsta
mso.restapi.vnf.instance=/serviceInstances/v6/<service_instance_id>/vnfs
mso.restapi.vnf.changemanagement.instance=/serviceInstances/v6/<service_instance_id>/vnfs/<vnf_instance_id>/<request_type>
mso.restapi.network.instance=/serviceInstances/v6/<service_instance_id>/networks
-mso.restapi.vf.module.instance=/serviceInstantiation/v7/serviceInstances/<service_instance_id>/vnfs/<vnf_instance_id>/vfModules/scaleOut
+mso.restapi.vf.module.instance=/serviceInstances/v6/<service_instance_id>/vnfs/<vnf_instance_id>/vfModules
+mso.restapi.vf.module.scaleout=/serviceInstantiation/v7/serviceInstances/<service_instance_id>/vnfs/<vnf_instance_id>/vfModules/scaleOut
mso.restapi.volume.group.instance=/serviceInstances/v6/<service_instance_id>/vnfs/<vnf_instance_id>/volumeGroups
mso.restapi.get.orc.req=/orchestrationRequests/v6
mso.restapi.get.orc.reqs=/orchestrationRequests/v6?
diff --git a/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system_template.properties b/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system_template.properties
index 9445b7322..29d2f0b68 100755
--- a/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system_template.properties
+++ b/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system_template.properties
@@ -109,7 +109,8 @@ mso.restapi.svc.instance.deleteAndUnassign=/serviceInstantiation/v7/serviceInsta
mso.restapi.vnf.instance=/onap/so/infra/serviceInstances/v6/<service_instance_id>/vnfs
mso.restapi.vnf.changemanagement.instance=/onap/so/infra/serviceInstances/v6/<service_instance_id>/vnfs/<vnf_instance_id>/<request_type>
mso.restapi.network.instance=/onap/so/infra/serviceInstances/v6/<service_instance_id>/networks
-mso.restapi.vf.module.instance=/onap/so/infra/serviceInstantiation/v7/serviceInstances/<service_instance_id>/vnfs/<vnf_instance_id>/vfModules/scaleOut
+mso.restapi.vf.module.scaleout=/onap/so/infra/serviceInstantiation/v7/serviceInstances/<service_instance_id>/vnfs/<vnf_instance_id>/vfModules/scaleOut
+mso.restapi.vf.module.instance=/onap/so/infra//serviceInstances/v6/<service_instance_id>/vnfs/<vnf_instance_id>/vfModules
mso.restapi.volume.group.instance=/onap/so/infra/serviceInstances/v6/<service_instance_id>/vnfs/<vnf_instance_id>/volumeGroups
mso.restapi.get.orc.req=/onap/so/infra/orchestrationRequests/v6
mso.restapi.get.orc.reqs=/onap/so/infra/orchestrationRequests/v6?
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java
index 79befe176..96fb15a43 100644
--- a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java
@@ -28,6 +28,8 @@ public interface MsoBusinessLogic {
MsoResponseWrapper createVfModuleInstance(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId);
+ MsoResponseWrapper scaleOutVfModuleInstance(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId);
+
MsoResponseWrapper createConfigurationInstance(org.onap.vid.mso.rest.RequestDetailsWrapper requestDetailsWrapper, String serviceInstanceId);
MsoResponseWrapper deleteSvcInstance(RequestDetails requestDetails, String serviceInstanceId, String serviceStatus);
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java
index 00db464ab..d4ca86515 100644
--- a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java
@@ -175,6 +175,19 @@ public class MsoBusinessLogicImpl implements MsoBusinessLogic {
}
@Override
+ public MsoResponseWrapper scaleOutVfModuleInstance(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) {
+ String methodName = "scaleOutVfModuleInstance";
+ logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+
+ String endpoint;
+ endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VF_MODULE_SCALE_OUT);
+
+ String partial_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId);
+ String vf_module_endpoint = partial_endpoint.replaceFirst(VNF_INSTANCE_ID, vnfInstanceId);
+
+ return msoClientInterface.createVfModuleInstance(requestDetails, vf_module_endpoint);
+ }
+ @Override
public MsoResponseWrapper createConfigurationInstance(org.onap.vid.mso.rest.RequestDetailsWrapper requestDetailsWrapper, String serviceInstanceId) {
String methodName = "createConfigurationInstance";
logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoProperties.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoProperties.java
index 773b8a83a..1d71e9c75 100644
--- a/vid-app-common/src/main/java/org/onap/vid/mso/MsoProperties.java
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoProperties.java
@@ -99,6 +99,8 @@ public class MsoProperties extends SystemProperties {
/** The Constant MSO_REST_API_VF_MODULE_INSTANCE. */
public static final String MSO_REST_API_VF_MODULE_INSTANCE = "mso.restapi.vf.module.instance";
+ public static final String MSO_REST_API_VF_MODULE_SCALE_OUT = "mso.restapi.vf.module.scaleout";
+
/** The Constant MSO_REST_API_VOLUME_GROUP_INSTANCE. */
public static final String MSO_REST_API_VOLUME_GROUP_INSTANCE = "mso.restapi.volume.group.instance"; //serviceInstances/v2/{serviceInstanceId}/volumeGroups
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/rest/RequestDetails.java b/vid-app-common/src/main/java/org/onap/vid/mso/rest/RequestDetails.java
index 9d198addc..2b159f812 100644
--- a/vid-app-common/src/main/java/org/onap/vid/mso/rest/RequestDetails.java
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/rest/RequestDetails.java
@@ -20,13 +20,21 @@
package org.onap.vid.mso.rest;
-import com.fasterxml.jackson.annotation.*;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-import org.onap.vid.domain.mso.*;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.onap.vid.domain.mso.CloudConfiguration;
+import org.onap.vid.domain.mso.ModelInfo;
+import org.onap.vid.domain.mso.RequestInfo;
+import org.onap.vid.domain.mso.RequestParameters;
+import org.onap.vid.domain.mso.SubscriberInfo;
-import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -74,7 +82,7 @@ public class RequestDetails{
private RequestParameters requestParameters;
@JsonProperty("configurationParameters")
- protected List<Map<String, String>> configurationParameters = new ArrayList<>();
+ protected List<Map<String, String>> configurationParameters;
/** The additional properties. */
@JsonIgnore
@@ -226,7 +234,7 @@ public class RequestDetails{
.append(getRequestParameters())
.append(subscriberInfo)
.append(additionalProperties)
- .append(configurationParameters.hashCode())
+ .append(configurationParameters)
.toHashCode();
}
diff --git a/vid-app-common/src/main/java/org/onap/vid/services/ChangeManagementServiceImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/ChangeManagementServiceImpl.java
index 90d1c33e3..e4a6b3990 100644
--- a/vid-app-common/src/main/java/org/onap/vid/services/ChangeManagementServiceImpl.java
+++ b/vid-app-common/src/main/java/org/onap/vid/services/ChangeManagementServiceImpl.java
@@ -102,7 +102,7 @@ public class ChangeManagementServiceImpl implements ChangeManagementService {
break;
}
case ChangeManagementRequest.SCALE_OUT:{
- msoResponseWrapperObject = msoBusinessLogic.createVfModuleInstance(currentRequestDetails, serviceInstanceId, vnfInstanceId);
+ msoResponseWrapperObject = msoBusinessLogic.scaleOutVfModuleInstance(currentRequestDetails, serviceInstanceId, vnfInstanceId);
break;
}
default:
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js
index fca5a7c7e..f1440fc3e 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js
@@ -299,8 +299,7 @@
cloudConfiguration: vnf.cloudConfiguration,
requestInfo: requestInfoData,
relatedInstanceList: [],
- requestParameters:requestParametersData,
- configurationParameters: []
+ requestParameters:requestParametersData
};
}
diff --git a/vid-app-common/src/test/resources/payload_jsons/activateOperationalEnvironmentsPayloadToMso.json b/vid-app-common/src/test/resources/payload_jsons/activateOperationalEnvironmentsPayloadToMso.json
index 75474109b..400a55f9e 100644
--- a/vid-app-common/src/test/resources/payload_jsons/activateOperationalEnvironmentsPayloadToMso.json
+++ b/vid-app-common/src/test/resources/payload_jsons/activateOperationalEnvironmentsPayloadToMso.json
@@ -5,7 +5,6 @@
"source": "VID",
"requestorId": "<userId>"
},
- "configurationParameters" : [ ],
"relatedInstanceList": [
{
"relatedInstance": {
diff --git a/vid-app-common/src/test/resources/payload_jsons/deactivateOperationalEnvironmentsPayloadToMso.json b/vid-app-common/src/test/resources/payload_jsons/deactivateOperationalEnvironmentsPayloadToMso.json
index c50a66c1d..b9ff15127 100644
--- a/vid-app-common/src/test/resources/payload_jsons/deactivateOperationalEnvironmentsPayloadToMso.json
+++ b/vid-app-common/src/test/resources/payload_jsons/deactivateOperationalEnvironmentsPayloadToMso.json
@@ -5,7 +5,6 @@
"source": "VID",
"requestorId": "<userId>"
},
- "configurationParameters" : [ ],
"requestParameters": {
"operationalEnvironmentType": "VNF"
}