VoLTE support

Change-Id: I593b9c92bf9330c2d28f2ccbd59c0651b67fe94a
Issue-ID: VID-189
Signed-off-by: Sonsino, Ofir (os0695) <os0695@intl.att.com>
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 2478804..c171ac0 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
@@ -159,6 +159,8 @@
 mso.max.polls=3

 mso.user.name=infraportal

 mso.password.x=OBF:1ghz1kfx1j1w1m7w1i271e8q1eas1hzj1m4i1iyy1kch1gdz

+#E2E is v3

+mso.restapi.svc.e2einstance=/e2eServiceInstances/v3

 mso.restapi.svc.instance=/serviceInstances/v6

 mso.restapi.vnf.instance=/serviceInstances/v6/<service_instance_id>/vnfs

 mso.restapi.network.instance=/serviceInstances/v6/<service_instance_id>/networks

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 06b2514..0f31f9a 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
@@ -102,6 +102,8 @@
 mso.max.polls=10

 mso.user.name=${VID_MSO_USER}

 mso.password.x=${VID_MSO_PASS}

+#E2E is v3

+mso.restapi.svc.e2einstance=/ecomp/mso/infra/e2eServiceInstances/v3

 mso.restapi.svc.instance=/ecomp/mso/infra/serviceInstances/v6

 mso.restapi.vnf.instance=/ecomp/mso/infra/serviceInstances/v6/<service_instance_id>/vnfs

 mso.restapi.network.instance=/ecomp/mso/infra/serviceInstances/v6/<service_instance_id>/networks

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 bee9244..1d0e849 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 @@
     @JsonProperty("cloudRegionID")
     public String cloudRegionId;
 
+    @JsonProperty("cloudOwner")
+    public String cloudOwner;
+    
     @JsonProperty("tenantName")
     public String tenantName;
 
@@ -24,8 +27,9 @@
     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 9f3ae42..6b2f39e 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 @@
 	/** 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 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 f0d056a..2200b79 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.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 @@
     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 @@
             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 @@
         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 420ae23..bbca06e 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.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 @@
         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 8db7c3c..f38a7fc 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 @@
     // 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 95b175a..f15c7e5 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 @@
         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 2d09630..a847756 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 @@
      * @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 584e858..f6b3f94 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 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 20f22af..c3deec3 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 @@
 
         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 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 a9278c3..b08b2b1 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 @@
 	.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 967a390..cbb9357 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 53a941b..4b1d771 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 @@
 

                 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 56ec715..0e7dbe4 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 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 @@
                         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 @@
                 }

             }

 

-            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 @@
                 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 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 716854e..77523e9 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 @@
 		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 8577e99..942bd79 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 @@
 										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 @@
 										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 b6990eb..e19bcbc 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 @@
     @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);