miasma 0.2.28 → 0.2.30
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/miasma/models/orchestration.rb +4 -1
- data/lib/miasma/types/api.rb +18 -2
- data/lib/miasma/version.rb +1 -1
- data/miasma.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9d47952cbfd15fb3a57ddfd6103c5024a689456
|
4
|
+
data.tar.gz: 5a06b29d9f76fae06e9ee1cc2ee5343eb0bfd948
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b78609a2d1cb7150337f29ed0dada0c69f9274d7407f83fde98c23b8bd13e5e648fd2cdc1059968687b4d45009d8a0038720f8260483691cc462a181893fb1e
|
7
|
+
data.tar.gz: 8fc58eb0e34295f1bd04e0f693ac0a2a540e52ad246d27d372b4e0c1483c78b47d8311cc06960dba7defcdbc5d67b9ee096816106cca8abbbcf59da0a9e3f044
|
data/CHANGELOG.md
CHANGED
@@ -13,7 +13,10 @@ module Miasma
|
|
13
13
|
|
14
14
|
## mapping example
|
15
15
|
# RESOURCE_MAPPING = Smash.new(
|
16
|
-
# 'AWS::EC2::Instance' =>
|
16
|
+
# 'AWS::EC2::Instance' => Smash.new(
|
17
|
+
# :api => :compute,
|
18
|
+
# :collection => :servers
|
19
|
+
# )
|
17
20
|
# )
|
18
21
|
|
19
22
|
# @return [Array<Symbol>] valid resource states
|
data/lib/miasma/types/api.rb
CHANGED
@@ -128,12 +128,28 @@ module Miasma
|
|
128
128
|
def retryable_request(http_method, &block)
|
129
129
|
Bogo::Retry.build(
|
130
130
|
data.fetch(:retry_type, :exponential),
|
131
|
-
:max_attempts =>
|
131
|
+
:max_attempts => retryable_allowed?(http_method) ? data.fetch(:retry_max, MAX_REQUEST_RETRIES) : 0,
|
132
132
|
:wait_interval => data[:retry_interval],
|
133
133
|
:ui => data[:retry_ui],
|
134
134
|
:auto_run => false,
|
135
135
|
&block
|
136
|
-
).run!
|
136
|
+
).run!{|e| perform_request_retry(e) }
|
137
|
+
end
|
138
|
+
|
139
|
+
# Determine if request type is allowed to be retried
|
140
|
+
#
|
141
|
+
# @param http_method [Symbol] request type
|
142
|
+
# @return [TrueClass, FalseClass]
|
143
|
+
def retryable_allowed?(http_method)
|
144
|
+
VALID_REQUEST_RETRY_METHODS.include?(http_method)
|
145
|
+
end
|
146
|
+
|
147
|
+
# Determine if a retry on the request should be performed
|
148
|
+
#
|
149
|
+
# @param exception [Exception]
|
150
|
+
# @return [TrueClass, FalseClass]
|
151
|
+
def perform_request_retry(exception)
|
152
|
+
true
|
137
153
|
end
|
138
154
|
|
139
155
|
# Perform request
|
data/lib/miasma/version.rb
CHANGED
data/miasma.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.add_runtime_dependency 'multi_json'
|
15
15
|
s.add_runtime_dependency 'multi_xml'
|
16
16
|
s.add_runtime_dependency 'xml-simple'
|
17
|
-
s.add_runtime_dependency 'bogo', '>= 0.1.
|
17
|
+
s.add_runtime_dependency 'bogo', '>= 0.1.30', '< 1.0'
|
18
18
|
# Include provider libs that do not have outside deps
|
19
19
|
s.add_runtime_dependency 'miasma-aws'
|
20
20
|
s.add_runtime_dependency 'miasma-open-stack'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: miasma
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Roberts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|
@@ -72,7 +72,7 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.1.
|
75
|
+
version: 0.1.30
|
76
76
|
- - "<"
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: '1.0'
|
@@ -82,7 +82,7 @@ dependencies:
|
|
82
82
|
requirements:
|
83
83
|
- - ">="
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version: 0.1.
|
85
|
+
version: 0.1.30
|
86
86
|
- - "<"
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '1.0'
|