Files
puppet-openstack/manifests/cinder/storage.pp
Daneyon Hansen b4aa935eac refactor of cinder manifests
This commit refactors the cinder manifests to make
them more consistent with other manifests:

* removed default value for keystone_password
* removed the prefix cinder_ from class parameters
(it is redundant)
* set package_ensure defaults to present
* removed extra package_ensure parameter
* changed $iscsi_enabled to $volume_driver (this
change is being done in anticipation of needing
additional volume drivers)
* add test coverage
* simple updates to .gitignore
* refactor sql_connection to be composed of multiple class paramters
for consistency.

It also delete the openstack::cinder class b/c
I could not seem to declare ::cinder while it
existed.

Change-Id: I4a7b49d95957675be82c3b77958ae9d0c47eb4fa
2013-05-14 13:35:48 -07:00

51 lines
1.5 KiB
Puppet

class openstack::cinder::storage(
$sql_connection,
$rabbit_password,
$rabbit_userid = 'guest',
$rabbit_host = '127.0.0.1',
$rabbit_hosts = undef,
$rabbit_port = '5672',
$rabbit_virtual_host = '/',
$package_ensure = 'present',
$api_paste_config = '/etc/cinder/api-paste.ini',
$volume_package_ensure = 'present',
$volume_group = 'cinder-volumes',
$enabled = true,
$volume_driver = 'iscsi',
$iscsi_ip_address = '127.0.0.1',
$setup_test_volume = false,
$verbose = false
) {
class {'::cinder':
sql_connection => $sql_connection,
rabbit_userid => $rabbit_userid,
rabbit_password => $rabbit_password,
rabbit_host => $rabbit_host,
rabbit_port => $rabbit_port,
rabbit_hosts => $rabbit_hosts,
rabbit_virtual_host => $rabbit_virtual_host,
package_ensure => $package_ensure,
api_paste_config => $api_paste_config,
verbose => $verbose,
}
class { '::cinder::volume':
package_ensure => $volume_package_ensure,
enabled => $enabled,
}
if $volume_driver == 'iscsi' {
class { 'cinder::volume::iscsi':
iscsi_ip_address => $iscsi_ip_address,
volume_group => $volume_group,
}
if $setup_test_volume {
class {'::cinder::setup_test_volume':}
}
} else {
warning("Unsupported volume driver: ${volume_driver}, make sure you are configuring this yourself")
}
}