Alex Schultz 1485924dd7 Update cinder backends to use os_service_default
This change updates the cinder backend and volume resources to
leverage the os_service_default fact.

Change-Id: Ibab719d335162439edbd96ac2831047415666d34
2015-12-18 15:08:45 -07:00

58 lines
1.6 KiB
Puppet

# == Class: cinder::volume::iscsi
#
# Configures Cinder volume ISCSI driver.
#
# === Parameters
#
# [*iscsi_ip_address*]
# (Required) The IP address that the iSCSI daemon is listening on
#
# [*volume_driver*]
# (Optional) Driver to use for volume creation
# Defaults to 'cinder.volume.drivers.lvm.LVMVolumeDriver'.
#
# [*volume_group*]
# (Optional) Name for the VG that will contain exported volumes
# Defaults to $::os_service_default.
#
# [*volumes_dir*]
# (Optional) Volume configuration file storage directory
# Defaults to '/var/lib/cinder/volumes'.
#
# [*iscsi_helper*]
# (Optional) iSCSI target user-land tool to use.
# Defaults to '$::cinder::params::iscsi_helper'.
#
# [*iscsi_protocol*]
# (Optional) Protocol to use as iSCSI driver
# Defaults to $::os_service_default.
#
# [*extra_options*]
# (optional) Hash of extra options to pass to the backend stanza
# Defaults to: {}
# Example :
# { 'iscsi_backend/param1' => { 'value' => value1 } }
#
class cinder::volume::iscsi (
$iscsi_ip_address,
$volume_driver = 'cinder.volume.drivers.lvm.LVMVolumeDriver',
$volume_group = $::os_service_default,
$volumes_dir = '/var/lib/cinder/volumes',
$iscsi_helper = $::cinder::params::iscsi_helper,
$iscsi_protocol = $::os_service_default,
$extra_options = {},
) {
include ::cinder::params
cinder::backend::iscsi { 'DEFAULT':
iscsi_ip_address => $iscsi_ip_address,
volume_driver => $volume_driver,
volume_group => $volume_group,
volumes_dir => $volumes_dir,
iscsi_helper => $iscsi_helper,
iscsi_protocol => $iscsi_protocol,
extra_options => $extra_options,
}
}