I noticed during testing that the ruby client does not have a destroy
method, this patch adds that to it.
Signed-off-by: Ian Main <imain(a)redhat.com>
---
client/lib/dcloud/instance.rb | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/client/lib/dcloud/instance.rb b/client/lib/dcloud/instance.rb
index 04820a4..e3455aa 100644
--- a/client/lib/dcloud/instance.rb
+++ b/client/lib/dcloud/instance.rb
@@ -71,6 +71,13 @@ module DCloud
unload
end
+ def destroy!()
+ url = action_urls['destroy']
+ throw Exception.new( "Unable to destroy" ) unless url
+ client.post_instance( url )
+ unload
+ end
+
def load_payload(xml=nil)
super(xml)
unless xml.nil?
--
1.6.2.5