Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #37917 - Search by title for registration parameters #10351

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

stejskalleos
Copy link
Contributor

@stejskalleos stejskalleos commented Oct 16, 2024

Parameters:

  • Organization
  • Location
  • Host group
  • Operating System

Inspired by https://github.com/Katello/katello-client-bootstrap

@stejskalleos stejskalleos changed the title Fixes #37917 - Search by title for for registration parameters Fixes #37917 - Search by title for registration parameters Oct 16, 2024
@adamruzicka
Copy link
Contributor

This would be a nice quality of life improvement.

Thinking out loud, take with a grain of salt:
At the same time, (afaik) our api accepts only ids almost everywhere. Hammer can do the resolution for you, if you're doing your own scripts then you can script around a bit to resolve names to ids yourself. I'm a little bit worried that introducing title or id lookup in a single endpoint would force us to implement it everywhere, otherwise the other endpoints would appear inconsistent and incomplete in comparison. Was this planned to be a first step or the whole thing?

@stejskalleos
Copy link
Contributor Author

At the same time, (afaik) our api accepts only ids almost everywhere. Hammer can do the resolution for you

The main idea behind this feature is to improve users' transition from Katello bootstrap to Global Registration. With the bootstrap script, you could easily use titles, but with the generated GR command, you cannot. Hammer might be the answer if you have access and permission to use it, which might only always be the case.
For example, a Satellite admin will create one command, which they then distribute among their colleagues for registration purposes.

I'm a little bit worried that introducing title or id lookup in a single endpoint would force us to implement it everywhere

I hope this PR won't create a precedent for it.

Was this planned to be a first step or the whole thing?

This is the whole thingy.

I know the RegistrationController is in the API module, but it's kinda a special kid on the block; for generating registration commands via API, we still use the _id parameters.

@stejskalleos stejskalleos marked this pull request as ready for review November 6, 2024 09:33
@stejskalleos
Copy link
Contributor Author

@ShimShtein updated, now using friendly_id

Parameters:
* Organization
* Location
* Host group
* Operating System
@stejskalleos
Copy link
Contributor Author

Failing tests are not related, more in #10377

@stejskalleos stejskalleos merged commit a0e75a2 into theforeman:develop Nov 19, 2024
37 of 52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants