File: wsgi.pp

package info (click to toggle)
puppet-module-oslo 27.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 992 kB
  • sloc: ruby: 2,436; python: 33; sh: 10; makefile: 10
file content (64 lines) | stat: -rw-r--r-- 2,503 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# == Define: oslo::service::wsgi
#
# Configure oslo_service options
#
# This resource configures wsgi service parameters of oslo.service library.
#
# === Parameters:
#
# [*api_paste_config*]
#   (optional) File name for the paste.deploy config for api service.
#   (string value)
#   Defaults to $facts['os_service_default'].
#
# [*client_socket_timeout*]
#   (optional) Timeout for client connections' socket operations. A value of
#   '0' means wait forever. (integer value)
#   Defaults to $facts['os_service_default'].
#
# [*max_header_line*]
#   (optional) Maximum line size of message headers to be accepted.
#   (integer value)
#   Defaults to $facts['os_service_default'].
#
# [*tcp_keepidle*]
#   (optional) # Sets the value of TCP_KEEPIDLE in seconds for each server socket.
#   (integer value)
#   Defaults to $facts['os_service_default'].
#
# [*wsgi_default_pool_size*]
#   (optional) Size of the pool of greenthreads used by wsgi (integer value)
#   Defaults to $facts['os_service_default'].
#
# [*wsgi_keep_alive*]
#   (optional) If False, closes the client socket connection explicitly.
#   (boolean value)
#   Defaults to $facts['os_service_default'].
#
# [*wsgi_log_format*]
#   (optional) A python format string that is used as the template to generate
#   log lines. (string value)
#   Defaults to $facts['os_service_default'].
#   Example: '%(client_ip)s "%(request_line)s" status: %(status_code)s len: \
#             %(body_length)s time: %(wall_seconds).7f'
#
define oslo::service::wsgi (
  $api_paste_config       = $facts['os_service_default'],
  $client_socket_timeout  = $facts['os_service_default'],
  $max_header_line        = $facts['os_service_default'],
  $tcp_keepidle           = $facts['os_service_default'],
  $wsgi_default_pool_size = $facts['os_service_default'],
  $wsgi_keep_alive        = $facts['os_service_default'],
  $wsgi_log_format        = $facts['os_service_default'],
) {
  $service_options = {
    'DEFAULT/api_paste_config'       => { value => $api_paste_config },
    'DEFAULT/client_socket_timeout'  => { value => $client_socket_timeout },
    'DEFAULT/max_header_line'        => { value => $max_header_line },
    'DEFAULT/tcp_keepidle'           => { value => $tcp_keepidle },
    'DEFAULT/wsgi_default_pool_size' => { value => $wsgi_default_pool_size },
    'DEFAULT/wsgi_keep_alive'        => { value => $wsgi_keep_alive },
    'DEFAULT/wsgi_log_format'        => { value => $wsgi_log_format },
  }
  create_resources($name, $service_options)
}