On 06/27/11 - 05:22:18PM, [email protected] wrote:
> From: marios <[email protected]>
> 
> DELETE /api/firewalls/:firewall/:rule_id
> 
> Signed-off-by: marios <[email protected]>
> ---
>  server/lib/deltacloud/drivers/ec2/ec2_driver.rb |    2 +-
>  server/server.rb                                |   31 ++++++++++------------
>  server/views/firewalls/show.html.haml           |    3 +-
>  3 files changed, 16 insertions(+), 20 deletions(-)

Hey Marios,
     Sorry for the long delay here.  This patch is most of what I would like
to see, though there is one thing missing.  In the XML for the firewall rule,
I think we should export the URL for the rule as well, similar to how blobs
have a full URL.  Something like this (untested) patch?

-- 
Chris Lalancette
diff --git a/server/views/firewalls/show.xml.haml 
b/server/views/firewalls/show.xml.haml
index 9d1fc48..c2ea458 100644
--- a/server/views/firewalls/show.xml.haml
+++ b/server/views/firewalls/show.xml.haml
@@ -9,7 +9,7 @@
         - haml_concat @firewall.send(attribute)
   %rules
     - @firewall.rules.each do |rule|
-      %rule{:id => rule.id}
+      %rule{:href => firewall_url(@firewall.id) + '/' + rule.id, :id => 
rule.id}
         - rule.attributes.select{|attr| attr != :sources && attr != :id}.each 
do |rule_attrib|
           - haml_tag("#{rule_attrib}".tr('-', '_'), :<) do
             - haml_concat rule.send(rule_attrib)
@@ -18,4 +18,4 @@
             - if source[:type] == "group"
               %source{:name => source[:name], :type=> source[:type], 
:owner=>source[:owner]}
             - else
-              %source{:prefix => source[:prefix], :address=> source[:address], 
:family=>source[:family], :type => source[:type]}
\ No newline at end of file
+              %source{:prefix => source[:prefix], :address=> source[:address], 
:family=>source[:family], :type => source[:type]}

Reply via email to