class HammerCLIForeman::Host::ReportsCommand
Public Instance Methods
execute()
click to toggle source
Calls superclass method
HammerCLIForeman::ListCommand#execute
# File lib/hammer_cli_foreman/host.rb, line 227 def execute warn _('%{reports} command is deprecated and will be removed in one of the future versions. Please use %{config_reports} command instead.') % {:reports => 'reports', :config_reports => 'config-reports'} super end
request_params()
click to toggle source
Calls superclass method
HammerCLIForeman::Command#request_params
# File lib/hammer_cli_foreman/host.rb, line 236 def request_params params = super search = [] search << params['search'] if params['search'] hostname = get_option_value('name') search << %Q(host="#{hostname}") if hostname host_id = get_option_value('id') search << "host_id=#{host_id}" if host_id params['search'] = search.join(' and ') unless search.empty? params end
validate_options()
click to toggle source
# File lib/hammer_cli_foreman/host.rb, line 232 def validate_options validator.any(:option_name, :option_id).required end