Bug 1476224 - Creating SSH Key in User Template functionality missing in hammer CLI
Creating SSH Key in User Template functionality missing in hammer CLI
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Users & Roles (Show other bugs)
6.3.0
Unspecified Unspecified
unspecified Severity high (vote)
: GA
: --
Assigned To: Martin Bacovsky
Jitendra Yejare
: Triaged
Depends On:
Blocks: 1493109 1473944
  Show dependency treegraph
 
Reported: 2017-07-28 06:38 EDT by Jitendra Yejare
Modified: 2018-02-21 12:03 EST (History)
9 users (show)

See Also:
Fixed In Version: rubygem-hammer_cli_foreman-0.11.0.4
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-02-21 12:03:56 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 20476 None None None 2017-08-01 09:54 EDT
Foreman Issue Tracker 20986 None None None 2017-09-19 02:30 EDT
Foreman Issue Tracker 21299 None None None 2017-10-11 08:09 EDT
Github theforeman/foreman/pull/4855 None None None 2017-10-30 12:02 EDT
Github theforeman/foreman/pull/4907 None None None 2017-10-30 12:02 EDT
Github theforeman/hammer-cli-foreman/pull/329 None None None 2017-10-30 12:03 EDT
Github theforeman/hammer-cli-foreman/pull/334 None None None 2017-10-30 12:03 EDT

  None (edit)
Description Jitendra Yejare 2017-07-28 06:38:33 EDT
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 09:54:36 EDT
Created redmine issue http://projects.theforeman.org/issues/20476 from this bug
Comment 3 pm-sat@redhat.com 2017-09-18 16:03:33 EDT
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 05:36:58 EDT
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 pm-sat@redhat.com 2017-10-05 06:05:48 EDT
Upstream bug assigned to tstrachota@redhat.com
Comment 8 pm-sat@redhat.com 2017-10-06 10:17:44 EDT
Upstream bug assigned to tstrachota@redhat.com
Comment 11 pm-sat@redhat.com 2017-10-11 08:09:49 EDT
Upstream bug assigned to mbacovsk@redhat.com
Comment 12 pm-sat@redhat.com 2017-10-11 08:09:53 EDT
Upstream bug assigned to mbacovsk@redhat.com
Comment 13 pm-sat@redhat.com 2017-10-11 10:11:46 EDT
Upstream bug assigned to mbacovsk@redhat.com
Comment 14 pm-sat@redhat.com 2017-10-11 10:11:50 EDT
Upstream bug assigned to mbacovsk@redhat.com
Comment 15 Jitendra Yejare 2017-11-21 08:42:25 EST
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 12:03:56 EST
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.