Project

General

Profile

Actions

Bug #24903

open

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

Added by John Mitsch over 5 years ago. Updated over 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Hammer
Target version:
Difficulty:
Triaged:
Yes
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 1 (1 open0 closed)

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

Updated by Andrew Kofink over 5 years ago

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

Updated by Jonathon Turel over 5 years ago

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

Updated by Christine Fouant over 5 years ago

  • Target version changed from Katello 3.10.0 to Katello Backlog
Actions

Also available in: Atom PDF