Chef 14 stable release updates and fixes
This change corrects some of the issues with resource naming[1] as well as prunes some failing unit tests that would be obsoleted with the changes in the service renaming[2]. [1]: https://docs.chef.io/ruby.html#use-of-hyphens [2]: https://review.openstack.org/#/q/topic:chef_14_fixes+(status:open+OR+status:merged) Depends-On: Ic2b6d8f1cdf719791faaebdbd7e29e789eb3f31c Change-Id: I8efc34c220fec59826bbea51e3ebf3fbc0e5b530
This commit is contained in:
parent
312401ff65
commit
0eec9ecac8
|
@ -23,10 +23,14 @@ class ::Chef::Recipe
|
||||||
end
|
end
|
||||||
|
|
||||||
node['openstack']['common']['services'].each do |service, project|
|
node['openstack']['common']['services'].each do |service, project|
|
||||||
|
old_services = %w(baremetal block-storage application-catalog
|
||||||
|
object-storage telemetry-metric)
|
||||||
|
next if old_services.include?(service)
|
||||||
begin
|
begin
|
||||||
|
username = node['openstack']['db'][service]['username']
|
||||||
password = get_password('db', project)
|
password = get_password('db', project)
|
||||||
openstack_common_database service do
|
openstack_common_database service do
|
||||||
user node['openstack']['db'][service]['username']
|
user username
|
||||||
pass password
|
pass password
|
||||||
end
|
end
|
||||||
rescue Net::HTTPServerException, ChefVault::Exceptions::KeysNotFound
|
rescue Net::HTTPServerException, ChefVault::Exceptions::KeysNotFound
|
||||||
|
|
|
@ -11,15 +11,12 @@ describe 'openstack-ops-database::openstack-db' do
|
||||||
|
|
||||||
it 'creates all openstack service databases and the corresponding users' do
|
it 'creates all openstack service databases and the corresponding users' do
|
||||||
{
|
{
|
||||||
'bare-metal' => 'ironic',
|
|
||||||
'block-storage' => 'cinder',
|
|
||||||
'compute' => 'nova',
|
'compute' => 'nova',
|
||||||
'dashboard' => 'horizon',
|
'dashboard' => 'horizon',
|
||||||
'database' => 'trove',
|
'database' => 'trove',
|
||||||
'identity' => 'keystone',
|
'identity' => 'keystone',
|
||||||
'image' => 'glance',
|
'image' => 'glance',
|
||||||
'network' => 'neutron',
|
'network' => 'neutron',
|
||||||
'object-storage' => 'swift',
|
|
||||||
'orchestration' => 'heat',
|
'orchestration' => 'heat',
|
||||||
'telemetry' => 'ceilometer',
|
'telemetry' => 'ceilometer',
|
||||||
}.each do |service, _project|
|
}.each do |service, _project|
|
||||||
|
|
|
@ -2,18 +2,19 @@
|
||||||
require 'chefspec'
|
require 'chefspec'
|
||||||
require 'chefspec/berkshelf'
|
require 'chefspec/berkshelf'
|
||||||
|
|
||||||
ChefSpec::Coverage.start! { add_filter 'openstack-ops-database' }
|
RSpec.configure do |config|
|
||||||
|
config.color = true
|
||||||
|
config.formatter = :documentation
|
||||||
|
config.log_level = :fatal
|
||||||
|
end
|
||||||
|
|
||||||
LOG_LEVEL = :fatal
|
|
||||||
REDHAT_OPTS = {
|
REDHAT_OPTS = {
|
||||||
platform: 'redhat',
|
platform: 'redhat',
|
||||||
version: '7.3',
|
version: '7.4',
|
||||||
log_level: ::LOG_LEVEL,
|
|
||||||
}.freeze
|
}.freeze
|
||||||
UBUNTU_OPTS = {
|
UBUNTU_OPTS = {
|
||||||
platform: 'ubuntu',
|
platform: 'ubuntu',
|
||||||
version: '16.04',
|
version: '16.04',
|
||||||
log_level: ::LOG_LEVEL,
|
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
shared_context 'database-stubs' do
|
shared_context 'database-stubs' do
|
||||||
|
|
Loading…
Reference in New Issue