foreman icon indicating copy to clipboard operation
foreman copied to clipboard

Fixes #37440 - Enable multiple repositories for host registration

Open nadjaheitmann opened this issue 1 year ago • 2 comments

Some operating systems do not ship all required packages and need additional repositories to make the host registration work. Therefore, users need to provide more than one repository in order to make the host registration work.

In this PR, we replace the existing text fields for the repository and the gpg key that can be entered for host registration with a modal. The modal contains a list where repository entries can be added and removed from.

image image

The API takes a struct array with repository and GPG key URL instead of two separate values per entry. The GPG key URL entry on the UI is optional. If only a GPG key URL is entered, the entry is ignored.

nadjaheitmann avatar May 13 '24 13:05 nadjaheitmann

One thing that needs improvement is the alignment of the header and the input fields inside the modal. Any hints how to do this best are highly appreciated.

nadjaheitmann avatar May 14 '24 11:05 nadjaheitmann

I did some tests for AlmaLinux, SLES and Ubuntu. On my tests the rendered global_registration.erb added the provided repositories as expected (with or without GPG key).

goarsna avatar May 16 '24 12:05 goarsna

Thanks a lot @goarsna , @Manisha15 and @MariaAga

nadjaheitmann avatar May 17 '24 08:05 nadjaheitmann

@stejskalleos Could you re-trigger the tests? Some of them were cancelled for some reason.

nadjaheitmann avatar May 21 '24 10:05 nadjaheitmann

I again had a look at the changes and again did tests (with Ubuntu and AlmaLinux) with adding two repositories during registration. The repositories were added as expected and the repository modal was behaving as expected. => LGTM

Regarding the failing test: Could the it be caused by a timeout or hickup as it only says "operating was canceled"?

goarsna avatar May 21 '24 10:05 goarsna