keystone/auth: make service description configurable

This commit adds the service description and service description ec2
(service_description{,_ec2}) as a class parameter in order to allow
users to update from a previous version if the service description
is changed (incorrectly spelled or wrong description)

Change-Id: I220e3adf4e96d82d3de6cfe065a80e30a36de5f7
Closes-Bug: #1468407
This commit is contained in:
Sebastien Badia
2015-06-24 17:50:48 +02:00
parent 7a4e067e92
commit 75e2f0c0a2

View File

@@ -25,6 +25,18 @@
# Defaults to the value of auth_name_v3, but must differ from the value # Defaults to the value of auth_name_v3, but must differ from the value
# of service_name. # of service_name.
# #
# [*service_description*]
# (optional) Description for keystone service.
# Defaults to 'Openstack Compute Service'.
#
# [*service_description_v3*]
# (optional) Description for keystone v3 service.
# Defaults to 'Openstack Compute Service v3'.
#
# [*service_description_ec2*]
# (optional) Description for keystone ec2 service.
# Defaults to 'EC2 Service'.
#
# [*public_url*] # [*public_url*]
# (optional) The endpoint's public url. (Defaults to 'http://127.0.0.1:8774/v2/%(tenant_id)s') # (optional) The endpoint's public url. (Defaults to 'http://127.0.0.1:8774/v2/%(tenant_id)s')
# This url should *not* contain any version or trailing '/'. # This url should *not* contain any version or trailing '/'.
@@ -140,37 +152,40 @@
# #
class nova::keystone::auth( class nova::keystone::auth(
$password, $password,
$auth_name = 'nova', $auth_name = 'nova',
$auth_name_v3 = 'novav3', $auth_name_v3 = 'novav3',
$service_name = undef, $service_name = undef,
$service_name_v3 = undef, $service_name_v3 = undef,
$region = 'RegionOne', $service_description = 'Openstack Compute Service',
$tenant = 'services', $service_description_v3 = 'Openstack Compute Service v3',
$email = 'nova@localhost', $service_description_ec2 = 'EC2 Service',
$public_url = 'http://127.0.0.1:8774/v2/%(tenant_id)s', $region = 'RegionOne',
$internal_url = 'http://127.0.0.1:8774/v2/%(tenant_id)s', $tenant = 'services',
$admin_url = 'http://127.0.0.1:8774/v2/%(tenant_id)s', $email = 'nova@localhost',
$public_url_v3 = 'http://127.0.0.1:8774/v3', $public_url = 'http://127.0.0.1:8774/v2/%(tenant_id)s',
$internal_url_v3 = 'http://127.0.0.1:8774/v3', $internal_url = 'http://127.0.0.1:8774/v2/%(tenant_id)s',
$admin_url_v3 = 'http://127.0.0.1:8774/v3', $admin_url = 'http://127.0.0.1:8774/v2/%(tenant_id)s',
$ec2_public_url = 'http://127.0.0.1:8773/services/Cloud', $public_url_v3 = 'http://127.0.0.1:8774/v3',
$ec2_internal_url = 'http://127.0.0.1:8773/services/Cloud', $internal_url_v3 = 'http://127.0.0.1:8774/v3',
$ec2_admin_url = 'http://127.0.0.1:8773/services/Admin', $admin_url_v3 = 'http://127.0.0.1:8774/v3',
$configure_ec2_endpoint = true, $ec2_public_url = 'http://127.0.0.1:8773/services/Cloud',
$configure_endpoint = true, $ec2_internal_url = 'http://127.0.0.1:8773/services/Cloud',
$configure_endpoint_v3 = true, $ec2_admin_url = 'http://127.0.0.1:8773/services/Admin',
$configure_user = true, $configure_ec2_endpoint = true,
$configure_user_role = true, $configure_endpoint = true,
$configure_endpoint_v3 = true,
$configure_user = true,
$configure_user_role = true,
# DEPRECATED PARAMETERS # DEPRECATED PARAMETERS
$compute_version = undef, $compute_version = undef,
$compute_port = undef, $compute_port = undef,
$ec2_port = undef, $ec2_port = undef,
$public_protocol = undef, $public_protocol = undef,
$public_address = undef, $public_address = undef,
$admin_protocol = undef, $admin_protocol = undef,
$admin_address = undef, $admin_address = undef,
$internal_protocol = undef, $internal_protocol = undef,
$internal_address = undef, $internal_address = undef,
) { ) {
if $compute_version { if $compute_version {
@@ -310,7 +325,7 @@ class nova::keystone::auth(
configure_user_role => $configure_user_role, configure_user_role => $configure_user_role,
configure_endpoint => $configure_endpoint, configure_endpoint => $configure_endpoint,
service_type => 'compute', service_type => 'compute',
service_description => 'Openstack Compute Service', service_description => $service_description,
service_name => $real_service_name, service_name => $real_service_name,
region => $region, region => $region,
auth_name => $auth_name, auth_name => $auth_name,
@@ -328,7 +343,7 @@ class nova::keystone::auth(
configure_endpoint => $configure_endpoint_v3, configure_endpoint => $configure_endpoint_v3,
configure_service => $configure_endpoint_v3, configure_service => $configure_endpoint_v3,
service_type => 'computev3', service_type => 'computev3',
service_description => 'Openstack Compute Service v3', service_description => $service_description_v3,
service_name => $real_service_name_v3, service_name => $real_service_name_v3,
region => $region, region => $region,
auth_name => $auth_name_v3, auth_name => $auth_name_v3,
@@ -343,7 +358,7 @@ class nova::keystone::auth(
configure_endpoint => $configure_ec2_endpoint, configure_endpoint => $configure_ec2_endpoint,
configure_service => $configure_ec2_endpoint, configure_service => $configure_ec2_endpoint,
service_type => 'ec2', service_type => 'ec2',
service_description => 'EC2 Service', service_description => $service_description_ec2,
service_name => "${real_service_name}_ec2", service_name => "${real_service_name}_ec2",
region => $region, region => $region,
auth_name => "${auth_name}_ec2", auth_name => "${auth_name}_ec2",