diff --git a/manifests/generic_service.pp b/manifests/generic_service.pp index 9466642a..4c09c309 100644 --- a/manifests/generic_service.pp +++ b/manifests/generic_service.pp @@ -68,6 +68,7 @@ define trove::generic_service( ensure => $ensure_package, name => $package_name, notify => Service[$trove_title], + tag => ['openstack', 'trove-package'], } } } @@ -86,6 +87,7 @@ define trove::generic_service( name => $service_name, enable => $enabled, hasstatus => true, + tag => 'trove-service', } } } diff --git a/manifests/init.pp b/manifests/init.pp index bc1b45b1..34d5bfd6 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -236,7 +236,8 @@ class trove( # https://bugs.launchpad.net/ubuntu/+source/openstack-trove/+bug/1365561 package { 'trove': ensure => $package_ensure, - name => $::trove::params::common_package_name + name => $::trove::params::common_package_name, + tag => ['openstack', 'trove-package'], } $group_require = Package['trove'] } else { diff --git a/spec/classes/trove_init_spec.rb b/spec/classes/trove_init_spec.rb index a5d625f7..95f544e2 100644 --- a/spec/classes/trove_init_spec.rb +++ b/spec/classes/trove_init_spec.rb @@ -58,6 +58,7 @@ describe 'trove' do should contain_package('trove').with( :name => 'openstack-trove', :ensure => 'present', + :tag => ['openstack', 'trove-package'], ) end diff --git a/spec/shared_examples.rb b/spec/shared_examples.rb index db3b7831..01ee5f79 100644 --- a/spec/shared_examples.rb +++ b/spec/shared_examples.rb @@ -11,13 +11,15 @@ shared_examples 'generic trove service' do |service| is_expected.to contain_package(service[:name]).with({ :name => service[:package_name], :ensure => 'present', - :notify => "Service[#{service[:name]}]" + :notify => "Service[#{service[:name]}]", + :tag => ['openstack', 'trove-package'], }) is_expected.to contain_service(service[:name]).with({ :name => service[:service_name], :ensure => 'stopped', :hasstatus => true, - :enable => false + :enable => false, + :tag => 'trove-service', }) end end @@ -32,13 +34,15 @@ shared_examples 'generic trove service' do |service| is_expected.to contain_package(service[:name]).with({ :name => service[:package_name], :ensure => '2014.1-1', - :notify => "Service[#{service[:name]}]" + :notify => "Service[#{service[:name]}]", + :tag => ['openstack', 'trove-package'], }) is_expected.to contain_service(service[:name]).with({ :name => service[:service_name], :ensure => 'running', :hasstatus => true, - :enable => true + :enable => true, + :tag => 'trove-service', }) end end