Puppet Class: nova::metadata

Inherits:
nova::params
Defined in:
manifests/metadata.pp

Overview

Class: nova::metadata

Setup and configure the Nova metadata API endpoint for wsgi

Parameters

neutron_metadata_proxy_shared_secret

(optional) Shared secret to validate proxies Neutron metadata requests Defaults to undef

metadata_cache_expiration

(optional) This option is the time (in seconds) to cache metadata. Defaults to $::os_service_default

local_metadata_per_cell

(optional) Indicates that the nova-metadata API service has been deployed per-cell, so that we can have better performance and data isolation in a multi-cell deployment. Users should consider the use of this configuration depending on how neutron is setup. If networks span cells, you might need to run nova-metadata API service globally. If your networks are segmented along cell boundaries, then you can run nova-metadata API service per cell. When running nova-metadata API service per cell, you should also configure each Neutron metadata-agent to point to the corresponding nova-metadata API service. Defaults to $::os_service_default

dhcp_domain

(optional) domain to use for building the hostnames Defaults to $::os_service_default

DEPRECATED

[*enabled_apis*]
 (optional) A list of apis to enable
 Defaults to undef.
enable_proxy_headers_parsing

(optional) This determines if the HTTPProxyToWSGI middleware should parse the proxy headers or not.(boolean value) Defaults to undef.

max_request_body_size

(Optional) Set max request body size Defaults to undef.

Parameters:

  • neutron_metadata_proxy_shared_secret (Any) (defaults to: undef)
  • metadata_cache_expiration (Any) (defaults to: $::os_service_default)
  • local_metadata_per_cell (Any) (defaults to: $::os_service_default)
  • dhcp_domain (Any) (defaults to: $::os_service_default)
  • enabled_apis (Any) (defaults to: undef)
  • enable_proxy_headers_parsing (Any) (defaults to: undef)
  • max_request_body_size (Any) (defaults to: undef)


46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'manifests/metadata.pp', line 46

class nova::metadata(
  $neutron_metadata_proxy_shared_secret        = undef,
  $metadata_cache_expiration                   = $::os_service_default,
  $local_metadata_per_cell                     = $::os_service_default,
  $dhcp_domain                                 = $::os_service_default,
  # DEPRECATED PARAMETERS
  $enabled_apis                                = undef,
  $enable_proxy_headers_parsing                = undef,
  $max_request_body_size                       = undef,
) inherits nova::params {

  include nova::deps
  include nova::db
  include nova::keystone::authtoken

  if $enabled_apis != undef {
    warning('enabled_apis parameter is deprecated, use nova::compute::enabled_apis instead.')
  }

  if $enable_proxy_headers_parsing {
    warning('enable_proxy_headers_parsing in ::nova::metadata is deprecated, has no effect \
and will be removed in the future. Please use the one ::nova::api.')
  }
  if $max_request_body_size {
    warning('max_request_body_size in ::nova::metadata is deprecated, has no effect \
and will be removed in the future. Please use the one ::nova::api.')
  }

  nova_config {
    'api/dhcp_domain':               value => $dhcp_domain;
    'api/metadata_cache_expiration': value => $metadata_cache_expiration;
    'api/local_metadata_per_cell':   value => $local_metadata_per_cell;
  }

  if ($neutron_metadata_proxy_shared_secret){
    nova_config {
      'neutron/service_metadata_proxy': value => true;
      'neutron/metadata_proxy_shared_secret':
        value => $neutron_metadata_proxy_shared_secret, secret => true;
    }
  } else {
    nova_config {
      'neutron/service_metadata_proxy':       value  => false;
      'neutron/metadata_proxy_shared_secret': ensure => absent;
    }
  }
}