Merge "Allow customize dhcp_agents_per_network"

This commit is contained in:
Jenkins
2015-02-10 22:09:00 +00:00
committed by Gerrit Code Review
5 changed files with 11 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ This file is used to list changes made in each version of cookbook-openstack-net
* Removed all files not needed by the neutron cookbook
* Add radvd to neutron_l3_packages to support ipv6
* Use common specific_endpoint routines (bug 1412919)
* Parameterize dhcp_agents_per_network
## 10.1.0
* Add support for Neutron VPN Service

View File

@@ -134,6 +134,7 @@ Modular Layer 2 Plugin Configuration
DHCP Agent Configuration
------------------------
* `openstack['openstack']['network']['dhcp']['dhcp_delete_namespaces']` - (StrOpt) If True, namespaces will be deleted when a dhcp server is disabled.
* `openstack['openstack']['network']['dhcp']['dhcp_agents_per_network']` - (IntOpt) Set the number of dhcp agents for each network. (default 1)
L3 Agent Configuration
----------------------

View File

@@ -325,6 +325,9 @@ default['openstack']['network']['dhcp']['default_domain'] = 'openstacklocal'
# If True, namespaces will be deleted when a dhcp server is disabled.
default['openstack']['network']['dhcp']['dhcp_delete_namespaces'] = 'False'
# Set the default num of dhcp agents for each network.
default['openstack']['network']['dhcp']['dhcp_agents_per_network'] = 1
# ============================= L3 Agent Configuration =====================
# The scheduler class to use for scheduling routers to L3 agents

View File

@@ -550,6 +550,11 @@ describe 'openstack-network' do
expect(chef_run).to render_file(file.name).with_content(/^router_scheduler_driver = router_scheduler_driver_value$/)
end
it 'sets the dhcp_agents_per_network attribute' do
node.set['openstack']['network']['dhcp']['dhcp_agents_per_network'] = 'dhcp_agents_per_network_value'
expect(chef_run).to render_config_file(file.name).with_section_content('DEFAULT', /^dhcp_agents_per_network = dhcp_agents_per_network_value$/)
end
%w(notify_nova_on_port_status_changes notify_nova_on_port_data_changes send_events_interval).each do |attr|
it "sets the #{attr} nova attribute" do
node.set['openstack']['network']['nova'][attr] = "#{attr}_value"

View File

@@ -279,7 +279,7 @@ router_scheduler_driver = <%= node["openstack"]["network"]["l3"]["scheduler"] %>
# Number of DHCP agents scheduled to host a network. This enables redundant
# DHCP agents for configured networks.
# dhcp_agents_per_network = 1
dhcp_agents_per_network = <%= node['openstack']['network']['dhcp']['dhcp_agents_per_network'] %>
# =========== end of items for agent scheduler extension =====