diff --git a/lib/fog/compute/models/storm_on_demand/server.rb b/lib/fog/compute/models/storm_on_demand/server.rb index f8b84689e..5277772d2 100644 --- a/lib/fog/compute/models/storm_on_demand/server.rb +++ b/lib/fog/compute/models/storm_on_demand/server.rb @@ -37,7 +37,7 @@ module Fog load(data) end - def delete + def destroy requires :identity connection.delete_server(:uniq_id => identity) true diff --git a/lib/fog/compute/storm_on_demand.rb b/lib/fog/compute/storm_on_demand.rb index aba80cdad..d7391f495 100644 --- a/lib/fog/compute/storm_on_demand.rb +++ b/lib/fog/compute/storm_on_demand.rb @@ -110,8 +110,8 @@ module Fog unless response.body.empty? response.body = JSON.parse(response.body) end - if response.body.keys[0] == 'error_class' - raise Fog::StormOnDemand::Compute::Error, response.body.inspect + if response.body.keys.include?('full_error') + raise(Fog::StormOnDemand::Compute::Error, response.body.inspect) end response end diff --git a/tests/compute/requests/stormondemand/server_tests.rb b/tests/compute/requests/storm_on_demand/server_tests.rb similarity index 89% rename from tests/compute/requests/stormondemand/server_tests.rb rename to tests/compute/requests/storm_on_demand/server_tests.rb index e36189dea..d3f095c61 100644 --- a/tests/compute/requests/stormondemand/server_tests.rb +++ b/tests/compute/requests/storm_on_demand/server_tests.rb @@ -44,12 +44,12 @@ Shindo.tests('StormOnDemand::Compute | server requests', ['stormondemand']) do end unless Fog.mocking? - StormOnDemand[:compute].servers.get(:uniq_id => @uniq_id).wait_for { ready? } + StormOnDemand[:compute].servers.get(@uniq_id).wait_for { ready? } end tests("#delete_server(:uniq_id => #{@uniq_id})").succeeds do pending if Fog.mocking? - StormOnDemand[:compute].delete_server(@uniq_id) + StormOnDemand[:compute].delete_server(:uniq_id => @uniq_id) end end @@ -57,7 +57,7 @@ Shindo.tests('StormOnDemand::Compute | server requests', ['stormondemand']) do tests('failure') do tests('#delete_server(0)').raises(Fog::StormOnDemand::Compute::Error) do pending if Fog.mocking? - StormOnDemand[:compute].delete_server(0) + StormOnDemand[:compute].delete_server(:uniq_id => 'XXXXXX') end end