Make service_type configurable
Currently puppet-swift hard-codes service type while the other modules generally provide the corresponding parameters. This change introduces the new service_type parameter to customize service type to provide the consistent interface. Change-Id: Idbac284a06376f42a07f0f82ce6e595564d27fbf
This commit is contained in:
parent
787a87d24f
commit
ca69240709
|
@ -55,6 +55,14 @@
|
||||||
# (optional) Name of the s3 service.
|
# (optional) Name of the s3 service.
|
||||||
# Defaults to 'swift_s3'
|
# Defaults to 'swift_s3'
|
||||||
#
|
#
|
||||||
|
# [*service_type*]
|
||||||
|
# (Optional) Type of service.
|
||||||
|
# Defaults to 'object-store'.
|
||||||
|
#
|
||||||
|
# [*service_type_s3*]
|
||||||
|
# (Optional) Type of s3 service.
|
||||||
|
# Defaults to 's3'.
|
||||||
|
#
|
||||||
# [*service_description*]
|
# [*service_description*]
|
||||||
# (optional) Description for keystone service.
|
# (optional) Description for keystone service.
|
||||||
# Defaults to 'Openstack Object-Store Service'.
|
# Defaults to 'Openstack Object-Store Service'.
|
||||||
|
@ -96,6 +104,8 @@ class swift::keystone::auth(
|
||||||
$operator_roles = ['admin', 'SwiftOperator'],
|
$operator_roles = ['admin', 'SwiftOperator'],
|
||||||
$service_name = 'swift',
|
$service_name = 'swift',
|
||||||
$service_name_s3 = 'swift_s3',
|
$service_name_s3 = 'swift_s3',
|
||||||
|
$service_type = 'object-store',
|
||||||
|
$service_type_s3 = 's3',
|
||||||
$service_description = 'Openstack Object-Store Service',
|
$service_description = 'Openstack Object-Store Service',
|
||||||
$service_description_s3 = 'Openstack S3 Service',
|
$service_description_s3 = 'Openstack S3 Service',
|
||||||
$configure_endpoint = true,
|
$configure_endpoint = true,
|
||||||
|
@ -127,10 +137,10 @@ Please set password parameter')
|
||||||
# Establish that keystone auth and endpoints are properly setup before
|
# Establish that keystone auth and endpoints are properly setup before
|
||||||
# managing any type of swift related service.
|
# managing any type of swift related service.
|
||||||
if $configure_endpoint {
|
if $configure_endpoint {
|
||||||
Keystone_endpoint["${region}/${service_name}::object-store"] -> Swift::Service<||>
|
Keystone_endpoint["${region}/${service_name}::${service_type}"] -> Swift::Service<||>
|
||||||
}
|
}
|
||||||
if $configure_s3_endpoint {
|
if $configure_s3_endpoint {
|
||||||
Keystone_endpoint["${region}/${service_name_s3}::s3"] -> Swift::Service<||>
|
Keystone_endpoint["${region}/${service_name_s3}::${service_type_s3}"] -> Swift::Service<||>
|
||||||
}
|
}
|
||||||
|
|
||||||
keystone::resource::service_identity { 'swift':
|
keystone::resource::service_identity { 'swift':
|
||||||
|
@ -138,7 +148,7 @@ Please set password parameter')
|
||||||
configure_user => $configure_user,
|
configure_user => $configure_user,
|
||||||
configure_user_role => $configure_user_role,
|
configure_user_role => $configure_user_role,
|
||||||
service_name => $service_name,
|
service_name => $service_name,
|
||||||
service_type => 'object-store',
|
service_type => $service_type,
|
||||||
service_description => $service_description,
|
service_description => $service_description,
|
||||||
region => $region,
|
region => $region,
|
||||||
auth_name => $auth_name,
|
auth_name => $auth_name,
|
||||||
|
@ -156,7 +166,7 @@ Please set password parameter')
|
||||||
configure_endpoint => $configure_s3_endpoint,
|
configure_endpoint => $configure_s3_endpoint,
|
||||||
configure_service => $configure_s3_endpoint,
|
configure_service => $configure_s3_endpoint,
|
||||||
service_name => $service_name_s3,
|
service_name => $service_name_s3,
|
||||||
service_type => 's3',
|
service_type => $service_type_s3,
|
||||||
service_description => $service_description_s3,
|
service_description => $service_description_s3,
|
||||||
region => $region,
|
region => $region,
|
||||||
public_url => $public_url_s3,
|
public_url => $public_url_s3,
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Now service type of the swift service and swift_s3 service is configurable
|
||||||
|
by the ``service_type`` parameter.
|
Loading…
Reference in New Issue