starting rocky development patch
Change-Id: I829e8e793d107b9bf6d35781480cafdb27f7a928
This commit is contained in:
parent
b27c620954
commit
681a71fb33
|
@ -1,3 +1,5 @@
|
|||
inherit_from: .rubocop_todo.yml
|
||||
|
||||
AllCops:
|
||||
Include:
|
||||
- metadata.rb
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
# This configuration was generated by
|
||||
# `rubocop --auto-gen-config`
|
||||
# on 2018-08-03 05:25:43 -0700 using RuboCop version 0.55.0.
|
||||
# The point is for the user to remove these configuration records
|
||||
# one by one as the offenses are removed from the code base.
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
# versions of RuboCop, may require this file to be generated again.
|
||||
|
||||
# Offense count: 2
|
||||
# Cop supports --auto-correct.
|
||||
Style/IfUnlessModifier:
|
||||
Exclude:
|
||||
- 'attributes/cinder_conf.rb'
|
||||
- 'recipes/cinder-common.rb'
|
||||
|
||||
# Offense count: 58
|
||||
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
||||
# URISchemes: http, https
|
||||
Metrics/LineLength:
|
||||
Max: 141
|
|
@ -9,6 +9,6 @@ source 'https://supermarket.chef.io'
|
|||
end
|
||||
|
||||
cookbook 'openstackclient',
|
||||
github: 'cloudbau/cookbook-openstackclient'
|
||||
git: 'https://git.openstack.org/openstack/cookbook-openstackclient'
|
||||
|
||||
metadata
|
||||
|
|
|
@ -4,15 +4,15 @@ maintainer_email 'openstack-dev@lists.openstack.org'
|
|||
license 'Apache-2.0'
|
||||
description 'The OpenStack Advanced Volume Management service Cinder.'
|
||||
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|
|
||||
supports os
|
||||
end
|
||||
|
||||
depends 'openstack-common', '>= 17.0.0'
|
||||
depends 'openstack-identity', '>= 17.0.0'
|
||||
depends 'openstack-image', '>= 17.0.0'
|
||||
depends 'openstack-common', '>= 18.0.0'
|
||||
depends 'openstack-identity', '>= 18.0.0'
|
||||
depends 'openstack-image', '>= 18.0.0'
|
||||
depends 'openstackclient'
|
||||
|
||||
depends 'lvm'
|
||||
|
|
|
@ -31,7 +31,7 @@ describe 'openstack-block-storage::api' do
|
|||
expect(chef_run).not_to create_remote_file('/etc/cinder/policy.json')
|
||||
end
|
||||
describe 'policy file specified' do
|
||||
before { node.set['openstack']['block-storage']['policyfile_url'] = 'http://server/mypolicy.json' }
|
||||
before { node.override['openstack']['block-storage']['policyfile_url'] = 'http://server/mypolicy.json' }
|
||||
let(:remote_policy) { chef_run.remote_file('/etc/cinder/policy.json') }
|
||||
|
||||
it 'manages policy file when remote file is specified' do
|
||||
|
|
|
@ -14,7 +14,7 @@ describe 'openstack-block-storage::backup' do
|
|||
|
||||
describe 'enable cinder backup service' do
|
||||
before do
|
||||
node.set['openstack']['block-storage']['backup']['enabled'] = true
|
||||
node.override['openstack']['block-storage']['backup']['enabled'] = true
|
||||
end
|
||||
|
||||
it 'starts cinder backup' do
|
||||
|
|
|
@ -9,8 +9,8 @@ describe 'openstack-block-storage::cinder-common' do
|
|||
let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
|
||||
let(:node) { runner.node }
|
||||
let(:chef_run) do
|
||||
node.set['openstack']['mq']['host'] = '127.0.0.1'
|
||||
node.set['openstack']['mq']['block-storage']['rabbit']['notification_topic'] = 'rabbit_topic'
|
||||
node.override['openstack']['mq']['host'] = '127.0.0.1'
|
||||
node.override['openstack']['mq']['block-storage']['rabbit']['notification_topic'] = 'rabbit_topic'
|
||||
|
||||
runner.converge(described_recipe)
|
||||
end
|
||||
|
@ -94,7 +94,7 @@ describe 'openstack-block-storage::cinder-common' do
|
|||
|
||||
context 'syslog use' do
|
||||
it 'sets the log_config value when syslog is in use' do
|
||||
node.set['openstack']['block-storage']['syslog']['use'] = true
|
||||
node.override['openstack']['block-storage']['syslog']['use'] = true
|
||||
|
||||
expect(chef_run).to render_file(file.name)
|
||||
.with_content(%r{^log_config = /etc/openstack/logging.conf$})
|
||||
|
@ -131,7 +131,7 @@ describe 'openstack-block-storage::cinder-common' do
|
|||
context 'rabbitmq as mq service' do
|
||||
context 'non ha attributes' do
|
||||
before do
|
||||
node.set['openstack']['mq']['block-storage']['rabbit']['ha'] = false
|
||||
node.override['openstack']['mq']['block-storage']['rabbit']['ha'] = false
|
||||
end
|
||||
|
||||
it 'does not have a rabbit_hosts attribute' do
|
||||
|
@ -142,14 +142,14 @@ describe 'openstack-block-storage::cinder-common' do
|
|||
|
||||
context 'lvm settings' do
|
||||
before do
|
||||
node.set['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.lvm.LVMVolumeDriver'
|
||||
node.override['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.lvm.LVMVolumeDriver'
|
||||
end
|
||||
end
|
||||
|
||||
context 'commonly named volume attributes' do
|
||||
%w(iscsi_ip_address iscsi_port iscsi_helper volumes_dir).each do |attr|
|
||||
it "has volume related #{attr} attribute" do
|
||||
node.set['openstack']['block-storage']['conf']['DEFAULT'][attr] = "common_volume_#{attr}_value"
|
||||
node.override['openstack']['block-storage']['conf']['DEFAULT'][attr] = "common_volume_#{attr}_value"
|
||||
expect(chef_run).to render_file(file.name).with_content(/^#{attr} = common_volume_#{attr}_value$/)
|
||||
end
|
||||
end
|
||||
|
@ -157,7 +157,7 @@ describe 'openstack-block-storage::cinder-common' do
|
|||
|
||||
context 'netapp ISCSI settings' do
|
||||
before do
|
||||
node.set['openstack']['block-storage']['conf']['DEFAULT']['volume_driver'] = 'cinder.volume.drivers.netapp.NetAppISCSIDriver'
|
||||
node.override['openstack']['block-storage']['conf']['DEFAULT']['volume_driver'] = 'cinder.volume.drivers.netapp.NetAppISCSIDriver'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -84,7 +84,7 @@ describe 'openstack-block-storage::identity_registration' do
|
|||
end
|
||||
|
||||
it 'with custom region override' do
|
||||
node.set['openstack']['block-storage']['region'] = 'volumeRegion'
|
||||
node.override['openstack']['block-storage']['region'] = 'volumeRegion'
|
||||
expect(chef_run).to create_openstack_endpoint(
|
||||
service_type
|
||||
).with(region: 'volumeRegion')
|
||||
|
|
|
@ -64,7 +64,7 @@ end
|
|||
shared_examples 'common-logging' do
|
||||
context 'when syslog.use is true' do
|
||||
before do
|
||||
node.set['openstack']['block-storage']['syslog']['use'] = true
|
||||
node.override['openstack']['block-storage']['syslog']['use'] = true
|
||||
end
|
||||
|
||||
it 'runs logging recipe if node attributes say to' do
|
||||
|
@ -74,7 +74,7 @@ shared_examples 'common-logging' do
|
|||
|
||||
context 'when syslog.use is false' do
|
||||
before do
|
||||
node.set['openstack']['block-storage']['syslog']['use'] = false
|
||||
node.override['openstack']['block-storage']['syslog']['use'] = false
|
||||
end
|
||||
|
||||
it 'runs logging recipe if node attributes say to' do
|
||||
|
|
|
@ -60,7 +60,7 @@ describe 'openstack-block-storage::volume' do
|
|||
end
|
||||
|
||||
it 'has ubuntu include' do
|
||||
node.set['openstack']['block-storage']['volume']['volumes_dir'] = 'volumes_dir_value'
|
||||
node.override['openstack']['block-storage']['volume']['volumes_dir'] = 'volumes_dir_value'
|
||||
|
||||
expect(chef_run).to render_file(file.name).with_content('include /etc/tgt/conf.d/*.conf')
|
||||
expect(chef_run).not_to render_file(file.name).with_content('include volumes_dir_value/*')
|
||||
|
|
Loading…
Reference in New Issue