# # Copyright (C) 2014 eNovance SAS # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. # # Configure GlusterFS backend for Cinder # # === Parameters # # [*glusterfs_shares*] # (required) An array of GlusterFS volume locations. # Must be an array even if there is only one volume. # # [*volume_backend_name*] # (optional) Allows for the volume_backend_name to be separate of $name. # Defaults to: $name # # [*glusterfs_sparsed_volumes*] # (optional) Whether or not to use sparse (thin) volumes. # Defaults to undef which uses the driver's default of "true". # # [*glusterfs_mount_point_base*] # (optional) Where to mount the Gluster volumes. # Defaults to undef which uses the driver's default of "$state_path/mnt". # # [*glusterfs_shares_config*] # (optional) The config file to store the given $glusterfs_shares. # Defaults to '/etc/cinder/shares.conf' # define cloud::volume::backend::glusterfs ( $glusterfs_shares, $volume_backend_name = $name, $glusterfs_sparsed_volumes = undef, $glusterfs_mount_point_base = undef, $glusterfs_shares_config = '/etc/cinder/shares.conf' ) { cinder::backend::glusterfs { $name: glusterfs_shares => $glusterfs_shares, glusterfs_sparsed_volumes => $glusterfs_sparsed_volumes, glusterfs_mount_point_base => $glusterfs_mount_point_base, glusterfs_shares_config => $glusterfs_shares_config, } @cinder::type { $volume_backend_name: set_key => 'volume_backend_name', set_value => $volume_backend_name, notify => Service['cinder-volume'] } }