From 303e514db06b34db1ab26e84edbbdf91d98d6679 Mon Sep 17 00:00:00 2001 From: Gael Chamoulaud Date: Sun, 29 Mar 2015 16:37:59 +0200 Subject: [PATCH] Tag all Sahara 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. Change-Id: Ic662043bcd19a930a47a6716be051561fceef5d7 Closes-bug: #1391209 Signed-off-by: Gael Chamoulaud --- manifests/client.pp | 1 + manifests/init.pp | 1 + spec/classes/sahara_client_spec.rb | 12 ++++++++++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/manifests/client.pp b/manifests/client.pp index 01ed6a5c..e4649d87 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -17,5 +17,6 @@ class sahara::client ( package { 'python-saharaclient': ensure => $package_ensure, name => $::sahara::params::client_package_name, + tag => 'openstack', } } diff --git a/manifests/init.pp b/manifests/init.pp index ef02704c..b1676358 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -120,6 +120,7 @@ class sahara( package { 'sahara': ensure => $package_ensure, name => $::sahara::params::package_name, + tag => 'openstack', } Package['sahara'] -> Sahara_config<||> diff --git a/spec/classes/sahara_client_spec.rb b/spec/classes/sahara_client_spec.rb index dd1f5e08..d590412f 100644 --- a/spec/classes/sahara_client_spec.rb +++ b/spec/classes/sahara_client_spec.rb @@ -8,14 +8,22 @@ describe 'sahara::client' do shared_examples_for 'sahara client' do context 'with default parameters' do - it { is_expected.to contain_package('python-saharaclient').with_ensure('present') } + it { is_expected.to contain_package('python-saharaclient').with( + :ensure => 'present', + :tag => 'openstack', + ) + } end context 'with package_ensure parameter provided' do let :params do { :package_ensure => false } end - it { is_expected.to contain_package('python-saharaclient').with_ensure('false') } + it { is_expected.to contain_package('python-saharaclient').with( + :ensure => false, + :tag => 'openstack', + ) + } end end