miasma-aws 0.1.30 → 0.1.32

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ade9648fa009d632f77f114e41b786898eca7d7b
4
- data.tar.gz: 0afd2fb7d071037032f862e58bf57a453a0ebe7b
3
+ metadata.gz: 14cdcb2ed003007d506240fc478925588ed70ef1
4
+ data.tar.gz: 8ab27ef6fedf34fdbe3b309360404c837799a438
5
5
  SHA512:
6
- metadata.gz: 84fb44be2df3cc20d7388495c27d932ff4cecdb0f43d60bc7c74c4fa847f2b4176d06dd9cf88116322fb36b955b5d1fbb5e867902f1fd5009caa5ecef5417f3c
7
- data.tar.gz: 3575d88a2f8dddff1e5e17f144f2f1910e41b20effd2494a49e0d9b1f831f9a19bbd4e2f10b455bcfafa89675c386b39dd4d13d024f00e40475bdc614ed5dabf
6
+ metadata.gz: f586b53af2f9d01b9b39f75f7b790a0619bbf29792f6d172f81547c27a7c9c06e0e2af9acdf52742b5983e8d534d4aab25a9a20a79f1251ff7618d56cb326365
7
+ data.tar.gz: 61408a7496381590470b73cb31945d0fb2637bc034e9057f100e04e2dca557434f719f2b0026afd7e67197f0b900e48ff4d9b513bbe0b554fb84b7363ea9b9b6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # v0.1.32
2
+ * Fix stack resource loading (properly load > 100 resources)
3
+ * Remove deprecated method usage on the http library
4
+ * Prevent lazy loading template on save in update context
5
+
1
6
  # v0.1.30
2
7
  * Hotfix: Update STS expiration check logic. Add isolated STS host override.
3
8
 
@@ -169,7 +169,7 @@ module Miasma
169
169
  if(stack.on_failure)
170
170
  params['OnFailure'] = stack.on_failure == 'nothing' ? 'DO_NOTHING' : stack.on_failure.upcase
171
171
  end
172
- if(stack.template.empty?)
172
+ if(stack.data[:template].empty?)
173
173
  params['UsePreviousTemplate'] = true
174
174
  else
175
175
  params['TemplateBody'] = MultiJson.dump(stack.template)
@@ -308,13 +308,13 @@ module Miasma
308
308
  # @param stack [Models::Orchestration::Stack]
309
309
  # @return [Array<Models::Orchestration::Stack::Resource>]
310
310
  def resource_all(stack)
311
- results = all_result_pages(nil, :body, 'DescribeStackResourcesResponse', 'DescribeStackResourcesResult', 'StackResources', 'member') do |options|
311
+ results = all_result_pages(nil, :body, 'ListStackResourcesResponse', 'ListStackResourcesResult', 'StackResourceSummaries', 'member') do |options|
312
312
  request(
313
313
  :method => :post,
314
314
  :path => '/',
315
315
  :form => options.merge(
316
316
  Smash.new(
317
- 'Action' => 'DescribeStackResources',
317
+ 'Action' => 'ListStackResources',
318
318
  'StackName' => stack.id
319
319
  )
320
320
  )
@@ -328,8 +328,7 @@ module Miasma
328
328
  :type => res['ResourceType'],
329
329
  :state => res['ResourceStatus'].downcase.to_sym,
330
330
  :status => res['ResourceStatus'],
331
- :status_reason => res['ResourceStatusReason'],
332
- :updated => res['Timestamp']
331
+ :updated => res['LastUpdatedTimestamp']
333
332
  ).valid_state
334
333
  end
335
334
  end
@@ -339,8 +338,21 @@ module Miasma
339
338
  # @param resource [Models::Orchestration::Stack::Resource]
340
339
  # @return [Models::Orchestration::Resource]
341
340
  def resource_reload(resource)
342
- resource.stack.resources.reload
343
- resource.stack.resources.get(resource.id)
341
+ result = request(
342
+ :method => :post,
343
+ :path => '/',
344
+ :form => Smash.new(
345
+ 'LogicalResourceId' => resource.logical_id,
346
+ 'StackName' => resource.stack.name
347
+ )
348
+ ).get(:body, 'DescribeStackResourceResponse', 'DescribeStackResourceResult', 'StackResourceDetail')
349
+ resource.updated = result['LastUpdatedTimestamp']
350
+ resource.type = result['ResourceType']
351
+ resource.state = result['ResourceStatus'].downcase.to_sym
352
+ resource.status = result['ResourceStatus']
353
+ resource.status_reason = result['ResourceStatusReason']
354
+ resource.valid_state
355
+ resource
344
356
  end
345
357
 
346
358
  # Return all events for stack
@@ -39,7 +39,8 @@ module Miasma
39
39
  end
40
40
  set = result.get(*result_key.slice(0, 2))
41
41
  if(set.is_a?(Hash) && set['IsTruncated'] && set['Contents'])
42
- list += all_result_pages(set['Contents'].last['Key'], *result_key, &block)
42
+ content_key = (set['Contents'].respond_to?(:last) ? set['Contents'].last : set['Contents'])['Key']
43
+ list += all_result_pages(content_key, *result_key, &block)
43
44
  end
44
45
  list.compact
45
46
  end
@@ -594,7 +594,7 @@ module Miasma
594
594
 
595
595
  # @return [HTTP] connection for requests (forces headers)
596
596
  def connection
597
- super.with_headers(
597
+ super.headers(
598
598
  'Host' => aws_host,
599
599
  'X-Amz-Date' => Contrib::AwsApiCore.time_iso8601
600
600
  )
@@ -1,4 +1,4 @@
1
1
  module MiasmaAws
2
2
  # Current library version
3
- VERSION = Gem::Version.new('0.1.30')
3
+ VERSION = Gem::Version.new('0.1.32')
4
4
  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.1.30
4
+ version: 0.1.32
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-10-07 00:00:00.000000000 Z
11
+ date: 2015-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: miasma
@@ -139,3 +139,4 @@ signing_key:
139
139
  specification_version: 4
140
140
  summary: Smoggy AWS API
141
141
  test_files: []
142
+ has_rdoc: