integration: Allow running with external import providers#447
Merged
claudiubelu merged 3 commits intoJun 4, 2026
Merged
Conversation
d163b91 to
4792cce
Compare
ab7ec16 to
7da7ce5
Compare
7da7ce5 to
f71b801
Compare
Currently, we create a destination device in the test base. However, the import provider is supposed to create the disks for transfered as required. Moving this part into the test provider will make it easier for us to swap in other providers later on.
Introduces an `BaseTestImportProvider` ABC that contains provider-specific logic not currently defined in the import providers, meant to be used for testing-only purposes: - detect leaked resources - delete deployed replicas Adds an implementation for it, in `TestImportProvider`.
- `_load_providers_config()`: parses the YAML file present at the CORIOLIS_PROVIDERS_YAML environment variable, which describes the destination provider, its connection info, target environment, storage mappings. If CORIOLIS_PROVIDERS_YAML is unset, the default test provider will be used instead. - `CORIOLIS_CONFIG_FILE`: optional `oslo.config` file path, so provider packages can register and read their own config options. - `providers.yaml.sample`: sample file for declaring providers. - `tox.ini`: pass all `CORIOLIS_*` env vars through; set `PBR_VERSION` to avoid pbr version-detection failures. - Randomizes `instance_name` used for transfer tests to avoid conflict. - Fixes `connection_info` reference in `test_minion_pools.py`. - Machine Pool allocation, transfers, deployments may take longer for other providers. 600s gives sufficient headroom.
f71b801 to
704ff93
Compare
petrutlucian94
approved these changes
Jun 4, 2026
Member
petrutlucian94
left a comment
There was a problem hiding this comment.
It's much cleaner now, lgtm.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, we create a destination device in the test base. However, the import provider is supposed to create the disks for transferred as required.
Moving this part into the test provider will make it easier for us to swap in other providers later on.
Introduces an
BaseTestImportProviderABC that contains provider-specific logic not currently defined in the import providers, meant to be used for testing-only purposes:Adds an implementation for it, in
TestImportProvider.Adds
providers.yamlsupport for external providers:_load_providers_config(): parses the YAML file present at theCORIOLIS_PROVIDERS_YAMLenvironment variable, which describes the destination provider, its connection info, target environment, storage mappings. IfCORIOLIS_PROVIDERS_YAMLis unset, the default test provider will be used instead.CORIOLIS_CONFIG_FILE: optionaloslo.configfile path, so provider packages can register and read their own config options.providers.yaml.sample: sample file for declaring providers.Changes needed for using other providers:
tox.ini: pass allCORIOLIS_*env vars through; setPBR_VERSIONto avoid pbr version-detection failures.instance_nameused for transfer tests to avoid conflict.connection_inforeference intest_minion_pools.py.