Method: CollinsShell::Ipmi#update

Defined in:
lib/collins_shell/ipmi.rb

#updateObject



49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/collins_shell/ipmi.rb', line 49

def update
  call_collins get_collins_client, "update ipmi" do |client|
    ipmi = client.ipmi_update options.tag, :username => options.ipmi_username,
                                           :password => options.ipmi_password,
                                           :address => options.address,
                                           :gateway => options.gateway,
                                           :netmask => options.netmask
    if ipmi then
      asset = client.get options.tag
      CollinsShell::Ipmi.print_ipmi asset.ipmi
    else
      say_error "update IPMI address"
    end
  end
end