Support a few more options for novnc proxy

Change-Id: Id027a57594ecca1750053326a0d33b8910e766e5
This commit is contained in:
Takashi Kajinami 2024-11-09 11:02:12 +09:00
parent 26de83712a
commit ffa241561a
3 changed files with 25 additions and 0 deletions

View File

@ -206,10 +206,18 @@
# 'key-data' }, where 'key-type' is one of (ssh-rsa, ssh-dsa, ssh-ecdsa, # 'key-data' }, where 'key-type' is one of (ssh-rsa, ssh-dsa, ssh-ecdsa,
# ssh-ed25519) and 'key-data' is the contents of the private key file. # ssh-ed25519) and 'key-data' is the contents of the private key file.
# #
# [*record*]
# (optional) Filename that will be used for storing websocket frames.
# Defaults to $facts['os_service_default']
#
# [*ssl_only*] # [*ssl_only*]
# (optional) Disallow non-encrypted connections. # (optional) Disallow non-encrypted connections.
# Defaults to $facts['os_service_default'] # Defaults to $facts['os_service_default']
# #
# [*source_is_ipv6*]
# (optional) Set to True if source host is addressed with IPv6.
# Defaults to $facts['os_service_default']
#
# [*cert*] # [*cert*]
# (optional) Path to SSL certificate file. # (optional) Path to SSL certificate file.
# Defaults to $facts['os_service_default'] # Defaults to $facts['os_service_default']
@ -376,7 +384,9 @@ class nova(
$key_file = undef, $key_file = undef,
Optional[Nova::SshKey] $nova_public_key = undef, Optional[Nova::SshKey] $nova_public_key = undef,
Optional[Nova::SshKey] $nova_private_key = undef, Optional[Nova::SshKey] $nova_private_key = undef,
$record = $facts['os_service_default'],
$ssl_only = $facts['os_service_default'], $ssl_only = $facts['os_service_default'],
$source_is_ipv6 = $facts['os_service_default'],
$cert = $facts['os_service_default'], $cert = $facts['os_service_default'],
$key = $facts['os_service_default'], $key = $facts['os_service_default'],
$console_ssl_ciphers = $facts['os_service_default'], $console_ssl_ciphers = $facts['os_service_default'],
@ -480,7 +490,9 @@ class nova(
} }
nova_config { nova_config {
'DEFAULT/record': value => $record;
'DEFAULT/ssl_only': value => $ssl_only; 'DEFAULT/ssl_only': value => $ssl_only;
'DEFAULT/source_is_ipv6': value => $source_is_ipv6;
'DEFAULT/cert': value => $cert; 'DEFAULT/cert': value => $cert;
'DEFAULT/key': value => $key; 'DEFAULT/key': value => $key;
'console/ssl_ciphers': value => join(any2array($console_ssl_ciphers), ':'); 'console/ssl_ciphers': value => join(any2array($console_ssl_ciphers), ':');

View File

@ -0,0 +1,7 @@
---
features:
- |
The following parameters have been added to the ``nova`` class.
- ``record``
- ``source_is_ipv6``

View File

@ -86,7 +86,9 @@ describe 'nova' do
is_expected.to contain_nova_config('DEFAULT/initial_cpu_allocation_ratio').with_value('<SERVICE DEFAULT>') is_expected.to contain_nova_config('DEFAULT/initial_cpu_allocation_ratio').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('DEFAULT/initial_ram_allocation_ratio').with_value('<SERVICE DEFAULT>') is_expected.to contain_nova_config('DEFAULT/initial_ram_allocation_ratio').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('DEFAULT/initial_disk_allocation_ratio').with_value('<SERVICE DEFAULT>') is_expected.to contain_nova_config('DEFAULT/initial_disk_allocation_ratio').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('DEFAULT/record').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('DEFAULT/ssl_only').with_value('<SERVICE DEFAULT>') is_expected.to contain_nova_config('DEFAULT/ssl_only').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('DEFAULT/source_is_ipv6').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('DEFAULT/cert').with_value('<SERVICE DEFAULT>') is_expected.to contain_nova_config('DEFAULT/cert').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('DEFAULT/key').with_value('<SERVICE DEFAULT>') is_expected.to contain_nova_config('DEFAULT/key').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('console/ssl_ciphers').with_value('<SERVICE DEFAULT>') is_expected.to contain_nova_config('console/ssl_ciphers').with_value('<SERVICE DEFAULT>')
@ -145,7 +147,9 @@ describe 'nova' do
:upgrade_level_scheduler => '1.0.0', :upgrade_level_scheduler => '1.0.0',
:purge_config => false, :purge_config => false,
:my_ip => '192.0.2.1', :my_ip => '192.0.2.1',
:record => '/var/lib/nova/novnc.log',
:ssl_only => true, :ssl_only => true,
:source_is_ipv6 => false,
:cert => '/etc/ssl/private/snakeoil.pem', :cert => '/etc/ssl/private/snakeoil.pem',
:key => '/etc/ssl/certs/snakeoil.pem', :key => '/etc/ssl/certs/snakeoil.pem',
:console_ssl_ciphers => 'kEECDH+aECDSA+AES:kEECDH+AES+aRSA:kEDH+aRSA+AES', :console_ssl_ciphers => 'kEECDH+aECDSA+AES:kEECDH+AES+aRSA:kEDH+aRSA+AES',
@ -235,7 +239,9 @@ describe 'nova' do
is_expected.to contain_nova_config('DEFAULT/periodic_fuzzy_delay').with_value('61') is_expected.to contain_nova_config('DEFAULT/periodic_fuzzy_delay').with_value('61')
is_expected.to contain_nova_config('vif_plug_ovs/ovsdb_connection').with_value('tcp:127.0.0.1:6640') is_expected.to contain_nova_config('vif_plug_ovs/ovsdb_connection').with_value('tcp:127.0.0.1:6640')
is_expected.to contain_nova_config('DEFAULT/long_rpc_timeout').with_value('1800') is_expected.to contain_nova_config('DEFAULT/long_rpc_timeout').with_value('1800')
is_expected.to contain_nova_config('DEFAULT/record').with_value('/var/lib/nova/novnc.log')
is_expected.to contain_nova_config('DEFAULT/ssl_only').with_value(true) is_expected.to contain_nova_config('DEFAULT/ssl_only').with_value(true)
is_expected.to contain_nova_config('DEFAULT/source_is_ipv6').with_value(false)
is_expected.to contain_nova_config('DEFAULT/cert').with_value('/etc/ssl/private/snakeoil.pem') is_expected.to contain_nova_config('DEFAULT/cert').with_value('/etc/ssl/private/snakeoil.pem')
is_expected.to contain_nova_config('DEFAULT/key').with_value('/etc/ssl/certs/snakeoil.pem') is_expected.to contain_nova_config('DEFAULT/key').with_value('/etc/ssl/certs/snakeoil.pem')
is_expected.to contain_nova_config('console/ssl_ciphers').with_value('kEECDH+aECDSA+AES:kEECDH+AES+aRSA:kEDH+aRSA+AES') is_expected.to contain_nova_config('console/ssl_ciphers').with_value('kEECDH+aECDSA+AES:kEECDH+AES+aRSA:kEDH+aRSA+AES')