mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[ec2] fix codes for instance status mocks
This commit is contained in:
parent
d4aeeb69e1
commit
dea8de443d
2 changed files with 5 additions and 3 deletions
|
@ -93,7 +93,7 @@ module Fog
|
||||||
@data[:deleted_at].delete(instance['instanceId'])
|
@data[:deleted_at].delete(instance['instanceId'])
|
||||||
@data[:instances].delete(instance['instanceId'])
|
@data[:instances].delete(instance['instanceId'])
|
||||||
elsif Time.now - @data[:deleted_at][instance['instanceId']] > Fog::Mock.delay
|
elsif Time.now - @data[:deleted_at][instance['instanceId']] > Fog::Mock.delay
|
||||||
instance['instanceState'] = { 'code' => 16, 'name' => 'terminating' }
|
instance['instanceState'] = { 'code' => 48, 'name' => 'terminating' }
|
||||||
end
|
end
|
||||||
when 'terminating'
|
when 'terminating'
|
||||||
if Time.now - @data[:deleted_at][instance['instanceId']] > Fog::Mock.delay
|
if Time.now - @data[:deleted_at][instance['instanceId']] > Fog::Mock.delay
|
||||||
|
|
|
@ -55,9 +55,11 @@ module Fog
|
||||||
when 'shutting-down'
|
when 'shutting-down'
|
||||||
32
|
32
|
||||||
when 'terminated'
|
when 'terminated'
|
||||||
|
48
|
||||||
|
when 'stopping'
|
||||||
64
|
64
|
||||||
when 'rebooting'
|
when 'stopped'
|
||||||
128
|
80
|
||||||
end
|
end
|
||||||
state = { 'name' => 'shutting-down', 'code' => 32}
|
state = { 'name' => 'shutting-down', 'code' => 32}
|
||||||
response.body['instancesSet'] << {
|
response.body['instancesSet'] << {
|
||||||
|
|
Loading…
Add table
Reference in a new issue