Merge "Add optional network_api_class parameter to nova::network::neutron class"

This commit is contained in:
Jenkins
2014-12-29 10:27:04 +00:00
committed by Gerrit Code Review
2 changed files with 9 additions and 2 deletions

View File

@@ -57,6 +57,11 @@
# and not the Identity service API IP and port. # and not the Identity service API IP and port.
# Defaults to 'http://127.0.0.1:35357/v2.0' # Defaults to 'http://127.0.0.1:35357/v2.0'
# #
# [*network_api_class*]
# (optional) The full class name of the network API class.
# The default configures Nova to use Neutron for the network API.
# Defaults to 'nova.network.neutronv2.api.API'
#
# [*security_group_api*] # [*security_group_api*]
# (optional) The full class name of the security API class. # (optional) The full class name of the security API class.
# The default configures Nova to use Neutron for security groups. # The default configures Nova to use Neutron for security groups.
@@ -99,6 +104,7 @@ class nova::network::neutron (
$neutron_ovs_bridge = 'br-int', $neutron_ovs_bridge = 'br-int',
$neutron_extension_sync_interval = '600', $neutron_extension_sync_interval = '600',
$neutron_ca_certificates_file = undef, $neutron_ca_certificates_file = undef,
$network_api_class = 'nova.network.neutronv2.api.API',
$security_group_api = 'neutron', $security_group_api = 'neutron',
$firewall_driver = 'nova.virt.firewall.NoopFirewallDriver', $firewall_driver = 'nova.virt.firewall.NoopFirewallDriver',
$vif_plugging_is_fatal = true, $vif_plugging_is_fatal = true,
@@ -109,7 +115,7 @@ class nova::network::neutron (
nova_config { nova_config {
'DEFAULT/dhcp_domain': value => $dhcp_domain; 'DEFAULT/dhcp_domain': value => $dhcp_domain;
'DEFAULT/firewall_driver': value => $firewall_driver; 'DEFAULT/firewall_driver': value => $firewall_driver;
'DEFAULT/network_api_class': value => 'nova.network.neutronv2.api.API'; 'DEFAULT/network_api_class': value => $network_api_class;
'DEFAULT/security_group_api': value => $security_group_api; 'DEFAULT/security_group_api': value => $security_group_api;
'DEFAULT/vif_plugging_is_fatal': value => $vif_plugging_is_fatal; 'DEFAULT/vif_plugging_is_fatal': value => $vif_plugging_is_fatal;
'DEFAULT/vif_plugging_timeout': value => $vif_plugging_timeout; 'DEFAULT/vif_plugging_timeout': value => $vif_plugging_timeout;

View File

@@ -62,6 +62,7 @@ describe 'nova::network::neutron' do
:neutron_region_name => 'RegionTwo', :neutron_region_name => 'RegionTwo',
:neutron_admin_username => 'neutron2', :neutron_admin_username => 'neutron2',
:neutron_admin_auth_url => 'http://10.0.0.1:35357/v2.0', :neutron_admin_auth_url => 'http://10.0.0.1:35357/v2.0',
:network_api_class => 'network.api.class',
:security_group_api => 'nova', :security_group_api => 'nova',
:firewall_driver => 'nova.virt.firewall.IptablesFirewallDriver', :firewall_driver => 'nova.virt.firewall.IptablesFirewallDriver',
:neutron_ovs_bridge => 'br-int', :neutron_ovs_bridge => 'br-int',
@@ -75,7 +76,7 @@ describe 'nova::network::neutron' do
it 'configures neutron endpoint in nova.conf' do it 'configures neutron endpoint in nova.conf' do
should contain_nova_config('neutron/auth_strategy').with_value(default_params[:neutron_auth_strategy]) should contain_nova_config('neutron/auth_strategy').with_value(default_params[:neutron_auth_strategy])
should contain_nova_config('neutron/admin_password').with_value(params[:neutron_admin_password]).with_secret(true) should contain_nova_config('neutron/admin_password').with_value(params[:neutron_admin_password]).with_secret(true)
should contain_nova_config('DEFAULT/network_api_class').with_value('nova.network.neutronv2.api.API') should contain_nova_config('DEFAULT/network_api_class').with_value('network.api.class')
should contain_nova_config('DEFAULT/dhcp_domain').with_value(params[:dhcp_domain]) should contain_nova_config('DEFAULT/dhcp_domain').with_value(params[:dhcp_domain])
should contain_nova_config('neutron/url').with_value(params[:neutron_url]) should contain_nova_config('neutron/url').with_value(params[:neutron_url])
should contain_nova_config('neutron/url_timeout').with_value(params[:neutron_url_timeout]) should contain_nova_config('neutron/url_timeout').with_value(params[:neutron_url_timeout])