Merge "Add tag to package and service resources"

This commit is contained in:
Jenkins 2015-07-23 18:37:59 +00:00 committed by Gerrit Code Review
commit 1021f69411
9 changed files with 21 additions and 11 deletions

View File

@ -168,7 +168,7 @@ class cinder::api (
package { 'cinder-api':
ensure => $package_ensure,
name => $::cinder::params::api_package,
tag => 'openstack',
tag => ['openstack', 'cinder-package'],
}
}
@ -202,6 +202,7 @@ class cinder::api (
enable => $enabled,
hasstatus => true,
require => Package['cinder'],
tag => 'cinder-service',
}
cinder_config {

View File

@ -70,7 +70,7 @@ class cinder::backup (
package { 'cinder-backup':
ensure => $package_ensure,
name => $::cinder::params::backup_package,
tag => 'openstack',
tag => ['openstack', 'cinder-package'],
}
}
@ -86,6 +86,7 @@ class cinder::backup (
enable => $enabled,
hasstatus => true,
require => Package['cinder'],
tag => 'cinder-service',
}
cinder_config {

View File

@ -308,7 +308,7 @@ class cinder (
package { 'cinder':
ensure => $package_ensure,
name => $::cinder::params::package_name,
tag => 'openstack',
tag => ['openstack', 'cinder-package'],
require => Anchor['cinder-start'],
}

View File

@ -51,7 +51,7 @@ class cinder::scheduler (
package { 'cinder-scheduler':
ensure => $package_ensure,
name => $::cinder::params::scheduler_package,
tag => 'openstack',
tag => ['openstack', 'cinder-package'],
}
}
@ -69,5 +69,6 @@ class cinder::scheduler (
enable => $enabled,
hasstatus => true,
require => Package['cinder'],
tag => 'cinder-service',
}
}

View File

@ -34,7 +34,7 @@ class cinder::volume (
package { 'cinder-volume':
ensure => $package_ensure,
name => $::cinder::params::volume_package,
tag => 'openstack',
tag => ['openstack', 'cinder-package'],
}
}
@ -52,5 +52,6 @@ class cinder::volume (
enable => $enabled,
hasstatus => true,
require => Package['cinder'],
tag => 'cinder-service',
}
}

View File

@ -17,7 +17,8 @@ describe 'cinder::api' do
it { is_expected.to contain_service('cinder-api').with(
'hasstatus' => true,
'ensure' => 'running'
'ensure' => 'running',
'tag' => 'cinder-service',
)}
it 'should configure cinder api correctly' do

View File

@ -46,7 +46,7 @@ describe 'cinder::backup' do
is_expected.to contain_package('cinder-backup').with(
:name => platform_params[:backup_package],
:ensure => 'present',
:tag => 'openstack'
:tag => ['openstack', 'cinder-package'],
)
is_expected.to contain_package('cinder-backup').with_before(/Cinder_config\[.+\]/)
is_expected.to contain_package('cinder-backup').with_before(/Service\[cinder-backup\]/)
@ -54,7 +54,10 @@ describe 'cinder::backup' do
end
it 'ensure cinder backup service is running' do
is_expected.to contain_service('cinder-backup').with('hasstatus' => true)
is_expected.to contain_service('cinder-backup').with(
'hasstatus' => true,
'tag' => 'cinder-service',
)
end
it 'configures cinder.conf' do

View File

@ -17,7 +17,7 @@ describe 'cinder::scheduler' do
:name => 'cinder-scheduler',
:ensure => 'present',
:before => ['Cinder_config[DEFAULT/scheduler_driver]','Service[cinder-scheduler]'],
:tag => 'openstack',
:tag => ['openstack', 'cinder-package'],
) }
it { is_expected.to contain_service('cinder-scheduler').with(
@ -25,7 +25,8 @@ describe 'cinder::scheduler' do
:enable => true,
:ensure => 'running',
:require => 'Package[cinder]',
:hasstatus => true
:hasstatus => true,
:tag => 'cinder-service',
) }
end

View File

@ -12,7 +12,8 @@ describe 'cinder::volume' do
it { is_expected.to contain_package('cinder-volume').with_ensure('present') }
it { is_expected.to contain_service('cinder-volume').with(
'hasstatus' => true
'hasstatus' => true,
'tag' => 'cinder-service',
)}
describe 'with manage_service false' do