diff options
148 files changed, 2755 insertions, 1513 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfigFactory.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfigFactory.java index 8da3b212d9..2d6d0271f8 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfigFactory.java +++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfigFactory.java @@ -185,12 +185,12 @@ public class CloudConfigFactory implements Serializable { StringBuffer response = new StringBuffer (); response.append ("Cloud Sites:\n"); for (CloudSite site : cloudConfig.getCloudSites ().values ()) { - response.append (site.toString () + "\n"); + response.append(site.toString()).append("\n"); } response.append ("\n\nCloud Identity Services:\n"); for (CloudIdentity identity : cloudConfig.getIdentityServices ().values ()) { - response.append (identity.toString () + "\n"); + response.append(identity.toString()).append("\n"); } return Response.status (200).entity (response).build (); diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/StackInfo.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/StackInfo.java index 600985e310..506b62994d 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/StackInfo.java +++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/StackInfo.java @@ -67,10 +67,8 @@ public class StackInfo { if (stack.getStackStatus() == null) { this.status = HeatStatus.INIT; - } else if (heatStatusMap.containsKey(stack.getStackStatus())) { - this.status = heatStatusMap.get(stack.getStackStatus()); } else { - this.status = HeatStatus.UNKNOWN; + this.status = heatStatusMap.getOrDefault(stack.getStackStatus(), HeatStatus.UNKNOWN); } if (stack.getOutputs() != null) { this.outputs = new HashMap<>(); diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java index da526ae25b..46cfbf1bb8 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java +++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java @@ -1214,18 +1214,18 @@ public class MsoHeatUtils extends MsoCommonUtils { } else { for (String key : params.keySet()) { if (params.get(key) instanceof String) { - sb.append("\n" + key + "=" + (String) params.get(key)); + sb.append("\n").append(key).append("=").append((String) params.get(key)); } else if (params.get(key) instanceof JsonNode) { String jsonStringOut = this.convertNode((JsonNode)params.get(key)); - sb.append("\n" + key + "=" + jsonStringOut); + sb.append("\n").append(key).append("=").append(jsonStringOut); } else if (params.get(key) instanceof Integer) { String integerOut = "" + params.get(key); - sb.append("\n" + key + "=" + integerOut); + sb.append("\n").append(key).append("=").append(integerOut); } else { try { String str = params.get(key).toString(); - sb.append("\n" + key + "=" + str); + sb.append("\n").append(key).append("=").append(str); } catch (Exception e) { LOGGER.debug("Exception :",e); } @@ -1269,16 +1269,16 @@ public class MsoHeatUtils extends MsoCommonUtils { int counter = 0; sb.append("OUTPUTS:\n"); for (String key : outputs.keySet()) { - sb.append("outputs[" + counter++ + "]: " + key + "="); + sb.append("outputs[").append(counter++).append("]: ").append(key).append("="); Object obj = outputs.get(key); if (obj instanceof String) { - sb.append((String)obj +" (a string)"); + sb.append((String) obj).append(" (a string)"); } else if (obj instanceof JsonNode) { - sb.append(this.convertNode((JsonNode)obj) + " (a JsonNode)"); + sb.append(this.convertNode((JsonNode) obj)).append(" (a JsonNode)"); } else if (obj instanceof java.util.LinkedHashMap) { try { String str = JSON_MAPPER.writeValueAsString(obj); - sb.append(str + " (a java.util.LinkedHashMap)"); + sb.append(str).append(" (a java.util.LinkedHashMap)"); } catch (Exception e) { LOGGER.debug("Exception :",e); sb.append("(a LinkedHashMap value that would not convert nicely)"); diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtilsWithUpdate.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtilsWithUpdate.java index 2465b30eca..0e0b9cb70d 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtilsWithUpdate.java +++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtilsWithUpdate.java @@ -365,16 +365,16 @@ public class MsoHeatUtilsWithUpdate extends MsoHeatUtils { int counter = 0; sb.append("OUTPUTS:\n"); for (String key : outputs.keySet()) { - sb.append("outputs[" + counter++ + "]: " + key + "="); + sb.append("outputs[").append(counter++).append("]: ").append(key).append("="); Object obj = outputs.get(key); if (obj instanceof String) { - sb.append((String)obj +" (a string)"); + sb.append((String) obj).append(" (a string)"); } else if (obj instanceof JsonNode) { - sb.append(this.convertNode((JsonNode)obj) + " (a JsonNode)"); + sb.append(this.convertNode((JsonNode) obj)).append(" (a JsonNode)"); } else if (obj instanceof java.util.LinkedHashMap) { try { String str = JSON_MAPPER.writeValueAsString(obj); - sb.append(str + " (a java.util.LinkedHashMap)"); + sb.append(str).append(" (a java.util.LinkedHashMap)"); } catch (Exception e) { LOGGER.debug("Exception :", e); sb.append("(a LinkedHashMap value that would not convert nicely)"); diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoYamlEditorWithEnvt.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoYamlEditorWithEnvt.java index c227d72f0c..8002087ddd 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoYamlEditorWithEnvt.java +++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoYamlEditorWithEnvt.java @@ -27,6 +27,7 @@ import java.io.ByteArrayInputStream; import java.io.InputStream; import java.util.HashSet; import java.util.Iterator; +import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; import java.util.Map.Entry; @@ -73,33 +74,32 @@ public class MsoYamlEditorWithEnvt { if (resourceMap == null) { return paramSet; } - Iterator <Entry <String, Object>> it = resourceMap.entrySet().iterator(); - - while (it.hasNext()) { - MsoHeatEnvironmentParameter hep = new MsoHeatEnvironmentParameter(); - Map.Entry <String, Object> pair = it.next(); - String value; - Object obj = pair.getValue(); - if (obj instanceof java.lang.String) { - value = yaml.dump(obj); - // but this adds an extra '\n' at the end - which won't hurt - but we don't need it - value = value.substring(0, value.length() - 1); - } else if (obj instanceof java.util.LinkedHashMap) { - //Handle that it's json - try { - value = JSON_MAPPER.writeValueAsString(obj); - } catch (Exception e) { - LOGGER.debug("Exception:", e); - value = "_BAD_JSON_MAPPING"; - } - } else { - //this handles integers/longs/floats/etc. - value = String.valueOf(obj); - } - hep.setName((String) pair.getKey()); - hep.setValue(value); - paramSet.add(hep); - } + + for (Entry<String, Object> stringObjectEntry : resourceMap.entrySet()) { + MsoHeatEnvironmentParameter hep = new MsoHeatEnvironmentParameter(); + Entry<String, Object> pair = stringObjectEntry; + String value; + Object obj = pair.getValue(); + if (obj instanceof String) { + value = yaml.dump(obj); + // but this adds an extra '\n' at the end - which won't hurt - but we don't need it + value = value.substring(0, value.length() - 1); + } else if (obj instanceof LinkedHashMap) { + //Handle that it's json + try { + value = JSON_MAPPER.writeValueAsString(obj); + } catch (Exception e) { + LOGGER.debug("Exception:", e); + value = "_BAD_JSON_MAPPING"; + } + } else { + //this handles integers/longs/floats/etc. + value = String.valueOf(obj); + } + hep.setName((String) pair.getKey()); + hep.setValue(value); + paramSet.add(hep); + } return paramSet; } public synchronized Set <MsoHeatEnvironmentResource> getResourceListFromEnvt() { @@ -107,15 +107,14 @@ public class MsoYamlEditorWithEnvt { Set<MsoHeatEnvironmentResource> resourceList = new HashSet<>(); @SuppressWarnings("unchecked") Map<String, Object> resourceMap = (Map<String,Object>) yml.get("resource_registry"); - Iterator<Entry <String,Object>> it = resourceMap.entrySet().iterator(); - - while (it.hasNext()) { - MsoHeatEnvironmentResource her = new MsoHeatEnvironmentResource(); - Map.Entry<String, Object> pair = it.next(); - her.setName((String) pair.getKey()); - her.setValue((String) pair.getValue()); - resourceList.add(her); - } + + for (Entry<String, Object> stringObjectEntry : resourceMap.entrySet()) { + MsoHeatEnvironmentResource her = new MsoHeatEnvironmentResource(); + Entry<String, Object> pair = stringObjectEntry; + her.setName((String) pair.getKey()); + her.setValue((String) pair.getValue()); + resourceList.add(her); + } return resourceList; } catch (Exception e) { LOGGER.debug("Exception:", e); @@ -126,35 +125,34 @@ public class MsoYamlEditorWithEnvt { Set <HeatTemplateParam> paramSet = new HashSet <> (); @SuppressWarnings("unchecked") Map <String, Object> resourceMap = (Map <String, Object>) yml.get ("parameters"); - Iterator <Entry <String, Object>> it = resourceMap.entrySet ().iterator (); - while (it.hasNext ()) { - HeatTemplateParam param = new HeatTemplateParam (); - Map.Entry <String, Object> pair = it.next (); + for (Entry<String, Object> stringObjectEntry : resourceMap.entrySet()) { + HeatTemplateParam param = new HeatTemplateParam(); + Entry<String, Object> pair = stringObjectEntry; @SuppressWarnings("unchecked") - Map <String, String> resourceEntry = (Map <String, String>) pair.getValue (); + Map<String, String> resourceEntry = (Map<String, String>) pair.getValue(); String value = null; try { - value = resourceEntry.get ("default"); - } catch (java.lang.ClassCastException cce) { + value = resourceEntry.get("default"); + } catch (ClassCastException cce) { LOGGER.debug("Exception:", cce); - // This exception only - the value is an integer. For what we're doing - // here - we don't care - so set value to something - and it will - // get marked as not being required - which is correct. - //System.out.println("cce exception!"); - value = "300"; - // okay + // This exception only - the value is an integer. For what we're doing + // here - we don't care - so set value to something - and it will + // get marked as not being required - which is correct. + //System.out.println("cce exception!"); + value = "300"; + // okay } - param.setParamName ((String) pair.getKey ()); + param.setParamName((String) pair.getKey()); if (value != null) { - param.setRequired (false); + param.setRequired(false); } else { - param.setRequired (true); + param.setRequired(true); } - value = resourceEntry.get ("type"); - param.setParamType (value); + value = resourceEntry.get("type"); + param.setParamType(value); - paramSet.add (param); + paramSet.add(param); } return paramSet; diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/CatalogDbAdapterRest.java b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/CatalogDbAdapterRest.java index 668f73816d..8cdeaaa9e1 100644 --- a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/CatalogDbAdapterRest.java +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/CatalogDbAdapterRest.java @@ -52,34 +52,37 @@ Once the network-level distribution artifacts are defined, similar updates can b import java.util.ArrayList; import java.util.List; + import javax.ws.rs.GET; import javax.ws.rs.HEAD; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Response; import javax.ws.rs.core.GenericEntity; import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.MediaType; -import org.apache.http.HttpStatus; +import javax.ws.rs.core.Response; -import org.openecomp.mso.logger.MessageEnum; -import org.openecomp.mso.logger.MsoLogger; +import org.apache.http.HttpStatus; +import org.openecomp.mso.adapters.catalogdb.catalogrest.CatalogQuery; import org.openecomp.mso.adapters.catalogdb.catalogrest.CatalogQueryException; import org.openecomp.mso.adapters.catalogdb.catalogrest.CatalogQueryExceptionCategory; -import org.openecomp.mso.adapters.catalogdb.catalogrest.CatalogQuery; -import org.openecomp.mso.adapters.catalogdb.catalogrest.QueryServiceVnfs; -import org.openecomp.mso.adapters.catalogdb.catalogrest.QueryServiceNetworks; -import org.openecomp.mso.adapters.catalogdb.catalogrest.QueryServiceMacroHolder; import org.openecomp.mso.adapters.catalogdb.catalogrest.QueryAllottedResourceCustomization; +import org.openecomp.mso.adapters.catalogdb.catalogrest.QueryServiceCsar; +import org.openecomp.mso.adapters.catalogdb.catalogrest.QueryServiceMacroHolder; +import org.openecomp.mso.adapters.catalogdb.catalogrest.QueryServiceNetworks; +import org.openecomp.mso.adapters.catalogdb.catalogrest.QueryServiceVnfs; import org.openecomp.mso.adapters.catalogdb.catalogrest.QueryVfModule; import org.openecomp.mso.db.catalog.CatalogDatabase; -import org.openecomp.mso.db.catalog.beans.VnfResourceCustomization; -import org.openecomp.mso.db.catalog.beans.VfModuleCustomization; +import org.openecomp.mso.db.catalog.beans.AllottedResourceCustomization; import org.openecomp.mso.db.catalog.beans.NetworkResourceCustomization; import org.openecomp.mso.db.catalog.beans.ServiceMacroHolder; -import org.openecomp.mso.db.catalog.beans.AllottedResourceCustomization; +import org.openecomp.mso.db.catalog.beans.ToscaCsar; +import org.openecomp.mso.db.catalog.beans.VfModuleCustomization; +import org.openecomp.mso.db.catalog.beans.VnfResourceCustomization; +import org.openecomp.mso.logger.MessageEnum; +import org.openecomp.mso.logger.MsoLogger; /** * This class services calls to the REST interface for VF Modules (http://host:port/ecomp/mso/catalog/v1) @@ -466,4 +469,50 @@ public class CatalogDbAdapterRest { } } + /** + * Get the tosca csar info from catalog + * <br> + * + * @param smUuid service model uuid + * @return the tosca csar information of the serivce. + * @since ONAP Beijing Release + */ + @GET + @Path("serviceToscaCsar") + @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) + public Response ServiceToscaCsar(@QueryParam("serviceModelUuid") String smUuid) { + int respStatus = HttpStatus.SC_OK; + CatalogDatabase db = CatalogDatabase.getInstance(); + String entity = ""; + try{ + if(smUuid != null && !"".equals(smUuid)){ + LOGGER.debug ("Query Csar by service model uuid: " + smUuid); + ToscaCsar toscaCsar = db.getToscaCsarByServiceModelUUID(smUuid); + if(toscaCsar != null){ + QueryServiceCsar serviceCsar = new QueryServiceCsar(toscaCsar); + entity = serviceCsar.JSON2(false, false); + } + else{ + respStatus = HttpStatus.SC_NOT_FOUND; + } + }else{ + throw(new Exception("Incoming parameter is null or blank")); + } + LOGGER.debug ("Query Csar exit"); + return Response + .status(respStatus) + .entity(entity) + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .build(); + }catch(Exception e){ + LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, smUuid, "", "ServiceToscaCsar", MsoLogger.ErrorCode.BusinessProcesssError, "Exception during query csar by service model uuid: ", e); + CatalogQueryException excResp = new CatalogQueryException(e.getMessage(), CatalogQueryExceptionCategory.INTERNAL, Boolean.FALSE, null); + return Response + .status(HttpStatus.SC_INTERNAL_SERVER_ERROR) + .entity(new GenericEntity<CatalogQueryException>(excResp) {}) + .build(); + }finally { + db.close(); + } + } } diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/CatalogQuery.java b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/CatalogQuery.java index a74cf07b89..4a8233bb03 100644 --- a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/CatalogQuery.java +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/CatalogQuery.java @@ -46,21 +46,21 @@ public abstract class CatalogQuery { } protected String setTemplate(String template, Map<String, String> valueMap) { - LOGGER.debug ("CatalogQuery setTemplate"); + LOGGER.debug("CatalogQuery setTemplate"); StringBuffer result = new StringBuffer(); String pattern = "<.*>"; Pattern r = Pattern.compile(pattern); Matcher m = r.matcher(template); - LOGGER.debug ("CatalogQuery template:"+ template); - while(m.find()) { - String key = template.substring(m.start()+1, m.end()-1); - LOGGER.debug ("CatalogQuery key:"+ key+ " contains key? "+ valueMap.containsKey(key)); - m.appendReplacement(result, valueMap.containsKey(key)? valueMap.get(key): "\"TBD\""); + LOGGER.debug("CatalogQuery template:" + template); + while (m.find()) { + String key = template.substring(m.start() + 1, m.end() - 1); + LOGGER.debug("CatalogQuery key:" + key + " contains key? " + valueMap.containsKey(key)); + m.appendReplacement(result, valueMap.getOrDefault(key, "\"TBD\"")); } m.appendTail(result); - LOGGER.debug ("CatalogQuery return:"+ result.toString()); + LOGGER.debug("CatalogQuery return:" + result.toString()); return result.toString(); } diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryAllottedResourceCustomization.java b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryAllottedResourceCustomization.java index 9a82ed2c6e..f7758c315c 100644 --- a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryAllottedResourceCustomization.java +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryAllottedResourceCustomization.java @@ -62,30 +62,30 @@ public class QueryAllottedResourceCustomization extends CatalogQuery { @Override public String toString () { - StringBuilder buf = new StringBuilder(); + StringBuilder sb = new StringBuilder(); boolean first = true; int i = 1; for (AllottedResourceCustomization o : allottedResourceCustomization) { - buf.append(i+"\t"); - if (!first) buf.append("\n"); first = false; - buf.append(o); + sb.append(i).append("\t"); + if (!first) sb.append("\n"); first = false; + sb.append(o); } - return buf.toString(); + return sb.toString(); } @Override public String JSON2(boolean isArray, boolean isEmbed) { - StringBuilder buf = new StringBuilder(); - if (!isEmbed && isArray) buf.append("{ "); - if (isArray) buf.append("\"serviceAllottedResources\": ["); + StringBuilder sb = new StringBuilder(); + if (!isEmbed && isArray) sb.append("{ "); + if (isArray) sb.append("\"serviceAllottedResources\": ["); Map<String, String> valueMap = new HashMap<>(); String sep = ""; boolean first = true; if (this.allottedResourceCustomization != null) { for (AllottedResourceCustomization o : allottedResourceCustomization) { - if (first) buf.append("\n"); first = false; + if (first) sb.append("\n"); first = false; boolean arNull = o.getAllottedResource() == null ? true : false; @@ -104,14 +104,14 @@ public class QueryAllottedResourceCustomization extends CatalogQuery { put(valueMap, "NF_NAMING_CODE", o.getNfNamingCode()); put(valueMap, "PROVIDING_SERVICE_MODEL_INVARIANT_UUID", o.getProvidingServiceModelInvariantUuid()); - buf.append(sep+ this.setTemplate(template, valueMap)); + sb.append(sep).append(this.setTemplate(template, valueMap)); sep = ",\n"; } } - if (!first) buf.append("\n"); - if (isArray) buf.append("]"); - if (!isEmbed && isArray) buf.append("}"); - return buf.toString(); + if (!first) sb.append("\n"); + if (isArray) sb.append("]"); + if (!isEmbed && isArray) sb.append("}"); + return sb.toString(); } } diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryServiceCsar.java b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryServiceCsar.java new file mode 100644 index 0000000000..6b1eb836d9 --- /dev/null +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryServiceCsar.java @@ -0,0 +1,72 @@ +/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.adapters.catalogdb.catalogrest;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.openecomp.mso.db.catalog.beans.ToscaCsar;
+
+/**
+ * serivce csar query support
+ * <br>
+ * <p>
+ * </p>
+ *
+ * @author
+ * @version ONAP Beijing Release 2018-02-28
+ */
+public class QueryServiceCsar extends CatalogQuery{
+
+ private ToscaCsar toscaCsar;
+
+ public QueryServiceCsar(ToscaCsar toscaCsar){
+ this.toscaCsar = toscaCsar;
+ }
+
+ private final String template =
+ "\t{\n"+
+ "\t\t\"artifactUUID\" : <ARTIFACT_UUID>,\n"+
+ "\t\t\"name\" : <NAME>,\n"+
+ "\t\t\"version\" : <VERSION>,\n"+
+ "\t\t\"artifactChecksum\" : <ARTIFACT_CHECK_SUM>,\n"+
+ "\t\t\"url\" : <URL>,\n"+
+ "\t\t\"description\" : <DESCRIPTION>\n"+
+ "\t}";
+
+ @Override
+ public String toString() {
+
+ return toscaCsar.toString();
+ }
+
+ @Override
+ public String JSON2(boolean isArray, boolean isEmbed) {
+ Map<String, String> valueMap = new HashMap<>();
+ put(valueMap, "ARTIFACT_UUID", null == toscaCsar ? null : toscaCsar.getArtifactUUID());
+ put(valueMap, "NAME", null == toscaCsar ? null : toscaCsar.getName());
+ put(valueMap, "VERSION", null == toscaCsar ? null : toscaCsar.getVersion());
+ put(valueMap, "ARTIFACT_CHECK_SUM", null == toscaCsar ? null : toscaCsar.getArtifactChecksum());
+ put(valueMap, "URL", null == toscaCsar ? null : toscaCsar.getUrl());
+ put(valueMap, "DESCRIPTION", null == toscaCsar ? null : toscaCsar.getDescription());
+ return this.setTemplate(template, valueMap);
+ }
+
+}
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryServiceNetworks.java b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryServiceNetworks.java index 59c601ef19..c04068d680 100644 --- a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryServiceNetworks.java +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryServiceNetworks.java @@ -67,30 +67,30 @@ public class QueryServiceNetworks extends CatalogQuery { @Override public String toString () { - StringBuilder buf = new StringBuilder(); + StringBuilder sb = new StringBuilder(); boolean first = true; int i = 1; for (NetworkResourceCustomization o : serviceNetworks) { - buf.append(i+"\t"); - if (!first) buf.append("\n"); first = false; - buf.append(o); + sb.append(i).append("\t"); + if (!first) sb.append("\n"); first = false; + sb.append(o); } - return buf.toString(); + return sb.toString(); } @Override public String JSON2(boolean isArray, boolean isEmbed) { - StringBuilder buf = new StringBuilder(); - if (!isEmbed && isArray) buf.append("{ "); - if (isArray) buf.append("\"serviceNetworks\": ["); - //if (isArray) buf.append("["); + StringBuilder sb = new StringBuilder(); + if (!isEmbed && isArray) sb.append("{ "); + if (isArray) sb.append("\"serviceNetworks\": ["); + Map<String, String> valueMap = new HashMap<>(); String sep = ""; boolean first = true; for (NetworkResourceCustomization o : serviceNetworks) { - if (first) buf.append("\n"); first = false; + if (first) sb.append("\n"); first = false; boolean nrNull = o.getNetworkResource() == null ? true : false; put(valueMap, "MODEL_NAME", nrNull ? null : o.getNetworkResource().getModelName()); put(valueMap, "MODEL_UUID", nrNull ? null : o.getNetworkResource().getModelUUID()); @@ -104,12 +104,12 @@ public class QueryServiceNetworks extends CatalogQuery { put(valueMap, "NETWORK_SCOPE", o.getNetworkScope()); put(valueMap, "NETWORK_TECHNOLOGY", o.getNetworkTechnology()); - buf.append(sep+ this.setTemplate(template, valueMap)); + sb.append(sep).append(this.setTemplate(template, valueMap)); sep = ",\n"; } - if (!first) buf.append("\n"); - if (isArray) buf.append("]"); - if (!isEmbed && isArray) buf.append("}"); - return buf.toString(); + if (!first) sb.append("\n"); + if (isArray) sb.append("]"); + if (!isEmbed && isArray) sb.append("}"); + return sb.toString(); } } diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryServiceVnfs.java b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryServiceVnfs.java index cfbb781ae8..f0d4327950 100644 --- a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryServiceVnfs.java +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryServiceVnfs.java @@ -72,29 +72,29 @@ public class QueryServiceVnfs extends CatalogQuery { @Override public String toString () { - StringBuilder buf = new StringBuilder(); + StringBuilder sb = new StringBuilder(); boolean first = true; int i = 1; for (VnfResourceCustomization o : serviceVnfs) { - buf.append(i+"\t"); - if (!first) buf.append("\n"); first = false; - buf.append(o); + sb.append(i).append("\t"); + if (!first) sb.append("\n"); first = false; + sb.append(o); } - return buf.toString(); + return sb.toString(); } @Override public String JSON2(boolean isArray, boolean isEmbed) { - StringBuilder buf = new StringBuilder(); - if (!isEmbed && isArray) buf.append("{ "); - if (isArray) buf.append("\"serviceVnfs\": ["); + StringBuilder sb = new StringBuilder(); + if (!isEmbed && isArray) sb.append("{ "); + if (isArray) sb.append("\"serviceVnfs\": ["); Map<String, String> valueMap = new HashMap<>(); String sep = ""; boolean first = true; for (VnfResourceCustomization o : serviceVnfs) { - if (first) buf.append("\n"); first = false; + if (first) sb.append("\n"); first = false; boolean vrNull = o.getVnfResource() == null ? true : false; @@ -113,12 +113,12 @@ public class QueryServiceVnfs extends CatalogQuery { String subitem = new QueryVfModule(vrNull ? null : o.getVfModuleCustomizations()).JSON2(true, true); valueMap.put("_VFMODULES_", subitem.replaceAll("(?m)^", "\t\t")); - buf.append(sep+ this.setTemplate(template, valueMap)); + sb.append(sep).append(this.setTemplate(template, valueMap)); sep = ",\n"; } - if (!first) buf.append("\n"); - if (isArray) buf.append("]"); - if (!isEmbed && isArray) buf.append("}"); - return buf.toString(); + if (!first) sb.append("\n"); + if (isArray) sb.append("]"); + if (!isEmbed && isArray) sb.append("}"); + return sb.toString(); } } diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryVfModule.java b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryVfModule.java index cb6ba1b3f6..fe0f0cbc17 100644 --- a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryVfModule.java +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryVfModule.java @@ -69,28 +69,28 @@ public class QueryVfModule extends CatalogQuery { @Override public String toString () { - StringBuilder buf = new StringBuilder(); + StringBuilder sb = new StringBuilder(); boolean first = true; int i = 1; for (VfModuleCustomization o : vfModules) { - buf.append(i+"\t"); - if (!first) buf.append("\n"); first = false; - buf.append(o); + sb.append(i).append("\t"); + if (!first) sb.append("\n"); first = false; + sb.append(o); } - return buf.toString(); + return sb.toString(); } @Override public String JSON2(boolean isArray, boolean x) { - StringBuilder buf = new StringBuilder(); - if (isArray) buf.append("\"vfModules\": ["); + StringBuilder sb = new StringBuilder(); + if (isArray) sb.append("\"vfModules\": ["); Map<String, String> valueMap = new HashMap<>(); String sep = ""; boolean first = true; for (VfModuleCustomization o : vfModules) { - if (first) buf.append("\n"); first = false; + if (first) sb.append("\n"); first = false; boolean vfNull = o.getVfModule() == null ? true : false; boolean hasVolumeGroup = false; @@ -104,16 +104,16 @@ public class QueryVfModule extends CatalogQuery { put(valueMap, "MODEL_INVARIANT_ID", vfNull ? null : o.getVfModule().getModelInvariantUuid()); put(valueMap, "MODEL_VERSION", vfNull ? null : o.getVfModule().getVersion()); put(valueMap, "MODEL_CUSTOMIZATION_UUID", o.getModelCustomizationUuid()); - put(valueMap, "IS_BASE", vfNull ? false : Boolean.valueOf(o.getVfModule().isBase() ? true : false)); + put(valueMap, "IS_BASE", vfNull ? false : o.getVfModule().isBase() ? true : false); put(valueMap, "VF_MODULE_LABEL", o.getLabel()); put(valueMap, "INITIAL_COUNT", o.getInitialCount()); - put(valueMap, "HAS_VOLUME_GROUP", Boolean.valueOf(hasVolumeGroup)); + put(valueMap, "HAS_VOLUME_GROUP", hasVolumeGroup); - buf.append(sep+ this.setTemplate(template, valueMap)); + sb.append(sep).append(this.setTemplate(template, valueMap)); sep = ",\n"; } - if (!first) buf.append("\n"); - if (isArray) buf.append("]"); - return buf.toString(); + if (!first) sb.append("\n"); + if (isArray) sb.append("]"); + return sb.toString(); } } diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryVfModules.java b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryVfModules.java index ff713991f9..00a5cafb29 100644 --- a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryVfModules.java +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryVfModules.java @@ -58,17 +58,17 @@ public class QueryVfModules { @Override public String toString () { - StringBuilder buf = new StringBuilder(); + StringBuilder sb = new StringBuilder(); boolean first = true; int i = 1; for (VfModule o : vfModules) { - buf.append(i+"\t"); - if (!first) buf.append("\n"); + sb.append(i).append("\t"); + if (!first) sb.append("\n"); first = false; - buf.append(o); + sb.append(o); } - return buf.toString(); + return sb.toString(); } public String toJsonString() { diff --git a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapterImpl.java b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapterImpl.java index f050882586..82684bd43e 100644 --- a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapterImpl.java +++ b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapterImpl.java @@ -1747,20 +1747,20 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { stackParams.put (VLANS, csl); } if (routeTargets != null && !routeTargets.isEmpty()) { - StringBuilder buf = new StringBuilder (); + StringBuilder sb = new StringBuilder (); String sep = ""; for (String rt : routeTargets) { if (!isNullOrEmpty(rt)) { if (aic3template) - buf.append (sep).append ("target:" + rt); + sb.append(sep).append("target:").append(rt); else - buf.append (sep).append (rt); + sb.append (sep).append (rt); sep = ","; } } - String csl = buf.toString (); + String csl = sb.toString (); stackParams.put ("route_targets", csl); } diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCRestClient.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCRestClient.java index 45d5944c7d..55a2156c50 100644 --- a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCRestClient.java +++ b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCRestClient.java @@ -142,7 +142,7 @@ public class SDNCRestClient implements Runnable { DataOutputStream out = null; BufferedReader in = null; SDNCResponse sdncResp = new SDNCResponse(rt.getReqId()); - StringBuffer response = new StringBuffer(); + StringBuilder response = new StringBuilder(); msoLogger.info(MessageEnum.RA_SEND_REQUEST_SDNC, rt.toString(), "SDNC", ""); msoLogger.debug("SDNC Request Body:\n" + sdncReqBody); diff --git a/adapters/mso-sdnc-adapter/src/test/java/org/openecomp/mso/adapters/sdnc/client/CallbackHeaderTest.java b/adapters/mso-sdnc-adapter/src/test/java/org/openecomp/mso/adapters/sdnc/client/CallbackHeaderTest.java new file mode 100644 index 0000000000..88d2b950b9 --- /dev/null +++ b/adapters/mso-sdnc-adapter/src/test/java/org/openecomp/mso/adapters/sdnc/client/CallbackHeaderTest.java @@ -0,0 +1,47 @@ +/* +* ============LICENSE_START======================================================= +* ONAP : SO +* ================================================================================ +* Copyright 2018 TechMahindra +*================================================================================= +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* ============LICENSE_END========================================================= +*/ + +package org.openecomp.mso.adapters.sdnc.client; + +import org.junit.Test; +import org.openecomp.mso.adapters.sdnc.client.CallbackHeader; + +public class CallbackHeaderTest { + + static CallbackHeader cb = new CallbackHeader(); + + @Test + public final void testCallbackHeader() { + cb.setRequestId("413658f4-7f42-482e-b834-23a5c15657da-1474471336781"); + cb.setResponseCode("200"); + cb.setResponseMessage("OK"); + assert (cb.getRequestId() != null); + assert (cb.getResponseCode() != null); + assert (cb.getResponseMessage() != null); + assert (cb.getRequestId().equals("413658f4-7f42-482e-b834-23a5c15657da-1474471336781")); + assert (cb.getResponseCode().equals("200")); + assert (cb.getResponseMessage().equals("OK")); + } + + @Test + public void testtoString() { + assert (cb.toString() != null); + } +} diff --git a/adapters/mso-sdnc-adapter/src/test/java/org/openecomp/mso/adapters/sdnc/client/SDNCAdapterCallbackRequestTest.java b/adapters/mso-sdnc-adapter/src/test/java/org/openecomp/mso/adapters/sdnc/client/SDNCAdapterCallbackRequestTest.java new file mode 100644 index 0000000000..63aa49cf54 --- /dev/null +++ b/adapters/mso-sdnc-adapter/src/test/java/org/openecomp/mso/adapters/sdnc/client/SDNCAdapterCallbackRequestTest.java @@ -0,0 +1,53 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + + +package org.openecomp.mso.adapters.sdnc.client; + +import org.junit.Test; +import org.openecomp.mso.adapters.sdnc.client.CallbackHeader; +import org.openecomp.mso.adapters.sdnc.client.SDNCAdapterCallbackRequest; + +public class SDNCAdapterCallbackRequestTest { + + static SDNCAdapterCallbackRequest sdc = new SDNCAdapterCallbackRequest(); + static CallbackHeader ch = new CallbackHeader("413658f4-7f42-482e-b834-23a5c15657da-1474471336781","200","OK"); + + @Test + public void testSDNCAdapterCallbackRequest() + { + sdc.setCallbackHeader(ch); + sdc.setRequestData("data"); + assert(sdc.getCallbackHeader()!=null); + assert(sdc.getRequestData()!=null); + assert(sdc.getCallbackHeader().equals(ch)); + assert(sdc.getRequestData().equals("data")); + + } + + @Test + public void testtoString() + { + assert(ch.toString()!=null); + } + +} + + diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java index a292c76825..95e62a0e2d 100644 --- a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java +++ b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java @@ -465,7 +465,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { private boolean callHeatbridge(String heatStackId) { String executionDir = "/usr/local/lib/python2.7/dist-packages/heatbridge"; String openstackIdentityUrl = "", username = "", password = "", tenant = "", region = "", owner = ""; - long waitTimeMs = 10000l; + long waitTimeMs = 10000L; try { String[] cmdarray = {"/usr/bin/python", "HeatBridgeMain.py", openstackIdentityUrl, username, password, tenant, region, owner, heatStackId}; String[] envp = null; @@ -508,7 +508,8 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { LOGGER.debug("Exception :",e); outputString = "Unable to call toString() on the value for " + str; } - sb.append("\t\nitem " + i++ + ": '" + str + "'='" + outputString + "'"); + sb.append("\t\nitem ").append(i++).append(": '").append(str).append("'='").append(outputString) + .append("'"); } } LOGGER.debug(sb.toString()); @@ -524,7 +525,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { sb.append("\tEMPTY"); } else { for (String str : inputs.keySet()) { - sb.append("\titem " + i++ + ": " + str + "=" + inputs.get(str)); + sb.append("\titem ").append(i++).append(": ").append(str).append("=").append(inputs.get(str)); } } LOGGER.debug(sb.toString()); @@ -1224,7 +1225,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { int cntr = 0; try { for (HeatTemplateParam htp : heatTemplate.getParameters()) { - sb.append("param[" + cntr++ + "]=" + htp.getParamName()); + sb.append("param[").append(cntr++).append("]=").append(htp.getParamName()); parameterNames.add(htp.getParamName()); if (htp.getParamAlias() != null && !"".equals(htp.getParamAlias())) { aliasToParam.put(htp.getParamAlias(), htp.getParamName()); @@ -1443,16 +1444,16 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { StringBuilder sbInit = new StringBuilder(); sbInit.append("updateVfModule: \n"); - sbInit.append("cloudSiteId=" + cloudSiteId + "\n"); - sbInit.append("tenantId=" + tenantId + "\n"); - sbInit.append("vnfType=" + vnfType + "\n"); - sbInit.append("vnfVersion=" + vnfVersion + "\n"); - sbInit.append("vnfName=" + vnfName + "\n"); - sbInit.append("requestType=" + requestType + "\n"); - sbInit.append("volumeGroupHeatStackId=" + volumeGroupHeatStackId + "\n"); - sbInit.append("baseVfHeatStackId=" + baseVfHeatStackId + "\n"); - sbInit.append("vfModuleStackId=" + vfModuleStackId + "\n"); - sbInit.append("modelCustomizationUuid=" + modelCustomizationUuid + "\n"); + sbInit.append("cloudSiteId=").append(cloudSiteId).append("\n"); + sbInit.append("tenantId=").append(tenantId).append("\n"); + sbInit.append("vnfType=").append(vnfType).append("\n"); + sbInit.append("vnfVersion=").append(vnfVersion).append("\n"); + sbInit.append("vnfName=").append(vnfName).append("\n"); + sbInit.append("requestType=").append(requestType).append("\n"); + sbInit.append("volumeGroupHeatStackId=").append(volumeGroupHeatStackId).append("\n"); + sbInit.append("baseVfHeatStackId=").append(baseVfHeatStackId).append("\n"); + sbInit.append("vfModuleStackId=").append(vfModuleStackId).append("\n"); + sbInit.append("modelCustomizationUuid=").append(modelCustomizationUuid).append("\n"); LOGGER.debug(sbInit.toString()); String mcu = modelCustomizationUuid; diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/vdu/utils/VduBlueprintTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/vdu/utils/VduBlueprintTest.java new file mode 100644 index 0000000000..21a71ccf61 --- /dev/null +++ b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/vdu/utils/VduBlueprintTest.java @@ -0,0 +1,81 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2018 TechMahindra + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.mso.vdu.utils; + +import static org.junit.Assert.*; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Before; +import org.junit.Test; +import org.openecomp.mso.vdu.utils.VduBlueprint; + +import org.junit.Assert; + +public class VduBlueprintTest { + + private VduBlueprint vduBlueprint; + + private Map<String, byte[]> templateFiles; + private Map<String, byte[]> attachedFiles; + + @Before + public void setUp() { + vduBlueprint = new VduBlueprint(); + } + + @Test + public void testGetVduModelId() { + vduBlueprint.setVduModelId("vduModelId"); + Assert.assertNotNull(vduBlueprint.getVduModelId()); + Assert.assertEquals(vduBlueprint.getVduModelId(), "vduModelId"); + } + + @Test + public void testGetMainTemplateName() { + vduBlueprint.setMainTemplateName("MainTemplateName"); + Assert.assertNotNull(vduBlueprint.getMainTemplateName()); + Assert.assertEquals(vduBlueprint.getMainTemplateName(), "MainTemplateName"); + } + + @Test + public void testGetTemplateFiles() { + byte[] templateFileData = "some template file data".getBytes(); + templateFiles = new HashMap<String, byte[]>(); + templateFiles.put("templateKey1", templateFileData); + vduBlueprint.setTemplateFiles(templateFiles); + Assert.assertNotNull(vduBlueprint.getTemplateFiles()); + Assert.assertTrue(vduBlueprint.getTemplateFiles().containsKey("templateKey1")); + Assert.assertTrue(vduBlueprint.getTemplateFiles().containsValue(templateFileData)); + } + + @Test + public void testGetAttachedFiles() { + byte[] attachedFileData = "some file data".getBytes(); + attachedFiles = new HashMap<String, byte[]>(); + attachedFiles.put("attachedKey1", attachedFileData); + vduBlueprint.setAttachedFiles(attachedFiles); + Assert.assertNotNull(vduBlueprint.getAttachedFiles()); + Assert.assertTrue(vduBlueprint.getAttachedFiles().containsKey("attachedKey1")); + Assert.assertTrue(vduBlueprint.getAttachedFiles().containsValue(attachedFileData)); + } +} diff --git a/aria/pom.xml b/aria/pom.xml new file mode 100644 index 0000000000..a754d78ed1 --- /dev/null +++ b/aria/pom.xml @@ -0,0 +1,21 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.onap.so</groupId> + <artifactId>so</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + + <groupId>org.onap.so</groupId> + <artifactId>aria</artifactId> + <name>ARIA related artifacts</name> + <description>ARIA related artifacts</description> + <packaging>pom</packaging> + + <modules> + <module>aria-rest-java-client</module> + <module>aria-rest-server</module> + <!-- <module>multivim-plugin</module> --> + </modules> +</project> diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/client/ASDCGlobalController.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/client/ASDCGlobalController.java index c0056e0573..251888e9e2 100644 --- a/asdc-controller/src/main/java/org/openecomp/mso/asdc/client/ASDCGlobalController.java +++ b/asdc-controller/src/main/java/org/openecomp/mso/asdc/client/ASDCGlobalController.java @@ -49,7 +49,7 @@ public class ASDCGlobalController { List<String> controllerNames = ASDCConfiguration.getAllDefinedControllers(); - StringBuffer controllerListLog = new StringBuffer("List of controllers loaded:"); + StringBuilder controllerListLog = new StringBuilder("List of controllers loaded:"); for (String controllerName : controllerNames) { controllers.put(controllerName, new ASDCController(controllerName)); controllerListLog.append(controllerName); diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/ASDCElementInfo.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/ASDCElementInfo.java index 3c262c6c90..29144a9884 100644 --- a/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/ASDCElementInfo.java +++ b/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/ASDCElementInfo.java @@ -109,7 +109,7 @@ public class ASDCElementInfo { */ @Override public final String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); List<String> aggregatedElements = new ArrayList<>(); for (Entry<String, String> entry : this.getElementInfoMap().entrySet()) { aggregatedElements.add(entry.getKey() + ": " + entry.getValue()); diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/BigDecimalVersion.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/BigDecimalVersion.java index 5547bb1189..c2faf1c0e8 100644 --- a/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/BigDecimalVersion.java +++ b/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/BigDecimalVersion.java @@ -34,7 +34,7 @@ public class BigDecimalVersion { public static BigDecimal castAndCheckNotificationVersion(String version) { // Truncate the version if bad type String[] splitVersion = version.split("\\."); - StringBuffer newVersion = new StringBuffer(); + StringBuilder newVersion = new StringBuilder(); if (splitVersion.length > 1) { newVersion.append(splitVersion[0]); newVersion.append("."); diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/ToscaResourceInstaller.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/ToscaResourceInstaller.java index b998be9a69..f22debce1e 100644 --- a/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/ToscaResourceInstaller.java +++ b/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/ToscaResourceInstaller.java @@ -636,7 +636,7 @@ public class ToscaResourceInstaller {// implements IVfResourceInstaller { return body;
}
- StringBuffer sb = new StringBuffer(body.length());
+ StringBuilder sb = new StringBuilder(body.length());
int currentIndex = 0;
int startIndex = 0;
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/VfResourceInstaller.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/VfResourceInstaller.java index bd20eb0bf1..0ae58dad41 100644 --- a/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/VfResourceInstaller.java +++ b/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/VfResourceInstaller.java @@ -631,7 +631,7 @@ public class VfResourceInstaller implements IVfResourceInstaller { return body; } - StringBuffer sb = new StringBuffer(body.length()); + StringBuilder sb = new StringBuilder(body.length()); int currentIndex = 0; int startIndex = 0; diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/ASDCNotificationLogging.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/ASDCNotificationLogging.java index 28f5dbdee5..2080be137c 100644 --- a/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/ASDCNotificationLogging.java +++ b/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/ASDCNotificationLogging.java @@ -42,7 +42,7 @@ public class ASDCNotificationLogging { if (asdcNotification == null) { return "NULL"; } - StringBuffer buffer = new StringBuffer("ASDC Notification:"); + StringBuilder buffer = new StringBuilder("ASDC Notification:"); buffer.append(System.lineSeparator()); buffer.append("DistributionID:"); @@ -96,7 +96,7 @@ public class ASDCNotificationLogging { } - StringBuffer buffer = new StringBuffer("CSAR Notification:"); + StringBuilder buffer = new StringBuilder("CSAR Notification:"); buffer.append(System.lineSeparator()); buffer.append(System.lineSeparator()); @@ -286,7 +286,7 @@ public class ASDCNotificationLogging { return null; } - StringBuffer buffer = new StringBuffer("VfModuleMetaData List:"); + StringBuilder buffer = new StringBuilder("VfModuleMetaData List:"); buffer.append(System.lineSeparator()); buffer.append("{"); @@ -311,71 +311,71 @@ public class ASDCNotificationLogging { return "NULL"; } - StringBuffer buffer = new StringBuffer("VfModuleMetaData:"); - buffer.append(System.lineSeparator()); + StringBuilder stringBuilder = new StringBuilder("VfModuleMetaData:"); + stringBuilder.append(System.lineSeparator()); - buffer.append("VfModuleModelName:"); - buffer.append(testNull(moduleMetaData.getVfModuleModelName())); - buffer.append(System.lineSeparator()); + stringBuilder.append("VfModuleModelName:"); + stringBuilder.append(testNull(moduleMetaData.getVfModuleModelName())); + stringBuilder.append(System.lineSeparator()); - buffer.append("VfModuleModelVersion:"); - buffer.append(testNull(moduleMetaData.getVfModuleModelVersion())); - buffer.append(System.lineSeparator()); + stringBuilder.append("VfModuleModelVersion:"); + stringBuilder.append(testNull(moduleMetaData.getVfModuleModelVersion())); + stringBuilder.append(System.lineSeparator()); - buffer.append("VfModuleModelUUID:"); - buffer.append(testNull(moduleMetaData.getVfModuleModelUUID())); - buffer.append(System.lineSeparator()); + stringBuilder.append("VfModuleModelUUID:"); + stringBuilder.append(testNull(moduleMetaData.getVfModuleModelUUID())); + stringBuilder.append(System.lineSeparator()); - buffer.append("VfModuleModelInvariantUUID:"); - buffer.append(testNull(moduleMetaData.getVfModuleModelInvariantUUID())); - buffer.append(System.lineSeparator()); + stringBuilder.append("VfModuleModelInvariantUUID:"); + stringBuilder.append(testNull(moduleMetaData.getVfModuleModelInvariantUUID())); + stringBuilder.append(System.lineSeparator()); - buffer.append("VfModuleModelDescription:"); - buffer.append(testNull(moduleMetaData.getVfModuleModelDescription())); - buffer.append(System.lineSeparator()); + stringBuilder.append("VfModuleModelDescription:"); + stringBuilder.append(testNull(moduleMetaData.getVfModuleModelDescription())); + stringBuilder.append(System.lineSeparator()); - buffer.append("Artifacts UUID List:"); + stringBuilder.append("Artifacts UUID List:"); if (moduleMetaData.getArtifacts() != null) { - buffer.append("{"); + stringBuilder.append("{"); for (String artifactUUID:moduleMetaData.getArtifacts()) { - buffer.append(System.lineSeparator()); - buffer.append(testNull(artifactUUID)); - buffer.append(System.lineSeparator()); - buffer.append(","); + stringBuilder.append(System.lineSeparator()); + stringBuilder.append(testNull(artifactUUID)); + stringBuilder.append(System.lineSeparator()); + stringBuilder.append(","); } - buffer.replace(buffer.length()-1,buffer.length(), System.lineSeparator()); - buffer.append("}"); - buffer.append(System.lineSeparator()); + stringBuilder.replace(stringBuilder.length()-1,stringBuilder.length(), System.lineSeparator()); + stringBuilder.append("}"); + stringBuilder.append(System.lineSeparator()); } else { - buffer.append("NULL"); + stringBuilder.append("NULL"); } if (moduleMetaData.getProperties() != null) { Map<String, String> vfModuleMap = moduleMetaData.getProperties(); - buffer.append("Properties List:"); - buffer.append("{"); + stringBuilder.append("Properties List:"); + stringBuilder.append("{"); for (Map.Entry<String, String> entry : vfModuleMap.entrySet()) { - buffer.append(System.lineSeparator()); - buffer.append(" " + entry.getKey() + " : " + entry.getValue()); + stringBuilder.append(System.lineSeparator()); + stringBuilder.append(" ").append(entry.getKey()).append(" : ").append(entry.getValue()); } - buffer.replace(buffer.length()-1,buffer.length(), System.lineSeparator()); - buffer.append("}"); - buffer.append(System.lineSeparator()); + stringBuilder.replace(stringBuilder.length()-1,stringBuilder.length(), System.lineSeparator()); + stringBuilder.append("}"); + stringBuilder.append(System.lineSeparator()); } else { - buffer.append("NULL"); + stringBuilder.append("NULL"); } - buffer.append(System.lineSeparator()); + stringBuilder.append(System.lineSeparator()); - buffer.append("isBase:"); - buffer.append(moduleMetaData.isBase()); - buffer.append(System.lineSeparator()); + stringBuilder.append("isBase:"); + stringBuilder.append(moduleMetaData.isBase()); + stringBuilder.append(System.lineSeparator()); - return buffer.toString(); + return stringBuilder.toString(); } private static String testNull(Object object) { @@ -395,7 +395,7 @@ public class ASDCNotificationLogging { return null; } - StringBuffer buffer = new StringBuffer(); + StringBuilder buffer = new StringBuilder(); buffer.append("{"); for (IResourceInstance resourceInstanceElem:asdcNotification.getResources()) { @@ -418,7 +418,7 @@ public class ASDCNotificationLogging { return null; } - StringBuffer buffer = new StringBuffer("Resource Instance Info:"); + StringBuilder buffer = new StringBuilder("Resource Instance Info:"); buffer.append(System.lineSeparator()); buffer.append("ResourceInstanceName:"); @@ -473,7 +473,7 @@ public class ASDCNotificationLogging { return null; } - StringBuffer buffer = new StringBuffer(); + StringBuilder buffer = new StringBuilder(); buffer.append("{"); for (IArtifactInfo artifactInfoElem:artifactsList) { buffer.append(System.lineSeparator()); @@ -495,7 +495,7 @@ public class ASDCNotificationLogging { return null; } - StringBuffer buffer = new StringBuffer("Service Artifacts Info:"); + StringBuilder buffer = new StringBuilder("Service Artifacts Info:"); buffer.append(System.lineSeparator()); buffer.append("ArtifactName:"); diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/NotificationLogging.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/NotificationLogging.java index 9b38a50daf..bbf8fe6f8c 100644 --- a/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/NotificationLogging.java +++ b/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/NotificationLogging.java @@ -82,7 +82,7 @@ public class NotificationLogging implements InvocationHandler { return "EMPTY"; // No declared methods in this class !!! } - StringBuffer buffer = new StringBuffer("ASDC Notification:"); + StringBuilder buffer = new StringBuilder("ASDC Notification:"); buffer.append(System.lineSeparator()); for (Method m : declaredMethods) { @@ -107,7 +107,7 @@ public class NotificationLogging implements InvocationHandler { return buffer.toString(); } - private static final boolean isGetter(Method method) { + private static boolean isGetter(Method method) { // Must start with a valid (and known) prefix boolean prefixFound = false; diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/YamlEditor.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/YamlEditor.java index f94e0a153b..a90fdeb8e6 100644 --- a/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/YamlEditor.java +++ b/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/YamlEditor.java @@ -82,12 +82,10 @@ public class YamlEditor { @SuppressWarnings("unchecked") Map <String, Object> resourceMap = (Map <String, Object>) yml.get ("resources"); - Iterator <Entry <String, Object>> it = resourceMap.entrySet ().iterator (); - while (it.hasNext ()) { - Map.Entry <String, Object> pair = it.next (); + for (Entry<String, Object> pair : resourceMap.entrySet()) { @SuppressWarnings("unchecked") - Map <String, String> resourceEntry = (Map <String, String>) pair.getValue (); - typeList.add (resourceEntry.get ("type")); + Map<String, String> resourceEntry = (Map<String, String>) pair.getValue(); + typeList.add(resourceEntry.get("type")); } return typeList; } @@ -100,28 +98,27 @@ public class YamlEditor { Set <HeatTemplateParam> paramSet = new HashSet <HeatTemplateParam> (); @SuppressWarnings("unchecked") Map <String, Object> resourceMap = (Map <String, Object>) yml.get ("parameters"); - Iterator <Entry <String, Object>> it = resourceMap.entrySet ().iterator (); - while (it.hasNext ()) { - HeatTemplateParam param = new HeatTemplateParam (); - Map.Entry <String, Object> pair = it.next (); + for (Entry<String, Object> stringObjectEntry : resourceMap.entrySet()) { + HeatTemplateParam param = new HeatTemplateParam(); + Entry<String, Object> pair = stringObjectEntry; @SuppressWarnings("unchecked") - Map <String, String> resourceEntry = (Map <String, String>) pair.getValue (); - - param.setParamName (pair.getKey ()); + Map<String, String> resourceEntry = (Map<String, String>) pair.getValue(); + + param.setParamName(pair.getKey()); // System.out.println(pair.getKey()+":"+type); if (resourceEntry.containsKey("default")) { - param.setRequired (false); + param.setRequired(false); } else { - param.setRequired (true); + param.setRequired(true); } // Now set the type - String value = resourceEntry.get ("type"); - param.setParamType (value); - + String value = resourceEntry.get("type"); + param.setParamType(value); + param.setHeatTemplateArtifactUuid(artifactUUID); - paramSet.add (param); + paramSet.add(param); } return paramSet; diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CatalogDbUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CatalogDbUtils.groovy index 50e761eb77..dd6e56acc7 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CatalogDbUtils.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CatalogDbUtils.groovy @@ -694,6 +694,49 @@ class CatalogDbUtils { return vnfsList
}
+ public JSONObject getServiceResourcesByServiceModelUuid(Execution execution, String serviceModelUuid) {
+ JSONObject resources = null
+ String endPoint = "/serviceResources?serviceModelUuid=" + UriUtils.encode(serviceModelUuid, "UTF-8")
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(execution, endPoint)
+
+ if (catalogDbResponse != null) {
+
+ resources = parseServiceResourcesJson(catalogDbResponse, "v1")
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return resources
+ }
+
+ public JSONObject getServiceResourcesByServiceModelUuid(Execution execution, String serviceModelUuid, String catalogUtilsVersion) {
+ JSONObject resources = null
+ String endPoint = "/serviceResources?serviceModelUuid=" + UriUtils.encode(serviceModelUuid, "UTF-8")
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(execution, endPoint)
+
+ if (catalogDbResponse != null) {
+ if (!catalogUtilsVersion.equals("v1")) {
+ resources = new JSONObject(catalogDbResponse)
+ }
+ else {
+ resources = parseServiceResourcesJson(catalogDbResponse, catalogUtilsVersion)
+ }
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return resources
+ }
+
+
public JSONObject getServiceResourcesByServiceModelInvariantUuid(Execution execution, String serviceModelInvariantUuid) {
JSONObject resources = null
String endPoint = "/serviceResources?serviceModelInvariantUuid=" + UriUtils.encode(serviceModelInvariantUuid, "UTF-8")
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/DecomposeService.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/DecomposeService.groovy index 2645ea3c02..8d855e9311 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/DecomposeService.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/DecomposeService.groovy @@ -77,6 +77,7 @@ public class DecomposeService extends AbstractServiceTaskProcessor { String serviceInstanceId = execution.getVariable("serviceInstanceId") String serviceModelInfo = execution.getVariable("serviceModelInfo") execution.setVariable("DDS_serviceModelInvariantId", jsonUtils.getJsonValue(serviceModelInfo, "modelInvariantUuid")) + execution.setVariable("DDS_serviceModelUuid", jsonUtils.getJsonValue(serviceModelInfo, "modelUuid")) execution.setVariable("DDS_modelVersion", jsonUtils.getJsonValue(serviceModelInfo, "modelVersion")) } catch (BpmnError e) { throw e; @@ -97,14 +98,16 @@ public class DecomposeService extends AbstractServiceTaskProcessor { // check for input String serviceModelInvariantId = execution.getVariable("DDS_serviceModelInvariantId") + String serviceModelUuid = execution.getVariable("DDS_serviceModelUuid") String modelVersion = execution.getVariable("DDS_modelVersion") utils.log("DEBUG", "serviceModelInvariantId: " + serviceModelInvariantId, isDebugEnabled) utils.log("DEBUG", "modelVersion: " + modelVersion, isDebugEnabled) JSONObject catalogDbResponse = null - - if (modelVersion != null && modelVersion.length() > 0) + if(serviceModelUuid != null && serviceModelUuid.length() > 0) + catalogDbResponse = catalogDbUtils.getServiceResourcesByServiceModelUuid(execution, serviceModelUuid, "v2") + else if (modelVersion != null && modelVersion.length() > 0) catalogDbResponse = catalogDbUtils.getServiceResourcesByServiceModelInvariantUuidAndServiceModelVersion(execution, serviceModelInvariantId, modelVersion, "v2") else catalogDbResponse = catalogDbUtils.getServiceResourcesByServiceModelInvariantUuid(execution, serviceModelInvariantId, "v2") diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/ExceptionUtil.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/ExceptionUtil.groovy index d97a304e16..121e0c8ccb 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/ExceptionUtil.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/ExceptionUtil.groovy @@ -1,398 +1,396 @@ -/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.mso.bpmn.common.scripts
-
-import static org.apache.commons.lang3.StringUtils.*
-
-import org.apache.commons.lang3.*
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
-import org.openecomp.mso.bpmn.core.WorkflowException
-
-/**
- * @version 1.0
- */
-class ExceptionUtil extends AbstractServiceTaskProcessor {
-
-
- /**
- * This error handling method maps an AAI Exception response to a
- * WorkflowException Object. It then sets the WorkflowException Object
- * on the execution as "WorkflowException".
- *
- * This method formats the exception from AAI into the WorkflowException's
- * errorMessage that CCD expects.
- *
- * @param execution the execution
- * @param response the aai exception
- */
- WorkflowException MapAAIExceptionToWorkflowException(String response, Execution execution)
- {
- def utils=new MsoUtils()
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- def prefix=execution.getVariable("prefix")
- def errorMsg = execution.getVariable(prefix+"ErrorResponse")
- utils.log("DEBUG","=========== Begin MapAAIExceptionToWorkflowException ===========",isDebugEnabled)
- String text = null
- def variables
- String errorCode = '5000'
- WorkflowException wfex
- utils.log("DEBUG","response: " + response, isDebugEnabled)
- try{
- try {
- //String msg = utils.getNodeXml(response, "Fault")
- variables = utils.getMultNodes(response, "variable")
- text = utils.getNodeText1(response, "text")
- } catch (Exception ex) {
- //Ignore the exception - cases include non xml payload
- utils.log("DEBUG","error mapping error, ignoring: " + ex,isDebugEnabled)
- }
-
- if(text != null) {
- if(variables.size()>=4){
- text = text.replaceFirst("%1", variables[0])
- text = text.replaceFirst("%2", variables[1])
- text = text.replaceFirst("%3", variables[2])
- text = text.replaceFirst("%4", variables[3])
- }
- String modifiedErrorMessage = 'Received error from A&AI (' + text +')'
- utils.log("DEBUG", "ModifiedErrorMessage " + modifiedErrorMessage, isDebugEnabled)
- // let $ModifiedErrorMessage := concat( 'Received error from A',$exceptionaai:ampersand,'AI (' ,functx:replace-multi($ErrorMessage,$from,$Variables ),')')
- buildWorkflowException(execution, 5000, modifiedErrorMessage)
-
- wfex = execution.getVariable("WorkflowException")
- utils.log("ERROR","Fault:"+ wfex)
- return wfex
- } else {
- try {
- errorCode = MapErrorCode(errorMsg)
- String mappedErrorMessage = MapErrorMessage(errorMsg, errorCode)
-
- int errorCodeInt = Integer.parseInt(errorCode)
- buildWorkflowException(execution, errorCodeInt, mappedErrorMessage)
-
- utils.log("DEBUG", "mappedErrorMessage " + mappedErrorMessage, isDebugEnabled)
- wfex = execution.getVariable("WorkflowException")
- utils.log("ERROR","Fault:"+ wfex, isDebugEnabled)
- return wfex
- } catch(Exception ex) {
- utils.log("DEBUG","error mapping error, return null: " + ex, isDebugEnabled)
- return null
-
- }
- }
- }catch(Exception e){
- utils.log("DEBUG", "Exception occured during MapAAIExceptionToWorkflowException: " + e, isDebugEnabled)
- buildWorkflowException(execution, 5000, "Error mapping AAI Response to WorkflowException")
- }
- }
-
- /**
- * This error handling method maps an AAI Exception response to a
- * WorkflowException Object. It then sets the WorkflowException Object
- * on the execution as "WorkflowException".
- *
- * This method takes the exact exception inside the <Fault> tags from AAI Response
- * and puts it into the WorkflowException's errorMessage.
- *
- * @param execution the execution
- * @param response the aai exception
- */
- WorkflowException MapAAIExceptionToWorkflowExceptionGeneric(Execution execution, String response, int resCode){
- def utils=new MsoUtils()
- def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("DEBUG", "Start MapAAIExceptionToWorkflowExceptionGeneric Process", isDebugLogEnabled)
-
- WorkflowException wfex
- try {
- if(utils.nodeExists(response, "Fault")){
- String fault = utils.getNodeXml(response, "Fault")
- fault = utils.removeXmlPreamble(fault)
- fault = fault.replace("<Fault>", "").replace("</Fault>", "")
- fault = fault.replaceAll("\\s+\\s+", "") // Removes extra white spaces
- buildWorkflowException(execution, resCode, fault)
- }else if(utils.nodeExists(response, "RESTFault")){
- String rFault = utils.getNodeXml(response, "RESTFault")
- buildWorkflowException(execution, resCode, rFault)
- }else{
- buildWorkflowException(execution, resCode, "Received a bad response from AAI")
- }
- } catch (Exception ex) {
- utils.log("DEBUG", "Exception Occured during MapAAIExceptionToWorkflowExceptionGeneric: " + ex, isDebugLogEnabled)
- buildWorkflowException(execution, resCode, "Internal Error - Occured in MapAAIExceptionToWorkflowExceptionGeneric")
-
- }
- utils.log("DEBUG", "Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugLogEnabled)
- utils.log("DEBUG", "Completed MapAAIExceptionToWorkflowExceptionGeneric Process", isDebugLogEnabled)
- }
-
- /**
- * This method takes a WorkflowException Object and builds
- * WorkflowException Xml. This method should only be used
- * for the purpose of sending a sync error response or for
- * creating a FalloutHandler request.
- *
- *@param - WorkflowException Object
- *
- *@return - String WorkflowException Xml
- *
- *
- */
- String buildErrorResponseXml(WorkflowException wfex) {
- String xml
- if(wfex != null){
- String mes = wfex.getErrorMessage()
- int code = wfex.getErrorCode()
- xml =
- """<aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>${mes}</aetgt:ErrorMessage>
- <aetgt:ErrorCode>${code}</aetgt:ErrorCode>
- </aetgt:WorkflowException>"""
-
- }else{
- xml =
- """<aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>Internal Error</aetgt:ErrorMessage>
- <aetgt:ErrorCode>2500</aetgt:ErrorCode>
- </aetgt:WorkflowException>"""
- }
- return xml
- }
-
- /*
- 5000 Received error from A&AI ($A&AI_ERROR) Asynchronous During orchestration of the recipe, A&AI returned an error. The error returned by A&AI is passed through in $A&AI_ERROR.
- 5010 Could not communicate with A&AI Asynchronous During orchestration of the recipe, a connection with A&AI could not be established.
- 5020 No response from A&AI Asynchronous During orchestration of the recipe, communication was established with A&AI, but no response was received within the configured timeout.
- */
- /**
- *
- * Utility Method for MapAAIExceptionToWorkflowException
- *
- *@param - String ErrorMessage
- *
- *@return - String ErrorCode
- *
- */
- private String MapErrorCode(String errorMessage)
- {
- if(errorMessage==null){
- return '5000'
- }
- errorMessage = errorMessage.toLowerCase();
- if(errorMessage.contains('timed out') || errorMessage.contains('timeout'))
- return '5020'
- else if (errorMessage.contains('connection'))
- return '5010'
- else
- return '5000'
- }
-
- /**
- *
- * Utility Method for MapAAIExceptionToWorkflowException
- *
- *@param - String ErrorMessage
- *@param - String ErrorCode
- *
- *@return - String ErrorMessage
- *
- */
- private String MapErrorMessage(String errorMessage, String errorCode)
- {
- if(errorMessage == null){
- errorMessage=""
- }
- if( errorCode.equals('5010')){
- return 'Could not communicate with A&AI'
- }else if (errorCode.equals('5020')){
- return 'No response from A&AI'
- }else{
- errorMessage = errorMessage.replace("&", "&").replace("<", "<").replace(">", ">")
- return 'Received error from A&AI (' +errorMessage +')'
- }
- }
-
- /**
- *
- * Utility Method for Mapping SDNC
- * Adapter Response Codes
- *
- *@param - String sdncResponseCode
- *
- *@return - String code
- *
- */
- String MapSDNCResponseCodeToErrorCode(String sdncResponseCode)
- {
- if (sdncResponseCode == '500') {
- return '5310'
- } else if ( sdncResponseCode == '408') {
- return '5320'
- } else if ( sdncResponseCode == '60010') {
- return '5350'
- } else {
- return '5300'
- }
- }
-
- /**
- * This error handling method builds a WorkflowException Object. It sets it on
- * the execution as "WorkflowException".
- *
- * @param execution the execution
- * @param errorCode the error code
- * @param errorMessage the error message
- */
- public void buildWorkflowException(Execution execution, int errorCode, String errorMessage) {
- MsoUtils utils = new MsoUtils()
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- String processKey = getProcessKey(execution);
- utils.log("DEBUG", "Building a WorkflowException for " + processKey, isDebugLogEnabled)
-
- WorkflowException exception = new WorkflowException(processKey, errorCode, errorMessage);
- execution.setVariable("WorkflowException", exception);
- utils.log("DEBUG", "Outgoing WorkflowException is " + exception, isDebugLogEnabled)
- }
-
- /**
- * This error handling method builds a WorkflowException Object and throws a
- * MSOWorkflowException. It throws a "MSOWorkflowException" BpmnError after
- * setting the WorkflowException Object on the execution as "WorkflowException".
- *
- * @param execution the execution
- * @param errorCode the error code
- * @param errorMessage the error message
- */
- public void buildAndThrowWorkflowException(Execution execution, int errorCode, String errorMessage) {
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- String processKey = getProcessKey(execution);
- utils.log("Building a WorkflowException for Subflow " + processKey, isDebugLogEnabled)
-
- WorkflowException exception = new WorkflowException(processKey, errorCode, errorMessage);
- execution.setVariable("WorkflowException", exception);
- utils.log("DEBUG", "Outgoing WorkflowException is " + exception, isDebugLogEnabled)
- utils.log("DEBUG", "Throwing MSOWorkflowException", isDebugLogEnabled)
- throw new BpmnError("MSOWorkflowException")
- }
-
- /**
- * This method is executed after an MSOWorkflowException is caught by a
- * subflow (during subflows "Error Handling Sub Process").
- * It ensures the WorkflowException variable is populated before ending the
- * subflow and also logs the subflows outgoing WorkflowException Variable.
- *
- * @param - execution
- *
- */
- public void processSubflowsBPMNException(Execution execution){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- String processKey = getProcessKey(execution)
- try{
- utils.log("DEBUG", "Started ProcessSubflowsBPMNException Method", isDebugEnabled)
- if(execution.getVariable("WorkflowException") == null){
- buildWorkflowException(execution, 2500, "Internal Error - Occured During " + processKey)
- }
-
- utils.log("DEBUG", processKey + " Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugEnabled)
- }catch(Exception e){
- utils.log("DEBUG", "Caught Exception during ProcessSubflowsBPMNException Method: " + e, isDebugEnabled)
- }
- utils.log("DEBUG", "Completed ProcessSubflowsBPMNException Method", isDebugEnabled)
- }
-
- /**
- * This method is executed after an MSOWorkflowException is caught by a
- * Mainflow. It builds and returns a FalloutHandler Request. It also
- * verifies the WorkflowException variable is populated.
- *
- * @param - execution
- * @param - requestInfo
- *
- * @return - falloutHandlerRequest
- *
- */
- public String processMainflowsBPMNException(Execution execution, String requestInfo){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- String processKey = getProcessKey(execution)
- try{
- utils.log("DEBUG", "Started ProcessMainflowBPMNException Method", isDebugEnabled)
- if(execution.getVariable("WorkflowException") == null || isBlank(requestInfo)){
- buildWorkflowException(execution, 2500, "Internal Error - WorkflowException Object and/or RequestInfo is null! " + processKey)
- }
- requestInfo = utils.removeXmlPreamble(requestInfo)
- WorkflowException wfex = execution.getVariable("WorkflowException")
- String errorMessage = wfex.getErrorMessage()
- int errorCode = wfex.getErrorCode()
-
- String falloutHandlerRequest =
- """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
- xmlns:ns="http://org.openecomp/mso/request/types/v1"
- xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
- ${requestInfo}
- <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
- <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
- </aetgt:WorkflowException>
- </aetgt:FalloutHandlerRequest>"""
-
- utils.log("DEBUG", processKey + " Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugEnabled)
- utils.log("DEBUG", processKey + " Outgoing FalloutHandler Request is: " + falloutHandlerRequest, isDebugEnabled)
-
- return falloutHandlerRequest
-
- }catch(Exception e){
- utils.log("DEBUG", "Caught Exception during ProcessMainflowBPMNException Method: " + e, isDebugEnabled)
- return null
- }
- utils.log("DEBUG", "Completed ProcessMainflowBPMNException Method", isDebugEnabled)
- }
-
- /**
- *
- * This method is executed after an Java Exception is caught
- * It sets the WorkflowException variable. The method can be used in either mainflow or subflows.
- *
- * @param - execution
- *
- */
- public void processJavaException(Execution execution){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- String processKey = getProcessKey(execution)
- try{
- utils.log("DEBUG", "Caught a Java Exception in " + processKey, isDebugEnabled)
- utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
- buildWorkflowException(execution, 2500, "Catch a Java Lang Exception in " + processKey)
-
- }catch(BpmnError b){
- throw b
- }catch(Exception e){
- utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
- buildWorkflowException(execution, 2500, "Internal Error - During Process Java Exception")
- }
- utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
- }
-
-
- public void preProcessRequest(Execution execution) {
- // TODO Auto-generated method stub
-
- }
-}
+/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.mso.bpmn.common.scripts + +import static org.apache.commons.lang3.StringUtils.* + +import org.apache.commons.lang3.* +import org.camunda.bpm.engine.delegate.BpmnError +import org.camunda.bpm.engine.runtime.Execution +import org.openecomp.mso.bpmn.core.WorkflowException + +/** + * @version 1.0 + */ +class ExceptionUtil extends AbstractServiceTaskProcessor { + + + /** + * This error handling method maps an AAI Exception response to a + * WorkflowException Object. It then sets the WorkflowException Object + * on the execution as "WorkflowException". + * + * This method formats the exception from AAI into the WorkflowException's + * errorMessage that CCD expects. + * + * @param execution the execution + * @param response the aai exception + */ + WorkflowException MapAAIExceptionToWorkflowException(String response, Execution execution) + { + def utils=new MsoUtils() + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + def prefix=execution.getVariable("prefix") + def errorMsg = execution.getVariable(prefix+"ErrorResponse") + utils.log("DEBUG","=========== Begin MapAAIExceptionToWorkflowException ===========",isDebugEnabled) + String text = null + def variables + String errorCode = '5000' + WorkflowException wfex + utils.log("DEBUG","response: " + response, isDebugEnabled) + try{ + try { + //String msg = utils.getNodeXml(response, "Fault") + variables = utils.getMultNodes(response, "variable") + text = utils.getNodeText1(response, "text") + } catch (Exception ex) { + //Ignore the exception - cases include non xml payload + utils.log("DEBUG","error mapping error, ignoring: " + ex,isDebugEnabled) + } + + if(text != null) { + if(variables.size()>=4){ + text = text.replaceFirst("%1", variables[0]) + text = text.replaceFirst("%2", variables[1]) + text = text.replaceFirst("%3", variables[2]) + text = text.replaceFirst("%4", variables[3]) + } + String modifiedErrorMessage = 'Received error from A&AI (' + text +')' + utils.log("DEBUG", "ModifiedErrorMessage " + modifiedErrorMessage, isDebugEnabled) + // let $ModifiedErrorMessage := concat( 'Received error from A',$exceptionaai:ampersand,'AI (' ,functx:replace-multi($ErrorMessage,$from,$Variables ),')') + buildWorkflowException(execution, 5000, modifiedErrorMessage) + + wfex = execution.getVariable("WorkflowException") + utils.log("ERROR","Fault:"+ wfex) + return wfex + } else { + try { + errorCode = MapErrorCode(errorMsg) + String mappedErrorMessage = MapErrorMessage(errorMsg, errorCode) + + int errorCodeInt = Integer.parseInt(errorCode) + buildWorkflowException(execution, errorCodeInt, mappedErrorMessage) + + utils.log("DEBUG", "mappedErrorMessage " + mappedErrorMessage, isDebugEnabled) + wfex = execution.getVariable("WorkflowException") + utils.log("ERROR","Fault:"+ wfex, isDebugEnabled) + return wfex + } catch(Exception ex) { + utils.log("DEBUG","error mapping error, return null: " + ex, isDebugEnabled) + return null + + } + } + }catch(Exception e){ + utils.log("DEBUG", "Exception occured during MapAAIExceptionToWorkflowException: " + e, isDebugEnabled) + buildWorkflowException(execution, 5000, "Error mapping AAI Response to WorkflowException") + } + } + + /** + * This error handling method maps an AAI Exception response to a + * WorkflowException Object. It then sets the WorkflowException Object + * on the execution as "WorkflowException". + * + * This method takes the exact exception inside the <Fault> tags from AAI Response + * and puts it into the WorkflowException's errorMessage. + * + * @param execution the execution + * @param response the aai exception + */ + WorkflowException MapAAIExceptionToWorkflowExceptionGeneric(Execution execution, String response, int resCode){ + def utils=new MsoUtils() + def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled") + utils.log("DEBUG", "Start MapAAIExceptionToWorkflowExceptionGeneric Process", isDebugLogEnabled) + + WorkflowException wfex + try { + if(utils.nodeExists(response, "Fault")){ + String fault = utils.getNodeXml(response, "Fault") + fault = utils.removeXmlPreamble(fault) + fault = fault.replace("<Fault>", "").replace("</Fault>", "") + fault = fault.replaceAll("\\s+\\s+", "") // Removes extra white spaces + buildWorkflowException(execution, resCode, fault) + }else if(utils.nodeExists(response, "RESTFault")){ + String rFault = utils.getNodeXml(response, "RESTFault") + buildWorkflowException(execution, resCode, rFault) + }else{ + buildWorkflowException(execution, resCode, "Received a bad response from AAI") + } + } catch (Exception ex) { + utils.log("DEBUG", "Exception Occured during MapAAIExceptionToWorkflowExceptionGeneric: " + ex, isDebugLogEnabled) + buildWorkflowException(execution, resCode, "Internal Error - Occured in MapAAIExceptionToWorkflowExceptionGeneric") + + } + utils.log("DEBUG", "Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugLogEnabled) + utils.log("DEBUG", "Completed MapAAIExceptionToWorkflowExceptionGeneric Process", isDebugLogEnabled) + } + + /** + * This method takes a WorkflowException Object and builds + * WorkflowException Xml. This method should only be used + * for the purpose of sending a sync error response or for + * creating a FalloutHandler request. + * + *@param - WorkflowException Object + * + *@return - String WorkflowException Xml + * + * + */ + String buildErrorResponseXml(WorkflowException wfex) { + String xml + if(wfex != null){ + String mes = wfex.getErrorMessage() + int code = wfex.getErrorCode() + xml = + """<aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"> + <aetgt:ErrorMessage>${mes}</aetgt:ErrorMessage> + <aetgt:ErrorCode>${code}</aetgt:ErrorCode> + </aetgt:WorkflowException>""" + + }else{ + xml = + """<aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"> + <aetgt:ErrorMessage>Internal Error</aetgt:ErrorMessage> + <aetgt:ErrorCode>2500</aetgt:ErrorCode> + </aetgt:WorkflowException>""" + } + return xml + } + + /* + 5000 Received error from A&AI ($A&AI_ERROR) Asynchronous During orchestration of the recipe, A&AI returned an error. The error returned by A&AI is passed through in $A&AI_ERROR. + 5010 Could not communicate with A&AI Asynchronous During orchestration of the recipe, a connection with A&AI could not be established. + 5020 No response from A&AI Asynchronous During orchestration of the recipe, communication was established with A&AI, but no response was received within the configured timeout. + */ + /** + * + * Utility Method for MapAAIExceptionToWorkflowException + * + *@param - String ErrorMessage + * + *@return - String ErrorCode + * + */ + private String MapErrorCode(String errorMessage) + { + if(errorMessage==null){ + return '5000' + } + errorMessage = errorMessage.toLowerCase(); + if(errorMessage.contains('timed out') || errorMessage.contains('timeout')) + return '5020' + else if (errorMessage.contains('connection')) + return '5010' + else + return '5000' + } + + /** + * + * Utility Method for MapAAIExceptionToWorkflowException + * + *@param - String ErrorMessage + *@param - String ErrorCode + * + *@return - String ErrorMessage + * + */ + private String MapErrorMessage(String errorMessage, String errorCode) + { + if(errorMessage == null){ + errorMessage="" + } + if( errorCode.equals('5010')){ + return 'Could not communicate with A&AI' + }else if (errorCode.equals('5020')){ + return 'No response from A&AI' + }else{ + errorMessage = errorMessage.replace("&", "&").replace("<", "<").replace(">", ">") + return 'Received error from A&AI (' +errorMessage +')' + } + } + + /** + * + * Utility Method for Mapping SDNC + * Adapter Response Codes + * + *@param - String sdncResponseCode + * + *@return - String code + * + */ + String MapSDNCResponseCodeToErrorCode(String sdncResponseCode) + { + if (sdncResponseCode == '500') { + return '5310' + } else if ( sdncResponseCode == '408') { + return '5320' + } else if ( sdncResponseCode == '60010') { + return '5350' + } else { + return '5300' + } + } + + /** + * This error handling method builds a WorkflowException Object. It sets it on + * the execution as "WorkflowException". + * + * @param execution the execution + * @param errorCode the error code + * @param errorMessage the error message + */ + public void buildWorkflowException(Execution execution, int errorCode, String errorMessage) { + MsoUtils utils = new MsoUtils() + def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled') + String processKey = getProcessKey(execution); + utils.log("DEBUG", "Building a WorkflowException for " + processKey, isDebugLogEnabled) + + WorkflowException exception = new WorkflowException(processKey, errorCode, errorMessage); + execution.setVariable("WorkflowException", exception); + utils.log("DEBUG", "Outgoing WorkflowException is " + exception, isDebugLogEnabled) + } + + /** + * This error handling method builds a WorkflowException Object and throws a + * MSOWorkflowException. It throws a "MSOWorkflowException" BpmnError after + * setting the WorkflowException Object on the execution as "WorkflowException". + * + * @param execution the execution + * @param errorCode the error code + * @param errorMessage the error message + */ + public void buildAndThrowWorkflowException(Execution execution, int errorCode, String errorMessage) { + def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled') + String processKey = getProcessKey(execution); + utils.log("Building a WorkflowException for Subflow " + processKey, isDebugLogEnabled) + + WorkflowException exception = new WorkflowException(processKey, errorCode, errorMessage); + execution.setVariable("WorkflowException", exception); + utils.log("DEBUG", "Outgoing WorkflowException is " + exception, isDebugLogEnabled) + utils.log("DEBUG", "Throwing MSOWorkflowException", isDebugLogEnabled) + throw new BpmnError("MSOWorkflowException") + } + + /** + * This method is executed after an MSOWorkflowException is caught by a + * subflow (during subflows "Error Handling Sub Process"). + * It ensures the WorkflowException variable is populated before ending the + * subflow and also logs the subflows outgoing WorkflowException Variable. + * + * @param - execution + * + */ + public void processSubflowsBPMNException(Execution execution){ + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + String processKey = getProcessKey(execution) + try{ + utils.log("DEBUG", "Started ProcessSubflowsBPMNException Method", isDebugEnabled) + if(execution.getVariable("WorkflowException") == null){ + buildWorkflowException(execution, 2500, "Internal Error - Occured During " + processKey) + } + + utils.log("DEBUG", processKey + " Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugEnabled) + }catch(Exception e){ + utils.log("DEBUG", "Caught Exception during ProcessSubflowsBPMNException Method: " + e, isDebugEnabled) + } + utils.log("DEBUG", "Completed ProcessSubflowsBPMNException Method", isDebugEnabled) + } + + /** + * This method is executed after an MSOWorkflowException is caught by a + * Mainflow. It builds and returns a FalloutHandler Request. It also + * verifies the WorkflowException variable is populated. + * + * @param - execution + * @param - requestInfo + * + * @return - falloutHandlerRequest + * + */ + public String processMainflowsBPMNException(Execution execution, String requestInfo){ + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + String processKey = getProcessKey(execution) + try{ + utils.log("DEBUG", "Started ProcessMainflowBPMNException Method", isDebugEnabled) + if(execution.getVariable("WorkflowException") == null || isBlank(requestInfo)){ + buildWorkflowException(execution, 2500, "Internal Error - WorkflowException Object and/or RequestInfo is null! " + processKey) + } + requestInfo = utils.removeXmlPreamble(requestInfo) + WorkflowException wfex = execution.getVariable("WorkflowException") + String errorMessage = wfex.getErrorMessage() + int errorCode = wfex.getErrorCode() + + String falloutHandlerRequest = + """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1" + xmlns:ns="http://org.openecomp/mso/request/types/v1" + xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1"> + ${requestInfo} + <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"> + <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage> + <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode> + </aetgt:WorkflowException> + </aetgt:FalloutHandlerRequest>""" + + utils.log("DEBUG", processKey + " Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugEnabled) + utils.log("DEBUG", processKey + "Completed ProcessMainflowBPMNException Outgoing FalloutHandler Request is: " + falloutHandlerRequest, isDebugEnabled) + return falloutHandlerRequest + + }catch(Exception e){ + utils.log("DEBUG", "Caught Exception during ProcessMainflowBPMNException Method: " + e, isDebugEnabled) + return null + } + } + + /** + * + * This method is executed after an Java Exception is caught + * It sets the WorkflowException variable. The method can be used in either mainflow or subflows. + * + * @param - execution + * + */ + public void processJavaException(Execution execution){ + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + String processKey = getProcessKey(execution) + try{ + utils.log("DEBUG", "Caught a Java Exception in " + processKey, isDebugEnabled) + utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled) + buildWorkflowException(execution, 2500, "Catch a Java Lang Exception in " + processKey) + + }catch(BpmnError b){ + throw b + }catch(Exception e){ + utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled) + buildWorkflowException(execution, 2500, "Internal Error - During Process Java Exception") + } + utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled) + } + + + public void preProcessRequest(Execution execution) { + // TODO Auto-generated method stub + + } +} diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/MsoRequest.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/MsoRequest.java index c3912b48bc..8a9cb955b0 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/MsoRequest.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/MsoRequest.java @@ -106,9 +106,9 @@ public class MsoRequest { @Override public String toString() { StringBuilder request = new StringBuilder(); - request.append("<requestId>"+requestId+"</requestId>"); + request.append("<requestId>").append(requestId).append("</requestId>"); request.append('\n'); - request.append("<serviceInstanceId>"+serviceInstanceId+"</serviceInstanceId>"); + request.append("<serviceInstanceId>").append(serviceInstanceId).append("</serviceInstanceId>"); return request.toString(); } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/ObjectFactory.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/ObjectFactory.java index 952e3e2f95..c22fd286cf 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/ObjectFactory.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/ObjectFactory.java @@ -166,7 +166,7 @@ public class ObjectFactory { */ @XmlElementDecl(namespace = "http://org.openecomp.mso/vnfNotify", name = "rollbackVnfNotification") public JAXBElement<RollbackVnfNotification> createRollbackVnfNotification(RollbackVnfNotification value) { - return new JAXBElement<RollbackVnfNotification>(_RollbackVnfNotification_QNAME, RollbackVnfNotification.class, null, value); + return new JAXBElement<>(_RollbackVnfNotification_QNAME, RollbackVnfNotification.class, null, value); } /** @@ -175,7 +175,7 @@ public class ObjectFactory { */ @XmlElementDecl(namespace = "http://org.openecomp.mso/vnfNotify", name = "deleteVnfNotification") public JAXBElement<DeleteVnfNotification> createDeleteVnfNotification(DeleteVnfNotification value) { - return new JAXBElement<DeleteVnfNotification>(_DeleteVnfNotification_QNAME, DeleteVnfNotification.class, null, value); + return new JAXBElement<>(_DeleteVnfNotification_QNAME, DeleteVnfNotification.class, null, value); } /** @@ -184,7 +184,7 @@ public class ObjectFactory { */ @XmlElementDecl(namespace = "http://org.openecomp.mso/vnfNotify", name = "createVnfNotification") public JAXBElement<CreateVnfNotification> createCreateVnfNotification(CreateVnfNotification value) { - return new JAXBElement<CreateVnfNotification>(_CreateVnfNotification_QNAME, CreateVnfNotification.class, null, value); + return new JAXBElement<>(_CreateVnfNotification_QNAME, CreateVnfNotification.class, null, value); } /** @@ -193,7 +193,7 @@ public class ObjectFactory { */ @XmlElementDecl(namespace = "http://org.openecomp.mso/vnfNotify", name = "updateVnfNotification") public JAXBElement<UpdateVnfNotification> createUpdateVnfNotification(UpdateVnfNotification value) { - return new JAXBElement<UpdateVnfNotification>(_UpdateVnfNotification_QNAME, UpdateVnfNotification.class, null, value); + return new JAXBElement<>(_UpdateVnfNotification_QNAME, UpdateVnfNotification.class, null, value); } /** @@ -202,7 +202,7 @@ public class ObjectFactory { */ @XmlElementDecl(namespace = "http://org.openecomp.mso/vnfNotify", name = "queryVnfNotification") public JAXBElement<QueryVnfNotification> createQueryVnfNotification(QueryVnfNotification value) { - return new JAXBElement<QueryVnfNotification>(_QueryVnfNotification_QNAME, QueryVnfNotification.class, null, value); + return new JAXBElement<>(_QueryVnfNotification_QNAME, QueryVnfNotification.class, null, value); } } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/BpmnParam.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/BpmnParam.java new file mode 100644 index 0000000000..f4ebd0615a --- /dev/null +++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/BpmnParam.java @@ -0,0 +1,54 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.mso.bpmn.common.recipe; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The bpmn workflow input param object + */ +public class BpmnParam { + + @JsonProperty("value") + private String value; + @JsonProperty("type") + private String type = "String"; + + + public BpmnParam() { + /* Empty constructor */ + } + + @JsonProperty("value") + public String getValue() { + return value; + } + + @JsonProperty("type") + public void setValue(String value) { + this.value = value; + } + + @Override + public String toString() { + return "CamundaInput [value=" + value + ", type=" + type + "]"; + } + +} diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/BpmnRestClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/BpmnRestClient.java new file mode 100644 index 0000000000..446de10ee2 --- /dev/null +++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/BpmnRestClient.java @@ -0,0 +1,219 @@ +/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.recipe;
+
+import java.io.IOException;
+import java.security.GeneralSecurityException;
+
+import javax.xml.bind.DatatypeConverter;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+import org.openecomp.mso.utils.CryptoUtils;
+
+/**
+ * Support to call resource recipes from the BPMN workflow.
+ * Such as call resource recipe in service workflow.
+ * <br>
+ * <p>
+ * </p>
+ *
+ * @author
+ * @version ONAP Beijing Release 2018-02-27
+ */
+public class BpmnRestClient {
+
+ public static final String DEFAULT_BPEL_AUTH = "admin:admin";
+
+ public static final String ENCRYPTION_KEY = "aa3871669d893c7fb8abbcda31b88b4f";
+
+ public static final String CONTENT_TYPE_JSON = "application/json";
+
+ public static final String CAMUNDA_AUTH = "camundaAuth";
+
+ private final static String MSO_PROP_APIHANDLER_INFRA = "MSO_PROP_APIHANDLER_INFRA";
+
+ private static MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+
+ private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+
+ private static boolean noProperties = true;
+
+ public synchronized static MsoJavaProperties loadMsoProperties() {
+ MsoJavaProperties msoProperties;
+ try {
+ msoProperties = msoPropertiesFactory.getMsoJavaProperties(MSO_PROP_APIHANDLER_INFRA);
+ } catch(Exception e) {
+ msoLogger.error(MessageEnum.APIH_LOAD_PROPERTIES_FAIL, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.DataError,
+ "Exception when loading MSO Properties", e);
+ return null;
+ }
+
+ if(msoProperties != null && msoProperties.size() > 0) {
+ noProperties = false;
+ msoLogger.info(MessageEnum.APIH_PROPERTY_LOAD_SUC, "", "");
+ return msoProperties;
+ } else {
+ msoLogger.error(MessageEnum.APIH_NO_PROPERTIES, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.DataError,
+ "No MSO APIH_INFRA Properties found");
+ return null;
+ }
+ }
+
+ public synchronized static final boolean getNoPropertiesState() {
+ return noProperties;
+ }
+
+ /**
+ * post the recipe Uri
+ * <br>
+ *
+ * @param recipeUri The request recipe uri
+ * @param requestId the request id
+ * @param recipeTimeout The recipe time out
+ * @param requestAction The request action
+ * @param serviceInstanceId The service instance id
+ * @param serviceType The service Type
+ * @param requestDetails The request Details, these information is from runtime
+ * @param recipeParamXsd The recipe params, its from recipe design
+ * @return The response of the recipe.
+ * @throws ClientProtocolException
+ * @throws IOException
+ * @since ONAP Beijing Release
+ */
+ public static HttpResponse post(String recipeUri, String requestId, int recipeTimeout, String requestAction, String serviceInstanceId, String serviceType,
+ String requestDetails, String recipeParamXsd) throws ClientProtocolException, IOException {
+
+ HttpClient client = HttpClientBuilder.create().build();
+
+ HttpPost post = new HttpPost(recipeUri);
+ MsoJavaProperties props = loadMsoProperties();
+ RequestConfig requestConfig =
+ RequestConfig.custom().setSocketTimeout(recipeTimeout).setConnectTimeout(recipeTimeout).setConnectionRequestTimeout(recipeTimeout).build();
+ post.setConfig(requestConfig);
+ msoLogger.debug("call the bpmn, url:" + recipeUri);
+ String jsonReq = wrapResourceRequest(requestId, recipeTimeout, requestAction, serviceInstanceId, serviceType, requestDetails, recipeParamXsd);
+
+ StringEntity input = new StringEntity(jsonReq);
+ input.setContentType(CONTENT_TYPE_JSON);
+ String encryptedCredentials;
+ if(props != null) {
+ encryptedCredentials = props.getProperty(CAMUNDA_AUTH, null);
+ if(encryptedCredentials != null) {
+ String userCredentials = getEncryptedPropValue(encryptedCredentials, DEFAULT_BPEL_AUTH, ENCRYPTION_KEY);
+ if(userCredentials != null) {
+ post.addHeader("Authorization", "Basic " + new String(DatatypeConverter.printBase64Binary(userCredentials.getBytes())));
+ }
+ }
+ }
+ post.setEntity(input);
+ return client.execute(post);
+ }
+
+ /**
+ * prepare the resource recipe bpmn request.
+ * <br>
+ *
+ * @param requestId
+ * @param recipeTimeout
+ * @param requestAction
+ * @param serviceInstanceId
+ * @param serviceType
+ * @param requestDetails
+ * @param recipeParams
+ * @return
+ * @since ONAP Beijing Release
+ */
+ private static String wrapResourceRequest(String requestId, int recipeTimeout, String requestAction, String serviceInstanceId, String serviceType,
+ String requestDetails, String recipeParams) {
+ String jsonReq = null;
+ if(requestId == null) {
+ requestId = "";
+ }
+ if(requestAction == null) {
+ requestAction = "";
+ }
+ if(serviceInstanceId == null) {
+ serviceInstanceId = "";
+ }
+
+ if(requestDetails == null) {
+ requestDetails = "";
+ }
+
+ try {
+ ResourceRecipeRequest recipeRequest = new ResourceRecipeRequest();
+ BpmnParam resourceInput = new BpmnParam();
+ BpmnParam host = new BpmnParam();
+ BpmnParam requestIdInput = new BpmnParam();
+ BpmnParam requestActionInput = new BpmnParam();
+ BpmnParam serviceInstanceIdInput = new BpmnParam();
+ BpmnParam serviceTypeInput = new BpmnParam();
+ BpmnParam recipeParamsInput = new BpmnParam();
+ // host.setValue(parseURL());
+ requestIdInput.setValue(requestId);
+ requestActionInput.setValue(requestAction);
+ serviceInstanceIdInput.setValue(serviceInstanceId);
+ recipeParamsInput.setValue(recipeParams);
+ resourceInput.setValue(requestDetails);
+ recipeRequest.setHost(host);
+ recipeRequest.setRequestId(requestIdInput);
+ recipeRequest.setRequestAction(requestActionInput);
+ recipeRequest.setServiceInstanceId(serviceInstanceIdInput);
+ recipeRequest.setServiceType(serviceTypeInput);
+ recipeRequest.setRecipeParams(recipeParamsInput);
+ jsonReq = recipeRequest.toString();
+ msoLogger.debug("request body is " + jsonReq);
+ } catch(Exception e) {
+ msoLogger.error(MessageEnum.APIH_WARP_REQUEST, "Camunda", "wrapVIDRequest", MsoLogger.ErrorCode.BusinessProcesssError, "Error in APIH Warp request",
+ e);
+ }
+ return jsonReq;
+ }
+
+ /**
+ * <br>
+ *
+ * @param prop
+ * @param defaultValue
+ * @param encryptionKey
+ * @return
+ * @since ONAP Beijing Release
+ */
+ protected static String getEncryptedPropValue(String prop, String defaultValue, String encryptionKey) {
+ try {
+ return CryptoUtils.decrypt(prop, encryptionKey);
+ } catch(GeneralSecurityException e) {
+ msoLogger.debug("Security exception", e);
+ }
+ return defaultValue;
+ }
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/ResourceRecipeRequest.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/ResourceRecipeRequest.java new file mode 100644 index 0000000000..5bf5a02a38 --- /dev/null +++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/ResourceRecipeRequest.java @@ -0,0 +1,143 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.mso.bpmn.common.recipe; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonRootName; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; + +/** + * java object of the resource recipe , it + * will be passed to the Camunda process + */ +@JsonPropertyOrder({"resourceInput", "host", "requestId", "requestAction", "serviceInstanceId", "serviceType", "recipeParams"}) +@JsonRootName("variables") +public class ResourceRecipeRequest { + + @JsonProperty("resourceInput") + private BpmnParam resourceInput; + + @JsonProperty("host") + private BpmnParam host; + + @JsonProperty("requestId") + private BpmnParam requestId; + + @JsonProperty("requestAction") + private BpmnParam requestAction; + + @JsonProperty("serviceInstanceId") + private BpmnParam serviceInstanceId; + + @JsonProperty("serviceType") + private BpmnParam serviceType; + + @JsonProperty("recipeParams") + private BpmnParam recipeParams; + + @JsonProperty("resourceInput") + public BpmnParam getResourceInput() { + return resourceInput; + } + + @JsonProperty("resourceInput") + public void setResourceInput(BpmnParam resourceInput) { + this.resourceInput = resourceInput; + } + + @JsonProperty("host") + public BpmnParam getHost() { + return host; + } + + @JsonProperty("host") + public void setHost(BpmnParam host) { + this.host = host; + } + + @JsonProperty("requestId") + public BpmnParam getRequestId() { + return requestId; + } + + @JsonProperty("requestId") + public void setRequestId(BpmnParam requestId) { + this.requestId = requestId; + } + + @JsonProperty("requestAction") + public BpmnParam getRequestAction() { + return requestAction; + } + + @JsonProperty("requestAction") + public void setRequestAction(BpmnParam requestAction) { + this.requestAction = requestAction; + } + + @JsonProperty("serviceInstanceId") + public BpmnParam getServiceInstanceId() { + return serviceInstanceId; + } + + @JsonProperty("serviceInstanceId") + public void setServiceInstanceId(BpmnParam serviceInstanceId) { + this.serviceInstanceId = serviceInstanceId; + } + + @JsonProperty("serviceType") + public BpmnParam getServiceType() { + return serviceType; + } + + @JsonProperty("serviceType") + public void setServiceType(BpmnParam serviceType) { + this.serviceType = serviceType; + } + + @JsonProperty("recipeParams") + public BpmnParam getRecipeParams() { + return recipeParams; + } + + @JsonProperty("recipeParams") + public void setRecipeParams(BpmnParam recipeParams) { + this.recipeParams = recipeParams; + } + + @Override + public String toString() { + ObjectMapper mapper = new ObjectMapper(); + mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true); + String jsonStr = "ResourceRecipeRequest"; + try { + jsonStr = mapper.writeValueAsString(this); + } catch(JsonProcessingException e) { + + e.printStackTrace(); + } + return jsonStr; + } + +} diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/util/CryptoUtils.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/util/CryptoUtils.java index 6cc34f7464..5972c76c41 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/util/CryptoUtils.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/util/CryptoUtils.java @@ -75,14 +75,14 @@ public class CryptoUtils { private static String byteArrayToHexString(byte[] b){
- StringBuffer sb = new StringBuffer(b.length * 2);
- for (int i = 0; i < b.length; i++){
- int v = b[i] & 0xff;
+ StringBuilder sb = new StringBuilder(b.length * 2);
+ for (byte aB : b) {
+ int v = aB & 0xff;
if (v < 16) {
- sb.append('0');
+ sb.append('0');
}
sb.append(Integer.toHexString(v));
- }
+ }
return sb.toString().toUpperCase();
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/AbstractCallbackService.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/AbstractCallbackService.java index d65311dfe8..daca9fcf3f 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/AbstractCallbackService.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/AbstractCallbackService.java @@ -70,7 +70,7 @@ public abstract class AbstractCallbackService extends ProcessEngineAwareService + (message == null ? "" : System.lineSeparator()) + message);
try {
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
if (injectedVariables != null) {
variables.putAll(injectedVariables);
@@ -192,7 +192,7 @@ public abstract class AbstractCallbackService extends ProcessEngineAwareService int count = waitingProcesses.size();
- List<ExecInfo> execInfoList = new ArrayList<ExecInfo>(count);
+ List<ExecInfo> execInfoList = new ArrayList<>(count);
for (Execution execution : waitingProcesses) {
execInfoList.add(new ExecInfo(execution));
}
@@ -364,4 +364,4 @@ public abstract class AbstractCallbackService extends ProcessEngineAwareService + ":" + execution.getId() + "]";
}
}
-} +}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowMessageResource.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowMessageResource.java index d9aed816c9..4ba35907b9 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowMessageResource.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowMessageResource.java @@ -90,7 +90,7 @@ public class WorkflowMessageResource extends AbstractCallbackService { String correlationValue = correlator;
String contentTypeVariable = messageType + "_CONTENT_TYPE";
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
if (contentType != null) {
variables.put(contentTypeVariable, contentType);
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResource.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResource.java index 76ff221018..dd100a3824 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResource.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResource.java @@ -450,7 +450,7 @@ public class WorkflowResource extends ProcessEngineAwareService { Object responseCodeObject = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
String responseCode = responseCodeObject == null ? null : String.valueOf(responseCodeObject);
msoLogger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);
- responseMap = new HashMap<String, Object>();
+ responseMap = new HashMap<>();
responseMap.put("WorkflowResponse", workflowResponse);
responseMap.put("ResponseCode", responseCode);
responseMap.put("Status", "Success");
@@ -467,7 +467,7 @@ public class WorkflowResource extends ProcessEngineAwareService { if(workflowExceptionObject instanceof WorkflowException) {
workflowException = (WorkflowException) workflowExceptionObject;
workflowExceptionText = workflowException.toString();
- responseMap = new HashMap<String, Object>();
+ responseMap = new HashMap<>();
responseMap.put("WorkflowException", workflowExceptionText);
responseMap.put("ResponseCode", workflowException.getErrorCode());
responseMap.put("Status", "Fail");
@@ -477,7 +477,7 @@ public class WorkflowResource extends ProcessEngineAwareService { Object object = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
String responseCode = object == null ? null : String.valueOf(object);
workflowExceptionText = (String) workflowExceptionObject;
- responseMap = new HashMap<String, Object>();
+ responseMap = new HashMap<>();
responseMap.put("WorkflowException", workflowExceptionText);
responseMap.put("ResponseCode", responseCode);
responseMap.put("Status", "Fail");
@@ -496,7 +496,7 @@ public class WorkflowResource extends ProcessEngineAwareService { object = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
String responseCode = object == null ? null : String.valueOf(object);
msoLogger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);
- responseMap = new HashMap<String, Object>();
+ responseMap = new HashMap<>();
responseMap.put("Response", response);
responseMap.put("ResponseCode", responseCode);
responseMap.put("Status", "Success");
@@ -511,7 +511,7 @@ public class WorkflowResource extends ProcessEngineAwareService { object = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
String responseCode = object == null ? null : String.valueOf(object);
msoLogger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);
- responseMap = new HashMap<String, Object>();
+ responseMap = new HashMap<>();
responseMap.put("Response", errorResponse);
responseMap.put("ResponseCode", responseCode);
responseMap.put("Status", "Fail");
@@ -569,7 +569,7 @@ public class WorkflowResource extends ProcessEngineAwareService { try {
ProcessEngineServices engine = getProcessEngineServices();
List<HistoricVariableInstance> variables = engine.getHistoryService().createHistoricVariableInstanceQuery().processInstanceId(processInstanceId).list();
- Map<String,String> variablesMap = new HashMap<String,String>();
+ Map<String,String> variablesMap = new HashMap<>();
for (HistoricVariableInstance variableInstance: variables) {
variablesMap.put(variableInstance.getName(), variableInstance.getValue().toString());
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResourceApplication.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResourceApplication.java index 193b8fe903..64e5adc091 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResourceApplication.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResourceApplication.java @@ -28,8 +28,8 @@ import javax.ws.rs.core.Application; @ApplicationPath("/")
public class WorkflowResourceApplication extends Application {
- private Set<Object> singletons = new HashSet<Object>();
- private Set<Class<?>> classes = new HashSet<Class<?>>();
+ private Set<Object> singletons = new HashSet<>();
+ private Set<Class<?>> classes = new HashSet<>();
public WorkflowResourceApplication() {
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerSupport.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerSupport.java index aa6e1954a1..765bf61c49 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerSupport.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerSupport.java @@ -56,9 +56,9 @@ public class ApplicationControllerSupport { private static final int ERROR_SERIES = 200; private static final int REJECT_SERIES = 300; private static final int SUCCESS_SERIES = 400; - private static final int SUCCESS_STATUS = SUCCESS_SERIES + 0; + private static final int SUCCESS_STATUS = SUCCESS_SERIES; private static final int PARTIAL_SERIES = 500; - private static final int PARTIAL_SUCCESS_STATUS = PARTIAL_SERIES + 0; + private static final int PARTIAL_SUCCESS_STATUS = PARTIAL_SERIES; private static final int PARTIAL_FAILURE_STATUS = PARTIAL_SERIES + 1; @Value("${lcm.model.package:org.openecomp.appc.client.lcm.model}") diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/dmaap/DmaapPropertiesLoader.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/dmaap/DmaapPropertiesLoader.java index a21dbe8477..1bdecbf2a7 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/dmaap/DmaapPropertiesLoader.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/dmaap/DmaapPropertiesLoader.java @@ -39,9 +39,8 @@ public class DmaapPropertiesLoader { } public DmaapProperties getImpl() { - Iterator<DmaapProperties> propertyImpls = services.iterator(); - while (propertyImpls.hasNext()) { - return propertyImpls.next(); + for (DmaapProperties service : services) { + return service; } return null; diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Body.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Body.java index cc8ce81dec..26c74b0615 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Body.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Body.java @@ -41,7 +41,7 @@ public class Body implements Serializable @JsonProperty("input") private Input input; @JsonIgnore - private Map<String, Object> additionalProperties = new HashMap<String, Object>(); + private Map<String, Object> additionalProperties = new HashMap<>(); private final static long serialVersionUID = 9101706044452851559L; @JsonProperty("input") diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Input.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Input.java index 7b9bf6f2c7..579f481ba8 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Input.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Input.java @@ -43,7 +43,7 @@ public class Input implements Serializable private RequestHealthDiagnostic RequestHealthDiagnostic; @JsonIgnore - private Map<String, Object> additionalProperties = new HashMap<String, Object>(); + private Map<String, Object> additionalProperties = new HashMap<>(); private final static long serialVersionUID = 7155546785389227528L; @JsonProperty("request-healthdiagnostic") diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/RequestHealthDiagnostic.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/RequestHealthDiagnostic.java index 104dbb7ee6..2cddd0331e 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/RequestHealthDiagnostic.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/RequestHealthDiagnostic.java @@ -59,7 +59,7 @@ public class RequestHealthDiagnostic implements Serializable @JsonProperty("health-diagnostic-code") private String healthDiagnosticCode; @JsonIgnore - private Map<String, Object> additionalProperties = new HashMap<String, Object>(); + private Map<String, Object> additionalProperties = new HashMap<>(); private final static long serialVersionUID = 1166788526178388021L; @JsonProperty("request-client-name") diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/ResultInfo.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/ResultInfo.java index 4d029cb8cb..976f5b9a33 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/ResultInfo.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/ResultInfo.java @@ -51,7 +51,7 @@ private String requestId; @JsonProperty("status") private String status; @JsonIgnore -private Map<String, Object> additionalProperties = new HashMap<String, Object>(); +private Map<String, Object> additionalProperties = new HashMap<>(); @JsonProperty("client-name") public String getClientName() { diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/SDNO.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/SDNO.java index 4edd54ca09..8505ec9a74 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/SDNO.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/SDNO.java @@ -50,7 +50,7 @@ public class SDNO implements Serializable @JsonProperty("body") private Body body; @JsonIgnore - private Map<String, Object> additionalProperties = new HashMap<String, Object>(); + private Map<String, Object> additionalProperties = new HashMap<>(); private final static long serialVersionUID = -5303297382564282650L; @JsonProperty("operation") diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java index eef9ed8ee0..9fcde31e4f 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java @@ -121,7 +121,7 @@ public class BPMNUtil { private static void buildVariable(String key, String value, Map<String,Object> variableValueType) {
- Map<String, Object> host = new HashMap<String, Object>();
+ Map<String, Object> host = new HashMap<>();
host.put("value", value);
host.put("type", "String");
variableValueType.put(key, host);
@@ -131,7 +131,7 @@ public class BPMNUtil { WorkflowResource workflowResource = new WorkflowResource();
VariableMapImpl variableMap = new VariableMapImpl();
- Map<String, Object> variableValueType = new HashMap<String, Object>();
+ Map<String, Object> variableValueType = new HashMap<>();
for (String key : variables.keySet()) {
buildVariable(key, variables.get(key), variableValueType);
}
@@ -203,7 +203,7 @@ public class BPMNUtil { WorkflowAsyncResource workflowResource = new WorkflowAsyncResource();
VariableMapImpl variableMap = new VariableMapImpl();
- Map<String, Object> variableValueType = new HashMap<String, Object>();
+ Map<String, Object> variableValueType = new HashMap<>();
for (String key : variables.keySet()) {
buildVariable(key, variables.get(key), variableValueType);
}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CompleteMsoProcessTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CompleteMsoProcessTest.java index b050a81f18..9d4dac2333 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CompleteMsoProcessTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CompleteMsoProcessTest.java @@ -42,7 +42,7 @@ public class CompleteMsoProcessTest extends WorkflowTest { mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
//String changeFeatureActivateRequest = FileUtil.readResourceFile("__files/SDN-ETHERNET-INTERNET/ChangeFeatureActivateV1/" + inputRequestFile);
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
variables.put("CompleteMsoProcessRequest",inputRequestFile);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "CompleteMsoProcess", variables);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupNameTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupNameTest.java index 1925c0a1b9..845f06045a 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupNameTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupNameTest.java @@ -51,7 +51,7 @@ public class ConfirmVolumeGroupNameTest extends WorkflowTest { System.out.println("Before starting process"); RuntimeService runtimeService = processEngineRule.getRuntimeService(); - Map<String, Object> variables = new HashMap<String, Object>(); + Map<String, Object> variables = new HashMap<>(); variables.put("isDebugLogEnabled","true"); variables.put("ConfirmVolumeGroupName_volumeGroupId", "VOLUME_GROUP_ID_1"); variables.put("ConfirmVolumeGroupName_volumeGroupName", "VOLUME_GROUP_ID_1_NAME"); @@ -83,7 +83,7 @@ public class ConfirmVolumeGroupNameTest extends WorkflowTest { System.out.println("Before starting process"); RuntimeService runtimeService = processEngineRule.getRuntimeService(); - Map<String, Object> variables = new HashMap<String, Object>(); + Map<String, Object> variables = new HashMap<>(); variables.put("isDebugLogEnabled","true"); variables.put("ConfirmVolumeGroupName_volumeGroupId", "VOLUME_GROUP_ID_THAT_DOES_NOT_EXIST"); variables.put("ConfirmVolumeGroupName_volumeGroupName", "cee6d136-e378-4678-a024-2cd15f0ee0cg"); @@ -116,7 +116,7 @@ public class ConfirmVolumeGroupNameTest extends WorkflowTest { System.out.println("Before starting process"); RuntimeService runtimeService = processEngineRule.getRuntimeService(); - Map<String, Object> variables = new HashMap<String, Object>(); + Map<String, Object> variables = new HashMap<>(); variables.put("isDebugLogEnabled","true"); variables.put("ConfirmVolumeGroupName_volumeGroupId", "VOLUME_GROUP_ID_1"); variables.put("ConfirmVolumeGroupName_volumeGroupName", "BAD_VOLUME_GROUP_NAME"); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupTenantTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupTenantTest.java index 3856f7b5e1..457128f104 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupTenantTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupTenantTest.java @@ -46,7 +46,7 @@ public class ConfirmVolumeGroupTenantTest extends WorkflowTest { public void testRemoveLayer3Service_success() throws Exception{ MockGetVolumeGroupById("MDTWNJ21", "a8399879-31b3-4973-be26-0a0cbe776b58", "CRTGVNF_queryAAIResponseVolume.xml"); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariables(variables); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "ConfirmVolumeGroupTenant", variables); @@ -66,7 +66,7 @@ public class ConfirmVolumeGroupTenantTest extends WorkflowTest { public void testRemoveLayer3Service_idsNotMatch() throws Exception{ MockGetVolumeGroupById("MDTWNJ21", "a8399879-31b3-4973-be26-0a0cbe776b58", "CRTGVNF_queryAAIResponseVolume_idsNotMatch.xml"); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariables(variables); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "ConfirmVolumeGroupTenant", variables); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleTest.java index 045bd6f9c7..b2b7760327 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleTest.java @@ -51,7 +51,7 @@ public class CreateAAIVfModuleTest extends WorkflowTest { MockAAICreateGenericVnf();
MockAAIVfModulePUT(true);
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("isVidRequest", "false");
variables.put("vnfName", "STMTN5MMSC22");
@@ -78,7 +78,7 @@ public class CreateAAIVfModuleTest extends WorkflowTest { MockAAICreateGenericVnf();
MockAAIVfModulePUT(true);
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("isVidRequest", "false");
variables.put("vnfId", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
@@ -103,7 +103,7 @@ public class CreateAAIVfModuleTest extends WorkflowTest { MockAAICreateGenericVnf();
MockAAIVfModulePUT(true);
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("isVidRequest", "false");
variables.put("vnfName", "STMTN5MMSC23");
@@ -128,7 +128,7 @@ public class CreateAAIVfModuleTest extends WorkflowTest { MockAAICreateGenericVnf();
MockAAIVfModulePUT(true);
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("isVidRequest", "false");
variables.put("vnfName", "STMTN5MMSC21");
@@ -153,7 +153,7 @@ public class CreateAAIVfModuleTest extends WorkflowTest { MockAAICreateGenericVnf();
MockAAIVfModulePUT(true);
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("isVidRequest", "false");
variables.put("vnfId", "2f6aee38-1e2a-11e6-82d1-ffc7d9ee8aa4");
@@ -178,7 +178,7 @@ public class CreateAAIVfModuleTest extends WorkflowTest { MockAAICreateGenericVnf();
MockAAIVfModulePUT(true);
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("isVidRequest", "false");
variables.put("vnfName", "STMTN5MMSC22");
@@ -203,7 +203,7 @@ public class CreateAAIVfModuleTest extends WorkflowTest { MockAAICreateGenericVnf();
MockAAIVfModulePUT(true);
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("isVidRequest", "false");
variables.put("vnfId", "768073c7-f41f-4822-9323-b75962763d74");
@@ -228,7 +228,7 @@ public class CreateAAIVfModuleTest extends WorkflowTest { MockAAICreateGenericVnf();
MockAAIVfModulePUT(true);
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("isVidRequest", "false");
variables.put("vnfId", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleVolumeGroupTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleVolumeGroupTest.java index 5845ec1a56..5cc26459e8 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleVolumeGroupTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleVolumeGroupTest.java @@ -55,7 +55,7 @@ public class CreateAAIVfModuleVolumeGroupTest extends WorkflowTest { MockPutVfModuleIdNoResponse("skask", "PCRF", "lukewarm");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("CreateAAIVfModuleVolumeGroupRequest", updateAAIVfModuleRequest);
@@ -86,7 +86,7 @@ public class CreateAAIVfModuleVolumeGroupTest extends WorkflowTest { MockGetVfModuleId("skask", ".*", "VfModularity/VfModule-supercool.xml", 404);
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("CreateAAIVfModuleVolumeGroupRequest", updateAAIVfModuleRequest);
@@ -117,7 +117,7 @@ public class CreateAAIVfModuleVolumeGroupTest extends WorkflowTest { MockGetVfModuleId("skask", "lukewarm", "VfModularity/VfModule-lukewarm.xml", 200);
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("CreateAAIVfModuleVolumeGroupRequest", updateAAIVfModuleRequest);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/DecomposeServiceTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/DecomposeServiceTest.java index bda6dd953c..7295cd8e10 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/DecomposeServiceTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/DecomposeServiceTest.java @@ -49,7 +49,7 @@ public class DecomposeServiceTest extends WorkflowTest { String businessKey = UUID.randomUUID().toString(); - Map<String, Object> variables = new HashMap<String, Object>(); + Map<String, Object> variables = new HashMap<>(); setVariablesSuccess(variables, "testRequestId123", "ff5256d2-5a33-55df-13ab-12abad84e7ff"); invokeSubProcess("DecomposeService", businessKey, variables); @@ -66,7 +66,7 @@ public class DecomposeServiceTest extends WorkflowTest { String businessKey = UUID.randomUUID().toString(); - Map<String, Object> variables = new HashMap<String, Object>(); + Map<String, Object> variables = new HashMap<>(); setVariablesSuccess(variables, "testRequestId123", "ff5256d2-5a33-55df-13ab-12abad84e7ff"); invokeSubProcess("DecomposeService", businessKey, variables); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/DeleteAAIVfModuleTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/DeleteAAIVfModuleTest.java index bb2fc03163..564927a854 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/DeleteAAIVfModuleTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/DeleteAAIVfModuleTest.java @@ -52,7 +52,7 @@ public class DeleteAAIVfModuleTest extends WorkflowTest { MockAAIDeleteGenericVnf();
MockAAIDeleteVfModule();
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("DeleteAAIVfModuleRequest","<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\"> <request-info> <action>DELETE_VF_MODULE</action> <source>PORTAL</source> </request-info> <vnf-inputs> <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id> <vnf-name>STMTN5MMSC21</vnf-name> <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id> <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name> </vnf-inputs> <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/> </vnf-request>");
runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);
@@ -88,7 +88,7 @@ public class DeleteAAIVfModuleTest extends WorkflowTest { MockAAIDeleteGenericVnf();
MockAAIDeleteVfModule();
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("DeleteAAIVfModuleRequest",request);
runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);
@@ -123,7 +123,7 @@ public class DeleteAAIVfModuleTest extends WorkflowTest { MockAAIDeleteGenericVnf();
MockAAIDeleteVfModule();
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("DeleteAAIVfModuleRequest",request);
runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);
@@ -158,7 +158,7 @@ public class DeleteAAIVfModuleTest extends WorkflowTest { MockAAIDeleteGenericVnf();
MockAAIDeleteVfModule();
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("DeleteAAIVfModuleRequest",request);
runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);
@@ -193,7 +193,7 @@ public class DeleteAAIVfModuleTest extends WorkflowTest { MockAAIDeleteGenericVnf();
MockAAIDeleteVfModule();
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("DeleteAAIVfModuleRequest",request);
runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);
@@ -228,7 +228,7 @@ public class DeleteAAIVfModuleTest extends WorkflowTest { MockAAIDeleteGenericVnf();
MockAAIDeleteVfModule();
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("DeleteAAIVfModuleRequest",request);
runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);
@@ -263,7 +263,7 @@ public class DeleteAAIVfModuleTest extends WorkflowTest { MockAAIDeleteGenericVnf();
MockAAIDeleteVfModule();
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("DeleteAAIVfModuleRequest",request);
runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);
@@ -284,7 +284,7 @@ public class DeleteAAIVfModuleTest extends WorkflowTest { MockAAIDeleteGenericVnf();
MockAAIDeleteVfModule();
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("DeleteAAIVfModuleRequest","<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\"> <request-info> <action>DELETE_VF_MODULE</action> <source>PORTAL</source> </request-info> <vnf-inputs> <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c720</vnf-id> <vnf-name>STMTN5MMSC20</vnf-name> <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a76</vf-module-id> <vf-module-name>STMTN5MMSC20-MMSC::module-2-0</vf-module-name> </vnf-inputs> <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/> </vnf-request>");
runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/FalloutHandlerTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/FalloutHandlerTest.java index 8281687dec..257cec9b11 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/FalloutHandlerTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/FalloutHandlerTest.java @@ -58,7 +58,7 @@ public class FalloutHandlerTest extends WorkflowTest { System.out.println("STARTED TEST: " + method);
//String changeFeatureActivateRequest = FileUtil.readResourceFile("__files/SDN-ETHERNET-INTERNET/ChangeFeatureActivateV1/" + inputRequestFile);
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
variables.put("FalloutHandlerRequest",inputRequestFile);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "FalloutHandler", variables);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteServiceTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteServiceTest.java index cced8c1860..125a9ad916 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteServiceTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteServiceTest.java @@ -51,7 +51,7 @@ public class GenericDeleteServiceTest extends WorkflowTest { @Deployment(resources = {"subprocess/GenericDeleteService.bpmn"}) public void testGenericDeleteService_success_serviceInstance() throws Exception{ MockDeleteServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", "1234"); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", "1604-MVM-26", "SDN-ETHERNET-INTERNET", "1234"); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables); waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID()); @@ -70,7 +70,7 @@ public class GenericDeleteServiceTest extends WorkflowTest { MockDeleteServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "1234", 204); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariablesSubscription(variables, "", "1604-MVM-26", "SDN-ETHERNET-INTERNET", "1234"); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables); @@ -94,7 +94,7 @@ public class GenericDeleteServiceTest extends WorkflowTest { MockGetServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceSubscription.xml"); MockDeleteServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", "1234"); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", "1604-MVM-26", "SDN-ETHERNET-INTERNET", null); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables); @@ -118,7 +118,7 @@ public class GenericDeleteServiceTest extends WorkflowTest { MockGetServiceSubscription("1604-MVM-26", "SDN-ETHERNET-INTERNET", "GenericFlows/getServiceSubscription.xml"); MockDeleteServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "1234", 204); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariablesSubscription(variables, null, "1604-MVM-26", "SDN-ETHERNET-INTERNET", null); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables); @@ -142,7 +142,7 @@ public class GenericDeleteServiceTest extends WorkflowTest { MockGetServiceInstance_404("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET"); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", "1604-MVM-26", "SDN-ETHERNET-INTERNET", null); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables); @@ -164,7 +164,7 @@ public class GenericDeleteServiceTest extends WorkflowTest { public void testGenericDeleteService_success_subscriptionGetEmpty200() throws Exception{ MockGetServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "1234", 200); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariablesSubscription(variables, "", "1604-MVM-26", "SDN-ETHERNET-INTERNET", ""); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables); @@ -189,7 +189,7 @@ public class GenericDeleteServiceTest extends WorkflowTest { MockGetServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", "GENDSI_getServiceInstanceResponse.xml"); MockDeleteServiceInstance_404("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", "1234"); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", "1604-MVM-26", "SDN-ETHERNET-INTERNET", "1234"); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables); @@ -210,7 +210,7 @@ public class GenericDeleteServiceTest extends WorkflowTest { @Deployment(resources = {"subprocess/GenericDeleteService.bpmn"}) public void testGenericDeleteService_error_invalidVariables() throws Exception{ - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, "SDN-ETHERNET-INTERNET", "1234"); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables); @@ -236,7 +236,7 @@ public class GenericDeleteServiceTest extends WorkflowTest { MockGetServiceInstance_500("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", "aaiFault.xml"); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", "1604-MVM-26", "SDN-ETHERNET-INTERNET", null); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteVnfTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteVnfTest.java index 473f6c8195..add9a32d61 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteVnfTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteVnfTest.java @@ -51,7 +51,7 @@ public class GenericDeleteVnfTest extends WorkflowTest { public void testGenericDeleteVnf_success_genericVnf() throws Exception{ MockDeleteGenericVnf("testVnfId123", "testReVer123"); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariables(variables, "testVnfId123", "generic-vnf", "testReVer123"); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables); @@ -66,7 +66,7 @@ public class GenericDeleteVnfTest extends WorkflowTest { public void testGenericDeleteVnf_success_vce() throws Exception{ MockDeleteVce("testVnfId123", "testReVer123", 204); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariables(variables, "testVnfId123", "vce", "testReVer123"); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables); @@ -83,7 +83,7 @@ public class GenericDeleteVnfTest extends WorkflowTest { MockGetGenericVnfById("/testVnfId123", "GenericFlows/getGenericVnfByNameResponse.xml", 200); MockDeleteGenericVnf("testVnfId123", "testReVer123"); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariables(variables, "testVnfId123", "generic-vnf", ""); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables); @@ -99,7 +99,7 @@ public class GenericDeleteVnfTest extends WorkflowTest { MockDeleteVce("testVnfId123", "testReVer123", 204); MockGetVceById("testVnfId123", "GenericFlows/getVceResponse.xml"); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariables(variables, "testVnfId123", "vce", null); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables); @@ -114,7 +114,7 @@ public class GenericDeleteVnfTest extends WorkflowTest { public void testGenericDeleteVnf_success_genericVnf404() throws Exception{ MockDeleteGenericVnf("testVnfId123", "testReVer123", 404); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariables(variables, "testVnfId123", "generic-vnf", "testReVer123"); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables); @@ -129,7 +129,7 @@ public class GenericDeleteVnfTest extends WorkflowTest { public void testGenericDeleteVnf_success_vce404() throws Exception{ MockDeleteVce("testVnfId123", "testReVer123", 404); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariables(variables, "testVnfId123", "vce", "testReVer123"); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables); @@ -144,7 +144,7 @@ public class GenericDeleteVnfTest extends WorkflowTest { public void testGenericDeleteVnf_success_genericVnfNoResourceVersion404() throws Exception{ MockGetGenericVnfById_404("testVnfId123"); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariables(variables, "testVnfId123", "generic-vnf", ""); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables); @@ -158,7 +158,7 @@ public class GenericDeleteVnfTest extends WorkflowTest { @Deployment(resources = {"subprocess/GenericDeleteVnf.bpmn"}) public void testGenericDeleteVnf_error_missingVariables() throws Exception{ - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariables(variables, "testVnfId123", "", "testReVer123"); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables); @@ -173,7 +173,7 @@ public class GenericDeleteVnfTest extends WorkflowTest { public void testGenericDeleteVnf_error_genericVnf500() throws Exception{ MockDeleteGenericVnf_500("testVnfId123", "testReVer123"); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariables(variables, "testVnfId123", "generic-vnf", "testReVer123"); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables); @@ -188,7 +188,7 @@ public class GenericDeleteVnfTest extends WorkflowTest { public void testGenericDeleteVnf_error_genericVnf412() throws Exception{ MockDeleteGenericVnf("testVnfId123", "testReVer123", 412); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariables(variables, "testVnfId123", "generic-vnf", "testReVer123"); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetServiceTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetServiceTest.java index 82cceb0b70..0198395750 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetServiceTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetServiceTest.java @@ -56,7 +56,7 @@ public class GenericGetServiceTest extends WorkflowTest { @Deployment(resources = {"subprocess/GenericGetService.bpmn"})
public void testGenericGetService_success_serviceInstance() throws Exception{
MockGetServiceInstance("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, "SDN-ETHERNET-INTERNET", "123456789");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
@@ -81,7 +81,7 @@ public class GenericGetServiceTest extends WorkflowTest { MockGetServiceSubscription("1604-MVM-26", "SDN-ETHERNET-INTERNET", "GenericFlows/getServiceSubscription.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesSubscription(variables, "", null , "1604-MVM-26", "SDN-ETHERNET-INTERNET");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -109,7 +109,7 @@ public class GenericGetServiceTest extends WorkflowTest { MockNodeQueryServiceInstanceByName("1604-MVM-26", "GenericFlows/getSIUrlByName.xml");
MockGetServiceInstance("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, null, "1604-MVM-26", null, null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -139,7 +139,7 @@ public class GenericGetServiceTest extends WorkflowTest { MockNodeQueryServiceInstanceById("MIS%2F1604%2F0026%2FSW_INTERNET", "GenericFlows/getSIUrlById.xml");
MockGetServiceInstance("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -168,7 +168,7 @@ public class GenericGetServiceTest extends WorkflowTest { MockGetServiceInstance_404("SDN-ETHERNET-INTERNET", "123456789", "MIS%2F1604%2F0026%2FSW_INTERNET");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, "SDN-ETHERNET-INTERNET", "123456789");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -192,7 +192,7 @@ public class GenericGetServiceTest extends WorkflowTest { public void testGenericGetService_success_serviceSubscription404() throws Exception{
MockGetServiceSubscription("1604-MVM-26", "SDN-ETHERNET-INTERNET", 404);
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesSubscription(variables, "", "", "SDN-ETHERNET-INTERNET", "1604-MVM-26");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -219,7 +219,7 @@ public class GenericGetServiceTest extends WorkflowTest { MockNodeQueryServiceInstanceByName_404("1604-MVM-26");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, "", "1604-MVM-26", null, null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -246,7 +246,7 @@ public class GenericGetServiceTest extends WorkflowTest { MockNodeQueryServiceInstanceById_404("MIS%2F1604%2F0026%2FSW_INTERNET");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -273,7 +273,7 @@ public class GenericGetServiceTest extends WorkflowTest { MockGetServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", " ");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, "SDN-ETHERNET-INTERNET", "123456789");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -297,7 +297,7 @@ public class GenericGetServiceTest extends WorkflowTest { public void testGenericGetService_success_serviceInstanceByNameEmpty() throws Exception{
MockNodeQueryServiceInstanceByName("1604-MVM-26", "");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, "", "1604-MVM-26", null, null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -324,7 +324,7 @@ public class GenericGetServiceTest extends WorkflowTest { MockNodeQueryServiceInstanceById("MIS[%]2F1604[%]2F0026[%]2FSW_INTERNET", "");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -350,7 +350,7 @@ public class GenericGetServiceTest extends WorkflowTest { @Deployment(resources = {"subprocess/GenericGetService.bpmn"})
public void testGenericGetService_error_serviceInstanceInvalidVariables() throws Exception{
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, null, null, "SDN-ETHERNET-INTERNET", null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -375,7 +375,7 @@ public class GenericGetServiceTest extends WorkflowTest { @Deployment(resources = {"subprocess/GenericGetService.bpmn"})
public void testGenericGetService_success_serviceSubscriptionInvalidVariables() throws Exception{
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesSubscription(variables, "", "", "SDN-ETHERNET-INTERNET", null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -403,7 +403,7 @@ public class GenericGetServiceTest extends WorkflowTest { MockGetServiceInstance_500("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", "1604-MVM-26", "SDN-ETHERNET-INTERNET", "123456789");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -430,7 +430,7 @@ public class GenericGetServiceTest extends WorkflowTest { MockNodeQueryServiceInstanceById_500("MIS%2F1604%2F0026%2FSW_INTERNET");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -459,7 +459,7 @@ public class GenericGetServiceTest extends WorkflowTest { MockNodeQueryServiceInstanceByName_500("1604-MVM-26");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, null, "1604-MVM-26", null, null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -489,7 +489,7 @@ public class GenericGetServiceTest extends WorkflowTest { MockNodeQueryServiceInstanceByName("1604-MVM-26", "GenericFlows/getSIUrlByNameMultiCustomer.xml");
MockGetServiceInstance("XyCorporation", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, null, "1604-MVM-26", "XyCorporation", null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -517,7 +517,7 @@ public class GenericGetServiceTest extends WorkflowTest { MockNodeQueryServiceInstanceByName("1604-MVM-26", "GenericFlows/getSIUrlByNameMultiCustomer.xml");
MockGetServiceInstance("CorporationNotPresent", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, null, "1604-MVM-26", "CorporationNotPresent", null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetVnfTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetVnfTest.java index 126a5fda62..4922263744 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetVnfTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetVnfTest.java @@ -52,7 +52,7 @@ public class GenericGetVnfTest extends WorkflowTest { public void testGenericGetVnf_success_genericVnf() throws Exception{ MockGetGenericVnfByIdWithDepth("testVnfId123", 1, "GenericFlows/getGenericVnfByNameResponse.xml"); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariables(variables, "testVnfId123", "testVnfName123", "generic-vnf"); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetVnf", variables); @@ -79,7 +79,7 @@ public class GenericGetVnfTest extends WorkflowTest { public void testGenericGetVnf_success_vce() throws Exception{ MockGetVceById("testVnfId123[?]depth=1", "GenericFlows/getVceResponse.xml"); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariables(variables, "testVnfId123", "testVnfName123", "vce"); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetVnf", variables); @@ -106,7 +106,7 @@ public class GenericGetVnfTest extends WorkflowTest { public void testGenericGetVnf_success_genericVnfByName() throws Exception{ MockGetGenericVnfByNameWithDepth("testVnfName123", 1, "GenericFlows/getGenericVnfResponse.xml"); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariables(variables, "", "testVnfName123", "generic-vnf"); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetVnf", variables); @@ -133,7 +133,7 @@ public class GenericGetVnfTest extends WorkflowTest { public void testGenericGetVnf_success_vceByName() throws Exception{ MockGetGenericVceByNameWithDepth("testVnfName123", 1, "GenericFlows/getVceByNameResponse.xml"); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariables(variables, null, "testVnfName123", "vce"); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetVnf", variables); @@ -162,7 +162,7 @@ public class GenericGetVnfTest extends WorkflowTest { MockGetGenericVnfById_500("testVnfId123"); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariables(variables, "testVnfId123", "testVnfName123", "generic-vnf"); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetVnf", variables); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericPutVnfTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericPutVnfTest.java index 149f8aead2..0e0a237090 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericPutVnfTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericPutVnfTest.java @@ -51,7 +51,7 @@ public class GenericPutVnfTest extends WorkflowTest { MockPutGenericVnf("testVnfId123"); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariables(variables, "testVnfId123", genericVnfPayload, "generic-vnf"); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericPutVnf", variables); @@ -71,7 +71,7 @@ public class GenericPutVnfTest extends WorkflowTest { MockPutVce("testVnfId123"); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariables(variables, "testVnfId123", vcePayload, "vce"); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericPutVnf", variables); @@ -91,7 +91,7 @@ public class GenericPutVnfTest extends WorkflowTest { MockPutGenericVnf("testVnfId123"); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariables(variables, "testVnfId123", genericVnfPayload, ""); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericPutVnf", variables); @@ -113,7 +113,7 @@ public class GenericPutVnfTest extends WorkflowTest { MockPutGenericVnf("testVnfId123"); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariables(variables, "testVnfId123", genericVnfPayload, ""); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericPutVnf", variables); @@ -133,7 +133,7 @@ public class GenericPutVnfTest extends WorkflowTest { @Deployment(resources = {"subprocess/GenericPutVnf.bpmn"}) public void testGenericPutVnf_error_404() throws Exception{ - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariables(variables, "testVnfId123", genericVnfPayload, "generic-vnf"); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericPutVnf", variables); @@ -154,7 +154,7 @@ public class GenericPutVnfTest extends WorkflowTest { MockPutGenericVnf("/testVnfId123", 400); - Map<String, String> variables = new HashMap<String, String>(); + Map<String, String> variables = new HashMap<>(); setVariables(variables, "testVnfId123", genericVnfPayload, "generic-vnf"); WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericPutVnf", variables); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/HomingTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/HomingTest.java index e49ef0032e..3210fe8fc7 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/HomingTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/HomingTest.java @@ -23,7 +23,7 @@ */ package org.openecomp.mso.bpmn.common; -import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.MockGetServiceResourcesCatalogData; +import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.MockGetServiceResourcesCatalogDataByModelUuid; import static org.openecomp.mso.bpmn.mock.StubResponseSNIRO.*; import static org.junit.Assert.*; @@ -140,7 +140,7 @@ public class HomingTest extends WorkflowTest { mockSNIRO(); String businessKey = UUID.randomUUID().toString(); - Map<String, Object> variables = new HashMap<String, Object>(); + Map<String, Object> variables = new HashMap<>(); setVariables(variables); invokeSubProcess("Homing", businessKey, variables); @@ -183,7 +183,7 @@ public class HomingTest extends WorkflowTest { mockSNIRO(); String businessKey = UUID.randomUUID().toString(); - Map<String, Object> variables = new HashMap<String, Object>(); + Map<String, Object> variables = new HashMap<>(); setVariables2(variables); invokeSubProcess("Homing", businessKey, variables); @@ -235,9 +235,10 @@ public class HomingTest extends WorkflowTest { // Create a Service Decomposition //System.out.println("At start of testHoming_success_vnfResourceList"); - MockGetServiceResourcesCatalogData("1cc4e2e4-eb6e-404d-a66f-c8733cedcce8", "5.0", "/BuildingBlocks/catalogResp.json"); + MockGetServiceResourcesCatalogDataByModelUuid("2f7f309d-c842-4644-a2e4-34167be5eeb4", "/BuildingBlocks/catalogResp.json"); + //MockGetServiceResourcesCatalogData("1cc4e2e4-eb6e-404d-a66f-c8733cedcce8", "5.0", "/BuildingBlocks/catalogResp.json"); String busKey = UUID.randomUUID().toString(); - Map<String, Object> vars = new HashMap<String, Object>(); + Map<String, Object> vars = new HashMap<>(); setVariablesForServiceDecomposition(vars, "testRequestId123", "ff5256d2-5a33-55df-13ab-12abad84e7ff"); invokeSubProcess("DecomposeService", busKey, vars); @@ -252,7 +253,7 @@ public class HomingTest extends WorkflowTest { mockSNIRO(); String businessKey = UUID.randomUUID().toString(); - Map<String, Object> variables = new HashMap<String, Object>(); + Map<String, Object> variables = new HashMap<>(); variables.put("isDebugLogEnabled", "true"); variables.put("msoRequestId", "testRequestId"); variables.put("serviceInstanceId", "testServiceInstanceId"); @@ -288,7 +289,7 @@ public class HomingTest extends WorkflowTest { public void testHoming_error_inputVariable() throws Exception { String businessKey = UUID.randomUUID().toString(); - Map<String, Object> variables = new HashMap<String, Object>(); + Map<String, Object> variables = new HashMap<>(); setVariables3(variables); invokeSubProcess("Homing", businessKey, variables); @@ -307,7 +308,7 @@ public class HomingTest extends WorkflowTest { mockSNIRO_500(); String businessKey = UUID.randomUUID().toString(); - Map<String, Object> variables = new HashMap<String, Object>(); + Map<String, Object> variables = new HashMap<>(); setVariables(variables); invokeSubProcess("Homing", businessKey, variables); @@ -326,7 +327,7 @@ public class HomingTest extends WorkflowTest { mockSNIRO(); String businessKey = UUID.randomUUID().toString(); - Map<String, Object> variables = new HashMap<String, Object>(); + Map<String, Object> variables = new HashMap<>(); setVariables(variables); invokeSubProcess("Homing", businessKey, variables); @@ -347,7 +348,7 @@ public class HomingTest extends WorkflowTest { mockSNIRO(); String businessKey = UUID.randomUUID().toString(); - Map<String, Object> variables = new HashMap<String, Object>(); + Map<String, Object> variables = new HashMap<>(); setVariables(variables); invokeSubProcess("Homing", businessKey, variables); @@ -368,7 +369,7 @@ public class HomingTest extends WorkflowTest { mockSNIRO(); String businessKey = UUID.randomUUID().toString(); - Map<String, Object> variables = new HashMap<String, Object>(); + Map<String, Object> variables = new HashMap<>(); setVariables(variables); invokeSubProcess("Homing", businessKey, variables); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ManualHandlingTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ManualHandlingTest.java index 6141ee021f..a7c2d19aa0 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ManualHandlingTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ManualHandlingTest.java @@ -67,7 +67,7 @@ public class ManualHandlingTest extends WorkflowTest { public void TestManualHandlingSuccess() { RuntimeService runtimeService = processEngineRule.getRuntimeService(); - Map<String, Object> variables = new HashMap<String, Object>(); + Map<String, Object> variables = new HashMap<>(); variables.put("isDebugLogEnabled","true"); variables.put("msoRequestId", "testRequestId"); variables.put("serviceType", "X"); @@ -103,7 +103,7 @@ public class ManualHandlingTest extends WorkflowTest { System.out.println("TASK NAME: " + task.getName()); try { System.out.println("Completing the task"); - Map<String,Object> completeVariables = new HashMap<String,Object>(); + Map<String,Object> completeVariables = new HashMap<>(); completeVariables.put("responseValue", "skip"); taskService.complete(task.getId(), completeVariables); } diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/PrepareUpdateAAIVfModuleTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/PrepareUpdateAAIVfModuleTest.java index 441cefdb41..be74770e98 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/PrepareUpdateAAIVfModuleTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/PrepareUpdateAAIVfModuleTest.java @@ -60,7 +60,7 @@ public class PrepareUpdateAAIVfModuleTest extends WorkflowTest { MockPatchVfModuleId("skask", "supercool");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("PrepareUpdateAAIVfModuleRequest", prepareUpdateAAIVfModuleRequest);
@@ -94,7 +94,7 @@ public class PrepareUpdateAAIVfModuleTest extends WorkflowTest { MockGetGenericVnfById_404("skask[?]depth=1");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("PrepareUpdateAAIVfModuleRequest", prepareUpdateAAIVfModuleRequest);
@@ -129,7 +129,7 @@ public class PrepareUpdateAAIVfModuleTest extends WorkflowTest { MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("PrepareUpdateAAIVfModuleRequest", prepareUpdateAAIVfModuleRequest);
@@ -159,7 +159,7 @@ public class PrepareUpdateAAIVfModuleTest extends WorkflowTest { MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("PrepareUpdateAAIVfModuleRequest", prepareUpdateAAIVfModuleRequest);
@@ -190,7 +190,7 @@ public class PrepareUpdateAAIVfModuleTest extends WorkflowTest { MockAAIVfModuleBadPatch("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/skask/vf-modules/vf-module/supercool", 404);
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("PrepareUpdateAAIVfModuleRequest", prepareUpdateAAIVfModuleRequest);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/RainyDayHandlerTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/RainyDayHandlerTest.java index 8a78f3206c..65575ba861 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/RainyDayHandlerTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/RainyDayHandlerTest.java @@ -57,7 +57,7 @@ public class RainyDayHandlerTest extends WorkflowTest { public void TestRainyDayHandlingSuccess() {
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("msoRequestId", "testRequestId");
variables.put("serviceType", "X");
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ReceiveWorkflowMessageTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ReceiveWorkflowMessageTest.java index 4669192249..a806515974 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ReceiveWorkflowMessageTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ReceiveWorkflowMessageTest.java @@ -85,7 +85,7 @@ public class ReceiveWorkflowMessageTest extends WorkflowTest { logStart(); String businessKey = UUID.randomUUID().toString(); - Map<String, Object> variables = new HashMap<String, Object>(); + Map<String, Object> variables = new HashMap<>(); variables.put("mso-request-id", "dffbae0e-5588-4bd6-9749-b0f0adb52312"); variables.put("isDebugLogEnabled", "true"); variables.put("RCVWFMSG_timeout", "PT1M"); @@ -115,7 +115,7 @@ public class ReceiveWorkflowMessageTest extends WorkflowTest { logStart(); String businessKey = UUID.randomUUID().toString(); - Map<String, Object> variables = new HashMap<String, Object>(); + Map<String, Object> variables = new HashMap<>(); variables.put("mso-request-id", "dffbae0e-5588-4bd6-9749-b0f0adb52312"); variables.put("isDebugLogEnabled", "true"); variables.put("RCVWFMSG_timeout", "PT0.1S"); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/SDNCAdapterV1Test.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/SDNCAdapterV1Test.java index 778eec190e..0349b178cb 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/SDNCAdapterV1Test.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/SDNCAdapterV1Test.java @@ -75,12 +75,12 @@ public class SDNCAdapterV1Test extends WorkflowTest { private WorkflowResponse invokeFlow(String workflowRequest) {
- Map<String, Object>valueMap = new HashMap<String, Object>();
+ Map<String, Object>valueMap = new HashMap<>();
valueMap.put("value", workflowRequest);
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("sdncAdapterWorkflowRequest", valueMap);
- Map<String, Object> valueMap2 = new HashMap<String, Object>();
+ Map<String, Object> valueMap2 = new HashMap<>();
valueMap2.put("value", "true");
variables.put("isDebugLogEnabled", valueMap2);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIGenericVnfTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIGenericVnfTest.java index 20f6f6d264..7c557ffe63 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIGenericVnfTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIGenericVnfTest.java @@ -59,7 +59,7 @@ public class UpdateAAIGenericVnfTest extends WorkflowTest { MockPatchGenericVnf("skask");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("UpdateAAIGenericVnfRequest", updateAAIGenericVnfRequest);
@@ -92,7 +92,7 @@ public class UpdateAAIGenericVnfTest extends WorkflowTest { MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("UpdateAAIGenericVnfRequest", updateAAIGenericVnfRequest);
@@ -122,7 +122,7 @@ public class UpdateAAIGenericVnfTest extends WorkflowTest { MockGetGenericVnfById_404("skask[?]depth=1");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("UpdateAAIGenericVnfRequest", updateAAIGenericVnfRequest);
@@ -156,7 +156,7 @@ public class UpdateAAIGenericVnfTest extends WorkflowTest { MockAAIVfModuleBadPatch("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/skask", 404);
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("UpdateAAIGenericVnfRequest", updateAAIGenericVnfRequest);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIVfModuleTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIVfModuleTest.java index 0e523cbfa3..30d7e6d8c6 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIVfModuleTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIVfModuleTest.java @@ -58,7 +58,7 @@ public class UpdateAAIVfModuleTest extends WorkflowTest { MockPatchVfModuleId("skask", "supercool");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("UpdateAAIVfModuleRequest", updateAAIVfModuleRequest);
@@ -89,7 +89,7 @@ public class UpdateAAIVfModuleTest extends WorkflowTest { MockGetGenericVnfById("/skask/vf-modules/vf-module/.*", "VfModularity/VfModule-supercool.xml", 404);
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("UpdateAAIVfModuleRequest", updateAAIVfModuleRequest);
@@ -122,7 +122,7 @@ public class UpdateAAIVfModuleTest extends WorkflowTest { MockAAIVfModuleBadPatch("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/skask/vf-modules/vf-module/supercool", 404);
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("UpdateAAIVfModuleRequest", updateAAIVfModuleRequest);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/VnfAdapterRestV1Test.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/VnfAdapterRestV1Test.java index 707fe46cc1..fb029fa740 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/VnfAdapterRestV1Test.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/VnfAdapterRestV1Test.java @@ -241,7 +241,7 @@ public class VnfAdapterRestV1Test extends WorkflowTest { String request = CREATE_VF_MODULE_REQUEST.replace("{{MESSAGE-ID}}", messageId); String businessKey = UUID.randomUUID().toString(); - Map<String, Object> variables = new HashMap<String, Object>(); + Map<String, Object> variables = new HashMap<>(); variables.put("mso-request-id", requestId); variables.put("isDebugLogEnabled", "true"); variables.put("vnfAdapterRestV1Request", request); @@ -272,7 +272,7 @@ public class VnfAdapterRestV1Test extends WorkflowTest { String request = UPDATE_VF_MODULE_REQUEST.replace("{{MESSAGE-ID}}", messageId); String businessKey = UUID.randomUUID().toString(); - Map<String, Object> variables = new HashMap<String, Object>(); + Map<String, Object> variables = new HashMap<>(); variables.put("mso-request-id", requestId); variables.put("isDebugLogEnabled", "true"); variables.put("vnfAdapterRestV1Request", request); @@ -303,7 +303,7 @@ public class VnfAdapterRestV1Test extends WorkflowTest { String request = DELETE_VF_MODULE_REQUEST.replace("{{MESSAGE-ID}}", messageId); String businessKey = UUID.randomUUID().toString(); - Map<String, Object> variables = new HashMap<String, Object>(); + Map<String, Object> variables = new HashMap<>(); variables.put("mso-request-id", requestId); variables.put("isDebugLogEnabled", "true"); variables.put("vnfAdapterRestV1Request", request); @@ -334,7 +334,7 @@ public class VnfAdapterRestV1Test extends WorkflowTest { String request = ROLLBACK_VF_MODULE_REQUEST.replace("{{MESSAGE-ID}}", messageId); String businessKey = UUID.randomUUID().toString(); - Map<String, Object> variables = new HashMap<String, Object>(); + Map<String, Object> variables = new HashMap<>(); variables.put("mso-request-id", requestId); variables.put("isDebugLogEnabled", "true"); variables.put("vnfAdapterRestV1Request", request); @@ -365,7 +365,7 @@ public class VnfAdapterRestV1Test extends WorkflowTest { String request = CREATE_VF_MODULE_REQUEST.replace("{{MESSAGE-ID}}", messageId); String businessKey = UUID.randomUUID().toString(); - Map<String, Object> variables = new HashMap<String, Object>(); + Map<String, Object> variables = new HashMap<>(); variables.put("mso-request-id", requestId); variables.put("isDebugLogEnabled", "true"); variables.put("vnfAdapterRestV1Request", request); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowAsyncResourceTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowAsyncResourceTest.java index 426bceef4b..5f91298958 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowAsyncResourceTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowAsyncResourceTest.java @@ -42,7 +42,7 @@ public class WorkflowAsyncResourceTest extends WorkflowTest { //it can be any request which asynchronously processed by the workflow String request = "<aetgt:CreateTenantRequest xmlns:aetgt=\"http://org.openecomp/mso/workflow/schema/v1\" xmlns:sdncadapterworkflow=\"http://org.openecomp/mso/workflow/schema/v1\" xmlns:ns5=\"http://org.openecomp/mso/request/types/v1\"> <msoservtypes:service-information xmlns:msoservtypes=\"http://org.openecomp/mso/request/types/v1\"> <msoservtypes:service-type>SDN-ETHERNET-INTERNET</msoservtypes:service-type> <msoservtypes:service-instance-id>HI/VLXM/950604//SW_INTERNET</msoservtypes:service-instance-id> <msoservtypes:subscriber-name>SubName01</msoservtypes:subscriber-name> </msoservtypes:service-information> </aetgt:CreateTenantRequest>"; - Map<String,String> variables = new HashMap<String,String>(); + Map<String,String> variables = new HashMap<>(); variables.put("testAsyncRequestMsg", request); variables.put("mso-request-id", UUID.randomUUID().toString()); variables.put("mso-service-request-timeout", "5"); @@ -56,17 +56,17 @@ public class WorkflowAsyncResourceTest extends WorkflowTest { WorkflowAsyncResource workflowResource = new WorkflowAsyncResource(); VariableMapImpl variableMap = new VariableMapImpl(); - Map<String, Object> variableValueType = new HashMap<String, Object>(); + Map<String, Object> variableValueType = new HashMap<>(); - Map<String, Object> requestMsg = new HashMap<String, Object>(); + Map<String, Object> requestMsg = new HashMap<>(); requestMsg.put("value", request); requestMsg.put("type", "String"); - Map<String, Object> msorequestId = new HashMap<String, Object>(); + Map<String, Object> msorequestId = new HashMap<>(); msorequestId.put("type", "String"); msorequestId.put("value",requestId); - Map<String, Object> timeout = new HashMap<String, Object>(); + Map<String, Object> timeout = new HashMap<>(); timeout.put("type", "String"); timeout.put("value","5"); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java index df15a2a9cc..b71f708797 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java @@ -327,7 +327,7 @@ public class WorkflowTest { String businessKey, String request, Map<String, Object> injectedVariables,
boolean serviceInstantiationModel) {
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
// These variables may be overridded by injected variables.
variables.put("mso-service-request-timeout", "180");
@@ -422,7 +422,7 @@ public class WorkflowTest { * @return a VariableMap
*/
private VariableMapImpl createVariableMapImpl(Map<String, Object> variables) {
- Map<String, Object> wrappedVariables = new HashMap<String, Object>();
+ Map<String, Object> wrappedVariables = new HashMap<>();
for (String key : variables.keySet()) {
Object value = variables.get(key);
@@ -441,7 +441,7 @@ public class WorkflowTest { * @return the wrapped variable
*/
private Map<String, Object> wrapVariableValue(Object value) {
- HashMap<String, Object> valueMap = new HashMap<String, Object>();
+ HashMap<String, Object> valueMap = new HashMap<>();
valueMap.put("value", value);
return valueMap;
}
@@ -1634,11 +1634,7 @@ public class WorkflowTest { return null;
}
- processInstanceList.sort(new Comparator<HistoricProcessInstance>() {
- public int compare(HistoricProcessInstance m1, HistoricProcessInstance m2) {
- return m1.getStartTime().compareTo(m2.getStartTime());
- }
- });
+ processInstanceList.sort((m1, m2) -> m1.getStartTime().compareTo(m2.getStartTime()));
HistoricProcessInstance processInstance = processInstanceList.get(0);
@@ -1672,11 +1668,7 @@ public class WorkflowTest { return null;
}
- processInstanceList.sort(new Comparator<HistoricProcessInstance>() {
- public int compare(HistoricProcessInstance m1, HistoricProcessInstance m2) {
- return m1.getStartTime().compareTo(m2.getStartTime());
- }
- });
+ processInstanceList.sort((m1, m2) -> m1.getStartTime().compareTo(m2.getStartTime()));
HistoricProcessInstance processInstance = processInstanceList.get(subflowInstanceIndex);
@@ -1784,7 +1776,7 @@ public class WorkflowTest { * An object that contains callback data for a "program".
*/
public class CallbackSet {
- private final Map<String, CallbackData> map = new HashMap<String, CallbackData>();
+ private final Map<String, CallbackData> map = new HashMap<>();
/**
* Add untyped callback data to the set.
@@ -1983,8 +1975,8 @@ public class WorkflowTest { * A NamespaceContext class based on a Map.
*/
private class SimpleNamespaceContext implements NamespaceContext {
- private Map<String, String> prefixMap = new HashMap<String, String>();
- private Map<String, String> uriMap = new HashMap<String, String>();
+ private Map<String, String> prefixMap = new HashMap<>();
+ private Map<String, String> uriMap = new HashMap<>();
public synchronized void add(String prefix, String uri) {
prefixMap.put(prefix, uri);
@@ -1998,7 +1990,7 @@ public class WorkflowTest { @Override
public Iterator<String> getPrefixes(String uri) {
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
String prefix = uriMap.get(uri);
if (prefix != null) {
list.add(prefix);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/MockResource.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/MockResource.java index fc97e69c5c..74f50ba438 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/MockResource.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/MockResource.java @@ -45,7 +45,7 @@ public class MockResource { private boolean started = false; private final Integer defaultPort = 28090; private WireMockServer wireMockServer = null; - private static Map<String,String> mockProperties = new HashMap<String,String>(); + private static Map<String,String> mockProperties = new HashMap<>(); public static String getMockProperties(String key) { return mockProperties.get(key); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/MockResourceApplication.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/MockResourceApplication.java index ebbfea5cd1..ba48bffca0 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/MockResourceApplication.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/MockResourceApplication.java @@ -31,8 +31,8 @@ import javax.ws.rs.core.Application; @ApplicationPath("/console") public class MockResourceApplication extends Application { - private Set<Object> singletons = new HashSet<Object>(); - private Set<Class<?>> classes = new HashSet<Class<?>>(); + private Set<Object> singletons = new HashSet<>(); + private Set<Class<?>> classes = new HashSet<>(); public MockResourceApplication() { singletons.add(new MockResource()); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/StubResponseDatabase.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/StubResponseDatabase.java index c9f64d9b26..ffa6701a89 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/StubResponseDatabase.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/StubResponseDatabase.java @@ -98,5 +98,13 @@ public class StubResponseDatabase { .withBodyFile(responseFile))); } + public static void MockGetServiceResourcesCatalogDataByModelUuid(String serviceModelUuid, String responseFile){ + stubFor(get(urlEqualTo("/v2/serviceResources?serviceModelUuid=" + serviceModelUuid)) + .willReturn(aResponse() + .withStatus(200) + .withHeader("Content-Type", "application/json") + .withBodyFile(responseFile))); + } + } diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java index 204d9e4e5e..9c79df85ff 100644 --- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java +++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java @@ -238,9 +238,10 @@ public class HealthCheckHandler { BPMNLogger.debug(healthcheckDebugEnabled, "Post url is: " + url); //now create a soap request message as follows: - final StringBuffer payload = new StringBuffer(); + final StringBuilder payload = new StringBuilder(); payload.append("\n"); - payload.append("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:req=\"" + adapterNamespace + "/requestsdb\">\n"); + payload.append("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:req=\"") + .append(adapterNamespace).append("/requestsdb\">\n"); payload.append("<soapenv:Header/>\n"); payload.append("<soapenv:Body>\n"); payload.append("<req:getSiteStatus>\n"); @@ -270,7 +271,7 @@ public class HealthCheckHandler { BufferedReader rd = new BufferedReader( new InputStreamReader(response.getEntity().getContent())); - StringBuffer result = new StringBuffer(); + StringBuilder result = new StringBuilder(); String line = ""; while ((line = rd.readLine()) != null) { result.append(line); diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/ServiceDecomposition.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/ServiceDecomposition.java index 0e985cc8f1..c81e96dccb 100644 --- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/ServiceDecomposition.java +++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/ServiceDecomposition.java @@ -150,7 +150,7 @@ public class ServiceDecomposition extends JsonWrapper implements Serializable { */
@JsonIgnore
public String getServiceResourcesJsonString(){
- StringBuffer serviceResourcesJsonStringBuffer = new StringBuffer();
+ StringBuilder serviceResourcesJsonStringBuffer = new StringBuilder();
serviceResourcesJsonStringBuffer.append(listToJson((this.getServiceNetworks())));
serviceResourcesJsonStringBuffer.append(listToJson((this.getServiceVnfs())));
serviceResourcesJsonStringBuffer.append(listToJson((this.getServiceAllottedResources())));
@@ -186,15 +186,13 @@ public class ServiceDecomposition extends JsonWrapper implements Serializable { @JsonIgnore
public String getVnfResource(String resourceObjectId) {
- Iterator<Resource> iter = getServiceResources().iterator();
- while (iter.hasNext()) {
- Resource resource = iter.next();
- //resource.getModelInfo().getModelInvariantId();
+ for (Resource resource : getServiceResources()) {
+ //resource.getModelInfo().getModelInvariantId();
- if ("extracted information".equals(resourceObjectId)){
- return resource.toJsonString();
- }
- }
+ if ("extracted information".equals(resourceObjectId)) {
+ return resource.toJsonString();
+ }
+ }
return "";
}
@@ -290,13 +288,11 @@ public class ServiceDecomposition extends JsonWrapper implements Serializable { public boolean replaceResource(Resource newResource){
boolean result = false;
List serviceResources = getServiceResources();
- Iterator<Resource> iter = serviceResources.iterator();
- while (iter.hasNext()) {
- Resource resource = iter.next();
+ for (Resource resource : (Iterable<Resource>) serviceResources) {
System.out.println("resource found");
- if (resource.resourceType == newResource.resourceType){
+ if (resource.resourceType == newResource.resourceType) {
System.out.println("resource type matches");
- if (resource.getResourceId().equalsIgnoreCase(newResource.getResourceId())){
+ if (resource.getResourceId().equalsIgnoreCase(newResource.getResourceId())) {
System.out.println("resource id matches");
//returns TRUE if replacement is a success
result = Collections.replaceAll(serviceResources, resource, newResource);
@@ -326,12 +322,9 @@ public class ServiceDecomposition extends JsonWrapper implements Serializable { */
public boolean deleteResource(Resource resource){
List serviceResources = getServiceResources();
- Iterator<Resource> iter = serviceResources.iterator();
- while (iter.hasNext()) {
- Resource item = iter.next();
-
- if (item.resourceType == resource.resourceType){
- if (item.getResourceId().equalsIgnoreCase(resource.getResourceId())){
+ for (Resource item : (Iterable<Resource>) serviceResources) {
+ if (item.resourceType == resource.resourceType) {
+ if (item.getResourceId().equalsIgnoreCase(resource.getResourceId())) {
//returns TRUE if replacement is a success
return serviceResources.remove(resource);
}
@@ -377,10 +370,8 @@ public class ServiceDecomposition extends JsonWrapper implements Serializable { @JsonIgnore
public Resource getServiceResource(String resourceId){
List<Resource> resources = getServiceResources();
- Iterator<Resource> iter = resources.iterator();
- while (iter.hasNext()){
- Resource resource = iter.next();
- if (resource.getResourceId().equalsIgnoreCase(resourceId)){
+ for (Resource resource : resources) {
+ if (resource.getResourceId().equalsIgnoreCase(resourceId)) {
//match
return resource;
}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java index 640dc697a2..2612c383ab 100644 --- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java +++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java @@ -122,7 +122,7 @@ public class JsonUtils { * @return String containing the XML translation
*/
public static String toXMLString(Object obj, String tagName) throws JSONException {
- StringBuffer strBuf = new StringBuffer();
+ StringBuilder strBuf = new StringBuilder();
int i;
JSONArray jsonArr;
JSONObject jsonObj;
@@ -388,7 +388,7 @@ public class JsonUtils { return 0;
} else {
if (rawValue instanceof Integer) {
- msoLogger.debug("getJsonValue(): the raw value is an Integer Object=" + ((String) rawValue).toString());
+ msoLogger.debug("getJsonValue(): the raw value is an Integer Object=" + ((String) rawValue));
return (Integer) rawValue;
} else {
msoLogger.debug("getJsonValue(): the raw value is NOT an Integer Object=" + rawValue.toString());
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/xml/XmlTool.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/xml/XmlTool.java index c2b832812e..f5b9f8dc56 100644 --- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/xml/XmlTool.java +++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/xml/XmlTool.java @@ -64,10 +64,10 @@ public final class XmlTool { private static final Map<String, Integer> ENTITIES = new HashMap<>(); private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.BPEL); static { - ENTITIES.put("amp", new Integer(38)); - ENTITIES.put("quot", new Integer(34)); - ENTITIES.put("lt", new Integer(60)); - ENTITIES.put("gt", new Integer(62)); + ENTITIES.put("amp", 38); + ENTITIES.put("quot", 34); + ENTITIES.put("lt", 60); + ENTITIES.put("gt", 62); } /** @@ -155,7 +155,7 @@ public final class XmlTool { out.append("&"); modified = true; } else if (c < 32 || c > 126) { - out.append("&#" + (int)c + ";"); + out.append("&#").append((int) c).append(";"); modified = true; } else { out.append(c); @@ -199,7 +199,7 @@ public final class XmlTool { out.append("&"); modified = true; } else if (c < 32 || c > 126) { - out.append("&#" + (int)c + ";"); + out.append("&#").append((int) c).append(";"); modified = true; } else { out.append(c); 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 ef2388fe44..cfdc0e9bfa 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 @@ -176,7 +176,47 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor { } utils.log("INFO"," ***** Exit preProcessRequest *****", isDebugEnabled) } + + public void prepareDecomposeService(Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + + try { + utils.log("DEBUG", " ***** Inside prepareDecomposeService of create generic e2e service ***** ", isDebugEnabled) + String modelInvariantUuid = execution.getVariable("modelInvariantUuid") + String modelUuid = execution.getVariable("modelUuid") + //here modelVersion is not set, we use modelUuid to decompose the service. + String serviceModelInfo = """{ + "modelInvariantUuid":"${modelInvariantUuid}", + "modelUuid":"${modelUuid}", + "modelVersion":"" + }""" + execution.setVariable("serviceModelInfo", serviceModelInfo) + utils.log("DEBUG", " ***** Completed prepareDecomposeService of create generic e2e service ***** ", isDebugEnabled) + } catch (Exception ex) { + // try error in method block + String exceptionMessage = "Bpmn error encountered in create generic e2e service flow. Unexpected Error from method prepareDecomposeService() - " + ex.getMessage() + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) + } + } + + public void processDecomposition (Execution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + + utils.log("DEBUG", " ***** Inside processDecomposition() of create generic e2e service flow ***** ", isDebugEnabled) + try { + ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition") + } catch (Exception ex) { + String exceptionMessage = "Bpmn error encountered in create generic e2e service flow. processDecomposition() - " + ex.getMessage() + utils.log("DEBUG", exceptionMessage, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage) + } + } + + public void doServiceHoming(Execution execution) { + //Now Homing is not clear. So to be implemented. + } + public void postProcessAAIGET(Execution execution) { def isDebugEnabled=execution.getVariable("isDebugLogEnabled") utils.log("INFO"," ***** postProcessAAIGET ***** ", isDebugEnabled) 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 dfa390c296..54bd8cda61 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 @@ -319,7 +319,6 @@ public abstract class AbstractSdncOperationTask extends BaseTask { 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()); @@ -403,7 +402,6 @@ public abstract class AbstractSdncOperationTask extends BaseTask { return vlaue; } } catch (Exception e) { - System.out.println(e); LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " getMsbIp catch exception: ", "", this.getTaskName(), MsoLogger.ErrorCode.UnknownError, e.getClass().toString()); } return defaultValue; @@ -416,7 +414,6 @@ public abstract class AbstractSdncOperationTask extends BaseTask { return vlaue; } } catch (Exception e) { - System.out.println(e); LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " getMsbIp catch exception: ", "", this.getTaskName(), MsoLogger.ErrorCode.UnknownError, e.getClass().toString()); } return defaultValue; diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn index 24d5a7b3ad..8fc761c0d3 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn @@ -22,7 +22,7 @@ ex.processJavaException(execution)]]></bpmn:script> <bpmn:sequenceFlow id="SequenceFlow_1dsbjjb" name="" sourceRef="StartEvent_0v1ffn4" targetRef="ScriptTask_0u3lw39" /> <bpmn:sequenceFlow id="SequenceFlow_1yay321" name="" sourceRef="ScriptTask_0u3lw39" targetRef="EndEvent_0eznq6x" /> </bpmn:subProcess> - <bpmn:callActivity id="DoCreateE2EServiceInstance" name="Call DoCreateE2EServiceInstanceV3 " calledElement="DoCreateE2EServiceInstanceV3"> + <bpmn:callActivity id="DoCreateE2EServiceInstance" name="Call DoCreateE2EServiceInstance " calledElement="DoCreateE2EServiceInstance"> <bpmn:extensionElements> <camunda:out source="WorkflowException" target="WorkflowException" /> <camunda:in source="msoRequestId" target="msoRequestId" /> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn index 84c370e7fa..2983589699 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn @@ -22,7 +22,7 @@ ex.processJavaException(execution)]]></bpmn:script> <bpmn:sequenceFlow id="SequenceFlow_0guajy5" name="" sourceRef="StartEvent_121296y" targetRef="ScriptTask_1c6ogpt" /> <bpmn:sequenceFlow id="SequenceFlow_0dbt753" name="" sourceRef="ScriptTask_1c6ogpt" targetRef="EndEvent_1dw3dwx" /> </bpmn:subProcess> - <bpmn:callActivity id="CallActivity_1vyx9hu" name="Call DoCustomDeleteE2EServiceInstanceV3 " calledElement="DoCustomDeleteE2EServiceInstanceV3"> + <bpmn:callActivity id="CallActivity_1vyx9hu" name="Call DoCustomDeleteE2EServiceInstance " calledElement="DoCustomDeleteE2EServiceInstance"> <bpmn:extensionElements> <camunda:out source="WorkflowException" target="WorkflowException" /> <camunda:in source="msoRequestId" target="msoRequestId" /> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn index 2fbb898f7b..ddc87c7d55 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn @@ -1,20 +1,18 @@ <?xml version="1.0" encoding="UTF-8"?> <bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> - <bpmn2:process id="DoCreateE2EServiceInstance" name="DoCreateE2EServiceInstance" isExecutable="true"> + <bpmn2:process id="DoCreateE2EServiceInstanceV3" name="DoCreateE2EServiceInstanceV3" isExecutable="true"> <bpmn2:startEvent id="createSI_startEvent" name="Start Flow"> - <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_1qiiycn</bpmn2:outgoing> </bpmn2:startEvent> - <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="createSI_startEvent" targetRef="preProcessRequest_ScriptTask" /> <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing> + <bpmn2:incoming>SequenceFlow_1qiiycn</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0w9t6tc</bpmn2:outgoing> <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* def dcsi = new DoCreateE2EServiceInstance() dcsi.preProcessRequest(execution) ]]></bpmn2:script> </bpmn2:scriptTask> <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="CustomE2EGetService" targetRef="ScriptTask_0i8cqdy" /> - <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="CustomE2EGetService" /> <bpmn2:callActivity id="CustomE2EGetService" name="Call Custom E2E Get Service" calledElement="CustomE2EGetService"> <bpmn2:extensionElements> <camunda:in source="serviceInstanceName" target="GENGS_serviceInstanceName" /> @@ -25,7 +23,7 @@ dcsi.preProcessRequest(execution) <camunda:out source="WorkflowException" target="WorkflowException" /> <camunda:in source="serviceType" target="GENGS_serviceType" /> </bpmn2:extensionElements> - <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_1i7t9hq</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing> </bpmn2:callActivity> <bpmn2:callActivity id="CustomE2EPutService" name="Call Custom E2E Put Service" calledElement="CustomE2EPutService"> @@ -93,67 +91,29 @@ dcsi.postProcessAAIGET(execution)]]></bpmn2:script> <bpmn2:sequenceFlow id="SequenceFlow_1w01tqs" sourceRef="ScriptTask_0i8cqdy" targetRef="CustomE2EPutService" /> <bpmn2:scriptTask id="ScriptTask_0q37vn9" name="Post Process AAI PUT" scriptFormat="groovy"> <bpmn2:incoming>SequenceFlow_129ih1g</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_03fabby</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_1tkgqu3</bpmn2:outgoing> <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* def ddsi = new DoCreateE2EServiceInstance() ddsi.postProcessAAIPUT(execution)]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:scriptTask id="ScriptTask_0081lne" name="Prepare Resource Requst For overlay" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_1pjr82f</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_0ofqw6v</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -execution.setVariable("resourceType", "overlay") -def csi = new DoCreateE2EServiceInstance() -csi.preResourceRequest(execution)]]></bpmn2:script> - </bpmn2:scriptTask> - <bpmn2:scriptTask id="ScriptTask_0wvq4t8" name="Prepare Resource Request for vEPC" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_05gdjox</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_15zgrcq</bpmn2:outgoing> - <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -execution.setVariable("resourceType", "vEPC") -def csi = new DoCreateE2EServiceInstance() -csi.preResourceRequest(execution)]]></bpmn2:script> - </bpmn2:scriptTask> - <bpmn2:callActivity id="CallActivity_0uwm4l1" name="Call DoCreateVFCNetworkServiceInstance For vEPC" calledElement="DoCreateVFCNetworkServiceInstance"> - <bpmn2:extensionElements> - <camunda:in source="nsServiceName" target="nsServiceName" /> - <camunda:in source="nsServiceDescription" target="nsServiceDescription" /> - <camunda:in source="globalSubscriberId" target="globalSubscriberId" /> - <camunda:in source="serviceType" target="serviceType" /> - <camunda:in source="serviceId" target="serviceId" /> - <camunda:in source="operationId" target="operationId" /> - <camunda:in source="resourceType" target="resourceType" /> - <camunda:in source="resourceUUID" target="resourceUUID" /> - <camunda:in source="resourceParameters" target="resourceParameters" /> - <camunda:in source="operationType" target="operationType" /> - </bpmn2:extensionElements> - <bpmn2:incoming>SequenceFlow_15zgrcq</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_0k4q7jm</bpmn2:outgoing> - </bpmn2:callActivity> <bpmn2:scriptTask id="ScriptTask_1xdjlzm" name="Post Config Service Instance Creation" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_1vvdkcs</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_092ghvu</bpmn2:outgoing> + <bpmn2:incoming>SequenceFlow_16nxl6h</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0vbznai</bpmn2:outgoing> <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* def csi = new DoCreateE2EServiceInstance() csi.postConfigRequest(execution)]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_0ofqw6v" sourceRef="ScriptTask_0081lne" targetRef="CallActivity_09c3ajg" /> - <bpmn2:sequenceFlow id="SequenceFlow_15zgrcq" sourceRef="ScriptTask_0wvq4t8" targetRef="CallActivity_0uwm4l1" /> - <bpmn2:sequenceFlow id="SequenceFlow_1vvdkcs" sourceRef="CallActivity_09c3ajg" targetRef="ScriptTask_1xdjlzm" /> - <bpmn2:sequenceFlow id="SequenceFlow_092ghvu" sourceRef="ScriptTask_1xdjlzm" targetRef="EndEvent_0kbbt94" /> <bpmn2:endEvent id="EndEvent_0kbbt94"> - <bpmn2:incoming>SequenceFlow_092ghvu</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_0vbznai</bpmn2:incoming> </bpmn2:endEvent> - <bpmn2:sequenceFlow id="SequenceFlow_0k4q7jm" sourceRef="CallActivity_0uwm4l1" targetRef="Task_0aidjmp" /> <bpmn2:sequenceFlow id="SequenceFlow_1qctzm0" sourceRef="Task_0uiekmn" targetRef="Task_0raqlqc" /> <bpmn2:scriptTask id="Task_0uiekmn" name="Prepare Resource Oper Status" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_03fabby</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_1hbesp9</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_1qctzm0</bpmn2:outgoing> <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* def ddsi = new DoCreateE2EServiceInstance() ddsi.preInitResourcesOperStatus(execution)]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_05gdjox" sourceRef="Task_0raqlqc" targetRef="ScriptTask_0wvq4t8" /> <bpmn2:serviceTask id="Task_0raqlqc" name="Init Resource Oper Status"> <bpmn2:extensionElements> <camunda:connector> @@ -174,307 +134,544 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn2:script> </camunda:connector> </bpmn2:extensionElements> <bpmn2:incoming>SequenceFlow_1qctzm0</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_05gdjox</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_10reo7r</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:serviceTask id="Task_0io5qby" name="Call Sync SDNC service Create " camunda:class="org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.SdncServiceTopologyOperationTask"> + <bpmn2:incoming>SequenceFlow_1vprtt9</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_11f2zuu</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:sequenceFlow id="SequenceFlow_0ua1bbk" sourceRef="Task_0aidjmp" targetRef="Task_03n6y9h" /> - <bpmn2:scriptTask id="Task_0aidjmp" name="Prepare Resource Request For vIMS" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_0k4q7jm</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_0ua1bbk</bpmn2:outgoing> + <bpmn2:sequenceFlow id="SequenceFlow_10reo7r" sourceRef="Task_0raqlqc" targetRef="ScriptTask_1y0los4" /> + <bpmn2:sequenceFlow id="SequenceFlow_11f2zuu" sourceRef="Task_0io5qby" targetRef="IntermediateThrowEvent_0f2w7aj" /> + <bpmn2:scriptTask id="ScriptTask_1y0los4" name="Sequence Resource" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_10reo7r</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_13d9g1n</bpmn2:outgoing> <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -execution.setVariable("resourceType", "vIMS") -def csi = new DoCreateE2EServiceInstance() -csi.preResourceRequest(execution)]]></bpmn2:script> +def ddsi = new DoCreateE2EServiceInstance() +ddsi.sequenceResoure(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_13d9g1n" sourceRef="ScriptTask_1y0los4" targetRef="ExclusiveGateway_07rr3wp" /> + <bpmn2:exclusiveGateway id="ExclusiveGateway_0n9y4du" name="All ResourceFinished?"> + <bpmn2:incoming>SequenceFlow_1jenxlp</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0q6uy30</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_16nxl6h</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_0q6uy30" name="no" sourceRef="ExclusiveGateway_0n9y4du" targetRef="ScriptTask_0l4nkqr"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("allResourceFinished" ) == "false" )}]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:scriptTask id="ScriptTask_0y4u2ty" name="Parse Next Resource" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_13c7bhn</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1jenxlp</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def ddsi = new DoCreateE2EServiceInstance() +ddsi.parseNextResource(execution)]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:sequenceFlow id="SequenceFlow_1hgiln0" sourceRef="Task_03n6y9h" targetRef="Task_0io5qby" /> - <bpmn2:callActivity id="Task_03n6y9h" name="Call DoCreateVFCNetworkServiceInstance For vIMS" calledElement="DoCreateVFCNetworkServiceInstance"> + <bpmn2:sequenceFlow id="SequenceFlow_1jenxlp" sourceRef="ScriptTask_0y4u2ty" targetRef="ExclusiveGateway_0n9y4du" /> + <bpmn2:scriptTask id="ScriptTask_0l4nkqr" name="Get Current Resource" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_0q6uy30</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_1qozd66</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0uiygod</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def ddsi = new DoCreateE2EServiceInstance() +ddsi.getCurrentResoure(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:exclusiveGateway id="ExclusiveGateway_07rr3wp" name="Is SDN-C Service Needed"> + <bpmn2:incoming>SequenceFlow_13d9g1n</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_18wj44x</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_1vprtt9</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_18wj44x" name="no" sourceRef="ExclusiveGateway_07rr3wp" targetRef="IntermediateThrowEvent_0f2w7aj"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("isContainsWanResource" ) == "false" )}]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:scriptTask id="Task_0qlkmvt" name="Prepare resource recipe Request" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_0uiygod</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1u9k0dm</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def ddsi = new DoCreateE2EServiceInstance() +ddsi.prepareResourceRecipeRequest(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:scriptTask id="Task_12ghoph" name="Execute Resource Recipe"> + <bpmn2:incoming>SequenceFlow_1u9k0dm</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_13c7bhn</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def ddsi = new DoCreateE2EServiceInstance() +ddsi.executeResourceRecipe(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0bq4fxs" name="Go to Decompose_Service"> + <bpmn2:incoming>SequenceFlow_0w9t6tc</bpmn2:incoming> + <bpmn2:linkEventDefinition name="Decompose_Service" /> + </bpmn2:intermediateThrowEvent> + <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1mlbhmt" name="GoTo StartService"> + <bpmn2:incoming>SequenceFlow_1gusrvp</bpmn2:incoming> + <bpmn2:linkEventDefinition name="StartService" /> + </bpmn2:intermediateThrowEvent> + <bpmn2:scriptTask id="ScriptTask_1o01d7d" name="PostProcess Decompose Service " scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_0xjwb45</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_027owbf</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def dcsi= new DoCreateE2EServiceInstance() +dcsi.processDecomposition(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:callActivity id="CallActivity_0biblpc" name="Call Decompose Service" calledElement="DecomposeService"> <bpmn2:extensionElements> - <camunda:in source="nsServiceName" target="nsServiceName" /> - <camunda:in source="nsServiceDescription" target="nsServiceDescription" /> - <camunda:in source="globalSubscriberId" target="globalSubscriberId" /> - <camunda:in source="serviceType" target="serviceType" /> - <camunda:in source="serviceId" target="serviceId" /> - <camunda:in source="operationId" target="operationId" /> - <camunda:in source="resourceType" target="resourceType" /> - <camunda:in source="resourceUUID" target="resourceUUID" /> - <camunda:in source="resourceParameters" target="resourceParameters" /> - <camunda:in source="operationType" target="operationType" /> + <camunda:in source="msoRequestId" target="msoRequestId" /> + <camunda:in source="serviceInstanceId" target="serviceInstanceId" /> + <camunda:in source="serviceModelInfo" target="serviceModelInfo" /> + <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> + <camunda:out source="serviceDecomposition" target="serviceDecomposition" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> </bpmn2:extensionElements> - <bpmn2:incoming>SequenceFlow_0ua1bbk</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_1hgiln0</bpmn2:outgoing> + <bpmn2:incoming>SequenceFlow_0qxzgvq</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0xjwb45</bpmn2:outgoing> </bpmn2:callActivity> - <bpmn2:sequenceFlow id="SequenceFlow_1vo0235" sourceRef="Task_0io5qby" targetRef="Task_0pkhzoj" /> - <bpmn2:serviceTask id="Task_0io5qby" name="Call Sync SDNC service Create " camunda:class="org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.SdncServiceTopologyOperationTask"> - <bpmn2:incoming>SequenceFlow_1hgiln0</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_1vo0235</bpmn2:outgoing> - </bpmn2:serviceTask> - <bpmn2:sequenceFlow id="SequenceFlow_17i1ors" sourceRef="Task_0pkhzoj" targetRef="Task_0gs55f1" /> - <bpmn2:sequenceFlow id="SequenceFlow_1pjr82f" sourceRef="Task_0gs55f1" targetRef="ScriptTask_0081lne" /> - <bpmn2:scriptTask id="Task_0pkhzoj" name="Prepare Resource Request For underlay" scriptFormat="groovy"> - <bpmn2:incoming>SequenceFlow_1vo0235</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_17i1ors</bpmn2:outgoing> + <bpmn2:scriptTask id="ScriptTask_1cllqk3" name="Prepare Decompose Service " scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_166w91p</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0qxzgvq</bpmn2:outgoing> <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -execution.setVariable("resourceType", "underlay") -def csi = new DoCreateE2EServiceInstance() -csi.preResourceRequest(execution)]]></bpmn2:script> +def dcsi= new DoCreateE2EServiceInstance() +dcsi.prepareDecomposeService(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_0tv85pg" name="Decompose_Service"> + <bpmn2:outgoing>SequenceFlow_166w91p</bpmn2:outgoing> + <bpmn2:linkEventDefinition name="Decompose_Service" /> + </bpmn2:intermediateCatchEvent> + <bpmn2:sequenceFlow id="SequenceFlow_027owbf" sourceRef="ScriptTask_1o01d7d" targetRef="Task_0ush1g4" /> + <bpmn2:sequenceFlow id="SequenceFlow_0xjwb45" sourceRef="CallActivity_0biblpc" targetRef="ScriptTask_1o01d7d" /> + <bpmn2:sequenceFlow id="SequenceFlow_0qxzgvq" sourceRef="ScriptTask_1cllqk3" targetRef="CallActivity_0biblpc" /> + <bpmn2:sequenceFlow id="SequenceFlow_1qiiycn" sourceRef="createSI_startEvent" targetRef="preProcessRequest_ScriptTask" /> + <bpmn2:sequenceFlow id="SequenceFlow_166w91p" sourceRef="IntermediateCatchEvent_0tv85pg" targetRef="ScriptTask_1cllqk3" /> + <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_16okck2" name="GoTo StartPrepareResource"> + <bpmn2:incoming>SequenceFlow_1tkgqu3</bpmn2:incoming> + <bpmn2:linkEventDefinition name="StartPrepareResource" /> + </bpmn2:intermediateThrowEvent> + <bpmn2:sequenceFlow id="SequenceFlow_1tkgqu3" sourceRef="ScriptTask_0q37vn9" targetRef="IntermediateThrowEvent_16okck2" /> + <bpmn2:sequenceFlow id="SequenceFlow_0w9t6tc" sourceRef="preProcessRequest_ScriptTask" targetRef="IntermediateThrowEvent_0bq4fxs" /> + <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_0jrb3xu" name="StartService"> + <bpmn2:outgoing>SequenceFlow_1i7t9hq</bpmn2:outgoing> + <bpmn2:linkEventDefinition name="StartService" /> + </bpmn2:intermediateCatchEvent> + <bpmn2:sequenceFlow id="SequenceFlow_1i7t9hq" sourceRef="IntermediateCatchEvent_0jrb3xu" targetRef="CustomE2EGetService" /> + <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0f2w7aj" name="GoTo ResourceLoop"> + <bpmn2:incoming>SequenceFlow_18wj44x</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_11f2zuu</bpmn2:incoming> + <bpmn2:linkEventDefinition name="ResourceLoop" /> + </bpmn2:intermediateThrowEvent> + <bpmn2:sequenceFlow id="SequenceFlow_1vprtt9" name="yes" sourceRef="ExclusiveGateway_07rr3wp" targetRef="Task_0io5qby"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("isContainsWanResource" ) == "true" )}]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_05dus9b" name="StartPrepareResource"> + <bpmn2:outgoing>SequenceFlow_1hbesp9</bpmn2:outgoing> + <bpmn2:linkEventDefinition name="StartPrepareResource" /> + </bpmn2:intermediateCatchEvent> + <bpmn2:sequenceFlow id="SequenceFlow_1hbesp9" sourceRef="IntermediateCatchEvent_05dus9b" targetRef="Task_0uiekmn" /> + <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_02bah5m" name="ResourceLoop"> + <bpmn2:outgoing>SequenceFlow_1qozd66</bpmn2:outgoing> + <bpmn2:linkEventDefinition name="ResourceLoop" /> + </bpmn2:intermediateCatchEvent> + <bpmn2:sequenceFlow id="SequenceFlow_16nxl6h" name="yes" sourceRef="ExclusiveGateway_0n9y4du" targetRef="ScriptTask_1xdjlzm"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("allResourceFinished" ) == "true" )}]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="SequenceFlow_0uiygod" sourceRef="ScriptTask_0l4nkqr" targetRef="Task_0qlkmvt" /> + <bpmn2:sequenceFlow id="SequenceFlow_1u9k0dm" sourceRef="Task_0qlkmvt" targetRef="Task_12ghoph" /> + <bpmn2:sequenceFlow id="SequenceFlow_13c7bhn" sourceRef="Task_12ghoph" targetRef="ScriptTask_0y4u2ty" /> + <bpmn2:sequenceFlow id="SequenceFlow_0vbznai" sourceRef="ScriptTask_1xdjlzm" targetRef="EndEvent_0kbbt94" /> + <bpmn2:sequenceFlow id="SequenceFlow_1qozd66" sourceRef="IntermediateCatchEvent_02bah5m" targetRef="ScriptTask_0l4nkqr" /> + <bpmn2:sequenceFlow id="SequenceFlow_1gusrvp" sourceRef="Task_0ush1g4" targetRef="IntermediateThrowEvent_1mlbhmt" /> + <bpmn2:scriptTask id="Task_0ush1g4" name="Call Homing(To be Done)" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_027owbf</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1gusrvp</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def dcsi= new DoCreateE2EServiceInstance() +dcsi.doServiceHoming(execution)]]></bpmn2:script> </bpmn2:scriptTask> - <bpmn2:serviceTask id="Task_0gs55f1" name="Call Underlay Create" camunda:class="org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.SdncNetworkTopologyOperationTask"> - <bpmn2:incoming>SequenceFlow_17i1ors</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_1pjr82f</bpmn2:outgoing> - </bpmn2:serviceTask> - <bpmn2:serviceTask id="CallActivity_09c3ajg" name="Call Overlay Create" camunda:class="org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.SdncNetworkTopologyOperationTask"> - <bpmn2:incoming>SequenceFlow_0ofqw6v</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_1vvdkcs</bpmn2:outgoing> - </bpmn2:serviceTask> - <bpmn2:sequenceFlow id="SequenceFlow_03fabby" sourceRef="ScriptTask_0q37vn9" targetRef="Task_0uiekmn" /> </bpmn2:process> <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" /> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> - <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateE2EServiceInstance"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateE2EServiceInstanceV3"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createSI_startEvent"> - <dc:Bounds x="34" y="79" width="36" height="36" /> + <dc:Bounds x="18" y="-207" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="28" y="120" width="50" height="12" /> + <dc:Bounds x="12" y="-166" width="50" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask"> - <dc:Bounds x="245" y="57" width="100" height="80" /> + <dc:Bounds x="126" y="-229" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61"> - <di:waypoint xsi:type="dc:Point" x="70" y="97" /> - <di:waypoint xsi:type="dc:Point" x="245" y="97" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="112.5" y="82" width="90" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_4"> - <di:waypoint xsi:type="dc:Point" x="626" y="94" /> - <di:waypoint xsi:type="dc:Point" x="971" y="94" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="753.5" y="79" width="90" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_61" targetElement="CallActivity_1md4kyb_di"> - <di:waypoint xsi:type="dc:Point" x="345" y="97" /> - <di:waypoint xsi:type="dc:Point" x="526" y="97" /> + <di:waypoint xsi:type="dc:Point" x="296" y="94" /> + <di:waypoint xsi:type="dc:Point" x="387" y="94" /> + <di:waypoint xsi:type="dc:Point" x="387" y="94" /> + <di:waypoint xsi:type="dc:Point" x="478" y="94" /> <bpmndi:BPMNLabel> - <dc:Bounds x="390.5" y="82" width="90" height="0" /> + <dc:Bounds x="357" y="94" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="CallActivity_1md4kyb_di" bpmnElement="CustomE2EGetService"> - <dc:Bounds x="526" y="57" width="100" height="80" /> + <dc:Bounds x="196" y="57" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="CallActivity_0khp0qc_di" bpmnElement="CustomE2EPutService"> - <dc:Bounds x="972" y="206" width="100" height="80" /> + <dc:Bounds x="713" y="54" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_129ih1g_di" bpmnElement="SequenceFlow_129ih1g"> - <di:waypoint xsi:type="dc:Point" x="1023" y="286" /> - <di:waypoint xsi:type="dc:Point" x="1022" y="336" /> + <di:waypoint xsi:type="dc:Point" x="813" y="94" /> + <di:waypoint xsi:type="dc:Point" x="941" y="94" /> + <di:waypoint xsi:type="dc:Point" x="941" y="94" /> + <di:waypoint xsi:type="dc:Point" x="1068" y="94" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1023" y="296" width="0" height="0" /> + <dc:Bounds x="911" y="94" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="SubProcess_06d8lk8_di" bpmnElement="SubProcess_06d8lk8" isExpanded="true"> - <dc:Bounds x="-155" y="387" width="783" height="195" /> + <dc:Bounds x="15" y="865" width="783" height="195" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="StartEvent_0yljq9y_di" bpmnElement="StartEvent_0yljq9y"> - <dc:Bounds x="-59" y="464" width="36" height="36" /> + <dc:Bounds x="111" y="942" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="-86" y="505" width="90" height="0" /> + <dc:Bounds x="84" y="983" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_117lkk3_di" bpmnElement="EndEvent_117lkk3"> - <dc:Bounds x="574" y="464" width="36" height="36" /> + <dc:Bounds x="744" y="942" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="547" y="505" width="90" height="0" /> + <dc:Bounds x="717" y="983" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="CallActivity_1srx6p6_di" bpmnElement="CallActivity_1srx6p6"> - <dc:Bounds x="239" y="442" width="100" height="80" /> + <dc:Bounds x="409" y="920" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0eumzpf_di" bpmnElement="SequenceFlow_0eumzpf"> - <di:waypoint xsi:type="dc:Point" x="339" y="482" /> - <di:waypoint xsi:type="dc:Point" x="407" y="482" /> + <di:waypoint xsi:type="dc:Point" x="509" y="960" /> + <di:waypoint xsi:type="dc:Point" x="577" y="960" /> <bpmndi:BPMNLabel> - <dc:Bounds x="328" y="467" width="90" height="0" /> + <dc:Bounds x="498" y="945" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0tgrn11_di" bpmnElement="SequenceFlow_0tgrn11"> - <di:waypoint xsi:type="dc:Point" x="-23" y="482" /> - <di:waypoint xsi:type="dc:Point" x="76" y="482" /> + <di:waypoint xsi:type="dc:Point" x="147" y="960" /> + <di:waypoint xsi:type="dc:Point" x="246" y="960" /> <bpmndi:BPMNLabel> - <dc:Bounds x="-18" y="467" width="90" height="0" /> + <dc:Bounds x="152" y="945" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ScriptTask_0i8cqdy_di" bpmnElement="ScriptTask_0i8cqdy"> - <dc:Bounds x="971" y="57" width="100" height="80" /> + <dc:Bounds x="478" y="54" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1w01tqs_di" bpmnElement="SequenceFlow_1w01tqs"> - <di:waypoint xsi:type="dc:Point" x="1021" y="137" /> - <di:waypoint xsi:type="dc:Point" x="1021" y="206" /> + <di:waypoint xsi:type="dc:Point" x="578" y="94" /> + <di:waypoint xsi:type="dc:Point" x="646" y="94" /> + <di:waypoint xsi:type="dc:Point" x="646" y="94" /> + <di:waypoint xsi:type="dc:Point" x="713" y="94" /> <bpmndi:BPMNLabel> - <dc:Bounds x="991" y="171.5" width="90" height="0" /> + <dc:Bounds x="616" y="94" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ScriptTask_0q37vn9_di" bpmnElement="ScriptTask_0q37vn9"> - <dc:Bounds x="972" y="336" width="100" height="80" /> + <dc:Bounds x="1068" y="54" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ScriptTask_0ocetux_di" bpmnElement="ScriptTask_0ocetux"> - <dc:Bounds x="76" y="442" width="100" height="80" /> + <dc:Bounds x="246" y="920" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1lqktwf_di" bpmnElement="SequenceFlow_1lqktwf"> - <di:waypoint xsi:type="dc:Point" x="176" y="482" /> - <di:waypoint xsi:type="dc:Point" x="239" y="482" /> + <di:waypoint xsi:type="dc:Point" x="346" y="960" /> + <di:waypoint xsi:type="dc:Point" x="409" y="960" /> <bpmndi:BPMNLabel> - <dc:Bounds x="163" y="467" width="90" height="0" /> + <dc:Bounds x="333" y="945" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ScriptTask_1p0vyip_di" bpmnElement="ScriptTask_1p0vyip"> - <dc:Bounds x="407" y="442" width="100" height="80" /> + <dc:Bounds x="577" y="920" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1xzgv5k_di" bpmnElement="SequenceFlow_1xzgv5k"> - <di:waypoint xsi:type="dc:Point" x="507" y="482" /> - <di:waypoint xsi:type="dc:Point" x="539" y="482" /> - <di:waypoint xsi:type="dc:Point" x="539" y="482" /> - <di:waypoint xsi:type="dc:Point" x="574" y="482" /> + <di:waypoint xsi:type="dc:Point" x="677" y="960" /> + <di:waypoint xsi:type="dc:Point" x="709" y="960" /> + <di:waypoint xsi:type="dc:Point" x="709" y="960" /> + <di:waypoint xsi:type="dc:Point" x="744" y="960" /> <bpmndi:BPMNLabel> - <dc:Bounds x="509" y="482" width="90" height="0" /> + <dc:Bounds x="679" y="960" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_0081lne_di" bpmnElement="ScriptTask_0081lne"> - <dc:Bounds x="-410" y="819" width="100" height="80" /> + <bpmndi:BPMNShape id="ScriptTask_1xdjlzm_di" bpmnElement="ScriptTask_1xdjlzm"> + <dc:Bounds x="1119" y="485" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_0wvq4t8_di" bpmnElement="ScriptTask_0wvq4t8"> - <dc:Bounds x="789" y="819" width="100" height="80" /> + <bpmndi:BPMNShape id="EndEvent_01p249c_di" bpmnElement="EndEvent_0kbbt94"> + <dc:Bounds x="1315" y="507" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1197" y="547" width="90" height="12" /> + </bpmndi:BPMNLabel> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="CallActivity_0uwm4l1_di" bpmnElement="CallActivity_0uwm4l1"> - <dc:Bounds x="632" y="819" width="100" height="80" /> + <bpmndi:BPMNEdge id="SequenceFlow_1qctzm0_di" bpmnElement="SequenceFlow_1qctzm0"> + <di:waypoint xsi:type="dc:Point" x="296" y="300" /> + <di:waypoint xsi:type="dc:Point" x="402" y="300" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="304" y="279" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_0v81r5h_di" bpmnElement="Task_0uiekmn"> + <dc:Bounds x="196" y="260" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_1xdjlzm_di" bpmnElement="ScriptTask_1xdjlzm"> - <dc:Bounds x="-741" y="819" width="100" height="80" /> + <bpmndi:BPMNShape id="ServiceTask_14tnuxf_di" bpmnElement="Task_0raqlqc"> + <dc:Bounds x="402" y="260" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0qi8cgg_di" bpmnElement="Task_0io5qby"> + <dc:Bounds x="944" y="353" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0ofqw6v_di" bpmnElement="SequenceFlow_0ofqw6v"> - <di:waypoint xsi:type="dc:Point" x="-410" y="859" /> - <di:waypoint xsi:type="dc:Point" x="-478" y="859" /> + <bpmndi:BPMNEdge id="SequenceFlow_10reo7r_di" bpmnElement="SequenceFlow_10reo7r"> + <di:waypoint xsi:type="dc:Point" x="502" y="300" /> + <di:waypoint xsi:type="dc:Point" x="583" y="300" /> <bpmndi:BPMNLabel> - <dc:Bounds x="-489" y="838" width="90" height="12" /> + <dc:Bounds x="497.5" y="279" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_15zgrcq_di" bpmnElement="SequenceFlow_15zgrcq"> - <di:waypoint xsi:type="dc:Point" x="789" y="859" /> - <di:waypoint xsi:type="dc:Point" x="732" y="859" /> + <bpmndi:BPMNEdge id="SequenceFlow_11f2zuu_di" bpmnElement="SequenceFlow_11f2zuu"> + <di:waypoint xsi:type="dc:Point" x="1044" y="393" /> + <di:waypoint xsi:type="dc:Point" x="1090" y="393" /> + <di:waypoint xsi:type="dc:Point" x="1090" y="300" /> + <di:waypoint xsi:type="dc:Point" x="1315" y="300" /> <bpmndi:BPMNLabel> - <dc:Bounds x="715.5" y="838" width="90" height="12" /> + <dc:Bounds x="1060" y="340.5" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1vvdkcs_di" bpmnElement="SequenceFlow_1vvdkcs"> - <di:waypoint xsi:type="dc:Point" x="-578" y="859" /> - <di:waypoint xsi:type="dc:Point" x="-641" y="859" /> + <bpmndi:BPMNShape id="ScriptTask_1y0los4_di" bpmnElement="ScriptTask_1y0los4"> + <dc:Bounds x="583" y="260" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_13d9g1n_di" bpmnElement="SequenceFlow_13d9g1n"> + <di:waypoint xsi:type="dc:Point" x="683" y="300" /> + <di:waypoint xsi:type="dc:Point" x="753" y="300" /> <bpmndi:BPMNLabel> - <dc:Bounds x="-654.5" y="838" width="90" height="12" /> + <dc:Bounds x="673" y="279" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_092ghvu_di" bpmnElement="SequenceFlow_092ghvu"> - <di:waypoint xsi:type="dc:Point" x="-741" y="859" /> - <di:waypoint xsi:type="dc:Point" x="-787" y="859" /> + <bpmndi:BPMNShape id="ExclusiveGateway_0n9y4du_di" bpmnElement="ExclusiveGateway_0n9y4du" isMarkerVisible="true"> + <dc:Bounds x="929" y="500" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="-809" y="838" width="90" height="12" /> + <dc:Bounds x="912" y="554" width="83" height="36" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0q6uy30_di" bpmnElement="SequenceFlow_0q6uy30"> + <di:waypoint xsi:type="dc:Point" x="954" y="550" /> + <di:waypoint xsi:type="dc:Point" x="954" y="691" /> + <di:waypoint xsi:type="dc:Point" x="246" y="691" /> + <di:waypoint xsi:type="dc:Point" x="246" y="565" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="594" y="670" width="12" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="EndEvent_01p249c_di" bpmnElement="EndEvent_0kbbt94"> - <dc:Bounds x="-823" y="841" width="36" height="36" /> + <bpmndi:BPMNShape id="ScriptTask_0y4u2ty_di" bpmnElement="ScriptTask_0y4u2ty"> + <dc:Bounds x="728" y="485" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1jenxlp_di" bpmnElement="SequenceFlow_1jenxlp"> + <di:waypoint xsi:type="dc:Point" x="828" y="525" /> + <di:waypoint xsi:type="dc:Point" x="929" y="525" /> <bpmndi:BPMNLabel> - <dc:Bounds x="-941" y="881" width="90" height="12" /> + <dc:Bounds x="833.5" y="504" width="90" height="12" /> </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_0l4nkqr_di" bpmnElement="ScriptTask_0l4nkqr"> + <dc:Bounds x="196" y="485" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0k4q7jm_di" bpmnElement="SequenceFlow_0k4q7jm"> - <di:waypoint xsi:type="dc:Point" x="632" y="859" /> - <di:waypoint xsi:type="dc:Point" x="596" y="859" /> + <bpmndi:BPMNShape id="ExclusiveGateway_07rr3wp_di" bpmnElement="ExclusiveGateway_07rr3wp" isMarkerVisible="true"> + <dc:Bounds x="753" y="275" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="569" y="838" width="90" height="12" /> + <dc:Bounds x="736" y="329" width="87" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_18wj44x_di" bpmnElement="SequenceFlow_18wj44x"> + <di:waypoint xsi:type="dc:Point" x="803" y="300" /> + <di:waypoint xsi:type="dc:Point" x="1315" y="300" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="832.3633633633633" y="294" width="12" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1qctzm0_di" bpmnElement="SequenceFlow_1qctzm0"> - <di:waypoint xsi:type="dc:Point" x="1022" y="668" /> - <di:waypoint xsi:type="dc:Point" x="1022" y="704" /> + <bpmndi:BPMNShape id="ScriptTask_0u88n0f_di" bpmnElement="Task_0qlkmvt"> + <dc:Bounds x="357" y="485" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_1y17r20_di" bpmnElement="Task_12ghoph"> + <dc:Bounds x="551" y="485" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="IntermediateThrowEvent_11saqvj_di" bpmnElement="IntermediateThrowEvent_0bq4fxs"> + <dc:Bounds x="1315" y="-207" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1290" y="-167" width="88" height="36" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="IntermediateThrowEvent_1mlbhmt_di" bpmnElement="IntermediateThrowEvent_1mlbhmt"> + <dc:Bounds x="1315" y="-57" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1037" y="680" width="0" height="12" /> + <dc:Bounds x="1288" y="-16" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_1o01d7d_di" bpmnElement="ScriptTask_1o01d7d"> + <dc:Bounds x="713" y="-79" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_0biblpc_di" bpmnElement="CallActivity_0biblpc"> + <dc:Bounds x="478" y="-79" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_1cllqk3_di" bpmnElement="ScriptTask_1cllqk3"> + <dc:Bounds x="196" y="-79" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="IntermediateCatchEvent_0tv85pg_di" bpmnElement="IntermediateCatchEvent_0tv85pg"> + <dc:Bounds x="26" y="-57" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="2" y="-21" width="88" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_027owbf_di" bpmnElement="SequenceFlow_027owbf"> + <di:waypoint xsi:type="dc:Point" x="813" y="-39" /> + <di:waypoint xsi:type="dc:Point" x="1057" y="-39" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="890" y="-60" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_0v81r5h_di" bpmnElement="Task_0uiekmn"> - <dc:Bounds x="972" y="588" width="100" height="80" /> + <bpmndi:BPMNEdge id="SequenceFlow_0xjwb45_di" bpmnElement="SequenceFlow_0xjwb45"> + <di:waypoint xsi:type="dc:Point" x="578" y="-39" /> + <di:waypoint xsi:type="dc:Point" x="713" y="-39" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="645.5" y="-60" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0qxzgvq_di" bpmnElement="SequenceFlow_0qxzgvq"> + <di:waypoint xsi:type="dc:Point" x="296" y="-39" /> + <di:waypoint xsi:type="dc:Point" x="478" y="-39" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="387" y="-60" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1qiiycn_di" bpmnElement="SequenceFlow_1qiiycn"> + <di:waypoint xsi:type="dc:Point" x="54" y="-189" /> + <di:waypoint xsi:type="dc:Point" x="126" y="-189" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="90" y="-210" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_166w91p_di" bpmnElement="SequenceFlow_166w91p"> + <di:waypoint xsi:type="dc:Point" x="62" y="-39" /> + <di:waypoint xsi:type="dc:Point" x="196" y="-39" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="129" y="-60" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="IntermediateThrowEvent_16okck2_di" bpmnElement="IntermediateThrowEvent_16okck2"> + <dc:Bounds x="1315" y="76" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1299" y="117" width="71" height="24" /> + </bpmndi:BPMNLabel> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_05gdjox_di" bpmnElement="SequenceFlow_05gdjox"> - <di:waypoint xsi:type="dc:Point" x="1022" y="784" /> - <di:waypoint xsi:type="dc:Point" x="1022" y="859" /> - <di:waypoint xsi:type="dc:Point" x="889" y="859" /> + <bpmndi:BPMNEdge id="SequenceFlow_1tkgqu3_di" bpmnElement="SequenceFlow_1tkgqu3"> + <di:waypoint xsi:type="dc:Point" x="1168" y="94" /> + <di:waypoint xsi:type="dc:Point" x="1242" y="94" /> + <di:waypoint xsi:type="dc:Point" x="1242" y="94" /> + <di:waypoint xsi:type="dc:Point" x="1315" y="94" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1037" y="815.5" width="0" height="12" /> + <dc:Bounds x="1257" y="88" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ServiceTask_14tnuxf_di" bpmnElement="Task_0raqlqc"> - <dc:Bounds x="972" y="704" width="100" height="80" /> + <bpmndi:BPMNEdge id="SequenceFlow_0w9t6tc_di" bpmnElement="SequenceFlow_0w9t6tc"> + <di:waypoint xsi:type="dc:Point" x="226" y="-189" /> + <di:waypoint xsi:type="dc:Point" x="771" y="-189" /> + <di:waypoint xsi:type="dc:Point" x="771" y="-189" /> + <di:waypoint xsi:type="dc:Point" x="1315" y="-189" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="786" y="-195" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="IntermediateCatchEvent_0jrb3xu_di" bpmnElement="IntermediateCatchEvent_0jrb3xu"> + <dc:Bounds x="18" y="79" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="8" y="115" width="60" height="12" /> + </bpmndi:BPMNLabel> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0ua1bbk_di" bpmnElement="SequenceFlow_0ua1bbk"> - <di:waypoint xsi:type="dc:Point" x="496" y="859" /> - <di:waypoint xsi:type="dc:Point" x="446" y="859" /> + <bpmndi:BPMNEdge id="SequenceFlow_1i7t9hq_di" bpmnElement="SequenceFlow_1i7t9hq"> + <di:waypoint xsi:type="dc:Point" x="54" y="97" /> + <di:waypoint xsi:type="dc:Point" x="196" y="97" /> <bpmndi:BPMNLabel> - <dc:Bounds x="471" y="838" width="0" height="12" /> + <dc:Bounds x="125" y="76" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_0ue196s_di" bpmnElement="Task_0aidjmp"> - <dc:Bounds x="496" y="819" width="100" height="80" /> + <bpmndi:BPMNShape id="IntermediateThrowEvent_0f2w7aj_di" bpmnElement="IntermediateThrowEvent_0f2w7aj"> + <dc:Bounds x="1315" y="282" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1299" y="323" width="73" height="24" /> + </bpmndi:BPMNLabel> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1hgiln0_di" bpmnElement="SequenceFlow_1hgiln0"> - <di:waypoint xsi:type="dc:Point" x="346" y="859" /> - <di:waypoint xsi:type="dc:Point" x="191" y="859" /> + <bpmndi:BPMNEdge id="SequenceFlow_1vprtt9_di" bpmnElement="SequenceFlow_1vprtt9"> + <di:waypoint xsi:type="dc:Point" x="778" y="325" /> + <di:waypoint xsi:type="dc:Point" x="778" y="393" /> + <di:waypoint xsi:type="dc:Point" x="944" y="393" /> <bpmndi:BPMNLabel> - <dc:Bounds x="268.5" y="838" width="0" height="12" /> + <dc:Bounds x="784" y="353" width="19" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="CallActivity_1hcdpgq_di" bpmnElement="Task_03n6y9h"> - <dc:Bounds x="346" y="819" width="100" height="80" /> + <bpmndi:BPMNShape id="IntermediateCatchEvent_05dus9b_di" bpmnElement="IntermediateCatchEvent_05dus9b"> + <dc:Bounds x="18" y="282" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="-3" y="318" width="82" height="24" /> + </bpmndi:BPMNLabel> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1vo0235_di" bpmnElement="SequenceFlow_1vo0235"> - <di:waypoint xsi:type="dc:Point" x="91" y="859" /> - <di:waypoint xsi:type="dc:Point" x="46" y="859" /> + <bpmndi:BPMNEdge id="SequenceFlow_1hbesp9_di" bpmnElement="SequenceFlow_1hbesp9"> + <di:waypoint xsi:type="dc:Point" x="54" y="300" /> + <di:waypoint xsi:type="dc:Point" x="196" y="300" /> <bpmndi:BPMNLabel> - <dc:Bounds x="68.5" y="838" width="0" height="12" /> + <dc:Bounds x="125" y="279" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ServiceTask_0qi8cgg_di" bpmnElement="Task_0io5qby"> - <dc:Bounds x="91" y="819" width="100" height="80" /> + <bpmndi:BPMNShape id="IntermediateCatchEvent_02bah5m_di" bpmnElement="IntermediateCatchEvent_02bah5m"> + <dc:Bounds x="18" y="507" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="2" y="543" width="73" height="12" /> + </bpmndi:BPMNLabel> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_17i1ors_di" bpmnElement="SequenceFlow_17i1ors"> - <di:waypoint xsi:type="dc:Point" x="-54" y="859" /> - <di:waypoint xsi:type="dc:Point" x="-125" y="859" /> + <bpmndi:BPMNEdge id="SequenceFlow_16nxl6h_di" bpmnElement="SequenceFlow_16nxl6h"> + <di:waypoint xsi:type="dc:Point" x="979" y="525" /> + <di:waypoint xsi:type="dc:Point" x="1119" y="525" /> <bpmndi:BPMNLabel> - <dc:Bounds x="-134.5" y="838" width="90" height="12" /> + <dc:Bounds x="1040" y="504" width="19" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1pjr82f_di" bpmnElement="SequenceFlow_1pjr82f"> - <di:waypoint xsi:type="dc:Point" x="-225" y="859" /> - <di:waypoint xsi:type="dc:Point" x="-310" y="859" /> + <bpmndi:BPMNEdge id="SequenceFlow_0uiygod_di" bpmnElement="SequenceFlow_0uiygod"> + <di:waypoint xsi:type="dc:Point" x="296" y="525" /> + <di:waypoint xsi:type="dc:Point" x="357" y="525" /> <bpmndi:BPMNLabel> - <dc:Bounds x="-312.5" y="838" width="90" height="12" /> + <dc:Bounds x="326.5" y="504" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_0ue4dzp_di" bpmnElement="Task_0pkhzoj"> - <dc:Bounds x="-54" y="819" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ServiceTask_1q727pm_di" bpmnElement="Task_0gs55f1"> - <dc:Bounds x="-225" y="819" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ServiceTask_1cnnn5b_di" bpmnElement="CallActivity_09c3ajg"> - <dc:Bounds x="-578" y="819" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_03fabby_di" bpmnElement="SequenceFlow_03fabby"> - <di:waypoint xsi:type="dc:Point" x="1022" y="416" /> - <di:waypoint xsi:type="dc:Point" x="1022" y="588" /> + <bpmndi:BPMNEdge id="SequenceFlow_1u9k0dm_di" bpmnElement="SequenceFlow_1u9k0dm"> + <di:waypoint xsi:type="dc:Point" x="457" y="525" /> + <di:waypoint xsi:type="dc:Point" x="551" y="525" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="504" y="504" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_13c7bhn_di" bpmnElement="SequenceFlow_13c7bhn"> + <di:waypoint xsi:type="dc:Point" x="651" y="525" /> + <di:waypoint xsi:type="dc:Point" x="728" y="525" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="689.5" y="504" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0vbznai_di" bpmnElement="SequenceFlow_0vbznai"> + <di:waypoint xsi:type="dc:Point" x="1219" y="525" /> + <di:waypoint xsi:type="dc:Point" x="1315" y="525" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1037" y="496" width="0" height="12" /> + <dc:Bounds x="1267" y="504" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1qozd66_di" bpmnElement="SequenceFlow_1qozd66"> + <di:waypoint xsi:type="dc:Point" x="54" y="525" /> + <di:waypoint xsi:type="dc:Point" x="196" y="525" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="125" y="504" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1gusrvp_di" bpmnElement="SequenceFlow_1gusrvp"> + <di:waypoint xsi:type="dc:Point" x="1157" y="-39" /> + <di:waypoint xsi:type="dc:Point" x="1315" y="-39" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1236" y="-60" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_0wr11dt_di" bpmnElement="Task_0ush1g4"> + <dc:Bounds x="1057" y="-79" width="100" height="80" /> + </bpmndi:BPMNShape> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn2:definitions> diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn index 10e49a198b..095948a87c 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> - <bpmn:process id="DoCustomDeleteE2EServiceInstance" isExecutable="true"> + <bpmn:process id="DoCustomDeleteE2EServiceInstanceV3" name="All Resources Deleted" isExecutable="true"> <bpmn:startEvent id="StartEvent_0212h2r" name="Start Flow"> <bpmn:outgoing>SequenceFlow_0vz7cd9</bpmn:outgoing> </bpmn:startEvent> @@ -26,7 +26,8 @@ ddsi.preProcessRequest(execution) <camunda:out source="GENDS_SuccessIndicator" target="GENDS_SuccessIndicator" /> <camunda:out source="WorkflowException" target="WorkflowExcpeton" /> </bpmn:extensionElements> - <bpmn:incoming>SequenceFlow_0vg4q7x</bpmn:incoming> + <bpmn:incoming>SequenceFlow_1ev7z6q</bpmn:incoming> + <bpmn:incoming>SequenceFlow_0oj2anh</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0g6bxqw</bpmn:outgoing> </bpmn:callActivity> <bpmn:scriptTask id="ScriptTask_1rtnsh8" name="Post Process AAI GET" scriptFormat="groovy"> @@ -66,70 +67,25 @@ ex.processJavaException(execution)]]></bpmn:script> <bpmn:sequenceFlow id="SequenceFlow_0e7inkl" sourceRef="ScriptTask_01erufg" targetRef="EndEvent_1uqzt26" /> <bpmn:sequenceFlow id="SequenceFlow_0g6bxqw" sourceRef="CallActivity_06izbke" targetRef="ScriptTask_01erufg" /> <bpmn:sequenceFlow id="SequenceFlow_0vi0sv6" sourceRef="ScriptTask_1rtnsh8" targetRef="ScriptTask_146jt8v" /> - <bpmn:callActivity id="CallActivity_Del_VFC" name="Call Network Service Delete for vEPC" calledElement="DoDeleteVFCNetworkServiceInstance"> - <bpmn:extensionElements> - <camunda:in source="globalSubscriberId" target="globalSubscriberId" /> - <camunda:in source="serviceType" target="serviceType" /> - <camunda:in source="serviceInstanceId" target="serviceId" /> - <camunda:in source="operationId" target="operationId" /> - <camunda:in source="resourceTemplateId" target="resourceTemplateId" /> - <camunda:in source="resourceInstanceId" target="resourceInstanceId" /> - <camunda:in source="resourceType" target="resourceType" /> - <camunda:in source="operationType" target="operationType" /> - </bpmn:extensionElements> - <bpmn:incoming>SequenceFlow_1wmjau1</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0qquvgc</bpmn:outgoing> - </bpmn:callActivity> - <bpmn:sequenceFlow id="SequenceFlow_0qquvgc" sourceRef="CallActivity_Del_VFC" targetRef="ScriptTask_0mdub03" /> - <bpmn:scriptTask id="ScriptTask_0vcz9mj" name="Prepare Resource Delele For vEPC" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1931m8u</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1wmjau1</bpmn:outgoing> - <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -String resourceName = "vEPC" -def ddsi = new DoCustomDeleteE2EServiceInstance() -ddsi.preResourceDelete(execution, resourceName )]]></bpmn:script> - </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_1wmjau1" sourceRef="ScriptTask_0vcz9mj" targetRef="CallActivity_Del_VFC" /> - <bpmn:scriptTask id="ScriptTask_0mdub03" name="Post Process VFC Delete" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0qquvgc</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0vg4q7x</bpmn:outgoing> - <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* - -String response = execution.getVariable("vfcDeleteResponse") -def ddsi = new DoCustomDeleteE2EServiceInstance() -ddsi.postProcessVFCDelete(execution, response, "delete")]]></bpmn:script> - </bpmn:scriptTask> - <bpmn:scriptTask id="ScriptTask_1g0tsto" name="Post Process SDNC Delete" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0uc2beq</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1m7tont</bpmn:outgoing> - <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* - -String response = execution.getVariable("sdncDeleteResponse") -def ddsi = new DoCustomDeleteE2EServiceInstance() -ddsi.postProcessSDNCDelete(execution, response, "delete")]]></bpmn:script> - </bpmn:scriptTask> - <bpmn:scriptTask id="ScriptTask_0z30dax" name="Prepare Resource Delele For Overlay" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0l4w9nr</bpmn:incoming> + <bpmn:scriptTask id="ScriptTask_0z30dax" name="Prepare Resource Delele For WAN" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1ubor5z</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1dza4q4</bpmn:outgoing> <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -String resourceName = "overlay" +String resourceName = execution.getVariable("resourceType") def ddsi = new DoCustomDeleteE2EServiceInstance() ddsi.preResourceDelete(execution, resourceName )]]></bpmn:script> </bpmn:scriptTask> <bpmn:sequenceFlow id="SequenceFlow_1dza4q4" sourceRef="ScriptTask_0z30dax" targetRef="CallActivity_Del_SDNC_cust" /> - <bpmn:sequenceFlow id="SequenceFlow_0rpu756" sourceRef="CallActivity_Del_SDNC_cust" targetRef="Task_14erap6" /> <bpmn:sequenceFlow id="SequenceFlow_1wnkgpx" sourceRef="Task_0z1x3sg" targetRef="Task_0963dho" /> - <bpmn:sequenceFlow id="SequenceFlow_1931m8u" sourceRef="Task_0963dho" targetRef="ScriptTask_0vcz9mj" /> - <bpmn:scriptTask id="Task_0z1x3sg" name="Prepare Resource Delele For vIMS" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1m7tont</bpmn:incoming> + <bpmn:scriptTask id="Task_0z1x3sg" name="Prepare Resource Delele For NS" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1x3lehs</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1wnkgpx</bpmn:outgoing> <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -String resourceName = "vIMS" +String resourceName = execution.getVariable("resourceType") def ddsi = new DoCustomDeleteE2EServiceInstance() ddsi.preResourceDelete(execution, resourceName )]]></bpmn:script> </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_1m7tont" sourceRef="ScriptTask_1g0tsto" targetRef="Task_0z1x3sg" /> - <bpmn:callActivity id="Task_0963dho" name="Call Network Service Delete for vIMS" calledElement="DoDeleteVFCNetworkServiceInstance"> + <bpmn:callActivity id="Task_0963dho" name="Call Network Service Delete for NS" calledElement="DoDeleteVFCNetworkServiceInstance"> <bpmn:extensionElements> <camunda:in source="globalSubscriberId" target="globalSubscriberId" /> <camunda:in source="serviceType" target="serviceType" /> @@ -141,31 +97,15 @@ ddsi.preResourceDelete(execution, resourceName )]]></bpmn:script> <camunda:in source="operationType" target="operationType" /> </bpmn:extensionElements> <bpmn:incoming>SequenceFlow_1wnkgpx</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1931m8u</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_0phwem2</bpmn:outgoing> </bpmn:callActivity> - <bpmn:sequenceFlow id="SequenceFlow_0vg4q7x" sourceRef="ScriptTask_0mdub03" targetRef="CallActivity_06izbke" /> <bpmn:serviceTask id="CallActivity_Del_SDNC_cust" name="Call Custom Delete SDNC Overlay" camunda:class="org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.SdncNetworkTopologyOperationTask"> <bpmn:incoming>SequenceFlow_1dza4q4</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0rpu756</bpmn:outgoing> - </bpmn:serviceTask> - <bpmn:sequenceFlow id="SequenceFlow_0d9lmlv" sourceRef="Task_14erap6" targetRef="Task_1j1u666" /> - <bpmn:sequenceFlow id="SequenceFlow_1g4djgh" sourceRef="Task_1j1u666" targetRef="Task_0edkv0m" /> - <bpmn:sequenceFlow id="SequenceFlow_0uc2beq" sourceRef="Task_0edkv0m" targetRef="ScriptTask_1g0tsto" /> - <bpmn:scriptTask id="Task_14erap6" name="Prepare Resource Delele For Underlay" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0rpu756</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0d9lmlv</bpmn:outgoing> - <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* -String resourceName = "underlay" -def ddsi = new DoCustomDeleteE2EServiceInstance() -ddsi.preResourceDelete(execution, resourceName )]]></bpmn:script> - </bpmn:scriptTask> - <bpmn:serviceTask id="Task_1j1u666" name="Call Custom Delete SDNC Underlay" camunda:class="org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.SdncNetworkTopologyOperationTask"> - <bpmn:incoming>SequenceFlow_0d9lmlv</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1g4djgh</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_1lxqjmp</bpmn:outgoing> </bpmn:serviceTask> <bpmn:serviceTask id="Task_0edkv0m" name="Call Delete SDNC Service Topology" camunda:class="org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.SdncServiceTopologyOperationTask"> - <bpmn:incoming>SequenceFlow_1g4djgh</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0uc2beq</bpmn:outgoing> + <bpmn:incoming>SequenceFlow_1icwpye</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1ev7z6q</bpmn:outgoing> </bpmn:serviceTask> <bpmn:scriptTask id="ScriptTask_146jt8v" name="Prepare Resource Oper Status" scriptFormat="groovy"> <bpmn:incoming>SequenceFlow_0vi0sv6</bpmn:incoming> @@ -194,10 +134,9 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script> </camunda:connector> </bpmn:extensionElements> <bpmn:incoming>SequenceFlow_1ym9otf</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0l4w9nr</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_1j08ko3</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_1ym9otf" sourceRef="ScriptTask_146jt8v" targetRef="ServiceTask_00tg69u" /> - <bpmn:sequenceFlow id="SequenceFlow_0l4w9nr" sourceRef="ServiceTask_00tg69u" targetRef="ScriptTask_0z30dax" /> <bpmn:callActivity id="CallActivity_076pc2z" name="Call AAI Generic GetService" calledElement="GenericGetService"> <bpmn:extensionElements> <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" /> @@ -214,9 +153,72 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script> <bpmn:outgoing>SequenceFlow_188ejvu</bpmn:outgoing> </bpmn:callActivity> <bpmn:sequenceFlow id="SequenceFlow_188ejvu" sourceRef="CallActivity_076pc2z" targetRef="ScriptTask_1rtnsh8" /> + <bpmn:scriptTask id="ScriptTask_0o5bglz" name="Sequense Resources" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1j08ko3</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_03c0zlq</bpmn:outgoing> + <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def ddsi = new DoCustomDeleteE2EServiceInstance() +ddsi.sequenceResource(execution)]]></bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_1j08ko3" sourceRef="ServiceTask_00tg69u" targetRef="ScriptTask_0o5bglz" /> + <bpmn:exclusiveGateway id="ExclusiveGateway_07toixi" name="Check Current Resource"> + <bpmn:incoming>SequenceFlow_1htjmkv</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1ubor5z</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_1x3lehs</bpmn:outgoing> + </bpmn:exclusiveGateway> + <bpmn:scriptTask id="ScriptTask_12q6a51" name="Get Current Resource" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_03c0zlq</bpmn:incoming> + <bpmn:incoming>SequenceFlow_0s1lswk</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1htjmkv</bpmn:outgoing> + <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def ddsi = new DoCustomDeleteE2EServiceInstance() +ddsi.getCurrentResource(execution)]]></bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_03c0zlq" sourceRef="ScriptTask_0o5bglz" targetRef="ScriptTask_12q6a51" /> + <bpmn:sequenceFlow id="SequenceFlow_1htjmkv" sourceRef="ScriptTask_12q6a51" targetRef="ExclusiveGateway_07toixi" /> + <bpmn:sequenceFlow id="SequenceFlow_1ubor5z" name="SDN-C" sourceRef="ExclusiveGateway_07toixi" targetRef="ScriptTask_0z30dax"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("controllerInfo" ) == "SDN-C" )}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:sequenceFlow id="SequenceFlow_1x3lehs" name="VF-C" sourceRef="ExclusiveGateway_07toixi" targetRef="Task_0z1x3sg"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("controllerInfo" ) == "VF-C" )}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:scriptTask id="ScriptTask_0w46sge" name="Parse Next Resource" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1lxqjmp</bpmn:incoming> + <bpmn:incoming>SequenceFlow_0phwem2</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0l5r96s</bpmn:outgoing> + <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.* +def ddsi = new DoCustomDeleteE2EServiceInstance() +ddsi.parseNextResource(execution)]]></bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_1lxqjmp" sourceRef="CallActivity_Del_SDNC_cust" targetRef="ScriptTask_0w46sge" /> + <bpmn:sequenceFlow id="SequenceFlow_0phwem2" sourceRef="Task_0963dho" targetRef="ScriptTask_0w46sge" /> + <bpmn:exclusiveGateway id="ExclusiveGateway_1hgjg3u" name="Is All Resource Deleted"> + <bpmn:incoming>SequenceFlow_0l5r96s</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0talboa</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_0s1lswk</bpmn:outgoing> + </bpmn:exclusiveGateway> + <bpmn:sequenceFlow id="SequenceFlow_0l5r96s" sourceRef="ScriptTask_0w46sge" targetRef="ExclusiveGateway_1hgjg3u" /> + <bpmn:exclusiveGateway id="ExclusiveGateway_16046vb" name="Is SDNC Service Contained"> + <bpmn:incoming>SequenceFlow_0talboa</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1icwpye</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_0oj2anh</bpmn:outgoing> + </bpmn:exclusiveGateway> + <bpmn:sequenceFlow id="SequenceFlow_1icwpye" name="yes" sourceRef="ExclusiveGateway_16046vb" targetRef="Task_0edkv0m"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("isContainsWanResource" ) == "true" )}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:sequenceFlow id="SequenceFlow_1ev7z6q" sourceRef="Task_0edkv0m" targetRef="CallActivity_06izbke" /> + <bpmn:sequenceFlow id="SequenceFlow_0oj2anh" name="no" sourceRef="ExclusiveGateway_16046vb" targetRef="CallActivity_06izbke"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("isContainsWanResource" ) == "false" )}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:sequenceFlow id="SequenceFlow_0talboa" name="yes" sourceRef="ExclusiveGateway_1hgjg3u" targetRef="ExclusiveGateway_16046vb"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("allResourceFinished" ) == "true" )}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:sequenceFlow id="SequenceFlow_0s1lswk" name="no" sourceRef="ExclusiveGateway_1hgjg3u" targetRef="ScriptTask_12q6a51"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("allResourceFinished" ) == "false" )}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> </bpmn:process> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> - <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCustomDeleteE2EServiceInstance"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCustomDeleteE2EServiceInstanceV3"> <bpmndi:BPMNShape id="StartEvent_0212h2r_di" bpmnElement="StartEvent_0212h2r"> <dc:Bounds x="-612" y="-35" width="36" height="36" /> <bpmndi:BPMNLabel> @@ -227,22 +229,22 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script> <dc:Bounds x="-519" y="-57" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_1uqzt26_di" bpmnElement="EndEvent_1uqzt26"> - <dc:Bounds x="1220" y="1109" width="36" height="36" /> + <dc:Bounds x="1388" y="855" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1148" y="1150" width="90" height="12" /> + <dc:Bounds x="1316" y="896" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="CallActivity_06izbke_di" bpmnElement="CallActivity_06izbke"> - <dc:Bounds x="1188" y="779" width="100" height="80" /> + <dc:Bounds x="1356" y="578" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ScriptTask_1rtnsh8_di" bpmnElement="ScriptTask_1rtnsh8"> <dc:Bounds x="-193" y="-57" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ScriptTask_01erufg_di" bpmnElement="ScriptTask_01erufg"> - <dc:Bounds x="1188" y="915" width="100" height="80" /> + <dc:Bounds x="1356" y="711" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="SubProcess_1u8zt9i_di" bpmnElement="SubProcess_1u8zt9i" isExpanded="true"> - <dc:Bounds x="445" y="320" width="467" height="193" /> + <dc:Bounds x="292" y="675" width="467" height="193" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0vz7cd9_di" bpmnElement="SequenceFlow_0vz7cd9"> <di:waypoint xsi:type="dc:Point" x="-576" y="-17" /> @@ -259,17 +261,17 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0e7inkl_di" bpmnElement="SequenceFlow_0e7inkl"> - <di:waypoint xsi:type="dc:Point" x="1238" y="995" /> - <di:waypoint xsi:type="dc:Point" x="1238" y="1109" /> + <di:waypoint xsi:type="dc:Point" x="1406" y="791" /> + <di:waypoint xsi:type="dc:Point" x="1406" y="855" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1208" y="1046" width="90" height="12" /> + <dc:Bounds x="1376" y="817" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0g6bxqw_di" bpmnElement="SequenceFlow_0g6bxqw"> - <di:waypoint xsi:type="dc:Point" x="1238" y="859" /> - <di:waypoint xsi:type="dc:Point" x="1238" y="915" /> + <di:waypoint xsi:type="dc:Point" x="1406" y="658" /> + <di:waypoint xsi:type="dc:Point" x="1406" y="711" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1208" y="881" width="90" height="12" /> + <dc:Bounds x="1376" y="678.5" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0vi0sv6_di" bpmnElement="SequenceFlow_0vi0sv6"> @@ -280,172 +282,214 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="StartEvent_0sf5lpt_di" bpmnElement="StartEvent_0sf5lpt"> - <dc:Bounds x="513" y="387" width="36" height="36" /> + <dc:Bounds x="360" y="742" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="441" y="428" width="90" height="12" /> + <dc:Bounds x="288" y="783" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_06utmg4_di" bpmnElement="EndEvent_06utmg4"> - <dc:Bounds x="806" y="387" width="36" height="36" /> + <dc:Bounds x="653" y="742" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="734" y="428" width="90" height="12" /> + <dc:Bounds x="581" y="783" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ScriptTask_0nha3pr_di" bpmnElement="ScriptTask_0nha3pr"> - <dc:Bounds x="617" y="365" width="100" height="80" /> + <dc:Bounds x="464" y="720" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1921mo3_di" bpmnElement="SequenceFlow_1921mo3"> - <di:waypoint xsi:type="dc:Point" x="549" y="405" /> - <di:waypoint xsi:type="dc:Point" x="617" y="405" /> + <di:waypoint xsi:type="dc:Point" x="396" y="760" /> + <di:waypoint xsi:type="dc:Point" x="464" y="760" /> <bpmndi:BPMNLabel> - <dc:Bounds x="493" y="390" width="90" height="12" /> + <dc:Bounds x="340" y="745" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_18vlzfo_di" bpmnElement="SequenceFlow_18vlzfo"> - <di:waypoint xsi:type="dc:Point" x="717" y="405" /> - <di:waypoint xsi:type="dc:Point" x="806" y="405" /> + <di:waypoint xsi:type="dc:Point" x="564" y="760" /> + <di:waypoint xsi:type="dc:Point" x="653" y="760" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="520" y="745" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_0z30dax_di" bpmnElement="ScriptTask_0z30dax"> + <dc:Bounds x="470" y="111" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1dza4q4_di" bpmnElement="SequenceFlow_1dza4q4"> + <di:waypoint xsi:type="dc:Point" x="570" y="151" /> + <di:waypoint xsi:type="dc:Point" x="688" y="152" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="584" y="130.5" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1wnkgpx_di" bpmnElement="SequenceFlow_1wnkgpx"> + <di:waypoint xsi:type="dc:Point" x="576" y="378" /> + <di:waypoint xsi:type="dc:Point" x="688" y="378" /> <bpmndi:BPMNLabel> - <dc:Bounds x="673" y="390" width="90" height="12" /> + <dc:Bounds x="587" y="357" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="CallActivity_1x56smn_di" bpmnElement="CallActivity_Del_VFC"> - <dc:Bounds x="1188" y="483" width="100" height="80" /> + <bpmndi:BPMNShape id="ScriptTask_00301ai_di" bpmnElement="Task_0z1x3sg"> + <dc:Bounds x="476" y="338" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_1mwacgl_di" bpmnElement="Task_0963dho"> + <dc:Bounds x="688" y="338" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0v9q75y_di" bpmnElement="CallActivity_Del_SDNC_cust"> + <dc:Bounds x="688" y="112" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0p4b7e1_di" bpmnElement="Task_0edkv0m"> + <dc:Bounds x="1356" y="233" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0qquvgc_di" bpmnElement="SequenceFlow_0qquvgc"> - <di:waypoint xsi:type="dc:Point" x="1238" y="563" /> - <di:waypoint xsi:type="dc:Point" x="1238" y="642" /> + <bpmndi:BPMNShape id="ScriptTask_146jt8v_di" bpmnElement="ScriptTask_146jt8v"> + <dc:Bounds x="-26" y="-57" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_00tg69u_di" bpmnElement="ServiceTask_00tg69u"> + <dc:Bounds x="-26" y="67" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1ym9otf_di" bpmnElement="SequenceFlow_1ym9otf"> + <di:waypoint xsi:type="dc:Point" x="24" y="23" /> + <di:waypoint xsi:type="dc:Point" x="24" y="67" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1208" y="596.5" width="90" height="12" /> + <dc:Bounds x="-6" y="39" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_0vcz9mj_di" bpmnElement="ScriptTask_0vcz9mj"> - <dc:Bounds x="1188" y="338" width="100" height="80" /> + <bpmndi:BPMNShape id="CallActivity_076pc2z_di" bpmnElement="CallActivity_076pc2z"> + <dc:Bounds x="-357" y="-57" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1wmjau1_di" bpmnElement="SequenceFlow_1wmjau1"> - <di:waypoint xsi:type="dc:Point" x="1238" y="418" /> - <di:waypoint xsi:type="dc:Point" x="1238" y="483" /> + <bpmndi:BPMNEdge id="SequenceFlow_188ejvu_di" bpmnElement="SequenceFlow_188ejvu"> + <di:waypoint xsi:type="dc:Point" x="-257" y="-17" /> + <di:waypoint xsi:type="dc:Point" x="-193" y="-17" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1208" y="444.5" width="90" height="12" /> + <dc:Bounds x="-225" y="-38" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_0mdub03_di" bpmnElement="ScriptTask_0mdub03"> - <dc:Bounds x="1188" y="642" width="100" height="80" /> + <bpmndi:BPMNShape id="ScriptTask_0o5bglz_di" bpmnElement="ScriptTask_0o5bglz"> + <dc:Bounds x="-26" y="233" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_1g0tsto_di" bpmnElement="ScriptTask_1g0tsto"> - <dc:Bounds x="1188" y="-57" width="100" height="80" /> + <bpmndi:BPMNEdge id="SequenceFlow_1j08ko3_di" bpmnElement="SequenceFlow_1j08ko3"> + <di:waypoint xsi:type="dc:Point" x="24" y="147" /> + <di:waypoint xsi:type="dc:Point" x="24" y="233" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="39" y="184" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ExclusiveGateway_07toixi_di" bpmnElement="ExclusiveGateway_07toixi" isMarkerVisible="true"> + <dc:Bounds x="342.56962025316454" y="248" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="332" y="302" width="73" height="24" /> + </bpmndi:BPMNLabel> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_0z30dax_di" bpmnElement="ScriptTask_0z30dax"> - <dc:Bounds x="316" y="-57" width="100" height="80" /> + <bpmndi:BPMNShape id="ScriptTask_12q6a51_di" bpmnElement="ScriptTask_12q6a51"> + <dc:Bounds x="159" y="450" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1dza4q4_di" bpmnElement="SequenceFlow_1dza4q4"> - <di:waypoint xsi:type="dc:Point" x="416" y="-17" /> - <di:waypoint xsi:type="dc:Point" x="499" y="-17" /> + <bpmndi:BPMNEdge id="SequenceFlow_03c0zlq_di" bpmnElement="SequenceFlow_03c0zlq"> + <di:waypoint xsi:type="dc:Point" x="24" y="313" /> + <di:waypoint xsi:type="dc:Point" x="24" y="494" /> + <di:waypoint xsi:type="dc:Point" x="159" y="490" /> <bpmndi:BPMNLabel> - <dc:Bounds x="412.5" y="-38" width="90" height="12" /> + <dc:Bounds x="39" y="397.5" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0rpu756_di" bpmnElement="SequenceFlow_0rpu756"> - <di:waypoint xsi:type="dc:Point" x="599" y="-17" /> - <di:waypoint xsi:type="dc:Point" x="679" y="-16" /> + <bpmndi:BPMNEdge id="SequenceFlow_1htjmkv_di" bpmnElement="SequenceFlow_1htjmkv"> + <di:waypoint xsi:type="dc:Point" x="209" y="450" /> + <di:waypoint xsi:type="dc:Point" x="209" y="273" /> + <di:waypoint xsi:type="dc:Point" x="343" y="273" /> <bpmndi:BPMNLabel> - <dc:Bounds x="594" y="-37.5" width="90" height="12" /> + <dc:Bounds x="224" y="355.5" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1wnkgpx_di" bpmnElement="SequenceFlow_1wnkgpx"> - <di:waypoint xsi:type="dc:Point" x="1237" y="134" /> - <di:waypoint xsi:type="dc:Point" x="1238" y="192" /> + <bpmndi:BPMNEdge id="SequenceFlow_1ubor5z_di" bpmnElement="SequenceFlow_1ubor5z"> + <di:waypoint xsi:type="dc:Point" x="368" y="248" /> + <di:waypoint xsi:type="dc:Point" x="368" y="151" /> + <di:waypoint xsi:type="dc:Point" x="470" y="151" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1237.5" y="142" width="0" height="12" /> + <dc:Bounds x="366" y="193.5" width="35" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1931m8u_di" bpmnElement="SequenceFlow_1931m8u"> - <di:waypoint xsi:type="dc:Point" x="1237" y="272" /> - <di:waypoint xsi:type="dc:Point" x="1238" y="338" /> + <bpmndi:BPMNEdge id="SequenceFlow_1x3lehs_di" bpmnElement="SequenceFlow_1x3lehs"> + <di:waypoint xsi:type="dc:Point" x="368" y="298" /> + <di:waypoint xsi:type="dc:Point" x="368" y="378" /> + <di:waypoint xsi:type="dc:Point" x="476" y="378" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1237.5" y="284" width="0" height="12" /> + <dc:Bounds x="379" y="353" width="27" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_00301ai_di" bpmnElement="Task_0z1x3sg"> - <dc:Bounds x="1188" y="54" width="100" height="80" /> + <bpmndi:BPMNShape id="ScriptTask_0w46sge_di" bpmnElement="ScriptTask_0w46sge"> + <dc:Bounds x="865" y="233" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1m7tont_di" bpmnElement="SequenceFlow_1m7tont"> - <di:waypoint xsi:type="dc:Point" x="1238" y="23" /> - <di:waypoint xsi:type="dc:Point" x="1238" y="54" /> + <bpmndi:BPMNEdge id="SequenceFlow_1lxqjmp_di" bpmnElement="SequenceFlow_1lxqjmp"> + <di:waypoint xsi:type="dc:Point" x="788" y="152" /> + <di:waypoint xsi:type="dc:Point" x="827" y="152" /> + <di:waypoint xsi:type="dc:Point" x="827" y="273" /> + <di:waypoint xsi:type="dc:Point" x="865" y="273" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1253" y="32.5" width="0" height="12" /> + <dc:Bounds x="842" y="206.5" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="CallActivity_1mwacgl_di" bpmnElement="Task_0963dho"> - <dc:Bounds x="1188" y="192" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0vg4q7x_di" bpmnElement="SequenceFlow_0vg4q7x"> - <di:waypoint xsi:type="dc:Point" x="1238" y="722" /> - <di:waypoint xsi:type="dc:Point" x="1238" y="779" /> + <bpmndi:BPMNEdge id="SequenceFlow_0phwem2_di" bpmnElement="SequenceFlow_0phwem2"> + <di:waypoint xsi:type="dc:Point" x="788" y="378" /> + <di:waypoint xsi:type="dc:Point" x="827" y="378" /> + <di:waypoint xsi:type="dc:Point" x="827" y="273" /> + <di:waypoint xsi:type="dc:Point" x="865" y="273" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1253" y="744.5" width="0" height="12" /> + <dc:Bounds x="842" y="319.5" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ServiceTask_0v9q75y_di" bpmnElement="CallActivity_Del_SDNC_cust"> - <dc:Bounds x="499" y="-57" width="100" height="80" /> + <bpmndi:BPMNShape id="ExclusiveGateway_1hgjg3u_di" bpmnElement="ExclusiveGateway_1hgjg3u" isMarkerVisible="true"> + <dc:Bounds x="1040.9252217997464" y="248" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1029" y="302" width="74" height="24" /> + </bpmndi:BPMNLabel> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0d9lmlv_di" bpmnElement="SequenceFlow_0d9lmlv"> - <di:waypoint xsi:type="dc:Point" x="779" y="-16" /> - <di:waypoint xsi:type="dc:Point" x="855" y="-17" /> + <bpmndi:BPMNEdge id="SequenceFlow_0l5r96s_di" bpmnElement="SequenceFlow_0l5r96s"> + <di:waypoint xsi:type="dc:Point" x="965" y="273" /> + <di:waypoint xsi:type="dc:Point" x="1041" y="273" /> <bpmndi:BPMNLabel> - <dc:Bounds x="772" y="-37.5" width="90" height="12" /> + <dc:Bounds x="1003" y="252" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1g4djgh_di" bpmnElement="SequenceFlow_1g4djgh"> - <di:waypoint xsi:type="dc:Point" x="955" y="-17" /> - <di:waypoint xsi:type="dc:Point" x="1021" y="-17" /> + <bpmndi:BPMNShape id="ExclusiveGateway_16046vb_di" bpmnElement="ExclusiveGateway_16046vb" isMarkerVisible="true"> + <dc:Bounds x="1203.8174904942966" y="248.28010139416983" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1187" y="302" width="83" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1icwpye_di" bpmnElement="SequenceFlow_1icwpye"> + <di:waypoint xsi:type="dc:Point" x="1254" y="273" /> + <di:waypoint xsi:type="dc:Point" x="1356" y="273" /> <bpmndi:BPMNLabel> - <dc:Bounds x="943" y="-38" width="90" height="12" /> + <dc:Bounds x="1297" y="252" width="19" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0uc2beq_di" bpmnElement="SequenceFlow_0uc2beq"> - <di:waypoint xsi:type="dc:Point" x="1121" y="-17" /> - <di:waypoint xsi:type="dc:Point" x="1188" y="-17" /> + <bpmndi:BPMNEdge id="SequenceFlow_1ev7z6q_di" bpmnElement="SequenceFlow_1ev7z6q"> + <di:waypoint xsi:type="dc:Point" x="1406" y="313" /> + <di:waypoint xsi:type="dc:Point" x="1406" y="448" /> + <di:waypoint xsi:type="dc:Point" x="1406" y="448" /> + <di:waypoint xsi:type="dc:Point" x="1406" y="578" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1109.5" y="-38" width="90" height="12" /> + <dc:Bounds x="1421" y="442" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_1e5z0wu_di" bpmnElement="Task_14erap6"> - <dc:Bounds x="679" y="-56" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ServiceTask_0f0965f_di" bpmnElement="Task_1j1u666"> - <dc:Bounds x="855" y="-57" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ServiceTask_0p4b7e1_di" bpmnElement="Task_0edkv0m"> - <dc:Bounds x="1021" y="-57" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_146jt8v_di" bpmnElement="ScriptTask_146jt8v"> - <dc:Bounds x="-26" y="-57" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ServiceTask_00tg69u_di" bpmnElement="ServiceTask_00tg69u"> - <dc:Bounds x="144" y="-57" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1ym9otf_di" bpmnElement="SequenceFlow_1ym9otf"> - <di:waypoint xsi:type="dc:Point" x="74" y="-17" /> - <di:waypoint xsi:type="dc:Point" x="144" y="-17" /> + <bpmndi:BPMNEdge id="SequenceFlow_0oj2anh_di" bpmnElement="SequenceFlow_0oj2anh"> + <di:waypoint xsi:type="dc:Point" x="1229" y="298" /> + <di:waypoint xsi:type="dc:Point" x="1229" y="618" /> + <di:waypoint xsi:type="dc:Point" x="1356" y="618" /> <bpmndi:BPMNLabel> - <dc:Bounds x="64" y="-38" width="90" height="12" /> + <dc:Bounds x="1238" y="452.30710172744716" width="12" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0l4w9nr_di" bpmnElement="SequenceFlow_0l4w9nr"> - <di:waypoint xsi:type="dc:Point" x="244" y="-17" /> - <di:waypoint xsi:type="dc:Point" x="316" y="-17" /> + <bpmndi:BPMNEdge id="SequenceFlow_0talboa_di" bpmnElement="SequenceFlow_0talboa"> + <di:waypoint xsi:type="dc:Point" x="1091" y="273" /> + <di:waypoint xsi:type="dc:Point" x="1204" y="273" /> <bpmndi:BPMNLabel> - <dc:Bounds x="235" y="-38" width="90" height="12" /> + <dc:Bounds x="1138" y="252" width="19" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="CallActivity_076pc2z_di" bpmnElement="CallActivity_076pc2z"> - <dc:Bounds x="-357" y="-57" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_188ejvu_di" bpmnElement="SequenceFlow_188ejvu"> - <di:waypoint xsi:type="dc:Point" x="-257" y="-17" /> - <di:waypoint xsi:type="dc:Point" x="-193" y="-17" /> + <bpmndi:BPMNEdge id="SequenceFlow_0s1lswk_di" bpmnElement="SequenceFlow_0s1lswk"> + <di:waypoint xsi:type="dc:Point" x="1066" y="298" /> + <di:waypoint xsi:type="dc:Point" x="1066" y="490" /> + <di:waypoint xsi:type="dc:Point" x="259" y="490" /> <bpmndi:BPMNLabel> - <dc:Bounds x="-225" y="-38" width="0" height="12" /> + <dc:Bounds x="1075" y="388" width="12" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> diff --git a/common/src/main/java/org/openecomp/mso/logger/MsoLoggingServlet.java b/common/src/main/java/org/openecomp/mso/logger/MsoLoggingServlet.java index 5687775048..dd42efbfda 100644 --- a/common/src/main/java/org/openecomp/mso/logger/MsoLoggingServlet.java +++ b/common/src/main/java/org/openecomp/mso/logger/MsoLoggingServlet.java @@ -95,7 +95,8 @@ public class MsoLoggingServlet { List <Logger> loggerList = context.getLoggerList(); for (Logger logger:loggerList) { //if (logger.getLevel() != null) { - response.append (logger.getName () + ":" + logger.getLevel () + " (" + logger.getEffectiveLevel () + ")\n"); + response.append(logger.getName()).append(":").append(logger.getLevel()).append(" (") + .append(logger.getEffectiveLevel()).append(")\n"); //} } return Response.status (200).entity (response).build (); diff --git a/common/src/main/java/org/openecomp/mso/properties/MsoJsonProperties.java b/common/src/main/java/org/openecomp/mso/properties/MsoJsonProperties.java index c0997f31d9..8da155fe08 100644 --- a/common/src/main/java/org/openecomp/mso/properties/MsoJsonProperties.java +++ b/common/src/main/java/org/openecomp/mso/properties/MsoJsonProperties.java @@ -159,9 +159,9 @@ public class MsoJsonProperties extends AbstractMsoProperties { @Override public String toString() { - StringBuffer response = new StringBuffer(); - response.append("Config file " + propertiesFileName + "(Timer:" + automaticRefreshInMinutes + "mins):" - + System.getProperty("line.separator")); + StringBuilder response = new StringBuilder(); + response.append("Config file ").append(propertiesFileName).append("(Timer:").append(automaticRefreshInMinutes) + .append("mins):").append(System.getProperty("line.separator")); response.append(this.jsonRootNode.toString()); response.append(System.getProperty("line.separator")); response.append(System.getProperty("line.separator")); diff --git a/common/src/main/java/org/openecomp/mso/utils/CryptoUtils.java b/common/src/main/java/org/openecomp/mso/utils/CryptoUtils.java index 42cd190e95..5d0ff5b79e 100644 --- a/common/src/main/java/org/openecomp/mso/utils/CryptoUtils.java +++ b/common/src/main/java/org/openecomp/mso/utils/CryptoUtils.java @@ -72,13 +72,13 @@ public final class CryptoUtils { } public static String byteArrayToHexString (byte[] b) { - StringBuffer sb = new StringBuffer (b.length * 2); - for (int i = 0; i < b.length; i++) { - int v = b[i] & 0xff; + StringBuilder sb = new StringBuilder(b.length * 2); + for (byte aB : b) { + int v = aB & 0xff; if (v < 16) { - sb.append ('0'); + sb.append('0'); } - sb.append (Integer.toHexString (v)); + sb.append(Integer.toHexString(v)); } return sb.toString ().toUpperCase (); } diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaVIDRequest.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaVIDRequest.java index fd1227ec13..3ef6d4974c 100644 --- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaVIDRequest.java +++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaVIDRequest.java @@ -38,7 +38,7 @@ import org.openecomp.mso.apihandler.common.CommonConstants; CommonConstants.VOLUME_GROUP_ID_VARIABLE, CommonConstants.NETWORK_ID_VARIABLE, CommonConstants.SERVICE_TYPE_VARIABLE, CommonConstants.VNF_TYPE_VARIABLE, CommonConstants.VF_MODULE_TYPE_VARIABLE, CommonConstants.NETWORK_TYPE_VARIABLE, - CommonConstants.CAMUNDA_SERVICE_INPUT}) + CommonConstants.CAMUNDA_SERVICE_INPUT, CommonConstants.RECIPE_PARAMS}) @JsonRootName(CommonConstants.CAMUNDA_ROOT_INPUT) public class CamundaVIDRequest { @@ -91,6 +91,9 @@ public class CamundaVIDRequest { @JsonProperty(CommonConstants.NETWORK_TYPE_VARIABLE) private CamundaInput networkType; + @JsonProperty(CommonConstants.RECIPE_PARAMS) + private CamundaInput recipeParams; + @JsonProperty(CommonConstants.CAMUNDA_SERVICE_INPUT) public CamundaInput getServiceInput() { return serviceInput; @@ -250,8 +253,17 @@ public class CamundaVIDRequest { this.networkType = networkType; } + @JsonProperty(CommonConstants.RECIPE_PARAMS) + public CamundaInput getRecipeParams() { + return recipeParams; + } - @Override + @JsonProperty(CommonConstants.RECIPE_PARAMS) + public void setRecipeParams(CamundaInput recipeParams) { + this.recipeParams = recipeParams; + } + + @Override public String toString() { //return "CamundaRequest [requestId=" + + ", host=" // + host + ", schema=" + schema + ", reqid=" + reqid + ", svcid=" diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/BPELRestClient.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/BPELRestClient.java index ddeb359071..cc68a45d19 100644 --- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/BPELRestClient.java +++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/BPELRestClient.java @@ -89,7 +89,7 @@ public class BPELRestClient extends RequestClient { int recipeTimeout, String requestAction, String serviceInstanceId, String vnfId, String vfModuleId, String volumeGroupId, String networkId, String serviceType, String vnfType, String vfModuleType, String networkType, - String requestDetails) { + String requestDetails, String recipeParamXsd) { return null; } diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaClient.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaClient.java index b9c0725766..371d3162de 100644 --- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaClient.java +++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaClient.java @@ -98,13 +98,13 @@ public class CamundaClient extends RequestClient{ int recipeTimeout, String requestAction, String serviceInstanceId, String vnfId, String vfModuleId, String volumeGroupId, String networkId, String serviceType, String vnfType, String vfModuleType, String networkType, - String requestDetails) + String requestDetails, String recipeParamXsd) throws ClientProtocolException, IOException{ HttpPost post = new HttpPost(url); msoLogger.debug(CAMUNDA_URL_MESAGE + url); String jsonReq = wrapVIDRequest(requestId, isBaseVfModule, recipeTimeout, requestAction, serviceInstanceId, vnfId, vfModuleId, volumeGroupId, networkId, - serviceType, vnfType, vfModuleType, networkType, requestDetails); + serviceType, vnfType, vfModuleType, networkType, requestDetails, recipeParamXsd); StringEntity input = new StringEntity(jsonReq); input.setContentType(CommonConstants.CONTENT_TYPE_JSON); @@ -178,7 +178,7 @@ public class CamundaClient extends RequestClient{ int recipeTimeout, String requestAction, String serviceInstanceId, String vnfId, String vfModuleId, String volumeGroupId, String networkId, String serviceType, String vnfType, String vfModuleType, String networkType, - String requestDetails){ + String requestDetails, String recipeParams){ String jsonReq = null; if(requestId == null){ requestId =""; @@ -236,7 +236,7 @@ public class CamundaClient extends RequestClient{ CamundaInput vnfTypeInput = new CamundaInput(); CamundaInput vfModuleTypeInput = new CamundaInput(); CamundaInput networkTypeInput = new CamundaInput(); - + CamundaInput recipeParamsInput = new CamundaInput(); host.setValue(parseURL()); requestIdInput.setValue(requestId); isBaseVfModuleInput.setValue(isBaseVfModule); @@ -251,7 +251,7 @@ public class CamundaClient extends RequestClient{ vnfTypeInput.setValue(vnfType); vfModuleTypeInput.setValue(vfModuleType); networkTypeInput.setValue(networkType); - + recipeParamsInput.setValue(recipeParams); serviceInput.setValue(requestDetails); camundaRequest.setServiceInput(serviceInput); camundaRequest.setHost(host); @@ -269,7 +269,7 @@ public class CamundaClient extends RequestClient{ camundaRequest.setVnfType(vnfTypeInput); camundaRequest.setVfModuleType(vfModuleTypeInput); camundaRequest.setNetworkType(networkTypeInput); - + camundaRequest.setRecipeParams(recipeParamsInput); ObjectMapper mapper = new ObjectMapper(); mapper.configure(SerializationConfig.Feature.WRAP_ROOT_VALUE, true); diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaTaskClient.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaTaskClient.java index 64193cf6c4..364169d4c1 100644 --- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaTaskClient.java +++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaTaskClient.java @@ -74,7 +74,7 @@ public class CamundaTaskClient extends RequestClient{ int recipeTimeout, String requestAction, String serviceInstanceId,
String vnfId, String vfModuleId, String volumeGroupId, String networkId,
String serviceType, String vnfType, String vfModuleType, String networkType,
- String requestDetails)
+ String requestDetails, String recipeParamXsd)
throws ClientProtocolException, IOException{
msoLogger.debug("Method not supported");
return null;
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CommonConstants.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CommonConstants.java index 91bd226c30..cfbe892e68 100644 --- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CommonConstants.java +++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CommonConstants.java @@ -63,6 +63,7 @@ public final class CommonConstants { public static final String VF_MODULE_TYPE_VARIABLE = "vfModuleType"; public static final String NETWORK_TYPE_VARIABLE = "networkType"; public static final String REQUEST_DETAILS_VARIABLE = "requestDetails"; + public static final String RECIPE_PARAMS = "recipeParams"; private CommonConstants () { // prevent creating an instance of this class diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/RequestClient.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/RequestClient.java index addf4e11a5..eaf8be76a3 100644 --- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/RequestClient.java +++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/RequestClient.java @@ -74,7 +74,7 @@ public abstract class RequestClient { int recipeTimeout, String requestAction, String serviceInstanceId, String vnfId, String vfModuleId, String volumeGroupId, String networkId, String serviceType, String vnfType, String vfModuleType, String networkType, - String requestDetails) + String requestDetails, String recipeParamXsd) throws ClientProtocolException, IOException; public abstract HttpResponse get() diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java index 403e9407a6..0914516598 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java @@ -314,7 +314,7 @@ public class E2EServiceInstances { response = requestClient.post(requestId, false, recipeLookupResult.getRecipeTimeout(), action.name(), serviceId, null, null, null, null, serviceInstanceType, - null, null, null, bpmnRequest); + null, null, null, bpmnRequest, recipeLookupResult.getRecipeParamXsd()); msoLogger.recordMetricEvent(subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, @@ -542,7 +542,7 @@ public class E2EServiceInstances { msoLogger.debug("MSO API Handler Posting call to BPEL engine for url: " + requestClient.getUrl()); response = requestClient.post(requestId, false, recipeLookupResult.getRecipeTimeout(), action.name(), - serviceId, null, null, null, null, serviceInstanceType, null, null, null, sirRequestJson); + serviceId, null, null, null, null, serviceInstanceType, null, null, null, sirRequestJson, recipeLookupResult.getRecipeParamXsd()); msoLogger.recordMetricEvent(subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from BPMN engine", "BPMN", recipeLookupResult.getOrchestrationURI(), @@ -723,7 +723,7 @@ public class E2EServiceInstances { return null; } return new RecipeLookupResult(recipe.getOrchestrationUri(), - recipe.getRecipeTimeout()); + recipe.getRecipeTimeout(), recipe.getServiceParamXSD()); } diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java index 7d45c4b0a2..79ac76ff04 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java @@ -738,7 +738,7 @@ public class MsoRequest { if ((status == Status.FAILED) || (status == Status.COMPLETE)) { aq.setStatusMessage (this.errorMessage); aq.setResponseBody (this.responseBody); - aq.setProgress(new Long(100)); + aq.setProgress(100L); Timestamp endTimeStamp = new Timestamp (System.currentTimeMillis()); aq.setEndTime (endTimeStamp); diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkInfoHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkInfoHandler.java index bcea8fd8d5..4e1468c4e9 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkInfoHandler.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkInfoHandler.java @@ -295,8 +295,8 @@ public class NetworkInfoHandler { private String translateNetworkRequests (List <NetworkRequest> queryResponseList) { NetworkRequests queryResponses = new NetworkRequests (); - for (int i = 0; i < queryResponseList.size (); i++) { - queryResponses.getNetworkRequest ().add (queryResponseList.get (i)); + for (NetworkRequest aQueryResponseList : queryResponseList) { + queryResponses.getNetworkRequest().add(aQueryResponseList); } StringWriter stringWriter = new StringWriter (); diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkRequestHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkRequestHandler.java index 981fee9fb6..79247deca8 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkRequestHandler.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkRequestHandler.java @@ -323,8 +323,8 @@ public class NetworkRequestHandler { private String translateNetworkRequests (List <NetworkRequest> queryResponseList) { NetworkRequests queryResponses = new NetworkRequests (); - for (int i = 0; i < queryResponseList.size (); i++) { - queryResponses.getNetworkRequest ().add (queryResponseList.get (i)); + for (NetworkRequest aQueryResponseList : queryResponseList) { + queryResponses.getNetworkRequest().add(aQueryResponseList); } StringWriter stringWriter = new StringWriter (); diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkTypesHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkTypesHandler.java index b01c6d6e2a..43f2d2afbb 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkTypesHandler.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkTypesHandler.java @@ -78,13 +78,13 @@ public class NetworkTypesHandler { ObjectFactory beansObjectFactory = new ObjectFactory (); NetworkTypes networkTypes = beansObjectFactory.createNetworkTypes (); - for (int i = 0; i < networkResources.size (); i++) { - NetworkType networkType = beansObjectFactory.createNetworkType (); - NetworkResource vr = networkResources.get (i); - networkType.setType (vr.getModelName()); - networkType.setDescription (vr.getDescription ()); - networkType.setId (String.valueOf (vr.getModelUUID())); - networkTypes.getNetworkType ().add (networkType); + for (NetworkResource networkResource : networkResources) { + NetworkType networkType = beansObjectFactory.createNetworkType(); + NetworkResource vr = networkResource; + networkType.setType(vr.getModelName()); + networkType.setDescription(vr.getDescription()); + networkType.setId(String.valueOf(vr.getModelUUID())); + networkTypes.getNetworkType().add(networkType); } StringWriter stringWriter = new StringWriter (); diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/RecipeLookupResult.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/RecipeLookupResult.java index ac4c01175a..2a02344ab3 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/RecipeLookupResult.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/RecipeLookupResult.java @@ -25,12 +25,20 @@ public class RecipeLookupResult { private String orchestrationURI; private int recipeTimeout; + // the service recipe param. + private String recipeParamXsd; public RecipeLookupResult(String orchestrationURI, int recipeTimeout) { this.orchestrationURI = orchestrationURI; this.recipeTimeout = recipeTimeout; } + public RecipeLookupResult(String orchestrationURI, int recipeTimeout, String recipeParamXsd) { + this.orchestrationURI = orchestrationURI; + this.recipeTimeout = recipeTimeout; + this.recipeParamXsd = recipeParamXsd; + } + public String getOrchestrationURI () { return orchestrationURI; } @@ -46,5 +54,23 @@ public class RecipeLookupResult { public void setRecipeTimeout (int recipeTimeout) { this.recipeTimeout = recipeTimeout; } + + + /** + * @return Returns the recipeParamXsd. + */ + public String getRecipeParamXsd() { + return recipeParamXsd; + } + + + /** + * @param recipeParamXsd The recipeParamXsd to set. + */ + public void setRecipeParamXsd(String recipeParamXsd) { + this.recipeParamXsd = recipeParamXsd; + } + + } diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java index 6f6d2972d1..287b0ad812 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java @@ -633,7 +633,7 @@ public class ServiceInstances { serviceInstanceId, vnfId, vfModuleId, volumeGroupId, networkId, msoRequest.getServiceInstanceType (), msoRequest.getVnfType (), msoRequest.getVfModuleType (), - msoRequest.getNetworkType (), msoRequest.getRequestJSON()); + msoRequest.getNetworkType (), msoRequest.getRequestJSON(), null); msoLogger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from BPMN engine", "BPMN", recipeLookupResult.getOrchestrationURI (), null); } catch (Exception e) { diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VfModuleModelNamesHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VfModuleModelNamesHandler.java index 57720dcfba..df51a8f96a 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VfModuleModelNamesHandler.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VfModuleModelNamesHandler.java @@ -74,17 +74,17 @@ public class VfModuleModelNamesHandler { ObjectFactory beansObjectFactory = new ObjectFactory (); VfModuleModelNames vfModuleModelNames = beansObjectFactory.createVfModuleModelNames (); - for (int i = 0; i < vfModules.size (); i++) { - VfModuleModelName vfModuleModelName = beansObjectFactory.createVfModuleModelName (); - VfModule vm = vfModules.get (i); - vfModuleModelName.setModelName (vm.getModelName ()); - vfModuleModelName.setModelVersion (vm.getVersion ()); - vfModuleModelName.setModelInvariantUuid (vm.getModelInvariantUuid ()); + for (VfModule vfModule : vfModules) { + VfModuleModelName vfModuleModelName = beansObjectFactory.createVfModuleModelName(); + VfModule vm = vfModule; + vfModuleModelName.setModelName(vm.getModelName()); + vfModuleModelName.setModelVersion(vm.getVersion()); + vfModuleModelName.setModelInvariantUuid(vm.getModelInvariantUuid()); vfModuleModelName.setIsBase(vm.isBase()); - vfModuleModelName.setDescription (vm.getDescription ()); - vfModuleModelName.setId (String.valueOf (vm.getModelUUID())); - vfModuleModelName.setAsdcServiceModelVersion(vm.getVersion ()); - vfModuleModelNames.getVfModuleModelName ().add (vfModuleModelName); + vfModuleModelName.setDescription(vm.getDescription()); + vfModuleModelName.setId(String.valueOf(vm.getModelUUID())); + vfModuleModelName.setAsdcServiceModelVersion(vm.getVersion()); + vfModuleModelNames.getVfModuleModelName().add(vfModuleModelName); } StringWriter stringWriter = new StringWriter (); diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfInfoHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfInfoHandler.java index 7071ed50c3..a5e1f6f4e2 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfInfoHandler.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfInfoHandler.java @@ -332,8 +332,8 @@ public class VnfInfoHandler { private String translateVnfRequests (List <VnfRequest> queryResponseList) { VnfRequests queryResponses = new VnfRequests (); - for (int i = 0; i < queryResponseList.size (); i++) { - queryResponses.getVnfRequest ().add (queryResponseList.get (i)); + for (VnfRequest aQueryResponseList : queryResponseList) { + queryResponses.getVnfRequest().add(aQueryResponseList); } StringWriter stringWriter = new StringWriter (); diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfRequestHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfRequestHandler.java index a55c13baed..7a61c641ae 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfRequestHandler.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfRequestHandler.java @@ -363,8 +363,8 @@ public class VnfRequestHandler { private String translateVnfRequests (List <VnfRequest> queryResponseList) { VnfRequests queryResponses = new VnfRequests (); - for (int i = 0; i < queryResponseList.size (); i++) { - queryResponses.getVnfRequest ().add (queryResponseList.get (i)); + for (VnfRequest aQueryResponseList : queryResponseList) { + queryResponses.getVnfRequest().add(aQueryResponseList); } StringWriter stringWriter = new StringWriter (); diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfTypesHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfTypesHandler.java index 44cf038ef8..3d87d131b3 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfTypesHandler.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfTypesHandler.java @@ -85,12 +85,12 @@ public class VnfTypesHandler { ObjectFactory beansObjectFactory = new ObjectFactory (); VnfTypes vnfTypes = beansObjectFactory.createVnfTypes (); - for (int i = 0; i < vnfResources.size (); i++) { - VnfType vnfType = beansObjectFactory.createVnfType (); - VnfResource vr = vnfResources.get (i); - vnfType.setDescription (vr.getDescription ()); - vnfType.setId (String.valueOf (vr.getModelUuid())); - vnfTypes.getVnfType ().add (vnfType); + for (VnfResource vnfResource : vnfResources) { + VnfType vnfType = beansObjectFactory.createVnfType(); + VnfResource vr = vnfResource; + vnfType.setDescription(vr.getDescription()); + vnfType.setId(String.valueOf(vr.getModelUuid())); + vnfTypes.getVnfType().add(vnfType); } StringWriter stringWriter = new StringWriter (); diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeInfoHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeInfoHandler.java index 6618fcfb00..3de945a275 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeInfoHandler.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeInfoHandler.java @@ -314,8 +314,8 @@ public class VolumeInfoHandler { private String translateVolumeRequests (List <VolumeRequest> queryResponseList) { VolumeRequests queryResponses = new VolumeRequests (); - for (int i = 0; i < queryResponseList.size (); i++) { - queryResponses.getVolumeRequest ().add (queryResponseList.get (i)); + for (VolumeRequest aQueryResponseList : queryResponseList) { + queryResponses.getVolumeRequest().add(aQueryResponseList); } StringWriter stringWriter = new StringWriter (); diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeRequestHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeRequestHandler.java index 2c1f506943..3fa4a7a9e8 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeRequestHandler.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeRequestHandler.java @@ -346,8 +346,8 @@ public class VolumeRequestHandler { private String translateVolumeRequests (List <VolumeRequest> queryResponseList) { VolumeRequests queryResponses = new VolumeRequests (); - for (int i = 0; i < queryResponseList.size (); i++) { - queryResponses.getVolumeRequest ().add (queryResponseList.get (i)); + for (VolumeRequest aQueryResponseList : queryResponseList) { + queryResponses.getVolumeRequest().add(aQueryResponseList); } StringWriter stringWriter = new StringWriter (); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstancesTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstancesTest.java index 238b6b677c..21c59ac6d5 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstancesTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstancesTest.java @@ -110,7 +110,7 @@ public class E2EServiceInstancesTest { String serviceInstanceId, String vnfId, String vfModuleId,
String volumeGroupId, String networkId, String serviceType,
String vnfType, String vfModuleType, String networkType,
- String requestDetails) {
+ String requestDetails, String recipeParamXsd) {
ProtocolVersion pv = new ProtocolVersion("HTTP", 1, 1);
HttpResponse resp = new BasicHttpResponse(pv, 202,
"test response");
@@ -181,7 +181,7 @@ public class E2EServiceInstancesTest { String serviceInstanceId, String vnfId, String vfModuleId,
String volumeGroupId, String networkId, String serviceType,
String vnfType, String vfModuleType, String networkType,
- String requestDetails) {
+ String requestDetails, String recipeParamXsd) {
ProtocolVersion pv = new ProtocolVersion("HTTP", 1, 1);
HttpResponse resp = new BasicHttpResponse(pv, 500,
"test response");
@@ -252,7 +252,7 @@ public class E2EServiceInstancesTest { String serviceInstanceId, String vnfId, String vfModuleId,
String volumeGroupId, String networkId, String serviceType,
String vnfType, String vfModuleType, String networkType,
- String requestDetails) {
+ String requestDetails, String recipeParamXsd) {
ProtocolVersion pv = new ProtocolVersion("HTTP", 1, 1);
HttpResponse resp = new BasicHttpResponse(pv, 500,
"test response");
@@ -323,7 +323,7 @@ public class E2EServiceInstancesTest { String serviceInstanceId, String vnfId, String vfModuleId,
String volumeGroupId, String networkId, String serviceType,
String vnfType, String vfModuleType, String networkType,
- String requestDetails) {
+ String requestDetails, String recipeParamXsd) {
HttpResponse resp = null;
return resp;
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/NetworkRequestHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/NetworkRequestHandlerTest.java index 3c5c89fc92..89d4d0c98f 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/NetworkRequestHandlerTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/NetworkRequestHandlerTest.java @@ -184,7 +184,7 @@ UriInfo uriInfo = null; req.setAaiServiceId("299392"); req.setAction("CREATE"); req.setRequestStatus("COMPLETE"); - req.setProgress(10001l); + req.setProgress(10001L); req.setSource("test"); req.setStartTime(new Timestamp(10020100)); req.setEndTime(new Timestamp(20020100)); @@ -206,7 +206,7 @@ UriInfo uriInfo = null; req.setAaiServiceId("299392"); req.setAction("CREATE"); req.setRequestStatus("COMPLETE"); - req.setProgress(10001l); + req.setProgress(10001L); req.setSource("test"); req.setStartTime(new Timestamp(10020100)); req.setEndTime(new Timestamp(20020100)); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/ServiceInstanceTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/ServiceInstanceTest.java index 08abf5702f..27d395857b 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/ServiceInstanceTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/ServiceInstanceTest.java @@ -216,7 +216,7 @@ public class ServiceInstanceTest { int recipeTimeout, String requestAction, String serviceInstanceId,
String vnfId, String vfModuleId, String volumeGroupId, String networkId,
String serviceType, String vnfType, String vfModuleType, String networkType,
- String requestDetails){
+ String requestDetails, String recipeParamXsd){
ProtocolVersion pv = new ProtocolVersion("HTTP",1,1);
HttpResponse resp = new BasicHttpResponse(pv,200, "test response");
BasicHttpEntity entity = new BasicHttpEntity();
@@ -286,7 +286,7 @@ public class ServiceInstanceTest { int recipeTimeout, String requestAction, String serviceInstanceId,
String vnfId, String vfModuleId, String volumeGroupId, String networkId,
String serviceType, String vnfType, String vfModuleType, String networkType,
- String requestDetails){
+ String requestDetails, String recipeParamXsd){
ProtocolVersion pv = new ProtocolVersion("HTTP",1,1);
HttpResponse resp = new BasicHttpResponse(pv,500, "test response");
BasicHttpEntity entity = new BasicHttpEntity();
@@ -357,7 +357,7 @@ public class ServiceInstanceTest { int recipeTimeout, String requestAction, String serviceInstanceId,
String vnfId, String vfModuleId, String volumeGroupId, String networkId,
String serviceType, String vnfType, String vfModuleType, String networkType,
- String requestDetails){
+ String requestDetails, String recipeParamXsd){
ProtocolVersion pv = new ProtocolVersion("HTTP",1,1);
HttpResponse resp = new BasicHttpResponse(pv,500, "test response");
BasicHttpEntity entity = new BasicHttpEntity();
@@ -428,7 +428,7 @@ public class ServiceInstanceTest { int recipeTimeout, String requestAction, String serviceInstanceId,
String vnfId, String vfModuleId, String volumeGroupId, String networkId,
String serviceType, String vnfType, String vfModuleType, String networkType,
- String requestDetails){
+ String requestDetails, String recipeParamXsd){
return null;
}
};
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/VnfRequestHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/VnfRequestHandlerTest.java index 2d3a2a47a5..205bb8d910 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/VnfRequestHandlerTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/VnfRequestHandlerTest.java @@ -182,7 +182,7 @@ public class VnfRequestHandlerTest { req.setAaiServiceId("299392"); req.setAction("CREATE"); req.setRequestStatus("COMPLETE"); - req.setProgress(10001l); + req.setProgress(10001L); req.setSource("test"); req.setStartTime(new Timestamp(10020100)); req.setEndTime(new Timestamp(20020100)); @@ -207,7 +207,7 @@ public class VnfRequestHandlerTest { req.setAaiServiceId("299392"); req.setAction("CREATE"); req.setRequestStatus("COMPLETE"); - req.setProgress(10001l); + req.setProgress(10001L); req.setSource("test"); req.setStartTime(new Timestamp(10020100)); req.setEndTime(new Timestamp(20020100)); @@ -229,7 +229,7 @@ public class VnfRequestHandlerTest { req.setAaiServiceId("299392"); req.setAction("CREATE"); req.setRequestStatus("COMPLETE"); - req.setProgress(10001l); + req.setProgress(10001L); req.setSource("test"); req.setStartTime(new Timestamp(10020100)); req.setEndTime(new Timestamp(20020100)); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/VolumeRequestHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/VolumeRequestHandlerTest.java index bf4d7c4d98..fa6b06b4b2 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/VolumeRequestHandlerTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/VolumeRequestHandlerTest.java @@ -156,7 +156,7 @@ public class VolumeRequestHandlerTest { req.setAaiServiceId("299392"); req.setAction("CREATE"); req.setRequestStatus("COMPLETE"); - req.setProgress(10001l); + req.setProgress(10001L); req.setSource("test"); req.setStartTime(new Timestamp(10020100)); req.setEndTime(new Timestamp(20020100)); @@ -177,7 +177,7 @@ public class VolumeRequestHandlerTest { req.setAaiServiceId("299392"); req.setAction("CREATE"); req.setRequestStatus("COMPLETE"); - req.setProgress(10001l); + req.setProgress(10001L); req.setSource("test"); req.setStartTime(new Timestamp(10020100)); req.setEndTime(new Timestamp(20020100)); @@ -197,7 +197,7 @@ public class VolumeRequestHandlerTest { req.setAaiServiceId("299392"); req.setAction("CREATE"); req.setRequestStatus("COMPLETE"); - req.setProgress(10001l); + req.setProgress(10001L); req.setSource("test"); req.setStartTime(new Timestamp(10020100)); req.setEndTime(new Timestamp(20020100)); diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/RequestsDatabase.java b/mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/RequestsDatabase.java index 98121d8490..d9448d06fa 100644 --- a/mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/RequestsDatabase.java +++ b/mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/RequestsDatabase.java @@ -38,6 +38,7 @@ import org.hibernate.criterion.Criterion; import org.hibernate.criterion.Order; import org.hibernate.criterion.Restrictions; import org.openecomp.mso.db.AbstractSessionFactoryManager; +import org.openecomp.mso.requestsdb.RequestsDbConstant.Status; import org.openecomp.mso.requestsdb.RequestsDbSessionFactoryManager; import org.openecomp.mso.logger.MsoLogger; @@ -757,9 +758,9 @@ public class RequestsDatabase { int resourceCount = lstResourceStatus.size(); int progress = 0; boolean isFinished = true; - for(int i = 0; i < resourceCount; i++) { - progress = progress + Integer.valueOf(lstResourceStatus.get(i).getProgress()) / resourceCount; - if(RequestsDbConstant.Status.PROCESSING.equals(lstResourceStatus.get(i).getStatus())) { + for (ResourceOperationStatus lstResourceStatu : lstResourceStatus) { + progress = progress + Integer.valueOf(lstResourceStatu.getProgress()) / resourceCount; + if (Status.PROCESSING.equals(lstResourceStatu.getStatus())) { isFinished = false; } } diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java index 891b0b27fb..f59c09a418 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java @@ -3464,7 +3464,7 @@ public class CatalogDatabase implements Closeable { StringBuilder sb = new StringBuilder("Parameters: "); for (HeatTemplateParam param : paramSet) { param.setHeatTemplateArtifactUuid(heat.getArtifactUuid()); - sb.append(param.getParamName() + ", "); + sb.append(param.getParamName()).append(", "); } LOGGER.debug(sb.toString()); heat.setParameters (paramSet); @@ -3822,7 +3822,58 @@ public class CatalogDatabase implements Closeable { LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getToscaCsar", null); return resultList.get (0); } + + /** + * Return a specific Tosca CSAR Record resource (queried by atrifact uuid). + * + * @param toscaCsarArtifactUUID the artifact uuid of the tosca csar + * @return ToscaCsar object or null if none found + */ + public ToscaCsar getToscaCsarByUUID(String toscaCsarArtifactUUID){ + long startTime = System.currentTimeMillis (); + LOGGER.debug ("Catalog database - get Tosca CSAR record with artifactUUID " + toscaCsarArtifactUUID); + + String hql = "FROM ToscaCsar WHERE artifactUUID = :toscaCsarArtifactUUID"; + Query query = getSession ().createQuery (hql); + query.setParameter ("toscaCsarArtifactUUID", toscaCsarArtifactUUID); + @SuppressWarnings("unchecked") + List <ToscaCsar> resultList = query.list (); + + // See if something came back. Name is unique, so + if (resultList.isEmpty ()) { + LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. Tosca Csar not found", "CatalogDB", "getToscaCsarByUUID", null); + return null; + } + + LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getToscaCsarByUUID", null); + return resultList.get (0); + } + + /** + * Return a specific Tosca CSAR Record resource (queried by service model uuid). + * <br> + * + * @param serviceModelUUID the service model uuid + * @return ToscaCsar object or null if none found + * @since ONAP Beijing Release + */ + public ToscaCsar getToscaCsarByServiceModelUUID(String serviceModelUUID){ + long startTime = System.currentTimeMillis (); + LOGGER.debug ("Catalog database - get Tosca CSAR record with serviceModelUUID " + serviceModelUUID); + Service service = getServiceByModelUUID(serviceModelUUID); + if(null == service){ + LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Service not found", "CatalogDB", "getToscaCsarByServiceModelUUID", null); + return null; + } + ToscaCsar csar = getToscaCsarByUUID(service.getToscaCsarArtifactUUID()); + if(null == csar){ + LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Tosca csar of the service not found", "CatalogDB", "getToscaCsarByServiceModelUUID", null); + return null; + } + LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getToscaCsarByServiceModelUUID", null); + return csar; + } public void saveTempNetworkHeatTemplateLookup (TempNetworkHeatTemplateLookup tempNetworkHeatTemplateLookup) { long startTime = System.currentTimeMillis (); @@ -4030,7 +4081,7 @@ public class CatalogDatabase implements Closeable { newVnfRecipe.setDescription(vfRecipe.getDescription()); newVnfRecipe.setOrchestrationUri(vfRecipe.getOrchestrationUri()); newVnfRecipe.setRecipeTimeout(vfRecipe.getRecipeTimeout()); - newVnfRecipe.setVnfComponentParamXSD(vfRecipe.getVnfComponentParamXSD()); + newVnfRecipe.setParamXSD(vfRecipe.getParamXSD()); newVnfRecipe.setVfModuleModelUUId(newRecipe.getModelUUID()); newVnfRecipe.setVersion(vfRecipe.getVersion()); newVnfRecipe.setVnfComponentType(vfRecipe.getVnfComponentType()); @@ -4883,7 +4934,7 @@ public class CatalogDatabase implements Closeable { StringBuilder sb = new StringBuilder(); if (variables != null) { for(Map.Entry<String, String> entry : variables.entrySet()){ - sb.append(entry.getKey() + "=" + entry.getValue() + "\n"); + sb.append(entry.getKey()).append("=").append(entry.getValue()).append("\n"); query.setParameter(entry.getKey(), entry.getValue()); } } @@ -4934,7 +4985,7 @@ public class CatalogDatabase implements Closeable { StringBuilder sb = new StringBuilder(); if (variables != null) { for(Map.Entry<String, String> entry : variables.entrySet()){ - sb.append(entry.getKey() + "=" + entry.getValue()+ "\n"); + sb.append(entry.getKey()).append("=").append(entry.getValue()).append("\n"); query.setParameter(entry.getKey(), entry.getValue()); } } diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomization.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomization.java index 66db7dfdec..daeefcce02 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomization.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomization.java @@ -131,7 +131,7 @@ public class AllottedResourceCustomization extends MavenLikeVersioning implement @Override public String toString () { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("modelCustomizationUuid="); sb.append(this.modelCustomizationUuid); sb.append(",modelInstanceName="); diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ArRecipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ArRecipe.java new file mode 100644 index 0000000000..b4c1f0594f --- /dev/null +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ArRecipe.java @@ -0,0 +1,46 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.mso.db.catalog.beans; + + +import java.io.Serializable; + +public class ArRecipe extends Recipe implements Serializable { + private static final long serialVersionUID = 768026109321305392L; + private String modelName; + public ArRecipe() {} + + public String getModelName() { + return modelName; + } + public void setModelName(String modelName) { + this.modelName = modelName; + } + + @Override + public String toString () { + StringBuilder sb = new StringBuilder(); + sb.append(super.toString()); + sb.append(",modelName=").append(modelName); + sb.append(",arParamXSD=").append(getParamXSD()); + return sb.toString(); + } +} diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatEnvironment.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatEnvironment.java index dd628bb863..fcd9211ec6 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatEnvironment.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatEnvironment.java @@ -88,7 +88,7 @@ public class HeatEnvironment extends MavenLikeVersioning implements Serializable @Override public String toString () { StringBuilder sb = new StringBuilder(); - sb.append ("Artifact UUID=" + this.artifactUuid); + sb.append("Artifact UUID=").append(this.artifactUuid); sb.append (", name="); sb.append (name); sb.append (", version="); diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatFiles.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatFiles.java index b90578d369..ec429c896e 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatFiles.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatFiles.java @@ -103,23 +103,23 @@ public class HeatFiles extends MavenLikeVersioning implements Serializable { @Override public String toString () { StringBuilder sb = new StringBuilder(); - sb.append ("artifactUuid=" + this.artifactUuid); + sb.append("artifactUuid=").append(this.artifactUuid); if (this.description == null) { sb.append(", description=null"); } else { - sb.append(", description=" + this.description); + sb.append(", description=").append(this.description); } if (this.fileName == null) { sb.append(", fileName=null"); } else { - sb.append(",fileName=" + this.fileName); + sb.append(",fileName=").append(this.fileName); } if (this.fileBody == null) { sb.append(", fileBody=null"); } else { - sb.append(",fileBody=" + this.fileBody); + sb.append(",fileBody=").append(this.fileBody); } - sb.append(", artifactChecksum=" + this.artifactChecksum); + sb.append(", artifactChecksum=").append(this.artifactChecksum); if (created != null) { sb.append (",created="); sb.append (DateFormat.getInstance().format(created)); diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplate.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplate.java index eec0f410c6..df067445f6 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplate.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplate.java @@ -61,12 +61,12 @@ public class HeatNestedTemplate implements Serializable { @Override public String toString () { StringBuilder sb = new StringBuilder (); - sb.append ("ParentTemplateId=" + this.parentTemplateId); - sb.append (", ChildTemplateId=" + this.childTemplateId); + sb.append("ParentTemplateId=").append(this.parentTemplateId); + sb.append(", ChildTemplateId=").append(this.childTemplateId); if (this.providerResourceFile == null) { sb.append (", providerResourceFile=null"); } else { - sb.append (",providerResourceFile=" + this.providerResourceFile); + sb.append(",providerResourceFile=").append(this.providerResourceFile); } return sb.toString (); } diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateArtifactUuidModelUuid.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateArtifactUuidModelUuid.java index 2c79d7d48c..54acf12ca8 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateArtifactUuidModelUuid.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateArtifactUuidModelUuid.java @@ -48,8 +48,8 @@ public class HeatTemplateArtifactUuidModelUuid implements Serializable { @Override
public String toString() {
StringBuilder sb = new StringBuilder();
- sb.append("heatTemplateArtifactUuid=" + this.heatTemplateArtifactUuid);
- sb.append(" modelUuid=" + this.modelUuid);
+ sb.append("heatTemplateArtifactUuid=").append(this.heatTemplateArtifactUuid);
+ sb.append(" modelUuid=").append(this.modelUuid);
return sb.toString();
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Model.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Model.java index 77beeb71df..96e6c616bf 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Model.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Model.java @@ -185,13 +185,13 @@ public class Model extends MavenLikeVersioning implements Serializable { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("Model: "); - sb.append("modelCustomizationId=" + modelCustomizationId); - sb.append(",modelCustomizationName=" + modelCustomizationName); - sb.append(",modelInvariantId=" + modelInvariantId); - sb.append(",modelName=" + modelName); - sb.append(",modelType=" + modelType); - sb.append(",modelVersion=" + modelVersion); - sb.append(",modelVersionId=" + modelVersionId); + sb.append("modelCustomizationId=").append(modelCustomizationId); + sb.append(",modelCustomizationName=").append(modelCustomizationName); + sb.append(",modelInvariantId=").append(modelInvariantId); + sb.append(",modelName=").append(modelName); + sb.append(",modelType=").append(modelType); + sb.append(",modelVersion=").append(modelVersion); + sb.append(",modelVersionId=").append(modelVersionId); if (created != null) { sb.append (",created="); sb.append (DateFormat.getInstance().format(created)); diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ModelRecipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ModelRecipe.java index fddea4791b..7f8c3dbacb 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ModelRecipe.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ModelRecipe.java @@ -169,12 +169,12 @@ public class ModelRecipe extends MavenLikeVersioning implements Serializable { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("ModelRecipe: "); - sb.append("modelId=" + modelId.toString()); - sb.append(",action=" + action); - sb.append(",schemaVersion=" + schemaVersion); - sb.append(",orchestrationUri=" + orchestrationUri); - sb.append(",modelParamXSD=" + modelParamXSD); - sb.append(",recipeTimeout=" + recipeTimeout.toString()); + sb.append("modelId=").append(modelId.toString()); + sb.append(",action=").append(action); + sb.append(",schemaVersion=").append(schemaVersion); + sb.append(",orchestrationUri=").append(orchestrationUri); + sb.append(",modelParamXSD=").append(modelParamXSD); + sb.append(",recipeTimeout=").append(recipeTimeout.toString()); if (created != null) { sb.append (",created="); sb.append (DateFormat.getInstance().format(created)); diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java index 9ef1fb6fd3..4e905b62c8 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java @@ -26,7 +26,6 @@ import java.io.Serializable; public class NetworkRecipe extends Recipe implements Serializable { private static final long serialVersionUID = 768026109321305392L; private String modelName; - private String networkParamXSD; public NetworkRecipe() {} public String getModelName() { @@ -36,19 +35,12 @@ public class NetworkRecipe extends Recipe implements Serializable { this.modelName = modelName; } - public String getNetworkParamXSD() { - return networkParamXSD; - } - public void setNetworkParamXSD(String networkParamXSD) { - this.networkParamXSD = networkParamXSD; - } - @Override public String toString () { StringBuilder sb = new StringBuilder(); sb.append(super.toString()); - sb.append (",modelName=" + modelName); - sb.append (",networkParamXSD=" + networkParamXSD); + sb.append(",modelName=").append(modelName); + sb.append(",networkParamXSD=").append(getParamXSD()); return sb.toString(); } } diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Recipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Recipe.java index 668f666fcd..58c24412dc 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Recipe.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Recipe.java @@ -37,7 +37,7 @@ public class Recipe extends MavenLikeVersioning implements Serializable { protected String orchestrationUri; private int recipeTimeout; private String serviceType; - + private String paramXSD; private Timestamp created; public Recipe () { @@ -100,11 +100,25 @@ public class Recipe extends MavenLikeVersioning implements Serializable { this.created = created; } - @Override + /** + * @return Returns the paramXSD. + */ + public String getParamXSD() { + return paramXSD; + } + + /** + * @param paramXSD The paramXSD to set. + */ + public void setParamXSD(String paramXSD) { + this.paramXSD = paramXSD; + } + + @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("RECIPE: " + action); - sb.append(",uri=" + orchestrationUri); + sb.append("RECIPE: ").append(action); + sb.append(",uri=").append(orchestrationUri); if (created != null) { sb.append (",created="); diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Service.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Service.java index beb021ac11..f518678b44 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Service.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Service.java @@ -150,14 +150,17 @@ public class Service extends MavenLikeVersioning implements Serializable { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("SERVICE: name=" + modelName + ",modelVersion=" + modelVersion + ",description=" + description+",modelInvariantUUID="+modelInvariantUUID+",toscaCsarArtifactUUID="+toscaCsarArtifactUUID+",serviceType="+serviceType+",serviceRole="+serviceRole); + sb.append("SERVICE: name=").append(modelName).append(",modelVersion=").append(modelVersion) + .append(",description=").append(description).append(",modelInvariantUUID=").append(modelInvariantUUID) + .append(",toscaCsarArtifactUUID=").append(toscaCsarArtifactUUID).append(",serviceType=").append(serviceType) + .append(",serviceRole=").append(serviceRole); for (String recipeAction : recipes.keySet()) { ServiceRecipe recipe = recipes.get(recipeAction); - sb.append ("\n" + recipe.toString()); + sb.append("\n").append(recipe.toString()); } for(ServiceToResourceCustomization serviceResourceCustomization : serviceResourceCustomizations) { - sb.append("\n" + serviceResourceCustomization.toString()); + sb.append("\n").append(serviceResourceCustomization.toString()); } if (created != null) { sb.append (",created="); diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolder.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolder.java index d4d0507f20..645626d125 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolder.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolder.java @@ -129,7 +129,7 @@ public class ServiceMacroHolder implements Serializable { StringBuilder sb = new StringBuilder(); sb.append("ServicePlus: "); if (this.service != null) { - sb.append("service: " + this.service.toString()); + sb.append("service: ").append(this.service.toString()); } else { sb.append("service: null"); } @@ -137,7 +137,7 @@ public class ServiceMacroHolder implements Serializable { int i=0; sb.append("VnfResources: "); for (VnfResourceCustomization vrc : this.vnfResourceCustomizations) { - sb.append(", vnfResourceCustomization[" + i++ + "]:" + vrc.toString()); + sb.append(", vnfResourceCustomization[").append(i++).append("]:").append(vrc.toString()); } } else { sb.append("none"); @@ -146,7 +146,7 @@ public class ServiceMacroHolder implements Serializable { int i=0; sb.append("VnfResources: "); for (VnfResource vr : this.vnfResources) { - sb.append(", vnfResource[" + i++ + "]:" + vr.toString()); + sb.append(", vnfResource[").append(i++).append("]:").append(vr.toString()); } } else { sb.append("none"); @@ -155,14 +155,14 @@ public class ServiceMacroHolder implements Serializable { int i=0; sb.append("NetworkResourceCustomizations:"); for (NetworkResourceCustomization nrc : this.networkResourceCustomizations) { - sb.append("NRC[" + i++ + "]: " + nrc.toString()); + sb.append("NRC[").append(i++).append("]: ").append(nrc.toString()); } } if (this.allottedResourceCustomizations != null && this.allottedResourceCustomizations.size() > 0) { int i=0; sb.append("AllottedResourceCustomizations:"); for (AllottedResourceCustomization arc : this.allottedResourceCustomizations) { - sb.append("ARC[" + i++ + "]: " + arc.toString()); + sb.append("ARC[").append(i++).append("]: ").append(arc.toString()); } } diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceRecipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceRecipe.java index 3a3cc0aa69..303570a8d0 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceRecipe.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceRecipe.java @@ -139,8 +139,8 @@ public class ServiceRecipe extends MavenLikeVersioning implements Serializable { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("RECIPE: " + action); - sb.append(",uri=" + orchestrationUri); + sb.append("RECIPE: ").append(action); + sb.append(",uri=").append(orchestrationUri); if (created != null) { sb.append (",created="); sb.append (DateFormat.getInstance().format(created)); diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworks.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworks.java index f076e13e26..a380a58c6b 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworks.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworks.java @@ -85,8 +85,8 @@ public class ServiceToNetworks implements Serializable { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("ServiceToNetworks mapping: "); - sb.append("serviceModelUuid=" + this.serviceModelUuid); - sb.append(",networkModelCustomizationUuid=" + networkModelCustomizationUuid); + sb.append("serviceModelUuid=").append(this.serviceModelUuid); + sb.append(",networkModelCustomizationUuid=").append(networkModelCustomizationUuid); return sb.toString(); } diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToResourceCustomization.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToResourceCustomization.java index fcd20ef963..6d74ab38aa 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToResourceCustomization.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToResourceCustomization.java @@ -99,7 +99,8 @@ public class ServiceToResourceCustomization implements Serializable { @Override
public String toString() {
StringBuilder sb = new StringBuilder();
- sb.append("ServiceToResourceCustomization: modelType=" + modelType + ",serviceModelUUID=" + serviceModelUUID+",resourceModelCustomizationUUID="+resourceModelCustomizationUUID);
+ sb.append("ServiceToResourceCustomization: modelType=").append(modelType).append(",serviceModelUUID=")
+ .append(serviceModelUUID).append(",resourceModelCustomizationUUID=").append(resourceModelCustomizationUUID);
if (created != null) {
sb.append (",created=");
sb.append (DateFormat.getInstance().format(created));
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/TempNetworkHeatTemplateLookup.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/TempNetworkHeatTemplateLookup.java index 20801c105e..783fc2df30 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/TempNetworkHeatTemplateLookup.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/TempNetworkHeatTemplateLookup.java @@ -66,10 +66,10 @@ public class TempNetworkHeatTemplateLookup implements Serializable { @Override
public String toString() {
StringBuilder sb = new StringBuilder();
- sb.append("NetworkResourceModelName=" + this.networkResourceModelName);
- sb.append("HeatTemplateArtifactUuid=" + this.heatTemplateArtifactUuid);
- sb.append("aicVersionMin=" + this.aicVersionMin);
- sb.append("aicVersionMax=" + this.aicVersionMax);
+ sb.append("NetworkResourceModelName=").append(this.networkResourceModelName);
+ sb.append("HeatTemplateArtifactUuid=").append(this.heatTemplateArtifactUuid);
+ sb.append("aicVersionMin=").append(this.aicVersionMin);
+ sb.append("aicVersionMax=").append(this.aicVersionMax);
return sb.toString();
}
@Override
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ToscaCsar.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ToscaCsar.java index 88a358d364..591e648a33 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ToscaCsar.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ToscaCsar.java @@ -100,9 +100,11 @@ public class ToscaCsar extends MavenLikeVersioning implements Serializable { @Override
public String toString() {
StringBuilder sb = new StringBuilder();
- sb.append("TOSCACSAR: artifactUUID=" + artifactUUID + ",name=" + name + ",version=" + version + ",description=" + description+",artifactChecksum="+artifactChecksum+",url="+url);
+ sb.append("TOSCACSAR: artifactUUID=").append(artifactUUID).append(",name=").append(name).append(",version=")
+ .append(version).append(",description=").append(description).append(",artifactChecksum=")
+ .append(artifactChecksum).append(",url=").append(url);
for (Service service : services) {
- sb.append ("\n" + service.toString());
+ sb.append("\n").append(service.toString());
}
if (created != null) {
sb.append (",created=");
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModule.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModule.java index fd2b6ff37b..cd2821a7b0 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModule.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModule.java @@ -142,7 +142,7 @@ public class VfModule extends MavenLikeVersioning implements Serializable { @Override public String toString () { - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); buf.append("VFModule:"); buf.append("modelName="); diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleCustomization.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleCustomization.java index 4404834585..9f2dae5035 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleCustomization.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleCustomization.java @@ -112,16 +112,16 @@ public class VfModuleCustomization implements Serializable { @Override
public String toString() {
StringBuilder sb = new StringBuilder();
- sb.append("modelCustomizationUuid=" + this.modelCustomizationUuid);
- sb.append("vfModuleModelUuid=" + this.vfModuleModelUuid);
- sb.append("label=" + this.label);
- sb.append("initalCount=" + this.initialCount);
- sb.append("minInstances=" + this.minInstances);
- sb.append("maxInstances=" + this.maxInstances);
- sb.append("availabilityZoneCount=" + this.availabilityZoneCount);
- sb.append("heatEnvironmentArtifactUuid=" + this.heatEnvironmentArtifactUuid);
- sb.append("volEnvironmentArtifactUuid=" + this.volEnvironmentArtifactUuid);
- sb.append("created=" + this.created);
+ sb.append("modelCustomizationUuid=").append(this.modelCustomizationUuid);
+ sb.append("vfModuleModelUuid=").append(this.vfModuleModelUuid);
+ sb.append("label=").append(this.label);
+ sb.append("initalCount=").append(this.initialCount);
+ sb.append("minInstances=").append(this.minInstances);
+ sb.append("maxInstances=").append(this.maxInstances);
+ sb.append("availabilityZoneCount=").append(this.availabilityZoneCount);
+ sb.append("heatEnvironmentArtifactUuid=").append(this.heatEnvironmentArtifactUuid);
+ sb.append("volEnvironmentArtifactUuid=").append(this.volEnvironmentArtifactUuid);
+ sb.append("created=").append(this.created);
return sb.toString();
}
@Override
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFiles.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFiles.java index 63395c215c..476283e6b0 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFiles.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFiles.java @@ -50,8 +50,8 @@ public class VfModuleToHeatFiles implements Serializable { @Override public String toString () { StringBuilder sb = new StringBuilder (); - sb.append ("vfModuleModelUuid=" + this.vfModuleModelUuid); - sb.append (", heatFilesArtifactUuid=" + this.heatFilesArtifactUuid); + sb.append("vfModuleModelUuid=").append(this.vfModuleModelUuid); + sb.append(", heatFilesArtifactUuid=").append(this.heatFilesArtifactUuid); return sb.toString (); } diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponent.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponent.java index 8db4902cd8..e1795e1b04 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponent.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponent.java @@ -78,10 +78,10 @@ public class VnfComponent implements Serializable { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("VnfComponent: "); - sb.append("vnfId=" + vnfId); - sb.append(",componentType=" + componentType); - sb.append(",heatTemplateId=" + heatTemplateId); - sb.append(",heatEnvironmentId=" + heatEnvironmentId); + sb.append("vnfId=").append(vnfId); + sb.append(",componentType=").append(componentType); + sb.append(",heatTemplateId=").append(heatTemplateId); + sb.append(",heatEnvironmentId=").append(heatEnvironmentId); if (created != null) { sb.append (",created="); diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipe.java index 1e5f69c622..6eac5a23ea 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipe.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipe.java @@ -27,7 +27,6 @@ public class VnfComponentsRecipe extends Recipe implements Serializable { private static final long serialVersionUID = 768026109321305392L; private String vnfType; - private String vnfComponentParamXSD; private String vnfComponentType; private String vfModuleModelUUId; @@ -39,13 +38,6 @@ public class VnfComponentsRecipe extends Recipe implements Serializable { public void setVnfType(String vnfType) { this.vnfType = vnfType; } - - public String getVnfComponentParamXSD() { - return vnfComponentParamXSD; - } - public void setVnfComponentParamXSD(String vnfComponentParamXSD) { - this.vnfComponentParamXSD = vnfComponentParamXSD; - } public String getVnfComponentType() { return vnfComponentType; @@ -64,12 +56,12 @@ public class VnfComponentsRecipe extends Recipe implements Serializable { @Override public String toString () { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(super.toString()); - sb.append (",vnfComponentParamXSD=" + vnfComponentParamXSD); - sb.append (",serviceType=" + getServiceType ()); - sb.append (",vnfComponentType=" + getVnfComponentType ()); - sb.append (",vfModuleId=" + getVfModuleModelUUId()); + sb.append(",vnfComponentParamXSD=").append(getParamXSD()); + sb.append(",serviceType=").append(getServiceType()); + sb.append(",vnfComponentType=").append(getVnfComponentType()); + sb.append(",vfModuleId=").append(getVfModuleModelUUId()); return sb.toString(); } } diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfRecipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfRecipe.java index 55bb33a4ef..46017c2205 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfRecipe.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfRecipe.java @@ -27,7 +27,6 @@ public class VnfRecipe extends Recipe implements Serializable { private static final long serialVersionUID = 768026109321305392L; private String vnfType; - private String vnfParamXSD; private String vfModuleId; public VnfRecipe() {} @@ -38,13 +37,6 @@ public class VnfRecipe extends Recipe implements Serializable { public void setVnfType(String vnfType) { this.vnfType = vnfType; } - - public String getVnfParamXSD() { - return vnfParamXSD; - } - public void setVnfParamXSD(String vnfParamXSD) { - this.vnfParamXSD = vnfParamXSD; - } public String getVfModuleId() { return vfModuleId; @@ -56,11 +48,11 @@ public class VnfRecipe extends Recipe implements Serializable { @Override public String toString () { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(super.toString()); - sb.append (",vnfParamXSD=" + vnfParamXSD); - sb.append (",serviceType=" + getServiceType ()); - sb.append (",vfModuleId=" + getVfModuleId ()); + sb.append(",vnfParamXSD=").append(getParamXSD()); + sb.append(",serviceType=").append(getServiceType()); + sb.append(",vfModuleId=").append(getVfModuleId()); return sb.toString(); } } diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResCustomToVfModuleCustom.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResCustomToVfModuleCustom.java index 9cd9f1ca78..7b2364d194 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResCustomToVfModuleCustom.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResCustomToVfModuleCustom.java @@ -56,9 +56,9 @@ public class VnfResCustomToVfModuleCustom implements Serializable { @Override
public String toString() {
StringBuilder sb = new StringBuilder();
- sb.append("vnfResourceCustModelCustomizationUuid=" + this.vnfResourceCustModelCustomizationUuid);
- sb.append("vfModuleCustModelCustomizationUuid=" + this.vfModuleCustModelCustomizationUuid);
- sb.append("created=" + this.created);
+ sb.append("vnfResourceCustModelCustomizationUuid=").append(this.vnfResourceCustModelCustomizationUuid);
+ sb.append("vfModuleCustModelCustomizationUuid=").append(this.vfModuleCustModelCustomizationUuid);
+ sb.append("created=").append(this.created);
return sb.toString();
}
@Override
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResource.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResource.java index 7495015cb9..f0b990acae 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResource.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResource.java @@ -240,45 +240,45 @@ public class VnfResource extends MavenLikeVersioning implements Serializable { @Override public String toString () { - StringBuffer buf = new StringBuffer(); - - buf.append("VNF="); - buf.append(",modelVersion="); - buf.append(modelVersion); - buf.append(",mode="); - buf.append(orchestrationMode); - buf.append(",heatTemplateArtifactUUId="); - buf.append(heatTemplateArtifactUUId); - buf.append(",envtId="); - buf.append(",asdcUuid="); - buf.append(",aicVersionMin="); - buf.append(this.aicVersionMin); - buf.append(",aicVersionMax="); - buf.append(this.aicVersionMax); - buf.append(",modelInvariantUuid="); - buf.append(this.modelInvariantUuid); - buf.append(",modelVersion="); - buf.append(",modelCustomizationName="); - buf.append(",modelName="); - buf.append(this.modelName); - buf.append(",serviceModelInvariantUUID="); - buf.append(",modelCustomizationUuid="); - buf.append(",toscaNodeType="); - buf.append(toscaNodeType); + StringBuilder sb = new StringBuilder(); + + sb.append("VNF="); + sb.append(",modelVersion="); + sb.append(modelVersion); + sb.append(",mode="); + sb.append(orchestrationMode); + sb.append(",heatTemplateArtifactUUId="); + sb.append(heatTemplateArtifactUUId); + sb.append(",envtId="); + sb.append(",asdcUuid="); + sb.append(",aicVersionMin="); + sb.append(this.aicVersionMin); + sb.append(",aicVersionMax="); + sb.append(this.aicVersionMax); + sb.append(",modelInvariantUuid="); + sb.append(this.modelInvariantUuid); + sb.append(",modelVersion="); + sb.append(",modelCustomizationName="); + sb.append(",modelName="); + sb.append(this.modelName); + sb.append(",serviceModelInvariantUUID="); + sb.append(",modelCustomizationUuid="); + sb.append(",toscaNodeType="); + sb.append(toscaNodeType); if (created != null) { - buf.append(",created="); - buf.append(DateFormat.getInstance().format(created)); + sb.append(",created="); + sb.append(DateFormat.getInstance().format(created)); } for(VnfResourceCustomization vrc : vnfResourceCustomizations) { - buf.append("/n" + vrc.toString()); + sb.append("/n").append(vrc.toString()); } for(VfModule vfm : vfModules) { - buf.append("/n" + vfm.toString()); + sb.append("/n").append(vfm.toString()); } - return buf.toString(); + return sb.toString(); } } diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResourceCustomization.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResourceCustomization.java index 8d580fd9a0..151c9e594e 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResourceCustomization.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResourceCustomization.java @@ -180,18 +180,18 @@ public class VnfResourceCustomization extends MavenLikeVersioning implements Ser @Override public String toString() { StringBuilder sb = new StringBuilder("VnfResourceCustomization: "); - sb.append("ModelCustUuid=" + this.modelCustomizationUuid ); - sb.append(", ModelInstanceName=" + this.modelInstanceName); - sb.append(", vnfResourceModelUuid=" + this.vnfResourceModelUUID); - sb.append(", creationTimestamp=" + this.created); - sb.append(", minInstances=" + this.minInstances); - sb.append(", maxInstances=" + this.maxInstances); - sb.append(", availabilityZoneMaxCount=" + this.availabilityZoneMaxCount); + sb.append("ModelCustUuid=").append(this.modelCustomizationUuid); + sb.append(", ModelInstanceName=").append(this.modelInstanceName); + sb.append(", vnfResourceModelUuid=").append(this.vnfResourceModelUUID); + sb.append(", creationTimestamp=").append(this.created); + sb.append(", minInstances=").append(this.minInstances); + sb.append(", maxInstances=").append(this.maxInstances); + sb.append(", availabilityZoneMaxCount=").append(this.availabilityZoneMaxCount); // sb.append(", vnfResource:\n" + this.vnfResource == null ? "null" : this.vnfResource.toString()); - sb.append(", nfFunction=" + this.nfFunction); - sb.append(", nfType=" + this.nfType); - sb.append(", nfRole=" + this.nfRole); - sb.append(", nfNamingCode=" + this.nfNamingCode); + sb.append(", nfFunction=").append(this.nfFunction); + sb.append(", nfType=").append(this.nfType); + sb.append(", nfRole=").append(this.nfRole); + sb.append(", nfNamingCode=").append(this.nfNamingCode); return sb.toString(); } diff --git a/mso-catalog-db/src/main/resources/ArRecipe.hbm.xml b/mso-catalog-db/src/main/resources/ArRecipe.hbm.xml new file mode 100644 index 0000000000..fedfe31551 --- /dev/null +++ b/mso-catalog-db/src/main/resources/ArRecipe.hbm.xml @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + --> +<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> + +<hibernate-mapping package="org.openecomp.mso.db.catalog.beans"> + <class name="ArRecipe" table="AR_RECIPE"> + <meta attribute="class-description"> + This class describes a AR recipe + </meta> + + <id name="id" type="int" column="id"> + <generator class="native"/> + </id> + + <properties name="uk_ar_recipe" unique="true"> + <property name="modelName" type="string" > + <column name="MODEL_NAME" not-null="true" length="20"/> + </property> + <property name="action" type="string" > + <column name="ACTION" not-null="true" length="20"/> + </property> + <property name="version" type="string"> + <column name="VERSION_STR" not-null="true" length="20"/> + </property> + + </properties> + + <property name="serviceType" type="string" length="45"> + <column name="SERVICE_TYPE" not-null="false" length="45"/> + </property> + <property name="description" column="DESCRIPTION" type="string" length="1200"/> + <property name="orchestrationUri" type="string"> + <column name="ORCHESTRATION_URI" not-null="true" length="256"/> + </property> + <property name="paramXSD" column="AR_PARAM_XSD" type="string" length="2048"/> + <property name="recipeTimeout" column="RECIPE_TIMEOUT" type="int"/> + <property name="created" type="timestamp" generated="insert" update="false" insert="false" not-null="true"> + <column name="CREATION_TIMESTAMP" default="CURRENT_TIMESTAMP"/> + </property> + </class> + +</hibernate-mapping>
\ No newline at end of file diff --git a/mso-catalog-db/src/main/resources/NetworkRecipe.hbm.xml b/mso-catalog-db/src/main/resources/NetworkRecipe.hbm.xml index 1ed9c7c392..4490dbadd0 100644 --- a/mso-catalog-db/src/main/resources/NetworkRecipe.hbm.xml +++ b/mso-catalog-db/src/main/resources/NetworkRecipe.hbm.xml @@ -51,7 +51,7 @@ <property name="orchestrationUri" type="string"> <column name="ORCHESTRATION_URI" not-null="true" length="256"/> </property> - <property name="networkParamXSD" column="NETWORK_PARAM_XSD" type="string" length="2048"/> + <property name="paramXSD" column="NETWORK_PARAM_XSD" type="string" length="2048"/> <property name="recipeTimeout" column="RECIPE_TIMEOUT" type="int"/> <property name="created" type="timestamp" generated="insert" update="false" insert="false" not-null="true"> <column name="CREATION_TIMESTAMP" default="CURRENT_TIMESTAMP"/> diff --git a/mso-catalog-db/src/main/resources/VnfComponentsRecipe.hbm.xml b/mso-catalog-db/src/main/resources/VnfComponentsRecipe.hbm.xml index 20b9cab252..d2ca635c9a 100644 --- a/mso-catalog-db/src/main/resources/VnfComponentsRecipe.hbm.xml +++ b/mso-catalog-db/src/main/resources/VnfComponentsRecipe.hbm.xml @@ -46,7 +46,7 @@ <property name="orchestrationUri" type="string"> <column name="ORCHESTRATION_URI" not-null="true" length="256"/> </property> - <property name="vnfComponentParamXSD" column="VNF_COMPONENT_PARAM_XSD" type="string" length="2048"/> + <property name="paramXSD" column="VNF_COMPONENT_PARAM_XSD" type="string" length="2048"/> <property name="recipeTimeout" column="RECIPE_TIMEOUT" type="int"/> <property name="created" type="timestamp" generated="insert" update="false" insert="false" not-null="true"> <column name="CREATION_TIMESTAMP" default="CURRENT_TIMESTAMP"/> diff --git a/mso-catalog-db/src/main/resources/VnfRecipe.hbm.xml b/mso-catalog-db/src/main/resources/VnfRecipe.hbm.xml index 4dc7f968b4..910cb9bf5c 100644 --- a/mso-catalog-db/src/main/resources/VnfRecipe.hbm.xml +++ b/mso-catalog-db/src/main/resources/VnfRecipe.hbm.xml @@ -59,7 +59,7 @@ <column name="ORCHESTRATION_URI" not-null="true" length="256"/> </property> - <property name="vnfParamXSD" column="VNF_PARAM_XSD" type="string" length="2048"/> + <property name="paramXSD" column="VNF_PARAM_XSD" type="string" length="2048"/> <property name="recipeTimeout" column="RECIPE_TIMEOUT" type="int"/> <property name="created" type="timestamp" generated="insert" update="false" insert="false" not-null="true"> <column name="CREATION_TIMESTAMP" default="CURRENT_TIMESTAMP"/> diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/NetworkRecipeTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/NetworkRecipeTest.java index 97eadb3f1d..c17b50e738 100644 --- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/NetworkRecipeTest.java +++ b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/NetworkRecipeTest.java @@ -46,8 +46,8 @@ public class NetworkRecipeTest { assertTrue(networkRecipe.getId() == 1); networkRecipe.setModelName("modelName"); assertTrue(networkRecipe.getModelName().equalsIgnoreCase("modelName")); - networkRecipe.setNetworkParamXSD("networkParamXSD"); - assertTrue(networkRecipe.getNetworkParamXSD().equalsIgnoreCase("networkParamXSD")); + networkRecipe.setParamXSD("networkParamXSD"); + assertTrue(networkRecipe.getParamXSD().equalsIgnoreCase("networkParamXSD")); networkRecipe.setOrchestrationUri("orchestrationUri"); assertTrue(networkRecipe.getOrchestrationUri().equalsIgnoreCase("orchestrationUri")); networkRecipe.setRecipeTimeout(1); diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/VnfRecipeTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/VnfRecipeTest.java index 95e45f7b52..3f707871a6 100644 --- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/VnfRecipeTest.java +++ b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/VnfRecipeTest.java @@ -52,8 +52,8 @@ public class VnfRecipeTest { assertTrue(vnfRecipe.getServiceType().equalsIgnoreCase("serviceType"));
vnfRecipe.setVersion("version");
assertTrue(vnfRecipe.getVersion().equalsIgnoreCase("version"));
- vnfRecipe.setVnfParamXSD("vnfParamXSD");
- assertTrue(vnfRecipe.getVnfParamXSD().equalsIgnoreCase("vnfParamXSD"));
+ vnfRecipe.setParamXSD("vnfParamXSD");
+ assertTrue(vnfRecipe.getParamXSD().equalsIgnoreCase("vnfParamXSD"));
vnfRecipe.setVfModuleId("vfModuleId");
assertTrue(vnfRecipe.getVfModuleId().equalsIgnoreCase("vfModuleId"));
// assertTrue(vnfRecipe.toString() == null);
@@ -1,7 +1,6 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> - <parent> <groupId>org.onap.oparent</groupId> <artifactId>oparent</artifactId> @@ -32,7 +31,7 @@ <module>status-control</module> <module>bpmn</module> <module>packages</module> - <!-- <module>aria/aria-rest-server</module> --> + <module>aria</module> </modules> <properties> <project.mso.base.folder>.</project.mso.base.folder> |