Bug #18923

Hammer- can't remove puppet module from content view by id -- uuid is sent instead

Added by Andrew Kofink 5 months ago. Updated 5 months ago.

Status:Closed
Priority:Normal
Assigned To:Andrew Kofink
Category:Content Views
Target version:Team Brad - Iteration 13
Difficulty: Pull request:https://github.com/Katello/hammer-cli-katello/pull/496
Bugzilla link:1427260
Story points-
Velocity based estimate-
ReleaseKatello 3.4.0Release relationshipAuto

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1427260
Description of problem:

Can't remove puppet module from content view by id using hammer. According to hammer debug, uuid is sent instead of id:
>[ INFO 2017-02-27 12:29:08 HammerCLIKatello::ContentView] Called with options: {}
> [ INFO 2017-02-27 12:29:08 HammerCLIKatello::ContentViewPuppetModule] Called with options: {}
> [ INFO 2017-02-27 12:29:08 API] Server: https://localhost/
> [ INFO 2017-02-27 12:29:08 API] GET /katello/api/content_views/118/content_view_puppet_modules
> [DEBUG 2017-02-27 12:29:08 API] Params: {
> "uuid" => "44"
>}
>[DEBUG 2017-02-27 12:29:08 API] Headers: {
> :params => {
> "uuid" => "44"
> }
>}
Also it is not clear what exactly id should be used, the one from global `puppet-module list` command output, like it is done for `content-view puppet-module add`, or from the `content-view info` output. However, both doesn't allow to remove puppet module. --name and --uuid parameters work as expected.
> # hammer -v content-view info --id 121
> Puppet Modules:
> 1) ID: 46
> UUID: 2de63c7f-d0fb-4a29-b301-449a52c026d7
> Name: generic_1
> # hammer -v content-view puppet-module remove --content-view-id="121" --id="46" 
> [ERROR 2017-02-27 12:05:29 Exception] Error: content_view_puppet_module not found
> Couldn't remove puppet module from the content view:
> Error: content_view_puppet_module not found
> # hammer -v  puppet-module list
> ID,Name,Author,Version,Uuid
> 3,generic_1,robottelo,0.2.0,2de63c7f-d0fb-4a29-b301-449a52c026d7
> hammer -v content-view puppet-module remove --content-view-id="121" --id="3" 
> [ERROR 2017-02-27 12:07:48 Exception] Error: content_view_puppet_module not found
> Couldn't remove puppet module from the content view:
> Error: content_view_puppet_module not found
Version-Release number of selected component (if applicable):
Satellite 6.2.8 Snap 3.0:
  • satellite-6.2.8-1.0.el7sat.noarch
  • foreman-1.11.0.66-2.el7sat.noarch
  • katello-3.0.0-17.el7sat.noarch
How reproducible:
Always
Steps to Reproduce:
1. Create Content View
2. Create puppet repo with modules
3. Associate puppet module with CV using `hammer content-view puppet-module add`
4. Try to remove using `hammer content-view puppet-module remove --id`
Actual results:
Exception is raised.
Expected results:
Puppet module should removed.
Additional info:

Associated revisions

Revision 954a560a
Added by Andrew Kofink 5 months ago

Fixes #18923 - Allow ID in puppet module remove (#496)

Allow passing puppet module ID or UUID to remove a puppet module from
a content view

History

#1 Updated by Andrew Kofink 5 months ago

  • Subject changed from Hammer- can't remove puppet module from content view by id -- uuid is sent instead to Hammer- can't remove puppet module from content view by id -- uuid is sent instead
  • Target version set to Team Brad - Iteration 12

#2 Updated by Andrew Kofink 5 months ago

  • Assigned To set to Andrew Kofink

#3 Updated by Brad Buckingham 5 months ago

  • Target version changed from Team Brad - Iteration 12 to Team Brad - Iteration 13

#4 Updated by The Foreman Bot 5 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/hammer-cli-katello/pull/496 added

#5 Updated by Walden Raines 5 months ago

  • Release set to Katello 3.4.0

#6 Updated by Anonymous 5 months ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF