Fix leftovers about removed v1 API
Designate has already removed its v1 API, so we should deprecate and remove all parameters for it. This change also fixes the outdated default value for keystone endpoint url, which still includes '/v1'. Change-Id: I645af15a9825ad000fc951d6c8334e715e645c8a
This commit is contained in:
parent
72a964e3ad
commit
a5d78457d6
|
@ -76,10 +76,6 @@
|
|||
# (optional) Show the pecan HTML based debug interface (v2 only).
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*enabled_extensions_v1*]
|
||||
# (optional) API Version 1 extensions.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*enabled_extensions_v2*]
|
||||
# (optional) API Version 2 extensions.
|
||||
# Defaults to $::os_service_default
|
||||
|
@ -88,6 +84,12 @@
|
|||
# (optional) Admin API extensions.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*enabled_extensions_v1*]
|
||||
# (optional) API Version 1 extensions.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
class designate::api (
|
||||
$package_ensure = present,
|
||||
$api_package_name = $::designate::params::api_package_name,
|
||||
|
@ -107,13 +109,19 @@ class designate::api (
|
|||
$default_limit_v2 = $::os_service_default,
|
||||
$max_limit_v2 = $::os_service_default,
|
||||
$pecan_debug = $::os_service_default,
|
||||
$enabled_extensions_v1 = $::os_service_default,
|
||||
$enabled_extensions_v2 = $::os_service_default,
|
||||
$enabled_extensions_admin = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$enabled_extensions_v1 = undef,
|
||||
) inherits designate {
|
||||
|
||||
include designate::deps
|
||||
|
||||
if $enabled_extensions_v1 != undef {
|
||||
warning('The enabled_extensions_v1 parameter has been deprecated and has \
|
||||
no effect now')
|
||||
}
|
||||
|
||||
# API Service
|
||||
designate_config {
|
||||
'service:api/listen' : value => $listen;
|
||||
|
@ -130,7 +138,6 @@ class designate::api (
|
|||
'service:api/default_limit_v2' : value => $default_limit_v2;
|
||||
'service:api/max_limit_v2' : value => $max_limit_v2;
|
||||
'service:api/pecan_debug' : value => $pecan_debug;
|
||||
'service:api/enabled_extensions_v1' : value => $enabled_extensions_v1;
|
||||
'service:api/enabled_extensions_v2' : value => $enabled_extensions_v2;
|
||||
'service:api/enabled_extensions_admin' : value => $enabled_extensions_admin;
|
||||
}
|
||||
|
|
|
@ -82,9 +82,9 @@ class designate::keystone::auth (
|
|||
$configure_user = true,
|
||||
$configure_user_role = true,
|
||||
$configure_endpoint = true,
|
||||
$public_url = 'http://127.0.0.1:9001/v1',
|
||||
$admin_url = 'http://127.0.0.1:9001/v1',
|
||||
$internal_url = 'http://127.0.0.1:9001/v1',
|
||||
$public_url = 'http://127.0.0.1:9001',
|
||||
$admin_url = 'http://127.0.0.1:9001',
|
||||
$internal_url = 'http://127.0.0.1:9001',
|
||||
) {
|
||||
|
||||
include designate::deps
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
The ``designate::api::enabled_extensions_v1`` parameter has been deprecated
|
||||
and has no effect. This parmaeter will be removed in a future release.
|
||||
|
||||
upgrade:
|
||||
- |
|
||||
The keystone endpoint urls no longer include ``/v1`` by default, since
|
||||
v1 API was already removed from Designate.
|
|
@ -46,7 +46,6 @@ describe 'designate::api' do
|
|||
is_expected.to contain_designate_config('service:api/default_limit_v2').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_designate_config('service:api/max_limit_v2').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_designate_config('service:api/pecan_debug').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_designate_config('service:api/enabled_extensions_v1').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_designate_config('service:api/enabled_extensions_v2').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_designate_config('service:api/enabled_extensions_admin').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to_not contain_designate__keystone__authtoken('designate_config')
|
||||
|
@ -70,7 +69,6 @@ describe 'designate::api' do
|
|||
:default_limit_v2 => '25',
|
||||
:max_limit_v2 => '1500',
|
||||
:pecan_debug => true,
|
||||
:enabled_extensions_v1 => 'diagnostics,quotas,reports,sync,touch',
|
||||
:enabled_extensions_v2 => 'experimental',
|
||||
:enabled_extensions_admin => 'reports,quotas,counts,tenants,target_sync',
|
||||
})
|
||||
|
@ -91,7 +89,6 @@ describe 'designate::api' do
|
|||
is_expected.to contain_designate_config('service:api/default_limit_v2').with_value(params[:default_limit_v2])
|
||||
is_expected.to contain_designate_config('service:api/max_limit_v2').with_value(params[:max_limit_v2])
|
||||
is_expected.to contain_designate_config('service:api/pecan_debug').with_value(params[:pecan_debug])
|
||||
is_expected.to contain_designate_config('service:api/enabled_extensions_v1').with_value(params[:enabled_extensions_v1])
|
||||
is_expected.to contain_designate_config('service:api/enabled_extensions_v2').with_value(params[:enabled_extensions_v2])
|
||||
is_expected.to contain_designate_config('service:api/enabled_extensions_admin').with_value(params[:enabled_extensions_admin])
|
||||
end
|
||||
|
|
|
@ -28,9 +28,9 @@ describe 'designate::keystone::auth' do
|
|||
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/designate::dns').with(
|
||||
:ensure => 'present',
|
||||
:public_url => "http://127.0.0.1:9001/v1",
|
||||
:admin_url => "http://127.0.0.1:9001/v1",
|
||||
:internal_url => "http://127.0.0.1:9001/v1"
|
||||
:public_url => "http://127.0.0.1:9001",
|
||||
:admin_url => "http://127.0.0.1:9001",
|
||||
:internal_url => "http://127.0.0.1:9001"
|
||||
) }
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue