api: Deprecate support for removed parameters
This removes leftover of a few options already removed from nova. 1. [DEFAULT] enable_network_quota This option was for nova-network and has been removed[1]. 2. [api] allow_instance_snapshots This was removed by [2] 3. [api] hide_server_address_states This was removed by [3] [1] 6fe31d97542467656cdecd90c2e0a9057a4f7480 [2] 1b112acb344bce835c98759fea2e89ffdfdd967b [3] 9b69afd4573bf6e44d696e2bdacac44f172e8f3c Change-Id: I937176f33f7391cac8a7da38fe6828b0b0d49759
This commit is contained in:
@@ -101,20 +101,6 @@
|
|||||||
# to Glance resources.
|
# to Glance resources.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*hide_server_address_states*]
|
|
||||||
# (optional) This option is a list of all instance states for which network address
|
|
||||||
# information should not be returned from the API.
|
|
||||||
# Defaults to $facts['os_service_default']
|
|
||||||
#
|
|
||||||
# [*allow_instance_snapshots*]
|
|
||||||
# (optional) Operators can turn off the ability for a user to take snapshots of their
|
|
||||||
# instances by setting this option to False
|
|
||||||
# Defaults to $facts['os_service_default']
|
|
||||||
#
|
|
||||||
# [*enable_network_quota*]
|
|
||||||
# (optional) This option is used to enable or disable quota checking for tenant networks
|
|
||||||
# Defaults to $facts['os_service_default']
|
|
||||||
#
|
|
||||||
# [*enable_instance_password*]
|
# [*enable_instance_password*]
|
||||||
# (optional) Enables returning of the instance password by the relevant server API calls
|
# (optional) Enables returning of the instance password by the relevant server API calls
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
@@ -160,6 +146,20 @@
|
|||||||
# enable this if you have a sanitizing proxy.
|
# enable this if you have a sanitizing proxy.
|
||||||
# Defaults to undef
|
# Defaults to undef
|
||||||
#
|
#
|
||||||
|
# [*hide_server_address_states*]
|
||||||
|
# (optional) This option is a list of all instance states for which network address
|
||||||
|
# information should not be returned from the API.
|
||||||
|
# Defaults to undef
|
||||||
|
#
|
||||||
|
# [*allow_instance_snapshots*]
|
||||||
|
# (optional) Operators can turn off the ability for a user to take snapshots of their
|
||||||
|
# instances by setting this option to False
|
||||||
|
# Defaults to undef
|
||||||
|
#
|
||||||
|
# [*enable_network_quota*]
|
||||||
|
# (optional) This option is used to enable or disable quota checking for tenant networks
|
||||||
|
# Defaults to undef
|
||||||
|
#
|
||||||
class nova::api(
|
class nova::api(
|
||||||
Boolean $enabled = true,
|
Boolean $enabled = true,
|
||||||
Boolean $manage_service = true,
|
Boolean $manage_service = true,
|
||||||
@@ -182,9 +182,6 @@ class nova::api(
|
|||||||
$max_limit = $facts['os_service_default'],
|
$max_limit = $facts['os_service_default'],
|
||||||
$compute_link_prefix = $facts['os_service_default'],
|
$compute_link_prefix = $facts['os_service_default'],
|
||||||
$glance_link_prefix = $facts['os_service_default'],
|
$glance_link_prefix = $facts['os_service_default'],
|
||||||
$hide_server_address_states = $facts['os_service_default'],
|
|
||||||
$allow_instance_snapshots = $facts['os_service_default'],
|
|
||||||
$enable_network_quota = $facts['os_service_default'],
|
|
||||||
$enable_instance_password = $facts['os_service_default'],
|
$enable_instance_password = $facts['os_service_default'],
|
||||||
$password_length = $facts['os_service_default'],
|
$password_length = $facts['os_service_default'],
|
||||||
$allow_resize_to_same_host = $facts['os_service_default'],
|
$allow_resize_to_same_host = $facts['os_service_default'],
|
||||||
@@ -195,6 +192,9 @@ class nova::api(
|
|||||||
# DEPRECATED PARAMETER
|
# DEPRECATED PARAMETER
|
||||||
$nova_metadata_wsgi_enabled = undef,
|
$nova_metadata_wsgi_enabled = undef,
|
||||||
$use_forwarded_for = undef,
|
$use_forwarded_for = undef,
|
||||||
|
$hide_server_address_states = undef,
|
||||||
|
$allow_instance_snapshots = undef,
|
||||||
|
$enable_network_quota = undef,
|
||||||
) inherits nova::params {
|
) inherits nova::params {
|
||||||
|
|
||||||
include nova::deps
|
include nova::deps
|
||||||
@@ -212,6 +212,16 @@ class nova::api(
|
|||||||
warning('The use_forwarded_for parameter has been deprecated.')
|
warning('The use_forwarded_for parameter has been deprecated.')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[
|
||||||
|
'hide_server_address_states',
|
||||||
|
'allow_instance_snapshots',
|
||||||
|
'enable_network_quota'
|
||||||
|
].each |String $opt| {
|
||||||
|
if getvar($opt) != undef {
|
||||||
|
warning("The ${opt} parameter has been deprecated and has no effect.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# sanitize service_name and prepare DEFAULT/enabled_apis parameter
|
# sanitize service_name and prepare DEFAULT/enabled_apis parameter
|
||||||
if $service_name == $::nova::params::api_service_name {
|
if $service_name == $::nova::params::api_service_name {
|
||||||
nova_config {
|
nova_config {
|
||||||
@@ -285,14 +295,11 @@ as a standalone service, or httpd for being run by a httpd server")
|
|||||||
|
|
||||||
nova_config {
|
nova_config {
|
||||||
'wsgi/api_paste_config': value => $api_paste_config;
|
'wsgi/api_paste_config': value => $api_paste_config;
|
||||||
'DEFAULT/enable_network_quota': value => $enable_network_quota;
|
|
||||||
'DEFAULT/password_length': value => $password_length;
|
'DEFAULT/password_length': value => $password_length;
|
||||||
'api/use_forwarded_for': value => pick($use_forwarded_for, $facts['os_service_default']);
|
'api/use_forwarded_for': value => pick($use_forwarded_for, $facts['os_service_default']);
|
||||||
'api/max_limit': value => $max_limit;
|
'api/max_limit': value => $max_limit;
|
||||||
'api/compute_link_prefix': value => $compute_link_prefix;
|
'api/compute_link_prefix': value => $compute_link_prefix;
|
||||||
'api/glance_link_prefix': value => $glance_link_prefix;
|
'api/glance_link_prefix': value => $glance_link_prefix;
|
||||||
'api/hide_server_address_states': value => $hide_server_address_states;
|
|
||||||
'api/allow_instance_snapshots': value => $allow_instance_snapshots;
|
|
||||||
'api/enable_instance_password': value => $enable_instance_password;
|
'api/enable_instance_password': value => $enable_instance_password;
|
||||||
'DEFAULT/allow_resize_to_same_host': value => $allow_resize_to_same_host;
|
'DEFAULT/allow_resize_to_same_host': value => $allow_resize_to_same_host;
|
||||||
'api/instance_list_per_project_cells': value => $instance_list_per_project_cells;
|
'api/instance_list_per_project_cells': value => $instance_list_per_project_cells;
|
||||||
@@ -301,6 +308,13 @@ as a standalone service, or httpd for being run by a httpd server")
|
|||||||
'api/list_records_by_skipping_down_cells': value => $list_records_by_skipping_down_cells;
|
'api/list_records_by_skipping_down_cells': value => $list_records_by_skipping_down_cells;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# TODO(tkajinam): Remove this after 2024.1 release
|
||||||
|
nova_config {
|
||||||
|
'api/hide_server_address_states': ensure => absent;
|
||||||
|
'api/allow_instance_snapshots': ensure => absent;
|
||||||
|
'DEFAULT/enable_network_quota': ensure => absent;
|
||||||
|
}
|
||||||
|
|
||||||
# Added arg and if statement prevents this from being run
|
# Added arg and if statement prevents this from being run
|
||||||
# where db is not active i.e. the compute
|
# where db is not active i.e. the compute
|
||||||
if $sync_db {
|
if $sync_db {
|
||||||
|
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- |
|
||||||
|
The following parameters of the ``nova::api`` class have been deprecated
|
||||||
|
and now have no effect.
|
||||||
|
|
||||||
|
- ``enable_network_quota``
|
||||||
|
- ``allow_instance_snapshots``
|
||||||
|
- ``hide_server_address_states``
|
@@ -60,9 +60,9 @@ describe 'nova::api' do
|
|||||||
is_expected.to contain_nova_config('api/max_limit').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_nova_config('api/max_limit').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_nova_config('api/compute_link_prefix').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_nova_config('api/compute_link_prefix').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_nova_config('api/glance_link_prefix').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_nova_config('api/glance_link_prefix').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_nova_config('api/hide_server_address_states').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_nova_config('api/hide_server_address_states').with_ensure('absent')
|
||||||
is_expected.to contain_nova_config('api/allow_instance_snapshots').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_nova_config('api/allow_instance_snapshots').with_ensure('absent')
|
||||||
is_expected.to contain_nova_config('DEFAULT/enable_network_quota').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_nova_config('DEFAULT/enable_network_quota').with_ensure('absent')
|
||||||
is_expected.to contain_nova_config('api/enable_instance_password').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_nova_config('api/enable_instance_password').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_nova_config('DEFAULT/password_length').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_nova_config('DEFAULT/password_length').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_nova_config('DEFAULT/allow_resize_to_same_host').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_nova_config('DEFAULT/allow_resize_to_same_host').with_value('<SERVICE DEFAULT>')
|
||||||
@@ -90,9 +90,6 @@ describe 'nova::api' do
|
|||||||
:max_limit => 1000,
|
:max_limit => 1000,
|
||||||
:compute_link_prefix => 'https://10.0.0.1:7777/',
|
:compute_link_prefix => 'https://10.0.0.1:7777/',
|
||||||
:glance_link_prefix => 'https://10.0.0.1:6666/',
|
:glance_link_prefix => 'https://10.0.0.1:6666/',
|
||||||
:hide_server_address_states => 'building',
|
|
||||||
:allow_instance_snapshots => true,
|
|
||||||
:enable_network_quota => false,
|
|
||||||
:enable_instance_password => true,
|
:enable_instance_password => true,
|
||||||
:password_length => 12,
|
:password_length => 12,
|
||||||
:allow_resize_to_same_host => true,
|
:allow_resize_to_same_host => true,
|
||||||
@@ -133,9 +130,6 @@ describe 'nova::api' do
|
|||||||
:enable_proxy_headers_parsing => true,
|
:enable_proxy_headers_parsing => true,
|
||||||
:max_request_body_size => '102400',
|
:max_request_body_size => '102400',
|
||||||
)
|
)
|
||||||
is_expected.to contain_nova_config('api/hide_server_address_states').with_value('building')
|
|
||||||
is_expected.to contain_nova_config('api/allow_instance_snapshots').with_value(true)
|
|
||||||
is_expected.to contain_nova_config('DEFAULT/enable_network_quota').with_value(false)
|
|
||||||
is_expected.to contain_nova_config('api/enable_instance_password').with_value(true)
|
is_expected.to contain_nova_config('api/enable_instance_password').with_value(true)
|
||||||
is_expected.to contain_nova_config('DEFAULT/password_length').with_value('12')
|
is_expected.to contain_nova_config('DEFAULT/password_length').with_value('12')
|
||||||
is_expected.to contain_nova_config('DEFAULT/allow_resize_to_same_host').with_value(true)
|
is_expected.to contain_nova_config('DEFAULT/allow_resize_to_same_host').with_value(true)
|
||||||
|
Reference in New Issue
Block a user