Merge "Remove v1 api support"

changes/57/726657/1
Zuul 3 years ago committed by Gerrit Code Review
commit b6f39066e0
  1. 10
      manifests/api.pp
  2. 4
      releasenotes/notes/remove-v1-api-0b47239b7ea1a4a0.yaml
  3. 3
      spec/classes/designate_api_spec.rb

@ -25,10 +25,6 @@
# "keystone".
# Defaults to $::os_service_default
#
# [*enable_api_v1*]
# (optional) Enable Designate API Version 1 (deprecated).
# Defaults to $::os_service_default
#
# [*enable_api_v2*]
# (optional) Enable Designate API Version 2.
# Defaults to $::os_service_default
@ -98,7 +94,6 @@ class designate::api (
$enabled = true,
$service_ensure = 'running',
$auth_strategy = $::os_service_default,
$enable_api_v1 = $::os_service_default,
$enable_api_v2 = $::os_service_default,
$enable_api_admin = $::os_service_default,
$api_base_uri = $::os_service_default,
@ -119,15 +114,10 @@ class designate::api (
include designate::deps
if !is_service_default($enable_api_v1) {
warning('Version 1 of API is deprecated.')
}
# API Service
designate_config {
'service:api/listen' : value => $listen;
'service:api/auth_strategy' : value => $auth_strategy;
'service:api/enable_api_v1' : value => $enable_api_v1;
'service:api/enable_api_v2' : value => $enable_api_v2;
'service:api/enable_api_admin' : value => $enable_api_admin;
'service:api/api_base_uri' : value => $api_base_uri;

@ -0,0 +1,4 @@
---
deprecations:
- |
The ``designate::api::enable_v1_api`` parameter has been removed.

@ -33,7 +33,6 @@ describe 'designate::api' do
it 'configures designate-api with default parameters' do
is_expected.to contain_designate_config('service:api/auth_strategy').with_value('<SERVICE DEFAULT>')
is_expected.to contain_designate_config('service:api/enable_api_v1').with_value('<SERVICE DEFAULT>')
is_expected.to contain_designate_config('service:api/enable_api_v2').with_value('<SERVICE DEFAULT>')
is_expected.to contain_designate_config('service:api/enable_api_admin').with_value('<SERVICE DEFAULT>')
is_expected.to contain_designate_config('service:api/api_base_uri').with_value('<SERVICE DEFAULT>')
@ -58,7 +57,6 @@ describe 'designate::api' do
before do
params.merge!({
:auth_strategy => 'noauth',
:enable_api_v1 => false,
:enable_api_v2 => true,
:enable_api_admin => true,
:api_base_uri => 'http://myhost.es:9001/',
@ -80,7 +78,6 @@ describe 'designate::api' do
it 'configure service_api' do
is_expected.to contain_designate_config('service:api/auth_strategy').with_value(params[:auth_strategy])
is_expected.to contain_designate_config('service:api/enable_api_v1').with_value(params[:enable_api_v1])
is_expected.to contain_designate_config('service:api/enable_api_v2').with_value(params[:enable_api_v2])
is_expected.to contain_designate_config('service:api/enable_api_admin').with_value(params[:enable_api_admin])
is_expected.to contain_designate_config('service:api/api_base_uri').with_value(params[:api_base_uri])

Loading…
Cancel
Save