Files
puppet-nova/manifests/placement.pp
Takashi Kajinami da755d2f47 Remove /v3 suffix from auth url
This is no longer required in recent OpenStack where only identity v3
API is provided. The default value may not work in real production
environment so this may affect only small PoC use case with a single
node.

Change-Id: If79d5f530126bdc60000f924706b009befa96dbb
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2025-09-11 01:56:44 +09:00

90 lines
3.1 KiB
Puppet

# == Class: nova::placement
#
# Class for configuring the [placement] section in nova.conf.
#
# === Parameters:
#
# [*password*]
# (required) Password for connecting to Placement API service in
# admin context through the OpenStack Identity service.
#
# [*auth_type*]
# Name of the auth type to load (string value)
# Defaults to 'password'
#
# [*project_domain_name*]
# (optional) Project Domain name for connecting to Placement API service in
# admin context through the OpenStack Identity service.
# Defaults to 'Default'
#
# [*project_name*]
# (optional) Project name for connecting to Placement API service in
# admin context through the OpenStack Identity service.
# Defaults to 'services'
#
# [*system_scope*]
# (Optional) Scope for system operations
# Defaults to $facts['os_service_default']
#
# [*user_domain_name*]
# (optional) User Domain name for connecting to Placement API service in
# admin context through the OpenStack Identity service.
# Defaults to 'Default'
#
# [*username*]
# (optional) Username for connecting to Placement API service in admin context
# through the OpenStack Identity service.
# Defaults to 'placement'
#
# [*region_name*]
# (optional) Region name for connecting to Placement API service in admin context
# through the OpenStack Identity service.
# Defaults to 'RegionOne'
#
# [*valid_interfaces*]
# (optional) Interface names used for getting the keystone endpoint for
# the placement API. Comma separated if multiple.
# Defaults to $facts['os_service_default']
#
# [*auth_url*]
# (optional) Points to the OpenStack Identity server IP and port.
# This is the Identity (keystone) admin API server IP and port value,
# and not the Identity service API IP and port.
# Defaults to 'http://127.0.0.1:5000'
#
class nova::placement (
$password,
$auth_type = 'password',
$auth_url = 'http://127.0.0.1:5000',
$region_name = 'RegionOne',
$valid_interfaces = $facts['os_service_default'],
$project_domain_name = 'Default',
$project_name = 'services',
$system_scope = $facts['os_service_default'],
$user_domain_name = 'Default',
$username = 'placement',
) inherits nova::params {
include nova::deps
if is_service_default($system_scope) {
$project_name_real = $project_name
$project_domain_name_real = $project_domain_name
} else {
$project_name_real = $facts['os_service_default']
$project_domain_name_real = $facts['os_service_default']
}
nova_config {
'placement/auth_type': value => $auth_type;
'placement/auth_url': value => $auth_url;
'placement/password': value => $password, secret => true;
'placement/project_domain_name': value => $project_domain_name_real;
'placement/project_name': value => $project_name_real;
'placement/system_scope': value => $system_scope;
'placement/user_domain_name': value => $user_domain_name;
'placement/username': value => $username;
'placement/region_name': value => $region_name;
'placement/valid_interfaces': value => join(any2array($valid_interfaces), ',');
}
}