Project

General

Profile

Bug #4560

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

Added by Og Maciel almost 8 years ago. Updated almost 8 years ago.

Status:
Duplicate
Priority:
Normal
Category:
Foreman commands (obsolete)
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
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

Is duplicate of Hammer CLI - Bug #4232: Can not create template using hammer (hammer template create)Closed2014-02-01

History

#1 Updated by Tomáš Strachota almost 8 years ago

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

#2 Updated by Tomáš Strachota almost 8 years ago

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

#3 Updated by Tomáš Strachota almost 8 years ago

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

Also available in: Atom PDF