[MSO-8] Update the maven dependency
[so.git] / bpmn / MSOCommonBPMN / src / main / groovy / org / openecomp / mso / bpmn / common / scripts / GenericGetVnf.groovy
  * ============LICENSE_END=========================================================
  */
 
-package com.att.bpm.scripts
+package org.openecomp.mso.bpmn.common.scripts
 
-import static org.apache.commons.lang3.StringUtils.*;
+import static org.apache.commons.lang3.StringUtils.*
 
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution;
-import org.apache.commons.codec.binary.Base64
 import org.apache.commons.lang3.*
-
-import org.openecomp.mso.bpmn.core.WorkflowException
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
 import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-
 import org.springframework.web.util.UriUtils
 
 
@@ -153,7 +147,7 @@ class GenericGetVnf extends AbstractServiceTaskProcessor{
                                exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Invalid Incoming GENGV_type")
                        }
 
-                       String getVnfPath = "${aai_endpoint}${aai_uri}?vnf-name=" + UriUtils.encode(vnfName, "UTF-8")
+                       String getVnfPath = "${aai_endpoint}${aai_uri}?vnf-name=" + UriUtils.encode(vnfName, "UTF-8") + "&depth=1"
 
                        execution.setVariable("GENGV_getVnfPath", getVnfPath)
                        utils.logAudit("Get Vnf Url is: " + getVnfPath)
@@ -229,7 +223,7 @@ class GenericGetVnf extends AbstractServiceTaskProcessor{
                        }
                        utils.log("DEBUG", "Using AAI Uri: " + aai_uri, isDebugEnabled)
 
-                       String getVnfPath = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8")
+                       String getVnfPath = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8") + "?depth=1"
                        utils.log("DEBUG", "GET Vnf Endpoint is: " + getVnfPath, isDebugEnabled)
 
                        execution.setVariable("GENGV_getVnfPath", getVnfPath)