Project

General

Profile

Actions

Bug #14708

closed

hammer fails to remove LCE from a CV if cv_id+org_id or cv_name+org_name are specified

Added by Zach Huntington-Meath about 8 years ago. Updated almost 4 years ago.

Status:
Rejected
Priority:
Normal
Category:
Content Views
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1325113
Description of problem:
Hammer fails to delete a lifecycle environment from content view if content view was specified by both CV id and organization id. Specifying cv id + org id is not mandatory, as cv id is unique and it should be sufficient for determining desired cv, but anyway exception shouldn't be risen when user also includes org id.
Other use cases like specifying only cv id or cv name + org id are working as expected.

Version-Release number of selected component (if applicable):
Sat6.2 Beta Snap6.2

How reproducible:
Always

Steps to Reproduce:
1. Create a content view:
hammer content-view create --organization-id="15" --name="VQnMGNiFIN"
2. Publish it:
hammer content-view publish --id="22"
3. Try to remove default Library lifecycle environment while specifying both content view id and organization id:
hammer content-view remove --id="22" --organization-id="15" --environment-ids="26"

Actual results:
[ERROR 2016-04-08 05:14:20 Exception] Error: undefined method `include?' for nil:NilClass
Could not remove objects from content view:
Error: undefined method `include?' for nil:NilClass
[ERROR 2016-04-08 05:14:20 Exception]

NoMethodError (undefined method `include?' for nil:NilClass):
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.0.22.5/lib/hammer_cli_katello/id_resolver.rb:65:in `block in environment_ids'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.0.22.5/lib/hammer_cli_katello/id_resolver.rb:65:in `select'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.0.22.5/lib/hammer_cli_katello/id_resolver.rb:65:in `environment_ids'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1.3/lib/hammer_cli_foreman/commands.rb:165:in `get_resource_ids'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1.3/lib/hammer_cli_foreman/commands.rb:231:in `block in customized_options'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1.3/lib/hammer_cli_foreman/commands.rb:228:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1.3/lib/hammer_cli_foreman/commands.rb:228:in `customized_options'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1.3/lib/hammer_cli_foreman/commands.rb:243:in `request_params'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.0.22.5/lib/hammer_cli_katello/content_view.rb:183:in `request_params'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.4/lib/hammer_cli/apipie/command.rb:43:in `send_request'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1.3/lib/hammer_cli_foreman/commands.rb:189:in `send_request'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman_tasks-0.0.10/lib/hammer_cli_foreman_tasks/async_command.rb:14:in `execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.4/lib/hammer_cli/abstract.rb:22:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.4/lib/hammer_cli/abstract.rb:22:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.4/lib/hammer_cli/abstract.rb:22:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.4/bin/hammer:125:in `<top (required)>'
/usr/bin/hammer:23:in `load'
/usr/bin/hammer:23:in `<main>'

Expected results:
Lifecycle environment was removed successfully

Additional info:

Actions #1

Updated by Zach Huntington-Meath about 8 years ago

  • Status changed from New to Assigned
  • Assignee set to Zach Huntington-Meath
Actions #2

Updated by The Foreman Bot about 8 years ago

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

Updated by Eric Helms almost 8 years ago

  • translation missing: en.field_release set to 143
Actions #4

Updated by Justin Sherrill almost 8 years ago

  • translation missing: en.field_release changed from 143 to 114
  • Pull request deleted (https://github.com/Katello/hammer-cli-katello/pull/384)
Actions #5

Updated by Andrew Kofink over 5 years ago

  • Status changed from Ready For Testing to Rejected
Actions #6

Updated by Jonathon Turel almost 4 years ago

  • Target version changed from Katello Backlog to Katello Recycle Bin
Actions

Also available in: Atom PDF