aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOInfrastructureBPMN/src/main/groovy/org
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src/main/groovy/org')
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy6
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy6
2 files changed, 6 insertions, 6 deletions
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 = """<relationship xmlns="http://org.openecomp.aai.inventory/v11">
<related-to>service-instance</related-to>
- <related-link>/aai/v11/business/customers/customer/${globalSubscriberId}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${nsInstanceId}</related-link>
+ <related-link>/aai/v11/business/customers/customer/${globalSubscriberId}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${serviceId}</related-link>
<relationship-data>
<relationship-key>customer.global-customer-id</relationship-key>
<relationship-value>${globalSubscriberId}</relationship-value>
@@ -252,12 +252,12 @@ public class CreateVFCNSResource extends AbstractServiceTaskProcessor {
</relationship-data>
<relationship-data>
<relationship-key>service-instance.service-instance-id</relationship-key>
- <relationship-value>${nsInstanceId}</relationship-value>
+ <relationship-value>${serviceId}</relationship-value>
</relationship-data>
</relationship>"""
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
</relationship-data>
</relationship>"""
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){