Method: CollinsShell::Ipmi#update

Defined in:
lib/collins_shell/ipmi.rb

#updateObject



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/collins_shell/ipmi.rb', line 65

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