Drop admin endpoints

The admin endpoints offer no special functionality, users may talk to
the public endpoints instead. The only historic use case has been the
keystone v2 admin endpoint, but with keystone v3 API, even that is no
longer needed.

Also drop the attribute for setting an auth version, as keystone only
supports v3 now.

[0]
https://opendev.org/openstack/openstack-chef-specs/src/branch/master/specs/ocata/all/drop-admin-endpoints.rst

Depends-On: https://review.opendev.org/656289
Depends-On: https://review.opendev.org/656514
Depends-On: https://review.opendev.org/656518
Change-Id: Id8fa969af80bcb1cb6f3ce743b1861f26c36523f
This commit is contained in:
Jens Harbott 2019-04-12 12:26:18 +00:00 committed by Jens Harbott (frickler)
parent ed454343cd
commit 6fd3db1717
4 changed files with 3 additions and 10 deletions

View File

@ -139,9 +139,6 @@ This cookbook exposes a set of default library routines:
* `cli` -- Used to call openstack CLIs
* `endpoint` -- Used to return a `::URI` object representing the named OpenStack
endpoint
* `admin_endpoint` -- Used to return a `::URI` object representing the named
OpenStack admin endpoint if one was specified. Otherwise, it will return the
same value as `endpoint`.
* `internal_endpoint` -- Used to return a `::URI` object representing the named
OpenStack internal endpoint if one was specified. Otherwise, it will return
the same value as `endpoint`.

View File

@ -150,10 +150,6 @@ default['openstack']['endpoints']['family'] = 'inet'
# Set a default region that other regions are set to - such that changing the region for all services can be done in one place
default['openstack']['region'] = 'RegionOne'
# Set a default auth api version that other components use to interact with identity service.
# Allowed auth API versions: v2.0 or v3.0. By default, it is set to v3.0.
default['openstack']['api']['auth']['version'] = 'v3.0'
# Allow configured loggers in logging.conf
default['openstack']['logging']['loggers'] = {
'root' => {

View File

@ -86,9 +86,9 @@ module ::Openstack
end
end
# Find the specific endpoint type ('internal', 'admin' or
# Find the specific endpoint type ('internal' or
# 'public') for the given service.
%w(public internal admin).each do |ep_type|
%w(public internal).each do |ep_type|
define_method("#{ep_type}_endpoint") do |service|
uri_from_hash(node['openstack']['endpoints'][ep_type][service])
end

View File

@ -10,7 +10,7 @@ describe 'openstack-common::default' do
let(:chef_run) { runner.converge(described_recipe) }
let(:subject) { Object.new.extend(Openstack) }
%w(public internal admin).each do |ep_type|
%w(public internal).each do |ep_type|
describe "#{ep_type}_endpoint" do
it 'fails with a NoMethodError when no openstack.endpoints in node attrs' do
allow(subject).to receive(:node).and_return({})