Merge "Remove pick for managing package name."

This commit is contained in:
Jenkins 2016-01-16 22:06:58 +00:00 committed by Gerrit Code Review
commit f6a7c3c6e9
6 changed files with 20 additions and 25 deletions

View File

@ -10,7 +10,7 @@
# #
# [*agent_package_name*] # [*agent_package_name*]
# (optional) Name of the package containing agent resources # (optional) Name of the package containing agent resources
# Defaults to agent_package_name from designate::params # Defaults to $::designate::params::agent_package_name
# #
# [*enabled*] # [*enabled*]
# (optional) Whether to enable services. # (optional) Whether to enable services.
@ -26,12 +26,11 @@
# #
class designate::agent ( class designate::agent (
$package_ensure = present, $package_ensure = present,
$agent_package_name = undef, $agent_package_name = $::designate::params::agent_package_name,
$enabled = true, $enabled = true,
$service_ensure = 'running', $service_ensure = 'running',
$backend_driver = 'bind9', $backend_driver = 'bind9',
) inherits designate { ) inherits designate {
include ::designate::params
designate_config { designate_config {
'service:agent/backend_driver' : value => $backend_driver; 'service:agent/backend_driver' : value => $backend_driver;
@ -41,7 +40,7 @@ class designate::agent (
enabled => $enabled, enabled => $enabled,
manage_service => $service_ensure, manage_service => $service_ensure,
ensure_package => $package_ensure, ensure_package => $package_ensure,
package_name => pick($agent_package_name, $::designate::params::agent_package_name), package_name => $agent_package_name,
service_name => $::designate::params::agent_service_name, service_name => $::designate::params::agent_service_name,
} }
} }

View File

@ -10,7 +10,7 @@
# #
# [*api_package_name*] # [*api_package_name*]
# (optional) Name of the package containing api resources # (optional) Name of the package containing api resources
# Defaults to api_package_name from designate::params # Defaults to $::designate::paramas::api_package_name
# #
# [*enabled*] # [*enabled*]
# (optional) Whether to enable services. # (optional) Whether to enable services.
@ -58,7 +58,7 @@
# #
class designate::api ( class designate::api (
$package_ensure = present, $package_ensure = present,
$api_package_name = undef, $api_package_name = $::designate::params::api_package_name,
$enabled = true, $enabled = true,
$service_ensure = 'running', $service_ensure = 'running',
$auth_strategy = 'noauth', $auth_strategy = 'noauth',
@ -71,7 +71,6 @@ class designate::api (
$enable_api_v1 = true, $enable_api_v1 = true,
$enable_api_v2 = false, $enable_api_v2 = false,
) inherits designate { ) inherits designate {
include ::designate::params
# API Service # API Service
designate_config { designate_config {
@ -94,7 +93,7 @@ class designate::api (
enabled => $enabled, enabled => $enabled,
manage_service => $service_ensure, manage_service => $service_ensure,
ensure_package => $package_ensure, ensure_package => $package_ensure,
package_name => pick($api_package_name, $::designate::params::api_package_name), package_name => $api_package_name,
service_name => $::designate::params::api_service_name, service_name => $::designate::params::api_service_name,
} }

View File

@ -10,7 +10,7 @@
# #
# [*central_package_name*] # [*central_package_name*]
# (optional) Name of the package containing central resources # (optional) Name of the package containing central resources
# Defaults to central_package_name from designate::params # Defaults to $::designate::params::central_package_name
# #
# [*enabled*] # [*enabled*]
# (optional) Whether to enable services. # (optional) Whether to enable services.
@ -47,7 +47,7 @@
# #
class designate::central ( class designate::central (
$package_ensure = present, $package_ensure = present,
$central_package_name = undef, $central_package_name = $::designate::params::central_package_name,
$enabled = true, $enabled = true,
$service_ensure = 'running', $service_ensure = 'running',
$backend_driver = 'bind9', $backend_driver = 'bind9',
@ -57,7 +57,6 @@ class designate::central (
$max_recordset_name_len = '255', $max_recordset_name_len = '255',
$min_ttl = 'None', $min_ttl = 'None',
) inherits designate { ) inherits designate {
include ::designate::params
designate_config { designate_config {
'service:central/backend_driver' : value => $backend_driver; 'service:central/backend_driver' : value => $backend_driver;
@ -72,7 +71,7 @@ class designate::central (
enabled => $enabled, enabled => $enabled,
manage_service => $service_ensure, manage_service => $service_ensure,
ensure_package => $package_ensure, ensure_package => $package_ensure,
package_name => pick($central_package_name, $::designate::params::central_package_name), package_name => $central_package_name,
service_name => $::designate::params::central_service_name, service_name => $::designate::params::central_service_name,
} }
} }

View File

@ -7,21 +7,21 @@
# [*package_ensure*] # [*package_ensure*]
# (optional) Ensure state for pachage. # (optional) Ensure state for pachage.
# Defaults to 'present' # Defaults to 'present'
#
# [*client_package_name*] # [*client_package_name*]
# (optional) Name of the package containing client resources # (optional) Name of the package containing client resources
# Defaults to client_package_name from designate::params # Defaults to $::designate::params::client_package_name
# #
class designate::client ( class designate::client (
$package_ensure = 'present', $package_ensure = 'present',
$client_package_name = undef, $client_package_name = $::designate::params::client_package_name,
) { ) {
include ::designate::params include ::designate::params
package { 'python-designateclient': package { 'python-designateclient':
ensure => $package_ensure, ensure => $package_ensure,
name => pick($client_package_name, $::designate::params::client_package_name), name => $client_package_name,
tag => 'openstack', tag => 'openstack',
} }

View File

@ -10,7 +10,7 @@
# #
# [*common_package_name*] # [*common_package_name*]
# (optional) Name of the package containing shared resources # (optional) Name of the package containing shared resources
# Defaults to common_package_name from designate::params # Defaults to $::designate::params::common_package_name
# #
# [*service_ensure*] # [*service_ensure*]
# (optional) Whether the designate-common package will be present.. # (optional) Whether the designate-common package will be present..
@ -87,7 +87,7 @@
class designate( class designate(
$package_ensure = present, $package_ensure = present,
$common_package_name = undef, $common_package_name = $::designate::params::common_package_name,
$verbose = undef, $verbose = undef,
$debug = undef, $debug = undef,
$log_dir = undef, $log_dir = undef,
@ -105,7 +105,7 @@ class designate(
$notification_topics = 'notifications', $notification_topics = 'notifications',
#DEPRECATED PARAMETER #DEPRECATED PARAMETER
$rabbit_virtualhost = undef, $rabbit_virtualhost = undef,
) { ) inherits designate::params {
if $rabbit_virtualhost { if $rabbit_virtualhost {
warning('The parameter rabbit_virtualhost is deprecated, use rabbit_virtual_host.') warning('The parameter rabbit_virtualhost is deprecated, use rabbit_virtual_host.')
@ -115,7 +115,6 @@ class designate(
} }
include ::designate::logging include ::designate::logging
include ::designate::params
exec { 'post-designate_config': exec { 'post-designate_config':
command => '/bin/echo "designate config has changed"', command => '/bin/echo "designate config has changed"',
@ -126,7 +125,7 @@ class designate(
package { 'designate-common': package { 'designate-common':
ensure => $package_ensure, ensure => $package_ensure,
name => pick($common_package_name, $::designate::params::common_package_name), name => $common_package_name,
tag => ['openstack', 'designate-package'], tag => ['openstack', 'designate-package'],
} }

View File

@ -10,7 +10,7 @@
# #
# [*sink_package_name*] # [*sink_package_name*]
# (optional) Name of the package containing sink resources # (optional) Name of the package containing sink resources
# Defaults to sink_package_name from designate::params # Defaults to $::designate::params::sink_package_name
# #
# [*enabled*] # [*enabled*]
# (optional) Whether to enable services. # (optional) Whether to enable services.
@ -28,18 +28,17 @@
# #
class designate::sink ( class designate::sink (
$package_ensure = present, $package_ensure = present,
$sink_package_name = undef, $sink_package_name = $::designate::params::sink_package_name,
$enabled = true, $enabled = true,
$service_ensure = 'running', $service_ensure = 'running',
$enabled_notification_handlers = undef, $enabled_notification_handlers = undef,
) inherits designate { ) inherits designate {
include ::designate::params
designate::generic_service { 'sink': designate::generic_service { 'sink':
enabled => $enabled, enabled => $enabled,
manage_service => $service_ensure, manage_service => $service_ensure,
ensure_package => $package_ensure, ensure_package => $package_ensure,
package_name => pick($sink_package_name, $::designate::params::sink_package_name), package_name => $sink_package_name,
service_name => $::designate::params::sink_service_name, service_name => $::designate::params::sink_service_name,
} }