awful 0.0.47 → 0.0.48

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: a9ba35ecdd70ca8fee5d800ba790c62c1f408155
4
- data.tar.gz: 6b50ea11a998dadc5373a87178c26bde4304b789
3
+ metadata.gz: a90e834f46be8b16de58d9ef4a461939555db6c5
4
+ data.tar.gz: 4c74bc050106c8fac60543f01493ac52413e1ebc
5
5
  SHA512:
6
- metadata.gz: 876875b8a02dfc3fd79987da6bf1941911106fba7167b0a0b363222df69f4adbec0cb8e742b46a390af49437ea7711c549e2784a7b373ac912648b4987ae7d9c
7
- data.tar.gz: 46ba584635090d505144bfd5d2791d2dcbe8e95f738919a31cd0b5fc8a0f521fc5dacc0d5ce8be2a42b11fb73883c015dcc9bf4a4ae1113c07fed8fc23d47435
6
+ metadata.gz: 966903b00794a05c7a13c69f91e89b3a14fe4ce076f59c7efde96ef932fb77bf48cf9da52e230843b565e6384b1764fc65185a9cfea2b8941f29690dd6993a7a
7
+ data.tar.gz: b8f7066723e58a69938033d0c78075cebc69d2d8c160baad12821ed300aac5cf4f6ef7cf498f1ea753dc79a49f8a2f03df14ff6f1f9838e3304aa1ef8d157a3e
@@ -3,11 +3,17 @@ module Awful
3
3
  class AutoScaling < Cli
4
4
 
5
5
  COLORS = {
6
+ ## lifecycle states
6
7
  Pending: :yellow,
7
8
  InService: :green,
8
9
  Terminating: :red,
10
+ ## health statuses
9
11
  HEALTHY: :green,
10
12
  UNHEALTHY: :red,
13
+ ## activity status
14
+ Successful: :green,
15
+ Failed: :red,
16
+ Cancelled: :red,
11
17
  }
12
18
 
13
19
  no_commands do
@@ -313,6 +319,21 @@ module Awful
313
319
  puts olds.values.flatten.map(&:instance_id)
314
320
  end
315
321
  end
322
+
323
+ desc 'activities ASG', 'describe recent scaling activities for group ASG'
324
+ method_option :long, aliases: '-l', default: false, desc: 'Long listing'
325
+ method_option :cause, aliases: '-c', default: false, desc: 'Long listing with cause of activity'
326
+ def activities(name)
327
+ autoscaling.describe_scaling_activities(auto_scaling_group_name: name).activities.tap do |activities|
328
+ if options[:long]
329
+ print_table activities.map { |a| [color(a.status_code), a.description, a.start_time, a.end_time] }
330
+ elsif options[:cause]
331
+ print_table activities.map { |a| [color(a.status_code), a.description, a.start_time, a.end_time, "\n#{a.cause}\n\n"] }
332
+ else
333
+ puts activities.map(&:activity_id)
334
+ end
335
+ end
336
+ end
316
337
  end
317
338
 
318
339
  end
data/lib/awful/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Awful
2
- VERSION = "0.0.47"
2
+ VERSION = "0.0.48"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awful
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.47
4
+ version: 0.0.48
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ric Lister
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-15 00:00:00.000000000 Z
11
+ date: 2015-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler