summaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2018-07-16 05:19:52 +0000
committerGerrit Code Review <gerrit@onap.org>2018-07-16 05:19:52 +0000
commit8169f18d55a8d78f55bde5bccbdb74c1914af0fc (patch)
tree5f1b29e51829a19471852581a9d6be05b0bbb403 /bpmn
parenta5efb463b026627dd1e3b78ba37a6371505e21e6 (diff)
parente1e4075f00d695c7fbbb761a42f73e735727f3bf (diff)
Merge "Reverse service direction for AAI AddRelationShip"
Diffstat (limited to 'bpmn')
-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){