On Thu, 2010-02-18 at 21:38 +0100, Michal Fojtik wrote:
On 18/02/10 12:23 -0800, David Lutterkort wrote:
On Thu, 2010-02-18 at 15:57 +0100, mfojtik@redhat.com wrote:
- def storage_snapshots()
- def storage_snapshots(id=nil) storage_snapshots = [] request( entry_points[:storage_snapshots] ) do |response| doc = REXML::Document.new( response.body )
Why are you adding these id parameters ? They aren't used in the method bodies at all.
Unfortunately, I calling this methods from client (command line):
client.send(options[:collection].to_s, params).each do |model| ...
Without this 'optional' params, this one line of code will expand to couple lines of code ;) (deltacloud.rb: In 'flavors' there are 'opts={}' parameter, but in 'instances' or 'storage_volumes' there are no parameters at all...)
Makes sense - you should change it to opts or something like that though; I think it's quite likely that we'll allow options to filter the collection in those methods at some point. Less likely that we'll pass in an id.
David