Skip to content

integration: Allow running with external import providers#447

Merged
claudiubelu merged 3 commits into
cloudbase:masterfrom
claudiubelu:integration-provider-agnosticism
Jun 4, 2026
Merged

integration: Allow running with external import providers#447
claudiubelu merged 3 commits into
cloudbase:masterfrom
claudiubelu:integration-provider-agnosticism

Conversation

@claudiubelu
Copy link
Copy Markdown
Member

@claudiubelu claudiubelu commented May 28, 2026

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 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.

Adds providers.yaml support for external providers:

  • _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.

Changes needed for using other 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 may take longer for other providers. 600s gives sufficient headroom.

@claudiubelu claudiubelu force-pushed the integration-provider-agnosticism branch 2 times, most recently from d163b91 to 4792cce Compare May 28, 2026 17:01
Comment thread coriolis/tests/integration/provider_harness.py Outdated
@claudiubelu claudiubelu force-pushed the integration-provider-agnosticism branch 2 times, most recently from ab7ec16 to 7da7ce5 Compare June 3, 2026 08:07
Comment thread coriolis/tests/integration/providers.yaml.sample
Comment thread coriolis/tests/integration/harness.py Outdated
@claudiubelu claudiubelu force-pushed the integration-provider-agnosticism branch from 7da7ce5 to f71b801 Compare June 3, 2026 16:52
@claudiubelu claudiubelu changed the title integration: Move destination device initialization to the provider integration: Allow running with external import providers Jun 4, 2026
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.
@claudiubelu claudiubelu force-pushed the integration-provider-agnosticism branch from f71b801 to 704ff93 Compare June 4, 2026 11:11
Copy link
Copy Markdown
Member

@petrutlucian94 petrutlucian94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's much cleaner now, lgtm.

@claudiubelu claudiubelu merged commit 38f7180 into cloudbase:master Jun 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants