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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d5d76a799b1d15471821036f61d79528aa08349b
4
- data.tar.gz: 4a98040ea7823e9b4fad261fc9ac443292314de7
3
+ metadata.gz: 8f24d7463e40babe374b68f9407b96be20ce2c94
4
+ data.tar.gz: 26df28143fed0044df15c546616d724530ad9729
5
5
  SHA512:
6
- metadata.gz: 45a73c54940737346bd3215ee0ca26de6a8379c241bbd120fd6921a640599e008a02a210d51ba47f30d23b7e650eefebd8548eed649b8daa9788abb2f92fde44
7
- data.tar.gz: 723dca72ce03b6d9fc5a9754cc6b317176b0f13d80b44dbb9907dfdb6ea32c42809a1fbf7b19b694f2a65c08a2a51c1407e368e00d559a4b127a62a33bda1a3e
6
+ metadata.gz: eb2d7433602b4b265b8a8b15b1310d882605232b3b951b7175ac37f7da066ec95489244e75964b5ce6d8033f4af3dd8bbbfb64a71e86bf6ee21c4f72aacb5257
7
+ data.tar.gz: bdd111342357d77fe51894becd1f1f7f0273c4efbcc03953cc0c5195faa120f7f45b3886e979eb4d30ad86f4675afb33befd189684af951e043b08c38c079f09
data/lib/inventory.rb CHANGED
@@ -2,8 +2,6 @@ $:.unshift(File.expand_path("../", __FILE__))
2
2
  require "inventory/version"
3
3
  require "text-table"
4
4
  require "active_support/all"
5
- require "pp"
6
- require "byebug"
7
5
 
8
6
  module Inventory
9
7
  autoload :Base, "inventory/base"
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
@@ -1,3 +1,3 @@
1
1
  module Inventory
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-inventory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen