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 +4 -4
- data/lib/awful/auto_scaling.rb +21 -0
- data/lib/awful/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a90e834f46be8b16de58d9ef4a461939555db6c5
|
4
|
+
data.tar.gz: 4c74bc050106c8fac60543f01493ac52413e1ebc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 966903b00794a05c7a13c69f91e89b3a14fe4ce076f59c7efde96ef932fb77bf48cf9da52e230843b565e6384b1764fc65185a9cfea2b8941f29690dd6993a7a
|
7
|
+
data.tar.gz: b8f7066723e58a69938033d0c78075cebc69d2d8c160baad12821ed300aac5cf4f6ef7cf498f1ea753dc79a49f8a2f03df14ff6f1f9838e3304aa1ef8d157a3e
|
data/lib/awful/auto_scaling.rb
CHANGED
@@ -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
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.
|
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-
|
11
|
+
date: 2015-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|