firespring_dev_commands 2.1.12.pre.alpha.2 → 2.1.12.pre.alpha.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f601fd4e17457b7e9191634735b25adc99e798d57fba379b389cd996c35af66
|
4
|
+
data.tar.gz: d003e9fb9b514e06c77f2b2a0f16b004dee4aa3748642c7d5bfdd0b1a97bfbe3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a27f199d0741ef7d391207bfda5841923ab4d03d6b6a77b5c49f9279ade5e3aefb009ee99d851c69486c1aed28a14de6873357c99969de24988daf4b09f572a2
|
7
|
+
data.tar.gz: a06f8a3bbc6efc62eeba0b3cdb70d361d4b034c1a9456fba12311dcaafea448408b71d3d7ce8df30a42260e092548c3431b55a68e9f273b77553835020bb0f9e
|
@@ -5,7 +5,15 @@ require 'aws-sdk-opensearchservice'
|
|
5
5
|
|
6
6
|
module Dev
|
7
7
|
class EndOfLife
|
8
|
+
# Class which queries several different AWS product types and
|
9
|
+
# returns ProductVersion entities which can be checked for EOL
|
8
10
|
class Aws
|
11
|
+
# Queries and returns product versions for the default product types
|
12
|
+
def default_products
|
13
|
+
(elasticache_products + lambda_products + opensearch_products + rds_products).flatten.compact
|
14
|
+
end
|
15
|
+
|
16
|
+
# Queries and returns product versions for elasticache products
|
9
17
|
def elasticache_products
|
10
18
|
client = ::Aws::ElastiCache::Client.new
|
11
19
|
|
@@ -21,6 +29,7 @@ module Dev
|
|
21
29
|
end
|
22
30
|
end
|
23
31
|
|
32
|
+
# Queries and returns product versions for lambda products
|
24
33
|
def lambda_products
|
25
34
|
client = ::Aws::Lambda::Client.new
|
26
35
|
|
@@ -28,7 +37,6 @@ module Dev
|
|
28
37
|
Dev::Aws.each_page(client, :list_functions) do |response|
|
29
38
|
response.functions.each do |function|
|
30
39
|
# Runtime is empty if using a docker image
|
31
|
-
# TODO Should we still handle this case?
|
32
40
|
next unless function.runtime
|
33
41
|
|
34
42
|
name = function.function_name
|
@@ -40,6 +48,7 @@ module Dev
|
|
40
48
|
end
|
41
49
|
end
|
42
50
|
|
51
|
+
# Queries and returns product versions for opensearch products
|
43
52
|
def opensearch_products
|
44
53
|
client = ::Aws::OpenSearchService::Client.new
|
45
54
|
|
@@ -55,11 +64,13 @@ module Dev
|
|
55
64
|
end
|
56
65
|
end
|
57
66
|
|
67
|
+
# Queries and returns product versions for rds products
|
58
68
|
def rds_products
|
59
|
-
|
69
|
+
rds_instance_products + rds_cluster_products
|
60
70
|
end
|
61
71
|
|
62
|
-
|
72
|
+
# Queries and returns product versions for rds instance products
|
73
|
+
def rds_instance_products
|
63
74
|
aws_engines = %w(mysql postgresql)
|
64
75
|
client = ::Aws::RDS::Client.new
|
65
76
|
|
@@ -80,7 +91,8 @@ module Dev
|
|
80
91
|
end
|
81
92
|
end
|
82
93
|
|
83
|
-
|
94
|
+
# Queries and returns product versions for rds cluster products
|
95
|
+
def rds_cluster_products
|
84
96
|
aws_engines = %w(mysql postgresql)
|
85
97
|
client = ::Aws::RDS::Client.new
|
86
98
|
|
@@ -108,12 +108,7 @@ module Dev
|
|
108
108
|
account_name = Dev::Aws::Account.new.name_by_account(account_id)
|
109
109
|
LOG.info " Current AWS Account is #{account_name} (#{account_id})".light_yellow
|
110
110
|
|
111
|
-
|
112
|
-
Dev::EndOfLife::Aws.new.lambda_products +
|
113
|
-
Dev::EndOfLife::Aws.new.opensearch_products +
|
114
|
-
Dev::EndOfLife::Aws.new.rds_products
|
115
|
-
|
116
|
-
Dev::EndOfLife.new(product_versions: versions.compact).check
|
111
|
+
Dev::EndOfLife.new(product_versions: Dev::EndOfLife::Aws.new.default_products).check
|
117
112
|
end
|
118
113
|
end
|
119
114
|
end
|