Project

General

Profile

Actions

Bug #18923

closed

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

Added by Andrew Kofink about 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Content Views
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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:
Actions #1

Updated by Andrew Kofink about 7 years 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 178
Actions #2

Updated by Andrew Kofink almost 7 years ago

  • Assignee set to Andrew Kofink
Actions #3

Updated by Brad Buckingham almost 7 years ago

  • Target version changed from 178 to 181
Actions #4

Updated by The Foreman Bot almost 7 years ago

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

Updated by Walden Raines almost 7 years ago

  • translation missing: en.field_release set to 211
Actions #6

Updated by Anonymous almost 7 years ago

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

Also available in: Atom PDF