diff --git a/manifests/repo/debian/params.pp b/manifests/repo/debian/params.pp index 8cab656..44129ca 100644 --- a/manifests/repo/debian/params.pp +++ b/manifests/repo/debian/params.pp @@ -4,7 +4,7 @@ # class openstack_extras::repo::debian::params { - $release = 'train' + $release = 'ussuri' $uca_name = 'ubuntu-cloud-archive' $uca_location = 'http://ubuntu-cloud.archive.canonical.com/ubuntu' diff --git a/manifests/repo/redhat/params.pp b/manifests/repo/redhat/params.pp index b25a172..22de7fb 100644 --- a/manifests/repo/redhat/params.pp +++ b/manifests/repo/redhat/params.pp @@ -5,7 +5,7 @@ # class openstack_extras::repo::redhat::params { - $release = 'train' + $release = 'ussuri' $repo_defaults = { 'enabled' => '1', 'gpgcheck' => '1', diff --git a/manifests/repo/redhat/redhat.pp b/manifests/repo/redhat/redhat.pp index 2bbfa5c..3a954ef 100644 --- a/manifests/repo/redhat/redhat.pp +++ b/manifests/repo/redhat/redhat.pp @@ -201,4 +201,3 @@ class openstack_extras::repo::redhat::redhat( } -> Package <||> } } - diff --git a/spec/classes/openstack_extras_repo_debian_debian_spec.rb b/spec/classes/openstack_extras_repo_debian_debian_spec.rb index 85c262a..f347800 100644 --- a/spec/classes/openstack_extras_repo_debian_debian_spec.rb +++ b/spec/classes/openstack_extras_repo_debian_debian_spec.rb @@ -13,7 +13,7 @@ describe 'openstack_extras::repo::debian::debian' do let :paramclass_defaults do { - :release => 'train' + :release => 'ussuri' } end @@ -23,18 +23,18 @@ describe 'openstack_extras::repo::debian::debian' do context 'with default parameters' do let :params do - default_params + {} end it { should contain_apt__source('debian-openstack-backports').with( - :location => 'http://stretch-train.debian.net/debian', - :release => 'stretch-train-backports', + :location => 'http://stretch-ussuri.debian.net/debian', + :release => 'stretch-ussuri-backports', :repos => 'main', )} it { should contain_apt__source('debian-openstack-backports-nochange').with( - :location => 'http://stretch-train.debian.net/debian', - :release => 'stretch-train-backports-nochange', + :location => 'http://stretch-ussuri.debian.net/debian', + :release => 'stretch-ussuri-backports-nochange', :repos => 'main' )} diff --git a/spec/classes/openstack_extras_repo_debian_ubuntu_spec.rb b/spec/classes/openstack_extras_repo_debian_ubuntu_spec.rb index 1ebb4e1..3fceea8 100644 --- a/spec/classes/openstack_extras_repo_debian_ubuntu_spec.rb +++ b/spec/classes/openstack_extras_repo_debian_ubuntu_spec.rb @@ -13,7 +13,7 @@ describe 'openstack_extras::repo::debian::ubuntu' do let :paramclass_defaults do { - :release => 'train' + :release => 'ussuri' } end @@ -23,12 +23,12 @@ describe 'openstack_extras::repo::debian::ubuntu' do context 'with default parameters' do let :params do - default_params + {} end it { should contain_apt__source('ubuntu-cloud-archive').with( :location => 'http://ubuntu-cloud.archive.canonical.com/ubuntu', - :release => 'trusty-updates/train', + :release => 'trusty-updates/ussuri', :repos => 'main', )} @@ -127,7 +127,7 @@ describe 'openstack_extras::repo::debian::ubuntu' do it { should contain_apt__source('ubuntu-cloud-archive').with( :location => 'http://mirror.dfw.rax.openstack.org/ubuntu-cloud-archive', - :release => 'trusty-proposed/train', + :release => 'trusty-proposed/ussuri', :repos => 'main', )} end diff --git a/spec/classes/openstack_extras_repo_redhat_redhat_spec.rb b/spec/classes/openstack_extras_repo_redhat_redhat_spec.rb index 391d408..e60f9fc 100644 --- a/spec/classes/openstack_extras_repo_redhat_redhat_spec.rb +++ b/spec/classes/openstack_extras_repo_redhat_redhat_spec.rb @@ -36,12 +36,12 @@ describe 'openstack_extras::repo::redhat::redhat' do context 'with default parameters' do let :params do - default_params + {} end it { should contain_yumrepo('rdo-release').with( - :baseurl => "http://mirror.centos.org/centos/7/cloud/$basearch/openstack-train/", - :descr => 'OpenStack Train Repository', + :baseurl => "http://mirror.centos.org/centos/7/cloud/$basearch/openstack-ussuri/", + :descr => 'OpenStack Ussuri Repository', :gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud', :enabled => '1', :gpgcheck => '1', @@ -69,33 +69,6 @@ describe 'openstack_extras::repo::redhat::redhat' do :unless => '/usr/bin/rpm -qa | /usr/bin/grep -q yum-plugin-priorities', ) } - # 'metalink' property is supported from Puppet 3.5 - if Puppet.version.to_f >= 3.5 - it { should contain_yumrepo('epel').with( - :metalink => "https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=\$basearch", - :descr => 'Extra Packages for Enterprise Linux 7 - $basearch', - :gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7', - :failovermethod => 'priority', - :enabled => '1', - :gpgcheck => '1', - :mirrorlist => 'absent', - :require => 'Anchor[openstack_extras_redhat]', - :notify => 'Exec[yum_refresh]' - )} - else - it { should contain_yumrepo('epel').with( - :baseurl => "https://download.fedoraproject.org/pub/epel/7/\$basearch", - :descr => 'Extra Packages for Enterprise Linux 7 - $basearch', - :gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7', - :failovermethod => 'priority', - :enabled => '1', - :gpgcheck => '1', - :mirrorlist => 'absent', - :require => 'Anchor[openstack_extras_redhat]', - :notify => 'Exec[yum_refresh]' - )} - end - it { should contain_file('/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud').with( :source => 'puppet:///modules/openstack_extras/RPM-GPG-KEY-CentOS-SIG-Cloud', :owner => 'root', @@ -111,6 +84,8 @@ describe 'openstack_extras::repo::redhat::redhat' do :mode => '0644', :before => 'Anchor[openstack_extras_redhat]' )} + + it { should_not contain_yumrepo('epel') } end context 'with overridden release' do @@ -167,7 +142,6 @@ describe 'openstack_extras::repo::redhat::redhat' do :require => 'Anchor[openstack_extras_redhat]', :notify => 'Exec[yum_refresh]' )} - end context 'with overridden repo default' do @@ -200,6 +174,39 @@ describe 'openstack_extras::repo::redhat::redhat' do )} end + context 'with epel management enabled' do + let :params do + default_params.merge!({ :manage_epel => true }) + end + + # 'metalink' property is supported from Puppet 3.5 + if Puppet.version.to_f >= 3.5 + it { should contain_yumrepo('epel').with( + :metalink => "https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=\$basearch", + :descr => 'Extra Packages for Enterprise Linux 7 - $basearch', + :gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7', + :failovermethod => 'priority', + :enabled => '1', + :gpgcheck => '1', + :mirrorlist => 'absent', + :require => 'Anchor[openstack_extras_redhat]', + :notify => 'Exec[yum_refresh]' + )} + else + it { should contain_yumrepo('epel').with( + :baseurl => "https://download.fedoraproject.org/pub/epel/7/\$basearch", + :descr => 'Extra Packages for Enterprise Linux 7 - $basearch', + :gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7', + :failovermethod => 'priority', + :enabled => '1', + :gpgcheck => '1', + :mirrorlist => 'absent', + :require => 'Anchor[openstack_extras_redhat]', + :notify => 'Exec[yum_refresh]' + )} + end + end + context 'with epel management disabled' do let :params do default_params.merge!({ :manage_epel => false })