Project

General

Profile

Bug #20761

`content-view filter rule info` does not resolve by name with multiple rules on a filter

Added by Andrew Kofink about 4 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Content Views
Target version:

Description

$ hammer -vd content-view filter rule info --content-view-filter-id 3 --name rule2
[ INFO 2017-08-28T14:17:15 Init] Initialization of Hammer CLI (0.12.pre.develop) has started...
[DEBUG 2017-08-28T14:17:15 Init] Running at ruby 2.3.1-p112
[ INFO 2017-08-28T14:17:15 Init] Configuration from the file /home/vagrant/.hammer/cli_config.yml has been loaded
[ INFO 2017-08-28T14:17:15 Init] Configuration from the file /home/vagrant/.hammer/cli.modules.d/csv.yml has been loaded
[ INFO 2017-08-28T14:17:15 Init] Configuration from the file /home/vagrant/.hammer/cli.modules.d/foreman.yml has been loaded
[ INFO 2017-08-28T14:17:15 Init] Configuration from the file /home/vagrant/.hammer/cli.modules.d/foreman_admin.yml has been loaded
[ INFO 2017-08-28T14:17:15 Init] Configuration from the file /home/vagrant/.hammer/cli.modules.d/foreman_admin_logging_core.yml has been loaded
[ INFO 2017-08-28T14:17:15 Init] Configuration from the file /home/vagrant/.hammer/cli.modules.d/foreman_admin_logging_katello.yml has been loaded
[ INFO 2017-08-28T14:17:15 Init] Configuration from the file /home/vagrant/.hammer/cli.modules.d/katello.yml has been loaded
[DEBUG 2017-08-28T14:17:15 SSLoptions] SSL options: {
:ssl_ca_file => "/home/vagrant/.hammer/centos7-devel.example.com.crt",
:verify_ssl => false
}
[DEBUG 2017-08-28T14:17:15 API] Global headers: {
:content_type => "application/json",
:accept => "application/json;version=2",
"Accept-Language" => "en"
}
[DEBUG 2017-08-28T14:17:15 API] Follow redirects: never
[DEBUG 2017-08-28T14:17:15 Connection] Registered: foreman
[ INFO 2017-08-28T14:17:15 Modules] Extension module hammer_cli_csv (2.3.0) loaded
[ INFO 2017-08-28T14:17:15 Modules] Extension module hammer_cli_foreman (0.12.pre.develop) loaded
[ INFO 2017-08-28T14:17:15 Modules] Extension module hammer_cli_foreman_admin (0.0.6) loaded
[ INFO 2017-08-28T14:17:15 HammerCLI::MainCommand] subcommand organization (HammerCLIForeman::Organization) was removed.
[ INFO 2017-08-28T14:17:15 HammerCLI::MainCommand] subcommand organization (HammerCLIKatello::Organization) was created.
[ INFO 2017-08-28T14:17:16 Modules] Extension module hammer_cli_katello (0.10.2) loaded
[DEBUG 2017-08-28T14:17:16 Init] Using locale 'en'
[DEBUG 2017-08-28T14:17:16 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/home/vagrant/hammer-cli/locale'
[DEBUG 2017-08-28T14:17:16 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/home/vagrant/hammer-cli-foreman/locale'
[DEBUG 2017-08-28T14:17:16 Init] 'mo' files for locale domain 'hammer-cli-csv' loaded from '/home/vagrant/hammer-cli-csv/locale'
[DEBUG 2017-08-28T14:17:16 Init] 'mo' files for locale domain 'hammer-cli-katello' loaded from '/home/vagrant/hammer-cli-katello/locale'
[ INFO 2017-08-28T14:17:16 HammerCLI::MainCommand] Called with options: {"option_verbose"=>true, "option_debug"=>true}
[ INFO 2017-08-28T14:17:16 HammerCLIKatello::ContentView] Called with options: {}
[ INFO 2017-08-28T14:17:16 HammerCLIKatello::Filter] Called with options: {}
[ INFO 2017-08-28T14:17:16 HammerCLIKatello::FilterRule] Called with options: {}
[ INFO 2017-08-28T14:17:16 HammerCLIKatello::FilterRule::InfoCommand] Called with options: {"option_name"=>"rule2", "option_content_view_filter_id"=>3}
[ INFO 2017-08-28T14:17:16 API] Server: https://centos7-devel.example.com:443
[ INFO 2017-08-28T14:17:16 API] GET /katello/api/content_view_filters/3/rules
[DEBUG 2017-08-28T14:17:16 API] Params: {
"name" => "rule2"
}
[DEBUG 2017-08-28T14:17:16 API] Headers: {
:params => {
"name" => "rule2"
}
}
[DEBUG 2017-08-28T14:17:16 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
[DEBUG 2017-08-28T14:17:16 API] Response: {
"total" => 2,
"subtotal" => 2,
"page" => nil,
"per_page" => nil,
"error" => nil,
"search" => nil,
"sort" => {
"by" => nil,
"order" => nil
},
"results" => [
[0] {
"content_view_filter_id" => 3,
"version" => "1",
"id" => 12,
"name" => "rule1",
"created_at" => "2017-08-28 13:54:33 UTC",
"updated_at" => "2017-08-28 13:54:33 UTC"
},
[1] {
"content_view_filter_id" => 3,
"version" => "1",
"architecture" => "x86_64",
"id" => 13,
"name" => "rule2",
"created_at" => "2017-08-28 14:16:22 UTC",
"updated_at" => "2017-08-28 14:16:22 UTC"
}
]
}
[DEBUG 2017-08-28T14:17:16 API] Response headers: {
:date => "Mon, 28 Aug 2017 14:17:16 GMT",
:server => "WEBrick/1.3.1 (Ruby/2.2.4/2015-12-16)",
:foreman_version => "1.17.0-develop",
:foreman_api_version => "2",
:content_type => "application/json; charset=utf-8",
:apipie_checksum => "47d82509aa35b0a6db20d779b1f66bab",
:etag => "W/\"fc8a81e7220a23abc0c15b17c769eccf-gzip\"",
:cache_control => "max-age=0, private, must-revalidate",
:x_request_id => "75f704d2-c775-44ea-8f02-71057d49fe15",
:x_runtime => "0.176160",
:content_security_policy => "default-src 'self'; child-src 'self'; connect-src 'self' ws: wss:; img-src 'self' data: *.gravatar.com; script-src 'unsafe-eval' 'unsafe-inline' 'self'; style-src 'unsafe-inline' 'self'",
:strict_transport_security => "max-age=631152000; includeSubdomains",
:x_content_type_options => "nosniff",
:x_download_options => "noopen",
:x_frame_options => "sameorigin",
:x_permitted_cross_domain_policies => "none",
:x_xss_protection => "1; mode=block",
:set_cookie => [
[0] "_session_id=7967d37824c8140bb94e4335b102ce38; path=/; HttpOnly"
],
:via => "1.1 centos7-devel.example.com",
:vary => "Accept-Encoding",
:content_encoding => "gzip",
:content_length => "223",
:connection => "close"
}
[DEBUG 2017-08-28T14:17:16 Exception] Using exception handler HammerCLIKatello::ExceptionHandler#handle_general_exception
[ERROR 2017-08-28T14:17:16 Exception] Error: found more than one content_view_filter_rule
Error: found more than one content_view_filter_rule
[ERROR 2017-08-28T14:17:16 Exception]

HammerCLIForeman::ResolverError (found more than one content_view_filter_rule):
/home/vagrant/hammer-cli-foreman/lib/hammer_cli_foreman/id_resolver.rb:222:in `pick_result'
/home/vagrant/hammer-cli-foreman/lib/hammer_cli_foreman/id_resolver.rb:181:in `find_resource'
/home/vagrant/hammer-cli-foreman/lib/hammer_cli_foreman/id_resolver.rb:143:in `get_id'
/home/vagrant/hammer-cli-foreman/lib/hammer_cli_foreman/id_resolver.rb:133:in `block (2 levels) in define_id_finders'
/home/vagrant/hammer-cli-foreman/lib/hammer_cli_foreman/commands.rb:130:in `get_resource_id'
/home/vagrant/hammer-cli-foreman/lib/hammer_cli_foreman/commands.rb:119:in `get_identifier'
/home/vagrant/hammer-cli-foreman/lib/hammer_cli_foreman/commands.rb:215:in `customized_options'
/home/vagrant/hammer-cli-foreman/lib/hammer_cli_foreman/commands.rb:220:in `request_params'
/home/vagrant/hammer-cli/lib/hammer_cli/apipie/command.rb:43:in `send_request'
/home/vagrant/hammer-cli-foreman/lib/hammer_cli_foreman/commands.rb:166:in `send_request'
/home/vagrant/hammer-cli-foreman/lib/hammer_cli_foreman/commands.rb:359:in `send_request'
/home/vagrant/hammer-cli/lib/hammer_cli/apipie/command.rb:34:in `execute'
/home/vagrant/.gem/ruby/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
/home/vagrant/hammer-cli/lib/hammer_cli/abstract.rb:29:in `run'
/home/vagrant/.gem/ruby/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
/home/vagrant/.gem/ruby/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
/home/vagrant/hammer-cli/lib/hammer_cli/abstract.rb:29:in `run'
/home/vagrant/.gem/ruby/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
/home/vagrant/.gem/ruby/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
/home/vagrant/hammer-cli/lib/hammer_cli/abstract.rb:29:in `run'
/home/vagrant/.gem/ruby/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
/home/vagrant/.gem/ruby/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
/home/vagrant/hammer-cli/lib/hammer_cli/abstract.rb:29:in `run'
/home/vagrant/.gem/ruby/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
/home/vagrant/.gem/ruby/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
/home/vagrant/hammer-cli/lib/hammer_cli/abstract.rb:29:in `run'
/home/vagrant/.gem/ruby/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
/home/vagrant/hammer-cli/bin/hammer:147:in `<top (required)>'
/home/vagrant/.gem/ruby/bin/hammer:23:in `load'
/home/vagrant/.gem/ruby/bin/hammer:23:in `<top (required)>'
/home/vagrant/.gem/ruby/gems/bundler-1.14.4/lib/bundler/cli/exec.rb:74:in `load'
/home/vagrant/.gem/ruby/gems/bundler-1.14.4/lib/bundler/cli/exec.rb:74:in `kernel_load'
/home/vagrant/.gem/ruby/gems/bundler-1.14.4/lib/bundler/cli/exec.rb:27:in `run'
/home/vagrant/.gem/ruby/gems/bundler-1.14.4/lib/bundler/cli.rb:335:in `exec'
/home/vagrant/.gem/ruby/gems/bundler-1.14.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/home/vagrant/.gem/ruby/gems/bundler-1.14.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/home/vagrant/.gem/ruby/gems/bundler-1.14.4/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/home/vagrant/.gem/ruby/gems/bundler-1.14.4/lib/bundler/cli.rb:20:in `dispatch'
/home/vagrant/.gem/ruby/gems/bundler-1.14.4/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/home/vagrant/.gem/ruby/gems/bundler-1.14.4/lib/bundler/cli.rb:11:in `start'
/home/vagrant/.gem/ruby/gems/bundler-1.14.4/exe/bundle:32:in `block in <top (required)>'
/home/vagrant/.gem/ruby/gems/bundler-1.14.4/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
/home/vagrant/.gem/ruby/gems/bundler-1.14.4/exe/bundle:24:in `<top (required)>'
/home/vagrant/bin/bundle:23:in `load'
/home/vagrant/bin/bundle:23:in `<main>'

Associated revisions

Revision 79fa4884 (diff)
Added by Andrew Kofink about 4 years ago

Fixes #20761 - Allow filter rule search

Support scoped search as for ContentViewFilterRule#index

Revision 8bfa14c7 (diff)
Added by Andrew Kofink about 4 years ago

Refs #20761 - Allow filter rule name search (#508)

History

#1 Updated by John Mitsch about 4 years ago

  • Legacy Backlogs Release (now unused) set to 250

#2 Updated by Andrew Kofink about 4 years ago

  • Assignee set to Andrew Kofink

#3 Updated by The Foreman Bot about 4 years ago

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

#4 Updated by The Foreman Bot about 4 years ago

  • Pull request https://github.com/Katello/hammer-cli-katello/pull/508 added

#5 Updated by Andrew Kofink about 4 years ago

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

#6 Updated by The Foreman Bot about 4 years ago

  • Pull request https://github.com/Katello/hammer-cli-katello/pull/510 added

#7 Updated by Andrew Kofink about 4 years ago

  • Pull request deleted (https://github.com/Katello/hammer-cli-katello/pull/510)

#8 Updated by The Foreman Bot about 4 years ago

  • Pull request https://github.com/Katello/hammer-cli-katello/pull/510 added

Also available in: Atom PDF