f2ae993d7776ae1107530cce8827eddfc642a1de
[mirror/dsa-puppet.git] / 3rdparty / modules / nova / manifests / vncproxy.pp
1 # == Class: nova:vncproxy
2 #
3 # Configures nova vnc proxy
4 #
5 # === Parameters:
6 #
7 # [*enabled*]
8 #   (optional) Whether to run the vncproxy service
9 #   Defaults to false
10 #
11 # [*manage_service*]
12 #   (optional) Whether to start/stop the service
13 #   Defaults to true
14 #
15 # [*host*]
16 #   (optional) Host on which to listen for incoming requests
17 #   Defaults to '0.0.0.0'
18 #
19 # [*port*]
20 #   (optional) Port on which to listen for incoming requests
21 #   Defaults to '6080'
22 #
23 # [*ensure_package*]
24 #   (optional) The state of the nova-novncproxy package
25 #   Defaults to 'present'
26 #
27 # [*vncproxy_protocol*]
28 #   (optional) The protocol to communicate with the VNC proxy server
29 #   Defaults to 'http'
30 #
31 # [*vncproxy_path*]
32 #   (optional) The path at the end of the uri for communication with the VNC
33 #   proxy server
34 #   Defaults to '/vnc_auto.html'
35 #
36 class nova::vncproxy(
37   $enabled           = false,
38   $manage_service    = true,
39   $vncproxy_protocol = 'http',
40   $host              = '0.0.0.0',
41   $port              = '6080',
42   $vncproxy_path     = '/vnc_auto.html',
43   $ensure_package    = 'present'
44 ) {
45
46   include nova::params
47
48   # See http://nova.openstack.org/runnova/vncconsole.html for more details.
49
50   nova_config {
51     'DEFAULT/novncproxy_host': value => $host;
52     'DEFAULT/novncproxy_port': value => $port;
53   }
54
55   include ::nova::vncproxy::common
56
57   if ! defined(Package['python-numpy']) {
58     package { 'python-numpy':
59       ensure => present,
60       name   => $::nova::params::numpy_package_name,
61     }
62   }
63   nova::generic_service { 'vncproxy':
64     enabled        => $enabled,
65     manage_service => $manage_service,
66     package_name   => $::nova::params::vncproxy_package_name,
67     service_name   => $::nova::params::vncproxy_service_name,
68     ensure_package => $ensure_package,
69     require        => Package['python-numpy']
70   }
71
72 }