diff options
author | c00149107 <chenchuanyu@huawei.com> | 2018-01-19 14:36:23 +0800 |
---|---|---|
committer | c00149107 <chenchuanyu@huawei.com> | 2018-01-22 09:32:07 +0800 |
commit | 2a4218f9cb597153d74ffc8bcd47c082fee787b2 (patch) | |
tree | f7e4dcb1c3484646fd28349d338739e58f3e588d /asdc-controller/src | |
parent | 060172a72106a52ad0b1adcd3fb2ad50cb05f1cc (diff) |
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 <chenchuanyu@huawei.com>
Diffstat (limited to 'asdc-controller/src')
-rw-r--r-- | asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/ToscaResourceInstaller.java | 14 |
1 files changed, 9 insertions, 5 deletions
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());
|