This file contains 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
List all migration paths (admin only) | |
GET /migrations | |
{ | |
"migrations": [ | |
{ | |
"id": "1111"; | |
"from_version_id": "1111"; | |
"to_version_id": "2222"; | |
"from_datastore": "Mysql"; | |
"to_datastore": "Mysql"; | |
"from_version_name": "5.5.31"; | |
"to_version_name": "5.5.32"; | |
}, | |
{ | |
"id": "2222"; | |
"from_version_id": "1111"; | |
"to_version_id": "3333"; | |
"from_datastore": "Mysql"; | |
"to_datastore": "Mysql-5.6"; | |
"from_version_name": "5.5.31"; | |
"to_version_name": "5.6.13"; | |
} | |
] | |
} | |
# do we need datastore/version names in output? | |
# do we need cross-datastore migrations? (eg. if "Mysql" and "Mysql-5.6" are different datastores) | |
Show migration path (admin only) | |
GET /migrations/{migration_uuid} | |
{ | |
"migration": { | |
"id": "1111"; | |
"from_version_id": "1111"; | |
"to_version_id": "2222"; | |
"from_datastore": "Mysql"; | |
"to_datastore": "Mysql"; | |
"from_version_name": "5.5.31"; | |
"to_version_name": "5.5.32"; | |
"migration_manager": "mysql_5_5_upgrade"; | |
"active": True; | |
} | |
} | |
Create migration path (admin only) | |
POST /migrations | |
{ | |
"migration": { | |
"from_version_id": "1111"; | |
"to_version_id": "2222"; | |
"migration_manager": "mysql_5_5_upgrade"; | |
"active": True; # optional, default is True | |
# any options for migration_manager? | |
} | |
} | |
Response: | |
{ | |
"migration": { | |
"id": "1111"; | |
"from_version_id": "1111"; | |
"to_version_id": "2222"; | |
"from_datastore": "Mysql"; | |
"to_datastore": "Mysql"; | |
"from_version_name": "5.5.31"; | |
"to_version_name": "5.5.32"; | |
"migration_manager": "mysql_5_5_upgrade"; | |
"active": True; | |
} | |
} | |
# should be default migration_manager? (eg. "SimplePackageUpdater" class which just upgrades system packages) | |
# should it compare image_id and/or datastore_manager for two versions? | |
Update migration path (admin only) | |
PATCH /migrations/{migration_uuid} | |
{ | |
"migration": { | |
"migration_manager": "mysql_5_5_upgrade_new"; | |
"active": False; | |
} | |
} | |
Response: | |
{ | |
"migration": { | |
"id": "1111"; | |
"from_version_id": "1111"; | |
"to_version_id": "2222"; | |
"from_datastore": "Mysql"; | |
"to_datastore": "Mysql"; | |
"from_version_name": "5.5.31"; | |
"to_version_name": "5.5.32"; | |
"migration_manager": "mysql_5_5_upgrade_new"; | |
"active": False; | |
} | |
} | |
List available versions for migrate to | |
GET /instances/{instance_id}/migrations | |
{ | |
"migrations": [ | |
{ | |
"to_version_id": "2222"; | |
"to_datastore": "Mysql"; | |
"to_version_name": "5.5.32"; | |
}, | |
{ | |
"to_version_id": "3333"; | |
"to_datastore": "Mysql-5.6"; | |
"to_version_name": "5.6.13"; | |
} | |
] | |
} | |
# skip "to_" in response? | |
Migrate instance to different datastore version | |
POST /instances/{instance_uuid} | |
{ | |
"action": { | |
"migrate_version": { | |
"to_version_id": "2222"; | |
# any options for migration_manager? | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment