Class: HammerCLIForeman::UpdateCommand
Direct Known Subclasses
Architecture::UpdateCommand, AuthSourceExternal::UpdateCommand, AuthSourceLdap::UpdateCommand, Bookmark::UpdateCommand, Combination::UpdateCombination, ComputeAttribute::AddInterface, ComputeAttribute::AddVolume, ComputeAttribute::RemoveInterface, ComputeAttribute::RemoveVolume, ComputeAttribute::Update, ComputeAttribute::UpdateInterface, ComputeAttribute::UpdateVolume, ComputeProfile::UpdateCommand, ComputeResource::UpdateCommand, ConfigGroup::UpdateCommand, Domain::UpdateCommand, ExternalUsergroup::UpdateCommand, Filter::UpdateCommand, Host::UpdateCommand, Hostgroup::UpdateCommand, HttpProxy::UpdateCommand, Image::UpdateCommand, Interface::UpdateCommand, Location::UpdateCommand, Medium::UpdateCommand, Model::UpdateCommand, OperatingSystem::UpdateCommand, Organization::UpdateCommand, PartitionTable::UpdateCommand, PuppetEnvironment::UpdateCommand, Realm::UpdateCommand, ReportTemplate::CloneCommand, ReportTemplate::UpdateCommand, Role::CloneCommand, Role::UpdateCommand, Settings::UpdateCommand, SmartClassParameter::UpdateCommand, SmartProxy::UpdateCommand, Subnet::UpdateCommand, Template::UpdateCommand, HammerCLIForeman::User::UpdateCommand, HammerCLIForeman::UserMailNotification::UpdateMailNotificationCommand, HammerCLIForeman::Usergroup::UpdateCommand
Class Method Summary
collapse
Instance Method Summary
collapse
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
.command_name(name = nil) ⇒ Object
541
542
543
|
# File 'lib/hammer_cli_foreman/commands.rb', line 541
def self.command_name(name=nil)
super(name) || "update"
end
|
.create_option_builder ⇒ Object
545
546
547
548
549
|
# File 'lib/hammer_cli_foreman/commands.rb', line 545
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, options) ⇒ Object
551
552
553
554
555
556
557
558
559
560
561
|
# File 'lib/hammer_cli_foreman/commands.rb', line 551
def method_options_for_params(params, options)
opts = super
searchables.for(resource).each do |s|
next unless params.map(&:name).include?(s.name)
new_value = get_option_value("new_#{s.name}")
opts[s.name] = new_value unless new_value.nil?
end
opts
end
|