Skip to content

Commit 32ebe75

Browse files
Document the provider interface
We'll document the Coriolis provider interface, making it much easier to write new providers or extend the existing ones, with or without AI assistance. At the moment, most of the provider API is undocumented. It's true that we have JSON schemas for some of the dicts, but not all of them are covered. Furthermore, the intended provider behavior isn't always immediately obvious. Let's take "deploy_replica_target_resources" for example, it's meant to deploy a minion instance and return the minion connection info, if minion instances are needed for this import provider. Somebody who writes a provider whould have a hard time guessing that. We intend to solve this. While at it, we'll add type annotations. Also, we're cleaning up unused deprecated base classes, otherwise new providers may end up implementing these APIs unnecessarily. We'll keep the class definitions without any abstract methods for backwards compatibility, in case there are providers that still inherit them.
1 parent 3d9dc50 commit 32ebe75

File tree

4 files changed

+1006
-208
lines changed

4 files changed

+1006
-208
lines changed

coriolis/constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,6 @@
188188
PROVIDER_PLATFORM_SOURCE = "source"
189189
PROVIDER_PLATFORM_DESTINATION = "destination"
190190

191-
PROVIDER_TYPE_IMPORT = 1
192-
PROVIDER_TYPE_EXPORT = 2
193191
PROVIDER_TYPE_TRANSFER_IMPORT = 4
194192
PROVIDER_TYPE_TRANSFER_EXPORT = 8
195193
PROVIDER_TYPE_ENDPOINT = 16
@@ -211,6 +209,8 @@
211209
# and de-increment the rest
212210
PROVIDER_TYPE_VALIDATE_MIGRATION_EXPORT = 2048
213211
PROVIDER_TYPE_VALIDATE_MIGRATION_IMPORT = 8192
212+
PROVIDER_TYPE_IMPORT = 1
213+
PROVIDER_TYPE_EXPORT = 2
214214

215215
DISK_FORMAT_VMDK = 'vmdk'
216216
DISK_FORMAT_RAW = 'raw'

0 commit comments

Comments
 (0)