smartos-manager 1.5.4 → 1.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/smartos-manager/cli.rb +10 -10
- data/lib/smartos-manager/core.rb +11 -4
- data/lib/smartos-manager/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d930e1b3dd0b55614b9a5f621d267bca346e8b00
|
4
|
+
data.tar.gz: d3612236431e2f72815318c3e6b16c59fce1d7df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 014dd53eccfc59d3575fdb70d2b45327fbf4d8eed37cfe16c88563db7dc1cc9cfc08d0a385bedc5c3efca232efe2379441f9f27aa0b2293a5fc5737efbb900f1
|
7
|
+
data.tar.gz: 0af51492dc2d9b67bf1c65bda3afcb016462a266f7d3c315a08661172cdf7ca3153710fa4409f5a8e35d0fd54c9a47012161526ec00c4ecf83c56f24ac37e1b6
|
data/lib/smartos-manager/cli.rb
CHANGED
@@ -62,16 +62,6 @@ class AppCLI < Thor
|
|
62
62
|
|
63
63
|
sysinfos = registry.sysinfo()
|
64
64
|
diags = registry.diag()
|
65
|
-
|
66
|
-
failures = registry.failed_connections()
|
67
|
-
unless failures.empty?
|
68
|
-
puts "Error while connecting to:".red()
|
69
|
-
failures.each do |s|
|
70
|
-
puts " - #{s.name} : #{s.address}".red()
|
71
|
-
end
|
72
|
-
|
73
|
-
puts ""
|
74
|
-
end
|
75
65
|
|
76
66
|
|
77
67
|
user_columns = registry.user_columns.keys.map{|s| humanize(s) }
|
@@ -123,6 +113,16 @@ class AppCLI < Thor
|
|
123
113
|
# puts " Available Memory: #{avail.human_size(1)}".magenta()
|
124
114
|
end
|
125
115
|
|
116
|
+
failures = registry.failed_connections()
|
117
|
+
unless failures.empty?
|
118
|
+
puts "\n\nError while connecting to:".red()
|
119
|
+
failures.each do |s|
|
120
|
+
puts " - #{s.name} : #{s.address}".red()
|
121
|
+
end
|
122
|
+
|
123
|
+
puts ""
|
124
|
+
end
|
125
|
+
|
126
126
|
end
|
127
127
|
|
128
128
|
|
data/lib/smartos-manager/core.rb
CHANGED
@@ -204,7 +204,7 @@ class Registry
|
|
204
204
|
end
|
205
205
|
|
206
206
|
# main MAC address
|
207
|
-
run_on_all("ifconfig
|
207
|
+
run_on_all("ifconfig `dladm show-phys -p -o link | head -n 1` | grep ether | cut -d ' ' -f 2").each do |addr, data|
|
208
208
|
host = find_host(addr)
|
209
209
|
ret[host][:mac0] = data.strip()
|
210
210
|
end
|
@@ -330,9 +330,9 @@ class SSHRegistry < Registry
|
|
330
330
|
ret = {}
|
331
331
|
|
332
332
|
# set the keys in cas we get nothing back
|
333
|
-
|
334
|
-
|
335
|
-
|
333
|
+
@hosts.each do |addr, _|
|
334
|
+
ret[addr] = ""
|
335
|
+
end
|
336
336
|
|
337
337
|
channel = @connection.exec(cmd) do |ch, stream, data|
|
338
338
|
host = @hosts[ch[:host]]
|
@@ -341,6 +341,13 @@ class SSHRegistry < Registry
|
|
341
341
|
|
342
342
|
channel.wait()
|
343
343
|
|
344
|
+
# remove empty results
|
345
|
+
@hosts.each do |addr, _|
|
346
|
+
if ret[addr] == ""
|
347
|
+
ret.delete(addr)
|
348
|
+
end
|
349
|
+
end
|
350
|
+
|
344
351
|
cache_result(cmd, ret)
|
345
352
|
|
346
353
|
ret
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smartos-manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julien Ammous
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: toml-rb
|