Merge "CentOS: Install openstack plugin package"
This commit is contained in:
commit
4241c9e81b
|
@ -46,6 +46,20 @@ class rally (
|
|||
tag => ['openstack', 'rally-package'],
|
||||
}
|
||||
|
||||
if $::rally::params::plugin_package_name {
|
||||
package { 'rally-openstack':
|
||||
ensure => $package_ensure,
|
||||
name => $::rally::params::plugin_package_name,
|
||||
tag => ['openstack', 'rally-package'],
|
||||
}
|
||||
} else {
|
||||
# NOTE(tkajinam): All plugins and job definitions for OpenStack environment
|
||||
# has been migrated the separate rally-openstack repo. If
|
||||
# this is not packaged, none of Rally jobs for OpenStack
|
||||
# environment can be executed.
|
||||
warning('rally-openstack is not packaged for this OS.')
|
||||
}
|
||||
|
||||
resources { 'rally_config':
|
||||
purge => $purge_config,
|
||||
}
|
||||
|
|
|
@ -7,10 +7,12 @@ class rally::params {
|
|||
|
||||
case $::osfamily {
|
||||
'RedHat': {
|
||||
$package_name = 'openstack-rally'
|
||||
$package_name = 'openstack-rally'
|
||||
$plugin_package_name = 'openstack-rally-plugins'
|
||||
}
|
||||
'Debian': {
|
||||
$package_name = 'rally'
|
||||
$package_name = 'rally'
|
||||
$plugin_package_name = false
|
||||
}
|
||||
default: {
|
||||
fail("Unsupported osfamily: ${::osfamily} operatingsystem")
|
||||
|
|
|
@ -15,6 +15,13 @@ describe 'rally' do
|
|||
:ensure => 'present',
|
||||
:tag => ['openstack', 'rally-package']
|
||||
)
|
||||
if platform_params.has_key?(:plugin_package_name)
|
||||
is_expected.to contain_package('rally-openstack').with(
|
||||
:name => platform_params[:plugin_package_name],
|
||||
:ensure => 'present',
|
||||
:tag => ['openstack', 'rally-package']
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
it 'passes purge to resource' do
|
||||
|
@ -55,7 +62,8 @@ describe 'rally' do
|
|||
when 'Debian'
|
||||
{ :package_name => 'rally' }
|
||||
when 'RedHat'
|
||||
{ :package_name => 'openstack-rally' }
|
||||
{ :package_name => 'openstack-rally',
|
||||
:plugin_package_name => 'openstack-rally-plugins' }
|
||||
end
|
||||
end
|
||||
it_behaves_like 'rally'
|
||||
|
|
Loading…
Reference in New Issue