Convert hyphens to underscores for service names

The Chef Style Guide[1] does not recommend using hyphens for cookbook or
resource names. To maintain consistency, we should follow best
practices.

In order to pass Zuul's one-way CRD requirements[2], both hyphens and
underscores must exist for a compatibility period.

[1]: https://docs.chef.io/ruby.html#use-of-hyphens
[2]: http://lists.openstack.org/pipermail/openstack-dev/2015-February/056515.html

Change-Id: Ic2b6d8f1cdf719791faaebdbd7e29e789eb3f31c
This commit is contained in:
Samuel Cassiba 2018-12-10 16:54:29 -08:00
parent 713e615822
commit 7c31fb629b
3 changed files with 9 additions and 6 deletions

View File

@ -34,6 +34,8 @@ default['openstack']['common']['custom_template_banner'] = '
default['openstack']['common']['services'] = {
'aodh' => 'aodh',
'baremetal' => 'ironic',
'bare_metal' => 'ironic',
'block_storage' => 'cinder',
'block-storage' => 'cinder',
'compute' => 'nova',
'compute_api' => 'nova_api',
@ -44,11 +46,11 @@ default['openstack']['common']['services'] = {
'identity' => 'keystone',
'image' => 'glance',
'network' => 'neutron',
'object-storage' => 'swift',
'object_storage' => 'swift',
'orchestration' => 'heat',
'telemetry' => 'ceilometer',
'telemetry-metric' => 'gnocchi',
'application-catalog' => 'murano',
'telemetry_metric' => 'gnocchi',
'application_catalog' => 'murano',
}
# Setting this to True means that database passwords and service user

View File

@ -34,8 +34,9 @@ default['openstack']['bind_service']['mq']['interface'] = nil
###################################################################
# Services to assign mq attributes for
###################################################################
services = %w(aodh baremetal block-storage compute database dns image
identity telemetry network orchestration)
services = %w(aodh bare_metal block_storage compute database dns image
identity telemetry network orchestration
baremetal block-storage)
###################################################################
# Generic default attributes

View File

@ -4,7 +4,7 @@ require_relative 'spec_helper'
describe 'openstack-common::default' do
describe 'ubuntu' do
let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
let(:mq_services) { %w(baremetal block-storage compute database image telemetry network orchestration) }
let(:mq_services) { %w(bare_metal block_storage compute database image telemetry network orchestration) }
let(:node) { runner.node }
let(:chef_run) do
runner.converge(described_recipe)