Class: HammerCLIForeman::Template::CreateCommand

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

Instance Method Summary collapse

Methods inherited from CreateCommand

command_name

Methods inherited from WriteCommand

#send_request, #success_message_params

Instance Method Details

#snippetObject



97
98
99
# File 'lib/hammer_cli_foreman/template.rb', line 97

def snippet
  type == "snippet"
end

#template_kind_idObject



101
102
103
104
105
106
# File 'lib/hammer_cli_foreman/template.rb', line 101

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