Update VF Module Check for Tosca VNF 75/28375/2
authorc00149107 <chenchuanyu@huawei.com>
Wed, 17 Jan 2018 09:45:28 +0000 (17:45 +0800)
committerc00149107 <chenchuanyu@huawei.com>
Wed, 17 Jan 2018 10:06:46 +0000 (18:06 +0800)
Update VF Module Check for Tosca VNF, so that voLTE can distribute to SO

Change-Id: I39d87f198532e480540e039f207f1bd201a5d4d7
Issue-ID: SO-380
Signed-off-by: c00149107 <chenchuanyu@huawei.com>
asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/VfResourceStructure.java
common/src/main/java/org/openecomp/mso/logger/MessageEnum.java
common/src/main/resources/ASDC.properties

index 70fa7c1..c2879a4 100644 (file)
@@ -32,23 +32,21 @@ import org.codehaus.jackson.JsonParseException;
 import org.codehaus.jackson.map.JsonMappingException;
 import org.codehaus.jackson.map.ObjectMapper;
 import org.codehaus.jackson.type.TypeReference;
-
-import org.openecomp.sdc.api.IDistributionClient;
-import org.openecomp.sdc.api.notification.IArtifactInfo;
-import org.openecomp.sdc.api.notification.INotificationData;
-import org.openecomp.sdc.api.notification.IResourceInstance;
-import org.openecomp.sdc.api.notification.IVfModuleMetadata;
-import org.openecomp.sdc.api.results.IDistributionClientDownloadResult;
 import org.openecomp.mso.asdc.client.ASDCConfiguration;
 import org.openecomp.mso.asdc.client.exceptions.ArtifactInstallerException;
-import org.openecomp.mso.db.catalog.beans.NetworkResourceCustomization;
 import org.openecomp.mso.db.catalog.beans.AllottedResourceCustomization;
+import org.openecomp.mso.db.catalog.beans.NetworkResourceCustomization;
 import org.openecomp.mso.db.catalog.beans.Service;
 import org.openecomp.mso.db.catalog.beans.ServiceToAllottedResources;
 import org.openecomp.mso.db.catalog.beans.ServiceToNetworks;
 import org.openecomp.mso.db.catalog.beans.VnfResource;
-
+import org.openecomp.mso.logger.MessageEnum;
 import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.sdc.api.IDistributionClient;
+import org.openecomp.sdc.api.notification.IArtifactInfo;
+import org.openecomp.sdc.api.notification.INotificationData;
+import org.openecomp.sdc.api.notification.IResourceInstance;
+import org.openecomp.sdc.api.results.IDistributionClientDownloadResult;
 /**
  * This structure exists to avoid having issues if the order of the vfResource/vfmodule artifact is not good (tree structure).
  *
@@ -141,8 +139,10 @@ public final class VfResourceStructure {
 
        public void createVfModuleStructures() throws ArtifactInstallerException {
 
+           //for vender tosca VNF there is no VFModule in VF
                if (vfModulesMetadataList == null) {
-                       throw new ArtifactInstallerException("VfModule Meta DATA could not be decoded properly or was not present in the notification");
+                   LOGGER.info(MessageEnum.ASDC_GENERAL_INFO,"There is no VF mudules in the VF.", "ASDC", "createVfModuleStructures");
+                   return;
                }
                for (IVfModuleData vfModuleMeta:vfModulesMetadataList) {
                        vfModulesStructureList.add(new VfModuleStructure(this,vfModuleMeta));
index 3d181e3..9635541 100644 (file)
@@ -172,6 +172,7 @@ public enum MessageEnum implements EELFResolvableErrorEnum{
        ASDC_GENERAL_EXCEPTION_ARG,\r
        ASDC_GENERAL_EXCEPTION,\r
        ASDC_GENERAL_WARNING,\r
+       ASDC_GENERAL_INFO,\r
        ASDC_AUDIT_EXEC,\r
        ASDC_GENERAL_METRICS,\r
        ASDC_CREATE_SERVICE,\r
index 015ca35..4f3864d 100644 (file)
@@ -208,3 +208,8 @@ ASDC_PROPERTIES_NOT_FOUND=\
                   Please verify whether properties file exist or readable|\
                   Please verify whether properties file exist or readable|\
                   Properties file not found
+ASDC_GENERAL_INFO=\
+                  MSO-ASDC-9305I|\
+                  INFO: {0}|\
+                  No resolution needed|\
+                  General Info