fog 0.0.69 → 0.0.70
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/fog.gemspec +2 -2
- data/lib/fog/aws/ec2.rb +1 -0
- data/lib/fog/aws/requests/ec2/allocate_address.rb +18 -12
- data/lib/fog/aws/requests/ec2/describe_instances.rb +1 -0
- metadata +3 -3
data/VERSION.yml
CHANGED
data/fog.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
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.70"
|
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-04-
|
12
|
+
s.date = %q{2010-04-09}
|
13
13
|
s.default_executable = %q{fog}
|
14
14
|
s.description = %q{The Ruby cloud computing library.}
|
15
15
|
s.email = %q{geemus@gmail.com}
|
data/lib/fog/aws/ec2.rb
CHANGED
@@ -25,18 +25,24 @@ module Fog
|
|
25
25
|
|
26
26
|
def allocate_address
|
27
27
|
response = Excon::Response.new
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
28
|
+
if describe_addresses.body['addressesSet'].size < @data[:limits][:addresses]
|
29
|
+
response.status = 200
|
30
|
+
public_ip = Fog::AWS::Mock.ip_address
|
31
|
+
data ={
|
32
|
+
'instanceId' => '',
|
33
|
+
'publicIp' => public_ip
|
34
|
+
}
|
35
|
+
@data[:addresses][public_ip] = data
|
36
|
+
response.body = {
|
37
|
+
'publicIp' => public_ip,
|
38
|
+
'requestId' => Fog::AWS::Mock.request_id
|
39
|
+
}
|
40
|
+
response
|
41
|
+
else
|
42
|
+
response.status = 400
|
43
|
+
response.body = "<?xml version=\"1.0\"?><Response><Errors><Error><Code>AddressLimitExceeded</Code><Message>Too many addresses allocated</Message></Error></Errors><RequestID>#{Fog::AWS::Mock.request_id}</RequestID></Response>"
|
44
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
45
|
+
end
|
40
46
|
end
|
41
47
|
|
42
48
|
end
|
@@ -75,6 +75,7 @@ module Fog
|
|
75
75
|
case instance['instanceState']['name']
|
76
76
|
when 'pending'
|
77
77
|
if Time.now - instance['launchTime'] > Fog::Mock::DELAY
|
78
|
+
instance['dnsName'] = Fog::AWS::Mock.ip_address
|
78
79
|
instance['instanceState'] = { 'code' => 16, 'name' => 'running' }
|
79
80
|
end
|
80
81
|
when 'rebooting'
|
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
|
+
- 70
|
9
|
+
version: 0.0.70
|
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-04-
|
17
|
+
date: 2010-04-09 00:00:00 -07:00
|
18
18
|
default_executable: fog
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|