From e1e4075f00d695c7fbbb761a42f73e735727f3bf Mon Sep 17 00:00:00 2001 From: Yulian Han Date: Fri, 15 Jun 2018 09:40:20 +0800 Subject: Reverse service direction for AAI AddRelationShip fix deleteNSRelationship comments bug Change-Id: Idaa55084f5ecb0dd3636c232cebc14fa5f0644f7 Issue-ID: SO-578 Signed-off-by: Yulian Han --- .../mso/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy | 6 +++--- .../infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp') diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy index 1ec1df1f0e..fd819fd3d5 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy @@ -241,7 +241,7 @@ public class CreateVFCNSResource extends AbstractServiceTaskProcessor { String serviceId = execution.getVariable("serviceInstanceId") String addRelationPayload = """ service-instance - /aai/v11/business/customers/customer/${globalSubscriberId}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${nsInstanceId} + /aai/v11/business/customers/customer/${globalSubscriberId}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${serviceId} customer.global-customer-id ${globalSubscriberId} @@ -252,12 +252,12 @@ public class CreateVFCNSResource extends AbstractServiceTaskProcessor { service-instance.service-instance-id - ${nsInstanceId} + ${serviceId} """ String endpoint = execution.getVariable("URN_aai_endpoint") utils.log("INFO","Add Relationship req:\n" + addRelationPayload, isDebugEnabled) - String url = endpoint + "/aai/v11/business/customers/customer/" + globalSubscriberId + "/service-subscriptions/service-subscription/" + serviceType + "/service-instances/service-instance/" + serviceId + "/relationship-list/relationship" + String url = endpoint + "/aai/v11/business/customers/customer/" + globalSubscriberId + "/service-subscriptions/service-subscription/" + serviceType + "/service-instances/service-instance/" + nsInstanceId + "/relationship-list/relationship" APIResponse aaiRsp = executeAAIPutCall(execution, url, addRelationPayload) utils.log("INFO","aai response status code:" + aaiRsp.getStatusCode(), isDebugEnabled) utils.log("INFO","aai response content:" + aaiRsp.getResponseBodyAsString(), isDebugEnabled) diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy index f0ecbab82c..d3e89df7bf 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy @@ -107,7 +107,7 @@ public class DoDeleteVFCNetworkServiceInstance extends AbstractServiceTaskProces */ public void deleteNSRelationship(DelegateExecution execution) { def isDebugEnabled=execution.getVariable("isDebugLogEnabled") - utils.log("INFO"," ***** addNSRelationship *****", isDebugEnabled) + utils.log("INFO"," ***** deleteNSRelationship *****", isDebugEnabled) String nsInstanceId = execution.getVariable("resourceInstanceId") if(nsInstanceId == null || nsInstanceId == ""){ utils.log("INFO"," Delete NS failed", isDebugEnabled) @@ -133,13 +133,13 @@ public class DoDeleteVFCNetworkServiceInstance extends AbstractServiceTaskProces """ String endpoint = execution.getVariable("URN_aai_endpoint") - utils.log("INFO","Add Relationship req:\n" + deleteRelationPayload, isDebugEnabled) + utils.log("INFO","Delete Relationship req:\n" + deleteRelationPayload, isDebugEnabled) String url = endpoint + "/aai/v11/business/customers/customer/" + globalSubscriberId + "/service-subscriptions/service-subscription/" + serviceType + "/service-instances/service-instance/" + serviceId + "/relationship-list/relationship" APIResponse aaiRsp = executeAAIDeleteCall(execution, url, deleteRelationPayload) utils.log("INFO","aai response status code:" + aaiRsp.getStatusCode(), isDebugEnabled) utils.log("INFO","aai response content:" + aaiRsp.getResponseBodyAsString(), isDebugEnabled) - utils.log("INFO"," *****Exit addNSRelationship *****", isDebugEnabled) + utils.log("INFO"," *****Exit deleteNSRelationship *****", isDebugEnabled) } public APIResponse executeAAIDeleteCall(DelegateExecution execution, String url, String payload){ -- cgit 1.2.3-korg