Refactor (non-breaking change which improves the structure or operation of the implementation)
Description
Add a setting controlling whether composites or dynamic cmdb loading will be used.
The variable GENERATION_USE_CMDB_PLUGIN controls whether dynamic cmdb loading will be enabled - basically by examining whether the cmdb plugin is included in GENERATION_PLUGIN_DIRS. It can also be explicitly set to false to ignore the cmdb plugin.
A few activities such as creation of cache and tmp dirs have moved to common.sh and the checking for cmdb updates removed as it is now provided by a dedicated entrance in the cmdb plugin.
Blueprint generation is still required even if the cmdb plugin is used as a few key environment variables like REGION are needed for pre-engine setup and file naming.
Further changes will incrementally be introduced to reduce this dependency, once the current round of changes are bedded down.
The check for GENERATION_DATA_DIR being populated has also been corrected - the previous check for a status code following a variable assignment would never have worked as assignments always return 0.
Motivation and Context
Prepare for the replacement of composites with dynamic CMDB loading. Unless the cmdb plugin is detected or explicitly requested, no functional change is implemented by the PR.
How Has This Been Tested?
Local template generation. Test suites for the engine and for the cloud provider plugins have also been executed successfully.
Intent of Change
Description
Add a setting controlling whether composites or dynamic cmdb loading will be used.
The variable
GENERATION_USE_CMDB_PLUGIN
controls whether dynamic cmdb loading will be enabled - basically by examining whether the cmdb plugin is included inGENERATION_PLUGIN_DIRS
. It can also be explicitly set to false to ignore the cmdb plugin.A few activities such as creation of cache and tmp dirs have moved to
common.sh
and the checking for cmdb updates removed as it is now provided by a dedicated entrance in the cmdb plugin.Blueprint generation is still required even if the cmdb plugin is used as a few key environment variables like
REGION
are needed for pre-engine setup and file naming.Further changes will incrementally be introduced to reduce this dependency, once the current round of changes are bedded down.
The check for
GENERATION_DATA_DIR
being populated has also been corrected - the previous check for a status code following a variable assignment would never have worked as assignments always return 0.Motivation and Context
Prepare for the replacement of composites with dynamic CMDB loading. Unless the cmdb plugin is detected or explicitly requested, no functional change is implemented by the PR.
How Has This Been Tested?
Local template generation. Test suites for the engine and for the cloud provider plugins have also been executed successfully.
Related Changes
Prerequisite PRs:
Dependent PRs:
Consumer Actions: