2013-12-12 00:16:24 +11:00
|
|
|
# == Class: nova::api
|
2012-10-14 13:00:26 -07:00
|
|
|
#
|
2013-12-12 00:16:24 +11:00
|
|
|
# Setup and configure the Nova API endpoint
|
|
|
|
#
|
|
|
|
# === Parameters
|
|
|
|
#
|
|
|
|
# [*admin_password*]
|
|
|
|
# (required) The password to set for the nova admin user in keystone
|
|
|
|
#
|
|
|
|
# [*enabled*]
|
|
|
|
# (optional) Whether the nova api service will be run
|
2015-05-20 11:02:10 -07:00
|
|
|
# Defaults to true
|
2013-12-12 00:16:24 +11:00
|
|
|
#
|
2015-11-04 12:07:10 +02:00
|
|
|
# [*api_paste_config*]
|
|
|
|
# (optional) File name for the paste.deploy config for nova-api
|
|
|
|
# Defaults to 'api-paste.ini'
|
|
|
|
#
|
2014-01-13 22:58:10 -06:00
|
|
|
# [*manage_service*]
|
|
|
|
# (optional) Whether to start/stop the service
|
|
|
|
# Defaults to true
|
|
|
|
#
|
2013-12-12 00:16:24 +11:00
|
|
|
# [*ensure_package*]
|
|
|
|
# (optional) Whether the nova api package will be installed
|
|
|
|
# Defaults to 'present'
|
|
|
|
#
|
|
|
|
# [*auth_host*]
|
2015-01-27 21:24:14 -05:00
|
|
|
# (optional) DEPRECATED. The IP of the server running keystone
|
2013-12-12 00:16:24 +11:00
|
|
|
# Defaults to '127.0.0.1'
|
|
|
|
#
|
|
|
|
# [*auth_port*]
|
2015-01-27 21:24:14 -05:00
|
|
|
# (optional) DEPRECATED. The port to use when authenticating against Keystone
|
2013-12-12 00:16:24 +11:00
|
|
|
# Defaults to 35357
|
|
|
|
#
|
|
|
|
# [*auth_protocol*]
|
2015-01-27 21:24:14 -05:00
|
|
|
# (optional) DEPRECATED. The protocol to use when authenticating against Keystone
|
2013-12-12 00:16:24 +11:00
|
|
|
# Defaults to 'http'
|
|
|
|
#
|
|
|
|
# [*auth_uri*]
|
2015-01-27 21:24:14 -05:00
|
|
|
# (optional) Complete public Identity API endpoint.
|
2013-12-12 00:16:24 +11:00
|
|
|
# Defaults to false
|
|
|
|
#
|
2015-01-27 21:24:14 -05:00
|
|
|
# [*identity_uri*]
|
|
|
|
# (optional) Complete admin Identity API endpoint.
|
|
|
|
# Defaults to: false
|
|
|
|
#
|
2013-12-12 00:16:24 +11:00
|
|
|
# [*auth_admin_prefix*]
|
2015-01-27 21:24:14 -05:00
|
|
|
# (optional) DEPRECATED. Prefix to prepend at the beginning of the keystone path
|
2013-12-12 00:16:24 +11:00
|
|
|
# Defaults to false
|
|
|
|
#
|
2014-02-23 11:30:07 +08:00
|
|
|
# [*auth_version*]
|
|
|
|
# (optional) API version of the admin Identity API endpoint
|
|
|
|
# for example, use 'v3.0' for the keystone version 3.0 api
|
|
|
|
# Defaults to false
|
|
|
|
#
|
2013-12-12 00:16:24 +11:00
|
|
|
# [*admin_tenant_name*]
|
|
|
|
# (optional) The name of the tenant to create in keystone for use by the nova services
|
|
|
|
# Defaults to 'services'
|
|
|
|
#
|
|
|
|
# [*admin_user*]
|
|
|
|
# (optional) The name of the user to create in keystone for use by the nova services
|
|
|
|
# Defaults to 'nova'
|
|
|
|
#
|
|
|
|
# [*api_bind_address*]
|
|
|
|
# (optional) IP address for nova-api server to listen
|
|
|
|
# Defaults to '0.0.0.0'
|
|
|
|
#
|
2015-09-30 11:06:40 -04:00
|
|
|
# [*ec2_listen_port*]
|
|
|
|
# (optional) The port on which the EC2 API will listen.
|
|
|
|
# Defaults to port 8773
|
|
|
|
#
|
2013-12-12 00:16:24 +11:00
|
|
|
# [*metadata_listen*]
|
|
|
|
# (optional) IP address for metadata server to listen
|
|
|
|
# Defaults to '0.0.0.0'
|
|
|
|
#
|
2015-09-30 11:06:40 -04:00
|
|
|
# [*metadata_listen_port*]
|
|
|
|
# (optional) The port on which the metadata API will listen.
|
|
|
|
# Defaults to 8775
|
|
|
|
#
|
2013-12-12 00:16:24 +11:00
|
|
|
# [*enabled_apis*]
|
|
|
|
# (optional) A comma separated list of apis to enable
|
|
|
|
# Defaults to 'ec2,osapi_compute,metadata'
|
|
|
|
#
|
2014-08-15 14:46:51 +10:00
|
|
|
# [*keystone_ec2_url*]
|
|
|
|
# (optional) The keystone url where nova should send requests for ec2tokens
|
|
|
|
# Defaults to false
|
|
|
|
#
|
2013-12-12 00:16:24 +11:00
|
|
|
# [*volume_api_class*]
|
|
|
|
# (optional) The name of the class that nova will use to access volumes. Cinder is the only option.
|
|
|
|
# Defaults to 'nova.volume.cinder.API'
|
|
|
|
#
|
|
|
|
# [*use_forwarded_for*]
|
|
|
|
# (optional) Treat X-Forwarded-For as the canonical remote address. Only
|
|
|
|
# enable this if you have a sanitizing proxy.
|
|
|
|
# Defaults to false
|
|
|
|
#
|
2014-04-02 16:08:24 +02:00
|
|
|
# [*osapi_compute_workers*]
|
2013-12-12 00:16:24 +11:00
|
|
|
# (optional) Number of workers for OpenStack API service
|
|
|
|
# Defaults to $::processorcount
|
|
|
|
#
|
2015-09-30 11:06:40 -04:00
|
|
|
# [*osapi_compute_listen_port*]
|
|
|
|
# (optional) The port on which the OpenStack API will listen.
|
|
|
|
# Defaults to port 8774
|
|
|
|
#
|
2014-09-15 09:28:58 -04:00
|
|
|
# [*ec2_workers*]
|
|
|
|
# (optional) Number of workers for EC2 service
|
|
|
|
# Defaults to $::processorcount
|
|
|
|
#
|
2014-04-02 16:08:24 +02:00
|
|
|
# [*metadata_workers*]
|
|
|
|
# (optional) Number of workers for metadata service
|
|
|
|
# Defaults to $::processorcount
|
|
|
|
#
|
|
|
|
# [*conductor_workers*]
|
2014-07-23 11:56:11 +02:00
|
|
|
# (optional) DEPRECATED. Use workers parameter of nova::conductor
|
|
|
|
# Class instead.
|
|
|
|
# Defaults to undef
|
2014-04-02 16:08:24 +02:00
|
|
|
#
|
2015-10-14 16:36:35 -04:00
|
|
|
# [*instance_name_template*]
|
|
|
|
# (optional) Template string to be used to generate instance names
|
|
|
|
# Defaults to undef
|
|
|
|
#
|
2013-12-12 00:16:24 +11:00
|
|
|
# [*sync_db*]
|
|
|
|
# (optional) Run nova-manage db sync on api nodes after installing the package.
|
|
|
|
# Defaults to true
|
|
|
|
#
|
|
|
|
# [*neutron_metadata_proxy_shared_secret*]
|
|
|
|
# (optional) Shared secret to validate proxies Neutron metadata requests
|
|
|
|
# Defaults to undef
|
|
|
|
#
|
2015-02-06 23:22:09 +11:00
|
|
|
# [*pci_alias*]
|
|
|
|
# (optional) Pci passthrough for controller:
|
|
|
|
# Defaults to undef
|
|
|
|
# Example
|
|
|
|
# "[ {'vendor_id':'1234', 'product_id':'5678', 'name':'default'}, {...} ]"
|
|
|
|
#
|
2013-12-12 00:16:24 +11:00
|
|
|
# [*ratelimits*]
|
|
|
|
# (optional) A string that is a semicolon-separated list of 5-tuples.
|
|
|
|
# See http://docs.openstack.org/trunk/config-reference/content/configuring-compute-API.html
|
|
|
|
# Example: '(POST, "*", .*, 10, MINUTE);(POST, "*/servers", ^/servers, 50, DAY);(PUT, "*", .*, 10, MINUTE)'
|
|
|
|
# Defaults to undef
|
|
|
|
#
|
|
|
|
# [*ratelimits_factory*]
|
|
|
|
# (optional) The rate limiting factory to use
|
|
|
|
# Defaults to 'nova.api.openstack.compute.limits:RateLimitingMiddleware.factory'
|
2012-10-14 13:00:26 -07:00
|
|
|
#
|
2014-05-08 00:56:15 +02:00
|
|
|
# [*osapi_v3*]
|
|
|
|
# (optional) Enable or not Nova API v3
|
|
|
|
# Defaults to false
|
2014-07-23 11:56:11 +02:00
|
|
|
#
|
2015-09-15 22:41:14 -04:00
|
|
|
# [*default_floating_pool*]
|
|
|
|
# (optional) Default pool for floating IPs
|
|
|
|
# Defaults to 'nova'
|
|
|
|
#
|
2014-10-06 23:22:59 -04:00
|
|
|
# [*validate*]
|
|
|
|
# (optional) Whether to validate the service is working after any service refreshes
|
|
|
|
# Defaults to false
|
|
|
|
#
|
2015-11-04 12:07:10 +02:00
|
|
|
# [*fping_path*]
|
|
|
|
# (optional) Full path to fping.
|
|
|
|
# Defaults to '/usr/sbin/fping'
|
|
|
|
#
|
2014-10-06 23:22:59 -04:00
|
|
|
# [*validation_options*]
|
|
|
|
# (optional) Service validation options
|
|
|
|
# Should be a hash of options defined in openstacklib::service_validation
|
|
|
|
# If empty, defaults values are taken from openstacklib function.
|
|
|
|
# Default command list nova flavors.
|
|
|
|
# Require validate set at True.
|
|
|
|
# Example:
|
|
|
|
# nova::api::validation_options:
|
|
|
|
# nova-api:
|
|
|
|
# command: check_nova.py
|
|
|
|
# path: /usr/bin:/bin:/usr/sbin:/sbin
|
|
|
|
# provider: shell
|
|
|
|
# tries: 5
|
|
|
|
# try_sleep: 10
|
|
|
|
# Defaults to {}
|
|
|
|
#
|
2012-04-01 14:23:36 -07:00
|
|
|
class nova::api(
|
2012-10-14 13:01:23 -07:00
|
|
|
$admin_password,
|
2015-09-30 11:06:40 -04:00
|
|
|
$enabled = true,
|
|
|
|
$manage_service = true,
|
2015-11-04 12:07:10 +02:00
|
|
|
$api_paste_config = 'api-paste.ini',
|
2015-09-30 11:06:40 -04:00
|
|
|
$ensure_package = 'present',
|
|
|
|
$auth_uri = false,
|
|
|
|
$identity_uri = false,
|
|
|
|
$auth_version = false,
|
|
|
|
$admin_tenant_name = 'services',
|
|
|
|
$admin_user = 'nova',
|
|
|
|
$api_bind_address = '0.0.0.0',
|
|
|
|
$ec2_listen_port = 8773,
|
|
|
|
$osapi_compute_listen_port = 8774,
|
|
|
|
$metadata_listen = '0.0.0.0',
|
|
|
|
$metadata_listen_port = 8775,
|
|
|
|
$enabled_apis = 'ec2,osapi_compute,metadata',
|
|
|
|
$keystone_ec2_url = false,
|
|
|
|
$volume_api_class = 'nova.volume.cinder.API',
|
|
|
|
$use_forwarded_for = false,
|
|
|
|
$osapi_compute_workers = $::processorcount,
|
|
|
|
$ec2_workers = $::processorcount,
|
|
|
|
$metadata_workers = $::processorcount,
|
|
|
|
$sync_db = true,
|
2013-09-08 17:46:42 +00:00
|
|
|
$neutron_metadata_proxy_shared_secret = undef,
|
2015-09-30 11:06:40 -04:00
|
|
|
$osapi_v3 = false,
|
|
|
|
$default_floating_pool = 'nova',
|
|
|
|
$pci_alias = undef,
|
|
|
|
$ratelimits = undef,
|
2014-04-02 16:08:24 +02:00
|
|
|
$ratelimits_factory =
|
|
|
|
'nova.api.openstack.compute.limits:RateLimitingMiddleware.factory',
|
2015-09-30 11:06:40 -04:00
|
|
|
$validate = false,
|
|
|
|
$validation_options = {},
|
2015-10-14 16:36:35 -04:00
|
|
|
$instance_name_template = undef,
|
2015-11-04 12:07:10 +02:00
|
|
|
$fping_path = '/usr/sbin/fping',
|
2014-04-02 16:08:24 +02:00
|
|
|
# DEPRECATED PARAMETER
|
2015-09-30 11:06:40 -04:00
|
|
|
$auth_protocol = 'http',
|
|
|
|
$auth_port = 35357,
|
|
|
|
$auth_host = '127.0.0.1',
|
|
|
|
$auth_admin_prefix = false,
|
|
|
|
$conductor_workers = undef,
|
2012-04-23 16:57:54 -07:00
|
|
|
) {
|
|
|
|
|
2015-02-16 10:01:53 -05:00
|
|
|
include ::nova::db
|
|
|
|
include ::nova::params
|
|
|
|
include ::nova::policy
|
|
|
|
require ::keystone::python
|
|
|
|
include ::cinder::client
|
2011-05-27 11:25:26 -07:00
|
|
|
|
2012-11-06 12:07:54 -08:00
|
|
|
Package<| title == 'nova-common' |> -> Class['nova::api']
|
2014-09-26 18:59:53 -04:00
|
|
|
Package<| title == 'nova-common' |> -> Class['nova::policy']
|
2012-11-06 12:07:54 -08:00
|
|
|
|
2012-10-09 22:22:37 -07:00
|
|
|
Nova_paste_api_ini<| |> ~> Exec['post-nova_config']
|
2014-01-13 22:58:10 -06:00
|
|
|
|
2012-10-09 22:22:37 -07:00
|
|
|
Nova_paste_api_ini<| |> ~> Service['nova-api']
|
2014-09-26 18:59:53 -04:00
|
|
|
Class['nova::policy'] ~> Service['nova-api']
|
2011-06-22 16:49:59 -07:00
|
|
|
|
2014-07-23 11:56:11 +02:00
|
|
|
if $conductor_workers {
|
|
|
|
warning('The conductor_workers parameter is deprecated and has no effect. Use workers parameter of nova::conductor class instead.')
|
|
|
|
}
|
|
|
|
|
2015-10-14 16:36:35 -04:00
|
|
|
if $instance_name_template {
|
|
|
|
nova_config {
|
|
|
|
'DEFAULT/instance_name_template': value => $instance_name_template;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
nova_config{
|
|
|
|
'DEFAULT/instance_name_template': ensure => absent;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-04-01 14:23:36 -07:00
|
|
|
nova::generic_service { 'api':
|
2012-05-08 13:32:36 -05:00
|
|
|
enabled => $enabled,
|
2014-01-13 22:58:10 -06:00
|
|
|
manage_service => $manage_service,
|
2012-05-08 13:32:36 -05:00
|
|
|
ensure_package => $ensure_package,
|
|
|
|
package_name => $::nova::params::api_package_name,
|
|
|
|
service_name => $::nova::params::api_service_name,
|
2013-09-06 12:07:57 -07:00
|
|
|
subscribe => Class['cinder::client'],
|
2012-03-30 13:09:30 +02:00
|
|
|
}
|
|
|
|
|
2012-10-11 02:01:06 -07:00
|
|
|
nova_config {
|
2015-09-30 11:06:40 -04:00
|
|
|
'DEFAULT/enabled_apis': value => $enabled_apis;
|
2015-11-04 12:07:10 +02:00
|
|
|
'DEFAULT/api_paste_config': value => $api_paste_config;
|
2015-09-30 11:06:40 -04:00
|
|
|
'DEFAULT/volume_api_class': value => $volume_api_class;
|
|
|
|
'DEFAULT/ec2_listen': value => $api_bind_address;
|
|
|
|
'DEFAULT/ec2_listen_port': value => $ec2_listen_port;
|
|
|
|
'DEFAULT/osapi_compute_listen': value => $api_bind_address;
|
|
|
|
'DEFAULT/metadata_listen': value => $metadata_listen;
|
|
|
|
'DEFAULT/metadata_listen_port': value => $metadata_listen_port;
|
|
|
|
'DEFAULT/osapi_compute_listen_port': value => $osapi_compute_listen_port;
|
|
|
|
'DEFAULT/osapi_volume_listen': value => $api_bind_address;
|
|
|
|
'DEFAULT/osapi_compute_workers': value => $osapi_compute_workers;
|
|
|
|
'DEFAULT/ec2_workers': value => $ec2_workers;
|
|
|
|
'DEFAULT/metadata_workers': value => $metadata_workers;
|
|
|
|
'DEFAULT/use_forwarded_for': value => $use_forwarded_for;
|
|
|
|
'DEFAULT/default_floating_pool': value => $default_floating_pool;
|
2015-11-04 12:07:10 +02:00
|
|
|
'DEFAULT/fping_path': value => $fping_path;
|
2015-09-30 11:06:40 -04:00
|
|
|
'osapi_v3/enabled': value => $osapi_v3;
|
2012-10-11 02:01:06 -07:00
|
|
|
}
|
2012-04-08 22:40:50 +00:00
|
|
|
|
2013-08-06 10:58:50 -05:00
|
|
|
if ($neutron_metadata_proxy_shared_secret){
|
2013-05-03 12:46:59 +02:00
|
|
|
nova_config {
|
2014-10-28 17:04:21 -04:00
|
|
|
'neutron/service_metadata_proxy': value => true;
|
|
|
|
'neutron/metadata_proxy_shared_secret':
|
2013-08-06 10:58:50 -05:00
|
|
|
value => $neutron_metadata_proxy_shared_secret;
|
2013-05-03 12:46:59 +02:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
nova_config {
|
2014-10-28 17:04:21 -04:00
|
|
|
'neutron/service_metadata_proxy': value => false;
|
|
|
|
'neutron/metadata_proxy_shared_secret': ensure => absent;
|
2013-05-03 12:46:59 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-08-08 16:48:04 -04:00
|
|
|
if $auth_uri {
|
2014-10-06 23:22:59 -04:00
|
|
|
$auth_uri_real = $auth_uri
|
2013-08-08 16:48:04 -04:00
|
|
|
} else {
|
2014-10-06 23:22:59 -04:00
|
|
|
$auth_uri_real = "${auth_protocol}://${auth_host}:5000/"
|
2013-08-08 16:48:04 -04:00
|
|
|
}
|
2014-10-06 23:22:59 -04:00
|
|
|
nova_config { 'keystone_authtoken/auth_uri': value => $auth_uri_real; }
|
2013-08-08 16:48:04 -04:00
|
|
|
|
2015-01-27 21:24:14 -05:00
|
|
|
if $identity_uri {
|
|
|
|
nova_config { 'keystone_authtoken/identity_uri': value => $identity_uri; }
|
|
|
|
} else {
|
|
|
|
nova_config { 'keystone_authtoken/identity_uri': ensure => absent; }
|
|
|
|
}
|
|
|
|
|
2014-02-23 11:30:07 +08:00
|
|
|
if $auth_version {
|
|
|
|
nova_config { 'keystone_authtoken/auth_version': value => $auth_version; }
|
|
|
|
} else {
|
|
|
|
nova_config { 'keystone_authtoken/auth_version': ensure => absent; }
|
|
|
|
}
|
|
|
|
|
2015-01-27 21:24:14 -05:00
|
|
|
# if both auth_uri and identity_uri are set we skip these deprecated settings entirely
|
|
|
|
if !$auth_uri or !$identity_uri {
|
2012-10-09 22:25:00 -07:00
|
|
|
|
2015-01-27 21:24:14 -05:00
|
|
|
if $auth_host {
|
|
|
|
warning('The auth_host parameter is deprecated. Please use auth_uri and identity_uri instead.')
|
|
|
|
nova_config { 'keystone_authtoken/auth_host': value => $auth_host; }
|
|
|
|
} else {
|
|
|
|
nova_config { 'keystone_authtoken/auth_host': ensure => absent; }
|
|
|
|
}
|
|
|
|
|
|
|
|
if $auth_port {
|
|
|
|
warning('The auth_port parameter is deprecated. Please use auth_uri and identity_uri instead.')
|
|
|
|
nova_config { 'keystone_authtoken/auth_port': value => $auth_port; }
|
|
|
|
} else {
|
|
|
|
nova_config { 'keystone_authtoken/auth_port': ensure => absent; }
|
|
|
|
}
|
|
|
|
|
|
|
|
if $auth_protocol {
|
|
|
|
warning('The auth_protocol parameter is deprecated. Please use auth_uri and identity_uri instead.')
|
|
|
|
nova_config { 'keystone_authtoken/auth_protocol': value => $auth_protocol; }
|
|
|
|
} else {
|
|
|
|
nova_config { 'keystone_authtoken/auth_protocol': ensure => absent; }
|
|
|
|
}
|
|
|
|
|
|
|
|
if $auth_admin_prefix {
|
|
|
|
warning('The auth_admin_prefix parameter is deprecated. Please use auth_uri and identity_uri instead.')
|
|
|
|
validate_re($auth_admin_prefix, '^(/.+[^/])?$')
|
|
|
|
nova_config {
|
|
|
|
'keystone_authtoken/auth_admin_prefix': value => $auth_admin_prefix;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
nova_config { 'keystone_authtoken/auth_admin_prefix': ensure => absent; }
|
2013-05-14 18:44:01 +02:00
|
|
|
}
|
2015-01-27 21:24:14 -05:00
|
|
|
|
2013-05-14 18:44:01 +02:00
|
|
|
} else {
|
2013-10-10 10:26:37 +02:00
|
|
|
nova_config {
|
2015-01-27 21:24:14 -05:00
|
|
|
'keystone_authtoken/auth_host': ensure => absent;
|
|
|
|
'keystone_authtoken/auth_port': ensure => absent;
|
|
|
|
'keystone_authtoken/auth_protocol': ensure => absent;
|
2013-10-10 10:26:37 +02:00
|
|
|
'keystone_authtoken/auth_admin_prefix': ensure => absent;
|
2013-05-14 18:44:01 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-01-27 21:24:14 -05:00
|
|
|
nova_config {
|
|
|
|
'keystone_authtoken/admin_tenant_name': value => $admin_tenant_name;
|
|
|
|
'keystone_authtoken/admin_user': value => $admin_user;
|
|
|
|
'keystone_authtoken/admin_password': value => $admin_password, secret => true;
|
|
|
|
}
|
|
|
|
|
2014-08-15 14:46:51 +10:00
|
|
|
if $keystone_ec2_url {
|
|
|
|
nova_config {
|
|
|
|
'DEFAULT/keystone_ec2_url': value => $keystone_ec2_url;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
nova_config {
|
|
|
|
'DEFAULT/keystone_ec2_url': ensure => absent;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-09-08 17:46:42 +00:00
|
|
|
if ($ratelimits != undef) {
|
|
|
|
nova_paste_api_ini {
|
|
|
|
'filter:ratelimit/paste.filter_factory': value => $ratelimits_factory;
|
|
|
|
'filter:ratelimit/limits': value => $ratelimits;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-05-08 18:09:29 -04:00
|
|
|
# Added arg and if statement prevents this from being run
|
|
|
|
# where db is not active i.e. the compute
|
2012-11-28 22:17:22 -08:00
|
|
|
if $sync_db {
|
2015-06-29 16:10:44 +02:00
|
|
|
include ::nova::db::sync
|
2012-10-09 22:25:00 -07:00
|
|
|
}
|
|
|
|
|
2013-10-10 10:26:37 +02:00
|
|
|
# Remove auth configuration from api-paste.ini
|
|
|
|
nova_paste_api_ini {
|
|
|
|
'filter:authtoken/auth_uri': ensure => absent;
|
|
|
|
'filter:authtoken/auth_host': ensure => absent;
|
|
|
|
'filter:authtoken/auth_port': ensure => absent;
|
|
|
|
'filter:authtoken/auth_protocol': ensure => absent;
|
|
|
|
'filter:authtoken/admin_tenant_name': ensure => absent;
|
|
|
|
'filter:authtoken/admin_user': ensure => absent;
|
|
|
|
'filter:authtoken/admin_password': ensure => absent;
|
|
|
|
'filter:authtoken/auth_admin_prefix': ensure => absent;
|
|
|
|
}
|
|
|
|
|
2015-02-06 23:22:09 +11:00
|
|
|
if $pci_alias {
|
|
|
|
nova_config {
|
|
|
|
'DEFAULT/pci_alias': value => check_array_of_hash($pci_alias);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-10-06 23:22:59 -04:00
|
|
|
if $validate {
|
|
|
|
$defaults = {
|
|
|
|
'nova-api' => {
|
|
|
|
'command' => "nova --os-auth-url ${auth_uri_real} --os-tenant-name ${admin_tenant_name} --os-username ${admin_user} --os-password ${admin_password} flavor-list",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$validation_options_hash = merge ($defaults, $validation_options)
|
|
|
|
create_resources('openstacklib::service_validation', $validation_options_hash, {'subscribe' => 'Service[nova-api]'})
|
|
|
|
}
|
2011-05-26 12:19:52 -07:00
|
|
|
}
|