Merge "Add API V3 support"
This commit is contained in:
@@ -107,6 +107,9 @@
|
||||
# (optional) The rate limiting factory to use
|
||||
# Defaults to 'nova.api.openstack.compute.limits:RateLimitingMiddleware.factory'
|
||||
#
|
||||
# [*osapi_v3*]
|
||||
# (optional) Enable or not Nova API v3
|
||||
# Defaults to false
|
||||
class nova::api(
|
||||
$admin_password,
|
||||
$enabled = false,
|
||||
@@ -131,6 +134,7 @@ class nova::api(
|
||||
$conductor_workers = $::processorcount,
|
||||
$sync_db = true,
|
||||
$neutron_metadata_proxy_shared_secret = undef,
|
||||
$osapi_v3 = false,
|
||||
$ratelimits = undef,
|
||||
$ratelimits_factory =
|
||||
'nova.api.openstack.compute.limits:RateLimitingMiddleware.factory',
|
||||
@@ -181,6 +185,7 @@ class nova::api(
|
||||
'DEFAULT/metadata_workers': value => $metadata_workers;
|
||||
'conductor/workers': value => $conductor_workers;
|
||||
'DEFAULT/use_forwarded_for': value => $use_forwarded_for;
|
||||
'osapi_v3/enabled': value => $osapi_v3;
|
||||
}
|
||||
|
||||
if ($neutron_metadata_proxy_shared_secret){
|
||||
|
||||
@@ -63,6 +63,10 @@ describe 'nova::api' do
|
||||
should contain_nova_config('conductor/workers').with('value' => '5')
|
||||
end
|
||||
|
||||
it 'do not configure v3 api' do
|
||||
should contain_nova_config('osapi_v3/enabled').with('value' => false)
|
||||
end
|
||||
|
||||
it 'unconfigures 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')
|
||||
@@ -103,6 +107,7 @@ describe 'nova::api' do
|
||||
:osapi_compute_workers => 1,
|
||||
:metadata_workers => 2,
|
||||
:conductor_workers => 3,
|
||||
:osapi_v3 => true,
|
||||
})
|
||||
end
|
||||
|
||||
@@ -154,6 +159,10 @@ describe 'nova::api' do
|
||||
should contain_nova_config('DEFAULT/service_neutron_metadata_proxy').with('value' => true)
|
||||
should contain_nova_config('DEFAULT/neutron_metadata_proxy_shared_secret').with('value' => 'secrete')
|
||||
end
|
||||
|
||||
it 'configure nova api v3' do
|
||||
should contain_nova_config('osapi_v3/enabled').with('value' => true)
|
||||
end
|
||||
end
|
||||
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user