summaryrefslogtreecommitdiffstats
path: root/vid-app-common/src
diff options
context:
space:
mode:
authorSonsino, Ofir (os0695) <os0695@intl.att.com>2018-05-06 13:31:32 +0300
committerSonsino, Ofir (os0695) <os0695@intl.att.com>2018-05-06 13:31:32 +0300
commit9e8835dd593b382f369308fac3cc1cfc64c0971c (patch)
treef1e2af99695f2cbb91173a0547d991a9cb72652b /vid-app-common/src
parentcaf0ab3707f8177e4b20d1cf735e5e20c2e6ec14 (diff)
VoLTE support
Change-Id: I593b9c92bf9330c2d28f2ccbd59c0651b67fe94a Issue-ID: VID-189 Signed-off-by: Sonsino, Ofir (os0695) <os0695@intl.att.com>
Diffstat (limited to 'vid-app-common/src')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetTenatns/GetTenantsResponse.java6
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Input.java38
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl2.java17
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/controllers/MsoController.java22
-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.java15
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/mso/MsoInterface.java3
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/mso/MsoProperties.java3
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java10
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js3
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js10
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js1
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js108
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js6
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/services/utilityService.js9
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/bl/AaiServiceTest.java2
16 files changed, 240 insertions, 15 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetTenatns/GetTenantsResponse.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetTenatns/GetTenantsResponse.java
index bee92440d..1d0e84952 100644
--- a/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetTenatns/GetTenantsResponse.java
+++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetTenatns/GetTenantsResponse.java
@@ -12,6 +12,9 @@ public class GetTenantsResponse {
@JsonProperty("cloudRegionID")
public String cloudRegionId;
+ @JsonProperty("cloudOwner")
+ public String cloudOwner;
+
@JsonProperty("tenantName")
public String tenantName;
@@ -24,8 +27,9 @@ public class GetTenantsResponse {
public GetTenantsResponse() {
}
- public GetTenantsResponse(String cloudRegionId, String tenantName, String tenantID, boolean isPermitted) {
+ public GetTenantsResponse(String cloudRegionId, String cloudOwner, String tenantName, String tenantID, boolean isPermitted) {
this.cloudRegionId = cloudRegionId;
+ this.cloudOwner = cloudOwner;
this.tenantName = tenantName;
this.tenantID = tenantID;
this.isPermitted = isPermitted;
diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Input.java b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Input.java
index 9f3ae429d..6b2f39eca 100644
--- a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Input.java
+++ b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Input.java
@@ -49,6 +49,12 @@ public class Input {
/** The required field. If not set, the default is true */
private boolean required = true;
+ /** Details the inputs template */
+ private String templateName;
+ private String templateUUID;
+ private String templateInvariantUUID;
+ private String templateCustomizationUUID;
+
/**
* Instantiates a new input.
*/
@@ -165,4 +171,36 @@ public class Input {
public String toString() {
return "type=" + type + ",description=" + description + ",default=" + _default;
}
+
+ public String getTemplateName() {
+ return templateName;
+ }
+
+ public void setTemplateName(String templateName) {
+ this.templateName = templateName;
+ }
+
+ public String getTemplateUUID() {
+ return templateUUID;
+ }
+
+ public void setTemplateUUID(String templateUUID) {
+ this.templateUUID = templateUUID;
+ }
+
+ public String getTemplateInvariantUUID() {
+ return templateInvariantUUID;
+ }
+
+ public void setTemplateInvariantUUID(String templateInvariantUUID) {
+ this.templateInvariantUUID = templateInvariantUUID;
+ }
+
+ public String getTemplateCustomizationUUID() {
+ return templateCustomizationUUID;
+ }
+
+ public void setTemplateCustomizationUUID(String templateCustomizationUUID) {
+ this.templateCustomizationUUID = templateCustomizationUUID;
+ }
}
diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl2.java b/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl2.java
index f0d056a0f..2200b7988 100644
--- a/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl2.java
+++ b/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl2.java
@@ -8,6 +8,7 @@ import org.onap.sdc.tosca.parser.impl.FilterType;
import org.onap.sdc.tosca.parser.impl.SdcToscaParserFactory;
import org.onap.sdc.tosca.parser.impl.SdcTypes;
import org.onap.sdc.toscaparser.api.*;
+import org.onap.sdc.toscaparser.api.elements.Metadata;
import org.onap.sdc.toscaparser.api.parameters.Input;
import java.nio.file.Path;
@@ -238,7 +239,7 @@ public class ToscaParserImpl2 {
private Map<String, org.onap.vid.asdc.beans.tosca.Input> inputsListToInputsMap(List<org.onap.sdc.toscaparser.api.parameters.Input> inputList) {
Map<String, org.onap.vid.asdc.beans.tosca.Input> inputs = new HashMap<>();
for (org.onap.sdc.toscaparser.api.parameters.Input input : inputList) {
- inputs.put(input.getName(), convertInput(input, new org.onap.vid.asdc.beans.tosca.Input()));
+ inputs.put(input.getName(), convertInput(input, new org.onap.vid.asdc.beans.tosca.Input(), null));
}
return inputs;
}
@@ -297,7 +298,7 @@ public class ToscaParserImpl2 {
for (Input input: inputs){
if(input.getName().equals(key)){
org.onap.vid.asdc.beans.tosca.Input localInput = new org.onap.vid.asdc.beans.tosca.Input();
- localInput = convertInput(input, localInput);
+ localInput = convertInput(input, localInput, nodeTemplate);
String name = property.getKey();
commandPropertyMap.put(name, extractCommands(name, key));
inputMap.put(name, localInput);
@@ -312,13 +313,23 @@ public class ToscaParserImpl2 {
return inputKey.substring(inputKey.indexOf(":") + 1);
}
- private org.onap.vid.asdc.beans.tosca.Input convertInput(Input parserInput, org.onap.vid.asdc.beans.tosca.Input localInput){
+ private org.onap.vid.asdc.beans.tosca.Input convertInput(Input parserInput, org.onap.vid.asdc.beans.tosca.Input localInput, NodeTemplate nodeTemplate){
localInput.setDefault(parserInput.getDefault());
localInput.setDescription(parserInput.getDescription());
localInput.setRequired(parserInput.isRequired());
localInput.setType(parserInput.getType());
localInput.setConstraints(parserInput.getConstraints());
// localInput.setentry_schema()
+
+ //if inputs of inner nodeTemplate - tell its details
+ if(nodeTemplate != null) {
+ Metadata metadata = nodeTemplate.getMetaData();
+ localInput.setTemplateName(metadata.getValue("name"));
+ localInput.setTemplateUUID(metadata.getValue("UUID"));
+ localInput.setTemplateInvariantUUID(metadata.getValue("invariantUUID"));
+ localInput.setTemplateCustomizationUUID(metadata.getValue("customizationUUID"));
+ }
+
return localInput;
}
diff --git a/vid-app-common/src/main/java/org/onap/vid/controllers/MsoController.java b/vid-app-common/src/main/java/org/onap/vid/controllers/MsoController.java
index 420ae23e5..bbca06e9b 100644
--- a/vid-app-common/src/main/java/org/onap/vid/controllers/MsoController.java
+++ b/vid-app-common/src/main/java/org/onap/vid/controllers/MsoController.java
@@ -43,6 +43,7 @@ import java.io.StringWriter;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
+import java.util.LinkedHashMap;
import java.util.List;
//import java.util.UUID;
@@ -109,6 +110,27 @@ public class MsoController extends RestrictedBaseController {
return (new ResponseEntity<>(w.getResponse(), HttpStatus.OK));
}
+
+ /**
+ * Creates the e2e svc instance.
+ *
+ * @param request the request
+ * @return the response entity
+ * @throws Exception the exception
+ */
+ @RequestMapping(value = "/mso_create_e2e_svc_instance", method = RequestMethod.POST)
+ public ResponseEntity<String> createE2eSvcInstance(HttpServletRequest request, @RequestBody LinkedHashMap<String, Object> mso_request) throws Exception {
+ String methodName = "createE2eSvcInstance";
+
+ LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+ // always return OK, the MSO status code is embedded in the body
+
+ MsoResponseWrapper w = msoBusinessLogic.createE2eSvcInstance(mso_request.get("requestDetails"));
+
+ return (new ResponseEntity<>(w.getResponse(), HttpStatus.OK));
+
+ }
/**
* Creates the vnf.
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 8db7c3c57..f38a7fc6d 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
@@ -16,6 +16,8 @@ public interface MsoBusinessLogic {
// this function should get params from tosca and send them to instance at mso, then return success response.
MsoResponseWrapper createSvcInstance(RequestDetails msoRequest) throws Exception;
+ MsoResponseWrapper createE2eSvcInstance(Object msoRequest) throws Exception;
+
MsoResponseWrapper createVnf(RequestDetails requestDetails, String serviceInstanceId) throws Exception;
MsoResponseWrapper createNwInstance(RequestDetails requestDetails, String serviceInstanceId) throws Exception;
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 95b175aaf..f15c7e5b2 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
@@ -82,6 +82,21 @@ public class MsoBusinessLogicImpl implements MsoBusinessLogic {
return msoClientInterface.createSvcInstance(msoRequest, endpoint);
}
+ @Override
+ public MsoResponseWrapper createE2eSvcInstance(Object msoRequest) throws Exception {
+ String methodName = "createE2eSvcInstance ";
+ logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+ String endpoint;
+ try {
+ endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_E2E_SVC_INSTANCE);
+ } catch (Exception exception) {
+ throw exception;
+ }
+
+ return msoClientInterface.createE2eSvcInstance(msoRequest, endpoint);
+ }
+
void validateLineOfBusiness(RequestDetails requestDetails) {
Object value = requestDetails.getAdditionalProperties();
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoInterface.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoInterface.java
index 2d09630f0..a84775638 100644
--- a/vid-app-common/src/main/java/org/onap/vid/mso/MsoInterface.java
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoInterface.java
@@ -17,6 +17,9 @@ public interface MsoInterface {
* @throws Exception
*/
MsoResponseWrapper createSvcInstance(RequestDetails requestDetails, String endpoint) throws Exception;
+
+ //For VoLTE E2E services
+ MsoResponseWrapper createE2eSvcInstance(Object requestDetails, String endpoint) throws Exception;
/**
* will create a virtual network function using MSO service.
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 584e8581d..f6b3f946e 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
@@ -70,6 +70,9 @@ public class MsoProperties extends SystemProperties {
public static final String MSO_PASSWORD = "mso.password.x";
/** The Constant MSO_REST_API_SVC_INSTANCE. */
+ public static final String MSO_REST_API_E2E_SVC_INSTANCE = "mso.restapi.svc.e2einstance"; // /e2eServiceInstances/v3
+
+ /** The Constant MSO_REST_API_SVC_INSTANCE. */
public static final String MSO_REST_API_SVC_INSTANCE = "mso.restapi.svc.instance"; // /serviceInstances/v2
/** The Constant MSO_REST_API_VNF_INSTANCE. */
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java b/vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java
index 20f22afa0..c3deec325 100644
--- a/vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java
@@ -33,6 +33,14 @@ public class MsoRestClientNew extends RestMsoImplementation implements MsoInterf
return createInstance(requestDetails, endpoint);
}
+
+ @Override
+ public MsoResponseWrapper createE2eSvcInstance(Object requestDetails, String endpoint) throws Exception {
+ String methodName = "createE2eSvcInstance ";
+ logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+ return createInstance(requestDetails, endpoint);
+ }
@Override
public MsoResponseWrapper createVnf(RequestDetails requestDetails, String endpoint) throws Exception {
@@ -126,7 +134,7 @@ public class MsoRestClientNew extends RestMsoImplementation implements MsoInterf
}
- public MsoResponseWrapper createInstance(RequestDetails request, String path) throws Exception {
+ public MsoResponseWrapper createInstance(Object request, String path) throws Exception {
String methodName = "createInstance";
logger.debug(dateFormat.format(new Date()) + "<== " + methodName + " start");
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js b/vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js
index a9278c36d..b08b2b16f 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js
@@ -25,7 +25,8 @@ appDS2
.constant("COMPONENT", (function() {
return {
A_LA_CARTE : "a la carte",
- CLOUD_REGION_ID : "cloudRegionID",
+ CLOUD_OWNER : "cloudOwner",
+ CLOUD_REGION_ID : "cloudRegionID",
COMPONENT_STATUS : "ComponentStatus",
CREATE_COMPONENT : "createComponent",
DELETE_RESUME_COMPONENT : "deleteResumeComponent",
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js
index 967a39002..cbb93571c 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js
@@ -120,7 +120,15 @@
var serviceModel = getServiceResponse.data;
DataService.setServiceName(serviceModel.service.name);
-
+
+ //VOLTE services need input list generated and macro style
+ DataService.setE2EService(false);
+ if(serviceModel.service.category === 'E2E Service') {
+ DataService.setE2EService(true);
+ DataService.setHideServiceFields(false);
+ VIDCONFIGURATION.MACRO_SERVICES.push(serviceModel.service.invariantUuid);
+ }
+
DataService.setModelInfo(COMPONENT.SERVICE, {
"modelInvariantId": serviceModel.service.invariantUuid,
"modelVersion": serviceModel.service.version,
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js
index 53a941bfb..4b1d77134 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js
@@ -378,6 +378,7 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
for (var i = 0; i < aaiLcpCloudRegionTenants.length; i++) {
lcpCloudRegionTenants.push({
+ "cloudOwner": aaiLcpCloudRegionTenants[i][COMPONENT.CLOUD_OWNER],
"cloudRegionId": aaiLcpCloudRegionTenants[i][COMPONENT.CLOUD_REGION_ID],
"tenantName": aaiLcpCloudRegionTenants[i][COMPONENT.TENANT_NAME],
"tenantId": aaiLcpCloudRegionTenants[i][COMPONENT.TENANT_ID],
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js
index 56ec715b5..0e7dbe46f 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js
@@ -199,8 +199,8 @@ var CreationService = function($log, AaiService, AsdcService, DataService,VIDCON
var getUserProvidedList = function() {
var parameterList = [];
var isUserProvidedNaming = false;
- if ( (DataService.getModelInfo(_this.componentId).serviceEcompNaming != null)
- && (DataService.getModelInfo(_this.componentId).serviceEcompNaming === "false") ) {
+ if ( ((DataService.getModelInfo(_this.componentId).serviceEcompNaming != null)
+ && (DataService.getModelInfo(_this.componentId).serviceEcompNaming === "false")) || DataService.getE2EService() ) {
isUserProvidedNaming = true;
}
@@ -228,8 +228,9 @@ var CreationService = function($log, AaiService, AsdcService, DataService,VIDCON
FIELD.PARAMETER.LCP_REGION_TEXT_HIDDEN,
FIELD.PARAMETER.TENANT_DISABLED
]);
- parameterList = parameterList.concat([ getAicZonesParameter() ]);
-
+ if(!DataService.getE2EService()) {
+ parameterList = parameterList.concat([getAicZonesParameter()]);
+ }
}else{
parameterList = parameterList.concat([ getServiceId(),
@@ -239,8 +240,11 @@ var CreationService = function($log, AaiService, AsdcService, DataService,VIDCON
}
}
- parameterList = parameterList.concat([ getProjectParameter() ]);
- parameterList = parameterList.concat([ getOwningEntityParameter() ]);
+ if(!DataService.getE2EService()) {
+ parameterList = parameterList.concat([getProjectParameter()]);
+ parameterList = parameterList.concat([getOwningEntityParameter()]);
+ }
+
//if service model has a pnf, add a PNF ID parameter
if (DataService.getPnf()) {
parameterList = parameterList.concat([ FIELD.PARAMETER.PNF_ID ]);
@@ -516,7 +520,10 @@ var CreationService = function($log, AaiService, AsdcService, DataService,VIDCON
return "mso_create_nw_instance/"
+ DataService.getServiceInstanceId();
case COMPONENT.SERVICE:
- return "mso_create_svc_instance";
+ if(DataService.getE2EService() === true)
+ return "mso_create_e2e_svc_instance";
+ else
+ return "mso_create_svc_instance";
case COMPONENT.VNF:
return "mso_create_vnf_instance/"
+ DataService.getServiceInstanceId();
@@ -531,11 +538,98 @@ var CreationService = function($log, AaiService, AsdcService, DataService,VIDCON
}
};
+ var getMsoE2ERequest = function(parameterList) {
+ var modelInfo = DataService.getModelInfo(_this.componentId);
+
+ //region id
+ var lcpRegion = getValueFromList(FIELD.ID.LCP_REGION, parameterList);
+ if (lcpRegion === FIELD.KEY.LCP_REGION_TEXT) {
+ lcpRegion = getValueFromList(FIELD.ID.LCP_REGION_TEXT,
+ parameterList);
+ }
+ var cloudOwner = _.find(DataService.getCloudRegionTenantList(), function(region){
+ return region.cloudRegionId === lcpRegion;
+ }).cloudOwner;
+
+ var params = [];
+ var displayInputs = modelInfo.displayInputs;
+ var groupBy = _.groupBy(displayInputs, "templateUUID");
+
+ _.forEach(groupBy, function(nodeTemplateInputs, nodeTemplateUUID) {
+ var reqParas = {};
+ var vfLocations = [];
+
+ nodeTemplateInputs.forEach(function(parameter){
+ if(parameter.type === 'vf_location') {
+ var loc = {
+ vnfProfileId: parameter.displayName,
+ locationConstraints : {
+ vimId: cloudOwner + '_' + lcpRegion
+ }
+ };
+ vfLocations.push(loc);
+ } else if(parameter.type === 'sdn_controller') {
+ if(parameter.value === undefined || parameter.value === null) {
+ reqParas[parameter.name] = '';
+ } else {
+ reqParas[parameter.name] = parameter.value.value;
+ }
+ } else {
+ var name;
+ _.forEach(displayInputs, function(item, key){
+ if(item === parameter) {
+ name = key;
+ }
+ });
+ var value = _.find(parameterList, function(item){
+ return item.id === name;
+ }).value;
+ reqParas[parameter.displayName] = value;
+ }
+ });
+
+ params.push({
+ resourceName: nodeTemplateInputs[0].templateName,
+ resourceInvariantUuid: nodeTemplateInputs[0].templateInvariantUUID,
+ resourceUuid: nodeTemplateInputs[0].templateUUID,
+ resourceCustomizationUuid: nodeTemplateInputs[0].templateCustomizationUUID,
+ parameters: {
+ locationConstraints: vfLocations,
+ //TODO resources: [],
+ requestInputs: reqParas
+ }
+ });
+ });
+
+ var requestBody = {
+ service: {
+ name: getValueFromList(FIELD.ID.INSTANCE_NAME, parameterList),
+ description: modelInfo["description"],
+ serviceInvariantUuid: modelInfo["modelInvariantId"],
+ serviceUuid: modelInfo["modelNameVersionId"],
+ globalSubscriberId: DataService.getGlobalCustomerId(),
+ serviceType: getValueFromList(FIELD.ID.SERVICE_TYPE, parameterList) || modelInfo["serviceTypeName"],
+ parameters: {
+ locationConstraints: [],
+ resources: params,
+ requestInputs: {} //TODO
+ }
+ }
+ };
+
+ return requestBody;
+ };
+
var getMsoRequestDetails = function(parameterList) {
console.log("getMsoRequestDetails invoked, parameterList="); console.log(JSON.stringify(parameterList,null,4));
//console.log("getMsoRequestDetails invoked, DataService.getArbitraryParameters()=");
//console.log(JSON.stringify(DataService.getArbitraryParameters(),null,4));
+ //VoLTE logic goes here
+ if(DataService.getE2EService() === true) {
+ return getMsoE2ERequest(parameterList);
+ }
+
var modelInfo = DataService.getModelInfo(_this.componentId);
var requestorloggedInId = DataService.getLoggedInUserId();
var owningEntityId = getValueFromList(FIELD.ID.OWNING_ENTITY, parameterList);
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js
index 716854edb..77523e9c9 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js
@@ -300,6 +300,12 @@ var DataService = function($log, DataService) {
getArbitraryParameters : function () {
return _this.arbitraryParameters;
},
+ setE2EService:function(b){
+ _this.e2eService=b;
+ },
+ getE2EService:function(){
+ return _this.e2eService;
+ },
setHideServiceFields:function(b){
_this.hideServiceFields=b;
},
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/utilityService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/utilityService.js
index 8577e9930..942bd7956 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/utilityService.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/utilityService.js
@@ -156,6 +156,11 @@ var UtilityService = function($log, DataService, PARAMETER) {
serviceModel.service.inputs[cmdObj.inputName] != null ) {
networkModelDisplayInputs[cmdObj.inputName] = (serviceModel.service.inputs[cmdObj.inputName]);
networkModelDisplayInputs[cmdObj.inputName][PARAMETER.DISPLAY_NAME] = cmdObj.displayName;
+ //E2E services need this
+ ["templateInvariantUUID", "templateCustomizationUUID", "templateUUID", "templateName"].forEach(function(templateProp) {
+ networkModelDisplayInputs[cmdObj.inputName][templateProp] = networkModel.inputs[cmdObj.displayName][templateProp];
+ });
+
}
}
@@ -237,6 +242,10 @@ var UtilityService = function($log, DataService, PARAMETER) {
serviceModel.service.inputs[cmdObj.inputName] != null ) {
vnfModelDisplayInputs[cmdObj.inputName] = (serviceModel.service.inputs[cmdObj.inputName]);
vnfModelDisplayInputs[cmdObj.inputName][PARAMETER.DISPLAY_NAME] = cmdObj.displayName;
+ //E2E services need this
+ ["templateInvariantUUID", "templateCustomizationUUID", "templateUUID", "templateName"].forEach(function(templateProp) {
+ networkModelDisplayInputs[cmdObj.inputName][templateProp] = vnfModel.inputs[cmdObj.displayName][templateProp];
+ });
}
}
diff --git a/vid-app-common/src/test/java/org/onap/vid/bl/AaiServiceTest.java b/vid-app-common/src/test/java/org/onap/vid/bl/AaiServiceTest.java
index b6990ebc6..e19bcbc20 100644
--- a/vid-app-common/src/test/java/org/onap/vid/bl/AaiServiceTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/bl/AaiServiceTest.java
@@ -129,7 +129,7 @@ public class AaiServiceTest {
@Test(dataProvider = "getTenantsData")
public void testGetTenants(String userGlobalCustomerId, String userServiceType, String userTenantName, String serviceGlobalCustomerId,
String serviceServiceType, String serviceTenantName, String serviceTenantId, boolean expectedIsPermitted) {
- GetTenantsResponse[] getTenantsResponses = new GetTenantsResponse[] {new GetTenantsResponse(null, serviceTenantName, serviceTenantId, false)};
+ GetTenantsResponse[] getTenantsResponses = new GetTenantsResponse[] {new GetTenantsResponse(null, null, serviceTenantName, serviceTenantId, false)};
AaiResponse<GetTenantsResponse[]> aaiResponse = new AaiResponse<>(getTenantsResponses, null, 200);
Mockito.doReturn(aaiResponse).when(aaiClientInterface).getTenants(serviceGlobalCustomerId, serviceServiceType);
Role role = new Role(null, userGlobalCustomerId, userServiceType, userTenantName);