summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-vfc-adapter/WebContent/WEB-INF/web.xml2
-rw-r--r--asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/ToscaResourceInstaller.java26
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResource.java38
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Service.java19
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResource.java36
-rw-r--r--mso-catalog-db/src/main/resources/NetworkResource.hbm.xml2
-rw-r--r--mso-catalog-db/src/main/resources/Service.hbm.xml1
-rw-r--r--mso-catalog-db/src/main/resources/VnfResource.hbm.xml2
8 files changed, 112 insertions, 14 deletions
diff --git a/adapters/mso-vfc-adapter/WebContent/WEB-INF/web.xml b/adapters/mso-vfc-adapter/WebContent/WEB-INF/web.xml
index cd97471b5b..66ea46fcc9 100644
--- a/adapters/mso-vfc-adapter/WebContent/WEB-INF/web.xml
+++ b/adapters/mso-vfc-adapter/WebContent/WEB-INF/web.xml
@@ -16,7 +16,7 @@
</context-param>
<context-param>
<param-name>mso.configuration</param-name>
- <param-value>MSO_PROP_NETWORK_ADAPTER=mso.vfc.properties,MSO_PROP_TOPOLOGY=topology.properties</param-value>
+ <param-value>MSO_PROP_VFC_ADAPTER=mso.vfc.properties,MSO_PROP_TOPOLOGY=topology.properties</param-value>
</context-param>
<context-param>
<param-name>mso.cloud_config.configuration</param-name>
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 390bf40e44..b998be9a69 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
@@ -563,7 +563,10 @@ public class ToscaResourceInstaller {// implements IVfResourceInstaller {
createNetworkResource(vlNode, toscaResourceStruct, networkHeatTemplateLookup.get(0));
} else {
- throw new ArtifactInstallerException("No NetworkResourceName found in TempNetworkHeatTemplateLookup for " + networkResourceModelName);
+ logger.info(MessageEnum.ASDC_GENERAL_INFO,
+ "No NetworkResourceName found in TempNetworkHeatTemplateLookup for" + networkResourceModelName, "ASDC",
+ "createVfModuleStructures");
+ createNetworkResource(vlNode, toscaResourceStruct, null);
}
@@ -787,6 +790,7 @@ public class ToscaResourceInstaller {// implements IVfResourceInstaller {
service.setModelUUID(serviceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
//service.setVersion(serviceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_VERSION));
service.setModelInvariantUUID(serviceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID));
+ service.setCategory(serviceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_CATEGORY));
service.setToscaCsarArtifactUUID(toscaResourceStructure.getToscaArtifact().getArtifactUUID());
//service.setCreated(getCurrentTimeStamp());
}
@@ -831,11 +835,16 @@ public class ToscaResourceInstaller {// implements IVfResourceInstaller {
networkResource.setModelVersion(testNull(networkNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_VERSION)));
networkResource.setAicVersionMax(testNull(networkNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_MAXINSTANCES)));
- networkResource.setAicVersionMin(networkHeatTemplateLookup.getAicVersionMin());
+ String aicVersionMin = networkHeatTemplateLookup != null ? networkHeatTemplateLookup.getAicVersionMin() : "2.5";
+ networkResource.setAicVersionMin(aicVersionMin);
networkResource.setToscaNodeType(networkNodeTemplate.getType());
networkResource.setDescription(testNull(networkNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_DESCRIPTION)));
networkResource.setOrchestrationMode("HEAT");
- networkResource.setHeatTemplateArtifactUUID(networkHeatTemplateLookup.getHeatTemplateArtifactUuid());
+ networkResource.setCategory(networkNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_CATEGORY));
+ networkResource.setSubCategory(networkNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_SUBCATEGORY));
+ //for tosca NS ,there is no heat for network VL
+ String heatTemplateArtifactUUID = networkHeatTemplateLookup != null ? networkHeatTemplateLookup.getHeatTemplateArtifactUuid() : "null";
+ networkResource.setHeatTemplateArtifactUUID(heatTemplateArtifactUUID);
toscaResourceStructure.setCatalogNetworkResource(networkResource);
@@ -1019,11 +1028,12 @@ public class ToscaResourceInstaller {// implements IVfResourceInstaller {
vnfResource.setToscaNodeType(testNull(vfNodeTemplate.getType()));
vnfResource.setAicVersionMax(testNull(vfNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_MAXINSTANCES).trim()));
vnfResource.setAicVersionMin(testNull(vfNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_MININSTANCES).trim()));
- //vnfResource.setHeatTemplateArtifactUUId(toscaResourceStructure.getHeatTemplateUUID());
-
- // vfNodeTemplate.getProperties()
- toscaResourceStructure.setCatalogVnfResource(vnfResource);
-
+ // vnfResource.setHeatTemplateArtifactUUId(toscaResourceStructure.getHeatTemplateUUID());
+ vnfResource.setCategory(vfNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_CATEGORY));
+ vnfResource.setSubCategory(vfNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_SUBCATEGORY));
+ // vfNodeTemplate.getProperties()
+ toscaResourceStructure.setCatalogVnfResource(vnfResource);
+
VnfResourceCustomization vnfResourceCustomization = new VnfResourceCustomization();
vnfResourceCustomization.setModelCustomizationUuid(testNull(vfNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID).trim()));
vnfResourceCustomization.setModelInstanceName(vfNodeTemplate.getName());
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResource.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResource.java
index b6151f176d..025b13b708 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResource.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResource.java
@@ -41,6 +41,8 @@ public class NetworkResource extends MavenLikeVersioning implements Serializable
private String toscaNodeType;
private Timestamp created;
private String modelUUID;
+ private String category;
+ private String subCategory;
private String heatTemplateArtifactUUID;
public NetworkResource() {}
@@ -123,8 +125,40 @@ public class NetworkResource extends MavenLikeVersioning implements Serializable
public void setModelUUID(String modelUUID) {
this.modelUUID = modelUUID;
}
-
- public String getHeatTemplateArtifactUUID() {
+
+
+ /**
+ * @return Returns the category.
+ */
+ public String getCategory() {
+ return category;
+ }
+
+
+ /**
+ * @param category The category to set.
+ */
+ public void setCategory(String category) {
+ this.category = category;
+ }
+
+
+ /**
+ * @return Returns the subCategory.
+ */
+ public String getSubCategory() {
+ return subCategory;
+ }
+
+
+ /**
+ * @param subCategory The subCategory to set.
+ */
+ public void setSubCategory(String subCategory) {
+ this.subCategory = subCategory;
+ }
+
+ public String getHeatTemplateArtifactUUID() {
return heatTemplateArtifactUUID;
}
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 fe7b7a3b8c..beb021ac11 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
@@ -39,6 +39,7 @@ public class Service extends MavenLikeVersioning implements Serializable {
private Timestamp created;
private String toscaCsarArtifactUUID;
private String modelVersion;
+ private String category;
private String serviceType;
private String serviceRole;
private Map<String,ServiceRecipe> recipes;
@@ -115,8 +116,22 @@ public class Service extends MavenLikeVersioning implements Serializable {
this.modelVersion = modelVersion;
}
-
- public String getServiceType() {
+ /**
+ * @return Returns the category.
+ */
+ public String getCategory() {
+ return category;
+ }
+
+
+ /**
+ * @param category The category to set.
+ */
+ public void setCategory(String category) {
+ this.category = category;
+ }
+
+ public String getServiceType() {
return serviceType;
}
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 8fe8127383..0872f146ad 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
@@ -43,6 +43,8 @@ public class VnfResource extends MavenLikeVersioning implements Serializable {
private String orchestrationMode;
private String aicVersionMin;
private String aicVersionMax;
+ private String category;
+ private String subCategory;
private String heatTemplateArtifactUUId;
private Timestamp created;
private String modelVersion;
@@ -108,7 +110,39 @@ public class VnfResource extends MavenLikeVersioning implements Serializable {
this.aicVersionMax = aicVersionMax;
}
- public String getModelInvariantUuid() {
+
+ /**
+ * @return Returns the category.
+ */
+ public String getCategory() {
+ return category;
+ }
+
+
+ /**
+ * @param category The category to set.
+ */
+ public void setCategory(String category) {
+ this.category = category;
+ }
+
+
+ /**
+ * @return Returns the subCategory.
+ */
+ public String getSubCategory() {
+ return subCategory;
+ }
+
+
+ /**
+ * @param subCategory The subCategory to set.
+ */
+ public void setSubCategory(String subCategory) {
+ this.subCategory = subCategory;
+ }
+
+ public String getModelInvariantUuid() {
return this.modelInvariantUuid;
}
diff --git a/mso-catalog-db/src/main/resources/NetworkResource.hbm.xml b/mso-catalog-db/src/main/resources/NetworkResource.hbm.xml
index 1599cf5c66..41e049ad8d 100644
--- a/mso-catalog-db/src/main/resources/NetworkResource.hbm.xml
+++ b/mso-catalog-db/src/main/resources/NetworkResource.hbm.xml
@@ -35,6 +35,8 @@
<property name="neutronNetworkType" column="NEUTRON_NETWORK_TYPE" type="string" length="20"/>
<property name="description" column="DESCRIPTION" type="string" length="1200"/>
<property name="orchestrationMode" column="ORCHESTRATION_MODE" type="string" length="20"/>
+ <property name="category" column="RESOURCE_CATEGORY" type="string" length="20"/>
+ <property name="subCategory" column="RESOURCE_SUB_CATEGORY" type="string" length="20"/>
<property name="heatTemplateArtifactUUID" column="HEAT_TEMPLATE_ARTIFACT_UUID" type="string" length="200" not-null="true" />
<property name="aicVersionMin" type="string" >
diff --git a/mso-catalog-db/src/main/resources/Service.hbm.xml b/mso-catalog-db/src/main/resources/Service.hbm.xml
index 5bdb0f62bd..70f5731b7d 100644
--- a/mso-catalog-db/src/main/resources/Service.hbm.xml
+++ b/mso-catalog-db/src/main/resources/Service.hbm.xml
@@ -39,6 +39,7 @@
<property name="modelInvariantUUID" type="string">
<column name="MODEL_INVARIANT_UUID" default="'MANUAL_RECORD'" not-null="true" length="200"/>
</property>
+ <property name="category" column="SERVICE_CATEGORY" type="string" length="20"/>
<property name="serviceType" column="SERVICE_TYPE" type="string" length="20"/>
<property name="serviceRole" column="SERVICE_ROLE" type="string" length="20"/>
diff --git a/mso-catalog-db/src/main/resources/VnfResource.hbm.xml b/mso-catalog-db/src/main/resources/VnfResource.hbm.xml
index 2647a0fcc2..03d1de544c 100644
--- a/mso-catalog-db/src/main/resources/VnfResource.hbm.xml
+++ b/mso-catalog-db/src/main/resources/VnfResource.hbm.xml
@@ -36,6 +36,8 @@
<property name="orchestrationMode" type="string" column="ORCHESTRATION_MODE" length="20" not-null="true"/>
<property name="aicVersionMin" type="string" column="AIC_VERSION_MIN" length="20"/>
<property name="aicVersionMax" type="string" column="AIC_VERSION_MAX" length="20"/>
+ <property name="category" type="string" column="RESOURCE_CATEGORY" length="20"/>
+ <property name="subCategory" type="string" column="RESOURCE_SUB_CATEGORY" length="20"/>
<property name="heatTemplateArtifactUUId" type="string" column="HEAT_TEMPLATE_ARTIFACT_UUID" length="200" />
<property name="created" type="timestamp" generated="insert" update="false" insert="false" not-null="true">
<column name="CREATION_TIMESTAMP" default="CURRENT_TIMESTAMP"/>