aws-cache 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws-cache-version.rb +1 -1
- data/lib/aws-cache.rb +13 -6
- 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: a5d3dd4dc8fa4704cb4b3283c8f689b4a22ae5e4
|
4
|
+
data.tar.gz: 929e015c694989224034a015fb989ec92fb2e1e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b54f40cfce51183b86f0dfe159c7f2317e337d9641c6d85368537fed3ad2df5181f409d775a6c4c07a45ecb17cf906400d5e13fe043195caf010ddee0003cda
|
7
|
+
data.tar.gz: ac40b0799a0dca2bb9d265535295f63f8252da85daecbb6e1f7180e1d65692fc1e3c57037b5c865dc363c2a55724bb87817eda195a76ca7119bc5e001b1009de
|
data/lib/aws-cache-version.rb
CHANGED
data/lib/aws-cache.rb
CHANGED
@@ -32,14 +32,21 @@ class AwsCache
|
|
32
32
|
|
33
33
|
#Returns an array of hashes describing the autoscaling groups for the selected stack.
|
34
34
|
def stack_auto_scaling_groups(stack_name)
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
35
|
+
auto_scaling_groups = Array.new()
|
36
|
+
stack_resources = self.list_stack_resources(stack_name)
|
37
|
+
asg_groups = stack_resources.select do |record|
|
38
|
+
record[:resource_type] == "AWS::AutoScaling::AutoScalingGroup"
|
39
|
+
end
|
40
|
+
auto_scaling_groups.concat(asg_groups)
|
41
|
+
substacks = stack_resources.select do |record|
|
42
|
+
record[:resource_type] == "AWS::CloudFormation::Stack"
|
43
|
+
end
|
44
|
+
if substacks.length > 0 then
|
45
|
+
substacks.each do |stack|
|
46
|
+
auto_scaling_groups.concat(self.stack_auto_scaling_groups(stack[:physical_resource_id]))
|
40
47
|
end
|
41
48
|
end
|
42
|
-
return
|
49
|
+
return auto_scaling_groups
|
43
50
|
end
|
44
51
|
|
45
52
|
#Returns an array of hashes describing the substacks for the selected stack.
|