On Wed, Oct 28, 2009 at 10:29:32AM +1300, Ivan Meredith wrote:
The REST API for creating instances is fairly minimal. It would be good if we could pass some custom options to it. These would be optional of course, and provider specific.
We allow customers to clone another instance if they want to, or choose a billing method (some like to have multiple CC's or some servers on Wire Transfer etc).
I propose something like, any options that don't match the 4 specified in the API, are bundled up into an opts hash, and given to the providers driver. Then they could use them at will.
Possibly there might be a way for something like the portal to be able to specify some dynamic options by returning a list of options from the driver (or provider api). (Actaully I'm still trying to get the portal working with the mock driver, so I assume it can create instances.)
Any commets/ideas?
Well...
One of the ways we have made libvirt (http://libvirt.org) successful is by refusing to do exactly this -- i.e. instead of allowing arbitrary options to pass through to a driver, do the hard thinking now about what specific options we want to support vs. what ones we don't (and define the API in such a way that it is easy to extend as necessary). This is what will ultimately make Deltacloud into a viable API, rather than just a thin shell around a bunch of provider-specific code.
So, for example, if billing method is an important parameter, then we should figure out how to model that in the "create instance" API, develop a schema for it, and freeze it.
If we go the "arbitrary options can pass through" route, ultimately we're not providing as much value as we could to consumers of the API (because they now have to have cloud-provider-specific code in their applications). Instead we want Deltacloud consumers to be able to write for the Deltacloud API exclusively, without having to consider which driver they might be talking to.
Take care, --Hugh