rubyipmi 0.3.3 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rubyipmi/freeipmi/commands/basecommand.rb +1 -1
- data/lib/rubyipmi/freeipmi/commands/chassisconfig.rb +11 -11
- data/lib/rubyipmi/freeipmi/commands/lan.rb +5 -5
- data/lib/rubyipmi/freeipmi/commands/sensors.rb +108 -0
- data/lib/rubyipmi/freeipmi/connection.rb +4 -0
- data/lib/rubyipmi/ipmitool/commands/basecommand.rb +1 -1
- data/lib/rubyipmi/ipmitool/commands/chassisconfig.rb +13 -9
- data/lib/rubyipmi/ipmitool/commands/lan.rb +5 -5
- data/lib/rubyipmi/ipmitool/commands/sensors.rb +136 -0
- data/lib/rubyipmi/ipmitool/connection.rb +4 -0
- data/rubyipmi.gemspec +5 -2
- data/spec/chassis_config_spec.rb +2 -0
- data/spec/chassis_spec.rb +2 -0
- data/spec/lan_spec.rb +7 -7
- data/spec/power_spec.rb +2 -0
- data/spec/sensor_spec.rb +59 -0
- metadata +13 -10
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.4.0
|
@@ -41,7 +41,7 @@ module Rubyipmi::Freeipmi
|
|
41
41
|
# The errorcode code hash contains the fix
|
42
42
|
fix = Rubyipmi::Freeipmi::ErrorCodes.code[result]
|
43
43
|
if not fix
|
44
|
-
raise "
|
44
|
+
raise "#{result}"
|
45
45
|
else
|
46
46
|
@options.merge_notify!(fix)
|
47
47
|
# retry the last called method
|
@@ -38,8 +38,8 @@ module Rubyipmi::Freeipmi
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
-
def bootdevice(device, persistent
|
42
|
-
setBootFlag("Boot_Device", device)
|
41
|
+
def bootdevice(device, persistent)
|
42
|
+
setBootFlag("Boot_Device", device,persistent)
|
43
43
|
end
|
44
44
|
|
45
45
|
def bootdevices
|
@@ -65,28 +65,28 @@ module Rubyipmi::Freeipmi
|
|
65
65
|
|
66
66
|
|
67
67
|
# shortcut to set boot device to pxe
|
68
|
-
def bootpxe(persistent=
|
69
|
-
bootdevice("PXE")
|
68
|
+
def bootpxe(persistent=true)
|
69
|
+
bootdevice("PXE",persistent)
|
70
70
|
end
|
71
71
|
|
72
72
|
# shortcut to set boot device to disk
|
73
|
-
def bootdisk(persistent=
|
74
|
-
bootdevice("HARD-DRIVE")
|
73
|
+
def bootdisk(persistent=true)
|
74
|
+
bootdevice("HARD-DRIVE",persistent)
|
75
75
|
end
|
76
76
|
|
77
77
|
# shortcut to set boot device to cdrom
|
78
|
-
def bootcdrom(persistent=
|
79
|
-
bootdevice("CD-DVD")
|
78
|
+
def bootcdrom(persistent=true)
|
79
|
+
bootdevice("CD-DVD",persistent)
|
80
80
|
end
|
81
81
|
|
82
82
|
# shortcut to boot into bios setup
|
83
|
-
def bootbios(persistent=
|
84
|
-
bootdevice("BIOS-SETUP")
|
83
|
+
def bootbios(persistent=true)
|
84
|
+
bootdevice("BIOS-SETUP",persistent)
|
85
85
|
end
|
86
86
|
|
87
87
|
private
|
88
88
|
|
89
|
-
def setBootFlag(key,flag, persistent
|
89
|
+
def setBootFlag(key,flag, persistent)
|
90
90
|
@options["key-pair"] = "\"Chassis_Boot_Flags:#{key}=#{flag}\""
|
91
91
|
value = commit
|
92
92
|
@options.delete_notify("key-pair")
|
@@ -49,7 +49,7 @@ module Rubyipmi::Freeipmi
|
|
49
49
|
@info["mac_address"]
|
50
50
|
end
|
51
51
|
|
52
|
-
def
|
52
|
+
def netmask
|
53
53
|
if @info.length < 1
|
54
54
|
parse(@config.section("Lan_Conf"))
|
55
55
|
end
|
@@ -75,15 +75,15 @@ module Rubyipmi::Freeipmi
|
|
75
75
|
#
|
76
76
|
# end
|
77
77
|
|
78
|
-
def
|
78
|
+
def ip=(address)
|
79
79
|
@config.setsection("Lan_Conf", "IP_Address", address)
|
80
80
|
end
|
81
81
|
|
82
|
-
def
|
83
|
-
@config.setsection("Lan_Conf", "Subnet_Mask",
|
82
|
+
def netmask=(netmask)
|
83
|
+
@config.setsection("Lan_Conf", "Subnet_Mask", netmask)
|
84
84
|
end
|
85
85
|
|
86
|
-
def
|
86
|
+
def gateway=(address)
|
87
87
|
@config.setsection("Lan_Conf", "Default_Gateway_IP_Address", address)
|
88
88
|
end
|
89
89
|
|
@@ -0,0 +1,108 @@
|
|
1
|
+
module Rubyipmi::Freeipmi
|
2
|
+
|
3
|
+
class Sensors < Rubyipmi::Freeipmi::BaseCommand
|
4
|
+
|
5
|
+
def initialize(opts = ObservableHash.new)
|
6
|
+
super("ipmi-sensors", opts)
|
7
|
+
@options["no-header-output"] = false
|
8
|
+
@options["output-sensor-state"] = false
|
9
|
+
end
|
10
|
+
|
11
|
+
def refresh
|
12
|
+
@sensors = nil
|
13
|
+
sensors
|
14
|
+
end
|
15
|
+
|
16
|
+
def list
|
17
|
+
sensors
|
18
|
+
end
|
19
|
+
|
20
|
+
def count
|
21
|
+
sensors.count
|
22
|
+
end
|
23
|
+
|
24
|
+
def names
|
25
|
+
sensors.keys
|
26
|
+
end
|
27
|
+
|
28
|
+
def fanlist(refreshdata=false)
|
29
|
+
refresh if refreshdata
|
30
|
+
flist = []
|
31
|
+
values = sensors.each do |sensor|
|
32
|
+
match = sensor.first.match(/(fan)_(\d+)/)
|
33
|
+
next if match.nil?
|
34
|
+
if match[1] == "fan"
|
35
|
+
num = (match[2].to_i) -1
|
36
|
+
flist[num] = sensor.last[:value]
|
37
|
+
end
|
38
|
+
end
|
39
|
+
flist
|
40
|
+
end
|
41
|
+
|
42
|
+
def templist(refreshdata=false)
|
43
|
+
refresh if refreshdata
|
44
|
+
tlist = []
|
45
|
+
values = sensors.each do |sensor|
|
46
|
+
match = sensor.first.match(/(temp)_(\d+)/)
|
47
|
+
next if match.nil?
|
48
|
+
if match[1] == "temp"
|
49
|
+
num = (match[2].to_i) -1
|
50
|
+
tlist[num] = sensor.last[:value]
|
51
|
+
end
|
52
|
+
end
|
53
|
+
tlist
|
54
|
+
end
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
private
|
59
|
+
|
60
|
+
def sensors
|
61
|
+
@sensors ||= parse(getsensors)
|
62
|
+
end
|
63
|
+
|
64
|
+
def method_missing(method, *args, &block)
|
65
|
+
if not sensors.has_key?(method.to_s)
|
66
|
+
raise NoMethodError
|
67
|
+
else
|
68
|
+
sensors[method.to_s]
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
|
73
|
+
def getsensors
|
74
|
+
value = runcmd
|
75
|
+
@result
|
76
|
+
end
|
77
|
+
|
78
|
+
def parse(data)
|
79
|
+
sensorlist = {}
|
80
|
+
data.lines.each do | line|
|
81
|
+
# skip the header
|
82
|
+
data = line.split(/\|/)
|
83
|
+
# remove number column
|
84
|
+
data.shift
|
85
|
+
sensor = Sensor.new(data[0].strip)
|
86
|
+
sensor[:type] = data[1].strip
|
87
|
+
sensor[:state] = data[2].strip
|
88
|
+
sensor[:value] = data[3].strip
|
89
|
+
sensor[:unit] = data[4].strip
|
90
|
+
sensor[:status] = data[5].strip
|
91
|
+
sensorlist[sensor[:name]] = sensor
|
92
|
+
|
93
|
+
end
|
94
|
+
return sensorlist
|
95
|
+
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
class Sensor < Hash
|
100
|
+
|
101
|
+
def initialize(sname)
|
102
|
+
self[:fullname] = sname
|
103
|
+
self[:name] = sname.gsub(/\ /, '_').gsub(/\./, '').downcase
|
104
|
+
end
|
105
|
+
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
@@ -15,7 +15,11 @@ module Rubyipmi::Ipmitool
|
|
15
15
|
|
16
16
|
# Set the boot device
|
17
17
|
def bootdevice(device, persistent=false)
|
18
|
-
|
18
|
+
if persistent
|
19
|
+
@options["cmdargs"] = "chassis bootdev #{device}"
|
20
|
+
else
|
21
|
+
@options["cmdargs"] = "chassis bootparam set bootflag force_#{device}"
|
22
|
+
end
|
19
23
|
value = runcmd
|
20
24
|
@options.delete_notify("cmdargs")
|
21
25
|
return value
|
@@ -29,23 +33,23 @@ module Rubyipmi::Ipmitool
|
|
29
33
|
end
|
30
34
|
|
31
35
|
# shortcut to set boot device to pxe
|
32
|
-
def bootpxe(persistent=
|
33
|
-
bootdevice("pxe")
|
36
|
+
def bootpxe(persistent=true)
|
37
|
+
bootdevice("pxe",persistent)
|
34
38
|
end
|
35
39
|
|
36
40
|
# shortcut to set boot device to disk
|
37
|
-
def bootdisk(persistent=
|
38
|
-
bootdevice("disk")
|
41
|
+
def bootdisk(persistent=true)
|
42
|
+
bootdevice("disk",persistent)
|
39
43
|
end
|
40
44
|
|
41
45
|
# shortcut to set boot device to cdrom
|
42
|
-
def bootcdrom(persistent=
|
43
|
-
bootdevice("cdrom")
|
46
|
+
def bootcdrom(persistent=true)
|
47
|
+
bootdevice("cdrom",persistent)
|
44
48
|
end
|
45
49
|
|
46
50
|
# shortcut to boot into bios setup
|
47
|
-
def bootbios(persistent=
|
48
|
-
bootdevice("bios")
|
51
|
+
def bootbios(persistent=true)
|
52
|
+
bootdevice("bios",persistent)
|
49
53
|
end
|
50
54
|
|
51
55
|
end
|
@@ -51,7 +51,7 @@ module Rubyipmi::Ipmitool
|
|
51
51
|
@info["mac address"]
|
52
52
|
end
|
53
53
|
|
54
|
-
def
|
54
|
+
def netmask
|
55
55
|
if @info.length < 1
|
56
56
|
parse(print)
|
57
57
|
end
|
@@ -79,21 +79,21 @@ module Rubyipmi::Ipmitool
|
|
79
79
|
# return value
|
80
80
|
# end
|
81
81
|
|
82
|
-
def
|
82
|
+
def ip=(address)
|
83
83
|
@options["cmdargs"] = "lan set #{channel} ipaddr #{address}"
|
84
84
|
value = runcmd
|
85
85
|
@options.delete_notify("cmdargs")
|
86
86
|
return value
|
87
87
|
end
|
88
88
|
|
89
|
-
def
|
90
|
-
@options["cmdargs"] = "lan set #{channel} netmask #{
|
89
|
+
def netmask=(mask)
|
90
|
+
@options["cmdargs"] = "lan set #{channel} netmask #{mask}"
|
91
91
|
value = runcmd
|
92
92
|
@options.delete_notify("cmdargs")
|
93
93
|
return value
|
94
94
|
end
|
95
95
|
|
96
|
-
def
|
96
|
+
def gateway=(address)
|
97
97
|
@options["cmdargs"] = "lan set #{channel} defgw #{address}"
|
98
98
|
value = runcmd
|
99
99
|
@options.delete_notify("cmdargs")
|
@@ -0,0 +1,136 @@
|
|
1
|
+
module Rubyipmi::Ipmitool
|
2
|
+
|
3
|
+
class Sensors < Rubyipmi::Ipmitool::BaseCommand
|
4
|
+
|
5
|
+
def initialize(opts = ObservableHash.new)
|
6
|
+
super("ipmitool", opts)
|
7
|
+
end
|
8
|
+
|
9
|
+
def refresh
|
10
|
+
@sensors = nil
|
11
|
+
sensors
|
12
|
+
end
|
13
|
+
|
14
|
+
def list
|
15
|
+
sensors
|
16
|
+
end
|
17
|
+
|
18
|
+
def count
|
19
|
+
sensors.count
|
20
|
+
end
|
21
|
+
|
22
|
+
def names
|
23
|
+
sensors.keys
|
24
|
+
end
|
25
|
+
|
26
|
+
def fanlist(refreshdata=false)
|
27
|
+
refresh if refreshdata
|
28
|
+
flist = []
|
29
|
+
values = sensors.each do |sensor|
|
30
|
+
match = sensor.first.match(/(fan)_(\d+)/)
|
31
|
+
next if match.nil?
|
32
|
+
if match[1] == "fan"
|
33
|
+
num = (match[2].to_i) -1
|
34
|
+
flist[num] = sensor.last[:value]
|
35
|
+
end
|
36
|
+
end
|
37
|
+
flist
|
38
|
+
end
|
39
|
+
|
40
|
+
def templist(refreshdata=false)
|
41
|
+
refresh if refreshdata
|
42
|
+
tlist = []
|
43
|
+
values = sensors.each do |sensor|
|
44
|
+
match = sensor.first.match(/(temp)_(\d+)/)
|
45
|
+
next if match.nil?
|
46
|
+
if match[1] == "temp"
|
47
|
+
num = (match[2].to_i) -1
|
48
|
+
tlist[num] = sensor.last[:value]
|
49
|
+
end
|
50
|
+
end
|
51
|
+
tlist
|
52
|
+
end
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
private
|
57
|
+
|
58
|
+
def sensors
|
59
|
+
@sensors ||= parse(getsensors)
|
60
|
+
end
|
61
|
+
|
62
|
+
def method_missing(method, *args, &block)
|
63
|
+
if not sensors.has_key?(method.to_s)
|
64
|
+
raise NoMethodError
|
65
|
+
else
|
66
|
+
sensors[method.to_s]
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def getsensors
|
71
|
+
options["cmdargs"] = "sensor"
|
72
|
+
value = runcmd
|
73
|
+
options.delete_notify("cmdargs")
|
74
|
+
@result
|
75
|
+
end
|
76
|
+
|
77
|
+
def parse(data)
|
78
|
+
sensorlist = {}
|
79
|
+
data.lines.each do | line|
|
80
|
+
# skip the header
|
81
|
+
data = line.split(/\|/)
|
82
|
+
sensor = Sensor.new(data.first.strip)
|
83
|
+
sensor[:value] = data[1].strip
|
84
|
+
sensor[:unit] = data[2].strip
|
85
|
+
sensor[:status] = data[3].strip
|
86
|
+
sensor[:type] = nil
|
87
|
+
sensor[:state] = nil
|
88
|
+
#sensor[:lower_nonrec] = data[4].strip
|
89
|
+
#sensor[:lower_crit] = data[5].strip
|
90
|
+
#sensor[:lower_noncrit] = data[6].strip
|
91
|
+
#sensor[:upper_noncrit] = data[7].strip
|
92
|
+
#sensor[:upper_crit] = data[8].strip
|
93
|
+
#sensor[:upper_nonrec] = data[9].strip
|
94
|
+
sensorlist[sensor[:name]] = sensor
|
95
|
+
|
96
|
+
end
|
97
|
+
return sensorlist
|
98
|
+
|
99
|
+
end
|
100
|
+
|
101
|
+
end
|
102
|
+
|
103
|
+
class Sensor < Hash
|
104
|
+
|
105
|
+
def initialize(sname)
|
106
|
+
self[:fullname] = sname
|
107
|
+
self[:name] = sname.gsub(/\ /, '_').gsub(/\./, '').downcase
|
108
|
+
end
|
109
|
+
|
110
|
+
#def refresh
|
111
|
+
# data = "sensor get \"#{self[:fullname]}\" "
|
112
|
+
# parse(data)
|
113
|
+
#end
|
114
|
+
|
115
|
+
#def parse(data)
|
116
|
+
# values = data.lines.collect do |line|
|
117
|
+
# line.split(':').last.strip
|
118
|
+
# end
|
119
|
+
# # first 4 entries are lines we don't care about
|
120
|
+
# value = values[4].split(/\([\w\W]+\)/)
|
121
|
+
# self[:value] = value.first.strip
|
122
|
+
# self[:unit] = value.last.strip
|
123
|
+
# self[:status] = values[5].strip.chomp
|
124
|
+
# self[:lower_nonrec] = values[6].strip.chomp
|
125
|
+
# self[:lower_crit] = values[7].strip.chomp
|
126
|
+
# self[:lower_noncrit] = values[8].strip.chomp
|
127
|
+
# self[:upper_noncrit] = values[9].strip.chomp
|
128
|
+
# self[:upper_crit] = values[10].strip.chomp
|
129
|
+
# self[:upper_nonrec] = values[11].strip.chomp
|
130
|
+
|
131
|
+
|
132
|
+
#end
|
133
|
+
|
134
|
+
end
|
135
|
+
|
136
|
+
end
|
data/rubyipmi.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "rubyipmi"
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.4.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Corey Osman"]
|
12
|
-
s.date = "2012-08-
|
12
|
+
s.date = "2012-08-27"
|
13
13
|
s.description = "A ruby wrapper for ipmi command line tools that supports ipmitool and freeipmi"
|
14
14
|
s.email = "corey@logicminds.biz"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -37,6 +37,7 @@ Gem::Specification.new do |s|
|
|
37
37
|
"lib/rubyipmi/freeipmi/commands/chassisconfig.rb",
|
38
38
|
"lib/rubyipmi/freeipmi/commands/lan.rb",
|
39
39
|
"lib/rubyipmi/freeipmi/commands/power.rb",
|
40
|
+
"lib/rubyipmi/freeipmi/commands/sensors.rb",
|
40
41
|
"lib/rubyipmi/freeipmi/connection.rb",
|
41
42
|
"lib/rubyipmi/freeipmi/errorcodes.rb",
|
42
43
|
"lib/rubyipmi/ipmitool/commands/basecommand.rb",
|
@@ -45,6 +46,7 @@ Gem::Specification.new do |s|
|
|
45
46
|
"lib/rubyipmi/ipmitool/commands/chassisconfig.rb",
|
46
47
|
"lib/rubyipmi/ipmitool/commands/lan.rb",
|
47
48
|
"lib/rubyipmi/ipmitool/commands/power.rb",
|
49
|
+
"lib/rubyipmi/ipmitool/commands/sensors.rb",
|
48
50
|
"lib/rubyipmi/ipmitool/connection.rb",
|
49
51
|
"lib/rubyipmi/ipmitool/errorcodes.rb",
|
50
52
|
"lib/rubyipmi/observablehash.rb",
|
@@ -56,6 +58,7 @@ Gem::Specification.new do |s|
|
|
56
58
|
"spec/lan_spec.rb",
|
57
59
|
"spec/power_spec.rb",
|
58
60
|
"spec/rubyipmi_spec.rb",
|
61
|
+
"spec/sensor_spec.rb",
|
59
62
|
"spec/spec_helper.rb"
|
60
63
|
]
|
61
64
|
s.homepage = "http://github.com/logicminds/rubyipmi"
|
data/spec/chassis_config_spec.rb
CHANGED
data/spec/chassis_spec.rb
CHANGED
data/spec/lan_spec.rb
CHANGED
@@ -17,8 +17,8 @@ describe "Lan" do
|
|
17
17
|
@conn.bmc.lan.ip.should_not be nil
|
18
18
|
end
|
19
19
|
|
20
|
-
it "get
|
21
|
-
@conn.bmc.lan.
|
20
|
+
it "get netmask" do
|
21
|
+
@conn.bmc.lan.netmask.should_not be nil
|
22
22
|
end
|
23
23
|
|
24
24
|
it "get gateway address" do
|
@@ -44,17 +44,17 @@ describe "Lan" do
|
|
44
44
|
|
45
45
|
it "should set gateway address" do
|
46
46
|
gw = @conn.bmc.lan.gateway
|
47
|
-
|
47
|
+
(@conn.bmc.lan.gateway = gw).should_not be nil
|
48
48
|
end
|
49
49
|
|
50
|
-
it "should set
|
51
|
-
netmask = @conn.bmc.lan.
|
52
|
-
@conn.bmc.lan.
|
50
|
+
it "should set netmask" do
|
51
|
+
netmask = @conn.bmc.lan.netmask
|
52
|
+
(@conn.bmc.lan.netmask = netmask).should_not be nil
|
53
53
|
end
|
54
54
|
|
55
55
|
it "should set ip address" do
|
56
56
|
ip = @conn.bmc.lan.ip
|
57
|
-
@conn.bmc.lan.
|
57
|
+
(@conn.bmc.lan.ip = ip).should_not be nil
|
58
58
|
end
|
59
59
|
|
60
60
|
|
data/spec/power_spec.rb
CHANGED
data/spec/sensor_spec.rb
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
|
3
|
+
describe "Sensors" do
|
4
|
+
|
5
|
+
attr_accessor :provider
|
6
|
+
before :each do
|
7
|
+
user = ENV["ipmiuser"]
|
8
|
+
pass = ENV["ipmipass"]
|
9
|
+
host = ENV["ipmihost"]
|
10
|
+
provider = ENV["ipmiprovider"]
|
11
|
+
@conn = Rubyipmi.connect(user, pass, host, provider)
|
12
|
+
|
13
|
+
end
|
14
|
+
|
15
|
+
it "test get all sensors" do
|
16
|
+
@conn.sensors.list.count.should be > 1
|
17
|
+
end
|
18
|
+
|
19
|
+
it "test should refresh data" do
|
20
|
+
old = @conn.sensors.list
|
21
|
+
@conn.sensors.refresh
|
22
|
+
new = @conn.sensors.list
|
23
|
+
old.should_not equal(new)
|
24
|
+
end
|
25
|
+
|
26
|
+
it "test should return count greater than 1" do
|
27
|
+
@conn.sensors.count.should be > 1
|
28
|
+
end
|
29
|
+
|
30
|
+
it "test should return names" do
|
31
|
+
@conn.sensors.names.count.should be > 1
|
32
|
+
end
|
33
|
+
|
34
|
+
it "test should return list of fans" do
|
35
|
+
@conn.sensors.fanlist.count.should be > 1
|
36
|
+
end
|
37
|
+
|
38
|
+
it "test should return list of temps" do
|
39
|
+
@conn.sensors.templist.count.should be > 1
|
40
|
+
end
|
41
|
+
|
42
|
+
it "test should create new Sensor" do
|
43
|
+
if provider == "ipmitool"
|
44
|
+
Rubyipmi::Ipmitool::Sensor.new("fakesensor").should_not be nil
|
45
|
+
else
|
46
|
+
Rubyipmi::Freeipmi::Sensor.new("fakesensor").should_not be nil
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
it "test missing method with known good method" do
|
51
|
+
@conn.sensors.fan_1.should_not be nil
|
52
|
+
end
|
53
|
+
|
54
|
+
it "test missing method with known bad method" do
|
55
|
+
expect {@conn.sensors.blah}.to raise_exception
|
56
|
+
end
|
57
|
+
|
58
|
+
|
59
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubyipmi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 4
|
9
|
+
- 0
|
10
|
+
version: 0.4.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Corey Osman
|
@@ -15,10 +15,9 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-08-
|
18
|
+
date: 2012-08-27 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
|
-
type: :development
|
22
21
|
requirement: &id001 !ruby/object:Gem::Requirement
|
23
22
|
none: false
|
24
23
|
requirements:
|
@@ -33,8 +32,8 @@ dependencies:
|
|
33
32
|
version_requirements: *id001
|
34
33
|
name: rspec
|
35
34
|
prerelease: false
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
35
|
type: :development
|
36
|
+
- !ruby/object:Gem::Dependency
|
38
37
|
requirement: &id002 !ruby/object:Gem::Requirement
|
39
38
|
none: false
|
40
39
|
requirements:
|
@@ -48,8 +47,8 @@ dependencies:
|
|
48
47
|
version_requirements: *id002
|
49
48
|
name: rdoc
|
50
49
|
prerelease: false
|
51
|
-
- !ruby/object:Gem::Dependency
|
52
50
|
type: :development
|
51
|
+
- !ruby/object:Gem::Dependency
|
53
52
|
requirement: &id003 !ruby/object:Gem::Requirement
|
54
53
|
none: false
|
55
54
|
requirements:
|
@@ -64,8 +63,8 @@ dependencies:
|
|
64
63
|
version_requirements: *id003
|
65
64
|
name: bundler
|
66
65
|
prerelease: false
|
67
|
-
- !ruby/object:Gem::Dependency
|
68
66
|
type: :development
|
67
|
+
- !ruby/object:Gem::Dependency
|
69
68
|
requirement: &id004 !ruby/object:Gem::Requirement
|
70
69
|
none: false
|
71
70
|
requirements:
|
@@ -80,8 +79,8 @@ dependencies:
|
|
80
79
|
version_requirements: *id004
|
81
80
|
name: jeweler
|
82
81
|
prerelease: false
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
82
|
type: :development
|
83
|
+
- !ruby/object:Gem::Dependency
|
85
84
|
requirement: &id005 !ruby/object:Gem::Requirement
|
86
85
|
none: false
|
87
86
|
requirements:
|
@@ -94,6 +93,7 @@ dependencies:
|
|
94
93
|
version_requirements: *id005
|
95
94
|
name: rcov
|
96
95
|
prerelease: false
|
96
|
+
type: :development
|
97
97
|
description: A ruby wrapper for ipmi command line tools that supports ipmitool and freeipmi
|
98
98
|
email: corey@logicminds.biz
|
99
99
|
executables: []
|
@@ -124,6 +124,7 @@ files:
|
|
124
124
|
- lib/rubyipmi/freeipmi/commands/chassisconfig.rb
|
125
125
|
- lib/rubyipmi/freeipmi/commands/lan.rb
|
126
126
|
- lib/rubyipmi/freeipmi/commands/power.rb
|
127
|
+
- lib/rubyipmi/freeipmi/commands/sensors.rb
|
127
128
|
- lib/rubyipmi/freeipmi/connection.rb
|
128
129
|
- lib/rubyipmi/freeipmi/errorcodes.rb
|
129
130
|
- lib/rubyipmi/ipmitool/commands/basecommand.rb
|
@@ -132,6 +133,7 @@ files:
|
|
132
133
|
- lib/rubyipmi/ipmitool/commands/chassisconfig.rb
|
133
134
|
- lib/rubyipmi/ipmitool/commands/lan.rb
|
134
135
|
- lib/rubyipmi/ipmitool/commands/power.rb
|
136
|
+
- lib/rubyipmi/ipmitool/commands/sensors.rb
|
135
137
|
- lib/rubyipmi/ipmitool/connection.rb
|
136
138
|
- lib/rubyipmi/ipmitool/errorcodes.rb
|
137
139
|
- lib/rubyipmi/observablehash.rb
|
@@ -143,6 +145,7 @@ files:
|
|
143
145
|
- spec/lan_spec.rb
|
144
146
|
- spec/power_spec.rb
|
145
147
|
- spec/rubyipmi_spec.rb
|
148
|
+
- spec/sensor_spec.rb
|
146
149
|
- spec/spec_helper.rb
|
147
150
|
homepage: http://github.com/logicminds/rubyipmi
|
148
151
|
licenses:
|