Move Neutron to $::os_service_default - part 2

This change updates the values in main classes that are currently set to
the same values as in default configuration files to $::os_service_default fact

Change-Id: I5279cfd72192534a5ffcfdaf71b257b082a8b42c
Related-bug: #1515273
This commit is contained in:
Sergey Kolekonov 2015-12-04 13:01:44 +03:00
parent a5083ca71f
commit 5379de00d0
28 changed files with 292 additions and 386 deletions

View File

@ -15,7 +15,7 @@
# Defaults to true # Defaults to true
# #
# [*debug*] # [*debug*]
# (optional) Show debugging output in log. Defaults to false. # (optional) Show debugging output in log. Defaults to $::os_service_default.
# #
# [*state_path*] # [*state_path*]
# (optional) Where to store dnsmasq state files. This directory must be # (optional) Where to store dnsmasq state files. This directory must be
@ -31,7 +31,7 @@
# #
# [*dhcp_domain*] # [*dhcp_domain*]
# (optional) domain to use for building the hostnames # (optional) domain to use for building the hostnames
# Defaults to 'openstacklocal' # Defaults to $::os_service_default
# #
# [*dhcp_driver*] # [*dhcp_driver*]
# (optional) Defaults to 'neutron.agent.linux.dhcp.Dnsmasq'. # (optional) Defaults to 'neutron.agent.linux.dhcp.Dnsmasq'.
@ -62,7 +62,7 @@
# #
# [*dhcp_broadcast_reply*] # [*dhcp_broadcast_reply*]
# (optional) Use broadcast in DHCP replies # (optional) Use broadcast in DHCP replies
# Defaults to false. # Defaults to $::os_service_default.
# #
# === Deprecated Parameters # === Deprecated Parameters
# #
@ -76,18 +76,18 @@ class neutron::agents::dhcp (
$package_ensure = present, $package_ensure = present,
$enabled = true, $enabled = true,
$manage_service = true, $manage_service = true,
$debug = false, $debug = $::os_service_default,
$state_path = '/var/lib/neutron', $state_path = '/var/lib/neutron',
$resync_interval = 30, $resync_interval = 30,
$interface_driver = 'neutron.agent.linux.interface.OVSInterfaceDriver', $interface_driver = 'neutron.agent.linux.interface.OVSInterfaceDriver',
$dhcp_domain = 'openstacklocal', $dhcp_domain = $::os_service_default,
$dhcp_driver = 'neutron.agent.linux.dhcp.Dnsmasq', $dhcp_driver = 'neutron.agent.linux.dhcp.Dnsmasq',
$root_helper = 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf', $root_helper = 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf',
$dnsmasq_config_file = $::os_service_default, $dnsmasq_config_file = $::os_service_default,
$dhcp_delete_namespaces = true, $dhcp_delete_namespaces = true,
$enable_isolated_metadata = false, $enable_isolated_metadata = false,
$enable_metadata_network = false, $enable_metadata_network = false,
$dhcp_broadcast_reply = false, $dhcp_broadcast_reply = $::os_service_default,
# DEPRECATED PARAMETERS # DEPRECATED PARAMETERS
$use_namespaces = $::os_service_default, $use_namespaces = $::os_service_default,
) { ) {

View File

@ -40,28 +40,28 @@
# #
# [*handle_internal_only_routers*] # [*handle_internal_only_routers*]
# (optional) L3 Agent will handle non-external routers # (optional) L3 Agent will handle non-external routers
# Defaults to true # Defaults to $::os_service_default
# #
# [*metadata_port*] # [*metadata_port*]
# (optional) The port of the metadata server # (optional) The port of the metadata server
# Defaults to 9697 # Defaults to $::os_service_default
# #
# [*send_arp_for_ha*] # [*send_arp_for_ha*]
# (optional) Send this many gratuitous ARPs for HA setup. Set it below or equal to 0 # (optional) Send this many gratuitous ARPs for HA setup. Set it below or equal to 0
# to disable this feature. # to disable this feature.
# Defaults to 3 # Defaults to $::os_service_default
# #
# [*periodic_interval*] # [*periodic_interval*]
# (optional) seconds between re-sync routers' data if needed # (optional) seconds between re-sync routers' data if needed
# Defaults to 40 # Defaults to $::os_service_default
# #
# [*periodic_fuzzy_delay*] # [*periodic_fuzzy_delay*]
# (optional) seconds to start to sync routers' data after starting agent # (optional) seconds to start to sync routers' data after starting agent
# Defaults to 5 # Defaults to $::os_service_default
# #
# [*enable_metadata_proxy*] # [*enable_metadata_proxy*]
# (optional) can be set to False if the Nova metadata server is not available # (optional) can be set to False if the Nova metadata server is not available
# Defaults to True # Defaults to $::os_service_default
# #
# [*network_device_mtu*] # [*network_device_mtu*]
# (optional) The MTU size for the interfaces managed by the L3 agent # (optional) The MTU size for the interfaces managed by the L3 agent
@ -115,12 +115,12 @@ class neutron::agents::l3 (
$interface_driver = 'neutron.agent.linux.interface.OVSInterfaceDriver', $interface_driver = 'neutron.agent.linux.interface.OVSInterfaceDriver',
$router_id = $::os_service_default, $router_id = $::os_service_default,
$gateway_external_network_id = $::os_service_default, $gateway_external_network_id = $::os_service_default,
$handle_internal_only_routers = true, $handle_internal_only_routers = $::os_service_default,
$metadata_port = '9697', $metadata_port = $::os_service_default,
$send_arp_for_ha = '3', $send_arp_for_ha = $::os_service_default,
$periodic_interval = '40', $periodic_interval = $::os_service_default,
$periodic_fuzzy_delay = '5', $periodic_fuzzy_delay = $::os_service_default,
$enable_metadata_proxy = true, $enable_metadata_proxy = $::os_service_default,
$network_device_mtu = $::os_service_default, $network_device_mtu = $::os_service_default,
$router_delete_namespaces = true, $router_delete_namespaces = true,
$ha_enabled = false, $ha_enabled = false,

View File

@ -15,7 +15,7 @@
# Defaults to true # Defaults to true
# #
# [*debug*] # [*debug*]
# (optional) Show debugging output in log. Defaults to false. # (optional) Show debugging output in log. Defaults to $::os_service_default.
# #
# [*interface_driver*] # [*interface_driver*]
# (optional) Defaults to 'neutron.agent.linux.interface.OVSInterfaceDriver'. # (optional) Defaults to 'neutron.agent.linux.interface.OVSInterfaceDriver'.
@ -44,7 +44,7 @@ class neutron::agents::lbaas (
$package_ensure = present, $package_ensure = present,
$enabled = true, $enabled = true,
$manage_service = true, $manage_service = true,
$debug = false, $debug = $::os_service_default,
$interface_driver = 'neutron.agent.linux.interface.OVSInterfaceDriver', $interface_driver = 'neutron.agent.linux.interface.OVSInterfaceDriver',
$device_driver = 'neutron_lbaas.services.loadbalancer.drivers.haproxy.namespace_driver.HaproxyNSDriver', $device_driver = 'neutron_lbaas.services.loadbalancer.drivers.haproxy.namespace_driver.HaproxyNSDriver',
$user_group = $::neutron::params::nobody_user_group, $user_group = $::neutron::params::nobody_user_group,

View File

@ -43,13 +43,13 @@
# The authentication region. (Defaults to $::os_service_default) # The authentication region. (Defaults to $::os_service_default)
# #
# [*metadata_ip*] # [*metadata_ip*]
# The IP address of the metadata service. Defaults to '127.0.0.1'. # The IP address of the metadata service. Defaults to $::os_service_default.
# #
# [*metadata_port*] # [*metadata_port*]
# The TCP port of the metadata service. Defaults to 8775. # The TCP port of the metadata service. Defaults to $::os_service_default.
# #
# [*metadata_protocol*] # [*metadata_protocol*]
# The protocol to use for requests to Nova metadata server. Defaults to 'http'. # The protocol to use for requests to Nova metadata server. Defaults to $::os_service_default.
# #
# [*metadata_workers*] # [*metadata_workers*]
# (optional) Number of separate worker processes to spawn. # (optional) Number of separate worker processes to spawn.
@ -61,14 +61,13 @@
# #
# [*metadata_backlog*] # [*metadata_backlog*]
# (optional) Number of backlog requests to configure the metadata server socket with. # (optional) Number of backlog requests to configure the metadata server socket with.
# Defaults to 4096 # Defaults to $::os_service_default
# #
# [*metadata_memory_cache_ttl*] # [*metadata_memory_cache_ttl*]
# (optional) Specifies time in seconds a metadata cache entry is valid in # (optional) Specifies time in seconds a metadata cache entry is valid in
# memory caching backend. # memory caching backend.
# Set to 0 will cause cache entries to never expire. # Set to 0 will cause cache entries to never expire.
# Set to $::os_service_default or false to disable cache. # Set to $::os_service_default or false to disable cache.
# Defaults to 5
# #
class neutron::agents::metadata ( class neutron::agents::metadata (
@ -84,12 +83,12 @@ class neutron::agents::metadata (
$auth_insecure = false, $auth_insecure = false,
$auth_ca_cert = $::os_service_default, $auth_ca_cert = $::os_service_default,
$auth_region = $::os_service_default, $auth_region = $::os_service_default,
$metadata_ip = '127.0.0.1', $metadata_ip = $::os_service_default,
$metadata_port = '8775', $metadata_port = $::os_service_default,
$metadata_protocol = 'http', $metadata_protocol = $::os_service_default,
$metadata_workers = $::processorcount, $metadata_workers = $::processorcount,
$metadata_backlog = '4096', $metadata_backlog = $::os_service_default,
$metadata_memory_cache_ttl = 5, $metadata_memory_cache_ttl = $::os_service_default,
) { ) {
include ::neutron::params include ::neutron::params
@ -114,7 +113,7 @@ class neutron::agents::metadata (
'DEFAULT/metadata_backlog': value => $metadata_backlog; 'DEFAULT/metadata_backlog': value => $metadata_backlog;
} }
if ! is_service_default ($metadata_memory_cache_ttl) { if ! is_service_default ($metadata_memory_cache_ttl) and ($metadata_memory_cache_ttl) {
neutron_metadata_agent_config { neutron_metadata_agent_config {
'DEFAULT/cache_url': value => "memory://?default_ttl=${metadata_memory_cache_ttl}"; 'DEFAULT/cache_url': value => "memory://?default_ttl=${metadata_memory_cache_ttl}";
} }

View File

@ -64,8 +64,8 @@ class neutron::agents::metering (
$debug = false, $debug = false,
$interface_driver = 'neutron.agent.linux.interface.OVSInterfaceDriver', $interface_driver = 'neutron.agent.linux.interface.OVSInterfaceDriver',
$driver = 'neutron.services.metering.drivers.noop.noop_driver.NoopMeteringDriver', $driver = 'neutron.services.metering.drivers.noop.noop_driver.NoopMeteringDriver',
$measure_interval = '30', $measure_interval = $::os_service_default,
$report_interval = '300', $report_interval = $::os_service_default,
# DEPRECATED PARAMETERS # DEPRECATED PARAMETERS
$use_namespaces = $::os_service_default, $use_namespaces = $::os_service_default,
) { ) {

View File

@ -64,11 +64,11 @@ class neutron::agents::ml2::linuxbridge (
$manage_service = true, $manage_service = true,
$tunnel_types = [], $tunnel_types = [],
$local_ip = false, $local_ip = false,
$vxlan_group = '224.0.0.1', $vxlan_group = $::os_service_default,
$vxlan_ttl = false, $vxlan_ttl = $::os_service_default,
$vxlan_tos = false, $vxlan_tos = $::os_service_default,
$polling_interval = 2, $polling_interval = $::os_service_default,
$l2_population = false, $l2_population = $::os_service_default,
$physical_interface_mappings = [], $physical_interface_mappings = [],
$firewall_driver = 'neutron.agent.linux.iptables_firewall.IptablesFirewallDriver' $firewall_driver = 'neutron.agent.linux.iptables_firewall.IptablesFirewallDriver'
) { ) {
@ -86,25 +86,10 @@ class neutron::agents::ml2::linuxbridge (
fail('The local_ip parameter is required when vxlan tunneling is enabled') fail('The local_ip parameter is required when vxlan tunneling is enabled')
} }
if $vxlan_group {
neutron_agent_linuxbridge { 'vxlan/vxlan_group': value => $vxlan_group }
} else {
neutron_agent_linuxbridge { 'vxlan/vxlan_group': ensure => absent }
}
if $vxlan_ttl {
neutron_agent_linuxbridge { 'vxlan/vxlan_ttl': value => $vxlan_ttl }
} else {
neutron_agent_linuxbridge { 'vxlan/vxlan_ttl': ensure => absent }
}
if $vxlan_tos {
neutron_agent_linuxbridge { 'vxlan/vxlan_tos': value => $vxlan_tos }
} else {
neutron_agent_linuxbridge { 'vxlan/vxlan_tos': ensure => absent }
}
neutron_agent_linuxbridge { neutron_agent_linuxbridge {
'vxlan/vxlan_ttl': value => $vxlan_ttl;
'vxlan/vxlan_group': value => $vxlan_group;
'vxlan/vxlan_tos': value => $vxlan_tos;
'vxlan/enable_vxlan': value => true; 'vxlan/enable_vxlan': value => true;
'vxlan/local_ip': value => $local_ip; 'vxlan/local_ip': value => $local_ip;
'vxlan/l2_population': value => $l2_population; 'vxlan/l2_population': value => $l2_population;
@ -113,8 +98,6 @@ class neutron::agents::ml2::linuxbridge (
neutron_agent_linuxbridge { neutron_agent_linuxbridge {
'vxlan/enable_vxlan': value => false; 'vxlan/enable_vxlan': value => false;
'vxlan/local_ip': ensure => absent; 'vxlan/local_ip': ensure => absent;
'vxlan/vxlan_group': ensure => absent;
'vxlan/l2_population': ensure => absent;
} }
} }

View File

@ -71,17 +71,17 @@
# [*polling_interval*] # [*polling_interval*]
# (optional) The number of seconds the agent will wait between # (optional) The number of seconds the agent will wait between
# polling for local device changes. # polling for local device changes.
# Defaults to '2" # Defaults to $::os_service_default
# #
# [*l2_population*] # [*l2_population*]
# (optional) Extension to use alongside ml2 plugin's l2population # (optional) Extension to use alongside ml2 plugin's l2population
# mechanism driver. # mechanism driver.
# Defaults to false # Defaults to $::os_service_default
# #
# [*arp_responder*] # [*arp_responder*]
# (optional) Enable or not the ARP responder. # (optional) Enable or not the ARP responder.
# Recommanded when using l2 population mechanism driver. # Recommanded when using l2 population mechanism driver.
# Defaults to false # Defaults to $::os_service_default
# #
# [*firewall_driver*] # [*firewall_driver*]
# (optional) Firewall driver for realizing neutron security group function. # (optional) Firewall driver for realizing neutron security group function.
@ -90,7 +90,7 @@
# [*enable_distributed_routing*] # [*enable_distributed_routing*]
# (optional) Set to True on L2 agents to enable support # (optional) Set to True on L2 agents to enable support
# for distributed virtual routing. # for distributed virtual routing.
# Defaults to false # Defaults to $::os_service_default
# #
# [*drop_flows_on_start*] # [*drop_flows_on_start*]
# (optional) Set to True to drop all flows during agent start for a clean # (optional) Set to True to drop all flows during agent start for a clean
@ -107,7 +107,7 @@
# #
# [*prevent_arp_spoofing*] # [*prevent_arp_spoofing*]
# (optional) Enable or not ARP Spoofing Protection # (optional) Enable or not ARP Spoofing Protection
# Defaults to true # Defaults to $::os_service_default
# #
# [*extensions*] # [*extensions*]
# (optional) Extensions list to use # (optional) Extensions list to use
@ -126,14 +126,14 @@ class neutron::agents::ml2::ovs (
$local_ip = false, $local_ip = false,
$tunnel_bridge = 'br-tun', $tunnel_bridge = 'br-tun',
$vxlan_udp_port = 4789, $vxlan_udp_port = 4789,
$polling_interval = 2, $polling_interval = $::os_service_default,
$l2_population = false, $l2_population = $::os_service_default,
$arp_responder = false, $arp_responder = $::os_service_default,
$firewall_driver = 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver', $firewall_driver = 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver',
$enable_distributed_routing = false, $enable_distributed_routing = $::os_service_default,
$drop_flows_on_start = false, $drop_flows_on_start = false,
$manage_vswitch = true, $manage_vswitch = true,
$prevent_arp_spoofing = true, $prevent_arp_spoofing = $::os_service_default,
) { ) {
include ::neutron::params include ::neutron::params
@ -145,8 +145,10 @@ class neutron::agents::ml2::ovs (
fail('Local ip for ovs agent must be set when tunneling is enabled') fail('Local ip for ovs agent must be set when tunneling is enabled')
} }
if $enable_tunneling and $enable_distributed_routing and ! $l2_population { if ($enable_tunneling) and (!is_service_default($enable_distributed_routing)) and (!is_service_default($l2_population)) {
fail('L2 population must be enabled when DVR and tunneling are enabled') if $enable_distributed_routing and ! $l2_population {
fail('L2 population must be enabled when DVR and tunneling are enabled')
}
} }
Neutron_agent_ovs<||> ~> Service['neutron-ovs-agent-service'] Neutron_agent_ovs<||> ~> Service['neutron-ovs-agent-service']

View File

@ -41,7 +41,7 @@
# (optional) Defaults to $::os_service_default # (optional) Defaults to $::os_service_default
# #
# [*ipsec_status_check_interval*] # [*ipsec_status_check_interval*]
# (optional) Status check interval. Defaults to '60'. # (optional) Status check interval. Defaults to $::os_service_default.
# #
class neutron::agents::vpnaas ( class neutron::agents::vpnaas (
$package_ensure = present, $package_ensure = present,
@ -50,7 +50,7 @@ class neutron::agents::vpnaas (
$vpn_device_driver = 'neutron.services.vpn.device_drivers.ipsec.OpenSwanDriver', $vpn_device_driver = 'neutron.services.vpn.device_drivers.ipsec.OpenSwanDriver',
$interface_driver = 'neutron.agent.linux.interface.OVSInterfaceDriver', $interface_driver = 'neutron.agent.linux.interface.OVSInterfaceDriver',
$external_network_bridge = $::os_service_default, $external_network_bridge = $::os_service_default,
$ipsec_status_check_interval = '60' $ipsec_status_check_interval = $::os_service_default
) { ) {
include ::neutron::params include ::neutron::params

View File

@ -10,37 +10,37 @@
# #
# [*database_idle_timeout*] # [*database_idle_timeout*]
# Timeout when db connections should be reaped. # Timeout when db connections should be reaped.
# (Optional) Defaults to 3600. # (Optional) Defaults to $::os_service_default.
# #
# [*database_min_pool_size*] # [*database_min_pool_size*]
# Minimum number of SQL connections to keep open in a pool. # Minimum number of SQL connections to keep open in a pool.
# (Optional) Defaults to 1. # (Optional) Defaults to $::os_service_default.
# #
# [*database_max_pool_size*] # [*database_max_pool_size*]
# Maximum number of SQL connections to keep open in a pool. # Maximum number of SQL connections to keep open in a pool.
# (Optional) Defaults to 10. # (Optional) Defaults to $::os_service_default.
# #
# [*database_max_retries*] # [*database_max_retries*]
# Maximum db connection retries during startup. # Maximum db connection retries during startup.
# Setting -1 implies an infinite retry count. # Setting -1 implies an infinite retry count.
# (Optional) Defaults to 10. # (Optional) Defaults to $::os_service_default.
# #
# [*database_retry_interval*] # [*database_retry_interval*]
# Interval between retries of opening a sql connection. # Interval between retries of opening a sql connection.
# (Optional) Defaults to 10. # (Optional) Defaults to $::os_service_default.
# #
# [*database_max_overflow*] # [*database_max_overflow*]
# If set, use this value for max_overflow with sqlalchemy. # If set, use this value for max_overflow with sqlalchemy.
# (Optional) Defaults to 20. # (Optional) Defaults to $::os_service_default.
# #
class neutron::db ( class neutron::db (
$database_connection = 'sqlite:////var/lib/neutron/ovs.sqlite', $database_connection = 'sqlite:////var/lib/neutron/ovs.sqlite',
$database_idle_timeout = 3600, $database_idle_timeout = $::os_service_default,
$database_min_pool_size = 1, $database_min_pool_size = $::os_service_default,
$database_max_pool_size = 10, $database_max_pool_size = $::os_service_default,
$database_max_retries = 10, $database_max_retries = $::os_service_default,
$database_retry_interval = 10, $database_retry_interval = $::os_service_default,
$database_max_overflow = 20, $database_max_overflow = $::os_service_default,
) { ) {
include ::neutron::params include ::neutron::params

View File

@ -15,19 +15,19 @@
# #
# [*verbose*] # [*verbose*]
# (optional) Verbose logging # (optional) Verbose logging
# Defaults to False # Defaults to $::os_service_default
# #
# [*debug*] # [*debug*]
# (optional) Print debug messages in the logs # (optional) Print debug messages in the logs
# Defaults to False # Defaults to $::os_service_default
# #
# [*bind_host*] # [*bind_host*]
# (optional) The IP/interface to bind to # (optional) The IP/interface to bind to
# Defaults to 0.0.0.0 (all interfaces) # Defaults to $::os_service_default
# #
# [*bind_port*] # [*bind_port*]
# (optional) The port to use # (optional) The port to use
# Defaults to 9696 # Defaults to $::os_service_default
# #
# [*core_plugin*] # [*core_plugin*]
# (optional) Neutron plugin provider # (optional) Neutron plugin provider
@ -48,24 +48,24 @@
# #
# [*auth_strategy*] # [*auth_strategy*]
# (optional) How to authenticate # (optional) How to authenticate
# Defaults to 'keystone'. 'noauth' is the only other valid option # Defaults to 'keystone'. 'noauth' and 'keystone' are the only valid options
# #
# [*base_mac*] # [*base_mac*]
# (optional) The MAC address pattern to use. # (optional) The MAC address pattern to use.
# Defaults to fa:16:3e:00:00:00 # Defaults to $::os_service_default
# #
# [*mac_generation_retries*] # [*mac_generation_retries*]
# (optional) How many times to try to generate a unique mac # (optional) How many times to try to generate a unique mac
# Defaults to 16 # Defaults to $::os_service_default
# #
# [*dhcp_lease_duration*] # [*dhcp_lease_duration*]
# (optional) DHCP lease # (optional) DHCP lease
# Defaults to 86400 seconds # Defaults to $::os_service_default
# #
# [*dhcp_agents_per_network*] # [*dhcp_agents_per_network*]
# (optional) Number of DHCP agents scheduled to host a network. # (optional) Number of DHCP agents scheduled to host a network.
# This enables redundant DHCP agents for configured networks. # This enables redundant DHCP agents for configured networks.
# Defaults to 1 # Defaults to $::os_service_default
# #
# [*network_device_mtu*] # [*network_device_mtu*]
# (optional) The MTU size for the interfaces managed by neutron # (optional) The MTU size for the interfaces managed by neutron
@ -73,27 +73,27 @@
# #
# [*dhcp_agent_notification*] # [*dhcp_agent_notification*]
# (optional) Allow sending resource operation notification to DHCP agent. # (optional) Allow sending resource operation notification to DHCP agent.
# Defaults to true # Defaults to $::os_service_default
# #
# [*advertise_mtu*] # [*advertise_mtu*]
# (optional) VMs will receive DHCP and RA MTU option when the network's preferred MTU is known # (optional) VMs will receive DHCP and RA MTU option when the network's preferred MTU is known
# Defaults to false # Defaults to $::os_service_default
# #
# [*allow_bulk*] # [*allow_bulk*]
# (optional) Enable bulk crud operations # (optional) Enable bulk crud operations
# Defaults to true # Defaults to $::os_service_default
# #
# [*allow_pagination*] # [*allow_pagination*]
# (optional) Enable pagination # (optional) Enable pagination
# Defaults to false # Defaults to $::os_service_default
# #
# [*allow_sorting*] # [*allow_sorting*]
# (optional) Enable sorting # (optional) Enable sorting
# Defaults to false # Defaults to $::os_service_default
# #
# [*allow_overlapping_ips*] # [*allow_overlapping_ips*]
# (optional) Enables network namespaces # (optional) Enables network namespaces
# Defaults to false # Defaults to $::os_service_default
# #
# [*api_extensions_path*] # [*api_extensions_path*]
# (optional) Specify additional paths for API extensions that the # (optional) Specify additional paths for API extensions that the
@ -111,7 +111,7 @@
# agent_down_time, best if it is half or less than agent_down_time. # agent_down_time, best if it is half or less than agent_down_time.
# agent_down_time is a config for neutron-server, set by class neutron::server # 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 # report_interval is a config for neutron agents, set by class neutron
# Defaults to: 30 # Defaults to: $::os_service_default
# #
# [*memcache_servers*] # [*memcache_servers*]
# List of memcache servers in format of server:port. # List of memcache servers in format of server:port.
@ -127,7 +127,7 @@
# #
# [*rpc_response_timeout*] # [*rpc_response_timeout*]
# (optional) Seconds to wait for a response from a call # (optional) Seconds to wait for a response from a call
# Defaults to 60 # Defaults to $::os_service_default
# #
# [*rabbit_password*] # [*rabbit_password*]
# [*rabbit_host*] # [*rabbit_host*]
@ -137,7 +137,7 @@
# #
# [*rabbit_virtual_host*] # [*rabbit_virtual_host*]
# (optional) virtualhost to use. # (optional) virtualhost to use.
# Defaults to '/' # Defaults to $::os_service_default
# #
# [*rabbit_hosts*] # [*rabbit_hosts*]
# (optional) array of rabbitmq servers for HA. # (optional) array of rabbitmq servers for HA.
@ -162,7 +162,7 @@
# #
# [*rabbit_use_ssl*] # [*rabbit_use_ssl*]
# (optional) Connect over SSL for RabbitMQ # (optional) Connect over SSL for RabbitMQ
# Defaults to false # Defaults to $::os_service_default
# #
# [*kombu_ssl_ca_certs*] # [*kombu_ssl_ca_certs*]
# (optional) SSL certification authority file (valid only if SSL enabled). # (optional) SSL certification authority file (valid only if SSL enabled).
@ -187,35 +187,35 @@
# to MQ provider. This is used in some cases where you may need to wait # to MQ provider. This is used in some cases where you may need to wait
# for the provider to propery premote the master before attempting to # for the provider to propery premote the master before attempting to
# reconnect. See https://review.openstack.org/#/c/76686 # reconnect. See https://review.openstack.org/#/c/76686
# Defaults to '1.0' # Defaults to $::os_service_default
# #
# [*use_ssl*] # [*use_ssl*]
# (optinal) Enable SSL on the API server # (optinal) Enable SSL on the API server
# Defaults to false, not set # Defaults to $::os_service_default
# #
# [*cert_file*] # [*cert_file*]
# (optinal) certificate file to use when starting api server securely # (optinal) certificate file to use when starting api server securely
# defaults to false, not set # defaults to $::os_service_default
# #
# [*key_file*] # [*key_file*]
# (optional) Private key file to use when starting API server securely # (optional) Private key file to use when starting API server securely
# Defaults to false, not set # Defaults to $::os_service_default
# #
# [*ca_file*] # [*ca_file*]
# (optional) CA certificate file to use to verify connecting clients # (optional) CA certificate file to use to verify connecting clients
# Defaults to false, not set # Defaults to $::os_service_default
# #
# [*use_syslog*] # [*use_syslog*]
# (optional) Use syslog for logging # (optional) Use syslog for logging
# Defaults to false # Defaults to $::os_service_default
# #
# [*use_stderr*] # [*use_stderr*]
# (optional) Use stderr for logging # (optional) Use stderr for logging
# Defaults to true # Defaults to $::os_service_default
# #
# [*log_facility*] # [*log_facility*]
# (optional) Syslog facility to receive log lines # (optional) Syslog facility to receive log lines
# Defaults to LOG_USER # Defaults to $::os_service_default
# #
# [*log_file*] # [*log_file*]
# (optional) Where to log # (optional) Where to log
@ -229,12 +229,12 @@
# [*state_path*] # [*state_path*]
# (optional) Where to store state files. This directory must be writable # (optional) Where to store state files. This directory must be writable
# by the user executing the agent # by the user executing the agent
# Defaults to: /var/lib/neutron # Defaults to: $::os_service_default
# #
# [*lock_path*] # [*lock_path*]
# (optional) Where to store lock files. This directory must be writeable # (optional) Where to store lock files. This directory must be writeable
# by the user executing the agent # by the user executing the agent
# Defaults to: /var/lib/neutron/lock # Defaults to: $::os_service_default
# #
# DEPRECATED PARAMETERS # DEPRECATED PARAMETERS
# #
@ -255,56 +255,56 @@
class neutron ( class neutron (
$enabled = true, $enabled = true,
$package_ensure = 'present', $package_ensure = 'present',
$verbose = false, $verbose = $::os_service_default,
$debug = false, $debug = $::os_service_default,
$bind_host = '0.0.0.0', $bind_host = $::os_service_default,
$bind_port = '9696', $bind_port = $::os_service_default,
$core_plugin = 'openvswitch', $core_plugin = 'openvswitch',
$service_plugins = $::os_service_default, $service_plugins = $::os_service_default,
$auth_strategy = 'keystone', $auth_strategy = 'keystone',
$base_mac = 'fa:16:3e:00:00:00', $base_mac = $::os_service_default,
$mac_generation_retries = 16, $mac_generation_retries = $::os_service_default,
$dhcp_lease_duration = 86400, $dhcp_lease_duration = $::os_service_default,
$dhcp_agents_per_network = 1, $dhcp_agents_per_network = $::os_service_default,
$network_device_mtu = $::os_service_default, $network_device_mtu = $::os_service_default,
$dhcp_agent_notification = true, $dhcp_agent_notification = $::os_service_default,
$advertise_mtu = false, $advertise_mtu = $::os_service_default,
$allow_bulk = true, $allow_bulk = $::os_service_default,
$allow_pagination = false, $allow_pagination = $::os_service_default,
$allow_sorting = false, $allow_sorting = $::os_service_default,
$allow_overlapping_ips = false, $allow_overlapping_ips = $::os_service_default,
$api_extensions_path = $::os_service_default, $api_extensions_path = $::os_service_default,
$root_helper = 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf', $root_helper = 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf',
$report_interval = '30', $report_interval = $::os_service_default,
$memcache_servers = false, $memcache_servers = false,
$control_exchange = 'neutron', $control_exchange = 'neutron',
$rpc_backend = 'rabbit', $rpc_backend = 'rabbit',
$rpc_response_timeout = 60, $rpc_response_timeout = $::os_service_default,
$rabbit_password = false, $rabbit_password = false,
$rabbit_host = 'localhost', $rabbit_host = 'localhost',
$rabbit_hosts = false, $rabbit_hosts = false,
$rabbit_port = '5672', $rabbit_port = 5672,
$rabbit_user = 'guest', $rabbit_user = 'guest',
$rabbit_virtual_host = '/', $rabbit_virtual_host = $::os_service_default,
$rabbit_heartbeat_timeout_threshold = 0, $rabbit_heartbeat_timeout_threshold = 0,
$rabbit_heartbeat_rate = 2, $rabbit_heartbeat_rate = 2,
$rabbit_use_ssl = false, $rabbit_use_ssl = $::os_service_default,
$kombu_ssl_ca_certs = $::os_service_default, $kombu_ssl_ca_certs = $::os_service_default,
$kombu_ssl_certfile = $::os_service_default, $kombu_ssl_certfile = $::os_service_default,
$kombu_ssl_keyfile = $::os_service_default, $kombu_ssl_keyfile = $::os_service_default,
$kombu_ssl_version = 'TLSv1', $kombu_ssl_version = 'TLSv1',
$kombu_reconnect_delay = '1.0', $kombu_reconnect_delay = $::os_service_default,
$use_ssl = false, $use_ssl = $::os_service_default,
$cert_file = false, $cert_file = $::os_service_default,
$key_file = false, $key_file = $::os_service_default,
$ca_file = false, $ca_file = $::os_service_default,
$use_syslog = false, $use_syslog = $::os_service_default,
$use_stderr = true, $use_stderr = $::os_service_default,
$log_facility = 'LOG_USER', $log_facility = $::os_service_default,
$log_file = false, $log_file = false,
$log_dir = '/var/log/neutron', $log_dir = '/var/log/neutron',
$state_path = '/var/lib/neutron', $state_path = $::os_service_default,
$lock_path = '/var/lib/neutron/lock', $lock_path = $::os_service_default,
# DEPRECATED PARAMETERS # DEPRECATED PARAMETERS
$qpid_hostname = undef, $qpid_hostname = undef,
$qpid_port = undef, $qpid_port = undef,
@ -323,20 +323,22 @@ class neutron (
include ::neutron::params include ::neutron::params
if $use_ssl { if ! is_service_default($use_ssl) and ($use_ssl) {
if !$cert_file { if is_service_default($cert_file) {
fail('The cert_file parameter is required when use_ssl is set to true') fail('The cert_file parameter is required when use_ssl is set to true')
} }
if !$key_file { if is_service_default($key_file) {
fail('The key_file parameter is required when use_ssl is set to true') fail('The key_file parameter is required when use_ssl is set to true')
} }
} }
if $ca_file and !$use_ssl { if ! is_service_default($use_ssl) and !($use_ssl) {
fail('The ca_file parameter requires that use_ssl to be set to true') if ! is_service_default($ca_file) and ($ca_file) {
fail('The ca_file parameter requires that use_ssl to be set to true')
}
} }
if !$rabbit_use_ssl { if ! is_service_default($rabbit_use_ssl) and !($rabbit_use_ssl) {
if ! is_service_default($kombu_ssl_ca_certs) and ($kombu_ssl_ca_certs) { if ! is_service_default($kombu_ssl_ca_certs) and ($kombu_ssl_ca_certs) {
fail('The kombu_ssl_ca_certs parameter requires rabbit_use_ssl to be set to true') fail('The kombu_ssl_ca_certs parameter requires rabbit_use_ssl to be set to true')
} }
@ -368,6 +370,8 @@ class neutron (
'DEFAULT/verbose': value => $verbose; 'DEFAULT/verbose': value => $verbose;
'DEFAULT/debug': value => $debug; 'DEFAULT/debug': value => $debug;
'DEFAULT/use_stderr': value => $use_stderr; 'DEFAULT/use_stderr': value => $use_stderr;
'DEFAULT/use_syslog': value => $use_syslog;
'DEFAULT/syslog_log_facility': value => $log_facility;
'DEFAULT/bind_host': value => $bind_host; 'DEFAULT/bind_host': value => $bind_host;
'DEFAULT/bind_port': value => $bind_port; 'DEFAULT/bind_port': value => $bind_port;
'DEFAULT/auth_strategy': value => $auth_strategy; 'DEFAULT/auth_strategy': value => $auth_strategy;
@ -458,7 +462,7 @@ class neutron (
'oslo_messaging_rabbit/kombu_ssl_keyfile': value => $kombu_ssl_keyfile; 'oslo_messaging_rabbit/kombu_ssl_keyfile': value => $kombu_ssl_keyfile;
} }
if $rabbit_use_ssl { if ! is_service_default($rabbit_use_ssl) and ($rabbit_use_ssl) {
if $kombu_ssl_version { if $kombu_ssl_version {
neutron_config { 'oslo_messaging_rabbit/kombu_ssl_version': value => $kombu_ssl_version; } neutron_config { 'oslo_messaging_rabbit/kombu_ssl_version': value => $kombu_ssl_version; }
@ -479,33 +483,11 @@ class neutron (
} }
# SSL Options # SSL Options
neutron_config { 'DEFAULT/use_ssl' : value => $use_ssl; } neutron_config {
if $use_ssl { 'DEFAULT/use_ssl': value => $use_ssl;
neutron_config { 'DEFAULT/ssl_cert_file': value => $cert_file;
'DEFAULT/ssl_cert_file' : value => $cert_file; 'DEFAULT/ssl_key_file': value => $key_file;
'DEFAULT/ssl_key_file' : value => $key_file; 'DEFAULT/ssl_ca_file': value => $ca_file;
}
if $ca_file {
neutron_config { 'DEFAULT/ssl_ca_file' : value => $ca_file; }
} else {
neutron_config { 'DEFAULT/ssl_ca_file' : ensure => absent; }
}
} else {
neutron_config {
'DEFAULT/ssl_cert_file': ensure => absent;
'DEFAULT/ssl_key_file': ensure => absent;
'DEFAULT/ssl_ca_file': ensure => absent;
}
} }
if $use_syslog {
neutron_config {
'DEFAULT/use_syslog': value => true;
'DEFAULT/syslog_log_facility': value => $log_facility;
}
} else {
neutron_config {
'DEFAULT/use_syslog': value => false;
}
}
} }

View File

@ -6,49 +6,49 @@
# #
# [*default_quota*] # [*default_quota*]
# (optional) Default number of resources allowed per tenant, # (optional) Default number of resources allowed per tenant,
# minus for unlimited. Defaults to -1. # minus for unlimited. Defaults to $::os_service_default.
# #
# [*quota_network*] # [*quota_network*]
# (optional) Number of networks allowed per tenant, and minus means unlimited. # (optional) Number of networks allowed per tenant, and minus means unlimited.
# Defaults to 10. # Defaults to $::os_service_default.
# #
# [*quota_subnet*] # [*quota_subnet*]
# (optional) Number of subnets allowed per tenant, and minus means unlimited. # (optional) Number of subnets allowed per tenant, and minus means unlimited.
# Defaults to 10. # Defaults to $::os_service_default.
# #
# [*quota_port*] # [*quota_port*]
# (optional) Number of ports allowed per tenant, and minus means unlimited. # (optional) Number of ports allowed per tenant, and minus means unlimited.
# Defaults to 50. # Defaults to $::os_service_default.
# #
# [*quota_router*] # [*quota_router*]
# (optional) Number of routers allowed per tenant, and minus means unlimited. # (optional) Number of routers allowed per tenant, and minus means unlimited.
# Requires L3 extension. Defaults to 10. # Requires L3 extension. Defaults to $::os_service_default.
# #
# [*quota_floatingip*] # [*quota_floatingip*]
# (optional) Number of floating IPs allowed per tenant, # (optional) Number of floating IPs allowed per tenant,
# and minus means unlimited. Requires L3 extension. Defaults to 50. # and minus means unlimited. Requires L3 extension. Defaults to $::os_service_default.
# #
# [*quota_security_group*] # [*quota_security_group*]
# (optional) Number of security groups allowed per tenant, # (optional) Number of security groups allowed per tenant,
# and minus means unlimited. Requires securitygroup extension. # and minus means unlimited. Requires securitygroup extension.
# Defaults to 10. # Defaults to $::os_service_default.
# #
# [*quota_security_group_rule*] # [*quota_security_group_rule*]
# (optional) Number of security rules allowed per tenant, # (optional) Number of security rules allowed per tenant,
# and minus means unlimited. Requires securitygroup extension. # and minus means unlimited. Requires securitygroup extension.
# Defaults to 100. # Defaults to $::os_service_default.
# #
# [*quota_driver*] # [*quota_driver*]
# (optional) Default driver to use for quota checks. # (optional) Default driver to use for quota checks.
# Defaults to 'neutron.db.quota_db.DbQuotaDriver'. # Defaults to $::os_service_default.
# #
# [*quota_firewall*] # [*quota_firewall*]
# (optional) Number of firewalls allowed per tenant, -1 for unlimited. # (optional) Number of firewalls allowed per tenant, -1 for unlimited.
# Defaults to '1'. # Defaults to $::os_service_default.
# #
# [*quota_firewall_policy*] # [*quota_firewall_policy*]
# (optional) Number of firewalls policies allowed per tenant, -1 for unlimited. # (optional) Number of firewalls policies allowed per tenant, -1 for unlimited.
# Defaults to '1'. # Defaults to $::os_service_default.
# #
# [*quota_firewall_rule*] # [*quota_firewall_rule*]
# (optional) Number of firewalls rules allowed per tenant, -1 for unlimited. # (optional) Number of firewalls rules allowed per tenant, -1 for unlimited.
@ -57,16 +57,16 @@
# [*quota_health_monitor*] # [*quota_health_monitor*]
# (optional) Number of health monitors allowed per tenant. # (optional) Number of health monitors allowed per tenant.
# A negative value means unlimited. # A negative value means unlimited.
# Defaults to '-1'. # Defaults to $::os_service_default.
# #
# [*quota_items*] # [*quota_items*]
# (optional) Resource name(s) that are supported in quota features. # (optional) Resource name(s) that are supported in quota features.
# Defaults to 'network,subnet,port'. # Defaults to $::os_service_default.
# #
# [*quota_member*] # [*quota_member*]
# (optional) Number of pool members allowed per tenant. # (optional) Number of pool members allowed per tenant.
# A negative value means unlimited # A negative value means unlimited
# Defaults to '-1'. # Defaults to $::os_service_default.
# #
# [*quota_network_gateway*] # [*quota_network_gateway*]
# (optional) Number of network gateways allowed per tenant, -1 for unlimited. # (optional) Number of network gateways allowed per tenant, -1 for unlimited.
@ -79,35 +79,35 @@
# [*quota_pool*] # [*quota_pool*]
# (optional) Number of pools allowed per tenant. # (optional) Number of pools allowed per tenant.
# A negative value means unlimited. # A negative value means unlimited.
# Defaults to '10'. # Defaults to $::os_service_default.
# #
# [*quota_vip*] # [*quota_vip*]
# (optional) Number of vips allowed per tenant. # (optional) Number of vips allowed per tenant.
# A negative value means unlimited. # A negative value means unlimited.
# Defaults to '10'. # Defaults to $::os_service_default.
# #
class neutron::quota ( class neutron::quota (
$default_quota = -1, $default_quota = $::os_service_default,
$quota_network = 10, $quota_network = $::os_service_default,
$quota_subnet = 10, $quota_subnet = $::os_service_default,
$quota_port = 50, $quota_port = $::os_service_default,
# l3 extension # l3 extension
$quota_router = 10, $quota_router = $::os_service_default,
$quota_floatingip = 50, $quota_floatingip = $::os_service_default,
# securitygroup extension # securitygroup extension
$quota_security_group = 10, $quota_security_group = $::os_service_default,
$quota_security_group_rule = 100, $quota_security_group_rule = $::os_service_default,
$quota_driver = 'neutron.db.quota_db.DbQuotaDriver', $quota_driver = $::os_service_default,
$quota_firewall = 1, $quota_firewall = $::os_service_default,
$quota_firewall_policy = 1, $quota_firewall_policy = $::os_service_default,
$quota_firewall_rule = -1, $quota_firewall_rule = -1,
$quota_health_monitor = -1, $quota_health_monitor = $::os_service_default,
$quota_items = 'network,subnet,port', $quota_items = $::os_service_default,
$quota_member = -1, $quota_member = $::os_service_default,
$quota_network_gateway = 5, $quota_network_gateway = 5,
$quota_packet_filter = 100, $quota_packet_filter = 100,
$quota_pool = 10, $quota_pool = $::os_service_default,
$quota_vip = 10 $quota_vip = $::os_service_default
) { ) {
neutron_config { neutron_config {

View File

@ -151,7 +151,7 @@
# report_interval, to be sure the agent is down for good. # report_interval, to be sure the agent is down for good.
# agent_down_time is a config for neutron-server, set by class neutron::server # 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 # report_interval is a config for neutron agents, set by class neutron
# Defaults to: 75 # Defaults to: $::os_service_default
# #
# [*state_path*] # [*state_path*]
# (optional) Deprecated. Use state_path parameter on base neutron class instead. # (optional) Deprecated. Use state_path parameter on base neutron class instead.
@ -169,12 +169,12 @@
# (optional) Setting the "router_distributed" flag to "True" will default to the creation # (optional) Setting the "router_distributed" flag to "True" will default to the creation
# of distributed tenant routers. # of distributed tenant routers.
# Also can be the type of the router on the create request (admin-only attribute). # Also can be the type of the router on the create request (admin-only attribute).
# Defaults to false # Defaults to $::os_service_default
# #
# [*allow_automatic_l3agent_failover*] # [*allow_automatic_l3agent_failover*]
# (optional) Allow automatic rescheduling of routers from dead L3 agents with # (optional) Allow automatic rescheduling of routers from dead L3 agents with
# admin_state_up set to True to alive agents. # admin_state_up set to True to alive agents.
# Defaults to false # Defaults to $::os_service_default
# #
# [*l3_ha*] # [*l3_ha*]
# (optional) Enable high availability for virtual routers. # (optional) Enable high availability for virtual routers.
@ -190,7 +190,7 @@
# #
# [*l3_ha_net_cidr*] # [*l3_ha_net_cidr*]
# (optional) CIDR of the administrative network if HA mode is enabled. # (optional) CIDR of the administrative network if HA mode is enabled.
# Defaults to '169.254.192.0/18' # Defaults to $::os_service_default
# #
# [*report_interval*] # [*report_interval*]
# (optional) Deprecated, does nothing. # (optional) Deprecated, does nothing.
@ -222,14 +222,14 @@ class neutron::server (
$sync_db = false, $sync_db = false,
$api_workers = $::processorcount, $api_workers = $::processorcount,
$rpc_workers = $::processorcount, $rpc_workers = $::processorcount,
$agent_down_time = '75', $agent_down_time = $::os_service_default,
$router_scheduler_driver = 'neutron.scheduler.l3_agent_scheduler.ChanceScheduler', $router_scheduler_driver = 'neutron.scheduler.l3_agent_scheduler.ChanceScheduler',
$router_distributed = false, $router_distributed = $::os_service_default,
$allow_automatic_l3agent_failover = false, $allow_automatic_l3agent_failover = $::os_service_default,
$l3_ha = false, $l3_ha = false,
$max_l3_agents_per_router = 3, $max_l3_agents_per_router = 3,
$min_l3_agents_per_router = 2, $min_l3_agents_per_router = 2,
$l3_ha_net_cidr = '169.254.192.0/18', $l3_ha_net_cidr = $::os_service_default,
$qos_notification_drivers = $::os_service_default, $qos_notification_drivers = $::os_service_default,
# DEPRECATED PARAMETERS # DEPRECATED PARAMETERS
$auth_host = 'localhost', $auth_host = 'localhost',

View File

@ -28,7 +28,7 @@
# [*send_events_interval*] # [*send_events_interval*]
# (optional) Number of seconds between sending events to nova if there are # (optional) Number of seconds between sending events to nova if there are
# any events to send. # any events to send.
# Defaults to '2' # Defaults to $::os_service_default
# #
# [*nova_url*] # [*nova_url*]
# (optional) URL for connection to nova (Only supports one nova region # (optional) URL for connection to nova (Only supports one nova region
@ -115,7 +115,7 @@
class neutron::server::notifications ( class neutron::server::notifications (
$notify_nova_on_port_status_changes = true, $notify_nova_on_port_status_changes = true,
$notify_nova_on_port_data_changes = true, $notify_nova_on_port_data_changes = true,
$send_events_interval = '2', $send_events_interval = $::os_service_default,
$nova_url = 'http://127.0.0.1:8774/v2', $nova_url = 'http://127.0.0.1:8774/v2',
$auth_plugin = 'password', $auth_plugin = 'password',
$username = 'nova', $username = 'nova',

View File

@ -23,12 +23,12 @@
# === Parameters: # === Parameters:
# #
# [*enabled*] # [*enabled*]
# (required) Whether or not to enable the FWaaS neutron plugin Service # (optional) Whether or not to enable the FWaaS neutron plugin Service
# true/false # Defaults to $::os_service_default
# #
# [*driver*] # [*driver*]
# (optional) FWaaS Driver to use # (optional) FWaaS Driver to use
# Defaults to 'neutron.services.firewall.drivers.linux.iptables_fwaas.IptablesFwaasDriver' # Defaults to $::os_service_default
# #
# [*vpnaas_agent_package*] # [*vpnaas_agent_package*]
# (optional) Use VPNaaS agent package instead of L3 agent package on debian platforms # (optional) Use VPNaaS agent package instead of L3 agent package on debian platforms
@ -38,8 +38,8 @@
# #
class neutron::services::fwaas ( class neutron::services::fwaas (
$enabled = true, $enabled = $::os_service_default,
$driver = 'neutron.services.firewall.drivers.linux.iptables_fwaas.IptablesFwaasDriver', $driver = $::os_service_default,
$vpnaas_agent_package = false $vpnaas_agent_package = false
) { ) {

View File

@ -11,21 +11,16 @@ describe 'neutron::agents::dhcp' do
end end
let :default_params do let :default_params do
{ :package_ensure => 'present', { :package_ensure => 'present',
:enabled => true, :enabled => true,
:debug => false, :state_path => '/var/lib/neutron',
:state_path => '/var/lib/neutron', :resync_interval => 30,
:resync_interval => 30, :interface_driver => 'neutron.agent.linux.interface.OVSInterfaceDriver',
:interface_driver => 'neutron.agent.linux.interface.OVSInterfaceDriver', :dhcp_driver => 'neutron.agent.linux.dhcp.Dnsmasq',
:dhcp_domain => 'openstacklocal', :root_helper => 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf',
:dhcp_driver => 'neutron.agent.linux.dhcp.Dnsmasq',
:root_helper => 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf',
:use_namespaces => nil,
:dnsmasq_config_file => nil,
:dhcp_delete_namespaces => true,
:enable_isolated_metadata => false, :enable_isolated_metadata => false,
:enable_metadata_network => false, :enable_metadata_network => false,
:dhcp_broadcast_reply => false } :dhcp_delete_namespaces => true }
end end
let :test_facts do let :test_facts do
@ -44,17 +39,17 @@ describe 'neutron::agents::dhcp' do
it_configures 'dnsmasq dhcp_driver' it_configures 'dnsmasq dhcp_driver'
it 'configures dhcp_agent.ini' do it 'configures dhcp_agent.ini' do
is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/debug').with_value(p[:debug]); is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/debug').with_value('<SERVICE DEFAULT>');
is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/state_path').with_value(p[:state_path]); is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/state_path').with_value(p[:state_path]);
is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/resync_interval').with_value(p[:resync_interval]); is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/resync_interval').with_value(p[:resync_interval]);
is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/interface_driver').with_value(p[:interface_driver]); is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/interface_driver').with_value(p[:interface_driver]);
is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/dhcp_domain').with_value(p[:dhcp_domain]); is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/dhcp_domain').with_value('<SERVICE DEFAULT>');
is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/dhcp_driver').with_value(p[:dhcp_driver]); is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/dhcp_driver').with_value(p[:dhcp_driver]);
is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/root_helper').with_value(p[:root_helper]); is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/root_helper').with_value(p[:root_helper]);
is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/dhcp_delete_namespaces').with_value(p[:dhcp_delete_namespaces]); is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/dhcp_delete_namespaces').with_value(p[:dhcp_delete_namespaces]);
is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/enable_isolated_metadata').with_value(p[:enable_isolated_metadata]); is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/enable_isolated_metadata').with_value(p[:enable_isolated_metadata]);
is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/enable_metadata_network').with_value(p[:enable_metadata_network]); is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/enable_metadata_network').with_value(p[:enable_metadata_network]);
is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/dhcp_broadcast_reply').with_value(p[:dhcp_broadcast_reply]); is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/dhcp_broadcast_reply').with_value('<SERVICE DEFAULT>');
end end
it 'installs neutron dhcp agent package' do it 'installs neutron dhcp agent package' do

View File

@ -12,12 +12,6 @@ describe 'neutron::agents::l3' do
:debug => false, :debug => false,
:external_network_bridge => 'br-ex', :external_network_bridge => 'br-ex',
:interface_driver => 'neutron.agent.linux.interface.OVSInterfaceDriver', :interface_driver => 'neutron.agent.linux.interface.OVSInterfaceDriver',
:handle_internal_only_routers => true,
:metadata_port => '9697',
:send_arp_for_ha => '3',
:periodic_interval => '40',
:periodic_fuzzy_delay => '5',
:enable_metadata_proxy => true,
:router_delete_namespaces => true, :router_delete_namespaces => true,
:ha_enabled => false, :ha_enabled => false,
:ha_vrrp_auth_type => 'PASS', :ha_vrrp_auth_type => 'PASS',
@ -48,12 +42,12 @@ describe 'neutron::agents::l3' do
is_expected.to contain_neutron_l3_agent_config('DEFAULT/interface_driver').with_value(p[:interface_driver]) is_expected.to contain_neutron_l3_agent_config('DEFAULT/interface_driver').with_value(p[:interface_driver])
is_expected.to contain_neutron_l3_agent_config('DEFAULT/router_id').with_value('<SERVICE DEFAULT>') is_expected.to contain_neutron_l3_agent_config('DEFAULT/router_id').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_l3_agent_config('DEFAULT/gateway_external_network_id').with_value('<SERVICE DEFAULT>') is_expected.to contain_neutron_l3_agent_config('DEFAULT/gateway_external_network_id').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_l3_agent_config('DEFAULT/handle_internal_only_routers').with_value(p[:handle_internal_only_routers]) is_expected.to contain_neutron_l3_agent_config('DEFAULT/handle_internal_only_routers').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_l3_agent_config('DEFAULT/metadata_port').with_value(p[:metadata_port]) is_expected.to contain_neutron_l3_agent_config('DEFAULT/metadata_port').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_l3_agent_config('DEFAULT/send_arp_for_ha').with_value(p[:send_arp_for_ha]) is_expected.to contain_neutron_l3_agent_config('DEFAULT/send_arp_for_ha').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_l3_agent_config('DEFAULT/periodic_interval').with_value(p[:periodic_interval]) is_expected.to contain_neutron_l3_agent_config('DEFAULT/periodic_interval').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_l3_agent_config('DEFAULT/periodic_fuzzy_delay').with_value(p[:periodic_fuzzy_delay]) is_expected.to contain_neutron_l3_agent_config('DEFAULT/periodic_fuzzy_delay').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_l3_agent_config('DEFAULT/enable_metadata_proxy').with_value(p[:enable_metadata_proxy]) is_expected.to contain_neutron_l3_agent_config('DEFAULT/enable_metadata_proxy').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_l3_agent_config('DEFAULT/network_device_mtu').with_value('<SERVICE DEFAULT>') is_expected.to contain_neutron_l3_agent_config('DEFAULT/network_device_mtu').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_l3_agent_config('DEFAULT/router_delete_namespaces').with_value(p[:router_delete_namespaces]) is_expected.to contain_neutron_l3_agent_config('DEFAULT/router_delete_namespaces').with_value(p[:router_delete_namespaces])
end end

View File

@ -13,7 +13,6 @@ describe 'neutron::agents::lbaas' do
let :default_params do let :default_params do
{ :package_ensure => 'present', { :package_ensure => 'present',
:enabled => true, :enabled => true,
:debug => false,
:interface_driver => 'neutron.agent.linux.interface.OVSInterfaceDriver', :interface_driver => 'neutron.agent.linux.interface.OVSInterfaceDriver',
:device_driver => 'neutron_lbaas.services.loadbalancer.drivers.haproxy.namespace_driver.HaproxyNSDriver', :device_driver => 'neutron_lbaas.services.loadbalancer.drivers.haproxy.namespace_driver.HaproxyNSDriver',
:use_namespaces => nil, :use_namespaces => nil,
@ -39,7 +38,7 @@ describe 'neutron::agents::lbaas' do
it_configures 'haproxy lbaas_driver without package' it_configures 'haproxy lbaas_driver without package'
it 'configures lbaas_agent.ini' do it 'configures lbaas_agent.ini' do
is_expected.to contain_neutron_lbaas_agent_config('DEFAULT/debug').with_value(p[:debug]); is_expected.to contain_neutron_lbaas_agent_config('DEFAULT/debug').with_value('<SERVICE DEFAULT>');
is_expected.to contain_neutron_lbaas_agent_config('DEFAULT/interface_driver').with_value(p[:interface_driver]); is_expected.to contain_neutron_lbaas_agent_config('DEFAULT/interface_driver').with_value(p[:interface_driver]);
is_expected.to contain_neutron_lbaas_agent_config('DEFAULT/device_driver').with_value(p[:device_driver]); is_expected.to contain_neutron_lbaas_agent_config('DEFAULT/device_driver').with_value(p[:device_driver]);
is_expected.to contain_neutron_lbaas_agent_config('haproxy/user_group').with_value(platform_params[:nobody_user_group]); is_expected.to contain_neutron_lbaas_agent_config('haproxy/user_group').with_value(platform_params[:nobody_user_group]);

View File

@ -16,11 +16,7 @@ describe 'neutron::agents::metadata' do
:auth_tenant => 'services', :auth_tenant => 'services',
:auth_user => 'neutron', :auth_user => 'neutron',
:auth_password => 'password', :auth_password => 'password',
:metadata_ip => '127.0.0.1', :shared_secret => 'metadata-secret',
:metadata_port => '8775',
:metadata_protocol => 'http',
:metadata_backlog => '4096',
:shared_secret => 'metadata-secret'
} }
end end
@ -65,13 +61,13 @@ describe 'neutron::agents::metadata' do
is_expected.to contain_neutron_metadata_agent_config('DEFAULT/admin_user').with(:value => params[:auth_user]) is_expected.to contain_neutron_metadata_agent_config('DEFAULT/admin_user').with(:value => params[:auth_user])
is_expected.to contain_neutron_metadata_agent_config('DEFAULT/admin_password').with(:value => params[:auth_password]) is_expected.to contain_neutron_metadata_agent_config('DEFAULT/admin_password').with(:value => params[:auth_password])
is_expected.to contain_neutron_metadata_agent_config('DEFAULT/admin_password').with_secret( true ) is_expected.to contain_neutron_metadata_agent_config('DEFAULT/admin_password').with_secret( true )
is_expected.to contain_neutron_metadata_agent_config('DEFAULT/nova_metadata_ip').with(:value => params[:metadata_ip]) is_expected.to contain_neutron_metadata_agent_config('DEFAULT/nova_metadata_ip').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_neutron_metadata_agent_config('DEFAULT/nova_metadata_port').with(:value => params[:metadata_port]) is_expected.to contain_neutron_metadata_agent_config('DEFAULT/nova_metadata_port').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_neutron_metadata_agent_config('DEFAULT/nova_metadata_protocol').with(:value => params[:metadata_protocol]) is_expected.to contain_neutron_metadata_agent_config('DEFAULT/nova_metadata_protocol').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_neutron_metadata_agent_config('DEFAULT/metadata_workers').with(:value => facts[:processorcount]) is_expected.to contain_neutron_metadata_agent_config('DEFAULT/metadata_workers').with(:value => facts[:processorcount])
is_expected.to contain_neutron_metadata_agent_config('DEFAULT/metadata_backlog').with(:value => params[:metadata_backlog]) is_expected.to contain_neutron_metadata_agent_config('DEFAULT/metadata_backlog').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_neutron_metadata_agent_config('DEFAULT/metadata_proxy_shared_secret').with(:value => params[:shared_secret]) is_expected.to contain_neutron_metadata_agent_config('DEFAULT/metadata_proxy_shared_secret').with(:value => params[:shared_secret])
is_expected.to contain_neutron_metadata_agent_config('DEFAULT/cache_url').with(:value => 'memory://?default_ttl=5') is_expected.to contain_neutron_metadata_agent_config('DEFAULT/cache_url').with(:ensure => 'absent')
end end
end end

View File

@ -39,8 +39,6 @@ describe 'neutron::agents::metering' do
:interface_driver => 'neutron.agent.linux.interface.OVSInterfaceDriver', :interface_driver => 'neutron.agent.linux.interface.OVSInterfaceDriver',
:driver => 'neutron.services.metering.drivers.noop.noop_driver.NoopMeteringDriver', :driver => 'neutron.services.metering.drivers.noop.noop_driver.NoopMeteringDriver',
:use_namespaces => nil, :use_namespaces => nil,
:measure_interval => '30',
:report_interval => '300'
} }
end end
@ -61,8 +59,8 @@ describe 'neutron::agents::metering' do
is_expected.to contain_neutron_metering_agent_config('DEFAULT/debug').with_value(p[:debug]); is_expected.to contain_neutron_metering_agent_config('DEFAULT/debug').with_value(p[:debug]);
is_expected.to contain_neutron_metering_agent_config('DEFAULT/interface_driver').with_value(p[:interface_driver]); is_expected.to contain_neutron_metering_agent_config('DEFAULT/interface_driver').with_value(p[:interface_driver]);
is_expected.to contain_neutron_metering_agent_config('DEFAULT/driver').with_value(p[:driver]); is_expected.to contain_neutron_metering_agent_config('DEFAULT/driver').with_value(p[:driver]);
is_expected.to contain_neutron_metering_agent_config('DEFAULT/measure_interval').with_value(p[:measure_interval]); is_expected.to contain_neutron_metering_agent_config('DEFAULT/measure_interval').with_value('<SERVICE DEFAULT>');
is_expected.to contain_neutron_metering_agent_config('DEFAULT/report_interval').with_value(p[:report_interval]); is_expected.to contain_neutron_metering_agent_config('DEFAULT/report_interval').with_value('<SERVICE DEFAULT>');
end end
it 'installs neutron metering agent package' do it 'installs neutron metering agent package' do

View File

@ -7,18 +7,13 @@ describe 'neutron::agents::ml2::linuxbridge' do
end end
let :default_params do let :default_params do
{ :package_ensure => 'present', { :package_ensure => 'present',
:enabled => true, :enabled => true,
:manage_service => true, :manage_service => true,
:tunnel_types => [], :tunnel_types => [],
:local_ip => false, :local_ip => false,
:vxlan_group => '224.0.0.1',
:vxlan_ttl => false,
:vxlan_tos => false,
:polling_interval => 2,
:l2_population => false,
:physical_interface_mappings => [], :physical_interface_mappings => [],
:firewall_driver => 'neutron.agent.linux.iptables_firewall.IptablesFirewallDriver' } :firewall_driver => 'neutron.agent.linux.iptables_firewall.IptablesFirewallDriver' }
end end
let :test_facts do let :test_facts do
@ -37,7 +32,7 @@ describe 'neutron::agents::ml2::linuxbridge' do
it { is_expected.to contain_class('neutron::params') } it { is_expected.to contain_class('neutron::params') }
it 'configures ml2_conf.ini' do it 'configures ml2_conf.ini' do
is_expected.to contain_neutron_agent_linuxbridge('agent/polling_interval').with_value(default_params[:polling_interval]) is_expected.to contain_neutron_agent_linuxbridge('agent/polling_interval').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_agent_linuxbridge('linux_bridge/physical_interface_mappings').with_value(default_params[:physical_interface_mappings].join(',')) is_expected.to contain_neutron_agent_linuxbridge('linux_bridge/physical_interface_mappings').with_value(default_params[:physical_interface_mappings].join(','))
is_expected.to contain_neutron_agent_linuxbridge('securitygroup/firewall_driver').with_value(default_params[:firewall_driver]) is_expected.to contain_neutron_agent_linuxbridge('securitygroup/firewall_driver').with_value(default_params[:firewall_driver])
end end
@ -80,8 +75,8 @@ describe 'neutron::agents::ml2::linuxbridge' do
it 'does not configre VXLAN tunneling' do it 'does not configre VXLAN tunneling' do
is_expected.to contain_neutron_agent_linuxbridge('vxlan/enable_vxlan').with_value(false) is_expected.to contain_neutron_agent_linuxbridge('vxlan/enable_vxlan').with_value(false)
is_expected.to contain_neutron_agent_linuxbridge('vxlan/local_ip').with_ensure('absent') is_expected.to contain_neutron_agent_linuxbridge('vxlan/local_ip').with_ensure('absent')
is_expected.to contain_neutron_agent_linuxbridge('vxlan/vxlan_group').with_ensure('absent') is_expected.not_to contain_neutron_agent_linuxbridge('vxlan/vxlan_group')
is_expected.to contain_neutron_agent_linuxbridge('vxlan/l2_population').with_ensure('absent') is_expected.not_to contain_neutron_agent_linuxbridge('vxlan/l2_population')
end end
end end
@ -97,10 +92,10 @@ describe 'neutron::agents::ml2::linuxbridge' do
it 'configures ml2_conf.ini' do it 'configures ml2_conf.ini' do
is_expected.to contain_neutron_agent_linuxbridge('vxlan/enable_vxlan').with_value(true) is_expected.to contain_neutron_agent_linuxbridge('vxlan/enable_vxlan').with_value(true)
is_expected.to contain_neutron_agent_linuxbridge('vxlan/local_ip').with_value(params[:local_ip]) is_expected.to contain_neutron_agent_linuxbridge('vxlan/local_ip').with_value(params[:local_ip])
is_expected.to contain_neutron_agent_linuxbridge('vxlan/vxlan_group').with_value(default_params[:vxlan_group]) is_expected.to contain_neutron_agent_linuxbridge('vxlan/vxlan_group').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_agent_linuxbridge('vxlan/vxlan_ttl').with_ensure('absent') is_expected.to contain_neutron_agent_linuxbridge('vxlan/vxlan_ttl').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_agent_linuxbridge('vxlan/vxlan_tos').with_ensure('absent') is_expected.to contain_neutron_agent_linuxbridge('vxlan/vxlan_tos').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_agent_linuxbridge('vxlan/l2_population').with_value(default_params[:l2_population]) is_expected.to contain_neutron_agent_linuxbridge('vxlan/l2_population').with_value('<SERVICE DEFAULT>')
end end
end end

View File

@ -15,14 +15,9 @@ describe 'neutron::agents::ml2::ovs' do
:enable_tunneling => false, :enable_tunneling => false,
:local_ip => false, :local_ip => false,
:tunnel_bridge => 'br-tun', :tunnel_bridge => 'br-tun',
:polling_interval => 2,
:l2_population => false,
:arp_responder => false,
:drop_flows_on_start => false, :drop_flows_on_start => false,
:enable_distributed_routing => false,
:firewall_driver => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver', :firewall_driver => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver',
:manage_vswitch => true, :manage_vswitch => true }
:prevent_arp_spoofing => true }
end end
let :test_facts do let :test_facts do
@ -43,10 +38,10 @@ describe 'neutron::agents::ml2::ovs' do
it { is_expected.to contain_class('neutron::params') } it { is_expected.to contain_class('neutron::params') }
it 'configures plugins/ml2/openvswitch_agent.ini' do it 'configures plugins/ml2/openvswitch_agent.ini' do
is_expected.to contain_neutron_agent_ovs('agent/polling_interval').with_value(p[:polling_interval]) is_expected.to contain_neutron_agent_ovs('agent/polling_interval').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_agent_ovs('agent/l2_population').with_value(p[:l2_population]) is_expected.to contain_neutron_agent_ovs('agent/l2_population').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_agent_ovs('agent/arp_responder').with_value(p[:arp_responder]) is_expected.to contain_neutron_agent_ovs('agent/arp_responder').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_agent_ovs('agent/prevent_arp_spoofing').with_value(p[:prevent_arp_spoofing]) is_expected.to contain_neutron_agent_ovs('agent/prevent_arp_spoofing').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_agent_ovs('agent/drop_flows_on_start').with_value(p[:drop_flows_on_start]) is_expected.to contain_neutron_agent_ovs('agent/drop_flows_on_start').with_value(p[:drop_flows_on_start])
is_expected.to contain_neutron_agent_ovs('agent/extensions').with_value(['<SERVICE DEFAULT>']) is_expected.to contain_neutron_agent_ovs('agent/extensions').with_value(['<SERVICE DEFAULT>'])
is_expected.to contain_neutron_agent_ovs('ovs/integration_bridge').with_value(p[:integration_bridge]) is_expected.to contain_neutron_agent_ovs('ovs/integration_bridge').with_value(p[:integration_bridge])

View File

@ -35,7 +35,6 @@ describe 'neutron::agents::vpnaas' do
:enabled => true, :enabled => true,
:vpn_device_driver => 'neutron.services.vpn.device_drivers.ipsec.OpenSwanDriver', :vpn_device_driver => 'neutron.services.vpn.device_drivers.ipsec.OpenSwanDriver',
:interface_driver => 'neutron.agent.linux.interface.OVSInterfaceDriver', :interface_driver => 'neutron.agent.linux.interface.OVSInterfaceDriver',
:ipsec_status_check_interval => '60'
} }
end end
@ -56,7 +55,7 @@ describe 'neutron::agents::vpnaas' do
it 'configures vpnaas_agent.ini' do it 'configures vpnaas_agent.ini' do
is_expected.to contain_neutron_vpnaas_agent_config('vpnagent/vpn_device_driver').with_value(p[:vpn_device_driver]); is_expected.to contain_neutron_vpnaas_agent_config('vpnagent/vpn_device_driver').with_value(p[:vpn_device_driver]);
is_expected.to contain_neutron_vpnaas_agent_config('ipsec/ipsec_status_check_interval').with_value(p[:ipsec_status_check_interval]); is_expected.to contain_neutron_vpnaas_agent_config('ipsec/ipsec_status_check_interval').with_value('<SERVICE DEFAULT>');
is_expected.to contain_neutron_vpnaas_agent_config('DEFAULT/interface_driver').with_value(p[:interface_driver]); is_expected.to contain_neutron_vpnaas_agent_config('DEFAULT/interface_driver').with_value(p[:interface_driver]);
is_expected.to contain_neutron_vpnaas_agent_config('DEFAULT/external_network_bridge').with_value('<SERVICE DEFAULT>'); is_expected.to contain_neutron_vpnaas_agent_config('DEFAULT/external_network_bridge').with_value('<SERVICE DEFAULT>');
end end

View File

@ -7,10 +7,10 @@ describe 'neutron::db' do
context 'with default parameters' do context 'with default parameters' do
it { is_expected.to contain_neutron_config('database/connection').with_value('sqlite:////var/lib/neutron/ovs.sqlite').with_secret(true) } it { is_expected.to contain_neutron_config('database/connection').with_value('sqlite:////var/lib/neutron/ovs.sqlite').with_secret(true) }
it { is_expected.to contain_neutron_config('database/idle_timeout').with_value('3600') } it { is_expected.to contain_neutron_config('database/idle_timeout').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_neutron_config('database/min_pool_size').with_value('1') } it { is_expected.to contain_neutron_config('database/min_pool_size').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_neutron_config('database/max_retries').with_value('10') } it { is_expected.to contain_neutron_config('database/max_retries').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_neutron_config('database/retry_interval').with_value('10') } it { is_expected.to contain_neutron_config('database/retry_interval').with_value('<SERVICE DEFAULT>') }
end end
@ -70,10 +70,11 @@ describe 'neutron::db' do
context 'on Debian platforms' do context 'on Debian platforms' do
let :facts do let :facts do
{ :osfamily => 'Debian', @default_facts.merge({
:operatingsystem => 'Debian', :osfamily => 'Debian',
:operatingsystemrelease => 'jessie', :operatingsystem => 'Debian',
} :operatingsystemrelease => 'jessie',
})
end end
it_configures 'neutron::db' it_configures 'neutron::db'
@ -90,9 +91,10 @@ describe 'neutron::db' do
context 'on Redhat platforms' do context 'on Redhat platforms' do
let :facts do let :facts do
{ :osfamily => 'RedHat', @default_facts.merge({
:operatingsystemrelease => '7.1', :osfamily => 'RedHat',
} :operatingsystemrelease => '7.1',
})
end end
it_configures 'neutron::db' it_configures 'neutron::db'

View File

@ -4,20 +4,14 @@ describe 'neutron' do
let :params do let :params do
{ :package_ensure => 'present', { :package_ensure => 'present',
:verbose => false,
:debug => false,
:use_stderr => true,
:core_plugin => 'linuxbridge', :core_plugin => 'linuxbridge',
:auth_strategy => 'keystone',
:rabbit_hosts => false,
:rabbit_host => '127.0.0.1', :rabbit_host => '127.0.0.1',
:rabbit_port => 5672, :rabbit_port => 5672,
:rabbit_hosts => false,
:rabbit_user => 'guest', :rabbit_user => 'guest',
:rabbit_password => 'guest', :rabbit_password => 'guest',
:rabbit_virtual_host => '/',
:kombu_reconnect_delay => '1.0',
:log_dir => '/var/log/neutron', :log_dir => '/var/log/neutron',
:report_interval => '30',
:rpc_response_timeout => '60',
} }
end end
@ -54,7 +48,7 @@ describe 'neutron' do
it 'configures logging' do it 'configures logging' do
is_expected.to contain_neutron_config('DEFAULT/log_file').with_ensure('absent') is_expected.to contain_neutron_config('DEFAULT/log_file').with_ensure('absent')
is_expected.to contain_neutron_config('DEFAULT/log_dir').with_value(params[:log_dir]) is_expected.to contain_neutron_config('DEFAULT/log_dir').with_value(params[:log_dir])
is_expected.to contain_neutron_config('DEFAULT/use_stderr').with_value(params[:use_stderr]) is_expected.to contain_neutron_config('DEFAULT/use_stderr').with_value('<SERVICE DEFAULT>')
end end
end end
@ -71,7 +65,7 @@ describe 'neutron' do
it_configures 'with SSL and kombu wrongly configured' it_configures 'with SSL and kombu wrongly configured'
it_configures 'with SSL socket options set' it_configures 'with SSL socket options set'
it_configures 'with SSL socket options set with wrong parameters' it_configures 'with SSL socket options set with wrong parameters'
it_configures 'with SSL socket options set to false' it_configures 'with SSL socket options left by default'
it_configures 'with syslog disabled' it_configures 'with syslog disabled'
it_configures 'with syslog enabled' it_configures 'with syslog enabled'
it_configures 'with syslog enabled and custom settings' it_configures 'with syslog enabled and custom settings'
@ -99,36 +93,36 @@ describe 'neutron' do
is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_userid').with_value( params[:rabbit_user] ) is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_userid').with_value( params[:rabbit_user] )
is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_password').with_value( params[:rabbit_password] ) is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_password').with_value( params[:rabbit_password] )
is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_password').with_secret( true ) is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_password').with_secret( true )
is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value( params[:rabbit_virtual_host] ) is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value( '<SERVICE DEFAULT>' )
is_expected.to contain_neutron_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('0') is_expected.to contain_neutron_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('0')
is_expected.to contain_neutron_config('oslo_messaging_rabbit/heartbeat_rate').with_value('2') is_expected.to contain_neutron_config('oslo_messaging_rabbit/heartbeat_rate').with_value('2')
is_expected.to contain_neutron_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value( params[:kombu_reconnect_delay] ) is_expected.to contain_neutron_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value( '<SERVICE DEFAULT>' )
end end
it 'configures neutron.conf' do it 'configures neutron.conf' do
is_expected.to contain_neutron_config('DEFAULT/verbose').with_value( params[:verbose] ) is_expected.to contain_neutron_config('DEFAULT/verbose').with_value( '<SERVICE DEFAULT>' )
is_expected.to contain_neutron_config('DEFAULT/bind_host').with_value('0.0.0.0') is_expected.to contain_neutron_config('DEFAULT/bind_host').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('DEFAULT/bind_port').with_value('9696') is_expected.to contain_neutron_config('DEFAULT/bind_port').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('DEFAULT/auth_strategy').with_value('keystone') is_expected.to contain_neutron_config('DEFAULT/auth_strategy').with_value('keystone')
is_expected.to contain_neutron_config('DEFAULT/core_plugin').with_value( params[:core_plugin] ) is_expected.to contain_neutron_config('DEFAULT/core_plugin').with_value( params[:core_plugin] )
is_expected.to contain_neutron_config('DEFAULT/base_mac').with_value('fa:16:3e:00:00:00') is_expected.to contain_neutron_config('DEFAULT/base_mac').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('DEFAULT/mac_generation_retries').with_value(16) is_expected.to contain_neutron_config('DEFAULT/mac_generation_retries').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('DEFAULT/dhcp_lease_duration').with_value(86400) is_expected.to contain_neutron_config('DEFAULT/dhcp_lease_duration').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('DEFAULT/dhcp_agents_per_network').with_value(1) is_expected.to contain_neutron_config('DEFAULT/dhcp_agents_per_network').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('DEFAULT/network_device_mtu').with_value('<SERVICE DEFAULT>') is_expected.to contain_neutron_config('DEFAULT/network_device_mtu').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('DEFAULT/dhcp_agent_notification').with_value(true) is_expected.to contain_neutron_config('DEFAULT/dhcp_agent_notification').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('DEFAULT/advertise_mtu').with_value(false) is_expected.to contain_neutron_config('DEFAULT/advertise_mtu').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('DEFAULT/allow_bulk').with_value(true) is_expected.to contain_neutron_config('DEFAULT/allow_bulk').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('DEFAULT/allow_pagination').with_value(false) is_expected.to contain_neutron_config('DEFAULT/allow_pagination').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('DEFAULT/allow_sorting').with_value(false) is_expected.to contain_neutron_config('DEFAULT/allow_sorting').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('DEFAULT/allow_overlapping_ips').with_value(false) is_expected.to contain_neutron_config('DEFAULT/allow_overlapping_ips').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('DEFAULT/api_extensions_path').with_value('<SERVICE DEFAULT>') is_expected.to contain_neutron_config('DEFAULT/api_extensions_path').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('DEFAULT/control_exchange').with_value('neutron') is_expected.to contain_neutron_config('DEFAULT/control_exchange').with_value('neutron')
is_expected.to contain_neutron_config('DEFAULT/state_path').with_value('/var/lib/neutron') is_expected.to contain_neutron_config('DEFAULT/state_path').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('DEFAULT/lock_path').with_value('/var/lib/neutron/lock') is_expected.to contain_neutron_config('DEFAULT/lock_path').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('DEFAULT/rpc_response_timeout').with_value( params[:rpc_response_timeout] ) is_expected.to contain_neutron_config('DEFAULT/rpc_response_timeout').with_value( '<SERVICE DEFAULT>' )
is_expected.to contain_neutron_config('agent/root_helper').with_value('sudo neutron-rootwrap /etc/neutron/rootwrap.conf') is_expected.to contain_neutron_config('agent/root_helper').with_value('sudo neutron-rootwrap /etc/neutron/rootwrap.conf')
is_expected.to contain_neutron_config('agent/report_interval').with_value('30') is_expected.to contain_neutron_config('agent/report_interval').with_value('<SERVICE DEFAULT>')
end end
end end
@ -185,20 +179,12 @@ describe 'neutron' do
it_raises 'a Puppet::Error', /The cert_file parameter is required when use_ssl is set to true/ it_raises 'a Puppet::Error', /The cert_file parameter is required when use_ssl is set to true/
end end
shared_examples_for 'with SSL socket options set to false' do shared_examples_for 'with SSL socket options left by default' do
before do
params.merge!(
:use_ssl => false,
:cert_file => false,
:key_file => false,
:ca_file => false
)
end
it { is_expected.to contain_neutron_config('DEFAULT/use_ssl').with_value('false') } it { is_expected.to contain_neutron_config('DEFAULT/use_ssl').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_neutron_config('DEFAULT/ssl_cert_file').with_ensure('absent') } it { is_expected.to contain_neutron_config('DEFAULT/ssl_cert_file').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_neutron_config('DEFAULT/ssl_key_file').with_ensure('absent') } it { is_expected.to contain_neutron_config('DEFAULT/ssl_key_file').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_neutron_config('DEFAULT/ssl_ca_file').with_ensure('absent') } it { is_expected.to contain_neutron_config('DEFAULT/ssl_ca_file').with_value('<SERVICE DEFAULT>') }
end end
shared_examples_for 'with SSL socket options set and no ca_file' do shared_examples_for 'with SSL socket options set and no ca_file' do
@ -228,6 +214,11 @@ describe 'neutron' do
end end
shared_examples_for 'with syslog disabled' do shared_examples_for 'with syslog disabled' do
before do
params.merge!(
:use_syslog => false,
)
end
it { is_expected.to contain_neutron_config('DEFAULT/use_syslog').with_value(false) } it { is_expected.to contain_neutron_config('DEFAULT/use_syslog').with_value(false) }
end end
@ -270,13 +261,12 @@ describe 'neutron' do
shared_examples_for 'with SSL disabled' do shared_examples_for 'with SSL disabled' do
before do before do
params.merge!( params.merge!(
:rabbit_use_ssl => false,
:kombu_ssl_version => 'TLSv1' :kombu_ssl_version => 'TLSv1'
) )
end end
it do it do
is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value('false') is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('oslo_messaging_rabbit/kombu_ssl_ca_certs').with_value('<SERVICE DEFAULT>') is_expected.to contain_neutron_config('oslo_messaging_rabbit/kombu_ssl_ca_certs').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('oslo_messaging_rabbit/kombu_ssl_certfile').with_value('<SERVICE DEFAULT>') is_expected.to contain_neutron_config('oslo_messaging_rabbit/kombu_ssl_certfile').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('oslo_messaging_rabbit/kombu_ssl_keyfile').with_value('<SERVICE DEFAULT>') is_expected.to contain_neutron_config('oslo_messaging_rabbit/kombu_ssl_keyfile').with_value('<SERVICE DEFAULT>')
@ -287,7 +277,7 @@ describe 'neutron' do
shared_examples_for 'with SSL wrongly configured' do shared_examples_for 'with SSL wrongly configured' do
before do before do
params.merge!( params.merge!(
:rabbit_use_ssl => false :rabbit_use_ssl => false
) )
end end
@ -339,7 +329,7 @@ describe 'neutron' do
it do it do
is_expected.to contain_neutron_config('DEFAULT/use_syslog').with_value(true) is_expected.to contain_neutron_config('DEFAULT/use_syslog').with_value(true)
is_expected.to contain_neutron_config('DEFAULT/syslog_log_facility').with_value('LOG_USER') is_expected.to contain_neutron_config('DEFAULT/syslog_log_facility').with_value('<SERVICE DEFAULT>')
end end
end end

View File

@ -7,25 +7,9 @@ describe 'neutron::quota' do
end end
let :default_params do let :default_params do
{ :default_quota => -1, { :quota_firewall_rule => -1,
:quota_network => 10,
:quota_subnet => 10,
:quota_port => 50,
:quota_router => 10,
:quota_floatingip => 50,
:quota_security_group => 10,
:quota_security_group_rule => 100,
:quota_driver => 'neutron.db.quota_db.DbQuotaDriver',
:quota_firewall => 1,
:quota_firewall_policy => 1,
:quota_firewall_rule => -1,
:quota_health_monitor => -1,
:quota_items => 'network,subnet,port',
:quota_member => -1,
:quota_network_gateway => 5, :quota_network_gateway => 5,
:quota_packet_filter => 100, :quota_packet_filter => 100 }
:quota_pool => 10,
:quota_vip => 10 }
end end
let :facts do let :facts do

View File

@ -24,7 +24,6 @@ describe 'neutron::server::notifications' do
{ {
:notify_nova_on_port_status_changes => true, :notify_nova_on_port_status_changes => true,
:notify_nova_on_port_data_changes => true, :notify_nova_on_port_data_changes => true,
:send_events_interval => '2',
:nova_url => 'http://127.0.0.1:8774/v2', :nova_url => 'http://127.0.0.1:8774/v2',
:auth_plugin => 'password', :auth_plugin => 'password',
:username => 'nova', :username => 'nova',
@ -59,7 +58,7 @@ describe 'neutron::server::notifications' do
it 'configure neutron.conf' do it 'configure neutron.conf' do
is_expected.to contain_neutron_config('DEFAULT/notify_nova_on_port_status_changes').with_value(true) is_expected.to contain_neutron_config('DEFAULT/notify_nova_on_port_status_changes').with_value(true)
is_expected.to contain_neutron_config('DEFAULT/notify_nova_on_port_data_changes').with_value(true) is_expected.to contain_neutron_config('DEFAULT/notify_nova_on_port_data_changes').with_value(true)
is_expected.to contain_neutron_config('DEFAULT/send_events_interval').with_value('2') is_expected.to contain_neutron_config('DEFAULT/send_events_interval').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('DEFAULT/nova_url').with_value('http://127.0.0.1:8774/v2') is_expected.to contain_neutron_config('DEFAULT/nova_url').with_value('http://127.0.0.1:8774/v2')
is_expected.to contain_neutron_config('nova/auth_url').with_value('http://127.0.0.1:35357') is_expected.to contain_neutron_config('nova/auth_url').with_value('http://127.0.0.1:35357')
is_expected.to contain_neutron_config('nova/username').with_value('nova') is_expected.to contain_neutron_config('nova/username').with_value('nova')

View File

@ -27,14 +27,10 @@ describe 'neutron::server' do
:database_max_pool_size => 10, :database_max_pool_size => 10,
:database_max_overflow => 20, :database_max_overflow => 20,
:sync_db => false, :sync_db => false,
:agent_down_time => 75,
:router_scheduler_driver => 'neutron.scheduler.l3_agent_scheduler.ChanceScheduler', :router_scheduler_driver => 'neutron.scheduler.l3_agent_scheduler.ChanceScheduler',
:router_distributed => false,
:l3_ha => false, :l3_ha => false,
:max_l3_agents_per_router => 3, :max_l3_agents_per_router => 3,
:min_l3_agents_per_router => 2, :min_l3_agents_per_router => 2,
:l3_ha_net_cidr => '169.254.192.0/18',
:allow_automatic_l3agent_failover => false,
} }
end end
@ -94,7 +90,7 @@ describe 'neutron::server' do
is_expected.to contain_service('neutron-server').with_name('neutron-server') is_expected.to contain_service('neutron-server').with_name('neutron-server')
is_expected.to contain_neutron_config('DEFAULT/api_workers').with_value(facts[:processorcount]) is_expected.to contain_neutron_config('DEFAULT/api_workers').with_value(facts[:processorcount])
is_expected.to contain_neutron_config('DEFAULT/rpc_workers').with_value(facts[:processorcount]) is_expected.to contain_neutron_config('DEFAULT/rpc_workers').with_value(facts[:processorcount])
is_expected.to contain_neutron_config('DEFAULT/agent_down_time').with_value(p[:agent_down_time]) is_expected.to contain_neutron_config('DEFAULT/agent_down_time').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('DEFAULT/router_scheduler_driver').with_value(p[:router_scheduler_driver]) is_expected.to contain_neutron_config('DEFAULT/router_scheduler_driver').with_value(p[:router_scheduler_driver])
is_expected.to contain_neutron_config('qos/notification_drivers').with_value('<SERVICE DEFAULT>') is_expected.to contain_neutron_config('qos/notification_drivers').with_value('<SERVICE DEFAULT>')
end end
@ -125,7 +121,7 @@ describe 'neutron::server' do
is_expected.to contain_neutron_config('DEFAULT/l3_ha').with_value(true) is_expected.to contain_neutron_config('DEFAULT/l3_ha').with_value(true)
is_expected.to contain_neutron_config('DEFAULT/max_l3_agents_per_router').with_value(3) is_expected.to contain_neutron_config('DEFAULT/max_l3_agents_per_router').with_value(3)
is_expected.to contain_neutron_config('DEFAULT/min_l3_agents_per_router').with_value(2) is_expected.to contain_neutron_config('DEFAULT/min_l3_agents_per_router').with_value(2)
is_expected.to contain_neutron_config('DEFAULT/l3_ha_net_cidr').with_value('169.254.192.0/18') is_expected.to contain_neutron_config('DEFAULT/l3_ha_net_cidr').with_value('<SERVICE DEFAULT>')
end end
end end
@ -180,7 +176,7 @@ describe 'neutron::server' do
context 'with allow_automatic_l3agent_failover in neutron.conf' do context 'with allow_automatic_l3agent_failover in neutron.conf' do
it 'should configure allow_automatic_l3agent_failover' do it 'should configure allow_automatic_l3agent_failover' do
is_expected.to contain_neutron_config('DEFAULT/allow_automatic_l3agent_failover').with_value(p[:allow_automatic_l3agent_failover]) is_expected.to contain_neutron_config('DEFAULT/allow_automatic_l3agent_failover').with_value('<SERVICE DEFAULT>')
end end
end end

View File

@ -37,9 +37,7 @@ describe 'neutron::services::fwaas' do
end end
let :default_params do let :default_params do
{ :driver => 'neutron.services.firewall.drivers.linux.iptables_fwaas.IptablesFwaasDriver', { :vpnaas_agent_package => false }
:enabled => true,
:vpnaas_agent_package => false }
end end
shared_examples_for 'neutron fwaas service plugin' do shared_examples_for 'neutron fwaas service plugin' do
@ -48,8 +46,8 @@ describe 'neutron::services::fwaas' do
end end
it 'configures driver in fwaas_driver.ini' do it 'configures driver in fwaas_driver.ini' do
is_expected.to contain_neutron_fwaas_service_config('fwaas/driver').with_value('neutron.services.firewall.drivers.linux.iptables_fwaas.IptablesFwaasDriver') is_expected.to contain_neutron_fwaas_service_config('fwaas/driver').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_fwaas_service_config('fwaas/enabled').with_value('true') is_expected.to contain_neutron_fwaas_service_config('fwaas/enabled').with_value('<SERVICE DEFAULT>')
end end
end end