ec2ctl 0.9.2 → 0.9.3

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: fa34dc358f5cd3f18f50b823d3ff7056709e874f
4
- data.tar.gz: 343deb16f4d702ccb862df7edb19c973a8bfb203
3
+ metadata.gz: b5ce861b1156e816de389f70a218d7e7fc0142c3
4
+ data.tar.gz: 0966afeb593063d9bae483f94507698cf09072de
5
5
  SHA512:
6
- metadata.gz: ba56d532af1725faf04900de8d92462b5d91c6e7c8a2b70d44e97462f8329d15c7d5a7379d9bc4d69fc5d062fa5fca3e442203932f0fa8bae3d707ba6914f56f
7
- data.tar.gz: 11cab4fce0d4dfa07b7d701404de98834eb0272691bdbbc4a10d87c1cc2e68a40fdd053a39996cddb0989d6f00b420643e69e562791ec54b1f785ae54f0a432e
6
+ metadata.gz: c9aff96cb95e0fc8aa752c18bd61ee56b2d9af3b450b14d9c41701b236f0e14c6e8e47bc87df4978cd2e9906f00a383518399a02570e5766e1df30a973453581
7
+ data.tar.gz: afae848b62bb9b009c1c53c6b178e2e3b496f440ce1e1319032a4ca6751c7cb87cff1c7374cd923e17f40df30fd62b65629d3e744c761c0acf6fb4c21a82773d
data/lib/ec2ctl/client.rb CHANGED
@@ -462,27 +462,30 @@ module EC2Ctl
462
462
 
463
463
  return @ssm_instance_states if instance_ids.empty?
464
464
 
465
- loop do
466
- next_token = nil
467
-
468
- response = @ssm_client.describe_instance_information(
469
- next_token: next_token,
470
-
471
- instance_information_filter_list: [
472
- {
473
- key: "PlatformTypes".freeze,
474
- value_set: [@platform_type],
475
- },
476
- {
477
- key: "InstanceIds".freeze,
478
- value_set: instance_ids,
479
- },
480
- ]
481
- )
482
-
483
- @ssm_instance_states += response.instance_information_list
484
- next_token = response.next_token
485
- break unless next_token
465
+ instance_ids.each_slice 50 do |slice|
466
+ loop do
467
+ next_token = nil
468
+
469
+ response = @ssm_client.describe_instance_information(
470
+ next_token: next_token,
471
+
472
+ instance_information_filter_list: [
473
+ {
474
+ key: "PlatformTypes".freeze,
475
+ value_set: [@platform_type],
476
+ },
477
+
478
+ {
479
+ key: "InstanceIds".freeze,
480
+ value_set: slice,
481
+ },
482
+ ],
483
+ )
484
+
485
+ @ssm_instance_states += response.instance_information_list
486
+ next_token = response.next_token
487
+ break unless next_token
488
+ end
486
489
  end
487
490
 
488
491
  @ssm_instance_states
@@ -549,7 +552,7 @@ module EC2Ctl
549
552
  params.update filters: filters
550
553
  end
551
554
 
552
- @ec2_instances = @ec2_resource.instances(params)
555
+ @ec2_instances = @ec2_resource.instances(params).to_a
553
556
 
554
557
  unless @search.empty?
555
558
  search_hash = @search.each_with_object Hash.new do |s, search_memo|
@@ -1,3 +1,3 @@
1
1
  module EC2Ctl
2
- VERSION = "0.9.2"
2
+ VERSION = "0.9.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ec2ctl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoriki Yamaguchi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-01 00:00:00.000000000 Z
11
+ date: 2016-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk