Bug #8583
closedCannot add a puppet module to a content view by name
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1162799
Description of problem:
Trying to add a puppet module to a content view by name fails while using the puppet module id works.
Version-Release number of selected component (if applicable):
hammer (0.1.3)
* hammer_cli_import (0.10.4)
* hammer_cli_katello (0.0.6)
* hammer_cli_foreman (0.1.3)
How reproducible:
Aways
Steps to Reproduce:
1. Create a repository and synchronize it
2. Create a content view
3. List the puppet modules and choose one
4. Try to add a puppet module to a content view by its name
Actual results:
The command fail with the following error message:
Error: content_view_puppet_module not found
Could not add the puppet module:
Error: content_view_puppet_module not found
Expected results:
The puppet module added to the content view
Additional info:
Adding by name
--------------
- LANG=en_US.UTF-8 hammer -v -u admin -p changeme --output csv puppet-module list --repository-id='157'
ID,Name,Author,Version
81b2c255-22db-48ba-951d-b48bbf2e374c,pureftpd,5UbZ3r0,1.0.2
b3d6fcdd-72ba-4ca4-a5f3-763b4223f5dd,cron,5UbZ3r0,0.0.1
bd89d01d-84fd-4075-8771-2d8260a50153,ntp,puppetlabs,3.2.1
04d60c64-30b7-4138-9e6a-ee30eb23b221,samba,5UbZ3r0,0.2.0
378e4b76-0f90-4986-bc6f-c13dd2047f05,httpd,5UbZ3r0,0.2.0
- LANG=en_US.UTF-8 hammer -v -u admin -p changeme --output csv content-view puppet-module add --content-view-id='305' --name='samba'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.3/lib/hammer_cli/./apipie/../abstract.rb:67: warning: already initialized constant DEFAULT_LABEL_INDENT
[ERROR 2014-11-11 12:21:34 Exception] Error: content_view_puppet_module not found
Could not add the puppet module:
Error: content_view_puppet_module not found
[ERROR 2014-11-11 12:21:34 Exception]
HammerCLIForeman::ResolverError (content_view_puppet_module not found):
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.3/lib/hammer_cli_foreman/id_resolver.rb:140:in `pick_result'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.3/lib/hammer_cli_foreman/id_resolver.rb:136:in `find_resource'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.3/lib/hammer_cli_foreman/id_resolver.rb:114:in `get_id'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.3/lib/hammer_cli_foreman/id_resolver.rb:108:in `content_view_puppet_module_id'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.3/lib/hammer_cli_foreman/commands.rb:143:in `send'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.3/lib/hammer_cli_foreman/commands.rb:143:in `get_resource_id'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.3/lib/hammer_cli_foreman/commands.rb:132:in `get_identifier'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.3/lib/hammer_cli_foreman/commands.rb:180:in `customized_options'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.3/lib/hammer_cli_foreman/commands.rb:185:in `request_params'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_katello-0.0.6/lib/hammer_cli_katello/content_view_puppet_module.rb:35:in `request_params'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.3/lib/hammer_cli/./apipie/command.rb:42:in `send_request'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.3/lib/hammer_cli_foreman/commands.rb:164:in `send_request'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.3/lib/hammer_cli/./apipie/command.rb:33:in `execute'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:68:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.3/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:68:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.3/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:68:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.3/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:68:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.3/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:126:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.3/bin/hammer:106
/usr/bin/hammer:19:in `load'
/usr/bin/hammer:19
Adding by ID
------------
- LANG=en_US.UTF-8 hammer -v -u admin -p changeme --output csv puppet-module list --repository-id='159'
ID,Name,Author,Version
81b2c255-22db-48ba-951d-b48bbf2e374c,pureftpd,5UbZ3r0,1.0.2
b3d6fcdd-72ba-4ca4-a5f3-763b4223f5dd,cron,5UbZ3r0,0.0.1
bd89d01d-84fd-4075-8771-2d8260a50153,ntp,puppetlabs,3.2.1
04d60c64-30b7-4138-9e6a-ee30eb23b221,samba,5UbZ3r0,0.2.0
378e4b76-0f90-4986-bc6f-c13dd2047f05,httpd,5UbZ3r0,0.2.0
- LANG=en_US.UTF-8 hammer -v -u admin -p changeme --output csv content-view puppet-module add --content-view-id='309' --id='81b2c255-22db-48ba-951d-b48bbf2e374c'
Message,Id,Name
Puppet module added to content view,5,pureftpd
Updated by Eric Helms about 10 years ago
- Translation missing: en.field_release set to 23
- Triaged changed from No to Yes
Updated by David Davis almost 10 years ago
- Pull request https://github.com/Katello/hammer-cli-katello/pull/260 added
- Pull request deleted (
)
Updated by David Davis almost 10 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset hammer-cli-katello|d08b9834dd43a58104d34311ad485f50649686c1.