opsicle 2.9.3 → 2.9.4
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/opsicle/commands/list_instances.rb +2 -2
- data/lib/opsicle/instances.rb +6 -2
- data/lib/opsicle/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c75ff97a867184874e1f843479835ce6132cb52
|
4
|
+
data.tar.gz: 2b56df550482ea9d5e6bd7d9c0f562622e943a63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c265d345b1975c90adb0fef8dd19ef5006fba43554494e9d66b109a8b008fedad842aa5b80778dbbb3e79da1f77bf1026ddf75129bd0dd116223433ad682cec
|
7
|
+
data.tar.gz: 02f166794f08a4a7ecb1db1f687163a77b211dd3eb274cdc233acb7d3ba74427cd30f01677d014a99038a5383e55a0e7f5f45dd667b8d1fca593a7dc34844fa5
|
@@ -18,12 +18,12 @@ module Opsicle
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def print(instances)
|
21
|
-
puts Terminal::Table.new headings: ['Hostname', 'Layers', 'Status', 'IP', '
|
21
|
+
puts Terminal::Table.new headings: ['Hostname', 'Layers', 'Status', 'Public IP', 'Private ID'], rows: instance_data(instances)
|
22
22
|
end
|
23
23
|
|
24
24
|
def instance_data(instances)
|
25
25
|
instances.sort { |a,b| a[:hostname] <=> b[:hostname] }.map { |instance|
|
26
|
-
[instance[:hostname], layer_names(instance), instance[:status], Opsicle::Instances::pretty_ip(instance), instance
|
26
|
+
[instance[:hostname], layer_names(instance), instance[:status], Opsicle::Instances::pretty_ip(instance), Opsicle::Instances::private_ip(instance)]
|
27
27
|
}
|
28
28
|
end
|
29
29
|
|
data/lib/opsicle/instances.rb
CHANGED
@@ -18,9 +18,13 @@ module Opsicle
|
|
18
18
|
instance[:elastic_ip] ? "#{instance[:elastic_ip]} EIP" : instance[:public_ip]
|
19
19
|
end
|
20
20
|
|
21
|
+
def self.private_ip(instance)
|
22
|
+
instance[:private_ip]
|
23
|
+
end
|
24
|
+
|
21
25
|
def self.find_by_ip(client, ips)
|
22
26
|
instances = new(client).data.reject { |instance| instances_matching_ips(instance, ips) }
|
23
|
-
instances.empty? ? nil : instances
|
27
|
+
instances.empty? ? nil : instances
|
24
28
|
end
|
25
29
|
|
26
30
|
def self.instances_matching_ips(instance, ip_addresses)
|
@@ -32,7 +36,7 @@ module Opsicle
|
|
32
36
|
|
33
37
|
def self.find_by_eip(client)
|
34
38
|
instances = new(client).data.reject { |instance| instance[:elastic_ip] == nil }
|
35
|
-
instances.empty? ? nil : instances
|
39
|
+
instances.empty? ? nil : instances
|
36
40
|
end
|
37
41
|
|
38
42
|
def instances(options={})
|
data/lib/opsicle/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opsicle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.9.
|
4
|
+
version: 2.9.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Fleener
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-08-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk
|
@@ -282,7 +282,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
282
282
|
version: '0'
|
283
283
|
requirements: []
|
284
284
|
rubyforge_project:
|
285
|
-
rubygems_version: 2.
|
285
|
+
rubygems_version: 2.6.12
|
286
286
|
signing_key:
|
287
287
|
specification_version: 4
|
288
288
|
summary: An opsworks specific abstraction on top of the aws sdk
|