awful 0.0.53 → 0.0.54
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/awful.rb +2 -2
- data/lib/awful/auto_scaling.rb +5 -4
- data/lib/awful/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 224ca11d5105f088200d1934aa706cb2efea2b7e
|
4
|
+
data.tar.gz: aa9b1247d4fcaeed7d6a19c38a9f3fae935c02a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dda428258e10bdaf181bc41c42243ee6661ab4e00dd1094ae7250c41652158be6efd3513a7ca6485a512ac353b26a1e4d31e060ec23053c2236d0502cf7abc7a
|
7
|
+
data.tar.gz: eaf7fb32203c5dc76686d2bb2df19644875a2d9b21d317d76939666ceb60be6c436553b63761f633489d312e420af9f8ede9a5a025a1667aede900ec36b42bd2
|
data/lib/awful.rb
CHANGED
@@ -109,9 +109,9 @@ module Awful
|
|
109
109
|
end
|
110
110
|
end
|
111
111
|
|
112
|
-
def tag_name(thing)
|
112
|
+
def tag_name(thing, default = nil)
|
113
113
|
tn = thing.tags.find { |tag| tag.key == 'Name' }
|
114
|
-
tn
|
114
|
+
tn ? tn.value : default
|
115
115
|
end
|
116
116
|
|
117
117
|
## return id for instance by name
|
data/lib/awful/auto_scaling.rb
CHANGED
@@ -27,11 +27,12 @@ module Awful
|
|
27
27
|
def ls(name = /./)
|
28
28
|
fields = if options[:long]
|
29
29
|
->(a) { [
|
30
|
-
a
|
31
|
-
a.
|
30
|
+
tag_name(a, '-')[0,40],
|
31
|
+
a.auto_scaling_group_name[0,40],
|
32
|
+
a.launch_configuration_name[0,40],
|
32
33
|
"#{a.instances.length}/#{a.desired_capacity}",
|
33
34
|
"#{a.min_size}-#{a.max_size}",
|
34
|
-
a.availability_zones.sort.join(','),
|
35
|
+
a.availability_zones.map{ |az| az[-1,1] }.sort.join(','),
|
35
36
|
a.created_time
|
36
37
|
] }
|
37
38
|
else
|
@@ -39,7 +40,7 @@ module Awful
|
|
39
40
|
end
|
40
41
|
|
41
42
|
autoscaling.describe_auto_scaling_groups.map(&:auto_scaling_groups).flatten.select do |asg|
|
42
|
-
asg.auto_scaling_group_name.match(name)
|
43
|
+
asg.auto_scaling_group_name.match(name) or tag_name(asg, '').match(name)
|
43
44
|
end.map do |asg|
|
44
45
|
fields.call(asg)
|
45
46
|
end.tap do |list|
|
data/lib/awful/version.rb
CHANGED