smartos-manager 1.0.0 → 1.1.0

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: 37214f80056c5a2ba2bd25ecf36ead002011ec77
4
- data.tar.gz: 9b7b0d614a7f81c5a9ed370c31fe411c1ed4be51
3
+ metadata.gz: 29841f2633b48a0b3157ce61b2e192a14c48475e
4
+ data.tar.gz: 2854a9fa98812383556aa13ac5a9495d68416346
5
5
  SHA512:
6
- metadata.gz: a5797b5b333c33bb34db357f29aaaa9a369cf20f051b0754d11ba21d76a832884baec693dd933fc58e9034fe3fbbf6fc17c0defb7f452bf6a360082559713dcb
7
- data.tar.gz: 3465b613e2e8f7a159e0cad40c99ff1f3b1068c15990a883f753f209cf405ac9dc672f8c8baf2491c69670f3eeb68dfdabc5742b43d82b7e6fdbce3f15a7f58e
6
+ metadata.gz: 5faba60549136b532abd89709807a3dd4f2961ad601f7789f9c72e2f8339858b609819aec004174b427f457d97e569de04f51ab03a2d69760612a58113c8145b
7
+ data.tar.gz: 6ca13ee99a7bd442d4d5e62a143ea4cad53e06e78002914d3b629bd5fe40e13653117f47f0dcc4e95bf1ffa34345c8e8a423f14dc8d49cdd502f905eed3c99d5
@@ -22,7 +22,8 @@ class AppCLI < Thor
22
22
  vms.each{|vm| vm_memory += vm.memory }
23
23
  avail = (mem - vm_memory) - (20 * mem/100.0)
24
24
 
25
- puts "\n#{host.name} (#{host.address}) (#{vms.size} vms) (Total RAM: #{mem.human_size(1).green}, Avail: #{avail.human_size(1).magenta})"
25
+ rev = sysinfos[host][:smartos_version]
26
+ puts "\n#{host.name} [SmartOS: #{rev.green}] (#{host.address}) (#{vms.size} vms) (Total RAM: #{mem.human_size(1).green}, Avail: #{avail.human_size(1).magenta})"
26
27
  vms.each do |vm|
27
28
  user_columns = registry.user_columns.values.map{|key| vm[key] }
28
29
  p_vm_list(vm.memory.human_size(1), vm.name, vm.type, vm.uuid, printable_state(vm.state), vm.admin_ip, *user_columns)
@@ -148,12 +148,17 @@ class HostRegistry
148
148
  ret = {}
149
149
 
150
150
  # Memory size: 8157 Megabytes
151
- hosts = run_on_all("prtconf | head -3 | grep Mem")
152
- hosts.each do |host, data|
151
+ run_on_all("prtconf | head -3 | grep Mem").each do |host, data|
153
152
  _, _, mem, _ = data.split(" ")
154
153
  ret[host] = {memory: mem.to_i.megabytes}
155
154
  end
156
155
 
156
+ # joyent_20140207T053435Z
157
+ run_on_all("uname -a | cut -d ' ' -f 4").each do |host, data|
158
+ _, rev = data.strip().split('_')
159
+ ret[host][:smartos_version] = rev
160
+ end
161
+
157
162
  ret
158
163
  end
159
164
 
@@ -1,3 +1,3 @@
1
1
  module SmartosManager
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
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.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien Ammous
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-25 00:00:00.000000000 Z
11
+ date: 2014-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: toml-rb