Add openstack_keystone_endpoint_type param

The new config option OPENSTACK_KEYSTONE_ENDPOINT_TYPE
is added in the [1] change and updated in change [2].

[1] https://review.opendev.org/c/openstack/horizon/+/844574
[2] https://review.opendev.org/c/openstack/horizon/+/868060

Depends-On: https://review.opendev.org/c/openstack/horizon/+/868060
Change-Id: I1be058ebf43f7f40d73ddf67c8356282a6acaacc
This commit is contained in:
Tobias Urdin 2022-06-03 11:45:37 +00:00 committed by Takashi Kajinami
parent 57f58bbb4d
commit 77dcef9b78
4 changed files with 61 additions and 41 deletions

View File

@ -108,6 +108,10 @@
# (optional) secondary endpoint type to use for the endpoints in the
# Keystone service catalog. Defaults to 'undef'.
#
# [*openstack_keystone_endpoint_type*]
# (optional) endpoint type to use for the keystone endpoint from the
# service catalog. Defaults to 'undef'.
#
# [*available_regions*]
# (optional) List of available regions. Value should be a list of tuple:
# [ ['urlOne', 'RegionOne'], ['urlTwo', 'RegionTwo'] ]
@ -573,6 +577,7 @@ class horizon(
$site_branding = undef,
$openstack_endpoint_type = undef,
$secondary_endpoint_type = undef,
$openstack_keystone_endpoint_type = undef,
$available_regions = undef,
$api_result_limit = 1000,
$api_result_page_size = 20,

View File

@ -0,0 +1,5 @@
---
features:
- |
Added ``openstack_keystone_endpoint_type`` to configure the endpoint
type to use for Keystone when grabbing it from service catalog.

View File

@ -99,50 +99,51 @@ describe 'horizon' do
context 'with overridden parameters' do
before do
params.merge!({
:cache_backend => 'django.core.cache.backends.memcached.MemcachedCache',
:cache_options => {'SOCKET_TIMEOUT' => 1,'SERVER_RETRIES' => 1,'DEAD_RETRY' => 1},
:cache_server_ip => '10.0.0.1',
:django_session_engine => 'django.contrib.sessions.backends.cache',
:keystone_default_role => 'SwiftOperator',
:keystone_url => 'https://keystone.example.com:4682',
:ssl_no_verify => true,
:log_handlers => ['console', 'syslog'],
:log_level => 'DEBUG',
:openstack_endpoint_type => 'internalURL',
:secondary_endpoint_type => 'ANY-VALUE',
:django_debug => true,
:site_branding => 'mysite',
:api_result_limit => 2000,
:api_result_page_size => 40,
:dropdown_max_items => 123,
:compress_offline => false,
:hypervisor_options => {'can_set_mount_point' => false, 'can_set_password' => true },
:cinder_options => {'enable_backup' => true },
:keystone_options => {'name' => 'native', 'can_edit_user' => true, 'can_edit_group' => true, 'can_edit_project' => true, 'can_edit_domain' => false, 'can_edit_role' => false},
:neutron_options => {'enable_quotas' => false, 'enable_security_group' => false, 'enable_distributed_router' => false, 'enable_ha_router' => false,
'supported_provider_types' => ['flat', 'vxlan'], 'supported_vnic_types' => ['*'], 'default_ipv4_subnet_pool_label' => 'None', },
:instance_options => {'disable_image' => true, 'disable_instance_snapshot' => true, 'disable_volume' => true, 'disable_volume_snapshot' => true, 'create_volume' => false },
:file_upload_temp_dir => '/var/spool/horizon',
:wsgi_processes => '30',
:wsgi_threads => '5',
:secure_cookies => true,
:api_versions => {'identity' => 3},
:keystone_multidomain_support => true,
:keystone_default_domain => 'domain.tld',
:overview_days_range => 1,
:session_timeout => 1800,
:timezone => 'Asia/Shanghai',
:available_themes => [
:cache_backend => 'django.core.cache.backends.memcached.MemcachedCache',
:cache_options => {'SOCKET_TIMEOUT' => 1,'SERVER_RETRIES' => 1,'DEAD_RETRY' => 1},
:cache_server_ip => '10.0.0.1',
:django_session_engine => 'django.contrib.sessions.backends.cache',
:keystone_default_role => 'SwiftOperator',
:keystone_url => 'https://keystone.example.com:4682',
:ssl_no_verify => true,
:log_handlers => ['console', 'syslog'],
:log_level => 'DEBUG',
:openstack_endpoint_type => 'internalURL',
:secondary_endpoint_type => 'ANY-VALUE',
:openstack_keystone_endpoint_type => 'public',
:django_debug => true,
:site_branding => 'mysite',
:api_result_limit => 2000,
:api_result_page_size => 40,
:dropdown_max_items => 123,
:compress_offline => false,
:hypervisor_options => {'can_set_mount_point' => false, 'can_set_password' => true },
:cinder_options => {'enable_backup' => true },
:keystone_options => {'name' => 'native', 'can_edit_user' => true, 'can_edit_group' => true, 'can_edit_project' => true, 'can_edit_domain' => false, 'can_edit_role' => false},
:neutron_options => {'enable_quotas' => false, 'enable_security_group' => false, 'enable_distributed_router' => false, 'enable_ha_router' => false,
'supported_provider_types' => ['flat', 'vxlan'], 'supported_vnic_types' => ['*'], 'default_ipv4_subnet_pool_label' => 'None', },
:instance_options => {'disable_image' => true, 'disable_instance_snapshot' => true, 'disable_volume' => true, 'disable_volume_snapshot' => true, 'create_volume' => false },
:file_upload_temp_dir => '/var/spool/horizon',
:wsgi_processes => '30',
:wsgi_threads => '5',
:secure_cookies => true,
:api_versions => {'identity' => 3},
:keystone_multidomain_support => true,
:keystone_default_domain => 'domain.tld',
:overview_days_range => 1,
:session_timeout => 1800,
:timezone => 'Asia/Shanghai',
:available_themes => [
{ 'name' => 'default', 'label' => 'Default', 'path' => 'themes/default' },
{ 'name' => 'material', 'label' => 'Material', 'path' => 'themes/material' },
],
:default_theme => 'default',
:password_autocomplete => 'on',
:images_panel => 'angular',
:create_image_defaults => {'image_visibility' => 'private'},
:password_retrieve => true,
:enable_secure_proxy_ssl_header => true,
:secure_proxy_addr_header => 'HTTP_X_FORWARDED_FOR',
:default_theme => 'default',
:password_autocomplete => 'on',
:images_panel => 'angular',
:create_image_defaults => {'image_visibility' => 'private'},
:password_retrieve => true,
:enable_secure_proxy_ssl_header => true,
:secure_proxy_addr_header => 'HTTP_X_FORWARDED_FOR',
})
end
@ -200,6 +201,7 @@ describe 'horizon' do
" 'enable_scheduler_hints': True,",
'OPENSTACK_ENDPOINT_TYPE = "internalURL"',
'SECONDARY_ENDPOINT_TYPE = "ANY-VALUE"',
'OPENSTACK_KEYSTONE_ENDPOINT_TYPE = "public"',
'API_RESULT_LIMIT = 2000',
'API_RESULT_PAGE_SIZE = 40',
'DROPDOWN_MAX_ITEMS = 123',

View File

@ -614,6 +614,14 @@ OPENSTACK_ENDPOINT_TYPE = "<%= @openstack_endpoint_type %>"
SECONDARY_ENDPOINT_TYPE = "<%= @secondary_endpoint_type %>"
<% end -%>
# OPENSTACK_KEYSTONE_ENDPOINT_TYPE specifies the endpoint type use from
# service catalog when looking up the Keystone (identity) endpoint. This
# parameter overrides OPENSTACK_ENDPOINT_TYPE.
#OPENSTACK_KEYSTONE_ENDPOINT_TYPE = None
<% if @openstack_keystone_endpoint_type -%>
OPENSTACK_KEYSTONE_ENDPOINT_TYPE = "<%= @openstack_keystone_endpoint_type %>"
<% end -%>
# The number of objects (Swift containers/objects or images) to display
# on a single page before providing a paging element (a "more" link)
# to paginate results.