On Tue, 2011-05-10 at 11:46 +0200, Michal Fojtik wrote: > On May 10, 2011, at 1:39 AM, David Lutterkort wrote: > > Hi, > > > Additionally, this only exposes a small part of the EC2 > > BlockDeviceMapping feature; we don't need to expose everything right > > now, but how will we evolve the API to support things like mapping > > multiple volumes ? > > Yes, the question is how we will do that :-) Right now there are several > things using '.n' convention to perform 'multiple' operations. > > I'm thinking of using 'matrix' params to handle this, but dunno how these > params should be exposed through API (or defined Rabbit). Maybe something > like: > > param :device_mappings, :array, :optional > > What do you think?
Maybe with this, we're at the point where we need to go beyond simple request parameters, and make POST /api/instances accept an XML body that describes the instance; with that, there'd be enough flexibility to accept a list of BlockDeviceMappings. It just seems wrong to encode data structures in request params. David
