2 # Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
4 # Author: Emilien Macchi <emilien.macchi@enovance.com>
6 # Licensed under the Apache License, Version 2.0 (the "License"); you may
7 # not use this file except in compliance with the License. You may obtain
8 # a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15 # License for the specific language governing permissions and limitations
18 # == Class: cinder::backup
20 # Setup Cinder backup service
25 # (optional) The topic volume backup nodes listen on.
26 # Defaults to 'cinder-backup'
29 # (optional) Full class name for the Manager for volume backup.
30 # Defaults to 'cinder.backup.manager.BackupManager'
32 # [*backup_api_class*]
33 # (optional) The full class name of the volume backup API class.
34 # Defaults to 'cinder.backup.api.API'
36 # [*backup_name_template*]
37 # (optional) Template string to be used to generate backup names.
38 # Defaults to 'backup-%s'
41 class cinder::backup (
43 $package_ensure = 'present',
44 $backup_topic = 'cinder-backup',
45 $backup_manager = 'cinder.backup.manager.BackupManager',
46 $backup_api_class = 'cinder.backup.api.API',
47 $backup_name_template = 'backup-%s'
50 include cinder::params
52 Cinder_config<||> ~> Service['cinder-backup']
54 if $::cinder::params::backup_package {
55 Package['cinder-backup'] -> Cinder_config<||>
56 Package['cinder-backup'] -> Service['cinder-backup']
57 package { 'cinder-backup':
58 ensure => $package_ensure,
59 name => $::cinder::params::backup_package,
69 service { 'cinder-backup':
71 name => $::cinder::params::backup_service,
74 require => Package['cinder'],
78 'DEFAULT/backup_topic': value => $backup_topic;
79 'DEFAULT/backup_manager': value => $backup_manager;
80 'DEFAULT/backup_api_class': value => $backup_api_class;
81 'DEFAULT/backup_name_template': value => $backup_name_template;