Class: HammerCLIForeman::UpdateCommand
Direct Known Subclasses
Architecture::UpdateCommand, AuthSourceLdap::UpdateCommand, ComputeResource::UpdateCommand, ConfigGroup::UpdateCommand, Domain::UpdateCommand, Environment::UpdateCommand, ExternalUsergroup::UpdateCommand, Filter::UpdateCommand, Host::UpdateCommand, Hostgroup::UpdateCommand, Image::UpdateCommand, Interface::UpdateCommand, Location::UpdateCommand, Medium::UpdateCommand, Model::UpdateCommand, OperatingSystem::UpdateCommand, Organization::UpdateCommand, PartitionTable::UpdateCommand, Realm::UpdateCommand, Role::CloneCommand, Role::UpdateCommand, Settings::UpdateCommand, SmartClassParameter::UpdateCommand, SmartProxy::UpdateCommand, SmartVariable::UpdateCommand, Subnet::UpdateCommand, Template::UpdateCommand, HammerCLIForeman::User::UpdateCommand, HammerCLIForeman::Usergroup::UpdateCommand
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Command
build_options, connection_name, #customized_options, #dependency_resolver, dependency_resolver, #exception_handler_class, #get_identifier, #get_resource_id, #get_resource_ids, #option_sources, #request_params, #resolver, resolver, resource_config, resource_name_mapping, searchables, #searchables, #send_request, #transform_format
Class Method Details
.command_name(name = nil) ⇒ Object
357
358
359
|
# File 'lib/hammer_cli_foreman/commands.rb', line 357
def self.command_name(name=nil)
super(name) || "update"
end
|
.create_option_builder ⇒ Object
361
362
363
364
365
|
# File 'lib/hammer_cli_foreman/commands.rb', line 361
def self.create_option_builder
builder = super
builder.builders << SearchablesUpdateOptionBuilder.new(resource, searchables) if resource_defined?
builder
end
|
Instance Method Details
#method_options_for_params(params, include_nil = true) ⇒ Object
367
368
369
370
371
372
373
374
375
|
# File 'lib/hammer_cli_foreman/commands.rb', line 367
def method_options_for_params(params, include_nil=true)
opts = super
searchables.for(resource).each do |s|
new_value = get_option_value("new_#{s.name}")
opts[s.name] = new_value unless new_value.nil?
end
opts
end
|