Revision f4459c11
Added by David Davis about 8 years ago
lib/proxy_api/bmc.rb | ||
---|---|---|
when "on?", "off?", "status"
|
||
args[:action].chop! if args[:action].include?('?')
|
||
response = parse(get(bmc_url_for('power',args[:action]), args))
|
||
response.is_a?(Hash) ? response['result'] : response
|
||
response.is_a?(Hash) ? response['result'] : response
|
||
when "on", "off", "cycle", "soft"
|
||
res = parse put(args, bmc_url_for('power',args[:action]))
|
||
# This is a simple action, just return the result of the action
|
||
... | ... | |
case args[:action]
|
||
when "ip", "netmask", "mac", "gateway"
|
||
response = parse(get(bmc_url_for('lan',args[:action]), args))
|
||
response.is_a?(Hash) ? response['result'] : response
|
||
response.is_a?(Hash) ? response['result'] : response
|
||
else
|
||
raise NoMethodError
|
||
end
|
Also available in: Unified diff
Refs #3809 - Turning on some rubocop cops