Class: Rubyipmi::Freeipmi::Bmc
Instance Attribute Summary collapse
Attributes inherited from BaseCommand
#cmd, #lastcall, #max_retry_count, #options, #passfile, #result
Instance Method Summary
collapse
Methods inherited from BaseCommand
#find_fix, #makecommand, #max_retry_count, #setpass, #validate_status
Methods inherited from BaseCommand
#dump_command, #find_fix, #locate_command, #logger, #makecommand, #removepass, #run, #runcmd, #setpass, #update, #validate_status
Constructor Details
#initialize(opts = ObservableHash.new) ⇒ Bmc
Returns a new instance of Bmc.
6
7
8
9
|
# File 'lib/rubyipmi/freeipmi/commands/bmc.rb', line 6
def initialize(opts = ObservableHash.new)
super("bmc-device", opts)
@bmcinfo = {}
end
|
Instance Attribute Details
#config ⇒ Object
4
5
6
|
# File 'lib/rubyipmi/freeipmi/commands/bmc.rb', line 4
def config
@config
end
|
Instance Method Details
#guid ⇒ Object
30
31
32
|
# File 'lib/rubyipmi/freeipmi/commands/bmc.rb', line 30
def guid
information.guid
end
|
#info ⇒ Object
18
19
20
21
22
23
24
|
# File 'lib/rubyipmi/freeipmi/commands/bmc.rb', line 18
def info
if @bmcinfo.length > 0
@bmcinfo
else
information.retrieve
end
end
|
42
43
44
|
# File 'lib/rubyipmi/freeipmi/commands/bmc.rb', line 42
def information
@info ||= Rubyipmi::Freeipmi::BmcInfo.new(options)
end
|
#lan ⇒ Object
38
39
40
|
# File 'lib/rubyipmi/freeipmi/commands/bmc.rb', line 38
def lan
@lan ||= Rubyipmi::Freeipmi::Lan.new(options)
end
|
#reset(type = 'cold') ⇒ Object
26
27
28
|
# File 'lib/rubyipmi/freeipmi/commands/bmc.rb', line 26
def reset(type = 'cold')
device.reset(type)
end
|
#version ⇒ Object
11
12
13
14
15
16
|
# File 'lib/rubyipmi/freeipmi/commands/bmc.rb', line 11
def version
@options['version'] = false
runcmd
@options.delete_notify('version')
@result.slice(/\d\.\d.\d/)
end
|