Extend external provider API
gabriel-samfira opened this issue · comments
The external provider API has suited us fine for the most part, but moving forward we'll need to extend it in order to permit more advanced features like:
- Sending extra specs to all operations
- Allowing centralized logging with the main GARM process
- This can be done using a local unix socket (linux) or named pipe (Windows)
- Add pool level validation via a new command like
GARM_COMMAND=Validate
- Allow json schema validation of extra specs and pool info. This will allow us to run something like
garm-cli pool validate POOL_ID
and have the provider run a number of checks on supplied information (image, flavor, extra specs) using the provider credentials and report back to the user if the operation succeeded
To do that safely, we need to add versions to the provider interface. This should be doable via another GARM_COMMAND
. This new command should return a json to stdout with version information (format TBD), where at the very least it states the external provider version it implements. GARM can then decide what capabilities this provider has and potentially adapt accordingly or return an error.
To ensure backwards compatibility, we can assume that any provider that returns an error for GARM_COMMAND=Version
, implements the existing functionality for providers.