Merge "Quantum to Neutron rename"
This commit is contained in:
@@ -108,7 +108,7 @@ Release Notes
|
||||
* The Apache Qpid message broker is available as an RPC backend.
|
||||
* Further compatibility fixes for RHEL and its derivatives.
|
||||
* Postgres support added.
|
||||
* Adjustments to help in supporting the still in development quantum module.
|
||||
* Adjustments to help in supporting the still in development neutron module.
|
||||
* Config changes can be hidden from Puppet logs.
|
||||
* Move from deprecated rabbit_notifier to rpc_notifier.
|
||||
* Various cleanups and bug fixes.
|
||||
|
@@ -19,7 +19,7 @@
|
||||
# Treat X-Forwarded-For as the canonical remote address. Only
|
||||
# enable this if you have a sanitizing proxy. (boolean value)
|
||||
# (Optional). Defaults to false.
|
||||
# * quantum_metadata_proxy_shared_secret
|
||||
# * neutron_metadata_proxy_shared_secret
|
||||
#
|
||||
class nova::api(
|
||||
$admin_password,
|
||||
@@ -39,7 +39,7 @@ class nova::api(
|
||||
$use_forwarded_for = false,
|
||||
$workers = $::processorcount,
|
||||
$sync_db = true,
|
||||
$quantum_metadata_proxy_shared_secret = undef
|
||||
$neutron_metadata_proxy_shared_secret = undef
|
||||
) {
|
||||
|
||||
include nova::params
|
||||
@@ -75,16 +75,16 @@ class nova::api(
|
||||
'DEFAULT/use_forwarded_for': value => $use_forwarded_for;
|
||||
}
|
||||
|
||||
if ($quantum_metadata_proxy_shared_secret){
|
||||
if ($neutron_metadata_proxy_shared_secret){
|
||||
nova_config {
|
||||
'DEFAULT/service_quantum_metadata_proxy': value => true;
|
||||
'DEFAULT/quantum_metadata_proxy_shared_secret':
|
||||
value => $quantum_metadata_proxy_shared_secret;
|
||||
'DEFAULT/service_neutron_metadata_proxy': value => true;
|
||||
'DEFAULT/neutron_metadata_proxy_shared_secret':
|
||||
value => $neutron_metadata_proxy_shared_secret;
|
||||
}
|
||||
} else {
|
||||
nova_config {
|
||||
'DEFAULT/service_quantum_metadata_proxy': value => false;
|
||||
'DEFAULT/quantum_metadata_proxy_shared_secret': ensure => absent;
|
||||
'DEFAULT/service_neutron_metadata_proxy': value => false;
|
||||
'DEFAULT/neutron_metadata_proxy_shared_secret': ensure => absent;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
class nova::compute::quantum (
|
||||
class nova::compute::neutron (
|
||||
$libvirt_vif_driver = 'nova.virt.libvirt.vif.LibvirtOpenVswitchDriver'
|
||||
) {
|
||||
|
73
manifests/network/neutron.pp
Normal file
73
manifests/network/neutron.pp
Normal file
@@ -0,0 +1,73 @@
|
||||
# == Class: nova::network::neutron
|
||||
#
|
||||
# Configures Nova network to use Neutron.
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*neutron_admin_password*]
|
||||
# (required) Password for connecting to Neutron network services in
|
||||
# admin context through the OpenStack Identity service.
|
||||
#
|
||||
# [*neutron_auth_strategy*]
|
||||
# (optional) Should be kept as default 'keystone' for all production deployments.
|
||||
#
|
||||
# [*neutron_url*]
|
||||
# (optional) URL for connecting to the Neutron networking service.
|
||||
# Defaults to 'http://127.0.0.1:9696'.
|
||||
#
|
||||
# [*neutron_admin_tenant_name*]
|
||||
# (optional) Tenant name for connecting to Neutron network services in
|
||||
# admin context through the OpenStack Identity service. Defaults to 'services'.
|
||||
#
|
||||
# [*neutron_region_name*]
|
||||
# (optional) Region name for connecting to neutron in admin context
|
||||
# through the OpenStack Identity service. Defaults to 'RegionOne'.
|
||||
#
|
||||
# [*neutron_admin_username*]
|
||||
# (optional) Username for connecting to Neutron network services in admin context
|
||||
# through the OpenStack Identity service. Defaults to 'neutron'.
|
||||
#
|
||||
# [*neutron_admin_auth_url*]
|
||||
# (optional) Points to the OpenStack Identity server IP and port.
|
||||
# This is the Identity (keystone) admin API server IP and port value,
|
||||
# and not the Identity service API IP and port.
|
||||
# Defaults to 'http://127.0.0.1:35357/v2.0'
|
||||
#
|
||||
# [*security_group_api*]
|
||||
# (optional) The full class name of the security API class.
|
||||
# Defaults to 'neutron' which configures Nova to use Neutron for
|
||||
# security groups. Set to 'nova' to use standard Nova security groups.
|
||||
#
|
||||
# [*firewall_driver*]
|
||||
# (optional) Firewall driver.
|
||||
# Defaults to nova.virt.firewall.NoopFirewallDriver. This prevents Nova
|
||||
# from maintaining a firewall so it does not interfere with Neutron's.
|
||||
# Set to 'nova.virt.firewall.IptablesFirewallDriver'
|
||||
# to re-enable the Nova firewall.
|
||||
#
|
||||
class nova::network::neutron (
|
||||
$neutron_admin_password,
|
||||
$neutron_auth_strategy = 'keystone',
|
||||
$neutron_url = 'http://127.0.0.1:9696',
|
||||
$neutron_admin_tenant_name = 'services',
|
||||
$neutron_region_name = 'RegionOne',
|
||||
$neutron_admin_username = 'neutron',
|
||||
$neutron_admin_auth_url = 'http://127.0.0.1:35357/v2.0',
|
||||
$security_group_api = 'neutron',
|
||||
$firewall_driver = 'nova.virt.firewall.NoopFirewallDriver'
|
||||
) {
|
||||
|
||||
nova_config {
|
||||
'DEFAULT/neutron_auth_strategy': value => $neutron_auth_strategy;
|
||||
'DEFAULT/network_api_class': value => 'nova.network.neutronv2.api.API';
|
||||
'DEFAULT/neutron_url': value => $neutron_url;
|
||||
'DEFAULT/neutron_admin_tenant_name': value => $neutron_admin_tenant_name;
|
||||
'DEFAULT/neutron_region_name': value => $neutron_region_name;
|
||||
'DEFAULT/neutron_admin_username': value => $neutron_admin_username;
|
||||
'DEFAULT/neutron_admin_password': value => $neutron_admin_password, secret => true;
|
||||
'DEFAULT/neutron_admin_auth_url': value => $neutron_admin_auth_url;
|
||||
'DEFAULT/security_group_api': value => $security_group_api;
|
||||
'DEFAULT/firewall_driver': value => $firewall_driver;
|
||||
}
|
||||
|
||||
}
|
@@ -1,73 +0,0 @@
|
||||
# == Class: nova::network::quantum
|
||||
#
|
||||
# Configures Nova network to use Quantum.
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*quantum_admin_password*]
|
||||
# (required) Password for connecting to Quantum network services in
|
||||
# admin context through the OpenStack Identity service.
|
||||
#
|
||||
# [*quantum_auth_strategy*]
|
||||
# (optional) Should be kept as default 'keystone' for all production deployments.
|
||||
#
|
||||
# [*quantum_url*]
|
||||
# (optional) URL for connecting to the Quantum networking service.
|
||||
# Defaults to 'http://127.0.0.1:9696'.
|
||||
#
|
||||
# [*quantum_admin_tenant_name*]
|
||||
# (optional) Tenant name for connecting to Quantum network services in
|
||||
# admin context through the OpenStack Identity service. Defaults to 'services'.
|
||||
#
|
||||
# [*quantum_region_name*]
|
||||
# (optional) Region name for connecting to quantum in admin context
|
||||
# through the OpenStack Identity service. Defaults to 'RegionOne'.
|
||||
#
|
||||
# [*quantum_admin_username*]
|
||||
# (optional) Username for connecting to Quantum network services in admin context
|
||||
# through the OpenStack Identity service. Defaults to 'quantum'.
|
||||
#
|
||||
# [*quantum_admin_auth_url*]
|
||||
# (optional) Points to the OpenStack Identity server IP and port.
|
||||
# This is the Identity (keystone) admin API server IP and port value,
|
||||
# and not the Identity service API IP and port.
|
||||
# Defaults to 'http://127.0.0.1:35357/v2.0'
|
||||
#
|
||||
# [*security_group_api*]
|
||||
# (optional) The full class name of the security API class.
|
||||
# Defaults to 'quantum' which configures Nova to use Quantum for
|
||||
# security groups. Set to 'nova' to use standard Nova security groups.
|
||||
#
|
||||
# [*firewall_driver*]
|
||||
# (optional) Firewall driver.
|
||||
# Defaults to nova.virt.firewall.NoopFirewallDriver. This prevents Nova
|
||||
# from maintaining a firewall so it does not interfere with Quantum's.
|
||||
# Set to 'nova.virt.firewall.IptablesFirewallDriver'
|
||||
# to re-enable the Nova firewall.
|
||||
#
|
||||
class nova::network::quantum (
|
||||
$quantum_admin_password,
|
||||
$quantum_auth_strategy = 'keystone',
|
||||
$quantum_url = 'http://127.0.0.1:9696',
|
||||
$quantum_admin_tenant_name = 'services',
|
||||
$quantum_region_name = 'RegionOne',
|
||||
$quantum_admin_username = 'quantum',
|
||||
$quantum_admin_auth_url = 'http://127.0.0.1:35357/v2.0',
|
||||
$security_group_api = 'quantum',
|
||||
$firewall_driver = 'nova.virt.firewall.NoopFirewallDriver'
|
||||
) {
|
||||
|
||||
nova_config {
|
||||
'DEFAULT/quantum_auth_strategy': value => $quantum_auth_strategy;
|
||||
'DEFAULT/network_api_class': value => 'nova.network.quantumv2.api.API';
|
||||
'DEFAULT/quantum_url': value => $quantum_url;
|
||||
'DEFAULT/quantum_admin_tenant_name': value => $quantum_admin_tenant_name;
|
||||
'DEFAULT/quantum_region_name': value => $quantum_region_name;
|
||||
'DEFAULT/quantum_admin_username': value => $quantum_admin_username;
|
||||
'DEFAULT/quantum_admin_password': value => $quantum_admin_password, secret => true;
|
||||
'DEFAULT/quantum_admin_auth_url': value => $quantum_admin_auth_url;
|
||||
'DEFAULT/security_group_api': value => $security_group_api;
|
||||
'DEFAULT/firewall_driver': value => $firewall_driver;
|
||||
}
|
||||
|
||||
}
|
@@ -65,9 +65,9 @@ describe 'nova::api' do
|
||||
it { should contain_nova_config('DEFAULT/osapi_compute_listen').with('value' => '0.0.0.0') }
|
||||
it { should contain_nova_config('DEFAULT/metadata_listen').with('value' => '0.0.0.0') }
|
||||
it { should contain_nova_config('DEFAULT/osapi_volume_listen').with('value' => '0.0.0.0') }
|
||||
it 'should unconfigure quantum_metadata proxy' do
|
||||
should contain_nova_config('DEFAULT/service_quantum_metadata_proxy').with('value' => false)
|
||||
should contain_nova_config('DEFAULT/quantum_metadata_proxy_shared_secret').with('ensure' => 'absent')
|
||||
it 'should unconfigure neutron_metadata proxy' do
|
||||
should contain_nova_config('DEFAULT/service_neutron_metadata_proxy').with('value' => false)
|
||||
should contain_nova_config('DEFAULT/neutron_metadata_proxy_shared_secret').with('ensure' => 'absent')
|
||||
end
|
||||
end
|
||||
describe 'with params' do
|
||||
@@ -91,7 +91,7 @@ describe 'nova::api' do
|
||||
:metadata_listen => '127.0.0.1',
|
||||
:volume_api_class => 'nova.volume.cinder.API',
|
||||
:use_forwarded_for => false,
|
||||
:quantum_metadata_proxy_shared_secret => 'secrete',
|
||||
:neutron_metadata_proxy_shared_secret => 'secrete',
|
||||
}
|
||||
end
|
||||
it 'should use defined params for api-paste.ini' do
|
||||
@@ -116,8 +116,8 @@ describe 'nova::api' do
|
||||
it { should contain_nova_config('DEFAULT/osapi_volume_listen').with('value' => '192.168.56.210') }
|
||||
it { should contain_nova_config('DEFAULT/use_forwarded_for').with('value' => false) }
|
||||
it { should contain_nova_config('DEFAULT/osapi_compute_workers').with('value' => '5') }
|
||||
it { should contain_nova_config('DEFAULT/service_quantum_metadata_proxy').with('value' => true) }
|
||||
it { should contain_nova_config('DEFAULT/quantum_metadata_proxy_shared_secret').with('value' => 'secrete') }
|
||||
it { should contain_nova_config('DEFAULT/service_neutron_metadata_proxy').with('value' => true) }
|
||||
it { should contain_nova_config('DEFAULT/neutron_metadata_proxy_shared_secret').with('value' => 'secrete') }
|
||||
end
|
||||
|
||||
[
|
||||
|
@@ -1,5 +1,5 @@
|
||||
require 'spec_helper'
|
||||
describe 'nova::compute::quantum' do
|
||||
describe 'nova::compute::neutron' do
|
||||
|
||||
it { should contain_nova_config('DEFAULT/libvirt_use_virtio_for_bridges').with_value(true)}
|
||||
it { should contain_nova_config('DEFAULT/libvirt_vif_driver').with_value('nova.virt.libvirt.vif.LibvirtOpenVswitchDriver')}
|
||||
|
@@ -1,35 +1,35 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'nova::network::quantum' do
|
||||
describe 'nova::network::neutron' do
|
||||
|
||||
let :default_params do
|
||||
{ :quantum_auth_strategy => 'keystone',
|
||||
:quantum_url => 'http://127.0.0.1:9696',
|
||||
:quantum_admin_tenant_name => 'services',
|
||||
:quantum_region_name => 'RegionOne',
|
||||
:quantum_admin_username => 'quantum',
|
||||
:quantum_admin_auth_url => 'http://127.0.0.1:35357/v2.0',
|
||||
:security_group_api => 'quantum',
|
||||
{ :neutron_auth_strategy => 'keystone',
|
||||
:neutron_url => 'http://127.0.0.1:9696',
|
||||
:neutron_admin_tenant_name => 'services',
|
||||
:neutron_region_name => 'RegionOne',
|
||||
:neutron_admin_username => 'neutron',
|
||||
:neutron_admin_auth_url => 'http://127.0.0.1:35357/v2.0',
|
||||
:security_group_api => 'neutron',
|
||||
:firewall_driver => 'nova.virt.firewall.NoopFirewallDriver',
|
||||
}
|
||||
end
|
||||
|
||||
let :params do
|
||||
{ :quantum_admin_password => 's3cr3t' }
|
||||
{ :neutron_admin_password => 's3cr3t' }
|
||||
end
|
||||
|
||||
context 'with required parameters' do
|
||||
it 'configures quantum endpoint in nova.conf' do
|
||||
should contain_nova_config('DEFAULT/quantum_admin_password').with_value(params[:quantum_admin_password]).with_secret(true)
|
||||
should contain_nova_config('DEFAULT/network_api_class').with_value('nova.network.quantumv2.api.API')
|
||||
should contain_nova_config('DEFAULT/quantum_auth_strategy').with_value(default_params[:quantum_auth_strategy])
|
||||
should contain_nova_config('DEFAULT/quantum_url').with_value(default_params[:quantum_url])
|
||||
should contain_nova_config('DEFAULT/quantum_admin_tenant_name').with_value(default_params[:quantum_admin_tenant_name])
|
||||
should contain_nova_config('DEFAULT/quantum_region_name').with_value(default_params[:quantum_region_name])
|
||||
should contain_nova_config('DEFAULT/quantum_admin_username').with_value(default_params[:quantum_admin_username])
|
||||
should contain_nova_config('DEFAULT/quantum_admin_auth_url').with_value(default_params[:quantum_admin_auth_url])
|
||||
it 'configures neutron endpoint in nova.conf' do
|
||||
should contain_nova_config('DEFAULT/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/neutron_auth_strategy').with_value(default_params[:neutron_auth_strategy])
|
||||
should contain_nova_config('DEFAULT/neutron_url').with_value(default_params[:neutron_url])
|
||||
should contain_nova_config('DEFAULT/neutron_admin_tenant_name').with_value(default_params[:neutron_admin_tenant_name])
|
||||
should contain_nova_config('DEFAULT/neutron_region_name').with_value(default_params[:neutron_region_name])
|
||||
should contain_nova_config('DEFAULT/neutron_admin_username').with_value(default_params[:neutron_admin_username])
|
||||
should contain_nova_config('DEFAULT/neutron_admin_auth_url').with_value(default_params[:neutron_admin_auth_url])
|
||||
end
|
||||
it 'configures Nova to use Quantum Security Groups and Firewall' do
|
||||
it 'configures Nova to use Neutron Security Groups and Firewall' do
|
||||
should contain_nova_config('DEFAULT/firewall_driver').with_value(default_params[:firewall_driver])
|
||||
should contain_nova_config('DEFAULT/security_group_api').with_value(default_params[:security_group_api])
|
||||
end
|
||||
@@ -38,27 +38,27 @@ describe 'nova::network::quantum' do
|
||||
context 'when overriding class parameters' do
|
||||
before do
|
||||
params.merge!(
|
||||
:quantum_url => 'http://10.0.0.1:9696',
|
||||
:quantum_admin_tenant_name => 'openstack',
|
||||
:quantum_region_name => 'RegionTwo',
|
||||
:quantum_admin_username => 'quantum2',
|
||||
:quantum_admin_auth_url => 'http://10.0.0.1:35357/v2.0',
|
||||
:neutron_url => 'http://10.0.0.1:9696',
|
||||
:neutron_admin_tenant_name => 'openstack',
|
||||
:neutron_region_name => 'RegionTwo',
|
||||
:neutron_admin_username => 'neutron2',
|
||||
:neutron_admin_auth_url => 'http://10.0.0.1:35357/v2.0',
|
||||
:security_group_api => 'nova',
|
||||
:firewall_driver => 'nova.virt.firewall.IptablesFirewallDriver'
|
||||
)
|
||||
end
|
||||
|
||||
it 'configures quantum endpoint in nova.conf' do
|
||||
should contain_nova_config('DEFAULT/quantum_auth_strategy').with_value(default_params[:quantum_auth_strategy])
|
||||
should contain_nova_config('DEFAULT/quantum_admin_password').with_value(params[:quantum_admin_password]).with_secret(true)
|
||||
should contain_nova_config('DEFAULT/network_api_class').with_value('nova.network.quantumv2.api.API')
|
||||
should contain_nova_config('DEFAULT/quantum_url').with_value(params[:quantum_url])
|
||||
should contain_nova_config('DEFAULT/quantum_admin_tenant_name').with_value(params[:quantum_admin_tenant_name])
|
||||
should contain_nova_config('DEFAULT/quantum_region_name').with_value(params[:quantum_region_name])
|
||||
should contain_nova_config('DEFAULT/quantum_admin_username').with_value(params[:quantum_admin_username])
|
||||
should contain_nova_config('DEFAULT/quantum_admin_auth_url').with_value(params[:quantum_admin_auth_url])
|
||||
it 'configures neutron endpoint in nova.conf' do
|
||||
should contain_nova_config('DEFAULT/neutron_auth_strategy').with_value(default_params[:neutron_auth_strategy])
|
||||
should contain_nova_config('DEFAULT/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/neutron_url').with_value(params[:neutron_url])
|
||||
should contain_nova_config('DEFAULT/neutron_admin_tenant_name').with_value(params[:neutron_admin_tenant_name])
|
||||
should contain_nova_config('DEFAULT/neutron_region_name').with_value(params[:neutron_region_name])
|
||||
should contain_nova_config('DEFAULT/neutron_admin_username').with_value(params[:neutron_admin_username])
|
||||
should contain_nova_config('DEFAULT/neutron_admin_auth_url').with_value(params[:neutron_admin_auth_url])
|
||||
end
|
||||
it 'configures Nova to use Quantum Security Groups and Firewall' do
|
||||
it 'configures Nova to use Neutron Security Groups and Firewall' do
|
||||
should contain_nova_config('DEFAULT/firewall_driver').with_value(params[:firewall_driver])
|
||||
should contain_nova_config('DEFAULT/security_group_api').with_value(params[:security_group_api])
|
||||
end
|
||||
|
Reference in New Issue
Block a user