Updates for Train

Changed
- Update release to train
- Migrated to using multi-store feature which has been deemed stable

Fixed
- Cookstyle

Removed:
- Unused rubocop rules

Change-Id: I19c1ff463a70a81e4d08bacb86e480e0a3951789
Depends-On: https://review.opendev.org/731859
This commit is contained in:
Lance Albertson 2020-05-29 16:14:18 -07:00
parent dad981f9ce
commit a78e903e12
9 changed files with 14 additions and 29 deletions

View File

@ -1,16 +1 @@
inherit_from: .rubocop_todo.yml
AllCops:
Include:
- metadata.rb
- Gemfile
- attributes/**
- libraries/**
- providers/**
- recipes/**
- resources/**
- spec/**
Exclude:
- .cookbooks/**/*
- berks-cookbooks/**/*
- .bundle/**/*

View File

@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2020-02-05 23:01:39 +0000 using RuboCop version 0.75.1.
# on 2020-05-29 17:16:13 -0700 using RuboCop version 0.82.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

View File

@ -10,7 +10,7 @@ solver :ruby, :required
%w(-integration-test integration),
%w(-network integration),
%w(-ops-database integration),
%w(-ops-messaging integration)
%w(-ops-messaging integration),
].each do |cookbook, group|
if Dir.exist?("../cookbook-openstack#{cookbook}")
cookbook "openstack#{cookbook}", path: "../cookbook-openstack#{cookbook}", group: group

View File

@ -21,7 +21,7 @@ Requirements
============
- Chef 15 or higher
- Chef Workstation 0.15.18 for testing (also includes Berkshelf for
- Chef Workstation 0.18.3 for testing (also includes Berkshelf for
cookbook dependency resolution)
Platform
@ -37,8 +37,8 @@ Cookbooks
The following cookbooks are dependencies:
- 'openstackclient'
- 'openstack-common', '>= 19.0.0'
- 'openstack-identity', '>= 19.0.0'
- 'openstack-common', '>= 20.0.0'
- 'openstack-identity', '>= 20.0.0'
Attributes
==========

View File

@ -5,10 +5,10 @@ default['openstack']['image_api']['conf'].tap do |conf|
else
conf['DEFAULT']['log_file'] = '/var/log/glance/api.log'
end
conf['DEFAULT']['enabled_backends'] = 'file:file,http:http'
# [glance_store] section
conf['glance_store']['stores'] = 'file,http'
conf['glance_store']['default_store'] = 'file'
conf['glance_store']['default_backend'] = 'file'
# [paste_deploy] section
conf['paste_deploy']['flavor'] = 'keystone'

View File

@ -3,15 +3,15 @@ maintainer 'openstack-chef'
maintainer_email 'openstack-discuss@lists.openstack.org'
license 'Apache-2.0'
description 'Installs and configures the Glance Image Registry and Delivery Service'
version '19.0.0'
version '20.0.0'
%w(ubuntu redhat centos).each do |os|
supports os
end
depends 'openstackclient'
depends 'openstack-common', '>= 19.0.0'
depends 'openstack-identity', '>= 19.0.0'
depends 'openstack-common', '>= 20.0.0'
depends 'openstack-identity', '>= 20.0.0'
issues_url 'https://launchpad.net/openstack-chef'
source_url 'https://opendev.org/openstack/cookbook-openstack-image'

View File

@ -47,7 +47,7 @@ directory '/etc/glance' do
mode '700'
end
if node['openstack']['image_api']['conf']['glance_store']['default_store'] == 'file'
if node['openstack']['image_api']['conf']['glance_store']['default_backend'] == 'file'
node.default['openstack']['image_api']['conf']['glance_store']['filesystem_store_datadir'] =
'/var/lib/glance/images'
directory node['openstack']['image_api']['conf']['glance_store']['filesystem_store_datadir'] do

View File

@ -40,7 +40,7 @@ node.default['openstack']['image_api']['conf_secrets']
swift_store_auth_version = 2
node.default['openstack']['image_api']['conf']['glance_store'].tap do |store|
store['default_store'] = 'swift'
store['default_backend'] = 'swift'
store['swift_store_auth_version'] = swift_store_auth_version
store['swift_store_auth_address'] = swift_store_auth_address
store['swift_store_user'] = "#{swift_user_tenant}:#{swift_store_user}"

View File

@ -56,6 +56,7 @@ describe 'openstack-image::api' do
%r{^transport_url = rabbit://guest:mypass@127.0.0.1:5672$},
/^bind_host = 127.0.0.1$/,
/^bind_port = 9292$/,
/^enabled_backends = file:file,http:http$/,
].each do |line|
it do
expect(chef_run).to render_config_file(file.name)
@ -65,8 +66,7 @@ describe 'openstack-image::api' do
[
%r{^filesystem_store_datadir = /var/lib/glance/images$},
/^stores = file,http$/,
/^default_store = file$/,
/^default_backend = file$/,
].each do |line|
it do
expect(chef_run).to render_config_file(file.name)