]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/cinder/manifests/backend/nexenta.pp
try again, with puppetforge modules, correctly included now
[dsa-puppet.git] / 3rdparty / modules / cinder / manifests / backend / nexenta.pp
1 # == Class: cinder::backend::nexenta
2 #
3 # Setups Cinder with Nexenta volume driver.
4 #
5 # === Parameters
6 #
7 # [*nexenta_user*]
8 #   (required) User name to connect to Nexenta SA.
9 #
10 # [*nexenta_password*]
11 #   (required) Password to connect to Nexenta SA.
12 #
13 # [*nexenta_host*]
14 #   (required) IP address of Nexenta SA.
15 #
16 # [*volume_backend_name*]
17 #   (optional) Allows for the volume_backend_name to be separate of $name.
18 #   Defaults to: $name
19 #
20 # [*nexenta_volume*]
21 #   (optional) Pool on SA that will hold all volumes. Defaults to 'cinder'.
22 #
23 # [*nexenta_target_prefix*]
24 #   (optional) IQN prefix for iSCSI targets. Defaults to 'iqn:'.
25 #
26 # [*nexenta_target_group_prefix*]
27 #   (optional) Prefix for iSCSI target groups on SA. Defaults to 'cinder/'.
28 #
29 # [*nexenta_blocksize*]
30 #   (optional) Block size for volumes. Defaults to '8k'.
31 #
32 # [*nexenta_sparse*]
33 #   (optional) Flag to create sparse volumes. Defaults to true.
34 #
35 define cinder::backend::nexenta (
36   $nexenta_user,
37   $nexenta_password,
38   $nexenta_host,
39   $volume_backend_name          = $name,
40   $nexenta_volume               = 'cinder',
41   $nexenta_target_prefix        = 'iqn:',
42   $nexenta_target_group_prefix  = 'cinder/',
43   $nexenta_blocksize            = '8k',
44   $nexenta_sparse               = true
45 ) {
46
47   cinder_config {
48     "${name}/volume_backend_name":         value => $volume_backend_name;
49     "${name}/nexenta_user":                value => $nexenta_user;
50     "${name}/nexenta_password":            value => $nexenta_password, secret => true;
51     "${name}/nexenta_host":                value => $nexenta_host;
52     "${name}/nexenta_volume":              value => $nexenta_volume;
53     "${name}/nexenta_target_prefix":       value => $nexenta_target_prefix;
54     "${name}/nexenta_target_group_prefix": value => $nexenta_target_group_prefix;
55     "${name}/nexenta_blocksize":           value => $nexenta_blocksize;
56     "${name}/nexenta_sparse":              value => $nexenta_sparse;
57     "${name}/volume_driver":               value => 'cinder.volume.drivers.nexenta.volume.NexentaDriver';
58   }
59 }