-
-
Save mehrayogesh/1dfac0b4ffaf97fb885b to your computer and use it in GitHub Desktop.
servicetype/flavor mapping
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
Option 1: Maintaining (create, delete) the Nova flavors also along with the servicetype/flavor mappings in trove. The deployer will need use the flowwlowing trove apis for maintaining the flavors within trove and no separate invocation on the nova flavor apis will be needed. | |
API: CreateFlavor(serviceTypes, flavorDefinition) | |
serviceTypes - comma separated service-types e.g. 'redis,vertica,mysql' | |
flavorDefinition - {flavor_id, name, ram, vcpu, swap, disk, ephemeral, rxtx_factor, is_public) | |
1. If the flavor with id does not exist in Nova, then the flavor is created there and is registered in trove | |
2. If the flavor with id already exists in Nova, then the flavor is registered in trove with the service types. | |
3. In case.2 the rest of the properties in flavorDefinition are ignored | |
ROUTE: POST /Flavors/serviceTypes/flavorDefinition | |
____________________________________________________ | |
API: GetFlavors(serviceTypes) | |
serviceTypes - comma separated service-types e.g. 'redis,vertica,mysql' | |
The flavors mapped with the provided service types are identified from trove and their details are fetched from Nova | |
ROUTE: GET /Flavors/serviceTypes | |
____________________________________________________ | |
API: DeleteFlavors(flavorIDs) | |
flavorIDs - comma separated nova flavor ids | |
The flavors are deregistered (from all the service types) in trove and are deleted from Nova | |
ROUTE: DELETE /Flavors/flavorIDs | |
____________________________________________________ | |
API: DeleteFlavors(serviceTypes, flavorIDs) | |
serviceTypes - comma separated service-types e.g. 'redis,vertica,mysql' | |
flavorIDs - comma separated nova flavor ids | |
The flavors are deregistered (from all the service types) in trove. The mappings are marked for delete in db | |
ROUTE: DELETE /Flavors/serviceTypes/flavorIDs | |
________________________________________________________________________________________________________________________ | |
Option: 2: Maintaing just the trove mappings and all the nova flavor maintenance (create, delete) managed out of trove. The deployer will have to use nova flavor apis to manage the flavors in Nova. The following trove apis will only be mapping the existing nova flavors with the service types. | |
API: RegisterFlavor(serviceTypes, flavorIDs) | |
serviceTypes - comma separated service-types e.g. 'redis,vertica,mysql' | |
flavorIDs - comma separated nova flavor-ids. The flavors created through nova api. | |
ROUTE: POST /RegisteredFlavors/serviceTypes/flavorIDs | |
____________________________________________________ | |
API: GetRegisteredFlavors(serviceTypes) | |
serviceTypes - comma separated service-types e.g. 'redis,vertica,mysql' | |
The flavors mapped with the provided service types are identified from trove and their details are fetched from Nova | |
ROUTE: GET /RegisteredFlavors/serviceTypes | |
____________________________________________________ | |
API: DeRegisterFlavors(serviceTypes, flavorIDs) | |
serviceTypes - comma separated service-types e.g. 'redis,vertica,mysql' | |
flavorIDs - comma separated nova flavor-ids. The flavors created through nova api. | |
The flavors are deregistered (from all the service types) in trove | |
ROUTE: DELETE /RegisteredFlavors/serviceTypes/flavorIDs | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment