Class: HammerCLIForeman::Host::UpdateCommand

Inherits:
UpdateCommand show all
Includes:
HammerCLIForeman::Hosts::CommonUpdateOptions
Defined in:
lib/hammer_cli_foreman/host.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from HammerCLIForeman::Hosts::CommonUpdateOptions

ask_password, included, #request_params

Methods inherited from UpdateCommand

#clean_up_context, command_name, inherited, #method_options_for_params, #success_message

Methods inherited from Command

alias_name_for_resource, build_options, connection_name, #customized_options, #dependency_resolver, dependency_resolver, #exception_handler_class, #get_identifier, #get_resource_id, #get_resource_ids, #request_params, #resolver, resolver, resource_alias_name_mapping, resource_config, resource_name_mapping, #searchables, searchables, #send_request, #transform_format

Class Method Details

.create_option_builderObject



280
281
282
283
284
285
286
287
288
# File 'lib/hammer_cli_foreman/host.rb', line 280

def self.create_option_builder
  builder = super
  %i[locations organizations].each do |resource_name|
    builder.builders << UpdateDependentSearchablesOptionBuilder.new(
      HammerCLIForeman.foreman_resource(resource_name), searchables
    )
  end
  builder
end

Instance Method Details

#option_sourcesObject



292
293
294
295
296
297
298
299
300
# File 'lib/hammer_cli_foreman/host.rb', line 292

def option_sources
  sources = super
  sources.find_by_name('IdResolution').insert_relative(
    :after,
    'SelfParam',
    HammerCLIForeman::OptionSources::NewParams.new(self)
  )
  sources
end