diff options
Diffstat (limited to 'mso-catalog-db/src')
33 files changed, 310 insertions, 155 deletions
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);
|