
* Create class cinder::backend. Sets DEFAULT/enabled_backends * Create define cinder::type. multip-purpose function to create type and optionally set extened information. * Create define cinder::type_set. multi-purpose set function to set extended information. * Copy rbd, iscsi, and nfs volume providers to support multi-backend Now provided as cinder::backend::<driver> to ensure that multi-backend aware resource is|[ not] used. * Add rspec for new parts to ensure expected function. Blueprint: cinder-volume-multi-backend Change-Id: I6df9cadaad3b9ce2ab4b0e87dba9b5056459db10
36 lines
1.1 KiB
Puppet
36 lines
1.1 KiB
Puppet
# ==define cinder::backend::nfs
|
|
#
|
|
# ===Paramiters
|
|
# [*volume_backend_name*]
|
|
# (optional) Allows for the volume_backend_name to be separate of $name.
|
|
# Defaults to: $name
|
|
#
|
|
#
|
|
define cinder::backend::nfs (
|
|
$volume_backend_name = $name,
|
|
$nfs_servers = [],
|
|
$nfs_mount_options = undef,
|
|
$nfs_disk_util = undef,
|
|
$nfs_sparsed_volumes = undef,
|
|
$nfs_mount_point_base = undef,
|
|
$nfs_shares_config = '/etc/cinder/shares.conf'
|
|
) {
|
|
|
|
file {$nfs_shares_config:
|
|
content => join($nfs_servers, "\n"),
|
|
require => Package['cinder'],
|
|
notify => Service['cinder-volume']
|
|
}
|
|
|
|
cinder_config {
|
|
"${name}/volume_backend_name": value => $volume_backend_name;
|
|
"${name}/volume_driver": value =>
|
|
'cinder.volume.drivers.nfs.NfsDriver';
|
|
"${name}/nfs_shares_config": value => $nfs_shares_config;
|
|
"${name}/nfs_mount_options": value => $nfs_mount_options;
|
|
"${name}/nfs_disk_util": value => $nfs_disk_util;
|
|
"${name}/nfs_sparsed_volumes": value => $nfs_sparsed_volumes;
|
|
"${name}/nfs_mount_point_base": value => $nfs_mount_point_base;
|
|
}
|
|
}
|