From 5e5a14380eec7b9e0b04fec22320ebfaa901f5e8 Mon Sep 17 00:00:00 2001 From: Aimon Bustardo Date: Fri, 16 Nov 2012 04:54:53 -0800 Subject: [PATCH] Implement volume_api_class as an option --- manifests/api.pp | 5 +++-- spec/classes/nova_api_spec.rb | 1 + spec/classes/nova_init_spec.rb | 3 +-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/manifests/api.pp b/manifests/api.pp index edc6abb68..0fa5c9875 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -24,7 +24,8 @@ class nova::api( $admin_user = 'nova', $admin_password = 'passw0rd', $api_bind_address = '0.0.0.0', - $enabled_apis = 'ec2,osapi_compute,metadata' + $enabled_apis = 'ec2,osapi_compute,metadata', + $volume_api_class = 'nova.volume.cinder.API' ) { include nova::params @@ -52,7 +53,7 @@ class nova::api( nova_config { 'api_paste_config': value => '/etc/nova/api-paste.ini'; 'enabled_apis': value => $enabled_apis; - 'volume_api_class': value => 'nova.volume.cinder.API'; + 'volume_api_class': value => $volume_api_class; 'ec2_listen': value => $api_bind_address; 'osapi_compute_listen': value => $api_bind_address; 'metadata_listen': value => $api_bind_address; diff --git a/spec/classes/nova_api_spec.rb b/spec/classes/nova_api_spec.rb index 6bae49059..ab1f958c2 100644 --- a/spec/classes/nova_api_spec.rb +++ b/spec/classes/nova_api_spec.rb @@ -73,6 +73,7 @@ describe 'nova::api' do :admin_user => 'nova2', :admin_password => 'passw0rd2', :api_bind_address => '192.168.56.210', + :volume_api_class => 'nova.volume.cinder.API' } end it 'should use default params for api-paste.init' do diff --git a/spec/classes/nova_init_spec.rb b/spec/classes/nova_init_spec.rb index 9a7f7e0c2..745d56077 100644 --- a/spec/classes/nova_init_spec.rb +++ b/spec/classes/nova_init_spec.rb @@ -74,8 +74,7 @@ describe 'nova' do it { should contain_nova_config('lock_path').with_value('/var/lock/nova') } it { should contain_nova_config('service_down_time').with_value('60') } it { should contain_nova_config('rootwrap_config').with_value('/etc/nova/rootwrap.conf') } - - + describe 'with parameters supplied' do