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

#request_headers, #send_request

Instance Method Details

#snippetObject



94
95
96
# File 'lib/hammer_cli_foreman/template.rb', line 94

def snippet
  type == "snippet"
end

#template_kind_idObject



98
99
100
101
102
103
# File 'lib/hammer_cli_foreman/template.rb', line 98

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