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 1476224 - Creating SSH Key in User Template functionality missing in hammer CLI
Summary: Creating SSH Key in User Template functionality missing in hammer CLI
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Users & Roles
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Martin Bacovsky
QA Contact: Jitendra Yejare
URL:
Whiteboard:
Depends On:
Blocks: 1473944 1493109
TreeView+ depends on / blocked
 
Reported: 2017-07-28 10:38 UTC by Jitendra Yejare
Modified: 2019-08-12 14:04 UTC (History)
9 users (show)

Fixed In Version: rubygem-hammer_cli_foreman-0.11.0.4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 17:03:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 20476 0 Normal Closed Creating SSH Key in User Template functionality missing in hammer CLI 2020-02-24 09:22:37 UTC
Foreman Issue Tracker 20986 0 Normal Closed user_id parameter in ssh key create action is wrongly documented 2020-02-24 09:22:37 UTC
Foreman Issue Tracker 21299 0 Normal Closed documentation of user_id in ssh_keys API controller is wrong 2020-02-24 09:22:37 UTC
Github theforeman foreman pull 4855 0 None closed Fixes #20986 - wrongly documented :user_id in ssh_keys#create 2020-02-24 09:22:38 UTC
Github theforeman foreman pull 4907 0 None closed Fixes #21299 - Make user_id required 2020-02-24 09:22:37 UTC
Github theforeman hammer-cli-foreman pull 329 0 None closed Fixes #20476 - Add ssh-keys commands 2020-02-24 09:22:37 UTC
Github theforeman hammer-cli-foreman pull 334 0 None closed Refs #20476 - Add show command for ssh-keys 2020-02-24 09:22:37 UTC

Description Jitendra Yejare 2017-07-28 10:38:33 UTC
Description of problem:
Creating/Deleting/Viewing/Listing SSH Key in user template functionality is completely missing from hammer CLI

Version-Release number of selected component (if applicable):
Satellite 6.3 Snap 7

How reproducible:


Steps to Reproduce:
1. Create User with required details
2. From Hammer, Attempt to add ssh key in above user
3.

Actual results:
No provision to create/delete/view/list the ssh keys from CLI hammer in user template

Expected results:
Hammer CLI should have provision to create/view/list/delete the ssh key in user template

Additional info:
Functionality is available from API

Comment 2 Daniel Lobato Garcia 2017-08-01 13:54:36 UTC
Created redmine issue http://projects.theforeman.org/issues/20476 from this bug

Comment 3 Satellite Program 2017-09-18 20:03:33 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20476 has been resolved.

Comment 4 Jitendra Yejare 2017-10-05 09:36:58 UTC
Failed QA!

Satellite 6.3.0 snap 18.0

I don't see any ssh-key option either in:
-> hammer user
-> hammer user create
-> hammer user update
-> hammer ssh-key

So, failing this bug.

Comment 5 Satellite Program 2017-10-05 10:05:48 UTC
Upstream bug assigned to tstrachota

Comment 8 Satellite Program 2017-10-06 14:17:44 UTC
Upstream bug assigned to tstrachota

Comment 11 Satellite Program 2017-10-11 12:09:49 UTC
Upstream bug assigned to mbacovsk

Comment 12 Satellite Program 2017-10-11 12:09:53 UTC
Upstream bug assigned to mbacovsk

Comment 13 Satellite Program 2017-10-11 14:11:46 UTC
Upstream bug assigned to mbacovsk

Comment 14 Satellite Program 2017-10-11 14:11:50 UTC
Upstream bug assigned to mbacovsk

Comment 15 Jitendra Yejare 2017-11-21 13:42:25 UTC
Verified !

@ Satellite 6.3 snap 25

Commands are available to add, delete, info and list the ssh-key:

```
# hammer user ssh-keys --help
Usage:
    hammer user ssh-keys [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    subcommand
 [ARG] ...                     subcommand arguments

Subcommands:
 add                           Create an SSH key for a user
 delete                        Delete an SSH key for a user
 info                          Show an SSH key from a user
 list                          List all SSH keys for a user

Options:
 -h, --help                    print help
```

Each option is tested thoroughly and all works nicely.


The only gap I see in CLI compare to UI is,

While creating an ssh-key in user UI automatically populates the ssh-key name from ssh-key. But CLI hammer doesn't and asks for name compulsory. It would be nice to drag that functionality from UI to CLI.
But anyhow that doesn't block this bug from verification.

Comment 16 Bryan Kearney 2018-02-21 17:03:56 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.