Class: HammerCLIForeman::Template::UpdateCommand

Inherits:
UpdateCommand show all
Defined in:
lib/hammer_cli_foreman/template.rb

Instance Method Summary collapse

Methods inherited from UpdateCommand

command_name, #request_params, setup_identifier_options

Methods inherited from WriteCommand

#request_headers, #send_request

Instance Method Details

#snippetObject



120
121
122
# File 'lib/hammer_cli_foreman/template.rb', line 120

def snippet
  type == "snippet"
end

#template_kind_idObject



124
125
126
127
128
129
# File 'lib/hammer_cli_foreman/template.rb', line 124

def template_kind_id
  kinds = HammerCLIForeman.collection_to_common_format(
            ForemanApi::Resources::TemplateKind.new(resource_config).index()[0])
  table = kinds.inject({}){ |result, k| result.update(k["name"] => k["id"]) }
  table[type]
end