starting rocky development patch

Depends-On: Ia24eef700ab6c7fe359a17070981dc93e0300a18
Depends-On: I75d827d383f701da8650cd0e9d1f2501e22cf6a2
Change-Id: Id835cbf8fc8cf2dc32a3ecdfffb17b01547fb0db
This commit is contained in:
Samuel Cassiba 2018-08-03 06:24:37 -07:00
parent e30e2cf418
commit 3410066ae1
5 changed files with 33 additions and 45 deletions

View File

@ -1,31 +1,19 @@
# This configuration was generated by # This configuration was generated by
# `rubocop --auto-gen-config` # `rubocop --auto-gen-config`
# on 2017-09-01 10:04:34 -0400 using RuboCop version 0.47.1. # on 2018-08-03 05:25:58 -0700 using RuboCop version 0.55.0.
# The point is for the user to remove these configuration records # The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base. # one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new # Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again. # versions of RuboCop, may require this file to be generated again.
# Offense count: 20 # Offense count: 2
# Configuration parameters: CountComments, ExcludedMethods. # Cop supports --auto-correct.
Metrics/BlockLength: Style/IfUnlessModifier:
Max: 395
# Offense count: 4
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: nested, compact
Style/ClassAndModuleChildren:
Exclude: Exclude:
- 'recipes/_fernet_tokens.rb'
- 'recipes/openrc.rb'
- 'recipes/registration.rb'
- 'recipes/server-apache.rb' - 'recipes/server-apache.rb'
# Offense count: 3 # Offense count: 65
Style/Documentation: # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
Exclude: # URISchemes: http, https
- 'spec/**/*' Metrics/LineLength:
- 'test/**/*' Max: 224
- 'recipes/_fernet_tokens.rb'
- 'recipes/openrc.rb'
- 'recipes/registration.rb'

View File

@ -6,4 +6,4 @@ cookbook 'openstack-common',
git: 'https://git.openstack.org/openstack/cookbook-openstack-common' git: 'https://git.openstack.org/openstack/cookbook-openstack-common'
cookbook 'openstackclient', cookbook 'openstackclient',
github: 'cloudbau/cookbook-openstackclient' git: 'https://git.openstack.org/openstack/cookbook-openstackclient'

View File

@ -4,13 +4,13 @@ maintainer_email 'openstack-dev@lists.openstack.org'
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 '17.0.0' version '18.0.0'
%w(ubuntu redhat centos).each do |os| %w(ubuntu redhat centos).each do |os|
supports os supports os
end end
depends 'openstack-common', '>= 17.0.0' depends 'openstack-common', '>= 18.0.0'
depends 'openstackclient' depends 'openstackclient'
depends 'apache2' depends 'apache2'

View File

@ -46,7 +46,7 @@ describe 'openstack-identity::openrc' do
end end
it 'templates misc_openrc array correctly' do it 'templates misc_openrc array correctly' do
node.set['openstack']['misc_openrc'] = ['export MISC1=OPTION1', 'export MISC2=OPTION2'] node.override['openstack']['misc_openrc'] = ['export MISC1=OPTION1', 'export MISC2=OPTION2']
expect(chef_run).to render_file(file.name).with_content( expect(chef_run).to render_file(file.name).with_content(
/^export MISC1=OPTION1$/ /^export MISC1=OPTION1$/
) )
@ -56,13 +56,13 @@ describe 'openstack-identity::openrc' do
end end
it 'contains overridden auth environment variables' do it 'contains overridden auth environment variables' do
node.set['openstack']['identity']['admin_project'] = node.override['openstack']['identity']['admin_project'] =
'admin-project-name-override' 'admin-project-name-override'
node.set['openstack']['identity']['admin_user'] = node.override['openstack']['identity']['admin_user'] =
'identity_admin' 'identity_admin'
node.set['openstack']['identity']['admin_domain_id'] = node.override['openstack']['identity']['admin_domain_id'] =
'admin-domain-override' 'admin-domain-override'
node.set['openstack']['endpoints']['public']['identity']['uri'] = node.override['openstack']['endpoints']['public']['identity']['uri'] =
'https://public.identity:1234/' 'https://public.identity:1234/'
[ [
/^export OS_USERNAME=identity_admin$/, /^export OS_USERNAME=identity_admin$/,

View File

@ -25,7 +25,7 @@ describe 'openstack-identity::server-apache' do
internal_url = 'http://127.0.0.1:5000/v3' internal_url = 'http://127.0.0.1:5000/v3'
it 'runs logging recipe if node attributes say to' do it 'runs logging recipe if node attributes say to' do
node.set['openstack']['identity']['syslog']['use'] = true node.override['openstack']['identity']['syslog']['use'] = true
expect(chef_run).to include_recipe('openstack-common::logging') expect(chef_run).to include_recipe('openstack-common::logging')
end end
@ -78,7 +78,7 @@ describe 'openstack-identity::server-apache' do
end end
it 'creates /etc/keystone/domains when domain_specific_drivers_enabled enabled' do it 'creates /etc/keystone/domains when domain_specific_drivers_enabled enabled' do
node.set['openstack']['identity']['identity']['domain_specific_drivers_enabled'] = true node.override['openstack']['identity']['identity']['domain_specific_drivers_enabled'] = true
expect(chef_run).to create_directory(dir).with( expect(chef_run).to create_directory(dir).with(
user: 'keystone', user: 'keystone',
group: 'keystone', group: 'keystone',
@ -92,7 +92,7 @@ describe 'openstack-identity::server-apache' do
end end
it 'does not delete keystone.db when configured to use sqlite' do it 'does not delete keystone.db when configured to use sqlite' do
node.set['openstack']['db']['identity']['service_type'] = 'sqlite' node.override['openstack']['db']['identity']['service_type'] = 'sqlite'
expect(chef_run).not_to delete_file('/var/lib/keystone/keystone.db') expect(chef_run).not_to delete_file('/var/lib/keystone/keystone.db')
end end
@ -130,7 +130,7 @@ describe 'openstack-identity::server-apache' do
end end
it 'renders log_config correctly' do it 'renders log_config correctly' do
node.set['openstack']['identity']['syslog']['use'] = true node.override['openstack']['identity']['syslog']['use'] = true
expect(chef_run).to render_config_file(path).with_section_content('DEFAULT', log_conf) expect(chef_run).to render_config_file(path).with_section_content('DEFAULT', log_conf)
expect(chef_run).not_to render_config_file(path).with_section_content('DEFAULT', log_file) expect(chef_run).not_to render_config_file(path).with_section_content('DEFAULT', log_file)
@ -198,7 +198,7 @@ describe 'openstack-identity::server-apache' do
context 'when use_tls enabled' do context 'when use_tls enabled' do
before do before do
node.set['openstack']['identity']['ldap']['use_tls'] = true node.override['openstack']['identity']['ldap']['use_tls'] = true
end end
end end
end end
@ -256,7 +256,7 @@ describe 'openstack-identity::server-apache' do
end end
it 'does not run migrations' do it 'does not run migrations' do
node.set['openstack']['db']['identity']['migrate'] = false node.override['openstack']['db']['identity']['migrate'] = false
expect(chef_run).not_to run_execute(cmd).with( expect(chef_run).not_to run_execute(cmd).with(
user: 'root' user: 'root'
) )
@ -290,8 +290,8 @@ describe 'openstack-identity::server-apache' do
) )
end end
it 'template api pipeline set correct' do it 'template api pipeline set correct' do
node.set['openstack']['identity']['pipeline']['public_api'] = 'public_service' node.override['openstack']['identity']['pipeline']['public_api'] = 'public_service'
node.set['openstack']['identity']['pipeline']['api_v3'] = 'service_v3' node.override['openstack']['identity']['pipeline']['api_v3'] = 'service_v3'
expect(chef_run).to render_config_file(path).with_section_content( expect(chef_run).to render_config_file(path).with_section_content(
'pipeline:public_api', 'pipeline:public_api',
/^pipeline = public_service$/ /^pipeline = public_service$/
@ -302,7 +302,7 @@ describe 'openstack-identity::server-apache' do
) )
end end
it 'template misc_paste array correctly' do it 'template misc_paste array correctly' do
node.set['openstack']['identity']['misc_paste'] = ['MISC1 = OPTION1', 'MISC2 = OPTION2'] node.override['openstack']['identity']['misc_paste'] = ['MISC1 = OPTION1', 'MISC2 = OPTION2']
expect(chef_run).to render_file(path).with_content( expect(chef_run).to render_file(path).with_content(
/^MISC1 = OPTION1$/ /^MISC1 = OPTION1$/
) )
@ -313,7 +313,7 @@ describe 'openstack-identity::server-apache' do
end end
describe 'keystone-paste.ini as remote file' do describe 'keystone-paste.ini as remote file' do
before { node.set['openstack']['identity']['pastefile_url'] = 'http://server/mykeystone-paste.ini' } before { node.override['openstack']['identity']['pastefile_url'] = 'http://server/mykeystone-paste.ini' }
let(:remote_paste) { chef_run.remote_file('/etc/keystone/keystone-paste.ini') } let(:remote_paste) { chef_run.remote_file('/etc/keystone/keystone-paste.ini') }
it 'uses a remote file if pastefile_url is specified' do it 'uses a remote file if pastefile_url is specified' do
@ -339,7 +339,7 @@ describe 'openstack-identity::server-apache' do
end end
it 'include apache recipes' do it 'include apache recipes' do
node.set['openstack']['identity']['ssl']['enabled'] = true node.override['openstack']['identity']['ssl']['enabled'] = true
expect(chef_run).to include_recipe('apache2::mod_ssl') expect(chef_run).to include_recipe('apache2::mod_ssl')
end end
end end
@ -360,7 +360,7 @@ describe 'openstack-identity::server-apache' do
end end
it 'configures identity.conf lines' do it 'configures identity.conf lines' do
node.set['openstack']['identity']['custom_template_banner'] = 'custom_template_banner_value' node.override['openstack']['identity']['custom_template_banner'] = 'custom_template_banner_value'
[/^custom_template_banner_value$/, [/^custom_template_banner_value$/,
/user=keystone/, /user=keystone/,
/group=keystone/, /group=keystone/,
@ -380,7 +380,7 @@ describe 'openstack-identity::server-apache' do
context 'Enable SSL' do context 'Enable SSL' do
let(:file) { '/etc/apache2/sites-available/identity.conf' } let(:file) { '/etc/apache2/sites-available/identity.conf' }
before do before do
node.set['openstack']['identity']['ssl']['enabled'] = true node.override['openstack']['identity']['ssl']['enabled'] = true
end end
it 'configures identity.conf common ssl lines' do it 'configures identity.conf common ssl lines' do
[/^ SSLEngine On$/, [/^ SSLEngine On$/,
@ -399,17 +399,17 @@ describe 'openstack-identity::server-apache' do
end end
end end
it 'configures identity.conf chainfile when set' do it 'configures identity.conf chainfile when set' do
node.set['openstack']['identity']['ssl']['chainfile'] = '/etc/keystone/ssl/certs/chainfile.pem' node.override['openstack']['identity']['ssl']['chainfile'] = '/etc/keystone/ssl/certs/chainfile.pem'
expect(chef_run).to render_file(file) expect(chef_run).to render_file(file)
.with_content(%r{^ SSLCertificateChainFile /etc/keystone/ssl/certs/chainfile.pem$}) .with_content(%r{^ SSLCertificateChainFile /etc/keystone/ssl/certs/chainfile.pem$})
end end
it 'configures identity.conf ciphers when set' do it 'configures identity.conf ciphers when set' do
node.set['openstack']['identity']['ssl']['ciphers'] = 'ciphers_value' node.override['openstack']['identity']['ssl']['ciphers'] = 'ciphers_value'
expect(chef_run).to render_file(file) expect(chef_run).to render_file(file)
.with_content(/^ SSLCipherSuite ciphers_value$/) .with_content(/^ SSLCipherSuite ciphers_value$/)
end end
it 'configures identity.conf cert_required set' do it 'configures identity.conf cert_required set' do
node.set['openstack']['identity']['ssl']['cert_required'] = true node.override['openstack']['identity']['ssl']['cert_required'] = true
expect(chef_run).to render_file(file) expect(chef_run).to render_file(file)
.with_content(/^ SSLVerifyClient require$/) .with_content(/^ SSLVerifyClient require$/)
end end