You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by lu...@apache.org on 2010/07/09 01:40:26 UTC

svn commit: r962242 - /incubator/deltacloud/trunk/client/lib/dcloud/instance.rb

Author: lutter
Date: Thu Jul  8 23:40:26 2010
New Revision: 962242

URL: http://svn.apache.org/viewvc?rev=962242&view=rev
Log:
Add destroy method to instance.

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 <im...@redhat.com>

Modified:
    incubator/deltacloud/trunk/client/lib/dcloud/instance.rb

Modified: incubator/deltacloud/trunk/client/lib/dcloud/instance.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/client/lib/dcloud/instance.rb?rev=962242&r1=962241&r2=962242&view=diff
==============================================================================
--- incubator/deltacloud/trunk/client/lib/dcloud/instance.rb (original)
+++ incubator/deltacloud/trunk/client/lib/dcloud/instance.rb Thu Jul  8 23:40:26 2010
@@ -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?