Tag all nova packages
Some users wish to override the default package provider by their own. Tag all packages with the 'openstack' and its corresponding service name to allow mass resource attributes override using resource collectors. Change-Id: I3a8041be7b9fcb304d2cf0dbdd4a021cd8594c02 Closes-bug: #1391209
This commit is contained in:
@@ -14,6 +14,7 @@ class nova::client(
|
||||
|
||||
package { 'python-novaclient':
|
||||
ensure => $ensure,
|
||||
tag => ['openstack', 'nova'],
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -110,6 +110,7 @@ class nova::compute::libvirt (
|
||||
ensure => present,
|
||||
before => Package['nova-compute'],
|
||||
require => Package['nova-common'],
|
||||
tag => ['openstack', 'nova'],
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -37,6 +37,7 @@ define nova::generic_service(
|
||||
ensure => $ensure_package,
|
||||
name => $package_name,
|
||||
notify => Service[$nova_title],
|
||||
tag => ['openstack', 'nova'],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -473,13 +473,15 @@ class nova(
|
||||
|
||||
package { 'python-nova':
|
||||
ensure => $ensure_package,
|
||||
require => Package['python-greenlet']
|
||||
require => Package['python-greenlet'],
|
||||
tag => ['openstack', 'nova'],
|
||||
}
|
||||
|
||||
package { 'nova-common':
|
||||
ensure => $ensure_package,
|
||||
name => $::nova::params::common_package_name,
|
||||
require => [Package['python-nova'], Anchor['nova-start']]
|
||||
require => [Package['python-nova'], Anchor['nova-start']],
|
||||
tag => ['openstack', 'nova'],
|
||||
}
|
||||
|
||||
file { '/etc/nova/nova.conf':
|
||||
|
@@ -28,7 +28,8 @@ describe 'nova::api' do
|
||||
should contain_package('nova-api').with(
|
||||
:name => platform_params[:nova_api_package],
|
||||
:ensure => 'present',
|
||||
:notify => 'Service[nova-api]'
|
||||
:notify => 'Service[nova-api]',
|
||||
:tag => ['openstack', 'nova']
|
||||
)
|
||||
end
|
||||
|
||||
@@ -114,7 +115,8 @@ describe 'nova::api' do
|
||||
it 'installs nova-api package and service' do
|
||||
should contain_package('nova-api').with(
|
||||
:name => platform_params[:nova_api_package],
|
||||
:ensure => '2012.1-2'
|
||||
:ensure => '2012.1-2',
|
||||
:tag => ['openstack', 'nova']
|
||||
)
|
||||
should contain_service('nova-api').with(
|
||||
:name => platform_params[:nova_api_service],
|
||||
|
@@ -60,7 +60,8 @@ describe 'nova::cells' do
|
||||
it 'installs nova-cells package' do
|
||||
should contain_package('nova-cells').with(
|
||||
:ensure => 'present',
|
||||
:name => platform_params[:cells_package_name]
|
||||
:name => platform_params[:cells_package_name],
|
||||
:tag => ['openstack', 'nova']
|
||||
)
|
||||
end
|
||||
|
||||
|
@@ -3,7 +3,12 @@ require 'spec_helper'
|
||||
describe 'nova::client' do
|
||||
|
||||
context 'with default parameters' do
|
||||
it { should contain_package('python-novaclient').with_ensure('present') }
|
||||
it {
|
||||
should contain_package('python-novaclient').with(
|
||||
:ensure => 'present',
|
||||
:tag => ['openstack', 'nova']
|
||||
)
|
||||
}
|
||||
end
|
||||
|
||||
context 'with ensure parameter provided' do
|
||||
|
@@ -16,7 +16,8 @@ describe 'nova::compute::libvirt' do
|
||||
|
||||
it { should contain_package('nova-compute-kvm').with(
|
||||
:ensure => 'present',
|
||||
:before => 'Package[nova-compute]'
|
||||
:before => 'Package[nova-compute]',
|
||||
:tag => ['openstack', 'nova']
|
||||
) }
|
||||
|
||||
it { should contain_package('libvirt').with(
|
||||
|
@@ -18,7 +18,8 @@ describe 'nova::compute' do
|
||||
:enable => false
|
||||
})
|
||||
should contain_package('nova-compute').with({
|
||||
:name => platform_params[:nova_compute_package]
|
||||
:name => platform_params[:nova_compute_package],
|
||||
:tag => ['openstack', 'nova']
|
||||
})
|
||||
end
|
||||
|
||||
@@ -55,7 +56,8 @@ describe 'nova::compute' do
|
||||
})
|
||||
should contain_package('nova-compute').with({
|
||||
:name => platform_params[:nova_compute_package],
|
||||
:ensure => '2012.1-2'
|
||||
:ensure => '2012.1-2',
|
||||
:tag => ['openstack', 'nova']
|
||||
})
|
||||
end
|
||||
|
||||
|
@@ -18,7 +18,8 @@ describe 'nova' do
|
||||
)
|
||||
should contain_package('nova-common').with(
|
||||
:name => platform_params[:nova_common_package],
|
||||
:ensure => 'present'
|
||||
:ensure => 'present',
|
||||
:tag => ['openstack', 'nova']
|
||||
)
|
||||
end
|
||||
|
||||
|
@@ -11,7 +11,8 @@ shared_examples 'generic nova service' do |service|
|
||||
should contain_package(service[:name]).with({
|
||||
:name => service[:package_name],
|
||||
:ensure => 'present',
|
||||
:notify => "Service[#{service[:name]}]"
|
||||
:notify => "Service[#{service[:name]}]",
|
||||
:tag => ['openstack', 'nova']
|
||||
})
|
||||
should contain_service(service[:name]).with({
|
||||
:name => service[:service_name],
|
||||
|
Reference in New Issue
Block a user