Merge "Deprecated python-glanceclient"

This commit is contained in:
Jenkins 2016-12-20 11:02:02 +00:00 committed by Gerrit Code Review
commit 1ae3152df5
11 changed files with 9 additions and 90 deletions

View File

@ -98,8 +98,7 @@ when 'rhel' # :pragma-foodcritic: ~FC024 - won't fix this
default['openstack']['image']['user'] = 'glance'
default['openstack']['image']['group'] = 'glance'
default['openstack']['image']['platform'] = {
'image_packages' => %w(openstack-glance cronie python-glanceclient),
'image_client_packages' => ['python-glanceclient'],
'image_packages' => %w(openstack-glance cronie),
'ceph_packages' => ['python-ceph'],
'swift_packages' => ['openstack-swift'],
'image_api_service' => 'openstack-glance-api',
@ -111,8 +110,7 @@ when 'suse'
default['openstack']['image']['user'] = 'openstack-glance'
default['openstack']['image']['group'] = 'openstack-glance'
default['openstack']['image']['platform'] = {
'image_packages' => ['openstack-glance', 'python-glanceclient'],
'image_client_packages' => ['python-glanceclient'],
'image_packages' => ['openstack-glance'],
'ceph_packages' => [],
'swift_packages' => ['openstack-swift'],
'image_api_service' => 'openstack-glance-api',
@ -125,7 +123,6 @@ when 'debian'
default['openstack']['image']['group'] = 'glance'
default['openstack']['image']['platform'] = {
'image_packages' => ['glance'],
'image_client_packages' => ['python-glanceclient'],
'ceph_packages' => ['python-ceph'],
'swift_packages' => ['python-swift'],
'image_api_service' => 'glance-api',

View File

@ -25,7 +25,7 @@ class ::Chef::Recipe
include ::Openstack
end
include_recipe 'openstack-identity::client'
include_recipe 'openstack-common::client'
if node['openstack']['image']['syslog']['use']
include_recipe 'openstack-common::logging'

View File

@ -1,31 +0,0 @@
# encoding: UTF-8
#
# Cookbook Name:: openstack-image
# Recipe:: client
#
# Copyright 2014, IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
class ::Chef::Recipe
include ::Openstack
end
platform_options = node['openstack']['image']['platform']
platform_options['image_client_packages'].each do |pkg|
package pkg do
options platform_options['package_overrides']
action :upgrade
end
end

View File

@ -26,15 +26,9 @@ if node['openstack']['image']['syslog']['use']
include_recipe 'openstack-common::logging'
end
platform_options = node['openstack']['image']['platform']
platform_options['image_client_packages'].each do |pkg|
package pkg do
action :upgrade
end
end
include_recipe 'openstack-common::client'
package 'curl' do
options platform_options['package_overrides']
action :upgrade
end

View File

@ -30,11 +30,6 @@ end
platform_options = node['openstack']['image']['platform']
package 'python-keystoneclient' do
options platform_options['package_overrides']
action :upgrade
end
db_user = node['openstack']['db']['image']['username']
db_pass = get_password 'db', 'glance'
node.default['openstack']['image_registry']['conf_secrets']

View File

@ -11,8 +11,8 @@ describe 'openstack-image::api' do
include_context 'image-stubs'
it 'does upgrade keystoneclient package' do
expect(chef_run).to upgrade_package('python-keystoneclient')
it 'does not upgrade keystoneclient package' do
expect(chef_run).not_to upgrade_package('python-keystoneclient')
end
it 'does not upgrade swift packages by default' do

View File

@ -12,7 +12,7 @@ describe 'openstack-image::api' do
include_context 'image-stubs'
it do
expect(chef_run).to include_recipe('openstack-identity::client')
expect(chef_run).to include_recipe('openstack-common::client')
end
it do

View File

@ -1,16 +0,0 @@
# encoding: UTF-8
require_relative 'spec_helper'
describe 'openstack-image::client' do
describe 'redhat' do
let(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) }
let(:node) { runner.node }
let(:chef_run) do
runner.converge(described_recipe)
end
it 'upgrades python glance client package' do
expect(chef_run).to upgrade_package('python-glanceclient')
end
end
end

View File

@ -1,16 +0,0 @@
# encoding: UTF-8
require_relative 'spec_helper'
describe 'openstack-image::client' do
describe 'ubuntu' do
let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
let(:node) { runner.node }
let(:chef_run) do
runner.converge(described_recipe)
end
it 'upgrades python glance client package' do
expect(chef_run).to upgrade_package('python-glanceclient')
end
end
end

View File

@ -17,8 +17,8 @@ describe 'openstack-image::registry' do
expect { chef_run }.to_not raise_error
end
it 'does upgrades keystoneclient package' do
expect(chef_run).to upgrade_package('python-keystoneclient')
it 'does not upgrade keystoneclient package' do
expect(chef_run).not_to upgrade_package('python-keystoneclient')
end
it 'upgrades mysql python package' do

View File

@ -79,10 +79,6 @@ shared_examples 'common-logging-recipe' do
end
shared_examples 'common-packages' do
it 'upgrades python-keystoneclient package' do
expect(chef_run).to upgrade_package 'python-keystoneclient'
end
it 'upgrades curl package' do
expect(chef_run).to upgrade_package 'curl'
end