[Devstack] Create additional custom share types by default
They are useful for case we install several back ends with different drivers, their modes and capabilities. New share types have fixed names based on driver modes: - dhss_true - dhss_false It is possible to define their extra specs using following env vars: - MANILA_DHSS_TRUE_SHARE_TYPE_EXTRA_SPECS - MANILA_DHSS_FALSE_SHARE_TYPE_EXTRA_SPECS that defaults to existing following env var: - MANILA_DEFAULT_SHARE_TYPE_EXTRA_SPECS Use case in CI: we are able to use more than one predefined share_type in tempest and rally tests. Change-Id: I7278a897bb89f0562e1eda449b725d965cb10566
This commit is contained in:
parent
08285a764d
commit
e77cf5bdaf
@ -486,6 +486,19 @@ function create_default_share_type {
|
||||
fi
|
||||
}
|
||||
|
||||
# create_custom_share_types - create share types suitable for both possible
|
||||
# driver modes with names "dhss_true" and "dhss_false".
|
||||
function create_custom_share_types {
|
||||
manila type-create dhss_true True
|
||||
if [[ $MANILA_DHSS_TRUE_SHARE_TYPE_EXTRA_SPECS ]]; then
|
||||
manila type-key dhss_true set $MANILA_DHSS_TRUE_SHARE_TYPE_EXTRA_SPECS
|
||||
fi
|
||||
|
||||
manila type-create dhss_false False
|
||||
if [[ $MANILA_DHSS_FALSE_SHARE_TYPE_EXTRA_SPECS ]]; then
|
||||
manila type-key dhss_false set $MANILA_DHSS_FALSE_SHARE_TYPE_EXTRA_SPECS
|
||||
fi
|
||||
}
|
||||
|
||||
# configure_backing_file - Set up backing file for LVM
|
||||
function configure_backing_file {
|
||||
@ -915,6 +928,9 @@ elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
|
||||
echo_summary "Creating Manila default share type"
|
||||
create_default_share_type
|
||||
|
||||
echo_summary "Creating Manila custom share types"
|
||||
create_custom_share_types
|
||||
|
||||
echo_summary "Update Tempest config"
|
||||
update_tempest
|
||||
|
||||
|
@ -61,8 +61,9 @@ MANILA_DEFAULT_SHARE_TYPE=${MANILA_DEFAULT_SHARE_TYPE:-default}
|
||||
# MANILA_DEFAULT_SHARE_TYPE_EXTRA_SPECS='foo=bar quuz=xyzzy'
|
||||
# MANILA_DEFAULT_SHARE_TYPE_EXTRA_SPECS='foo=bar quuz=xyzzy fakeprefix:baz=waldo'
|
||||
|
||||
|
||||
MANILA_DEFAULT_SHARE_TYPE_EXTRA_SPECS=${MANILA_DEFAULT_SHARE_TYPE_EXTRA_SPECS:-''}
|
||||
MANILA_DHSS_TRUE_SHARE_TYPE_EXTRA_SPECS=${MANILA_DHSS_TRUE_SHARE_TYPE_EXTRA_SPECS:-$MANILA_DEFAULT_SHARE_TYPE_EXTRA_SPECS}
|
||||
MANILA_DHSS_FALSE_SHARE_TYPE_EXTRA_SPECS=${MANILA_DHSS_FALSE_SHARE_TYPE_EXTRA_SPECS:-$MANILA_DEFAULT_SHARE_TYPE_EXTRA_SPECS}
|
||||
|
||||
# Public facing bits
|
||||
MANILA_SERVICE_HOST=${MANILA_SERVICE_HOST:-$SERVICE_HOST}
|
||||
|
Loading…
Reference in New Issue
Block a user