# File lib/rubyipmi/ipmitool/commands/lan.rb, line 103 def dhcp? if @info.length < 1 parse(print) end @info["ip address source"].match(/dhcp/) != nil end
# File lib/rubyipmi/ipmitool/commands/lan.rb, line 61 def gateway if @info.length < 1 parse(print) end @info["default gateway ip"] end
# File lib/rubyipmi/ipmitool/commands/lan.rb, line 96 def gateway=(address) @options["cmdargs"] = "lan set #{channel} defgw #{address}" value = runcmd @options.delete_notify("cmdargs") return value end
def snmp
if @info.length < 1 parse(print) end # Some systems do not report the snmp string @info["snmp community string"]
end
# File lib/rubyipmi/ipmitool/commands/lan.rb, line 40 def ip if @info.length < 1 parse(print) end @info["ip address"] end
def snmp=(community)
@options["cmdargs"] = "lan set #{channel} snmp #{community}" value = runcmd @options.delete_notify("cmdargs") return value
end
# File lib/rubyipmi/ipmitool/commands/lan.rb, line 82 def ip=(address) @options["cmdargs"] = "lan set #{channel} ipaddr #{address}" value = runcmd @options.delete_notify("cmdargs") return value end
# File lib/rubyipmi/ipmitool/commands/lan.rb, line 47 def mac if @info.length < 1 parse(print) end @info["mac address"] end
# File lib/rubyipmi/ipmitool/commands/lan.rb, line 54 def netmask if @info.length < 1 parse(print) end @info["subnet mask"] end
# File lib/rubyipmi/ipmitool/commands/lan.rb, line 89 def netmask=(mask) @options["cmdargs"] = "lan set #{channel} netmask #{mask}" value = runcmd @options.delete_notify("cmdargs") return value end
def vlanid=(vlan)
@options["cmdargs"] = "lan set #{channel} vlan id #{vlan}" value = runcmd @options.delete_notify("cmdargs") return value
end
# File lib/rubyipmi/ipmitool/commands/lan.rb, line 125 def parse(landata) multikey = "" multivalue = {} landata.lines.each do |line| # clean up the data from spaces item = line.split(':', 2) key = item.first.strip.downcase value = item.last.strip @info[key] = value end return @info end
Generated with the Darkfish Rdoc Generator 2.