Skip to content

Commit

Permalink
Merge "Add API V3 support"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed May 12, 2014
2 parents b73cc70 + cd2cf2e commit 0249428
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions manifests/api.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -131,6 +134,7 @@
$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',
Expand Down Expand Up @@ -181,6 +185,7 @@
'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){
Expand Down
9 changes: 9 additions & 0 deletions spec/classes/nova_api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@
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')
Expand Down Expand Up @@ -103,6 +107,7 @@
:osapi_compute_workers => 1,
:metadata_workers => 2,
:conductor_workers => 3,
:osapi_v3 => true,
})
end

Expand Down Expand Up @@ -154,6 +159,10 @@
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

[
Expand Down

0 comments on commit 0249428

Please sign in to comment.