Puppet Class: manila::quota

Defined in:
manifests/quota.pp

Overview

Class: manila::quota

Setup and configure Manila quotas.

Parameters

shares

(optional) Number of shares allowed per project. Defaults to $facts.

snapshots

(optional) Number of share snapshots allowed per project. Defaults to $facts.

gigabytes

(optional) Number of share gigabytes (snapshots are also included) allowed per project. Defaults to $facts.

snapshot_gigabytes

(optional) Number of snapshot gigabytes allowed per project. Defaults to $facts.

per_share_gigabytes

(optional) Max size allowed per share, in gigabytes. Defaults to $facts.

share_networks

(optional) Number of share-networks allowed per project. Defaults to $facts.

share_replicas

(optional) Number of share-replicas allowed per project. Defaults to $facts.

replica_gigabytes

(optional) Number of replica gigabytes allowed per project. Defaults to $facts.

backups

(optional) Number of share backups allowed per project. Defaults to $facts.

backup_gigabytes

(optional) Total amount of share backups allowed per project. Defaults to $facts.

driver

(optional) Default driver to use for quota checks. Defaults to $facts.

reservation_expire

(optional) Number of seconds until a reservation expires. Defaults to $facts.

until_refresh

(optional) Count of reservations until usage is refreshed. Defaults to $facts.

max_age

(optional) Number of seconds between subsequent usage refreshes. Defaults to $:os_service_default.

Parameters:

  • shares (Any) (defaults to: $facts['os_service_default'])
  • snapshots (Any) (defaults to: $facts['os_service_default'])
  • gigabytes (Any) (defaults to: $facts['os_service_default'])
  • snapshot_gigabytes (Any) (defaults to: $facts['os_service_default'])
  • per_share_gigabytes (Any) (defaults to: $facts['os_service_default'])
  • share_networks (Any) (defaults to: $facts['os_service_default'])
  • share_replicas (Any) (defaults to: $facts['os_service_default'])
  • replica_gigabytes (Any) (defaults to: $facts['os_service_default'])
  • backups (Any) (defaults to: $facts['os_service_default'])
  • backup_gigabytes (Any) (defaults to: $facts['os_service_default'])
  • driver (Any) (defaults to: $facts['os_service_default'])
  • reservation_expire (Any) (defaults to: $facts['os_service_default'])
  • until_refresh (Any) (defaults to: $facts['os_service_default'])
  • max_age (Any) (defaults to: $facts['os_service_default'])


63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'manifests/quota.pp', line 63

class manila::quota (
  $shares              = $facts['os_service_default'],
  $snapshots           = $facts['os_service_default'],
  $gigabytes           = $facts['os_service_default'],
  $snapshot_gigabytes  = $facts['os_service_default'],
  $per_share_gigabytes = $facts['os_service_default'],
  $share_networks      = $facts['os_service_default'],
  $share_replicas      = $facts['os_service_default'],
  $replica_gigabytes   = $facts['os_service_default'],
  $backups             = $facts['os_service_default'],
  $backup_gigabytes    = $facts['os_service_default'],
  $driver              = $facts['os_service_default'],
  $reservation_expire  = $facts['os_service_default'],
  $until_refresh       = $facts['os_service_default'],
  $max_age             = $facts['os_service_default'],
) {

  include manila::deps

  manila_config {
    'quota/shares':              value => $shares;
    'quota/snapshots':           value => $snapshots;
    'quota/gigabytes':           value => $gigabytes;
    'quota/per_share_gigabytes': value => $per_share_gigabytes;
    'quota/snapshot_gigabytes':  value => $snapshot_gigabytes;
    'quota/share_networks':      value => $share_networks;
    'quota/share_replicas':      value => $share_replicas;
    'quota/replica_gigabytes':   value => $replica_gigabytes;
    'quota/backups':             value => $backups;
    'quota/backup_gigabytes':    value => $backup_gigabytes;
    'quota/driver':              value => $driver;
    'quota/reservation_expire':  value => $reservation_expire;
    'quota/until_refresh':       value => $until_refresh;
    'quota/max_age':             value => $max_age;
  }
}