Merge "Storage availability zone support"
This commit is contained in:
@@ -69,6 +69,16 @@
|
|||||||
# Tested versions include 0.9 and 2.2
|
# Tested versions include 0.9 and 2.2
|
||||||
# Defaults to '0.9'
|
# Defaults to '0.9'
|
||||||
#
|
#
|
||||||
|
# [*storage_availability_zone*]
|
||||||
|
# (optional) Availability zone of the node.
|
||||||
|
# Defaults to 'nova'
|
||||||
|
#
|
||||||
|
# [*default_availability_zone*]
|
||||||
|
# (optional) Default availability zone for new volumes.
|
||||||
|
# If not set, the storage_availability_zone option value is used as
|
||||||
|
# the default for new volumes.
|
||||||
|
# Defaults to false
|
||||||
|
#
|
||||||
# [sql_connection]
|
# [sql_connection]
|
||||||
# DEPRECATED
|
# DEPRECATED
|
||||||
# [sql_idle_timeout]
|
# [sql_idle_timeout]
|
||||||
@@ -117,6 +127,8 @@ class cinder (
|
|||||||
$verbose = false,
|
$verbose = false,
|
||||||
$debug = false,
|
$debug = false,
|
||||||
$mysql_module = '0.9',
|
$mysql_module = '0.9',
|
||||||
|
$storage_availability_zone = 'nova',
|
||||||
|
$default_availability_zone = false,
|
||||||
# DEPRECATED PARAMETERS
|
# DEPRECATED PARAMETERS
|
||||||
$sql_connection = undef,
|
$sql_connection = undef,
|
||||||
$sql_idle_timeout = undef,
|
$sql_idle_timeout = undef,
|
||||||
@@ -269,13 +281,21 @@ class cinder (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ! $default_availability_zone {
|
||||||
|
$default_availability_zone_real = $storage_availability_zone
|
||||||
|
} else {
|
||||||
|
$default_availability_zone_real = $default_availability_zone
|
||||||
|
}
|
||||||
|
|
||||||
cinder_config {
|
cinder_config {
|
||||||
'database/connection': value => $database_connection_real, secret => true;
|
'database/connection': value => $database_connection_real, secret => true;
|
||||||
'database/idle_timeout': value => $database_idle_timeout_real;
|
'database/idle_timeout': value => $database_idle_timeout_real;
|
||||||
'DEFAULT/verbose': value => $verbose;
|
'DEFAULT/verbose': value => $verbose;
|
||||||
'DEFAULT/debug': value => $debug;
|
'DEFAULT/debug': value => $debug;
|
||||||
'DEFAULT/api_paste_config': value => $api_paste_config;
|
'DEFAULT/api_paste_config': value => $api_paste_config;
|
||||||
'DEFAULT/rpc_backend': value => $rpc_backend;
|
'DEFAULT/rpc_backend': value => $rpc_backend;
|
||||||
|
'DEFAULT/storage_availability_zone': value => $storage_availability_zone;
|
||||||
|
'DEFAULT/default_availability_zone': value => $default_availability_zone_real;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($database_connection_real =~ /mysql:\/\/\S+:\S+@\S+\/\S+/) {
|
if($database_connection_real =~ /mysql:\/\/\S+:\S+@\S+\/\S+/) {
|
||||||
|
|||||||
@@ -58,6 +58,12 @@ describe 'cinder' do
|
|||||||
should contain_cinder_config('DEFAULT/debug').with(
|
should contain_cinder_config('DEFAULT/debug').with(
|
||||||
:value => false
|
:value => false
|
||||||
)
|
)
|
||||||
|
should contain_cinder_config('DEFAULT/storage_availability_zone').with(
|
||||||
|
:value => 'nova'
|
||||||
|
)
|
||||||
|
should contain_cinder_config('DEFAULT/default_availability_zone').with(
|
||||||
|
:value => 'nova'
|
||||||
|
)
|
||||||
should contain_cinder_config('DEFAULT/api_paste_config').with(
|
should contain_cinder_config('DEFAULT/api_paste_config').with(
|
||||||
:value => '/etc/cinder/api-paste.ini'
|
:value => '/etc/cinder/api-paste.ini'
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user