Update paramXSD as recipe common field
Update paramXSD as recipe common field
Change-Id: I8fe382e65957dc3983abfcb638582bf074875fdb
Issue-ID: SO-456
Signed-off-by: c00149107 <chenchuanyu@huawei.com>
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 534b5a3..f59c09a 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
@@ -4081,7 +4081,7 @@
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());
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
index e7656ab..b4c1f05 100644
--- 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
@@ -26,7 +26,6 @@
public class ArRecipe extends Recipe implements Serializable {
private static final long serialVersionUID = 768026109321305392L;
private String modelName;
- private String arParamXSD;
public ArRecipe() {}
public String getModelName() {
@@ -35,28 +34,13 @@
public void setModelName(String modelName) {
this.modelName = modelName;
}
-
- /**
- * @return Returns the arParamXSD.
- */
- public String getArParamXSD() {
- return arParamXSD;
- }
-
-
- /**
- * @param arParamXSD The arParamXSD to set.
- */
- public void setArParamXSD(String arParamXSD) {
- this.arParamXSD = arParamXSD;
- }
@Override
public String toString () {
StringBuilder sb = new StringBuilder();
sb.append(super.toString());
sb.append(",modelName=").append(modelName);
- sb.append(",arParamXSD=").append(arParamXSD);
+ sb.append(",arParamXSD=").append(getParamXSD());
return sb.toString();
}
}
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 f25a99c..4e905b6 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 @@
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 @@
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=").append(modelName);
- sb.append(",networkParamXSD=").append(networkParamXSD);
+ 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 a425c1e..58c2441 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 @@
protected String orchestrationUri;
private int recipeTimeout;
private String serviceType;
-
+ private String paramXSD;
private Timestamp created;
public Recipe () {
@@ -100,7 +100,21 @@
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: ").append(action);
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 8867170..6eac5a2 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 @@
private static final long serialVersionUID = 768026109321305392L;
private String vnfType;
- private String vnfComponentParamXSD;
private String vnfComponentType;
private String vfModuleModelUUId;
@@ -39,13 +38,6 @@
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;
@@ -66,7 +58,7 @@
public String toString () {
StringBuilder sb = new StringBuilder();
sb.append(super.toString());
- sb.append(",vnfComponentParamXSD=").append(vnfComponentParamXSD);
+ sb.append(",vnfComponentParamXSD=").append(getParamXSD());
sb.append(",serviceType=").append(getServiceType());
sb.append(",vnfComponentType=").append(getVnfComponentType());
sb.append(",vfModuleId=").append(getVfModuleModelUUId());
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 49865e8..46017c2 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 @@
private static final long serialVersionUID = 768026109321305392L;
private String vnfType;
- private String vnfParamXSD;
private String vfModuleId;
public VnfRecipe() {}
@@ -38,13 +37,6 @@
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;
@@ -58,7 +50,7 @@
public String toString () {
StringBuilder sb = new StringBuilder();
sb.append(super.toString());
- sb.append(",vnfParamXSD=").append(vnfParamXSD);
+ 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/resources/ArRecipe.hbm.xml b/mso-catalog-db/src/main/resources/ArRecipe.hbm.xml
index 2fed71c..fedfe31 100644
--- a/mso-catalog-db/src/main/resources/ArRecipe.hbm.xml
+++ b/mso-catalog-db/src/main/resources/ArRecipe.hbm.xml
@@ -52,7 +52,7 @@
<property name="orchestrationUri" type="string">
<column name="ORCHESTRATION_URI" not-null="true" length="256"/>
</property>
- <property name="arParamXSD" column="AR_PARAM_XSD" type="string" length="2048"/>
+ <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"/>
diff --git a/mso-catalog-db/src/main/resources/NetworkRecipe.hbm.xml b/mso-catalog-db/src/main/resources/NetworkRecipe.hbm.xml
index 1ed9c7c..4490dba 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 20b9cab..d2ca635 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 4dc7f96..910cb9b 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 97eadb3..c17b50e 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 @@
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 95e45f7..3f70787 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 @@
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);