CentOS: Deprecate the stream parameter
... because now only CentOS Steam 9 is supported. Change-Id: I9d39f23159505cec8fbcdd055e6c1fed4b995115
This commit is contained in:
parent
41f06f8f7b
commit
a3b1787090
@ -70,10 +70,6 @@
|
||||
# configured.
|
||||
# Defaults to false
|
||||
#
|
||||
# [*stream*]
|
||||
# (Optional) Is this CentOS Stream and should we adjust mirrors.
|
||||
# Defaults to true
|
||||
#
|
||||
# DEPRECATED PARAMS
|
||||
# =================
|
||||
#
|
||||
@ -82,6 +78,10 @@
|
||||
# 'priority' value in yumrepo will be effective.
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*stream*]
|
||||
# (Optional) Is this CentOS Stream and should we adjust mirrors.
|
||||
# Defaults to undef
|
||||
#
|
||||
class openstack_extras::repo::redhat::redhat (
|
||||
$release = $openstack_extras::repo::redhat::params::release,
|
||||
$manage_rdo = true,
|
||||
@ -97,9 +97,9 @@ class openstack_extras::repo::redhat::redhat (
|
||||
$package_require = false,
|
||||
$centos_mirror_url = $openstack_extras::repo::redhat::params::centos_mirror_url,
|
||||
$update_packages = false,
|
||||
$stream = true,
|
||||
# DEPRECATED PARAMS
|
||||
$manage_priorities = undef,
|
||||
$stream = undef,
|
||||
) inherits openstack_extras::repo::redhat::params {
|
||||
|
||||
validate_legacy(String, 'validate_string', $release)
|
||||
@ -118,13 +118,14 @@ class openstack_extras::repo::redhat::redhat (
|
||||
warning('openstack_extras::repo::redhat::redhat::manage_priorities parameter is deprecated and will be removed')
|
||||
}
|
||||
|
||||
if $stream != undef {
|
||||
warning('The stream parmeter has been deprecated and has no effect.')
|
||||
}
|
||||
|
||||
$_repo_defaults = merge($openstack_extras::repo::redhat::params::repo_defaults, $repo_defaults)
|
||||
$_gpgkey_defaults = merge($openstack_extras::repo::redhat::params::gpgkey_defaults, $gpgkey_defaults)
|
||||
|
||||
$centos_major = $stream ? {
|
||||
true => "${facts['os']['release']['major']}-stream",
|
||||
default => $facts['os']['release']['major']
|
||||
}
|
||||
$centos_major = "${facts['os']['release']['major']}-stream"
|
||||
|
||||
anchor { 'openstack_extras_redhat': }
|
||||
|
||||
@ -132,8 +133,8 @@ class openstack_extras::repo::redhat::redhat (
|
||||
$release_cap = capitalize($release)
|
||||
|
||||
$rdo_baseurl = $facts['os']['release']['major'] ? {
|
||||
'9' => "${centos_mirror_url}/SIGs/${centos_major}/cloud/\$basearch/openstack-${release}/",
|
||||
default => "${centos_mirror_url}/centos/${centos_major}/cloud/\$basearch/openstack-${release}/"
|
||||
'9' => "${centos_mirror_url}/SIGs/\$stream/cloud/\$basearch/openstack-${release}/",
|
||||
default => "${centos_mirror_url}/centos/\$stream/cloud/\$basearch/openstack-${release}/"
|
||||
}
|
||||
|
||||
$rdo_hash = {
|
||||
@ -169,9 +170,9 @@ class openstack_extras::repo::redhat::redhat (
|
||||
}
|
||||
|
||||
if $stream {
|
||||
$virt_baseurl = "${centos_mirror_url}/centos/${centos_major}/virt/\$basearch/advancedvirt-common/"
|
||||
$virt_baseurl = "${centos_mirror_url}/centos/\$stream/virt/\$basearch/advancedvirt-common/"
|
||||
} else {
|
||||
$virt_baseurl = "${centos_mirror_url}/centos/${centos_major}/virt/\$basearch/advanced-virtualization/"
|
||||
$virt_baseurl = "${centos_mirror_url}/centos/\$stream/virt/\$basearch/advanced-virtualization/"
|
||||
}
|
||||
|
||||
# TODO(tobias-urdin): Remove this after one cycle.
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
The ``openstack_extras::repo::redhat::redhat::stream`` parameter has been
|
||||
deprecate.
|
@ -183,7 +183,7 @@ describe 'openstack_extras::repo::redhat::redhat' do
|
||||
it { should contain_yumrepo('rdo-qemu-ev').with_ensure('absent') }
|
||||
|
||||
it { should contain_yumrepo('rdo-release').with(
|
||||
:baseurl => "http://mirror.centos.org/centos/#{facts[:operatingsystemmajrelease]}-stream/cloud/$basearch/openstack-yoga/",
|
||||
:baseurl => "http://mirror.centos.org/centos/$stream/cloud/$basearch/openstack-yoga/",
|
||||
:descr => "OpenStack Yoga Repository",
|
||||
:gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud',
|
||||
:enabled => '1',
|
||||
@ -203,7 +203,7 @@ describe 'openstack_extras::repo::redhat::redhat' do
|
||||
)}
|
||||
|
||||
it { should contain_yumrepo('centos-advanced-virt').with(
|
||||
:baseurl => "http://mirror.centos.org/centos/#{facts[:operatingsystemmajrelease]}-stream/virt/$basearch/advancedvirt-common/",
|
||||
:baseurl => "http://mirror.centos.org/centos/$stream/virt/$basearch/advancedvirt-common/",
|
||||
:descr => "CentOS-#{facts[:operatingsystemmajrelease]}-stream - Advanced Virt",
|
||||
:gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Virtualization',
|
||||
:enabled => '1',
|
||||
@ -224,7 +224,7 @@ describe 'openstack_extras::repo::redhat::redhat' do
|
||||
end
|
||||
|
||||
it { should contain_yumrepo('rdo-release').with(
|
||||
:baseurl => "http://mirror.centos.org/centos/#{facts[:operatingsystemmajrelease]}-stream/cloud/\$basearch/openstack-juno/",
|
||||
:baseurl => "http://mirror.centos.org/centos/$stream/cloud/$basearch/openstack-juno/",
|
||||
:descr => 'OpenStack Juno Repository',
|
||||
)}
|
||||
end
|
||||
@ -240,25 +240,6 @@ describe 'openstack_extras::repo::redhat::redhat' do
|
||||
}
|
||||
end
|
||||
|
||||
context 'with stream is false' do
|
||||
let :params do
|
||||
{
|
||||
:manage_rdo => true,
|
||||
:manage_virt => true,
|
||||
:stream => false,
|
||||
}
|
||||
end
|
||||
|
||||
it { should contain_yumrepo('rdo-release').with(
|
||||
:baseurl => "http://mirror.centos.org/centos/#{facts[:operatingsystemmajrelease]}/cloud/\$basearch/openstack-yoga/",
|
||||
)}
|
||||
|
||||
it { should contain_yumrepo('centos-advanced-virt').with(
|
||||
:baseurl => "http://mirror.centos.org/centos/#{facts[:operatingsystemmajrelease]}/virt/\$basearch/advanced-virtualization/",
|
||||
:descr => "CentOS-#{facts[:operatingsystemmajrelease]} - Advanced Virt",
|
||||
)}
|
||||
end
|
||||
|
||||
context 'with centos_mirror_url' do
|
||||
let :params do
|
||||
{
|
||||
@ -269,11 +250,11 @@ describe 'openstack_extras::repo::redhat::redhat' do
|
||||
end
|
||||
|
||||
it { should contain_yumrepo('rdo-release').with(
|
||||
:baseurl => "http://foo.bar/centos/#{facts[:operatingsystemmajrelease]}-stream/cloud/\$basearch/openstack-yoga/",
|
||||
:baseurl => "http://foo.bar/centos/$stream/cloud/$basearch/openstack-yoga/",
|
||||
)}
|
||||
|
||||
it { should contain_yumrepo('centos-advanced-virt').with(
|
||||
:baseurl => "http://foo.bar/centos/#{facts[:operatingsystemmajrelease]}-stream/virt/\$basearch/advancedvirt-common/",
|
||||
:baseurl => "http://foo.bar/centos/$stream/virt/$basearch/advancedvirt-common/",
|
||||
)}
|
||||
end
|
||||
|
||||
@ -382,7 +363,7 @@ describe 'openstack_extras::repo::redhat::redhat' do
|
||||
it { should_not contain_yumrepo('centos-advanced-virt') }
|
||||
|
||||
it { should contain_yumrepo('rdo-release').with(
|
||||
:baseurl => "http://mirror.stream.centos.org/SIGs/#{facts[:operatingsystemmajrelease]}-stream/cloud/$basearch/openstack-yoga/",
|
||||
:baseurl => "http://mirror.stream.centos.org/SIGs/$stream/cloud/$basearch/openstack-yoga/",
|
||||
:descr => "OpenStack Yoga Repository",
|
||||
:gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud',
|
||||
:enabled => '1',
|
||||
@ -403,24 +384,11 @@ describe 'openstack_extras::repo::redhat::redhat' do
|
||||
end
|
||||
|
||||
it { should contain_yumrepo('rdo-release').with(
|
||||
:baseurl => "http://mirror.stream.centos.org/SIGs/#{facts[:operatingsystemmajrelease]}-stream/cloud/$basearch/openstack-juno/",
|
||||
:baseurl => "http://mirror.stream.centos.org/SIGs/$stream/cloud/$basearch/openstack-juno/",
|
||||
:descr => 'OpenStack Juno Repository',
|
||||
)}
|
||||
end
|
||||
|
||||
context 'with stream is false' do
|
||||
let :params do
|
||||
{
|
||||
:manage_rdo => true,
|
||||
:stream => false,
|
||||
}
|
||||
end
|
||||
|
||||
it { should contain_yumrepo('rdo-release').with(
|
||||
:baseurl => "http://mirror.stream.centos.org/SIGs/#{facts[:operatingsystemmajrelease]}/cloud/\$basearch/openstack-yoga/",
|
||||
)}
|
||||
end
|
||||
|
||||
context 'with default parameters but puppetversion < 6.15.0' do
|
||||
before do
|
||||
facts.merge!( :puppetversion => '6.14.0' )
|
||||
@ -440,7 +408,7 @@ describe 'openstack_extras::repo::redhat::redhat' do
|
||||
end
|
||||
|
||||
it { should contain_yumrepo('rdo-release').with(
|
||||
:baseurl => "http://foo.bar/SIGs/#{facts[:operatingsystemmajrelease]}-stream/cloud/$basearch/openstack-yoga/",
|
||||
:baseurl => "http://foo.bar/SIGs/$stream/cloud/$basearch/openstack-yoga/",
|
||||
)}
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user