Class: HammerCLIForeman::UpdateCommand
- Inherits:
-
WriteCommand
- Object
- HammerCLI::Apipie::WriteCommand
- WriteCommand
- HammerCLIForeman::UpdateCommand
show all
- Defined in:
- lib/hammer_cli_foreman/commands.rb
Direct Known Subclasses
Architecture::UpdateCommand, ComputeResource::UpdateCommand, Domain::UpdateCommand, Environment::UpdateCommand, Host::UpdateCommand, Hostgroup::UpdateCommand, Image::UpdateCommand, Location::UpdateCommand, Medium::UpdateCommand, Model::UpdateCommand, OperatingSystem::UpdateCommand, Organization::UpdateCommand, PartitionTable::UpdateCommand, SmartClassParameter::UpdateCommand, SmartProxy::UpdateCommand, Subnet::UpdateCommand, Template::UpdateCommand, HammerCLIForeman::User::UpdateCommand
Class Method Summary
collapse
Instance Method Summary
collapse
#send_request, #success_message_params
Class Method Details
.apipie_options(options = {}) ⇒ Object
142
143
144
|
# File 'lib/hammer_cli_foreman/commands.rb', line 142
def self.apipie_options(options={})
super({:without => declared_identifiers.keys}.merge(options))
end
|
.command_name(name = nil) ⇒ Object
125
126
127
|
# File 'lib/hammer_cli_foreman/commands.rb', line 125
def self.command_name(name=nil)
super(name) || "update"
end
|
Instance Method Details
#request_params ⇒ Object
136
137
138
139
140
|
# File 'lib/hammer_cli_foreman/commands.rb', line 136
def request_params
params = method_options
params['id'] = get_identifier[0]
params
end
|
#setup_identifier_options ⇒ Object
131
132
133
134
|
# File 'lib/hammer_cli_foreman/commands.rb', line 131
def setup_identifier_options
super
self.class.option "--new-name", "NEW_NAME", "new name for the resource", :attribute_name => :name if self.class.identifier? :name
end
|