Browse Source

Merge "Add cinder volume type for multiple cinder stores"

changes/41/772141/1
Zuul 7 months ago
committed by Gerrit Code Review
parent
commit
ceaf8017f3
  1. 7
      manifests/backend/multistore/cinder.pp
  2. 5
      releasenotes/notes/add_cinder_volume_type_for_multiple_cinder_stores-c19b0bb1c753715b.yaml
  3. 5
      spec/defines/glance_backend_multistore_cinder_spec.rb

7
manifests/backend/multistore/cinder.pp

@ -65,6 +65,10 @@
# (optional) Sets the keystone region to use.
# Defaults to 'RegionOne'.
#
# [*cinder_volume_type*]
# (Optional) The volume type to be used to create image volumes in cinder.
# Defaults to $::os_service_default.
#
# [*cinder_enforce_multipath*]
# (optional) Enforce multipath usage when attaching a cinder volume
# Defaults to $::os_service_default.
@ -89,6 +93,7 @@ define glance::backend::multistore::cinder(
$cinder_store_user_name = $::os_service_default,
$cinder_store_password = $::os_service_default,
$cinder_os_region_name = 'RegionOne',
$cinder_volume_type = $::os_service_default,
$cinder_enforce_multipath = $::os_service_default,
$cinder_use_multipath = $::os_service_default,
$store_description = $::os_service_default,
@ -110,6 +115,7 @@ define glance::backend::multistore::cinder(
"${name}/cinder_store_user_name": value => $cinder_store_user_name;
"${name}/cinder_store_password": value => $cinder_store_password;
"${name}/cinder_os_region_name": value => $cinder_os_region_name_real;
"${name}/cinder_volume_type": value => $cinder_volume_type;
"${name}/cinder_enforce_multipath": value => $cinder_enforce_multipath;
"${name}/cinder_use_multipath": value => $cinder_use_multipath;
"${name}/store_description": value => $store_description;
@ -125,6 +131,7 @@ define glance::backend::multistore::cinder(
"${name}/cinder_store_project_name": value => $cinder_store_project_name;
"${name}/cinder_store_user_name": value => $cinder_store_user_name;
"${name}/cinder_os_region_name": value => $cinder_os_region_name_real;
"${name}/cinder_volume_type": value => $cinder_volume_type;
"${name}/cinder_enforce_multipath": value => $cinder_enforce_multipath;
"${name}/cinder_use_multipath": value => $cinder_use_multipath;
"${name}/cinder_store_password": value => $cinder_store_password;

5
releasenotes/notes/add_cinder_volume_type_for_multiple_cinder_stores-c19b0bb1c753715b.yaml

@ -0,0 +1,5 @@
---
features:
- |
Add 'cinder_volume_type' configuration parameter to allow cinder
stores to specify a volume type for each cinder store.

5
spec/defines/glance_backend_multistore_cinder_spec.rb

@ -41,6 +41,7 @@ describe 'glance::backend::multistore::cinder' do
is_expected.to contain_glance_api_config('cinder/cinder_store_user_name').with_value('<SERVICE DEFAULT>')
is_expected.to contain_glance_api_config('cinder/cinder_store_password').with_value('<SERVICE DEFAULT>')
is_expected.to contain_glance_api_config('cinder/cinder_os_region_name').with_value('RegionOne')
is_expected.to contain_glance_api_config('cinder/cinder_volume_type').with_value('<SERVICE DEFAULT>')
is_expected.to contain_glance_api_config('cinder/cinder_enforce_multipath').with_value('<SERVICE DEFAULT>')
is_expected.to contain_glance_api_config('cinder/cinder_use_multipath').with_value('<SERVICE DEFAULT>')
end
@ -56,6 +57,7 @@ describe 'glance::backend::multistore::cinder' do
is_expected.to contain_glance_cache_config('cinder/cinder_store_user_name').with_value('<SERVICE DEFAULT>')
is_expected.to contain_glance_cache_config('cinder/cinder_store_password').with_value('<SERVICE DEFAULT>')
is_expected.to contain_glance_cache_config('cinder/cinder_os_region_name').with_value('RegionOne')
is_expected.to contain_glance_cache_config('cinder/cinder_volume_type').with_value('<SERVICE DEFAULT>')
is_expected.to contain_glance_cache_config('cinder/cinder_enforce_multipath').with_value('<SERVICE DEFAULT>')
is_expected.to contain_glance_cache_config('cinder/cinder_use_multipath').with_value('<SERVICE DEFAULT>')
end
@ -75,6 +77,7 @@ describe 'glance::backend::multistore::cinder' do
:cinder_store_user_name => 'glance',
:cinder_store_password => 'glance',
:cinder_os_region_name => 'RegionTwo',
:cinder_volume_type => 'glance-fast',
:cinder_enforce_multipath => true,
:cinder_use_multipath => true,
}
@ -91,6 +94,7 @@ describe 'glance::backend::multistore::cinder' do
is_expected.to contain_glance_api_config('cinder/cinder_store_user_name').with_value('glance')
is_expected.to contain_glance_api_config('cinder/cinder_store_password').with_value('glance')
is_expected.to contain_glance_api_config('cinder/cinder_os_region_name').with_value('RegionTwo')
is_expected.to contain_glance_api_config('cinder/cinder_volume_type').with_value('glance-fast')
is_expected.to contain_glance_api_config('cinder/cinder_enforce_multipath').with_value(true)
is_expected.to contain_glance_api_config('cinder/cinder_use_multipath').with_value(true)
end
@ -106,6 +110,7 @@ describe 'glance::backend::multistore::cinder' do
is_expected.to contain_glance_cache_config('cinder/cinder_store_user_name').with_value('glance')
is_expected.to contain_glance_cache_config('cinder/cinder_store_password').with_value('glance')
is_expected.to contain_glance_cache_config('cinder/cinder_os_region_name').with_value('RegionTwo')
is_expected.to contain_glance_cache_config('cinder/cinder_volume_type').with_value('glance-fast')
is_expected.to contain_glance_cache_config('cinder/cinder_enforce_multipath').with_value(true)
is_expected.to contain_glance_cache_config('cinder/cinder_use_multipath').with_value(true)
end

Loading…
Cancel
Save