Merge "Allow packages to be updatable"

This commit is contained in:
Jenkins
2014-05-05 15:08:28 +00:00
committed by Gerrit Code Review
6 changed files with 31 additions and 27 deletions

View File

@@ -1,6 +1,9 @@
# CHANGELOG for cookbook-openstack-identity # CHANGELOG for cookbook-openstack-identity
This file is used to list changes made in each version of cookbook-openstack-identity. This file is used to list changes made in each version of cookbook-openstack-identity.
## 9.1.1
* Fix package action to allow updates
## 9.1.0 ## 9.1.0
* Add token flushing cronjob * Add token flushing cronjob

View File

@@ -4,7 +4,7 @@ maintainer_email 'matt@opscode.com'
license 'Apache 2.0' license 'Apache 2.0'
description 'The OpenStack Identity service Keystone.' description 'The OpenStack Identity service Keystone.'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '9.1.0' version '9.1.1'
recipe 'openstack-identity::client', 'Install packages required for keystone client' recipe 'openstack-identity::client', 'Install packages required for keystone client'
recipe 'openstack-identity::server', 'Installs and Configures Keystone Service' recipe 'openstack-identity::server', 'Installs and Configures Keystone Service'

View File

@@ -36,21 +36,22 @@ db_type = node['openstack']['db']['identity']['service_type']
unless db_type == 'sqlite' unless db_type == 'sqlite'
platform_options["#{db_type}_python_packages"].each do |pkg| platform_options["#{db_type}_python_packages"].each do |pkg|
package pkg do package pkg do
action :install options platform_options['package_options']
action :upgrade
end end
end end
end end
platform_options['memcache_python_packages'].each do |pkg| platform_options['memcache_python_packages'].each do |pkg|
package pkg do package pkg do
action :install options platform_options['package_options']
action :upgrade
end end
end end
platform_options['keystone_packages'].each do |pkg| platform_options['keystone_packages'].each do |pkg|
package pkg do package pkg do
options platform_options['package_options'] options platform_options['package_options']
action :upgrade action :upgrade
end end
end end

View File

@@ -16,28 +16,28 @@ describe 'openstack-identity::server' do
expect { chef_run }.to_not raise_error expect { chef_run }.to_not raise_error
end end
it 'installs mysql python packages' do it 'upgrades mysql python packages' do
expect(chef_run).to install_package('MySQL-python') expect(chef_run).to upgrade_package('MySQL-python')
end end
it 'installs db2 python packages if explicitly told' do it 'upgrades db2 python packages if explicitly told' do
node.set['openstack']['db']['identity']['service_type'] = 'db2' node.set['openstack']['db']['identity']['service_type'] = 'db2'
['python-ibm-db', 'python-ibm-db-sa'].each do |pkg| ['python-ibm-db', 'python-ibm-db-sa'].each do |pkg|
expect(chef_run).to install_package(pkg) expect(chef_run).to upgrade_package(pkg)
end end
end end
it 'installs postgresql python packages if explicitly told' do it 'upgrades postgresql python packages if explicitly told' do
node.set['openstack']['db']['identity']['service_type'] = 'postgresql' node.set['openstack']['db']['identity']['service_type'] = 'postgresql'
expect(chef_run).to install_package('python-psycopg2') expect(chef_run).to upgrade_package('python-psycopg2')
end end
it 'installs memcache python packages' do it 'upgrades memcache python packages' do
expect(chef_run).to install_package('python-memcached') expect(chef_run).to upgrade_package('python-memcached')
end end
it 'installs keystone packages' do it 'upgrades keystone packages' do
expect(chef_run).to upgrade_package('openstack-keystone') expect(chef_run).to upgrade_package('openstack-keystone')
end end

View File

@@ -16,20 +16,20 @@ describe 'openstack-identity::server' do
expect { chef_run }.to_not raise_error expect { chef_run }.to_not raise_error
end end
it 'installs mysql python packages' do it 'upgrades mysql python packages' do
expect(chef_run).to install_package('python-mysql') expect(chef_run).to upgrade_package('python-mysql')
end end
it 'installs postgresql python packages if explicitly told' do it 'upgrades postgresql python packages if explicitly told' do
node.set['openstack']['db']['identity']['service_type'] = 'postgresql' node.set['openstack']['db']['identity']['service_type'] = 'postgresql'
expect(chef_run).to install_package('python-psycopg2') expect(chef_run).to upgrade_package('python-psycopg2')
end end
it 'installs memcache python packages' do it 'upgrades memcache python packages' do
expect(chef_run).to install_package('python-python-memcached') expect(chef_run).to upgrade_package('python-python-memcached')
end end
it 'installs keystone packages' do it 'upgrades keystone packages' do
expect(chef_run).to upgrade_package('openstack-keystone') expect(chef_run).to upgrade_package('openstack-keystone')
end end

View File

@@ -42,20 +42,20 @@ describe 'openstack-identity::server' do
expect { chef_run }.to_not raise_error expect { chef_run }.to_not raise_error
end end
it 'installs mysql python packages' do it 'upgrades mysql python packages' do
expect(chef_run).to install_package('python-mysqldb') expect(chef_run).to upgrade_package('python-mysqldb')
end end
it 'installs postgresql python packages if explicitly told' do it 'upgrades postgresql python packages if explicitly told' do
node.set['openstack']['db']['identity']['service_type'] = 'postgresql' node.set['openstack']['db']['identity']['service_type'] = 'postgresql'
expect(chef_run).to install_package('python-psycopg2') expect(chef_run).to upgrade_package('python-psycopg2')
end end
it 'installs memcache python packages' do it 'upgrades memcache python packages' do
expect(chef_run).to install_package('python-memcache') expect(chef_run).to upgrade_package('python-memcache')
end end
it 'installs keystone packages' do it 'upgrades keystone packages' do
expect(chef_run).to upgrade_package('keystone') expect(chef_run).to upgrade_package('keystone')
end end