Project

General

Profile

Bug #24903

hammer errata (and other unit types) isn't searching on name correctly

Added by John Mitsch about 1 year ago. Updated 11 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Hammer
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

Errata, package groups, and possibly other repo unit types aren't using the search param in the API call to Katello.

hammer -rd erratum info --name Duck_0.8_Erratum --repository-id 1

The API call looks like this:
[ INFO 2018-09-11T19:02:49 API] GET /katello/api/errata
[DEBUG 2018-09-11T19:02:49 API] Params: {
"name" => "Duck_0.8_Erratum"
}
[DEBUG 2018-09-11T19:02:49 API] Headers: {
:params => {
"name" => "Duck_0.8_Erratum"
}
}
[DEBUG 2018-09-11T19:02:49 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
[DEBUG 2018-09-11T19:02:49 API] Response: {
"total" => 6,
"subtotal" => 6,
"page" => 1,
"per_page" => 20,
"error" => nil,
"search" => nil,
"sort" => {
"by" => "updated",
"order" => "desc"

Notice 6 results are found, no searching has been done.

it should look like:

[ INFO 2018-09-11T19:02:49 API] GET /katello/api/errata
[DEBUG 2018-09-11T19:02:49 API] Params: {
"search" => "name = \"Duck_0.8_Erratum\""
}

This can be fixed by adding to https://github.com/Katello/hammer-cli-katello/blob/master/lib/hammer_cli_katello/foreman_search_options_creators.rb


Related issues

Related to Katello - Bug #24921: Repository content (i.e. package, erratum, etc.) ID resolver is insufficient to resolve unique IDsNew

History

#1 Updated by Andrew Kofink about 1 year ago

  • Related to Bug #24921: Repository content (i.e. package, erratum, etc.) ID resolver is insufficient to resolve unique IDs added

#2 Updated by Jonathon Turel about 1 year ago

  • Triaged changed from No to Yes
  • Target version set to Katello 3.10.0

#3 Updated by Christine Fouant 11 months ago

  • Target version changed from Katello 3.10.0 to Katello Backlog

Also available in: Atom PDF