compute: Fix nova vncproxy protocol
https://review.openstack.org/#/c/190464/ introduced a new parameter for nova::vncproxy with a default value set to http. To be able to configure vncproxy with https we need to add also a new parameter in cloud::compute::consoleproxy Change-Id: I91a85cf22fdbdf762e9a59d8087b32bcedb7e085
This commit is contained in:
parent
ee2a116ad8
commit
360ddfaae8
@ -27,6 +27,10 @@
|
||||
# (optional) Nova's console type (spice or novnc)
|
||||
# Defaults to 'novnc'
|
||||
#
|
||||
# [*protocol*]
|
||||
# (optional) Nova's console protocol.
|
||||
# Defaults to 'http'
|
||||
#
|
||||
# [*novnc_port*]
|
||||
# (optional) TCP port to bind Nova novnc service.
|
||||
# Defaults to '6080'
|
||||
@ -43,6 +47,7 @@
|
||||
class cloud::compute::consoleproxy(
|
||||
$api_eth = '127.0.0.1',
|
||||
$console = 'novnc',
|
||||
$protocol = 'http',
|
||||
$novnc_port = '6080',
|
||||
$spice_port = '6082',
|
||||
$firewall_settings = {},
|
||||
@ -52,24 +57,27 @@ class cloud::compute::consoleproxy(
|
||||
|
||||
case $console {
|
||||
'spice': {
|
||||
$port = $spice_port
|
||||
$proxy = 'spicehtml5proxy'
|
||||
$port = $spice_port
|
||||
class { 'nova::spicehtml5proxy':
|
||||
enabled => true,
|
||||
host => $api_eth,
|
||||
port => $port
|
||||
}
|
||||
}
|
||||
'novnc': {
|
||||
$port = $novnc_port
|
||||
$proxy = 'vncproxy'
|
||||
$port = $novnc_port
|
||||
class { 'nova::vncproxy':
|
||||
enabled => true,
|
||||
host => $api_eth,
|
||||
port => $port,
|
||||
vncproxy_protocol => $protocol
|
||||
}
|
||||
}
|
||||
default: {
|
||||
fail("Unsupported console type ${console}")
|
||||
}
|
||||
}
|
||||
|
||||
class { "nova::${proxy}":
|
||||
enabled => true,
|
||||
host => $api_eth,
|
||||
port => $port
|
||||
}
|
||||
|
||||
if $::cloud::manage_firewall {
|
||||
cloud::firewall::rule{ "100 allow ${console} access":
|
||||
port => $port,
|
||||
|
@ -81,9 +81,10 @@ describe 'cloud::compute::consoleproxy' do
|
||||
|
||||
it 'configure nova-vncproxy' do
|
||||
is_expected.to contain_class('nova::vncproxy').with(
|
||||
:enabled => true,
|
||||
:host => '10.0.0.1',
|
||||
:port => '6080'
|
||||
:enabled => true,
|
||||
:host => '10.0.0.1',
|
||||
:port => '6080',
|
||||
:vncproxy_protocol => 'http'
|
||||
)
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user