summaryrefslogtreecommitdiffstats
path: root/cloudmasterd
diff options
context:
space:
mode:
authorMatthew Hicks <mhicks@mhicks-host.usersys.redhat.com>2008-06-21 14:18:16 -0400
committerMatthew Hicks <mhicks@mhicks-host.usersys.redhat.com>2008-06-21 14:18:16 -0400
commitf680c3185f798215d4c381038fca9a62ffd76d8e (patch)
tree74b67a25978c47d212b0d774141d9c806cc1c2b3 /cloudmasterd
parent1bdfd2c9c90f08d8bfdd9aaebe8b558a09e08917 (diff)
Adding wiring for deleting vms
Diffstat (limited to 'cloudmasterd')
-rw-r--r--cloudmasterd/lib/cloudmasterd.rb19
1 files changed, 16 insertions, 3 deletions
diff --git a/cloudmasterd/lib/cloudmasterd.rb b/cloudmasterd/lib/cloudmasterd.rb
index fb761f0..1c95d45 100644
--- a/cloudmasterd/lib/cloudmasterd.rb
+++ b/cloudmasterd/lib/cloudmasterd.rb
@@ -134,6 +134,11 @@ module Cloudmasterd::Controllers
Machine.create :name => machine_fqdn, :email => email, :cloud => @host
render :_koan
end
+
+ def destroy(id)
+ puts "Destroying image #{id}"
+ redirect R(Cloud)
+ end
end
class Cloud < REST 'cloud'
@@ -173,9 +178,17 @@ module Cloudmasterd::Views
@machines.keys.each do |email|
div do
h1 email
- ul do
- @machines[email].each do |machine|
- li "#{machine.name}: #{machine.cloud}"
+ @machines[email].each do |machine|
+ table do
+ tr do
+ td machine.name
+ td machine.cloud
+ td do
+ form(:method => :delete, :action => R(Cloudmasterd::Controllers::Koan, "#{machine.name}.html")) do
+ input :type => :submit, :value => 'Destroy'
+ end
+ end
+ end
end
end
end