miasma-aws 0.1.36 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/miasma-aws/version.rb +1 -1
- data/lib/miasma/contrib/aws/compute.rb +12 -1
- data/lib/miasma/contrib/aws/load_balancer.rb +11 -1
- data/miasma-aws.gemspec +6 -3
- metadata +51 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 577e794142b2f769bbc875247c9d683373c83758
|
4
|
+
data.tar.gz: 29f4630085adcb8776924d6a70aa0e10fdc84240
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d235ee908d294461f95e4d83ea0c97c9d3839c6c40a48743d79d202eb82e6f338c3401555a3991827eba18c6ca26299200cfef1fad79d7158574df11cc7b5b9
|
7
|
+
data.tar.gz: 5784af52e5ecffbb058570e0c6a66525a27ff9a4b5c07f3a0f6113856efcf185c1fea8dc5147bbb354ea90acc40078182b870d562265f4e27d6da8a8d63a6c9d
|
data/CHANGELOG.md
CHANGED
data/lib/miasma-aws/version.rb
CHANGED
@@ -38,7 +38,7 @@ module Miasma
|
|
38
38
|
srv = result.get(:body, 'DescribeInstancesResponse', 'reservationSet', 'item', 'instancesSet', 'item')
|
39
39
|
server.load_data(
|
40
40
|
:id => srv[:instanceId],
|
41
|
-
:name => srv.fetch(:tagSet, :item, []).map{|tag| tag[:value] if tag.is_a?(Hash) && tag[:key] == 'Name'}.compact.first,
|
41
|
+
:name => [srv.fetch(:tagSet, :item, [])].flatten.map{|tag| tag[:value] if tag.is_a?(Hash) && tag[:key] == 'Name'}.compact.first,
|
42
42
|
:image_id => srv[:imageId],
|
43
43
|
:flavor_id => srv[:instanceType],
|
44
44
|
:state => SERVER_STATE_MAP.fetch(srv.get(:instanceState, :name), :pending),
|
@@ -81,6 +81,17 @@ module Miasma
|
|
81
81
|
}
|
82
82
|
)
|
83
83
|
server.id = result.get(:body, 'RunInstancesResponse', 'instancesSet', 'item', 'instanceId')
|
84
|
+
server.valid_state
|
85
|
+
request(
|
86
|
+
:method => :post,
|
87
|
+
:path => '/',
|
88
|
+
:form => {
|
89
|
+
'Action' => 'CreateTags',
|
90
|
+
'ResourceId.1' => server.id,
|
91
|
+
'Tag.1.Key' => 'Name',
|
92
|
+
'Tag.1.Value' => server.name
|
93
|
+
}
|
94
|
+
)
|
84
95
|
else
|
85
96
|
raise 'WAT DO I DO!?'
|
86
97
|
end
|
@@ -92,7 +92,17 @@ module Miasma
|
|
92
92
|
# @return [Models::LoadBalancer::Balancer]
|
93
93
|
def balancer_reload(balancer)
|
94
94
|
if(balancer.persisted?)
|
95
|
-
|
95
|
+
begin
|
96
|
+
load_balancer_data(balancer)
|
97
|
+
rescue Miasma::Error::ApiError::RequestError => e
|
98
|
+
if(e.response_error_msg.include?('LoadBalancerNotFound'))
|
99
|
+
balancer.state = :terminated
|
100
|
+
balancer.status = 'terminated'
|
101
|
+
balancer.valid_state
|
102
|
+
else
|
103
|
+
raise
|
104
|
+
end
|
105
|
+
end
|
96
106
|
end
|
97
107
|
balancer
|
98
108
|
end
|
data/miasma-aws.gemspec
CHANGED
@@ -10,11 +10,14 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.description = 'Smoggy AWS API'
|
11
11
|
s.license = 'Apache 2.0'
|
12
12
|
s.require_path = 'lib'
|
13
|
-
s.add_development_dependency 'miasma', '>= 0.2.
|
13
|
+
s.add_development_dependency 'miasma', '>= 0.2.35'
|
14
|
+
s.add_development_dependency 'rake'
|
15
|
+
s.add_development_dependency 'rubocop'
|
14
16
|
s.add_development_dependency 'pry'
|
15
|
-
s.add_development_dependency 'minitest'
|
16
17
|
s.add_development_dependency 'vcr'
|
18
|
+
s.add_development_dependency 'mocha'
|
17
19
|
s.add_development_dependency 'webmock'
|
18
|
-
s.add_development_dependency '
|
20
|
+
s.add_development_dependency 'minitest'
|
21
|
+
s.add_development_dependency 'minitest-vcr'
|
19
22
|
s.files = Dir['lib/**/*'] + %w(miasma-aws.gemspec README.md CHANGELOG.md LICENSE)
|
20
23
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: miasma-aws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Roberts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: miasma
|
@@ -16,16 +16,16 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.2.
|
19
|
+
version: 0.2.35
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.2.
|
26
|
+
version: 0.2.35
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
@@ -39,7 +39,21 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: rubocop
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: pry
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
59
|
- - ">="
|
@@ -66,6 +80,20 @@ dependencies:
|
|
66
80
|
- - ">="
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: mocha
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
69
97
|
- !ruby/object:Gem::Dependency
|
70
98
|
name: webmock
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,19 +109,33 @@ dependencies:
|
|
81
109
|
- !ruby/object:Gem::Version
|
82
110
|
version: '0'
|
83
111
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
112
|
+
name: minitest
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: minitest-vcr
|
85
127
|
requirement: !ruby/object:Gem::Requirement
|
86
128
|
requirements:
|
87
129
|
- - ">="
|
88
130
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
131
|
+
version: '0'
|
90
132
|
type: :development
|
91
133
|
prerelease: false
|
92
134
|
version_requirements: !ruby/object:Gem::Requirement
|
93
135
|
requirements:
|
94
136
|
- - ">="
|
95
137
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
138
|
+
version: '0'
|
97
139
|
description: Smoggy AWS API
|
98
140
|
email: code@chrisroberts.org
|
99
141
|
executables: []
|