Project

General

Profile

Feature #13519

Inconsistent naming in search and output when searching on smart class parameters

Added by Ewoud Kohl van Wijngaarden almost 4 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

As a user I'd like to search /api/smart_class_parameters/ for puppet class name and parameter name so I don't have to iterate all values.

$ curl -u user -k https://foreman.example.org/api/smart_class_parameters/?search=parameter%3Dapache_name
Enter host password for user 'api':
{
  "error": {"message":"Field 'parameter' not recognized for searching!","class":"ScopedSearch::QueryNotSupported"}
}

Related issues

Related to Hammer CLI - Feature #13260: RFE : allowing hammer-cli to search/update sc-parametersNew2016-01-18

Associated revisions

Revision 9734f1f3 (diff)
Added by Shlomi Zadok almost 4 years ago

Fixes #13519 - Alias lookupkey key to parameter

Revision 8c35b65e (diff)
Added by Shlomi Zadok almost 4 years ago

Fixes #13519 - Alias lookupkey key to parameter

(cherry picked from commit 9734f1f395b38a5b4920086bb287ea5857704df3)

History

#1 Updated by Ewoud Kohl van Wijngaarden almost 4 years ago

  • Related to Feature #13260: RFE : allowing hammer-cli to search/update sc-parameters added

#2 Updated by Ori Rabin almost 4 years ago

Did you try curl -u user -k https://foreman.example.org/api/smart_class_parameters/?search=key%3Dapache_name ?
In the UI it also shows key and not parameter but it searches on the same field.
If this works for you please change this to a bug for inconsistent naming in search and output.

#3 Updated by Ewoud Kohl van Wijngaarden almost 4 years ago

  • Subject changed from Allow searching on smart class parameters to Inconsistent naming in search and output when searching on smart class parameters

You're right, that does work.

#4 Updated by Ewoud Kohl van Wijngaarden almost 4 years ago

Ori: do you have a similar trick to search for the puppet class name?

#5 Updated by Ori Rabin almost 4 years ago

'puppetclass' should be searchable: smart_class_parameters?search=puppetclass%3Dapache

#6 Updated by The Foreman Bot almost 4 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Shlomi Zadok
  • Pull request https://github.com/theforeman/foreman/pull/3215 added

#7 Updated by Ori Rabin almost 4 years ago

  • Status changed from Ready For Testing to Closed

#8 Updated by Dominic Cleal almost 4 years ago

  • Legacy Backlogs Release (now unused) set to 71

Also available in: Atom PDF