Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1462588 - When updating a snippet with hammer and --type parameter is missing the error message says Template kind can't be blank
Summary: When updating a snippet with hammer and --type parameter is missing the error...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning Templates
Version: Unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: Unspecified
Assignee: Tomas Strachota
QA Contact: Nikhil Kathole
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-19 01:53 UTC by Mark Barry
Modified: 2019-08-12 16:36 UTC (History)
6 users (show)

Fixed In Version: hammer-cli-foreman 0.11
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:54:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 20145 0 Normal Closed Updating a snippet requires template kind 2020-03-23 12:43:25 UTC

Description Mark Barry 2017-06-19 01:53:02 UTC
Description of problem:
Incorrect parameter name (kind) listed for `hammer template update` command when type parameter is missing.

Version-Release number of selected component (if applicable):
hammer --version
hammer (0.10.0)
 * hammer_cli_foreman (0.10.0)
 * hammer_cli_foreman_bootdisk (0.1.3)
 * hammer_cli_foreman_docker (unknown version)
 * hammer_cli_foreman_tasks (unknown version)
 * hammer_cli_import (0.11.3)
 * hammer_cli_katello (0.10.0)


How reproducible:
100%

Steps to Reproduce:
1. hammer -p password template update --name "pxelinux_discovery" --locked false

Actual results:
Could not update the provisioning template:
  Template kind can't be blank


Expected results:
Could not update the provisioning template:
  Template type can't be blank


Additional info:
On the /templates/provisioning_templates (Provisioning Templates) web page, the headings include Kind and Snippet, which represents the Type parameter.
To me, it would make sense to also update the web interface to have Type as the header, so that the two interfaces are consistent.

Comment 2 Tomas Strachota 2017-06-28 14:04:10 UTC
This happens only when updating snippets. The message is incorrect but the main issue here is that the kind parameter shouldn't be required at all.

I updated the title accordingly.

Comment 3 Satellite Program 2017-06-29 10:01:50 UTC
Upstream bug assigned to tstrachota

Comment 4 Satellite Program 2017-06-29 10:01:54 UTC
Upstream bug assigned to tstrachota

Comment 5 Satellite Program 2017-06-30 16:01:46 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20145 has been resolved.

Comment 6 Nikhil Kathole 2017-09-24 09:53:48 UTC
VERIFIED

Version Tested:
Satellite-6.3 Snap 17

steps:

# hammer template create --name test --type snippet --file test.erb 
Provisioning template created
# hammer template update --name test --locked true
Provisioning template updated
# hammer template update --name test --locked false
Provisioning template updated
# hammer template update --name "pxelinux_discovery" --locked false
Provisioning template updated

Successfully updated template when kind parameter in UI is missing.

Comment 7 Satellite Program 2018-02-21 16:54:37 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.
> > 
> > For information on the advisory, and where to find the updated files, follow the link below.
> > 
> > If the solution does not work for you, open a new bug report.
> > 
> > https://access.redhat.com/errata/RHSA-2018:0336


Note You need to log in before you can comment on or make changes to this bug.