Bug 1328976 - hammer template info doesn't show whether the template is locked
Summary: hammer template info doesn't show whether the template is locked
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Marek Hulan
QA Contact: Katello QA List
URL:
Whiteboard:
: 1333753 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-20 19:19 UTC by Elyézer Rezende
Modified: 2019-11-14 07:50 UTC (History)
8 users (show)

Fixed In Version: rubygem-hammer_cli_foreman-0.5.1.7-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 11:05:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 14943 0 None None None 2016-05-11 18:13:12 UTC

Description Elyézer Rezende 2016-04-20 19:19:22 UTC
Description of problem:
Previously (Satellite 6.1) hammer template create raised an issue every time a locked template was created, but now it is accepting. That said it seems to be a regression, if not then the info output should present if that template is locked or not.

Version-Release number of selected component (if applicable):
satellite-6.2.0-8.2.beta.el7sat.noarch

How reproducible:
Always

Steps to Reproduce:
1. Run: hammer template create --name="<name>" --file="<path to file>" --type="user_data" --locked="true"

Actual results:
The locked template is created

Expected results:
If locked template creation is allowed then the hammer template info should print out the information. If the behavior is expected to be the same, not being able to create a locked template, then the create command should fail and inform the user or even better the locked option should not even be listed as valid options.

Additional info:

$ LANG=en_US.UTF-8  hammer -v -u admin -p changeme --output=csv template create --name="BhCgsYHMDB" --file="/tmp/iiu3RZiWH1" --type="user_data" --locked="true"
Message,Id,Name
Config template created,198,BhCgsYHMDB

$ LANG=en_US.UTF-8  hammer -v -u admin -p changeme  template info --id="198"
Id:                198
Name:              BhCgsYHMDB
Type:              user_data
Operating systems:

Comment 5 Stephen Benjamin 2016-04-21 16:12:05 UTC
Definitely not a regression, this is a bug fix. Previously you could not create locked templates in one step, but that was fixed in http://projects.theforeman.org/issues/11619.

But we're not showing that information in info, so that's a bug for sure.

Comment 6 Stephen Benjamin 2016-05-11 18:12:24 UTC
*** Bug 1333753 has been marked as a duplicate of this bug. ***

Comment 8 Bryan Kearney 2016-05-23 19:21:55 UTC
verified
version tested: satellite-6.2.0-12.1.el7sat.noarch
Steps to verify:

[vagrant@sat-test-rhel7 ~]$ hammer -u admin -p changeme template create --name "bk_test" --file "/home/vagrant/bk" --type="user_data" --locked="true"
Config template created
[vagrant@sat-test-rhel7 ~]$ hammer -u admin -p changeme template info --id 98
Id:                98
Name:              bk_test
Type:              user_data
Locked:            yes
Operating systems:

Comment 9 Bryan Kearney 2016-07-27 11:05:17 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/RHBA-2016:1501


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