fog 0.0.65 → 0.0.66
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -2
- data/VERSION.yml +1 -1
- data/fog.gemspec +3 -3
- data/lib/fog/aws/requests/ec2/attach_volume.rb +1 -0
- data/lib/fog/aws/requests/ec2/describe_instances.rb +4 -4
- data/lib/fog/aws/requests/ec2/describe_volumes.rb +2 -0
- data/lib/fog/aws/requests/ec2/terminate_instances.rb +1 -2
- metadata +4 -4
data/Rakefile
CHANGED
@@ -14,8 +14,8 @@ begin
|
|
14
14
|
gem.add_dependency('nokogiri')
|
15
15
|
gem.add_dependency('ruby-hmac')
|
16
16
|
gem.name = "fog"
|
17
|
-
gem.description = %Q{
|
18
|
-
gem.summary = %Q{
|
17
|
+
gem.description = %Q{The Ruby cloud computing library.}
|
18
|
+
gem.summary = %Q{brings clouds to you}
|
19
19
|
gem.email = "geemus@gmail.com"
|
20
20
|
gem.homepage = "http://github.com/geemus/fog"
|
21
21
|
gem.authors = ["geemus (Wesley Beary)"]
|
data/VERSION.yml
CHANGED
data/fog.gemspec
CHANGED
@@ -5,13 +5,13 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{fog}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.66"
|
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
12
|
s.date = %q{2010-04-01}
|
13
13
|
s.default_executable = %q{fog}
|
14
|
-
s.description = %q{
|
14
|
+
s.description = %q{The Ruby cloud computing library.}
|
15
15
|
s.email = %q{geemus@gmail.com}
|
16
16
|
s.executables = ["fog"]
|
17
17
|
s.extra_rdoc_files = [
|
@@ -360,7 +360,7 @@ Gem::Specification.new do |s|
|
|
360
360
|
s.require_paths = ["lib"]
|
361
361
|
s.rubyforge_project = %q{fog}
|
362
362
|
s.rubygems_version = %q{1.3.6}
|
363
|
-
s.summary = %q{
|
363
|
+
s.summary = %q{brings clouds to you}
|
364
364
|
s.test_files = [
|
365
365
|
"spec/aws/models/ec2/address_spec.rb",
|
366
366
|
"spec/aws/models/ec2/addresses_spec.rb",
|
@@ -80,11 +80,11 @@ module Fog
|
|
80
80
|
when 'rebooting'
|
81
81
|
instance['instanceState'] = { 'code' => 16, 'name' => 'running' }
|
82
82
|
when 'shutting-down'
|
83
|
-
if Time.now - @data[:deleted_at][instance['instanceId']] >
|
84
|
-
instance['instanceState'] = { 'code' => 16, 'name' => 'terminating' }
|
85
|
-
elsif Time.now - @data[:deleted_at][instance['instanceId']] > 2
|
83
|
+
if Time.now - @data[:deleted_at][instance['instanceId']] > 2
|
86
84
|
@data[:deleted_at].delete(instance['instanceId'])
|
87
85
|
@data[:instances].delete(instance['instanceId'])
|
86
|
+
elsif Time.now - @data[:deleted_at][instance['instanceId']] > 1
|
87
|
+
instance['instanceState'] = { 'code' => 16, 'name' => 'terminating' }
|
88
88
|
end
|
89
89
|
when 'terminating'
|
90
90
|
if Time.now - @data[:deleted_at][instance['instanceId']] > 1
|
@@ -95,8 +95,8 @@ module Fog
|
|
95
95
|
end
|
96
96
|
|
97
97
|
if instance_id.length == 0 || instance_id.length == instance_set.length
|
98
|
+
instance_set = instance_set.reject {|instance| !@data[:instances][instance['instanceId']]}
|
98
99
|
response.status = 200
|
99
|
-
|
100
100
|
reservation_set = {}
|
101
101
|
instance_set.each do |instance|
|
102
102
|
reservation_set[instance['reservationId']] ||= {
|
@@ -51,6 +51,7 @@ module Fog
|
|
51
51
|
case volume['status']
|
52
52
|
when 'attaching'
|
53
53
|
if Time.now - volume['attachmentSet'].first['attachTime'] > 1
|
54
|
+
volume['attachmentSet'].first['status'] = 'attached'
|
54
55
|
volume['status'] = 'attached'
|
55
56
|
end
|
56
57
|
when 'creating'
|
@@ -66,6 +67,7 @@ module Fog
|
|
66
67
|
end
|
67
68
|
|
68
69
|
if volume_id.length == 0 || volume_id.length == volume_set.length
|
70
|
+
volume_set = volume_set.reject {|volume| !@data[:volumes][volume['volumeId']]}
|
69
71
|
response.status = 200
|
70
72
|
response.body = {
|
71
73
|
'requestId' => Fog::AWS::Mock.request_id,
|
@@ -74,11 +74,10 @@ module Fog
|
|
74
74
|
end
|
75
75
|
|
76
76
|
describe_volumes.body['volumeSet'].each do |volume|
|
77
|
-
if volume['instanceId'] == instance_id
|
77
|
+
if volume['attachmentSet'].first && volume['attachmentSet'].first['instanceId'] == instance_id
|
78
78
|
detach_volume(volume['volumeId'])
|
79
79
|
end
|
80
80
|
end
|
81
|
-
|
82
81
|
end
|
83
82
|
else
|
84
83
|
response.status = 400
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 66
|
9
|
+
version: 0.0.66
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- geemus (Wesley Beary)
|
@@ -93,7 +93,7 @@ dependencies:
|
|
93
93
|
version: "0"
|
94
94
|
type: :runtime
|
95
95
|
version_requirements: *id006
|
96
|
-
description:
|
96
|
+
description: The Ruby cloud computing library.
|
97
97
|
email: geemus@gmail.com
|
98
98
|
executables:
|
99
99
|
- fog
|
@@ -467,7 +467,7 @@ rubyforge_project: fog
|
|
467
467
|
rubygems_version: 1.3.6
|
468
468
|
signing_key:
|
469
469
|
specification_version: 3
|
470
|
-
summary:
|
470
|
+
summary: brings clouds to you
|
471
471
|
test_files:
|
472
472
|
- spec/aws/models/ec2/address_spec.rb
|
473
473
|
- spec/aws/models/ec2/addresses_spec.rb
|