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.
8
9
10
11
|
# File 'lib/rubyipmi/freeipmi/commands/bmc.rb', line 8
def initialize(opts = ObservableHash.new)
super("bmc-device", opts)
@bmcinfo = {}
end
|
Instance Attribute Details
#config ⇒ Object
6
7
8
|
# File 'lib/rubyipmi/freeipmi/commands/bmc.rb', line 6
def config
@config
end
|
Instance Method Details
#device ⇒ Object
48
49
50
|
# File 'lib/rubyipmi/freeipmi/commands/bmc.rb', line 48
def device
@bmcdevice ||= Rubyipmi::Freeipmi::BmcDevice.new(options)
end
|
#guid ⇒ Object
32
33
34
|
# File 'lib/rubyipmi/freeipmi/commands/bmc.rb', line 32
def guid
information.guid
end
|
#info ⇒ Object
20
21
22
23
24
25
26
|
# File 'lib/rubyipmi/freeipmi/commands/bmc.rb', line 20
def info
if @bmcinfo.length > 0
@bmcinfo
else
information.retrieve
end
end
|
44
45
46
|
# File 'lib/rubyipmi/freeipmi/commands/bmc.rb', line 44
def information
@info ||= Rubyipmi::Freeipmi::BmcInfo.new(options)
end
|
#lan ⇒ Object
40
41
42
|
# File 'lib/rubyipmi/freeipmi/commands/bmc.rb', line 40
def lan
@lan ||= Rubyipmi::Freeipmi::Lan.new(options)
end
|
#reset(type = 'cold') ⇒ Object
28
29
30
|
# File 'lib/rubyipmi/freeipmi/commands/bmc.rb', line 28
def reset(type='cold')
device.reset(type)
end
|
#version ⇒ Object
13
14
15
16
17
18
|
# File 'lib/rubyipmi/freeipmi/commands/bmc.rb', line 13
def version
@options['version'] = false
value = runcmd
@options.delete_notify('version')
@result.slice(/\d\.\d.\d/)
end
|