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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: df083190e5bf6b2d9bb001353e9827eea099c8a6
4
- data.tar.gz: 95071577df7b0470385b7aab886a6fb3b63e81a4
3
+ metadata.gz: d930e1b3dd0b55614b9a5f621d267bca346e8b00
4
+ data.tar.gz: d3612236431e2f72815318c3e6b16c59fce1d7df
5
5
  SHA512:
6
- metadata.gz: 636a3f9e9ec9e2c48004987a433c342849a063a7f4d45b09eb6b761e5c134f3d082524c59ab9e1d4ea412ce40fcaceb8d3864c8c3fd3a8dfcfcccad0b0cb2194
7
- data.tar.gz: f3cf4cbac5f6e3e158629c85639cdb0cb5c1d58c09ba7240f968a45792f1adc71f37826bc1cb18dbc2aec05ea68d6bd076323e4149cc7884349ed68577a9e1b8
6
+ metadata.gz: 014dd53eccfc59d3575fdb70d2b45327fbf4d8eed37cfe16c88563db7dc1cc9cfc08d0a385bedc5c3efca232efe2379441f9f27aa0b2293a5fc5737efbb900f1
7
+ data.tar.gz: 0af51492dc2d9b67bf1c65bda3afcb016462a266f7d3c315a08661172cdf7ca3153710fa4409f5a8e35d0fd54c9a47012161526ec00c4ecf83c56f24ac37e1b6
@@ -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
 
@@ -204,7 +204,7 @@ class Registry
204
204
  end
205
205
 
206
206
  # main MAC address
207
- run_on_all("ifconfig e1000g0 | grep ether | cut -d ' ' -f 2").each do |addr, data|
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
- # @hosts.each do |addr, _|
334
- # ret[addr] = ""
335
- # end
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
@@ -1,3 +1,3 @@
1
1
  module SmartosManager
2
- VERSION = "1.5.4"
2
+ VERSION = "1.5.5"
3
3
  end
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
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-21 00:00:00.000000000 Z
11
+ date: 2015-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: toml-rb