Class: HammerCLIForeman::InfoCommand

Inherits:
SingleResourceCommand show all
Defined in:
lib/hammer_cli_foreman/commands.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Command

build_options, connection_name, create_option_builder, #customized_options, #dependency_resolver, dependency_resolver, #get_identifier, #get_resource_id, #request_params, #resolver, resolver, resource_config, resource_name_mapping, searchables, #searchables

Class Method Details

.command_name(name = nil) ⇒ Object



301
302
303
# File 'lib/hammer_cli_foreman/commands.rb', line 301

def self.command_name(name=nil)
  super(name) || "info"
end

Instance Method Details

#extend_data(record) ⇒ Object



311
312
313
# File 'lib/hammer_cli_foreman/commands.rb', line 311

def extend_data(record)
  record
end


315
316
317
# File 'lib/hammer_cli_foreman/commands.rb', line 315

def print_data(record)
  print_record(output_definition, record)
end

#send_requestObject



305
306
307
308
309
# File 'lib/hammer_cli_foreman/commands.rb', line 305

def send_request
  data = super
  record = HammerCLIForeman.record_to_common_format(data)
  extend_data(record)
end