Alex Schultz b888256cf0 Add additional backend options for cinder
The following change adds the ability to configure the following
options for backends and volumes:

For dellsc_iscsi:
 + dell_sc_verify_cert

For glusterfs:
 + glusterfs_backup_mount_point
 + glusterfs_backup_share

For nfs:
 + nfs_mount_attempts

For rbd:
 + rados_connect_timeout
 + rados_connection_interval
 + rados_connection_retries
 + rbd_store_chunk_size

For glusterfs we are also removing the deprecated glusterfs_disk_util
which was removed in Icehouse.

Change-Id: I08dd7dbc9ad51d40a64a25119ca8692c068ca80c
2015-12-18 22:09:07 +00:00

81 lines
2.6 KiB
Puppet

# == Class: cinder::volume::nfs
#
#
# === Parameters
#
# [*nfs_servers*]
# (Required) Description
# Defaults to '[]'
#
# [*nfs_mount_attempts*]
# (optional) The number of attempts to mount nfs shares before raising an
# error. At least one attempt will be made to mount an nfs share, regardless
# of the value specified.
# Defaults to $::os_service_default
#
# [*nfs_mount_options*]
# (Optional) Mount options passed to the nfs client.
# Defaults to $::os_service_default.
#
# [*nfs_disk_util*]
# (Optional) TODO
# Defaults to $::os_service_default.
#
# [*nfs_sparsed_volumes*]
# (Optional) Create volumes as sparsed files which take no space.
# If set to False volume is created as regular file.
# In such case volume creation takes a lot of time.
# Defaults to $::os_service_default.
#
# [*nfs_mount_point_base*]
# (Optional) Base dir containing mount points for nfs shares.
# Defaults to $::os_service_default.
#
# [*nfs_shares_config*]
# (Optional) File with the list of available nfs shares.
# Defaults to '/etc/cinder/shares.conf'.
#
# [*nfs_used_ratio*]
# (Optional) Percent of ACTUAL usage of the underlying volume before no new
# volumes can be allocated to the volume destination.
# Defaults to $::os_service_default.
#
# [*nfs_oversub_ratio*]
# (Optional) This will compare the allocated to available space on the volume
# destination. If the ratio exceeds this number, the destination will no
# longer be valid.
# Defaults to $::os_service_default.
#
# [*extra_options*]
# (optional) Hash of extra options to pass to the backend stanza
# Defaults to: {}
# Example :
# { 'nfs_backend/param1' => { 'value' => value1 } }
#
class cinder::volume::nfs (
$nfs_servers = [],
$nfs_mount_attempts = $::os_service_default,
$nfs_mount_options = $::os_service_default,
$nfs_disk_util = $::os_service_default,
$nfs_sparsed_volumes = $::os_service_default,
$nfs_mount_point_base = $::os_service_default,
$nfs_shares_config = '/etc/cinder/shares.conf',
$nfs_used_ratio = $::os_service_default,
$nfs_oversub_ratio = $::os_service_default,
$extra_options = {},
) {
cinder::backend::nfs { 'DEFAULT':
nfs_servers => $nfs_servers,
nfs_mount_attempts => $nfs_mount_attempts,
nfs_mount_options => $nfs_mount_options,
nfs_disk_util => $nfs_disk_util,
nfs_sparsed_volumes => $nfs_sparsed_volumes,
nfs_mount_point_base => $nfs_mount_point_base,
nfs_shares_config => $nfs_shares_config,
nfs_used_ratio => $nfs_used_ratio,
nfs_oversub_ratio => $nfs_oversub_ratio,
extra_options => $extra_options,
}
}