ecs_composex
ecs_composex copied to clipboard
[DESIGN] Allow for external modules to have a mapping of resources and modules to load
As a developer for an external ecs compose-x module, I might have multiple x-<resource> and models to load from the same repository.
Currently I'd have to create one ecs-compose-x extension module per resource and define dependencies with each other.
It'd be much better potentially to have in the init.py an attribute that would indicate
- x-resource
- relative path to module
for example
with a repository / package called ecs_composex_msk_cluster, which by default would manage x-msk_cluster, we could have in __init__.py something as follows
MODULES_MAPPINGS = {
"x-msk_cluster": {"relpath": "./msk_cluster", "abspath": path.abspath("./msk_cluster")},
"x-msk_configuration": {"rel_path": "./msk_config", "abspath": path.abspath("./msk_config")}
}
by extension, we could further expand the logic and add
- path to schema
- path to permissions file
and implement that in the core modules of compose-x.
In progress - modules will maintain the inventory of resources, new or lookup. Settings maintains the list of modules. So the settings.compose_content does not need to have the resources updated anymore.
Releasing with 0.23
Released with v0.23.0 #650