onering-report-plugins 0.0.17 → 0.0.18
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.
- data/lib/etc/facter.list +16 -0
- data/lib/reporter/default/properties_facter.rb +24 -17
- metadata +4 -3
data/lib/etc/facter.list
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
serialnumber:serial
|
2
|
+
manufacturer:make
|
3
|
+
productname:model
|
4
|
+
boardmanufacturer:mbmake
|
5
|
+
boardproductname:mbmodel
|
6
|
+
boardserialnumber:mbserial
|
7
|
+
fqdn
|
8
|
+
ipaddress:ip
|
9
|
+
default_macaddress:mac
|
10
|
+
default_gateway:gateway
|
11
|
+
kernelrelease:kernel
|
12
|
+
architecture:arch
|
13
|
+
operatingsystem:distro
|
14
|
+
operatingsystemrelease:version
|
15
|
+
signature
|
16
|
+
boottime:booted_at
|
@@ -15,25 +15,32 @@ report do
|
|
15
15
|
|
16
16
|
if defined?(Facter)
|
17
17
|
# get a list of Facter attributes to list
|
18
|
-
|
19
|
-
IO.readlines("/etc/onering/facter.list").each do |line|
|
20
|
-
# strip whitespace/kill newline
|
21
|
-
line.strip!
|
22
|
-
line.chomp!
|
23
|
-
next if line.empty?
|
24
|
-
line = line.downcase
|
18
|
+
local_list = File.join(File.dirname(File.dirname(File.dirname(__FILE__))),'etc','facter.list')
|
25
19
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
20
|
+
facts = [
|
21
|
+
local_list,
|
22
|
+
"/etc/onering/facter.list"
|
23
|
+
].collect{|file|
|
24
|
+
IO.readlines(file) if File.exists?(file)
|
25
|
+
}.flatten.compact.sort.uniq
|
31
26
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
27
|
+
facts.each do |line|
|
28
|
+
# strip whitespace/kill newline
|
29
|
+
line.strip!
|
30
|
+
line.chomp!
|
31
|
+
next if line.empty?
|
32
|
+
line = line.downcase
|
33
|
+
|
34
|
+
unless line =~ /^#/
|
35
|
+
begin
|
36
|
+
line = line.split(':')
|
37
|
+
key = (line.length == 1 ? line.first : line.last)
|
38
|
+
val = cleanup_dirty_values(key, Facter.value(line.first))
|
39
|
+
|
40
|
+
property key.to_sym, val
|
41
|
+
rescue Exception
|
42
|
+
STDERR.puts e.message
|
43
|
+
next
|
37
44
|
end
|
38
45
|
end
|
39
46
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onering-report-plugins
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.18
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2013-04-09 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: onering-client
|
16
|
-
requirement: &
|
16
|
+
requirement: &20451760 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *20451760
|
25
25
|
description: Base plugins for providing system information via the Onering client
|
26
26
|
utility
|
27
27
|
email: ghetzel@outbrain.com
|
@@ -39,6 +39,7 @@ files:
|
|
39
39
|
- lib/facter/onering_properties_id.rb
|
40
40
|
- lib/facter/onering_properties_zfs.rb
|
41
41
|
- lib/facter/onering_properties_xen.rb
|
42
|
+
- lib/etc/facter.list
|
42
43
|
- lib/reporter/default/properties_physical.rb
|
43
44
|
- lib/reporter/default/properties_facter.rb
|
44
45
|
- lib/reporter/default/stats_disk.rb
|