Project

General

Profile

Bug #15604

Cannot create new content view

Added by Andrew Kofink over 2 years ago. Updated 8 months ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Hammer
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1353471
Description of problem:
It is impossible to create new content view entity:

hammer -v -u admin -p changeme --output=csv content-view create --organization-id="13" --name="AGBAiBtAVT"

[ERROR 2016-07-07 04:29:10 Exception] Error: undefined method `include?' for nil:NilClass
Could not create the content view:
Error: undefined method `include?' for nil:NilClass
[ERROR 2016-07-07 04:29:10 Exception]

NoMethodError (undefined method `include?' for nil:NilClass):
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.0.22.18/lib/hammer_cli_katello/id_resolver.rb:103:in `block in repository_ids'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.0.22.18/lib/hammer_cli_katello/id_resolver.rb:103:in `select'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.0.22.18/lib/hammer_cli_katello/id_resolver.rb:103:in `repository_ids'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1.9/lib/hammer_cli_foreman/commands.rb:166:in `get_resource_ids'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1.9/lib/hammer_cli_foreman/commands.rb:232:in `block in customized_options'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1.9/lib/hammer_cli_foreman/commands.rb:229:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1.9/lib/hammer_cli_foreman/commands.rb:229:in `customized_options'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1.9/lib/hammer_cli_foreman/commands.rb:244:in `request_params'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.0.22.18/lib/hammer_cli_katello/content_view.rb:104:in `request_params'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.11/lib/hammer_cli/apipie/command.rb:43:in `send_request'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1.9/lib/hammer_cli_foreman/commands.rb:190:in `send_request'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.11/lib/hammer_cli/apipie/command.rb:34: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.11/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.11/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.11/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.11/bin/hammer:125:in `<top (required)>'
/usr/bin/hammer:23:in `load'
/usr/bin/hammer:23:in `<main>

Version-Release number of selected component (if applicable):
6.2 SNAP 19

How reproducible:
Always

Steps to Reproduce:
Provided in description

Actual results:
Error is raised when we try to create new content view

Expected results:
Entity is created successfully

Additional info:

Associated revisions

Revision 6feaf353 (diff)
Added by Andrew Kofink over 2 years ago

Fixes #15604 - Handle nil repo list in repo_ids

This change allows the `repository_ids` ID resolver to handle a nil
collection of repository names.

Revision 7994ee03
Added by Andrew Kofink over 2 years ago

Merge pull request #418 from akofink/15604

Fixes #15604 - Handle nil repo list in repo_ids

History

#1 Updated by Andrew Kofink over 2 years ago

  • Assignee set to Andrew Kofink

#2 Updated by The Foreman Bot over 2 years ago

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

#3 Updated by Andrew Kofink over 2 years ago

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

#4 Updated by Justin Sherrill over 2 years ago

  • Legacy Backlogs Release (now unused) set to 162

Also available in: Atom PDF