On 06/24/11 - 03:57:46PM, [email protected] wrote: > Hi Chris, > > On 23/06/11 22:26, Chris Lalancette wrote: > >Hey Marios, > > I was taking a quick look today at the firewall code in deltacloud, and > > thanks for taking the time to do that > > >I noticed one oddity. > > Currently it looks like the way to delete a firewall rule is to > >DELETE /api/firewalls/:firewall/rule, and setting the rule_id to the rule you > >want to delete. But isn't it more idiomatic to do something like: > > > >DELETE /api/firewalls/:firewall/:rule_id > > > > yes, you are right and I agree with you. In fact my first revision > of firewalls did exactly that, by explicitly defining the rule > "delete '/api/firewalls/:firewall/:rule' do" in server.rb. In the > next revision however I moved this rule into the Firewalls > collection in order to take advantage of the rabbit DSL - auto > generation of documentation, validation of params etc. > > I haven't tinkered around with Rabbit enough to know off-hand > whether its worth trying to implement the original functionality > (DELETE /:firewall/:rule_id) there (Michal?). If not then I suggest > we just restore the original rule and don't use Rabbit for this > particular case. Thoughts?
Personally, I think we should implement it outside the DSL (like the blob creation). It is more important to get the external interface correct/consistent; if need be, we can always later on extend the Rabbit DSL to support this type of operation. -- Chris Lalancette
