File: quota.pp

package info (click to toggle)
puppet-module-cinder 27.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,512 kB
  • sloc: ruby: 6,697; python: 33; sh: 10; makefile: 10
file content (56 lines) | stat: -rw-r--r-- 1,971 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# == Class: cinder::quota
#
# Setup and configure Cinder quotas.
#
# === Parameters
#
# [*quota_volumes*]
#   (Optional) Number of volumes allowed per project.
#   Defaults to $facts['os_service_default']
#
# [*quota_snapshots*]
#   (Optional) Number of volume snapshots allowed per project.
#   Defaults to $facts['os_service_default']
#
# [*quota_gigabytes*]
#   (Optional) Number of volume gigabytes (snapshots are also included)
#   allowed per project.
#   Defaults to $facts['os_service_default'].
#
# [*quota_backups*]
#   (Optional) Number of volume backups allowed per project.
#   Defaults to $facts['os_service_default'].
#
# [*quota_backup_gigabytes*]
#   (Optional) Number of backup gigabytes allowed per project.
#   Defaults to $facts['os_service_default'].
#
# [*quota_driver*]
#   (Optional) Default driver to use for quota checks.
#   Defaults to $facts['os_service_default'].
#
# [*per_volume_size_limit*]
#   (Optional) Max size allowed per volume, in gigabytes
#   Defaults to $facts['os_service_default'].
#
class cinder::quota (
  $quota_volumes          = $facts['os_service_default'],
  $quota_snapshots        = $facts['os_service_default'],
  $quota_gigabytes        = $facts['os_service_default'],
  $quota_backups          = $facts['os_service_default'],
  $quota_backup_gigabytes = $facts['os_service_default'],
  $quota_driver           = $facts['os_service_default'],
  $per_volume_size_limit  = $facts['os_service_default'],
) {
  include cinder::deps

  cinder_config {
    'DEFAULT/quota_volumes':          value => $quota_volumes;
    'DEFAULT/quota_snapshots':        value => $quota_snapshots;
    'DEFAULT/quota_gigabytes':        value => $quota_gigabytes;
    'DEFAULT/quota_backups':          value => $quota_backups;
    'DEFAULT/quota_backup_gigabytes': value => $quota_backup_gigabytes;
    'DEFAULT/quota_driver':           value => $quota_driver;
    'DEFAULT/per_volume_size_limit':  value => $per_volume_size_limit;
  }
}