diff --git a/manifests/cinder/all.pp b/manifests/cinder/all.pp index c31a7e1..3c1f070 100644 --- a/manifests/cinder/all.pp +++ b/manifests/cinder/all.pp @@ -15,6 +15,7 @@ class openstack::cinder::all( $rabbit_hosts = undef, $rabbit_port = '5672', $rabbit_virtual_host = '/', + $glance_api_servers = '127.0.0.1:9292', # Database. Currently mysql is the only option. $db_type = 'mysql', $db_user = 'cinder', @@ -113,4 +114,8 @@ class openstack::cinder::all( } } } + + class { '::cinder::glance': + glance_api_servers => $glance_api_servers + } } diff --git a/manifests/cinder/controller.pp b/manifests/cinder/controller.pp index 856142f..95be914 100644 --- a/manifests/cinder/controller.pp +++ b/manifests/cinder/controller.pp @@ -15,6 +15,7 @@ class openstack::cinder::controller( $rabbit_hosts = false, $rabbit_port = '5672', $rabbit_virtual_host = '/', + $glance_api_servers = '127.0.0.1:9292', # Database. Currently mysql is the only option. $db_type = 'mysql', $db_user = 'cinder', @@ -80,4 +81,7 @@ class openstack::cinder::controller( enabled => $scheduler_enabled, } + class { '::cinder::glance': + glance_api_servers => $glance_api_servers + } } diff --git a/manifests/cinder/storage.pp b/manifests/cinder/storage.pp index 9f03ba3..38f7fca 100644 --- a/manifests/cinder/storage.pp +++ b/manifests/cinder/storage.pp @@ -6,6 +6,7 @@ class openstack::cinder::storage( $rabbit_hosts = false, $rabbit_port = '5672', $rabbit_virtual_host = '/', + $glance_api_servers = '127.0.0.1:9292', $package_ensure = 'present', $api_paste_config = '/etc/cinder/api-paste.ini', $volume_package_ensure = 'present', @@ -70,4 +71,8 @@ class openstack::cinder::storage( warning("Unsupported volume driver: ${volume_driver}, make sure you are configuring this yourself") } } + + class { '::cinder::glance': + glance_api_servers => $glance_api_servers + } } diff --git a/spec/classes/openstack_cinder_all_spec.rb b/spec/classes/openstack_cinder_all_spec.rb index 4613c6f..efda534 100644 --- a/spec/classes/openstack_cinder_all_spec.rb +++ b/spec/classes/openstack_cinder_all_spec.rb @@ -57,6 +57,9 @@ describe 'openstack::cinder::all' do :iscsi_ip_address => '127.0.0.1', :volume_group => 'cinder-volumes' ) + should contain_class('cinder::glance').with( + :glance_api_servers => '127.0.0.1:9292' + ) should_not contain_class('cinder::setup_test_volume') end diff --git a/spec/classes/openstack_cinder_controller_spec.rb b/spec/classes/openstack_cinder_controller_spec.rb index 518e081..859051d 100644 --- a/spec/classes/openstack_cinder_controller_spec.rb +++ b/spec/classes/openstack_cinder_controller_spec.rb @@ -49,6 +49,9 @@ describe 'openstack::cinder::controller' do :package_ensure => 'present', :enabled => true ) + should contain_class('cinder::glance').with( + :glance_api_servers => '127.0.0.1:9292' + ) end describe 'with custom syslog settings' do diff --git a/spec/classes/openstack_cinder_storage_spec.rb b/spec/classes/openstack_cinder_storage_spec.rb index 225d61f..2880142 100644 --- a/spec/classes/openstack_cinder_storage_spec.rb +++ b/spec/classes/openstack_cinder_storage_spec.rb @@ -37,6 +37,9 @@ describe 'openstack::cinder::storage' do :iscsi_ip_address => '127.0.0.1', :volume_group => 'cinder-volumes' ) + should contain_class('cinder::glance').with( + :glance_api_servers => '127.0.0.1:9292' + ) should_not contain_class('cinder::setup_test_volume') end