Tag all Cinder packages
Some users wish to override the default package provider by their own. Tag all packages with the 'openstack' to allow mass resource attributes override using resource collectors. Closes-bug: #1391209 Change-Id: I5e52716c378ee80e7071c459d9deccb103cb18ad Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
This commit is contained in:
parent
77e1c46656
commit
24e7b1f62c
@ -163,6 +163,7 @@ class cinder::api (
|
||||
package { 'cinder-api':
|
||||
ensure => $package_ensure,
|
||||
name => $::cinder::params::api_package,
|
||||
tag => 'openstack',
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -70,6 +70,7 @@ class cinder::backup (
|
||||
package { 'cinder-backup':
|
||||
ensure => $package_ensure,
|
||||
name => $::cinder::params::backup_package,
|
||||
tag => 'openstack',
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,5 +17,6 @@ class cinder::client(
|
||||
package { 'python-cinderclient':
|
||||
ensure => $package_ensure,
|
||||
name => $::cinder::params::client_package,
|
||||
tag => 'openstack',
|
||||
}
|
||||
}
|
||||
|
@ -290,6 +290,7 @@ class cinder (
|
||||
package { 'cinder':
|
||||
ensure => $package_ensure,
|
||||
name => $::cinder::params::package_name,
|
||||
tag => 'openstack',
|
||||
require => Anchor['cinder-start'],
|
||||
}
|
||||
|
||||
|
@ -51,6 +51,7 @@ class cinder::scheduler (
|
||||
package { 'cinder-scheduler':
|
||||
ensure => $package_ensure,
|
||||
name => $::cinder::params::scheduler_package,
|
||||
tag => 'openstack',
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -34,6 +34,7 @@ class cinder::volume (
|
||||
package { 'cinder-volume':
|
||||
ensure => $package_ensure,
|
||||
name => $::cinder::params::volume_package,
|
||||
tag => 'openstack',
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,8 @@ describe 'cinder::backup' do
|
||||
if platform_params.has_key?(:backup_package)
|
||||
is_expected.to contain_package('cinder-backup').with(
|
||||
:name => platform_params[:backup_package],
|
||||
:ensure => 'present'
|
||||
:ensure => 'present',
|
||||
:tag => 'openstack'
|
||||
)
|
||||
is_expected.to contain_package('cinder-backup').with_before(/Cinder_config\[.+\]/)
|
||||
is_expected.to contain_package('cinder-backup').with_before(/Service\[cinder-backup\]/)
|
||||
@ -92,7 +93,7 @@ describe 'cinder::backup' do
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
{ :backup_service => 'cinder-backup' }
|
||||
{ :backup_service => 'opentack-cinder-backup' }
|
||||
end
|
||||
|
||||
it_configures 'cinder backup'
|
||||
|
@ -1,14 +1,45 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'cinder::client' do
|
||||
it { is_expected.to contain_package('python-cinderclient').with_ensure('present') }
|
||||
|
||||
let :params do
|
||||
{}
|
||||
end
|
||||
|
||||
let :default_params do
|
||||
{ :package_ensure => 'present' }
|
||||
end
|
||||
|
||||
shared_examples_for 'cinder client' do
|
||||
let :p do
|
||||
default_params.merge(params)
|
||||
end
|
||||
|
||||
it { is_expected.to contain_class('cinder::params') }
|
||||
|
||||
it 'installs cinder client package' do
|
||||
is_expected.to contain_package('python-cinderclient').with(
|
||||
:name => 'python-cinderclient',
|
||||
:ensure => p[:package_ensure],
|
||||
:tag => 'openstack'
|
||||
)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context 'on Debian platform' do
|
||||
let :facts do
|
||||
{ :osfamily => 'Debian' }
|
||||
end
|
||||
context 'with params' do
|
||||
let :params do
|
||||
{:package_ensure => 'latest'}
|
||||
|
||||
it_configures 'cinder client'
|
||||
end
|
||||
it { is_expected.to contain_package('python-cinderclient').with_ensure('latest') }
|
||||
|
||||
context 'on RedHat platform' do
|
||||
let :facts do
|
||||
{ :osfamily => 'RedHat' }
|
||||
end
|
||||
|
||||
it_configures 'cinder client'
|
||||
end
|
||||
end
|
||||
|
@ -17,6 +17,7 @@ describe 'cinder::scheduler' do
|
||||
:name => 'cinder-scheduler',
|
||||
:ensure => 'present',
|
||||
:before => ['Cinder_config[DEFAULT/scheduler_driver]','Service[cinder-scheduler]'],
|
||||
:tag => 'openstack',
|
||||
) }
|
||||
|
||||
it { is_expected.to contain_service('cinder-scheduler').with(
|
||||
|
Loading…
x
Reference in New Issue
Block a user