Enriching (or enhancing) a blueprint

Objective

For a blueprint to be valid, all types used by it need to be defined. This page shows how to enrich a blueprint for test purposes.

For more details about the enrichment process, please consult the Enrichment page of the Modeling Concepts.

The BluePrintEnhancerServiceImplTest class

The purpose of this class is to test the blueprint enrichment and validation processes.

During test, the blueprint will be enriched and placed inside a temporary folder below the target directory, so running this test can be used to enrich custom blueprints.

First step is to make sure that the temporary folder won't be deleted by the test; on the last method, testComponentInvokeEnhancementAndValidation, comment out the last deleteDir line:

One of the test method can be edited to read a custom blueprint and to deliver it to a specific directory of the developers choice:

After executing the test, the above snippet would create an enriched database on the directory cds/ms/controllerblueprints/modules/service/target/blueprints/enrichment/capability_restconf-enhance:

Comment on zipping the outcome for test

If the intention of enriching the blueprint is to test it on the Blueprints Processor, the contents of this folder need to be zipped (not the parent directory!):