add package description to be at Entry definition 34/109134/4
authorShaabanEltanany <shaaban.eltanany.ext@orange.com>
Sun, 14 Jun 2020 13:30:23 +0000 (15:30 +0200)
committerKAPIL SINGAL <ks220y@att.com>
Mon, 15 Jun 2020 12:00:44 +0000 (12:00 +0000)
Issue-ID: CCSDK-2438
Signed-off-by: ShaabanEltanany <shaaban.eltanany.ext@orange.com>
Change-Id: I8657560cd55a21421dc6849d7aac64c02e83db42

cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/creationModes/DesignerCreationMode.ts
cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/mapping-models/definitions/VlbDefinition.ts
ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintConstants.kt
ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/service/BlueprintProcessorCatalogServiceImpl.kt

index 00dcc5d..184ccf9 100644 (file)
@@ -50,6 +50,7 @@ export class DesignerCreationMode extends PackageCreationModes {
         metadata.template_version = cbaPackage.metaData.version;
         metadata['author-email'] = 'shaaban.eltanany.ext@orange.com';
         metadata['user-groups'] = 'test';
+        metadata.template_description = cbaPackage.metaData.description;
         cbaPackage.metaData.mapOfCustomKey.forEach((customKeyValue, key) => {
             metadata[key] = customKeyValue;
         });
index 630baa1..f823108 100644 (file)
@@ -45,6 +45,9 @@ export class Metadata {
     dictionary_group: string;
     @JsonProperty('template_tags')
     templateTags: string;
+    @JsonProperty('template_description')
+        // tslint:disable-next-line:variable-name
+    template_description: string;
 
 
     /* @JsonProperty('custom_keys', {String}, false)
index 5c522e7..cb78f41 100644 (file)
@@ -202,6 +202,7 @@ object BluePrintConstants {
     const val METADATA_TEMPLATE_TYPE = "template_type"
     const val METADATA_TEMPLATE_AUTHOR = "template_author"
     const val METADATA_TEMPLATE_TAGS = "template_tags"
+    const val METADATA_TEMPLATE_DESCRIPTION = "template_description"
     const val METADATA_WORKFLOW_NAME = "workflow_name"
 
     const val PAYLOAD_DATA = "payload-data"
index 0c407ec..1d34b7b 100755 (executable)
@@ -149,7 +149,8 @@ class BlueprintProcessorCatalogServiceImpl(
         blueprintModel.artifactVersion = artifactVersion
         blueprintModel.updatedBy = metadata[BluePrintConstants.METADATA_TEMPLATE_AUTHOR]!!
         blueprintModel.tags = metadata[BluePrintConstants.METADATA_TEMPLATE_TAGS]!!
-        blueprintModel.artifactDescription = "Controller Blueprint for $artifactName:$artifactVersion"
+        val description = if (null == metadata[BluePrintConstants.METADATA_TEMPLATE_DESCRIPTION]) metadata[BluePrintConstants.METADATA_TEMPLATE_DESCRIPTION] else ""
+        blueprintModel.artifactDescription = "Controller Blueprint for $artifactName:$artifactVersion $description"
 
         val blueprintModelContent = BlueprintModelContent()
         blueprintModelContent.id = metadata[BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID]