Remove deprecated aodh::auth
... because it was deprecated during Wallaby cycle[1].
[1] e05af2b3f1
Change-Id: I81833bb36737cfdf2372a02c798e1b60832af9f1
This commit is contained in:
parent
16b730bd76
commit
0b9c0368ed
|
@ -1,63 +0,0 @@
|
|||
# DEPRECATED ! Use the aodh::service_credentails class instead
|
||||
# The aodh::auth class helps configure auth settings
|
||||
#
|
||||
# == Parameters
|
||||
# [*auth_url*]
|
||||
# the keystone public endpoint
|
||||
# Optional. Defaults to undef.
|
||||
#
|
||||
# [*auth_region*]
|
||||
# the keystone region of this node
|
||||
# Optional. Defaults to undef.
|
||||
#
|
||||
# [*auth_user*]
|
||||
# the keystone user for aodh services
|
||||
# Optional. Defaults to undef.
|
||||
#
|
||||
# [*auth_password*]
|
||||
# the keystone password for aodh services
|
||||
# Required.
|
||||
#
|
||||
# [*auth_project_name*]
|
||||
# the keystone tenant name for aodh services
|
||||
# Optional. Defaults to undef.
|
||||
#
|
||||
# [*project_domain_name*]
|
||||
# the keystone project domain name for aodh services
|
||||
# Optional. Defaults to undef.
|
||||
#
|
||||
# [*user_domain_name*]
|
||||
# the keystone user domain name for aodh services
|
||||
# Optional. Defaults to undef.
|
||||
#
|
||||
# [*auth_type*]
|
||||
# An authentication type to use with an OpenStack Identity server.
|
||||
# The value should contain auth plugin name.
|
||||
# Optional. Defaults to undef.
|
||||
#
|
||||
# [*auth_cacert*]
|
||||
# Certificate chain for SSL validation.
|
||||
# Optional. Defaults to undef.
|
||||
#
|
||||
# [*interface*]
|
||||
# Type of endpoint in Identity service catalog to use for
|
||||
# communication with OpenStack services.
|
||||
# Optional. Defaults to undef.
|
||||
#
|
||||
class aodh::auth (
|
||||
$auth_password,
|
||||
$auth_url = undef,
|
||||
$auth_region = undef,
|
||||
$auth_user = undef,
|
||||
$auth_project_name = undef,
|
||||
$project_domain_name = undef,
|
||||
$user_domain_name = undef,
|
||||
$auth_type = undef,
|
||||
$auth_cacert = undef,
|
||||
$interface = undef,
|
||||
) {
|
||||
|
||||
warning('The aodh::auth class has been deprecated. Use the aodh::service_credentials class')
|
||||
|
||||
include aodh::service_credentials
|
||||
}
|
|
@ -2,6 +2,11 @@
|
|||
# settings
|
||||
#
|
||||
# == Parameters
|
||||
#
|
||||
# [*password*]
|
||||
# the keystone password for aodh services
|
||||
# Required.
|
||||
#
|
||||
# [*auth_url*]
|
||||
# the keystone public endpoint
|
||||
# Optional. Defaults to 'http://localhost:5000/v3'
|
||||
|
@ -14,10 +19,6 @@
|
|||
# the keystone user for aodh services
|
||||
# Optional. Defaults to 'aodh'
|
||||
#
|
||||
# [*password*]
|
||||
# the keystone password for aodh services
|
||||
# Required.
|
||||
#
|
||||
# [*project_name*]
|
||||
# the keystone tenant name for aodh services
|
||||
# Optional. Defaults to 'services'
|
||||
|
@ -45,8 +46,7 @@
|
|||
# Optional. Defaults to $::os_service_default.
|
||||
#
|
||||
class aodh::service_credentials (
|
||||
# TODO(tkajinam): Make this required when we remove aodh::auth
|
||||
$password = false,
|
||||
$password,
|
||||
$auth_url = 'http://localhost:5000/v3',
|
||||
$region_name = 'RegionOne',
|
||||
$username = 'aodh',
|
||||
|
@ -60,31 +60,16 @@ class aodh::service_credentials (
|
|||
|
||||
include aodh::deps
|
||||
|
||||
$password_real = pick($::aodh::auth::auth_password, $password)
|
||||
if ! $password_real {
|
||||
fail('The password parameter is required')
|
||||
}
|
||||
|
||||
$auth_url_real = pick($::aodh::auth::auth_url, $auth_url)
|
||||
$region_name_real = pick($::aodh::auth::auth_region, $region_name)
|
||||
$username_real = pick($::aodh::auth::auth_user, $username)
|
||||
$project_name_real = pick($::aodh::auth::auth_project_name, $project_name)
|
||||
$project_domain_name_real = pick($::aodh::auth::project_domain_name, $project_domain_name)
|
||||
$user_domain_name_real = pick($::aodh::auth::user_domain_name, $user_domain_name)
|
||||
$auth_type_real = pick($::aodh::auth::auth_type, $auth_type)
|
||||
$cacert_real = pick($::aodh::auth::auth_cacert, $cacert)
|
||||
$interface_real = pick($::aodh::auth::interface, $interface)
|
||||
|
||||
aodh_config {
|
||||
'service_credentials/auth_url' : value => $auth_url_real;
|
||||
'service_credentials/region_name' : value => $region_name_real;
|
||||
'service_credentials/username' : value => $username_real;
|
||||
'service_credentials/password' : value => $password_real, secret => true;
|
||||
'service_credentials/project_name' : value => $project_name_real;
|
||||
'service_credentials/project_domain_name' : value => $project_domain_name_real;
|
||||
'service_credentials/user_domain_name' : value => $user_domain_name_real;
|
||||
'service_credentials/cacert' : value => $cacert_real;
|
||||
'service_credentials/interface' : value => $interface_real;
|
||||
'service_credentials/auth_type' : value => $auth_type_real;
|
||||
'service_credentials/auth_url' : value => $auth_url;
|
||||
'service_credentials/region_name' : value => $region_name;
|
||||
'service_credentials/username' : value => $username;
|
||||
'service_credentials/password' : value => $password, secret => true;
|
||||
'service_credentials/project_name' : value => $project_name;
|
||||
'service_credentials/project_domain_name' : value => $project_domain_name;
|
||||
'service_credentials/user_domain_name' : value => $user_domain_name;
|
||||
'service_credentials/cacert' : value => $cacert;
|
||||
'service_credentials/interface' : value => $interface;
|
||||
'service_credentials/auth_type' : value => $auth_type;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
upgrade:
|
||||
- |
|
||||
The deprecated ``aodh::auth`` class has been removed. Use
|
||||
the ``aodh::service_credentials`` class instead.
|
|
@ -1,55 +0,0 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'aodh::auth' do
|
||||
|
||||
let :params do
|
||||
{ :auth_url => 'http://localhost:5000/v3',
|
||||
:auth_region => 'RegionOne',
|
||||
:auth_user => 'aodh',
|
||||
:auth_password => 'password',
|
||||
:auth_project_name => 'services',
|
||||
}
|
||||
end
|
||||
|
||||
shared_examples_for 'aodh-auth' do
|
||||
|
||||
it 'configures authentication' do
|
||||
is_expected.to contain_aodh_config('service_credentials/auth_url').with_value('http://localhost:5000/v3')
|
||||
is_expected.to contain_aodh_config('service_credentials/region_name').with_value('RegionOne')
|
||||
is_expected.to contain_aodh_config('service_credentials/project_domain_name').with_value('Default')
|
||||
is_expected.to_not contain_aodh_config('service_credentials/project_domain_id')
|
||||
is_expected.to contain_aodh_config('service_credentials/user_domain_name').with_value('Default')
|
||||
is_expected.to_not contain_aodh_config('service_credentials/user_domain_id')
|
||||
is_expected.to contain_aodh_config('service_credentials/auth_type').with_value('password')
|
||||
is_expected.to contain_aodh_config('service_credentials/username').with_value('aodh')
|
||||
is_expected.to contain_aodh_config('service_credentials/password').with_value('password').with_secret(true)
|
||||
is_expected.to contain_aodh_config('service_credentials/project_name').with_value('services')
|
||||
is_expected.to contain_aodh_config('service_credentials/cacert').with(:value => '<SERVICE DEFAULT>')
|
||||
end
|
||||
|
||||
context 'when overriding parameters' do
|
||||
before do
|
||||
params.merge!(
|
||||
:auth_cacert => '/tmp/dummy.pem',
|
||||
:interface => 'internalURL',
|
||||
)
|
||||
end
|
||||
it { is_expected.to contain_aodh_config('service_credentials/cacert').with_value(params[:auth_cacert]) }
|
||||
it { is_expected.to contain_aodh_config('service_credentials/interface').with_value(params[:interface]) }
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_configures 'aodh-auth'
|
||||
end
|
||||
end
|
||||
|
||||
end
|
Loading…
Reference in New Issue