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

#request_headers, #send_request

Class Method Details

.command_name(name = nil) ⇒ Object



152
153
154
# File 'lib/hammer_cli_foreman/commands.rb', line 152

def self.command_name(name=nil)
  super(name) || "update"
end

.setup_identifier_optionsObject



158
159
160
161
# File 'lib/hammer_cli_foreman/commands.rb', line 158

def self.setup_identifier_options
  super
  option "--new-name", "NEW_NAME", "new name for the resource", :attribute_name => :option_name if identifier? :name
end

Instance Method Details

#request_paramsObject



163
164
165
166
167
# File 'lib/hammer_cli_foreman/commands.rb', line 163

def request_params
  params = method_options
  params['id'] = get_identifier[0]
  params
end