Class: HammerCLIForeman::UpdateCommand

Inherits:
WriteCommand
  • Object
show all
Defined in:
lib/hammer_cli_foreman/commands.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from WriteCommand

#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_paramsObject



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_optionsObject



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