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?
marios
? For instance, this seems to be the way that the deletion of blobs in buckets
happens, and it just seems like an easier way to go. I thought I would mention
it before we release the next version of deltacloud and this gets frozen in
stone.
Thanks,