Merge "Adds support for Nova Memcached"

This commit is contained in:
Jenkins
2013-07-16 23:18:25 +00:00
committed by Gerrit Code Review
2 changed files with 25 additions and 3 deletions

View File

@@ -6,6 +6,11 @@
#
# === Parameters
#
# [memcached_servers]
# Use memcached instead of in-process cache.
# Supply a list of memcached server IP's:Memcached Port.
# (optional) Defaults to false.
#
# [quantum]
# Specifies if nova should be configured to use quantum.
# (optional) Defaults to false (indicating nova-networks should be used)
@@ -65,6 +70,7 @@ class openstack::nova::controller (
$nova_db_user = 'nova',
$nova_db_dbname = 'nova',
$enabled_apis = 'ec2,osapi_compute,metadata',
$memcached_servers = false,
# Rabbit
$rabbit_user = 'openstack',
$rabbit_virtual_host = '/',
@@ -125,6 +131,7 @@ class openstack::nova::controller (
rabbit_virtual_host => $rabbit_virtual_host,
image_service => 'nova.image.glance.GlanceImageService',
glance_api_servers => $glance_connection,
memcached_servers => $memcached_servers,
debug => $debug,
verbose => $verbose,
rabbit_host => $rabbit_connection,

View File

@@ -2,7 +2,7 @@ require 'spec_helper'
describe 'openstack::nova::controller' do
let :params do
let :default_params do
{
:public_address => '127.0.0.1',
:db_host => '127.0.0.1',
@@ -11,6 +11,7 @@ describe 'openstack::nova::controller' do
:quantum_user_password => 'quantum_user_pass',
:nova_db_password => 'nova_db_pass',
:quantum => true,
:memcached_servers => false,
:metadata_shared_secret => 'secret'
}
end
@@ -19,6 +20,10 @@ describe 'openstack::nova::controller' do
{:osfamily => 'Debian' }
end
let :params do
default_params
end
it { should contain_class('openstack::nova::controller') }
context 'when configuring quantum' do
@@ -70,9 +75,19 @@ describe 'openstack::nova::controller' do
:host => '127.0.0.1',
:enabled => true
)
end
end
context 'when configuring memcached' do
let :params do
default_params.merge(
:memcached_servers => ['memcached01:11211', 'memcached02:11211']
)
end
it 'should configure nova with memcached' do
should contain_class('nova').with(
:memcached_servers => ['memcached01:11211', 'memcached02:11211']
)
end
end
end