diff options
15 files changed, 472 insertions, 72 deletions
diff --git a/asdc-controller/pom.xml b/asdc-controller/pom.xml index 7dd0d82dce..19bdb1a8b8 100644 --- a/asdc-controller/pom.xml +++ b/asdc-controller/pom.xml @@ -113,7 +113,7 @@ <dependency> <groupId>org.openecomp.sdc.sdc-tosca</groupId> <artifactId>sdc-tosca</artifactId> - <version>1.1.34</version> + <version>1.1.32</version> </dependency> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy index 206e614630..af63176658 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy @@ -330,4 +330,8 @@ public class DeleteCustomE2EServiceInstance extends AbstractServiceTaskProcessor }
}
+
+ public void processJavaException(Execution execution) {
+ //TODO:
+ }
}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy index 4d661c489a..11e31ef765 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy @@ -127,6 +127,8 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor { String uuiRequest = execution.getVariable("uuiRequest") String modelInvariantUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceDefId") String modelUuid = jsonUtil.getJsonValue(uuiRequest, "service.templateId") + String serviceModelName = jsonUtil.getJsonValue(uuiRequest, "service.parameters.templateName") + execution.setVariable("serviceModelName", serviceModelName) //aai serviceType and Role can be setted as fixed value now. String aaiServiceType = "voLTE type" String aaiServiceRole = "voLTE role" @@ -416,8 +418,10 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor { String resourceName = jsonUtil.getJsonValue(resource, "resourceName") if(StringUtils.containsIgnoreCase(resourceName, resourceType)){ String resourceUUID = jsonUtil.getJsonValue(resource, "resourceId") + String resourceInvariantUUID = jsonUtil.getJsonValue(resource, "resourceDefId") String resourceParameters = jsonUtil.getJsonValue(resource, "nsParameters") execution.setVariable("resourceUUID", resourceUUID) + execution.setVariable("resourceInvariantUUID", resourceInvariantUUID) execution.setVariable("resourceParameters", resourceParameters) utils.log("INFO", "Prepare VFC Request resourceType:" + resourceType, isDebugEnabled) utils.log("INFO", "Prepare VFC Request resourceUUID:" + resourceUUID, isDebugEnabled) diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy index 827cbf5783..41d7edbebc 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy @@ -234,8 +234,11 @@ public class DoCreateVFCNetworkServiceInstance extends AbstractServiceTaskProces </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"
- executeAAIPutCall(execution, url, addRelationPayload)
+ 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)
utils.log("INFO"," *****Exit addNSRelationship *****", isDebugEnabled)
}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy index 005edf8fc4..9fcb6ace02 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy @@ -18,7 +18,9 @@ * limitations under the License. * ============LICENSE_END========================================================= */ -package org.openecomp.mso.bpmn.infrastructure.scripts; +package org.openecomp.mso.bpmn.infrastructure.scripts + +import org.json.JSONArray; import static org.apache.commons.lang3.StringUtils.*; import groovy.xml.XmlUtil @@ -284,8 +286,7 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this) sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator) - - if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){ + if(execution.getVariable(Prefix + 'sdncResponseSuccess') == "true"){ utils.log("DEBUG","Good response from SDNC Adapter for service-instance " + method + "response:\n" + response, isDebugEnabled) }else{ @@ -309,14 +310,6 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess String msg = "" try { - execution.setVariable("serviceInstanceId","serviceInstanceId") - execution.setVariable("GENGS_FoundIndicator",true) - execution.setVariable("GENGS_siResourceLink","GENGS_siResourceLink") - execution.setVariable("globalSubscriberId","globalSubscriberId") - execution.setVariable("subscriptionServiceType","subscriptionServiceType") - execution.setVariable("GENGS_service","GENGS_service") - execution.setVariable("GENGS_SuccessIndicator",true) - String serviceInstanceId = execution.getVariable("serviceInstanceId") boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator") String serviceType = "" @@ -369,7 +362,7 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess utils.log("DEBUG", msg, isDebugEnabled) exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg) } - /* else + else { utils.log("DEBUG", "SI Data" + siData, isDebugEnabled) serviceType = utils.getNodeText1(siData,"service-type") @@ -384,7 +377,8 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = docFactory.newDocumentBuilder() Document serviceXml = docBuilder.parse(source) - + serviceXml.getDocumentElement().normalize() + //test(siData) NodeList nodeList = serviceXml.getElementsByTagName("relationship") for (int x = 0; x < nodeList.getLength(); x++) { Node node = nodeList.item(x) @@ -399,6 +393,25 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess utils.log("DEBUG", msg, isDebugEnabled) exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg) }else{ + NodeList dataList = node.getChildNodes() + if(null != dataList) { + JSONArray jArray = new JSONArray() + for (int i = 0; i < dataList.getLength(); i++) { + Node dNode = dataList.item(i) + if(dNode.getNodeName() == "relationship-data") { + Element rDataEle = (Element)dNode + + def eKey = rDataEle.getElementsByTagName("relationship-key").item(0).getTextContent() + def eValue = rDataEle.getElementsByTagName("relationship-value").item(0).getTextContent() + + JSONObject jObj = new JSONObject() + jObj.put("resourceInstanceId", eKey) + jObj.put("resourceType", eValue) + jArray.put(jObj) + } + } + execution.setVariable("serviceRelationShip", jArray) + } utils.log("DEBUG", "Relationship NOT related to OpenStack", isDebugEnabled) } } @@ -419,7 +432,7 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess } } - }*/ + } }else{ boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator") if(succInAAI != true){ @@ -492,7 +505,7 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess String progress = "0" String reason = "" String operationContent = "Prepare service creation" - utils.log("DEBUG", "Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId + " operationType:" + oprationType, isDebugEnabled) + utils.log("DEBUG", "Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId + " operationType:" + operationType, isDebugEnabled) serviceId = UriUtils.encode(serviceId,"UTF-8") execution.setVariable("serviceInstanceId", serviceId) execution.setVariable("operationId", operationId) @@ -588,12 +601,13 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess if (relationShipList != null) { relationShipList.each { - if(resourceName.equals(it.resourceType)) - String resouceTemplateUUID = it.resourceInstanceId - String resouceInstanceUUID = it.resourceInstanceId - execution.setVariable("resouceTemplateUUID", resouceTemplateUUID) - execution.setVariable("resouceInstanceId", resouceInstanceUUID) - execution.setResourceType("resourceType", resourceName) + if(resourceName.equals(it.resourceType)) { + String resourceInstanceUUID = it.resourceInstanceId + String resourceTemplateUUID = it.resourceInstanceId + execution.setVariable("resourceTemplateId", resourceTemplateUUID) + execution.setVariable("resourceInstanceId", resourceInstanceUUID) + execution.setVariable("resourceType", resourceName) + } } } } diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java index 09dec4389a..6ca93f7238 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java +++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java @@ -45,9 +45,12 @@ import org.openecomp.mso.logger.MessageEnum; import org.openecomp.mso.logger.MsoLogger; import org.openecomp.mso.requestsdb.RequestsDatabase; import org.openecomp.mso.requestsdb.ResourceOperationStatus; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.IOException; import java.util.HashMap; +import java.util.Iterator; import java.util.Map; /** @@ -55,6 +58,8 @@ import java.util.Map; */ public abstract class AbstractSdncOperationTask extends BaseTask { + private static final Logger logger = LoggerFactory.getLogger(AbstractSdncOperationTask.class); + private static final String DEFAULT_MSB_IP = "127.0.0.1"; private static final int DEFAULT_MSB_Port = 80; private static final String SDCADAPTOR_INPUTS = "resourceParameters"; @@ -74,16 +79,24 @@ public abstract class AbstractSdncOperationTask extends BaseTask { " <statusDescription>$statusDescription</statusDescription>\n"+ " </ns:updateResourceOperationStatus></soapenv:Body></soapenv:Envelope>"; + private static final String getBodyTemplate = " <soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns=\"http://org.openecomp.mso/requestsdb\"><soapenv:Header/><soapenv:Body>\n" + + " <ns:getResourceOperationStatus>\n" + + " <operationId>$operationId</operationId>\n" + + " <resourceTemplateUUID>$resourceTemplateUUID</resourceTemplateUUID>\n" + + " <serviceId>$serviceId</serviceId>\n" + + " </ns:getResourceOperationStatus></soapenv:Body></soapenv:Envelope>"; + private void updateResOperStatus(ResourceOperationStatus resourceOperationStatus) throws RouteException { + logger.info("AbstractSdncOperationTask.updateResOperStatus begin!"); String url = "http://mso:8080/dbadapters/RequestsDbAdapter"; HttpPost httpPost = new HttpPost(url); httpPost.addHeader("Authorization", "Basic QlBFTENsaWVudDpwYXNzd29yZDEk"); httpPost.addHeader("Content-type", "application/soap+xml"); - String postBody = getStringBody(resourceOperationStatus); + String postBody = getPostStringBody(resourceOperationStatus); httpPost.setEntity(new StringEntity(postBody, ContentType.APPLICATION_XML)); httpPost(url, httpPost); - + logger.info("AbstractSdncOperationTask.updateResOperStatus end!"); //requestsDB.updateResOperStatus(resourceOperationStatus); } @@ -99,9 +112,10 @@ public abstract class AbstractSdncOperationTask extends BaseTask { return postBody; } - protected void httpPost(String url, HttpPost httpPost) throws RouteException { + protected String httpPost(String url, HttpPost httpPost) throws RouteException { + logger.info("AbstractSdncOperationTask.httpPost begin!"); CloseableHttpClient httpClient = HttpClients.createDefault(); - String result; + String result = null; boolean var15 = false; String errorMsg; @@ -110,8 +124,10 @@ public abstract class AbstractSdncOperationTask extends BaseTask { var15 = true; CloseableHttpResponse closeableHttpResponse = httpClient.execute(httpPost); result = EntityUtils.toString(closeableHttpResponse.getEntity()); - LOGGER.info(MessageEnum.RA_RESPONSE_FROM_SDNC, result.toString(), "SDNC", ""); + logger.info("result = {}", result); +// LOGGER.info(MessageEnum.RA_RESPONSE_FROM_SDNC, result.toString(), "SDNC", ""); if(closeableHttpResponse.getStatusLine().getStatusCode() != 200) { + logger.info("exception: fail for status code = {}", closeableHttpResponse.getStatusLine().getStatusCode()); throw new RouteException(result, "SERVICE_GET_ERR"); } @@ -120,6 +136,7 @@ public abstract class AbstractSdncOperationTask extends BaseTask { break label91; } catch (IOException var19) { errorMsg = url + ":httpPostWithJSON connect faild"; + logger.info("exception: POST_CONNECT_FAILD : {}", errorMsg); throwsRouteException(errorMsg, var19, "POST_CONNECT_FAILD"); var15 = false; } finally { @@ -128,6 +145,7 @@ public abstract class AbstractSdncOperationTask extends BaseTask { httpClient.close(); } catch (IOException var16) { String errorMsg1 = url + ":close httpClient faild"; + logger.info("exception: CLOSE_CONNECT_FAILD : {}", errorMsg1); throwsRouteException(errorMsg1, var16, "CLOSE_CONNECT_FAILD"); } @@ -138,6 +156,7 @@ public abstract class AbstractSdncOperationTask extends BaseTask { httpClient.close(); } catch (IOException var17) { errorMsg = url + ":close httpClient faild"; + logger.info("exception: CLOSE_CONNECT_FAILD : {}", errorMsg); throwsRouteException(errorMsg, var17, "CLOSE_CONNECT_FAILD"); } } @@ -146,54 +165,78 @@ public abstract class AbstractSdncOperationTask extends BaseTask { httpClient.close(); } catch (IOException var18) { errorMsg = url + ":close httpClient faild"; + logger.info("exception: CLOSE_CONNECT_FAILD : {}", errorMsg); throwsRouteException(errorMsg, var18, "CLOSE_CONNECT_FAILD"); } + logger.info("AbstractSdncOperationTask.httpPost end!"); + return result; } private static void throwsRouteException(String errorMsg, Exception e, String errorCode) throws RouteException { String msg = errorMsg + ".errorMsg:" + e.getMessage(); + logger.info("exception: {}", msg); throw new RouteException(errorMsg, errorCode); } - private String getStringBody(ResourceOperationStatus resourceOperationStatus) { + private String getPostStringBody(ResourceOperationStatus resourceOperationStatus) { + logger.info("AbstractSdncOperationTask.getPostStringBody begin!"); String postBody = new String(postBodyTemplate); - postBody.replace("$errorCode", resourceOperationStatus.getErrorCode()); - postBody.replace("$jobId", resourceOperationStatus.getJobId()); - postBody.replace("$operType", resourceOperationStatus.getOperType()); - postBody.replace("$operationId", resourceOperationStatus.getOperationId()); - postBody.replace("$progress", resourceOperationStatus.getProgress()); - postBody.replace("$resourceTemplateUUID", resourceOperationStatus.getResourceTemplateUUID()); - postBody.replace("$serviceId", resourceOperationStatus.getServiceId()); - postBody.replace("$status", resourceOperationStatus.getStatus()); - postBody.replace("$statusDescription", resourceOperationStatus.getStatusDescription()); + postBody = postBody.replace("$errorCode", resourceOperationStatus.getErrorCode()); + postBody = postBody.replace("$jobId", resourceOperationStatus.getJobId()); + postBody = postBody.replace("$operType", resourceOperationStatus.getOperType()); + postBody = postBody.replace("$operationId", resourceOperationStatus.getOperationId()); + postBody = postBody.replace("$progress", resourceOperationStatus.getProgress()); + postBody = postBody.replace("$resourceTemplateUUID", resourceOperationStatus.getResourceTemplateUUID()); + postBody = postBody.replace("$serviceId", resourceOperationStatus.getServiceId()); + postBody = postBody.replace("$status", resourceOperationStatus.getStatus()); + postBody = postBody.replace("$statusDescription", resourceOperationStatus.getStatusDescription()); + logger.info("AbstractSdncOperationTask.getPostStringBody end!"); return postBody; } + private String getGetStringBody(String serviceId, String operationId, String resourceTemplateUUID) { + logger.info("AbstractSdncOperationTask.getGetStringBody begin!"); + String getBody = new String(getBodyTemplate); + getBody = getBody.replace("$operationId", operationId); + getBody = getBody.replace("$resourceTemplateUUID", resourceTemplateUUID); + getBody = getBody.replace("$serviceId", serviceId); + logger.info("AbstractSdncOperationTask.getGetStringBody end!"); + return getBody; + } + private ResourceOperationStatus getResourceOperationStatus(String serviceId, String operationId, String resourceTemplateUUID) throws RouteException { + logger.info("AbstractSdncOperationTask.getResourceOperationStatus begin!"); String url = "http://mso:8080/dbadapters/RequestsDbAdapter"; - HttpGet httpGet = new HttpGet(url); - httpGet.setHeader("Authorization", "Basic QlBFTENsaWVudDpwYXNzd29yZDEk"); - httpGet.setHeader("Content-type", "application/soap+xml"); - String result = httpGet(url, httpGet); + HttpPost httpPost = new HttpPost(url); + httpPost.addHeader("Authorization", "Basic QlBFTENsaWVudDpwYXNzd29yZDEk"); + httpPost.addHeader("Content-type", "application/soap+xml"); + String getBody = getGetStringBody(serviceId, operationId, resourceTemplateUUID); + httpPost.setEntity(new StringEntity(getBody, ContentType.APPLICATION_XML)); + String result = httpPost(url, httpPost); ResourceOperationStatus resourceOperationStatus = getResourceOperationStatusFromXmlString(result); - + logger.info("AbstractSdncOperationTask.getResourceOperationStatus end!"); return resourceOperationStatus; //return requestsDB.getResourceOperationStatus(serviceId, operationId, resourceTemplateUUID); } private String httpGet(String url, HttpGet httpGet) throws RouteException { + logger.info("AbstractSdncOperationTask.httpGet begin!"); boolean var16 = false; CloseableHttpClient httpClient = HttpClients.createDefault(); - String result=""; + String result = ""; String errorMsg; - label109: { - label110: { + label109: + { + label110: + { try { var16 = true; CloseableHttpResponse e = httpClient.execute(httpGet); result = EntityUtils.toString(e.getEntity()); - if(e.getStatusLine().getStatusCode() != 200) { + logger.info("result = {}", result); + if (e.getStatusLine().getStatusCode() != 200) { + logger.info("exception: fail for status code = {}", e.getStatusLine().getStatusCode()); throw new RouteException(result, "SERVICE_GET_ERR"); } @@ -202,19 +245,22 @@ public abstract class AbstractSdncOperationTask extends BaseTask { break label110; } catch (ClientProtocolException var21) { errorMsg = url + ":httpGetWithJSON connect faild"; + logger.info("exception: GET_CONNECT_FAILD {}", errorMsg); throwsRouteException(errorMsg, var21, "GET_CONNECT_FAILD"); var16 = false; } catch (IOException var22) { errorMsg = url + ":httpGetWithJSON connect faild"; + logger.info("exception: GET_CONNECT_FAILD {}", errorMsg); throwsRouteException(errorMsg, var22, "GET_CONNECT_FAILD"); var16 = false; break label109; } finally { - if(var16) { + if (var16) { try { httpClient.close(); } catch (IOException var17) { String errorMsg1 = url + ":close httpClient faild"; + logger.info("exception: CLOSE_CONNECT_FAILD {}", errorMsg1); throwsRouteException(errorMsg1, var17, "CLOSE_CONNECT_FAILD"); } @@ -225,6 +271,7 @@ public abstract class AbstractSdncOperationTask extends BaseTask { httpClient.close(); } catch (IOException var19) { errorMsg = url + ":close httpClient faild"; + logger.info("exception: CLOSE_CONNECT_FAILD {}", errorMsg); throwsRouteException(errorMsg, var19, "CLOSE_CONNECT_FAILD"); } @@ -234,6 +281,7 @@ public abstract class AbstractSdncOperationTask extends BaseTask { httpClient.close(); } catch (IOException var20) { errorMsg = url + ":close httpClient faild"; + logger.info("exception: CLOSE_CONNECT_FAILD {}", errorMsg); throwsRouteException(errorMsg, var20, "CLOSE_CONNECT_FAILD"); } @@ -243,12 +291,15 @@ public abstract class AbstractSdncOperationTask extends BaseTask { httpClient.close(); } catch (IOException var18) { errorMsg = url + ":close httpClient faild"; + logger.info("exception: CLOSE_CONNECT_FAILD {}", errorMsg); throwsRouteException(errorMsg, var18, "CLOSE_CONNECT_FAILD"); } + logger.info("AbstractSdncOperationTask.httpGet end!"); return result; } private ResourceOperationStatus getResourceOperationStatusFromXmlString(String result) { + logger.info("AbstractSdncOperationTask.getResourceOperationStatusFromXmlString begin!"); ResourceOperationStatus resourceOperationStatus = new ResourceOperationStatus(); resourceOperationStatus.setErrorCode(getValueByName("errorCode", result)); resourceOperationStatus.setJobId(getValueByName("jobId", result)); @@ -259,19 +310,24 @@ public abstract class AbstractSdncOperationTask extends BaseTask { resourceOperationStatus.setServiceId(getValueByName("serviceId", result)); resourceOperationStatus.setStatus(getValueByName("status", result)); resourceOperationStatus.setStatusDescription(getValueByName("statusDescription", result)); + logger.info("AbstractSdncOperationTask.getResourceOperationStatusFromXmlString end!"); return resourceOperationStatus; } private String getValueByName(String Name, String xml) { - String start = "<" + Name + ">"; - String end = "</" + Name + ">"; - return xml.substring(xml.indexOf(start), xml.indexOf(end)).replace(start, ""); + if (!StringUtils.isBlank(xml) && xml.contains(Name)) { + String start = "<" + Name + ">"; + String end = "</" + Name + ">"; + return xml.substring(xml.indexOf(start), xml.indexOf(end)).replace(start, ""); + } + return ""; } protected static MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA); @Override public void execute(DelegateExecution execution) { + logger.info("AbstractSdncOperationTask.execute begin!"); GenericResourceApi genericResourceApiClient = getGenericResourceApiClient(execution); // updateProgress(execution, RequestsDbConstant.Status.PROCESSING, null, "10", "execute begin!"); Map<String, String> inputs = getInputs(execution); @@ -281,24 +337,29 @@ public abstract class AbstractSdncOperationTask extends BaseTask { execution.setVariable("SDNCA_SuccessIndicator", true); // updateProgress(execution, RequestsDbConstant.Status.FINISHED, null, RequestsDbConstant.Progress.ONE_HUNDRED, "execute finished!"); } catch (Exception e) { + logger.info("exception: AbstractSdncOperationTask.fail!"); + logger.error("exception: AbstractSdncOperationTask.fail!:", e); e.printStackTrace(); execution.setVariable("SDNCA_SuccessIndicator", false); } + logger.info("AbstractSdncOperationTask.execute end!"); } protected Map<String, String> getInputs(DelegateExecution execution) { + logger.info("AbstractSdncOperationTask.getInputs begin!"); Map<String, String> inputs = new HashMap<>(); String json = (String) execution.getVariable(SDCADAPTOR_INPUTS); JSONObject jsonObject = new JSONObject(json); JSONObject paras = jsonObject.getJSONObject("additionalParamForNs"); - - while (paras.keys().hasNext()) { - String key = paras.keys().next(); + Iterator<String> iterator = paras.keys(); + while (iterator.hasNext()) { + String key = iterator.next(); inputs.put(key, paras.getString(key)); } /* if (paras.keys().hasNext()) { paras.keySet().stream().forEach(key -> inputs.put(key, paras.getString((String) key))); }*/ + logger.info("AbstractSdncOperationTask.getInputs end!"); return inputs; } @@ -311,6 +372,7 @@ public abstract class AbstractSdncOperationTask extends BaseTask { String errorCode, String progress, String statusDescription) { + logger.info("AbstractSdncOperationTask.updateProgress begin!"); String serviceId = (String) execution.getVariable("serviceId"); String operationId = (String) execution.getVariable("operationId"); String resourceTemplateUUID = (String) execution.getVariable("resourceUUID"); @@ -329,44 +391,57 @@ public abstract class AbstractSdncOperationTask extends BaseTask { resourceOperationStatus.setStatusDescription(statusDescription); } updateResOperStatus(resourceOperationStatus); + logger.info("AbstractSdncOperationTask.updateProgress end!"); } catch (Exception exception) { System.out.println(exception); + logger.info("exception: AbstractSdncOperationTask.updateProgress fail!"); + logger.error("exception: AbstractSdncOperationTask.updateProgress fail:", exception); LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " updateProgress catch exception: ", "", this.getTaskName(), MsoLogger.ErrorCode.UnknownError, exception.getClass().toString()); } } protected boolean isSend2SdncDirectly() { + logger.info("AbstractSdncOperationTask.isSend2SdncDirectly begin!"); Map<String, String> properties = PropertyConfiguration.getInstance().getProperties("topology.properties"); if (properties != null) { String sdncIp = properties.get("sdnc-ip"); String sdncPort = properties.get("sdnc-port"); if (!StringUtils.isBlank(sdncIp) && isIp(sdncIp) && !StringUtils.isBlank(sdncPort)) { + logger.info("AbstractSdncOperationTask.isSend2SdncDirectly = true."); return true; } } + logger.info("AbstractSdncOperationTask.isSend2SdncDirectly = false."); return false; } protected String getSdncIp() { + logger.info("AbstractSdncOperationTask.getSdncIp begin."); String sdncIp = null; Map<String, String> properties = PropertyConfiguration.getInstance().getProperties("topology.properties"); if (properties != null) { sdncIp = properties.get("sdnc-ip"); } - return StringUtils.isBlank(sdncIp) || !isIp(sdncIp) ? null : sdncIp; + String returnIp = StringUtils.isBlank(sdncIp) || !isIp(sdncIp) ? null : sdncIp; + logger.info("AbstractSdncOperationTask.getSdncIp: sdncIp = {}", returnIp); + return returnIp; } protected String getSdncPort() { - String sdncIp = null; + logger.info("AbstractSdncOperationTask.getSdncPort begin."); + String sdncPort = null; Map<String, String> properties = PropertyConfiguration.getInstance().getProperties("topology.properties"); if (properties != null) { - sdncIp = properties.get("sdnc-port"); + sdncPort = properties.get("sdnc-port"); } - return StringUtils.isBlank(sdncIp) ? null : sdncIp; + String returnPort = StringUtils.isBlank(sdncPort) ? null : sdncPort; + logger.info("AbstractSdncOperationTask.getSdncPort: returnPort = {}", sdncPort); + return returnPort; } private GenericResourceApi getGenericResourceApiClient(DelegateExecution execution) { + logger.info("AbstractSdncOperationTask.getGenericResourceApiClient begin!"); // updateProgress(execution, null, null, "20", "getGenericResourceApiClient begin!"); String msbIp = System.getenv().get(ONAP_IP); int msbPort = DEFAULT_MSB_Port; @@ -384,8 +459,10 @@ public abstract class AbstractSdncOperationTask extends BaseTask { } msbPort = Integer.valueOf(strMsbPort); } + logger.info("AbstractSdncOperationTask.getGenericResourceApiClient msbIp = " + msbIp + " msbPort = " + msbPort); MSBServiceClient msbClient = new MSBServiceClient(msbIp, msbPort); RestServiceCreater restServiceCreater = new RestServiceCreater(msbClient); + logger.info("AbstractSdncOperationTask.getGenericResourceApiClient end!"); return restServiceCreater.createService(GenericResourceApi.class); } diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncNetworkTopologyOperationTask.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncNetworkTopologyOperationTask.java index 95abd275b4..e8bfcf5caa 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncNetworkTopologyOperationTask.java +++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncNetworkTopologyOperationTask.java @@ -24,7 +24,6 @@ import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.ContentType; import org.apache.http.entity.StringEntity; import org.camunda.bpm.engine.delegate.DelegateExecution; -import org.json.JSONObject; import org.onap.msb.sdk.discovery.common.RouteException; import org.openecomp.mso.bpmn.core.WorkflowException; import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.GenericResourceApi; @@ -34,6 +33,8 @@ import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity. import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity.RpcNetworkTopologyOperationOutputEntity; import org.openecomp.mso.logger.MessageEnum; import org.openecomp.mso.requestsdb.RequestsDbConstant; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.util.Map; @@ -41,6 +42,8 @@ import java.util.Map; * Created by 10112215 on 2017/9/20. */ public class SdncNetworkTopologyOperationTask extends AbstractSdncOperationTask { + private static final Logger logger = LoggerFactory.getLogger(SdncNetworkTopologyOperationTask.class); + private static final String URL = "/restconf/operations/GENERIC-RESOURCE-API:network-topology-operation"; @@ -48,6 +51,7 @@ public class SdncNetworkTopologyOperationTask extends AbstractSdncOperationTask public void sendRestrequestAndHandleResponse(DelegateExecution execution, Map<String, String> inputs, GenericResourceApi genericResourceApiClient) throws Exception { + logger.info("SdncNetworkTopologyOperationTask.sendRestrequestAndHandleResponse begin!"); updateProgress(execution, null, null, "40", "sendRestrequestAndHandleResponse begin!"); NetworkRpcInputEntityBuilder builder = new NetworkRpcInputEntityBuilder(); RpcNetworkTopologyOperationInputEntity inputEntity = builder.build(execution, inputs); @@ -61,10 +65,12 @@ public class SdncNetworkTopologyOperationTask extends AbstractSdncOperationTask } else { Send2SdncDirectly(HeaderUtil.DefaulAuth, inputEntity); } + logger.info("SdncNetworkTopologyOperationTask.sendRestrequestAndHandleResponse end!"); } private void Send2SdncDirectly(String defaulAuth, RpcNetworkTopologyOperationInputEntity inputEntity) throws RouteException { + logger.info("SdncNetworkTopologyOperationTask.Send2SdncDirectly begin!"); String url = "http://" + getSdncIp() + ":" + getSdncPort() + URL; HttpPost httpPost = new HttpPost(url); httpPost.addHeader("Authorization", defaulAuth); @@ -73,9 +79,11 @@ public class SdncNetworkTopologyOperationTask extends AbstractSdncOperationTask LOGGER.info(MessageEnum.RA_SEND_REQUEST_SDNC, postBody.toString(), "SDNC", ""); httpPost.setEntity(new StringEntity(postBody, ContentType.APPLICATION_XML)); httpPost(url, httpPost); + logger.info("SdncNetworkTopologyOperationTask.Send2SdncDirectly end!"); } private void saveOutput(DelegateExecution execution, RpcNetworkTopologyOperationOutputEntity output) throws Exception { + logger.info("SdncNetworkTopologyOperationTask.saveOutput begin!"); String responseCode = output.getOutput().getResponseCode(); if (!"200".equals(responseCode)) { String processKey = getProcessKey(execution); @@ -84,10 +92,11 @@ public class SdncNetworkTopologyOperationTask extends AbstractSdncOperationTask WorkflowException workflowException = new WorkflowException(processKey, errorCode, errorMessage); execution.setVariable("SDNCA_SuccessIndicator", workflowException); updateProgress(execution, RequestsDbConstant.Status.ERROR, String.valueOf(errorCode), null, errorMessage); + logger.info("exception: SdncNetworkTopologyOperationTask.saveOutput fail!"); throw new Exception(""); } updateProgress(execution, RequestsDbConstant.Status.FINISHED, null, RequestsDbConstant.Progress.ONE_HUNDRED, "execute finished!"); - + logger.info("SdncNetworkTopologyOperationTask.saveOutput end!"); } } diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java index ed2411a30e..89d0958c75 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java +++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java @@ -33,6 +33,8 @@ import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.builder import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity.RpcServiceTopologyOperationInputEntity; import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity.RpcServiceTopologyOperationOutputEntity; import org.openecomp.mso.logger.MessageEnum; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.util.Map; @@ -40,6 +42,8 @@ import java.util.Map; * Created by 10112215 on 2017/9/26. */ public class SdncServiceTopologyOperationTask extends AbstractSdncOperationTask { + private static final Logger logger = LoggerFactory.getLogger(SdncServiceTopologyOperationTask.class); + private static final String URL = "/restconf/operations/GENERIC-RESOURCE-API:service-topology-operation"; @@ -47,6 +51,7 @@ public class SdncServiceTopologyOperationTask extends AbstractSdncOperationTask public void sendRestrequestAndHandleResponse(DelegateExecution execution, Map<String, String> inputs, GenericResourceApi genericResourceApiClient) throws Exception { + logger.info("SdncServiceTopologyOperationTask.sendRestrequestAndHandleResponse begin!"); // updateProgress(execution, null, null, "40", "sendRestrequestAndHandleResponse begin!"); ServiceRpcInputEntityBuilder builder = new ServiceRpcInputEntityBuilder(); RpcServiceTopologyOperationInputEntity inputEntity = builder.build(execution, inputs); @@ -60,10 +65,13 @@ public class SdncServiceTopologyOperationTask extends AbstractSdncOperationTask } else { Send2SdncDirectly(HeaderUtil.DefaulAuth, inputEntity); } + logger.info("SdncServiceTopologyOperationTask.sendRestrequestAndHandleResponse end!"); + } private void Send2SdncDirectly(String defaulAuth, RpcServiceTopologyOperationInputEntity inputEntity) throws RouteException { + logger.info("SdncServiceTopologyOperationTask.Send2SdncDirectly begin!"); String url = "http://" + getSdncIp() + ":" + getSdncPort() + URL; HttpPost httpPost = new HttpPost(url); httpPost.addHeader("Authorization", defaulAuth); @@ -72,9 +80,11 @@ public class SdncServiceTopologyOperationTask extends AbstractSdncOperationTask LOGGER.info(MessageEnum.RA_SEND_REQUEST_SDNC, postBody.toString(), "SDNC", ""); httpPost.setEntity(new StringEntity(postBody, ContentType.APPLICATION_XML)); httpPost(url, httpPost); + logger.info("SdncServiceTopologyOperationTask.Send2SdncDirectly end!"); } private void saveOutput(DelegateExecution execution, RpcServiceTopologyOperationOutputEntity output) throws Exception { + logger.info("SdncServiceTopologyOperationTask.saveOutput begin!"); String responseCode = output.getOutput().getResponseCode(); if (!"200".equals(responseCode)) { String processKey = getProcessKey(execution); @@ -83,7 +93,9 @@ public class SdncServiceTopologyOperationTask extends AbstractSdncOperationTask WorkflowException workflowException = new WorkflowException(processKey, errorCode, errorMessage); execution.setVariable("SDNCA_SuccessIndicator", workflowException); // updateProgress(execution, RequestsDbConstant.Status.ERROR, String.valueOf(errorCode), null, errorMessage); + logger.info("exception: SdncServiceTopologyOperationTask.saveOutput fail!"); throw new Exception(""); } + logger.info("SdncServiceTopologyOperationTask.saveOutput end!"); } } diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilder.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilder.java index 36961de6ac..299c1c546b 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilder.java +++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilder.java @@ -118,7 +118,7 @@ public abstract class AbstractBuilder<IN, OUT> { String operType = (String) execution.getVariable(OPERATION_TYPE); String resourceType = ((String) execution.getVariable(RESOURCE_TYPE)).toLowerCase(); if (!StringUtils.isBlank(operType)) { - if (RequestsDbConstant.OperationType.DELETE.equals(operType)) { + if (RequestsDbConstant.OperationType.DELETE.equalsIgnoreCase(operType)) { if (isOverlay(resourceType)) { action = /*RequestInformation.*/RequestAction.DeActivateDCINetworkInstance.getName(); } else if (isUnderlay(resourceType)) { @@ -126,7 +126,7 @@ public abstract class AbstractBuilder<IN, OUT> { } else { action = /*RequestInformation.*/RequestAction.DeleteServiceInstance.getName(); } - } else if (RequestsDbConstant.OperationType.CREATE.equals(operType)) { + } else if (RequestsDbConstant.OperationType.CREATE.equalsIgnoreCase(operType)) { if (isOverlay(resourceType)) { action = /*RequestInformation.*/RequestAction.ActivateDCINetworkInstance.getName(); } else if (isUnderlay(resourceType)) { @@ -152,7 +152,7 @@ public abstract class AbstractBuilder<IN, OUT> { String operType = (String) execution.getVariable(OPERATION_TYPE); String resourceType = ((String) execution.getVariable(RESOURCE_TYPE)).toLowerCase(); if (!StringUtils.isBlank(operType)) { - if (RequestsDbConstant.OperationType.DELETE.equals(operType)) { + if (RequestsDbConstant.OperationType.DELETE.equalsIgnoreCase(operType)) { if (isOverlay(resourceType)) { action = /*SdncRequestHeader.*/SvcAction.Deactivate.getName(); } else if (isUnderlay(resourceType)) { @@ -160,7 +160,7 @@ public abstract class AbstractBuilder<IN, OUT> { } else { action = /*SdncRequestHeader.*/SvcAction.Unassign.getName(); } - } else if (RequestsDbConstant.OperationType.CREATE.equals(operType)) { + } else if (RequestsDbConstant.OperationType.CREATE.equalsIgnoreCase(operType)) { if (isOverlay(resourceType)) { action = /*SdncRequestHeader.*/SvcAction.Activate.getName(); } else if (isUnderlay(resourceType)) { @@ -183,13 +183,13 @@ public abstract class AbstractBuilder<IN, OUT> { return requestId; } - protected OnapModelInformationEntity getOnapModelInformationEntity(DelegateExecution execution) { + protected OnapModelInformationEntity getOnapServiceModelInformationEntity(DelegateExecution execution) { OnapModelInformationEntity onapModelInformationEntity = new OnapModelInformationEntity(); { String modelInvariantUuid = (String) execution.getVariable("modelInvariantUuid"); String modelVersion = (String) execution.getVariable("modelVersion"); String modelUuid = (String) execution.getVariable("modelUuid"); - String modelName = (String) execution.getVariable("modelName"); + String modelName = (String) execution.getVariable("serviceModelName"); onapModelInformationEntity.setModelInvariantUuid(modelInvariantUuid); onapModelInformationEntity.setModelVersion(modelVersion); onapModelInformationEntity.setModelUuid(modelUuid); @@ -197,6 +197,21 @@ public abstract class AbstractBuilder<IN, OUT> { } return onapModelInformationEntity; } + + protected OnapModelInformationEntity getOnapNetworkModelInformationEntity(DelegateExecution execution) { + OnapModelInformationEntity onapModelInformationEntity = new OnapModelInformationEntity(); + { + String modelInvariantUuid = (String) execution.getVariable("resourceInvariantUUID"); + String modelVersion = (String) execution.getVariable("modelVersion"); + String modelUuid = (String) execution.getVariable("resourceUUID"); + String modelName = (String) execution.getVariable("resourceType"); + onapModelInformationEntity.setModelInvariantUuid(modelInvariantUuid); + onapModelInformationEntity.setModelVersion(modelVersion); + onapModelInformationEntity.setModelUuid(modelUuid); + onapModelInformationEntity.setModelName(modelName); + } + return onapModelInformationEntity; + } protected List<ParamEntity> getParamEntities(Map<String, String> inputs) { List<ParamEntity> paramEntityList = new ArrayList<>(); @@ -222,9 +237,9 @@ public abstract class AbstractBuilder<IN, OUT> { protected ServiceInformationEntity getServiceInformationEntity(DelegateExecution execution) { ServiceInformationEntity serviceInformationEntity = new ServiceInformationEntity(); - serviceInformationEntity.setServiceId((String) execution.getVariable("productFamilyId")); - serviceInformationEntity.setSubscriptionServiceType((String) execution.getVariable("subscriptionServiceType")); - serviceInformationEntity.setOnapModelInformation(getOnapModelInformationEntity(execution)); + serviceInformationEntity.setServiceId("VOLTE_SERVICE_ID"); + serviceInformationEntity.setSubscriptionServiceType((String) execution.getVariable("serviceType")); + serviceInformationEntity.setOnapModelInformation(getOnapServiceModelInformationEntity(execution)); serviceInformationEntity.setServiceInstanceId((String) execution.getVariable("serviceInstanceId")); serviceInformationEntity.setGlobalCustomerId((String) execution.getVariable("globalSubscriberId")); return serviceInformationEntity; diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/NetworkRpcInputEntityBuilder.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/NetworkRpcInputEntityBuilder.java index 94838ed1ff..8d0caaa765 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/NetworkRpcInputEntityBuilder.java +++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/NetworkRpcInputEntityBuilder.java @@ -47,6 +47,7 @@ public class NetworkRpcInputEntityBuilder extends AbstractBuilder<Map<String, St List<ParamEntity> paramEntityList = getParamEntities(inputs); networkInputPaarametersEntity.setParamList(paramEntityList); } + networkRequestInputEntity.setNetworkInputPaarameters(networkInputPaarametersEntity); } networkTopologyOperationInputEntity.setNetworkRequestInput(networkRequestInputEntity); } @@ -85,7 +86,7 @@ public class NetworkRpcInputEntityBuilder extends AbstractBuilder<Map<String, St private void loadNetworkInformationEntity(DelegateExecution execution, NetworkTopologyOperationInputEntity networkTopologyOperationInputEntity) { NetworkInformationEntity networkInformationEntity = new NetworkInformationEntity(); { - OnapModelInformationEntity onapModelInformationEntity = getOnapModelInformationEntity(execution); + OnapModelInformationEntity onapModelInformationEntity = getOnapNetworkModelInformationEntity(execution); networkInformationEntity.setOnapModelInformation(onapModelInformationEntity); } networkTopologyOperationInputEntity.setNetworkInformation(networkInformationEntity); diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/GenericFlows/MsoCompletionRequest.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/GenericFlows/MsoCompletionRequest.xml new file mode 100644 index 0000000000..37b17121ae --- /dev/null +++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/GenericFlows/MsoCompletionRequest.xml @@ -0,0 +1,11 @@ +<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1" + xmlns:ns="http://org.openecomp/mso/request/types/v1" + xmlns="http://org.openecomp/mso/infra/vnf-request/v1"> + <request-info> + <request-id>null</request-id> + <action>DELETE</action> + <source>null</source> + </request-info> + <aetgt:status-message>E2E Service Instance was deleted successfully.</aetgt:status-message> + <aetgt:mso-bpel-name>DeleteCustomE2EServiceInstance</aetgt:mso-bpel-name> +</aetgt:MsoCompletionRequest>
\ No newline at end of file diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/GenericFlows/SDNCDeleteResponse.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/GenericFlows/SDNCDeleteResponse.xml new file mode 100644 index 0000000000..fd719ff443 --- /dev/null +++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/GenericFlows/SDNCDeleteResponse.xml @@ -0,0 +1,212 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sdncadapterworkflow:SDNCAdapterWorkflowResponse + xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"> + <sdncadapterworkflow:response-data> + <tag0:RequestData + xmlns:tag0="http://org.openecomp/workflow/sdnc/adapter/schema/v1" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string"> + <output xmlns="com:att:sdnctl:nbncapi"> + <ack-final-indicator>Y</ack-final-indicator> + <svc-request-id>SK-2016-10-22-001</svc-request-id> + <nbnc-response-information> + <response-info> + <result>SUCCESS</result> + <aai-status>ERROR</aai-status> + </response-info> + <virtual-datacenter-list> + <vdc-id>15001417</vdc-id> + <router-list> + <router-name>ALPRTR2</router-name> + <ipe-loopback-address>1.1.1.2</ipe-loopback-address> + <vlan-list> + <vlan-id>1255.ae81</vlan-id> + <border-element-type>VDBE</border-element-type> + <border-element-tangibility>VIRTUAL</border-element-tangibility> + <port-id></port-id> + <border-element-id>ALPVDBE1</border-element-id> + <border-element-v4-subnet>3.1.1.0/22</border-element-v4-subnet> + <lag-id>ae81</lag-id> + <border-element-v6-subnet>3:1:1::0/22</border-element-v6-subnet> + </vlan-list> + <vlan-list> + <vlan-id>1995.ae81</vlan-id> + <border-element-type>ASBG</border-element-type> + <border-element-tangibility>VIRTUAL</border-element-tangibility> + <port-id></port-id> + <border-element-id>ALPASBG1</border-element-id> + <border-element-v4-subnet>3.1.1.0/22</border-element-v4-subnet> + <lag-id>ae81</lag-id> + <border-element-v6-subnet>3:1:1::0/22</border-element-v6-subnet> + </vlan-list> + <vlan-list> + <vlan-id>85.xe-10/0/2</vlan-id> + <border-element-type>BGF2</border-element-type> + <border-element-tangibility>PHYSICAL</border-element-tangibility> + <port-id>xe-10/0/2</port-id> + <border-element-id>ALPBGF2</border-element-id> + <border-element-v4-subnet>3.1.2.0/22</border-element-v4-subnet> + <lag-id></lag-id> + <border-element-v6-subnet>3:1:2::0/22</border-element-v6-subnet> + </vlan-list> + <vlan-list> + <vlan-id>85.xe-10/0/1</vlan-id> + <border-element-type>BGF1</border-element-type> + <border-element-tangibility>PHYSICAL</border-element-tangibility> + <port-id>xe-10/0/1</port-id> + <border-element-id>ALPBGF1</border-element-id> + <border-element-v4-subnet>3.1.2.0/22</border-element-v4-subnet> + <lag-id></lag-id> + <border-element-v6-subnet>3:1:2::0/22</border-element-v6-subnet> + </vlan-list> + <ipe-id>2</ipe-id> + </router-list> + <router-list> + <router-name>ALPRTR1</router-name> + <ipe-loopback-address>1.1.1.1</ipe-loopback-address> + <vlan-list> + <vlan-id>1255.ae81</vlan-id> + <border-element-type>VDBE</border-element-type> + <border-element-tangibility>VIRTUAL</border-element-tangibility> + <port-id></port-id> + <border-element-id>ALPVDBE1</border-element-id> + <border-element-v4-subnet>3.1.1.0/22</border-element-v4-subnet> + <lag-id>ae81</lag-id> + <border-element-v6-subnet>3:1:1::0/22</border-element-v6-subnet> + </vlan-list> + <vlan-list> + <vlan-id>1995.ae81</vlan-id> + <border-element-type>ASBG</border-element-type> + <border-element-tangibility>VIRTUAL</border-element-tangibility> + <port-id></port-id> + <border-element-id>ALPASBG1</border-element-id> + <border-element-v4-subnet>3.1.1.0/22</border-element-v4-subnet> + <lag-id>ae81</lag-id> + <border-element-v6-subnet>3:1:1::0/22</border-element-v6-subnet> + </vlan-list> + <vlan-list> + <vlan-id>85.xe-10/0/2</vlan-id> + <border-element-type>BGF2</border-element-type> + <border-element-tangibility>PHYSICAL</border-element-tangibility> + <port-id>xe-10/0/2</port-id> + <border-element-id>ALPBGF2</border-element-id> + <border-element-v4-subnet>3.1.2.0/22</border-element-v4-subnet> + <lag-id></lag-id> + <border-element-v6-subnet>3:1:2::0/22</border-element-v6-subnet> + </vlan-list> + <vlan-list> + <vlan-id>85.xe-10/0/1</vlan-id> + <border-element-type>BGF1</border-element-type> + <border-element-tangibility>PHYSICAL</border-element-tangibility> + <port-id>xe-10/0/1</port-id> + <border-element-id>ALPBGF1</border-element-id> + <border-element-v4-subnet>3.1.2.0/22</border-element-v4-subnet> + <lag-id></lag-id> + <border-element-v6-subnet>3:1:2::0/22</border-element-v6-subnet> + </vlan-list> + <ipe-id>1</ipe-id> + </router-list> + </virtual-datacenter-list> + <virtual-datacenter-list> + <vdc-id>15001418</vdc-id> + <router-list> + <router-name>SANRTR1</router-name> + <ipe-loopback-address>2.1.1.1</ipe-loopback-address> + <vlan-list> + <vlan-id>1255.ae81</vlan-id> + <border-element-type>VDBE</border-element-type> + <border-element-tangibility>VIRTUAL</border-element-tangibility> + <port-id></port-id> + <border-element-id>SANVDBE1</border-element-id> + <border-element-v4-subnet>4.1.1.0/22</border-element-v4-subnet> + <lag-id>ae81</lag-id> + <border-element-v6-subnet>4:1:1::0/22</border-element-v6-subnet> + </vlan-list> + <vlan-list> + <vlan-id>1995.ae81</vlan-id> + <border-element-type>ASBG</border-element-type> + <border-element-tangibility>VIRTUAL</border-element-tangibility> + <port-id></port-id> + <border-element-id>SANASBG1</border-element-id> + <border-element-v4-subnet>4.1.1.0/22</border-element-v4-subnet> + <lag-id>ae81</lag-id> + <border-element-v6-subnet>4:1:1::0/22</border-element-v6-subnet> + </vlan-list> + <vlan-list> + <vlan-id>85.xe-10/0/2</vlan-id> + <border-element-type>BGF2</border-element-type> + <border-element-tangibility>PHYSICAL</border-element-tangibility> + <port-id>xe-10/0/2</port-id> + <border-element-id>SANBGF2</border-element-id> + <border-element-v4-subnet>4.1.2.0/22</border-element-v4-subnet> + <lag-id></lag-id> + <border-element-v6-subnet>4:1:2::0/22</border-element-v6-subnet> + </vlan-list> + <vlan-list> + <vlan-id>85.xe-10/0/1</vlan-id> + <border-element-type>BGF1</border-element-type> + <border-element-tangibility>PHYSICAL</border-element-tangibility> + <port-id>xe-10/0/1</port-id> + <border-element-id>SANBGF1</border-element-id> + <border-element-v4-subnet>4.1.2.0/22</border-element-v4-subnet> + <lag-id></lag-id> + <border-element-v6-subnet>4:1:2::0/22</border-element-v6-subnet> + </vlan-list> + <ipe-id>1</ipe-id> + </router-list> + <router-list> + <router-name>SANRTR2</router-name> + <ipe-loopback-address>2.1.1.2</ipe-loopback-address> + <vlan-list> + <vlan-id>1255.ae81</vlan-id> + <border-element-type>VDBE</border-element-type> + <border-element-tangibility>VIRTUAL</border-element-tangibility> + <port-id></port-id> + <border-element-id>SANVDBE1</border-element-id> + <border-element-v4-subnet>4.1.1.0/22</border-element-v4-subnet> + <lag-id>ae81</lag-id> + <border-element-v6-subnet>4:1:1::0/22</border-element-v6-subnet> + </vlan-list> + <vlan-list> + <vlan-id>1995.ae81</vlan-id> + <border-element-type>ASBG</border-element-type> + <border-element-tangibility>VIRTUAL</border-element-tangibility> + <port-id></port-id> + <border-element-id>SANASBG1</border-element-id> + <border-element-v4-subnet>4.1.1.0/22</border-element-v4-subnet> + <lag-id>ae81</lag-id> + <border-element-v6-subnet>4:1:1::0/22</border-element-v6-subnet> + </vlan-list> + <vlan-list> + <vlan-id>85.xe-10/0/2</vlan-id> + <border-element-type>BGF2</border-element-type> + <border-element-tangibility>PHYSICAL</border-element-tangibility> + <port-id>xe-10/0/2</port-id> + <border-element-id>SANBGF2</border-element-id> + <border-element-v4-subnet>4.1.2.0/22</border-element-v4-subnet> + <lag-id></lag-id> + <border-element-v6-subnet>4:1:2::0/22</border-element-v6-subnet> + </vlan-list> + <vlan-list> + <vlan-id>85.xe-10/0/1</vlan-id> + <border-element-type>BGF1</border-element-type> + <border-element-tangibility>PHYSICAL</border-element-tangibility> + <port-id>xe-10/0/1</port-id> + <border-element-id>SANBGF1</border-element-id> + <border-element-v4-subnet>4.1.2.0/22</border-element-v4-subnet> + <lag-id></lag-id> + <border-element-v6-subnet>4:1:2::0/22</border-element-v6-subnet> + </vlan-list> + <ipe-id>2</ipe-id> + </router-list> + </virtual-datacenter-list> + <service-type>COLLABORATE</service-type> + <interface-status>DISABLE</interface-status> + <customer-id>custid-888</customer-id> + <service-instance-id>SII-2016-10-22-001</service-instance-id> + <provision-type>CUSTOMER</provision-type> + <vni-id>100668</vni-id> + </nbnc-response-information> + </output> + </tag0:RequestData> + </sdncadapterworkflow:response-data> +</sdncadapterworkflow:SDNCAdapterWorkflowResponse>
\ No newline at end of file diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/GenericFlows/aaiGetResponse.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/GenericFlows/aaiGetResponse.xml new file mode 100644 index 0000000000..c367b5c959 --- /dev/null +++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/GenericFlows/aaiGetResponse.xml @@ -0,0 +1,33 @@ +<service-instance xmlns="http://org.openecomp.aai.inventory/v11"> + <service-instance-id>1234</service-instance-id> + <service-instance-name>volte-service</service-instance-name> + <service-type>testservicetype</service-type> + <service-role>testservicerole</service-role> + <description>volte service</description> + <model-invariant-id>c1d4305f-cdbd-4bbe-9069-a2f4978fd89e</model-invariant-id> + <model-version-id>d4df5c27-98a1-4812-a8aa-c17f055b7a3f</model-version-id> + <resource-version>1508838121849</resource-version> + <orchestration-status>create</orchestration-status> + <relationship-list> + <relationship> + <related-to>service-instance</related-to> + <related-link>/aai/v11/business/customers/customer/test_customer/service-subscription/example-service-type/service-instance/1234_1</related-link> + <relationship-data> + <relationship-key>customer.global-customer-id</relationship-key> + <relationship-value>test_customer</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>service-subscription.service-type</relationship-key> + <relationship-value>test_customer</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>service-instance.service-instance-id</relationship-key> + <relationship-value>1234_1</relationship-value> + </relationship-data> + <related-to-property> + <property-key>service-instance.service-instance-name</property-key> + <property-value>volte-service_vEPC</property-value> + </related-to-property> + </relationship> + </relationship-list> +</service-instance>
\ No newline at end of file diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/InfrastructureFlows/DeleteCustomE2EService.json b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/InfrastructureFlows/DeleteCustomE2EService.json new file mode 100644 index 0000000000..00663fddc5 --- /dev/null +++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/InfrastructureFlows/DeleteCustomE2EService.json @@ -0,0 +1,5 @@ +{ + "globalSubscriberId" : "38829939920000", + "operationId" : "59960003992", + "serviceType" : "VoLTE" +}
\ No newline at end of file diff --git a/packages/arquillian-unit-tests/pom.xml b/packages/arquillian-unit-tests/pom.xml index 96b801b7ea..6a5e4a09e2 100644 --- a/packages/arquillian-unit-tests/pom.xml +++ b/packages/arquillian-unit-tests/pom.xml @@ -325,7 +325,7 @@ </plugin> - <plugin> + <!-- <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>wagon-maven-plugin</artifactId> <version>1.0</version> @@ -343,7 +343,7 @@ </configuration> </execution> </executions> - </plugin> + </plugin> --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> |