Project

General

Profile

Actions

Bug #4560

closed

hammer template create expects a number for --type but there's no way to retrieve template_kind IDs

Added by Og Maciel about 10 years ago. Updated about 10 years ago.

Status:
Duplicate
Priority:
Normal
Category:
Foreman commands (obsolete)
Target version:
-
Difficulty:
Triaged:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

In order to create a config template via hammer cli, --type expects the numeric ID for the available template kinds, but there is no way to get to these IDs via the CLI:

# LANG=en_US hammer -v -u admin -p changeme --output csv template create --type='gPXE' --name='krqk5m' --file=/tmp/yt9q7d9l
[ERROR 2014-03-05 16:44:55 Exception] Template can't be blank
Template kind can't be blank
Could not create the config template:
  Template can't be blank
  Template kind can't be blank
[root@qeblade35 ~]# hammer template create --help
Usage:
    hammer template create [OPTIONS]

Options:
    --file TEMPLATE               Path to a file that contains the template
    --type TYPE                   Template type. Eg. snippet, script, provision
    --name NAME                   template name
    --audit-comment AUDIT_COMMENT
    --operatingsystem-ids OPERATINGSYSTEM_IDS Array of operating systems ID to associate the template with
                                  Comma separated list of values.
    -h, --help                    print help

[root@qeblade35 ~]# hammer --csv template kinds
Name
PXELinux
PXEGrub
iPXE
provision
finish
script
user_data
ZTP
snippet

Without this information one cannot create a template via the CLI.


Related issues 1 (0 open1 closed)

Is duplicate of Hammer CLI - Bug #4232: Can not create template using hammer (hammer template create)ClosedTomáš Strachota02/01/2014Actions
Actions #1

Updated by Tomáš Strachota about 10 years ago

  • Is duplicate of Bug #4232: Can not create template using hammer (hammer template create) added
Actions #2

Updated by Tomáš Strachota about 10 years ago

  • Status changed from New to Duplicate
  • Assignee set to Tomáš Strachota
Actions #3

Updated by Tomáš Strachota about 10 years ago

This has been fixed as #4232. Next hammer release will contain the fix.

Actions

Also available in: Atom PDF