Skip to content

Commit

Permalink
Fixes #38158 - restrict repositories to RHEL 10 (Katello#11286)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianballou authored Jan 23, 2025
1 parent 775218f commit 5f06aa5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/models/katello/root_repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ class RootRepository < Katello::Model
RHEL7 = 'rhel-7'.freeze
RHEL8 = 'rhel-8'.freeze
RHEL9 = 'rhel-9'.freeze
ALLOWED_OS_VERSIONS = [RHEL6, RHEL7, RHEL8, RHEL9].freeze
RHEL10 = 'rhel-10'.freeze
ALLOWED_OS_VERSIONS = [RHEL6, RHEL7, RHEL8, RHEL9, RHEL10].freeze

MIRRORING_POLICY_ADDITIVE = 'additive'.freeze
MIRRORING_POLICY_CONTENT = 'mirror_content_only'.freeze
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ angular
this.getOSVersionsOptions = function () {
return [
{ name: 'No restriction', id: '' },
{ name: 'Red Hat Enterprise Linux 10 ', id: 'rhel-10' },
{ name: 'Red Hat Enterprise Linux 9 ', id: 'rhel-9' },
{ name: 'Red Hat Enterprise Linux 8 ', id: 'rhel-8' },
{ name: 'Red Hat Enterprise Linux 7 ', id: 'rhel-7' },
Expand Down
2 changes: 1 addition & 1 deletion test/models/root_repository_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_invalid_os_versions
assert_not_valid @root
assert_equal @root.errors.full_messages, [
"Os versions invalid: Repositories can only require one OS version.",
"Os versions must be one of: rhel-6, rhel-7, rhel-8, rhel-9",
"Os versions must be one of: rhel-6, rhel-7, rhel-8, rhel-9, rhel-10",
]
end

Expand Down

0 comments on commit 5f06aa5

Please sign in to comment.