aws-inventory 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/inventory.rb +0 -2
- data/lib/inventory/ec2.rb +0 -44
- data/lib/inventory/ecs/service.rb +0 -4
- data/lib/inventory/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: 8f24d7463e40babe374b68f9407b96be20ce2c94
|
|
4
|
+
data.tar.gz: 26df28143fed0044df15c546616d724530ad9729
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eb2d7433602b4b265b8a8b15b1310d882605232b3b951b7175ac37f7da066ec95489244e75964b5ce6d8033f4af3dd8bbbfb64a71e86bf6ee21c4f72aacb5257
|
|
7
|
+
data.tar.gz: bdd111342357d77fe51894becd1f1f7f0273c4efbcc03953cc0c5195faa120f7f45b3886e979eb4d30ad86f4675afb33befd189684af951e043b08c38c079f09
|
data/lib/inventory.rb
CHANGED
data/lib/inventory/ec2.rb
CHANGED
|
@@ -7,13 +7,11 @@ class Inventory::Ec2 < Inventory::Base
|
|
|
7
7
|
instances.map do |i|
|
|
8
8
|
name = name_from_tag(i)
|
|
9
9
|
group_names = security_group_names(i)
|
|
10
|
-
# cost = cost(i)
|
|
11
10
|
|
|
12
11
|
[
|
|
13
12
|
name,
|
|
14
13
|
i.instance_id,
|
|
15
14
|
i.instance_type,
|
|
16
|
-
# cost,
|
|
17
15
|
platform(i), # windows or linux
|
|
18
16
|
group_names,
|
|
19
17
|
]
|
|
@@ -41,46 +39,4 @@ class Inventory::Ec2 < Inventory::Base
|
|
|
41
39
|
def platform(instance)
|
|
42
40
|
instance.platform || "linux"
|
|
43
41
|
end
|
|
44
|
-
|
|
45
|
-
# hardcode pricing info until access to pricing api is sorted out
|
|
46
|
-
# these costs are per month.
|
|
47
|
-
COST_MAP = {
|
|
48
|
-
"t2.micro" => {
|
|
49
|
-
"windows" => 11.826,
|
|
50
|
-
"linux" => 8.468,
|
|
51
|
-
},
|
|
52
|
-
"t2.medium" => {
|
|
53
|
-
"windows" => 47.012,
|
|
54
|
-
"linux" => 33.872,
|
|
55
|
-
},
|
|
56
|
-
"t2.large" => {
|
|
57
|
-
"windows" => 88.184,
|
|
58
|
-
"linux" => 67.744,
|
|
59
|
-
},
|
|
60
|
-
"r3.4xlarge" => {
|
|
61
|
-
"windows" => 1419.12,
|
|
62
|
-
"linux" => 970.9,
|
|
63
|
-
},
|
|
64
|
-
"m4.large" => {
|
|
65
|
-
"windows" => 140.16,
|
|
66
|
-
"linux" => 73.0,
|
|
67
|
-
},
|
|
68
|
-
"m4.2xlarge" => {
|
|
69
|
-
"windows" => 560.64,
|
|
70
|
-
"linux" => 292,
|
|
71
|
-
},
|
|
72
|
-
"c3.2xlarge" => {
|
|
73
|
-
"windows" => 548.96,
|
|
74
|
-
"linux" => 306.6,
|
|
75
|
-
},
|
|
76
|
-
}
|
|
77
|
-
# Currently dont have access to the pricing api so skipping
|
|
78
|
-
# def describe_pricing
|
|
79
|
-
# resp = pricing.describe_services(
|
|
80
|
-
# format_version: "aws_v1",
|
|
81
|
-
# max_results: 1,
|
|
82
|
-
# service_code: "AmazonEC2",
|
|
83
|
-
# )
|
|
84
|
-
# pp resp
|
|
85
|
-
# end
|
|
86
42
|
end
|
|
@@ -25,9 +25,5 @@ class Inventory::Ecs::Service < Inventory::Base
|
|
|
25
25
|
resp = ecs.describe_services(services: service_arns, cluster: cluster_arn)
|
|
26
26
|
resp.services
|
|
27
27
|
end.flatten
|
|
28
|
-
|
|
29
|
-
# pp @ecs_services
|
|
30
|
-
# @ecs_services
|
|
31
|
-
# @ecs_services ||= ecs.describe_services.services
|
|
32
28
|
end
|
|
33
29
|
end
|
data/lib/inventory/version.rb
CHANGED