---
 .../lib/deltacloud/helpers/application_helper.rb   |    4 ++++
 server/views/instances/index.xml.haml              |    3 ++-
 server/views/instances/show.xml.haml               |    2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/server/lib/deltacloud/helpers/application_helper.rb 
b/server/lib/deltacloud/helpers/application_helper.rb
index 13375c1..29f9325 100644
--- a/server/lib/deltacloud/helpers/application_helper.rb
+++ b/server/lib/deltacloud/helpers/application_helper.rb
@@ -36,6 +36,10 @@ module ApplicationHelper
     s+="</ul>"
   end
 
+  def instance_action_method(action)
+    collections[:instances].operations[action.to_sym].method
+  end
+
   def driver_has_feature?(feature_name)
     driver.features(:instances).collect{ |f| f.name }.include?(feature_name)
   end
diff --git a/server/views/instances/index.xml.haml 
b/server/views/instances/index.xml.haml
index 6c51654..1a55d99 100644
--- a/server/views/instances/index.xml.haml
+++ b/server/views/instances/index.xml.haml
@@ -14,7 +14,8 @@
           %property{:kind => 'fixed', :name => p, :value => v, :unit => 
Deltacloud::HardwareProfile::unit(p)}
       %actions
         - instance.actions.compact.each do |action|
-          %link{:rel => action, :href => self.send("#{action}_instance_url", 
instance.id)}
+          %link{:rel => action, :href => self.send("#{action}_instance_url", 
instance.id), :method => instance_action_method(action)}
+
       - haml_tag :"public-addresses" do
         - instance.public_addresses.each do |address|
           %address  #{address}
diff --git a/server/views/instances/show.xml.haml 
b/server/views/instances/show.xml.haml
index 5b7ccb4..aed4982 100644
--- a/server/views/instances/show.xml.haml
+++ b/server/views/instances/show.xml.haml
@@ -17,7 +17,7 @@
       %property{:kind => 'fixed', :name => p, :value => v, :unit => 
Deltacloud::HardwareProfile::unit(p)}
   %actions
     - @instance.actions.compact.each do |instance_action|
-      %link{:rel => instance_action, :href => 
self.send("#{instance_action}_instance_url", @instance.id)}
+      %link{:rel => instance_action, :method => 
instance_action_method(instance_action), :href => 
self.send("#{instance_action}_instance_url", @instance.id)}
   %public-addresses
     - @instance.public_addresses.each do |address|
       %address<
-- 
1.7.1

_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to