diff --git a/manifests/compute.pp b/manifests/compute.pp index 394c77097..b4a2d1b4e 100644 --- a/manifests/compute.pp +++ b/manifests/compute.pp @@ -44,7 +44,7 @@ # # [*vncproxy_port*] # (optional) The port to communicate with the VNC proxy server -# Defaults to '6080' +# Defaults to 6080 # # [*vncproxy_path*] # (optional) The path at the end of the uri for communication with the VNC proxy server @@ -271,7 +271,7 @@ class nova::compute ( $vncserver_proxyclient_address = $facts['os_service_default'], Optional[String[1]] $vncproxy_host = undef, Enum['http', 'https'] $vncproxy_protocol = 'http', - $vncproxy_port = '6080', + Stdlib::Port $vncproxy_port = 6080, String $vncproxy_path = '/vnc_auto.html', $force_config_drive = $facts['os_service_default'], $instance_usage_audit = $facts['os_service_default'], diff --git a/manifests/compute/spice.pp b/manifests/compute/spice.pp index 5adb77519..2b9ee6c25 100644 --- a/manifests/compute/spice.pp +++ b/manifests/compute/spice.pp @@ -23,7 +23,7 @@ # # [*proxy_port*] # (optional) Port for the html5 console proxy -# Defaults to '6082' +# Defaults to 6082 # # [*proxy_protocol*] # (optional) Protocol for the html5 console proxy @@ -39,7 +39,7 @@ class nova::compute::spice( $server_proxyclient_address = $facts['os_service_default'], Optional[String[1]] $proxy_host = undef, Enum['http', 'https'] $proxy_protocol = 'http', - $proxy_port = '6082', + Stdlib::Port $proxy_port = 6082, String $proxy_path = '/spice_auto.html', ) { diff --git a/manifests/vncproxy.pp b/manifests/vncproxy.pp index 88be645b4..a191a0758 100644 --- a/manifests/vncproxy.pp +++ b/manifests/vncproxy.pp @@ -18,7 +18,7 @@ # # [*port*] # (optional) Port on which to listen for incoming requests -# Defaults to '6080' +# Defaults to 6080 # # [*ensure_package*] # (optional) The state of the nova-novncproxy package @@ -66,7 +66,7 @@ class nova::vncproxy( Boolean $manage_service = true, Enum['http', 'https'] $vncproxy_protocol = 'http', String[1] $host = '0.0.0.0', - $port = '6080', + Stdlib::Port $port = 6080, String $vncproxy_path = '/vnc_auto.html', $ensure_package = 'present', Boolean $allow_noauth = true, diff --git a/manifests/vncproxy/common.pp b/manifests/vncproxy/common.pp index 13e032a0d..6aa33f74b 100644 --- a/manifests/vncproxy/common.pp +++ b/manifests/vncproxy/common.pp @@ -19,7 +19,7 @@ class nova::vncproxy::common ( Optional[String[1]] $vncproxy_host = undef, Optional[Enum['http', 'https']] $vncproxy_protocol = undef, - $vncproxy_port = undef, + Optional[Stdlib::Port] $vncproxy_port = undef, Optional[String] $vncproxy_path = undef, ) { diff --git a/releasenotes/notes/console-port-interger-2e902534adfec564.yaml b/releasenotes/notes/console-port-interger-2e902534adfec564.yaml new file mode 100644 index 000000000..baaa1b0d1 --- /dev/null +++ b/releasenotes/notes/console-port-interger-2e902534adfec564.yaml @@ -0,0 +1,9 @@ +--- +upgrade: + - | + The following parameters now require integer values. + + - ``nova::compute::vncproxy_port`` + - ``nova::compute::spice::proxy_port`` + - ``nova::vncproxy::port`` + - ``nova::vncproxy::common:vncproxy_port`` diff --git a/spec/classes/nova_compute_spec.rb b/spec/classes/nova_compute_spec.rb index 67798419b..52142e1cf 100644 --- a/spec/classes/nova_compute_spec.rb +++ b/spec/classes/nova_compute_spec.rb @@ -84,6 +84,7 @@ describe 'nova::compute' do { :enabled => false, :ensure_package => '2012.1-2', :vncproxy_host => '127.0.0.1', + :vncproxy_port => 16080, :use_cow_images => false, :mkisofs_cmd => 'mkisofs', :force_raw_images => false, @@ -138,7 +139,7 @@ describe 'nova::compute' do is_expected.to contain_nova_config('vnc/enabled').with_value(true) is_expected.to contain_nova_config('vnc/server_proxyclient_address').with_value('') is_expected.to contain_nova_config('vnc/novncproxy_base_url').with_value( - 'http://127.0.0.1:6080/vnc_auto.html' + 'http://127.0.0.1:16080/vnc_auto.html' ) end diff --git a/spec/classes/nova_vnc_proxy_spec.rb b/spec/classes/nova_vnc_proxy_spec.rb index 76601149b..6c69d533d 100644 --- a/spec/classes/nova_vnc_proxy_spec.rb +++ b/spec/classes/nova_vnc_proxy_spec.rb @@ -14,7 +14,7 @@ describe 'nova::vncproxy' do context 'with default parameters' do it { is_expected.to contain_nova_config('vnc/novncproxy_host').with_value('0.0.0.0') } - it { is_expected.to contain_nova_config('vnc/novncproxy_port').with_value('6080') } + it { is_expected.to contain_nova_config('vnc/novncproxy_port').with_value(6080) } it { is_expected.to contain_nova_config('vnc/auth_schemes').with_value('none') } it { is_expected.to contain_nova_config('vnc/vencrypt_client_key').with_ensure('absent')} it { is_expected.to contain_nova_config('vnc/vencrypt_client_cert').with_ensure('absent')}