From 2a4218f9cb597153d74ffc8bcd47c082fee787b2 Mon Sep 17 00:00:00 2001 From: c00149107 Date: Fri, 19 Jan 2018 14:36:23 +0800 Subject: Add Category info For Service and Resource Add Category info For Service and Resource,It is used for generic workflow Change-Id: I952d39388eac8b379a8ecc365e1292fdc0cf597e Issue-ID: SO-379 Signed-off-by: c00149107 --- .../mso/asdc/installer/heat/ToscaResourceInstaller.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'asdc-controller/src/main/java/org/openecomp') 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..b7b35158cd 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 @@ -787,6 +787,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()); } @@ -835,6 +836,8 @@ public class ToscaResourceInstaller {// implements IVfResourceInstaller { networkResource.setToscaNodeType(networkNodeTemplate.getType()); networkResource.setDescription(testNull(networkNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_DESCRIPTION))); networkResource.setOrchestrationMode("HEAT"); + networkResource.setCategory(networkNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_CATEGORY)); + networkResource.setSubCategory(networkNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_SUBCATEGORY)); networkResource.setHeatTemplateArtifactUUID(networkHeatTemplateLookup.getHeatTemplateArtifactUuid()); toscaResourceStructure.setCatalogNetworkResource(networkResource); @@ -1019,11 +1022,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()); -- cgit 1.2.3-korg