Deprecate service validation for cinder-api
Following the past deprecation in puppet-keystone[1], this change deprecates service validation for cinder-api. [1] 3c95205e0253895e477b9135c10f5175d4166cfc Change-Id: I39350edfd17e15ac2470423896cac33e26ff3c93
This commit is contained in:
parent
03b5537d4f
commit
d944a76b95
@ -39,10 +39,6 @@
|
||||
# without specifying a type.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*validate*]
|
||||
# (optional) Whether to validate the service is working after any service refreshes
|
||||
# Defaults to false
|
||||
#
|
||||
# [*sync_db*]
|
||||
# (Optional) Run db sync on the node.
|
||||
# Defaults to true
|
||||
@ -117,6 +113,11 @@
|
||||
# requests. For example, boot-from-volume.
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*validate*]
|
||||
# (optional) Whether to validate the service is working after any service
|
||||
# refreshes
|
||||
# Defaults to undef
|
||||
#
|
||||
class cinder::api (
|
||||
$service_workers = $::os_workers,
|
||||
$package_ensure = 'present',
|
||||
@ -127,7 +128,6 @@ class cinder::api (
|
||||
$default_volume_type = $::os_service_default,
|
||||
$ratelimits_factory =
|
||||
'cinder.api.v2.limits:RateLimitingMiddleware.factory',
|
||||
$validate = false,
|
||||
$sync_db = true,
|
||||
$public_endpoint = $::os_service_default,
|
||||
$osapi_volume_base_url = $::os_service_default,
|
||||
@ -143,7 +143,8 @@ class cinder::api (
|
||||
$osapi_volume_listen_port = $::os_service_default,
|
||||
$use_forwarded_for = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$os_region_name = undef
|
||||
$os_region_name = undef,
|
||||
$validate = undef,
|
||||
) inherits cinder::params {
|
||||
|
||||
include cinder::deps
|
||||
@ -155,6 +156,10 @@ class cinder::api (
|
||||
Use cinder::nova::region_name instead')
|
||||
}
|
||||
|
||||
if $validate != undef {
|
||||
warning('The cinder::api::validate parameter is deprecated and has no effect')
|
||||
}
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_service)
|
||||
validate_legacy(Boolean, 'validate_bool', $enabled)
|
||||
|
||||
@ -250,20 +255,4 @@ running as a standalone service, or httpd for being run by a httpd server")
|
||||
'filter:ratelimit/limits': value => $ratelimits;
|
||||
}
|
||||
}
|
||||
|
||||
if $validate {
|
||||
$keystone_project_name = $::cinder::keystone::authtoken::project_name
|
||||
$keystone_username = $::cinder::keystone::authtoken::username
|
||||
$keystone_password = $::cinder::keystone::authtoken::password
|
||||
|
||||
$validation_cmd = {
|
||||
'cinder-api' => {
|
||||
# lint:ignore:140chars
|
||||
'command' => "cinder --os-auth-url ${::cinder::keystone::authtoken::www_authenticate_uri} --os-project-name ${keystone_project_name} --os-username ${keystone_username} --os-password ${keystone_password} list",
|
||||
# lint:endignore
|
||||
}
|
||||
}
|
||||
create_resources('openstacklib::service_validation', $validation_cmd, {'subscribe' => 'Anchor[cinder::service::end]'})
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
The service validation feature of the ``cinder::api`` class is deprecated,
|
||||
and the ``cinder::api::validate`` parameter has no effect now.
|
@ -118,18 +118,6 @@ describe 'cinder::api' do
|
||||
)}
|
||||
end
|
||||
|
||||
context 'while validating the service with default command' do
|
||||
let :params do
|
||||
req_params.merge({
|
||||
:validate => true,
|
||||
})
|
||||
end
|
||||
it { is_expected.to contain_openstacklib__service_validation('cinder-api').with(
|
||||
:command => 'cinder --os-auth-url http://localhost:5000 --os-project-name services --os-username cinder --os-password foo list',
|
||||
:subscribe => 'Anchor[cinder::service::end]',
|
||||
)}
|
||||
end
|
||||
|
||||
context 'with a custom auth_strategy' do
|
||||
let :params do
|
||||
req_params.merge({'auth_strategy' => 'noauth'})
|
||||
|
Loading…
Reference in New Issue
Block a user