mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[bbg] create_block should raise errors on failure
This commit is contained in:
parent
b6dd99aaa5
commit
b8ce545f66
3 changed files with 1 additions and 5 deletions
|
@ -38,7 +38,6 @@ module Fog
|
|||
end
|
||||
|
||||
def ready?
|
||||
raise Fog::Bluebox::BlockInstantiationError, "Error creating block #{self.id}" if @status == 'error'
|
||||
@status == 'running'
|
||||
end
|
||||
|
||||
|
|
|
@ -29,9 +29,6 @@ module Fog
|
|||
@response['image_id'] = @value
|
||||
when 'product'
|
||||
@scope = nil
|
||||
when 'error' # An error occurred
|
||||
@response['status'] = 'error'
|
||||
@response[name] = @value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ DATA
|
|||
|
||||
request(
|
||||
:body => data,
|
||||
:expects => [200, 409],
|
||||
:expects => 200,
|
||||
:method => 'POST',
|
||||
:parser => Fog::Parsers::Bluebox::CreateBlock.new,
|
||||
:path => '/api/blocks.xml'
|
||||
|
|
Loading…
Add table
Reference in a new issue