fog 0.0.64 → 0.0.65

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 0
4
- :patch: 64
4
+ :patch: 65
5
5
  :build:
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{fog}
8
- s.version = "0.0.64"
8
+ s.version = "0.0.65"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["geemus (Wesley Beary)"]
12
- s.date = %q{2010-03-31}
12
+ s.date = %q{2010-04-01}
13
13
  s.default_executable = %q{fog}
14
14
  s.description = %q{brings clouds to you}
15
15
  s.email = %q{geemus@gmail.com}
@@ -49,12 +49,16 @@ module Fog
49
49
 
50
50
  volume_set.each do |volume|
51
51
  case volume['status']
52
+ when 'attaching'
53
+ if Time.now - volume['attachmentSet'].first['attachTime'] > 1
54
+ volume['status'] = 'attached'
55
+ end
52
56
  when 'creating'
53
- if Time.now - volume['createTime'] > 2
57
+ if Time.now - volume['createTime'] > 1
54
58
  volume['status'] = 'available'
55
59
  end
56
60
  when 'deleting'
57
- if Time.now - @data[:deleted_at][volume['volumeId']] > 2
61
+ if Time.now - @data[:deleted_at][volume['volumeId']] > 1
58
62
  @data[:deleted_at].delete(volume['volumeId'])
59
63
  @data[:volumes].delete(volume['volumeId'])
60
64
  end
@@ -40,6 +40,7 @@ module Fog
40
40
  response.status = 200
41
41
  if volume = @data[:volumes][volume_id]
42
42
  data = volume['attachmentSet'].pop
43
+ @data[:volumes][volume_id]['status'] = 'available'
43
44
  response.status = 200
44
45
  response.body = {
45
46
  'requestId' => Fog::AWS::Mock.request_id
@@ -66,6 +66,19 @@ module Fog
66
66
  'currentState' => state
67
67
  }
68
68
  instance['instanceState'] = state
69
+
70
+ describe_addresses.body['addressesSet'].each do |address|
71
+ if address['instanceId'] == instance_id
72
+ disassociate_address(address['publicIp'])
73
+ end
74
+ end
75
+
76
+ describe_volumes.body['volumeSet'].each do |volume|
77
+ if volume['instanceId'] == instance_id
78
+ detach_volume(volume['volumeId'])
79
+ end
80
+ end
81
+
69
82
  end
70
83
  else
71
84
  response.status = 400
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 64
9
- version: 0.0.64
8
+ - 65
9
+ version: 0.0.65
10
10
  platform: ruby
11
11
  authors:
12
12
  - geemus (Wesley Beary)
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-31 00:00:00 -07:00
17
+ date: 2010-04-01 00:00:00 -07:00
18
18
  default_executable: fog
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency