Merge "Fix retrieval of resourceInputObj in delete e2e"
authorChuanyu Chen <chenchuanyu@huawei.com>
Tue, 27 Nov 2018 09:58:23 +0000 (09:58 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 27 Nov 2018 09:58:23 +0000 (09:58 +0000)
1  2 
bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy
bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy

@@@ -145,7 -145,7 +145,7 @@@ public class DeActivateSDNCNetworkResou
              String serviceInstanceId = execution.getVariable(Prefix + "serviceInstanceId")
              String source = execution.getVariable("source")
              String sdnc_service_id = execution.getVariable(Prefix + "sdncServiceId")
-             ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+             ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(resourceInput, ResourceInput.class)
              String serviceType = resourceInputObj.getServiceType()
              String serviceModelInvariantUuid = resourceInputObj.getServiceModelInfo().getModelInvariantUuid()
              String serviceModelUuid = resourceInputObj.getServiceModelInfo().getModelUuid()
      }
  
      public void prepareUpdateAfterDeActivateSDNCResource(DelegateExecution execution) {
-         ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+         ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(resourceInput, ResourceInput.class)
          String operType = resourceInputObj.getOperationType()
          String resourceCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
          String serviceInstanceId = resourceInputObj.getServiceInstanceId()
  
          String body = """
                  <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 -                        xmlns:ns="http://org.openecomp.mso/requestsdb">
 +                        xmlns:ns="http://org.onap.so/requestsdb">
                          <soapenv:Header/>
                  <soapenv:Body>
                      <ns:updateResourceOperationStatus>
@@@ -171,7 -171,7 +171,7 @@@ public class DeleteSDNCNetworkResource 
              String serviceInstanceId = execution.getVariable(Prefix + "serviceInstanceId")
              String source = execution.getVariable("source")
              String sdnc_service_id = execution.getVariable(Prefix + "sdncServiceId")
-             ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+             ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(resourceInput, ResourceInput.class)
              String serviceType = resourceInputObj.getServiceType()
              String serviceModelInvariantUuid = resourceInputObj.getServiceModelInfo().getModelInvariantUuid()
              String serviceModelUuid = resourceInputObj.getServiceModelInfo().getModelUuid()
      }
  
      public void prepareUpdateBeforeDeleteSDNCResource(DelegateExecution execution) {
-         ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+         ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(resourceInput, ResourceInput.class)
          String operType = resourceInputObj.getOperationType()
          String resourceCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
          String serviceInstanceId = resourceInputObj.getServiceInstanceId()
  
          String body = """
                  <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 -                        xmlns:ns="http://org.openecomp.mso/requestsdb">
 +                        xmlns:ns="http://org.onap.so/requestsdb">
                          <soapenv:Header/>
                  <soapenv:Body>
                      <ns:updateResourceOperationStatus>
      }
  
      public void prepareUpdateAfterDeleteSDNCResource(DelegateExecution execution) {
-         ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+         ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(resourceInput, ResourceInput.class)
          String operType = resourceInputObj.getOperationType()
          String resourceCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
          String serviceInstanceId = resourceInputObj.getServiceInstanceId()
  
          String body = """
                  <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 -                        xmlns:ns="http://org.openecomp.mso/requestsdb">
 +                        xmlns:ns="http://org.onap.so/requestsdb">
                          <soapenv:Header/>
                  <soapenv:Body>
                      <ns:updateResourceOperationStatus>