2013-08-05 13:20:54 -04:00
|
|
|
# == Class: neutron::server
|
2013-05-06 14:15:29 -06:00
|
|
|
#
|
2013-08-05 13:20:54 -04:00
|
|
|
# Setup and configure the neutron API endpoint
|
2013-05-06 14:15:29 -06:00
|
|
|
#
|
|
|
|
# === Parameters
|
|
|
|
#
|
|
|
|
# [*package_ensure*]
|
|
|
|
# (optional) The state of the package
|
|
|
|
# Defaults to present
|
|
|
|
#
|
|
|
|
# [*enabled*]
|
|
|
|
# (optional) The state of the service
|
|
|
|
# Defaults to true
|
|
|
|
#
|
2014-01-15 22:52:03 -06:00
|
|
|
# [*manage_service*]
|
|
|
|
# (optional) Whether to start/stop the service
|
|
|
|
# Defaults to true
|
|
|
|
#
|
2014-11-21 09:57:46 -07:00
|
|
|
# [*service_name*]
|
|
|
|
# (optional) The name of the neutron-server service
|
2016-01-05 12:30:00 -07:00
|
|
|
# Defaults to $::neutron::params::server_service
|
2014-11-21 09:57:46 -07:00
|
|
|
#
|
2013-05-06 14:15:29 -06:00
|
|
|
# [*log_file*]
|
2014-02-25 18:43:55 +01:00
|
|
|
# REMOVED: Use log_file of neutron class instead.
|
2013-05-21 15:36:16 -05:00
|
|
|
#
|
|
|
|
# [*log_dir*]
|
2014-02-25 18:43:55 +01:00
|
|
|
# REMOVED: Use log_dir of neutron class instead.
|
2013-05-06 14:15:29 -06:00
|
|
|
#
|
2014-01-28 13:23:13 -05:00
|
|
|
# [*database_connection*]
|
2013-10-31 17:33:36 +00:00
|
|
|
# (optional) Connection url for the neutron database.
|
2015-08-03 12:47:08 +02:00
|
|
|
# (Defaults to undef)
|
2014-01-28 13:23:13 -05:00
|
|
|
#
|
2016-06-30 09:44:40 -06:00
|
|
|
# [*memcached_servers*]
|
|
|
|
# (optinal) a list of memcached server(s) to use for caching. If left
|
|
|
|
# undefined, tokens will instead be cached in-process.
|
|
|
|
# Defaults to $::os_service_default.
|
|
|
|
#
|
2014-01-28 13:23:13 -05:00
|
|
|
# [*database_max_retries*]
|
|
|
|
# (optional) Maximum database connection retries during startup.
|
2015-08-03 12:47:08 +02:00
|
|
|
# (Defaults to undef)
|
2014-01-28 13:23:13 -05:00
|
|
|
#
|
|
|
|
# [*database_idle_timeout*]
|
|
|
|
# (optional) Timeout before idle database connections are reaped.
|
2013-10-31 17:33:36 +00:00
|
|
|
# Deprecates sql_idle_timeout
|
2015-08-03 12:47:08 +02:00
|
|
|
# (Defaults to undef)
|
2014-01-28 13:23:13 -05:00
|
|
|
#
|
|
|
|
# [*database_retry_interval*]
|
|
|
|
# (optional) Interval between retries of opening a database connection.
|
|
|
|
# (Defaults to 10)
|
|
|
|
#
|
2014-09-25 12:47:25 +02:00
|
|
|
# [*database_min_pool_size*]
|
|
|
|
# (optional) Minimum number of SQL connections to keep open in a pool.
|
2015-08-03 12:47:08 +02:00
|
|
|
# Defaults to: undef.
|
2014-09-25 12:47:25 +02:00
|
|
|
#
|
|
|
|
# [*database_max_pool_size*]
|
|
|
|
# (optional) Maximum number of SQL connections to keep open in a pool.
|
2015-08-03 12:47:08 +02:00
|
|
|
# Defaults to: undef.
|
2014-09-25 12:47:25 +02:00
|
|
|
#
|
|
|
|
# [*database_max_overflow*]
|
|
|
|
# (optional) If set, use this value for max_overflow with sqlalchemy.
|
2015-08-03 12:47:08 +02:00
|
|
|
# Defaults to: undef.
|
2014-09-25 12:47:25 +02:00
|
|
|
#
|
2014-02-03 13:28:03 +01:00
|
|
|
# [*sync_db*]
|
|
|
|
# (optional) Run neutron-db-manage on api nodes after installing the package.
|
2014-03-06 15:39:50 -05:00
|
|
|
# Defaults to false
|
2014-02-03 13:28:03 +01:00
|
|
|
#
|
2013-11-30 16:16:17 +01:00
|
|
|
# [*api_workers*]
|
2016-09-30 10:03:06 -02:30
|
|
|
# (optional) Number of separate worker processes to spawn. Greater than 0
|
|
|
|
# launches that number of child processes as workers. The parent process
|
|
|
|
# manages them.
|
|
|
|
# Defaults to: $::os_workers
|
2013-11-30 16:16:17 +01:00
|
|
|
#
|
2014-07-10 10:37:30 -07:00
|
|
|
# [*rpc_workers*]
|
2016-09-30 10:03:06 -02:30
|
|
|
# (optional) Number of separate worker processes to spawn. Greater than 0
|
|
|
|
# launches that number of child processes as workers. The parent process
|
|
|
|
# manages them.
|
|
|
|
# Defaults to: $::os_workers
|
2014-07-10 10:37:30 -07:00
|
|
|
#
|
2013-12-24 20:13:55 +01:00
|
|
|
# [*agent_down_time*]
|
|
|
|
# (optional) Seconds to regard the agent as down; should be at least twice
|
|
|
|
# report_interval, to be sure the agent is down for good.
|
2014-04-09 16:37:20 +02:00
|
|
|
# agent_down_time is a config for neutron-server, set by class neutron::server
|
|
|
|
# report_interval is a config for neutron agents, set by class neutron
|
2015-12-04 13:01:44 +03:00
|
|
|
# Defaults to: $::os_service_default
|
2013-12-24 20:13:55 +01:00
|
|
|
#
|
2014-11-21 14:15:41 +01:00
|
|
|
# [*state_path*]
|
2014-12-20 16:36:34 -07:00
|
|
|
# (optional) Deprecated. Use state_path parameter on base neutron class instead.
|
2014-11-21 14:15:41 +01:00
|
|
|
#
|
|
|
|
# [*lock_path*]
|
2014-12-20 16:36:34 -07:00
|
|
|
# (optional) Deprecated. Use lock_path parameter on base neutron class instead.
|
2014-11-21 14:15:41 +01:00
|
|
|
#
|
2016-04-26 22:01:06 -04:00
|
|
|
# [*network_scheduler_driver*]
|
|
|
|
# (optional) The scheduler used when scheduling networks
|
|
|
|
# neutron.scheduler.dhcp_agent_scheduler.AZAwareWeightScheduler to use availability zone hints scheduling.
|
|
|
|
# Defaults to $::os_service_default
|
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
|
|
|
# class { 'neutron':
|
|
|
|
# network_scheduler_driver => 'neutron.scheduler.dhcp_agent_scheduler.AZAwareWeightScheduler'
|
|
|
|
# }
|
|
|
|
#
|
2013-12-25 00:46:23 +01:00
|
|
|
# [*router_scheduler_driver*]
|
|
|
|
# (optional) Driver to use for scheduling router to a default L3 agent. Could be:
|
|
|
|
# neutron.scheduler.l3_agent_scheduler.ChanceScheduler to schedule a router in a random way
|
|
|
|
# neutron.scheduler.l3_agent_scheduler.LeastRoutersScheduler to allocate on an L3 agent with the least number of routers bound.
|
2016-04-26 22:01:06 -04:00
|
|
|
# neutron.scheduler.l3_agent_scheduler.AZLeastRoutersScheduler to use availability zone hints.
|
2013-12-25 00:46:23 +01:00
|
|
|
# Defaults to: neutron.scheduler.l3_agent_scheduler.ChanceScheduler
|
|
|
|
#
|
2014-09-18 14:21:03 -04:00
|
|
|
# [*router_distributed*]
|
|
|
|
# (optional) Setting the "router_distributed" flag to "True" will default to the creation
|
|
|
|
# of distributed tenant routers.
|
|
|
|
# Also can be the type of the router on the create request (admin-only attribute).
|
2015-12-04 13:01:44 +03:00
|
|
|
# Defaults to $::os_service_default
|
2014-09-18 14:21:03 -04:00
|
|
|
#
|
2016-04-26 22:01:06 -04:00
|
|
|
# [*dhcp_load_type*]
|
|
|
|
# (optional) The resource type whos load is being reported by the agent.
|
|
|
|
# The expected values are either 'networks', 'subnets', 'ports'.
|
|
|
|
# Defaults to $::os_service_default
|
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
|
|
|
# class { 'neutron':
|
|
|
|
# dhcp_load_type => 'networks'
|
|
|
|
# }
|
|
|
|
#
|
|
|
|
# [*default_availability_zones*]
|
|
|
|
# (optional) A list of availability zones that are picked when availability zone is not specified
|
|
|
|
# The expected input is an array when specified.
|
|
|
|
# Defaults to $::os_service_default
|
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
|
|
|
# class { 'neutron':
|
|
|
|
# default_availability_zones => ['zone1', 'zone2']
|
|
|
|
# }
|
|
|
|
#
|
2015-02-24 13:03:10 -07:00
|
|
|
# [*allow_automatic_l3agent_failover*]
|
|
|
|
# (optional) Allow automatic rescheduling of routers from dead L3 agents with
|
|
|
|
# admin_state_up set to True to alive agents.
|
2015-12-04 13:01:44 +03:00
|
|
|
# Defaults to $::os_service_default
|
2015-02-24 13:03:10 -07:00
|
|
|
#
|
2016-06-21 13:10:14 +10:00
|
|
|
# [*allow_automatic_dhcp_failover*]
|
|
|
|
# (optional) Allow automatic rescheduling of dhcp from dead dhcp agents with
|
|
|
|
# admin_state_up set to True to alive agents.
|
|
|
|
# Defaults to $::os_service_default
|
|
|
|
#
|
2014-09-18 14:21:03 -04:00
|
|
|
# [*l3_ha*]
|
|
|
|
# (optional) Enable high availability for virtual routers.
|
|
|
|
# Defaults to false
|
|
|
|
#
|
|
|
|
# [*max_l3_agents_per_router*]
|
|
|
|
# (optional) Maximum number of l3 agents which a HA router will be scheduled on. If set to '0', a router will be scheduled on every agent.
|
|
|
|
# Defaults to '3'
|
|
|
|
#
|
|
|
|
# [*l3_ha_net_cidr*]
|
|
|
|
# (optional) CIDR of the administrative network if HA mode is enabled.
|
2015-12-04 13:01:44 +03:00
|
|
|
# Defaults to $::os_service_default
|
2014-09-18 14:21:03 -04:00
|
|
|
#
|
2015-08-06 19:38:33 +02:00
|
|
|
# [*report_interval*]
|
|
|
|
# (optional) Deprecated, does nothing.
|
|
|
|
# Defaults to 'undef'.
|
|
|
|
#
|
2015-08-25 13:29:04 +03:00
|
|
|
# [*qos_notification_drivers*]
|
|
|
|
# (optional) Drivers list to use to send the update notification
|
|
|
|
# Defaults to $::os_service_default.
|
|
|
|
#
|
2016-06-21 13:19:11 +10:00
|
|
|
# [*network_auto_schedule*]
|
|
|
|
# (optional) Allow auto scheduling networks to DHCP agent
|
|
|
|
# Defaults to $::os_service_default.
|
|
|
|
#
|
2016-01-25 18:43:55 +01:00
|
|
|
# [*ensure_vpnaas_package*]
|
|
|
|
# (optional) Ensures installation of VPNaaS package before starting API service.
|
|
|
|
# Set to true to ensure installation of the package that is required to start neutron service if service_plugin is enabled.
|
|
|
|
# Defaults to false.
|
|
|
|
#
|
|
|
|
# [*ensure_fwaas_package*]
|
|
|
|
# (optional) Ensures installation of FWaaS package before starting API service.
|
|
|
|
# Set to true to ensure installation of the package that is required to start neutron service if service_plugin is enabled.
|
|
|
|
# Defaults to false.
|
|
|
|
#
|
|
|
|
# [*vpnaas_agent_package*]
|
|
|
|
# (optional) Use VPNaaS agent package instead of L3 agent package on debian platforms
|
|
|
|
# RedHat platforms won't take care of this parameter
|
|
|
|
# true/false
|
|
|
|
# Defaults to false
|
2016-05-06 11:52:55 -04:00
|
|
|
#
|
|
|
|
# [*service_providers*]
|
|
|
|
# (optional) (Array) Configures the service providers for neutron server.
|
|
|
|
# This needs to be set for lbaas, vpnaas, and fwaas.
|
|
|
|
# Defaults to $::os_service_default
|
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
|
|
|
# class { 'neutron::server':
|
|
|
|
# service_providers => [
|
|
|
|
# 'LOADBALANCERV2:Octavia:neutron_lbaas.drivers.octavia.driver.OctaviaDriver:default',
|
|
|
|
# 'LOADBALANCER:Haproxy:neutron_lbaas.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver',
|
|
|
|
# 'VPN:openswan:neutron_vpnaas.services.vpn.service_drivers.ipsec.IPsecVPNDriver:default'
|
|
|
|
# ]
|
|
|
|
# }
|
|
|
|
#
|
2016-08-04 19:20:02 +03:00
|
|
|
# [*auth_strategy*]
|
|
|
|
# (optional) The strategy to use for authentication.
|
|
|
|
# Defaults to 'keystone'
|
|
|
|
#
|
2016-10-17 09:14:01 +03:00
|
|
|
# [*enable_proxy_headers_parsing*]
|
|
|
|
# (Optional) Enable paste middleware to handle SSL requests through
|
|
|
|
# HTTPProxyToWSGI middleware.
|
|
|
|
# Defaults to $::os_service_default.
|
|
|
|
#
|
2016-01-20 12:41:20 +03:00
|
|
|
# === Deprecated Parameters
|
|
|
|
#
|
2016-04-14 07:41:20 -04:00
|
|
|
# [*ensure_lbaas_package*]
|
|
|
|
# Deprecated. Ensures installation of LBaaS package.
|
2016-04-18 08:37:57 +08:00
|
|
|
# LBaaS agent should be installed from neutron::agents::lbaas.
|
2016-04-14 07:41:20 -04:00
|
|
|
# Defaults to false.
|
|
|
|
#
|
2016-07-12 09:25:01 +08:00
|
|
|
# [*min_l3_agents_per_router*]
|
|
|
|
# Deprecated. (optional) Minimum number of l3 agents which a HA router will be scheduled on.
|
|
|
|
# Defaults to undef
|
|
|
|
#
|
2016-08-04 19:20:02 +03:00
|
|
|
# [*keystone_auth_type*]
|
|
|
|
# (optional) Deprecated Use neutron::keystone::authtoken::auth_type instead.
|
|
|
|
# Defaults to undef
|
|
|
|
#
|
|
|
|
# [*auth_uri*]
|
|
|
|
# (optional) Deprecated Use neutron::keystone::authtoken::auth_uri
|
|
|
|
# Defaults to undef
|
|
|
|
#
|
|
|
|
# [*auth_url*]
|
|
|
|
# (optional) Deprecated Use neutron::keystone::authtoken::auth_url instead
|
|
|
|
# Defaults to undef
|
|
|
|
#
|
|
|
|
# [*username*]
|
|
|
|
# (optional) Deprecated Use neutron::keystone::authtoken::username instead
|
|
|
|
# Defaults to undef
|
|
|
|
#
|
|
|
|
# [*password*]
|
|
|
|
# (optional) Deprecated Use neutron::keystone::authtoken::password
|
|
|
|
# Defaults to undef
|
|
|
|
#
|
|
|
|
# [*project_domain_id*]
|
|
|
|
# Deprecated. Auth user project's domain ID
|
|
|
|
# Defaults to $::os_service_default
|
|
|
|
#
|
|
|
|
# [*project_domain_name*]
|
|
|
|
# (optional) Deprecated
|
|
|
|
# Use neutron::keystone::authtoken::project_domain_name instead
|
|
|
|
# Defaults to undef
|
|
|
|
#
|
|
|
|
# [*project_name*]
|
|
|
|
# (optional) Deprecated Use neutron::keystone::authtoken::project_name
|
|
|
|
# instead
|
|
|
|
# Defaults to undef
|
|
|
|
#
|
|
|
|
# [*user_domain_id*]
|
|
|
|
# (optional) Deprecated Use neutron::keystone::authtoken::
|
|
|
|
# Defaults to $::os_service_default
|
|
|
|
#
|
|
|
|
# [*user_domain_name*]
|
|
|
|
# (optional) Deprecated Use neutron::keystone::authtoken::user_domain_name
|
|
|
|
# instead
|
|
|
|
# Defaults to undef
|
|
|
|
#
|
|
|
|
# [*region_name*]
|
|
|
|
# (optional) Deprecated Use neutron::keystone::authtoken::region_name
|
|
|
|
# instead.
|
|
|
|
# Defaults to undef
|
|
|
|
#
|
|
|
|
# [*memcached_servers*]
|
|
|
|
# (optional) Deprecated Use neutron::keystone::authtoken::memcached_servers
|
|
|
|
# instead
|
|
|
|
# Defaults to undef
|
|
|
|
#
|
|
|
|
# [*auth_type*]
|
|
|
|
# (optional) Deprecated Use auth_strategy instead.
|
|
|
|
# Defaults to undef
|
|
|
|
#
|
2013-08-05 13:20:54 -04:00
|
|
|
class neutron::server (
|
2015-02-24 13:03:10 -07:00
|
|
|
$package_ensure = 'present',
|
|
|
|
$enabled = true,
|
|
|
|
$manage_service = true,
|
|
|
|
$service_name = $::neutron::params::server_service,
|
2015-08-03 12:47:08 +02:00
|
|
|
$database_connection = undef,
|
|
|
|
$database_max_retries = undef,
|
|
|
|
$database_idle_timeout = undef,
|
|
|
|
$database_retry_interval = undef,
|
|
|
|
$database_min_pool_size = undef,
|
|
|
|
$database_max_pool_size = undef,
|
|
|
|
$database_max_overflow = undef,
|
2015-02-24 13:03:10 -07:00
|
|
|
$sync_db = false,
|
2016-09-30 10:03:06 -02:30
|
|
|
$api_workers = $::os_workers,
|
|
|
|
$rpc_workers = $::os_workers,
|
2015-12-04 13:01:44 +03:00
|
|
|
$agent_down_time = $::os_service_default,
|
2015-02-24 13:03:10 -07:00
|
|
|
$router_scheduler_driver = 'neutron.scheduler.l3_agent_scheduler.ChanceScheduler',
|
2015-12-04 13:01:44 +03:00
|
|
|
$router_distributed = $::os_service_default,
|
2016-04-26 22:01:06 -04:00
|
|
|
$network_scheduler_driver = $::os_service_default,
|
|
|
|
$dhcp_load_type = $::os_service_default,
|
|
|
|
$default_availability_zones = $::os_service_default,
|
2015-12-04 13:01:44 +03:00
|
|
|
$allow_automatic_l3agent_failover = $::os_service_default,
|
2016-06-21 13:10:14 +10:00
|
|
|
$allow_automatic_dhcp_failover = $::os_service_default,
|
2015-02-24 13:03:10 -07:00
|
|
|
$l3_ha = false,
|
|
|
|
$max_l3_agents_per_router = 3,
|
2015-12-04 13:01:44 +03:00
|
|
|
$l3_ha_net_cidr = $::os_service_default,
|
2015-08-25 13:29:04 +03:00
|
|
|
$qos_notification_drivers = $::os_service_default,
|
2016-06-21 13:19:11 +10:00
|
|
|
$network_auto_schedule = $::os_service_default,
|
2016-01-25 18:43:55 +01:00
|
|
|
$ensure_vpnaas_package = false,
|
|
|
|
$ensure_fwaas_package = false,
|
|
|
|
$vpnaas_agent_package = false,
|
2016-05-06 11:52:55 -04:00
|
|
|
$service_providers = $::os_service_default,
|
2016-08-04 19:20:02 +03:00
|
|
|
$auth_strategy = 'keystone',
|
2016-10-17 09:14:01 +03:00
|
|
|
$enable_proxy_headers_parsing = $::os_service_default,
|
2014-01-28 13:23:13 -05:00
|
|
|
# DEPRECATED PARAMETERS
|
2015-02-24 13:03:10 -07:00
|
|
|
$log_dir = undef,
|
|
|
|
$log_file = undef,
|
|
|
|
$report_interval = undef,
|
|
|
|
$state_path = undef,
|
|
|
|
$lock_path = undef,
|
2016-04-14 07:41:20 -04:00
|
|
|
$ensure_lbaas_package = false,
|
2016-07-12 09:25:01 +08:00
|
|
|
$min_l3_agents_per_router = undef,
|
2016-08-04 19:20:02 +03:00
|
|
|
$keystone_auth_type = undef,
|
|
|
|
$auth_uri = undef,
|
|
|
|
$auth_url = undef,
|
|
|
|
$username = undef,
|
|
|
|
$password = undef,
|
|
|
|
$region_name = undef,
|
|
|
|
$project_domain_name = undef,
|
|
|
|
$project_name = undef,
|
|
|
|
$user_domain_name = undef,
|
|
|
|
$memcached_servers = undef,
|
|
|
|
$project_domain_id = $::os_service_default,
|
|
|
|
$user_domain_id = $::os_service_default,
|
|
|
|
$auth_type = undef,
|
2016-01-05 12:30:00 -07:00
|
|
|
) inherits ::neutron::params {
|
2012-10-21 00:34:24 +02:00
|
|
|
|
2016-05-17 12:08:58 +00:00
|
|
|
include ::neutron::deps
|
2015-08-03 12:47:08 +02:00
|
|
|
include ::neutron::db
|
2015-02-17 09:01:27 -05:00
|
|
|
include ::neutron::policy
|
2016-03-01 14:50:00 -07:00
|
|
|
# Work-around LP#1551974. neutron requires the keystoneclient to auth tokens
|
|
|
|
include ::keystone::client
|
2012-10-09 10:21:36 +02:00
|
|
|
|
2016-08-04 19:20:02 +03:00
|
|
|
if $auth_type {
|
|
|
|
warning('neutron::server::auth_type is deprecated, use neutron::server::auth_strategy instead.')
|
|
|
|
}
|
|
|
|
|
|
|
|
if $keystone_auth_type {
|
|
|
|
warning('neutron::server::keystone_auth_type is deprecated, use neutron::keystone::authtoken::auth_type instead.')
|
|
|
|
}
|
|
|
|
|
|
|
|
if $auth_uri {
|
|
|
|
warning('neutron::server::auth_uri is deprecated, use neutron::keystone::authtoken::auth_uri instead.')
|
|
|
|
}
|
|
|
|
|
|
|
|
if $auth_url {
|
|
|
|
warning('neutron::server::auth_url is deprecated, use neutron::keystone::authtoken::auth_url instead.')
|
|
|
|
}
|
|
|
|
|
|
|
|
if $username {
|
|
|
|
warning('neutron::server::username is deprecated, use neutron::keystone::authtoken::username instead.')
|
|
|
|
}
|
|
|
|
|
|
|
|
if $password {
|
|
|
|
warning('neutron::server::password is deprecated, use neutron::keystone::authtoken::password instead.')
|
|
|
|
}
|
|
|
|
|
|
|
|
if ! is_service_default($project_domain_id) {
|
|
|
|
warning('neutron::server::project_domain_id is deprecated, use neutron::keystone::authtoken::project_domain_name instead.')
|
|
|
|
}
|
|
|
|
|
|
|
|
if $project_domain_name {
|
|
|
|
warning('neutron::server::project_domain_name is deprecated, use neutron::keystone::authtoken::project_domain_name instead.')
|
|
|
|
}
|
|
|
|
|
|
|
|
if $project_name {
|
|
|
|
warning('neutron::server::project_name is deprecated, use neutron::keystone::authtoken::project_name instead.')
|
|
|
|
}
|
|
|
|
|
|
|
|
if ! is_service_default($user_domain_id) {
|
|
|
|
warning('neutron::server::user_domain_id is deprecated, use neutron::keystone::authtoken::user_domain_name instead.')
|
|
|
|
}
|
|
|
|
|
|
|
|
if $user_domain_name {
|
|
|
|
warning('neutron::server::user_domain_name is deprecated, use neutron::keystone::authtoken::user_domain_name instead.')
|
|
|
|
}
|
|
|
|
|
|
|
|
if $region_name {
|
|
|
|
warning('neutron::server::region_name is deprecated, use neutron::keystone::authtoken::region_name instead.')
|
|
|
|
}
|
|
|
|
|
|
|
|
if $memcached_servers {
|
|
|
|
warning('neutron::server::memcached_servers is deprecated, use neutron::keystone::authtoken::memcached_servers instead')
|
|
|
|
}
|
|
|
|
|
2016-04-26 22:01:06 -04:00
|
|
|
if !is_service_default($default_availability_zones) {
|
|
|
|
validate_array($default_availability_zones)
|
|
|
|
}
|
|
|
|
|
|
|
|
if !is_service_default($dhcp_load_type) {
|
2016-09-14 11:40:21 +02:00
|
|
|
validate_re($dhcp_load_type,
|
|
|
|
['^networks$', '^subnets$', '^ports$'],
|
|
|
|
'Must pass either networks, subnets, or ports as values for dhcp_load_type')
|
2016-04-26 22:01:06 -04:00
|
|
|
}
|
|
|
|
|
2016-05-06 11:52:55 -04:00
|
|
|
if !is_service_default($service_providers) {
|
|
|
|
validate_array($service_providers)
|
|
|
|
}
|
|
|
|
|
2016-01-25 18:43:55 +01:00
|
|
|
if $ensure_fwaas_package {
|
|
|
|
if ($::osfamily == 'Debian') {
|
|
|
|
# Debian platforms
|
|
|
|
if $vpnaas_agent_package {
|
|
|
|
ensure_resource( 'package', $::neutron::params::vpnaas_agent_package, {
|
|
|
|
'ensure' => $neutron::package_ensure,
|
|
|
|
'tag' => ['openstack', 'neutron-package'],
|
|
|
|
})
|
|
|
|
Package[$::neutron::params::vpnaas_agent_package] -> Neutron_fwaas_service_config<||>
|
|
|
|
} else {
|
|
|
|
ensure_resource( 'package', 'neutron-fwaas' , {
|
|
|
|
'name' => $::neutron::params::fwaas_package,
|
|
|
|
'ensure' => $neutron::package_ensure,
|
|
|
|
'tag' => ['openstack', 'neutron-package'],
|
|
|
|
})
|
|
|
|
}
|
|
|
|
} elsif($::osfamily == 'Redhat') {
|
|
|
|
# RH platforms
|
|
|
|
ensure_resource( 'package', 'neutron-fwaas', {
|
|
|
|
'name' => $::neutron::params::fwaas_package,
|
|
|
|
'ensure' => $neutron::package_ensure,
|
|
|
|
'tag' => ['openstack', 'neutron-package'],
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if $ensure_vpnaas_package {
|
|
|
|
ensure_resource( 'package', 'neutron-vpnaas-agent', {
|
|
|
|
'ensure' => $package_ensure,
|
|
|
|
'name' => $::neutron::params::vpnaas_agent_package,
|
|
|
|
'tag' => ['openstack', 'neutron-package'],
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
if $ensure_lbaas_package {
|
2016-04-14 07:41:20 -04:00
|
|
|
warning('$ensure_lbaas_package is deprecated. To install lbaas agent the neutron::agents::lbaas class should be used.')
|
2016-08-26 11:35:17 -04:00
|
|
|
ensure_resource( 'package', 'neutron-lbaasv2-agent', {
|
2016-01-25 18:43:55 +01:00
|
|
|
'ensure' => $package_ensure,
|
2016-08-26 11:35:17 -04:00
|
|
|
'name' => $::neutron::params::lbaasv2_agent_package,
|
2016-01-25 18:43:55 +01:00
|
|
|
'tag' => ['openstack', 'neutron-package'],
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2014-02-03 13:28:03 +01:00
|
|
|
if $sync_db {
|
2015-06-29 15:46:13 +02:00
|
|
|
include ::neutron::db::sync
|
2014-02-03 13:28:03 +01:00
|
|
|
}
|
|
|
|
|
2016-07-12 09:25:01 +08:00
|
|
|
if $min_l3_agents_per_router {
|
|
|
|
warning('min_l3_agents_per_router is deprecated, has no effect and will be removed for the Ocata release.')
|
|
|
|
}
|
|
|
|
|
2013-10-31 17:33:36 +00:00
|
|
|
neutron_config {
|
2016-07-12 09:25:01 +08:00
|
|
|
'DEFAULT/l3_ha': value => $l3_ha;
|
|
|
|
'DEFAULT/max_l3_agents_per_router': value => $max_l3_agents_per_router;
|
|
|
|
'DEFAULT/l3_ha_net_cidr': value => $l3_ha_net_cidr;
|
2015-02-24 13:03:10 -07:00
|
|
|
'DEFAULT/api_workers': value => $api_workers;
|
|
|
|
'DEFAULT/rpc_workers': value => $rpc_workers;
|
|
|
|
'DEFAULT/agent_down_time': value => $agent_down_time;
|
|
|
|
'DEFAULT/router_scheduler_driver': value => $router_scheduler_driver;
|
|
|
|
'DEFAULT/router_distributed': value => $router_distributed;
|
|
|
|
'DEFAULT/allow_automatic_l3agent_failover': value => $allow_automatic_l3agent_failover;
|
2016-06-21 13:10:14 +10:00
|
|
|
'DEFAULT/allow_automatic_dhcp_failover': value => $allow_automatic_dhcp_failover;
|
2016-04-26 22:01:06 -04:00
|
|
|
'DEFAULT/network_scheduler_driver': value => $network_scheduler_driver;
|
|
|
|
'DEFAULT/dhcp_load_type': value => $dhcp_load_type;
|
|
|
|
'DEFAULT/default_availability_zones': value => join(any2array($default_availability_zones), ',');
|
2016-06-21 13:19:11 +10:00
|
|
|
'DEFAULT/network_auto_schedule': value => $network_auto_schedule;
|
2016-05-06 11:52:55 -04:00
|
|
|
'service_providers/service_provider': value => $service_providers;
|
2013-10-31 17:33:36 +00:00
|
|
|
}
|
|
|
|
|
2014-12-20 16:36:34 -07:00
|
|
|
if $state_path {
|
|
|
|
# If we got state_path here, display deprecation warning and override the value from
|
|
|
|
# the base class. This preserves the behavior of before state_path was deprecated.
|
|
|
|
|
|
|
|
warning('The state_path parameter is deprecated. Use the state_path parameter on the base neutron class instead.')
|
|
|
|
|
|
|
|
Neutron_config <| title == 'DEFAULT/state_path' |> {
|
|
|
|
value => $state_path,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if $lock_path {
|
|
|
|
# If we got lock_path here, display deprecation warning and override the value from
|
|
|
|
# the base class. This preserves the behavior of before lock_path was deprecated.
|
|
|
|
|
|
|
|
warning('The lock_path parameter is deprecated. Use the lock_path parameter on the base neutron class instead.')
|
|
|
|
|
2016-03-03 14:06:10 +03:00
|
|
|
Neutron_config <| title == 'oslo_concurrency/lock_path' |> {
|
2014-12-20 16:36:34 -07:00
|
|
|
value => $lock_path,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-08-25 13:29:04 +03:00
|
|
|
neutron_config { 'qos/notification_drivers': value => join(any2array($qos_notification_drivers), ',') }
|
|
|
|
|
2013-08-05 13:20:54 -04:00
|
|
|
if ($::neutron::params::server_package) {
|
|
|
|
package { 'neutron-server':
|
2013-08-09 16:35:19 +00:00
|
|
|
ensure => $package_ensure,
|
2013-08-05 13:20:54 -04:00
|
|
|
name => $::neutron::params::server_package,
|
2015-07-22 23:08:04 +02:00
|
|
|
tag => ['openstack', 'neutron-package'],
|
2013-04-19 11:08:22 -07:00
|
|
|
}
|
2012-10-09 10:21:36 +02:00
|
|
|
}
|
|
|
|
|
2016-01-20 12:41:20 +03:00
|
|
|
neutron_config {
|
|
|
|
'DEFAULT/auth_type': value => $auth_type;
|
|
|
|
}
|
|
|
|
|
2016-08-04 19:20:02 +03:00
|
|
|
$auth_strategy_real = pick($auth_type, $auth_strategy)
|
|
|
|
if ($auth_strategy_real == 'keystone') {
|
2013-05-06 14:15:29 -06:00
|
|
|
|
2016-08-04 19:20:02 +03:00
|
|
|
include ::neutron::keystone::authtoken
|
2015-01-16 14:06:21 -05:00
|
|
|
|
2016-08-04 12:15:12 +03:00
|
|
|
neutron_api_config {
|
|
|
|
'filter:authtoken/admin_tenant_name': ensure => absent;
|
|
|
|
'filter:authtoken/admin_user': ensure => absent;
|
|
|
|
'filter:authtoken/admin_password': ensure => absent;
|
|
|
|
'filter:authtoken/identity_uri': ensure => absent;
|
2013-05-06 14:15:29 -06:00
|
|
|
}
|
2013-05-15 09:14:19 +02:00
|
|
|
|
2013-05-06 14:15:29 -06:00
|
|
|
}
|
|
|
|
|
2016-10-17 09:14:01 +03:00
|
|
|
oslo::middleware { 'neutron_config':
|
|
|
|
enable_proxy_headers_parsing => $enable_proxy_headers_parsing,
|
|
|
|
}
|
|
|
|
|
2014-01-15 22:52:03 -06:00
|
|
|
if $manage_service {
|
|
|
|
if $enabled {
|
|
|
|
$service_ensure = 'running'
|
|
|
|
} else {
|
|
|
|
$service_ensure = 'stopped'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-08-05 13:20:54 -04:00
|
|
|
service { 'neutron-server':
|
2012-10-09 10:21:36 +02:00
|
|
|
ensure => $service_ensure,
|
2014-11-21 09:57:46 -07:00
|
|
|
name => $service_name,
|
2012-10-09 10:21:36 +02:00
|
|
|
enable => $enabled,
|
|
|
|
hasstatus => true,
|
2013-05-19 00:42:56 -04:00
|
|
|
hasrestart => true,
|
2015-10-05 20:15:04 +00:00
|
|
|
tag => ['neutron-service', 'neutron-db-sync-service'],
|
2012-10-09 10:21:36 +02:00
|
|
|
}
|
|
|
|
}
|