memcached (openstack) is no longer in use
[mirror/dsa-puppet.git] / 3rdparty / modules / cinder / manifests / backend / eqlx.pp
1 # == define: cinder::backend::eqlx
2 #
3 # Configure the Dell EqualLogic driver for cinder.
4 #
5 # === Parameters
6 #
7 # [*san_ip*]
8 #   (required) The IP address of the Dell EqualLogic array.
9 #
10 # [*san_login*]
11 #   (required) The account to use for issuing SSH commands.
12 #
13 # [*san_password*]
14 #   (required) The password for the specified SSH account.
15 #
16 # [*san_thin_provision*]
17 #   (optional) Whether or not to use thin provisioning for volumes.
18 #   Defaults to true
19 #
20 # [*volume_backend_name*]
21 #   (optional) The backend name.
22 #   Defaults to the name of the resource
23 #
24 # [*eqlx_group_name*]
25 #   (optional) The CLI prompt message without '>'.
26 #   Defaults to 'group-0'
27 #
28 # [*eqlx_pool*]
29 #   (optional) The pool in which volumes will be created.
30 #   Defaults to 'default'
31 #
32 # [*eqlx_use_chap*]
33 #   (optional) Use CHAP authentification for targets?
34 #   Defaults to false
35 #
36 # [*eqlx_chap_login*]
37 #   (optional) An existing CHAP account name.
38 #   Defaults to 'chapadmin'
39 #
40 # [*eqlx_chap_password*]
41 #   (optional) The password for the specified CHAP account name.
42 #   Defaults to '12345'
43 #
44 # [*eqlx_cli_timeout*]
45 #   (optional) The timeout for the Group Manager cli command execution.
46 #   Defaults to 30 seconds
47 #
48 # [*eqlx_cli_max_retries*]
49 #   (optional) The maximum retry count for reconnection.
50 #   Defaults to 5
51 #
52 define cinder::backend::eqlx (
53   $san_ip,
54   $san_login,
55   $san_password,
56   $san_thin_provision   = true,
57   $volume_backend_name  = $name,
58   $eqlx_group_name      = 'group-0',
59   $eqlx_pool            = 'default',
60   $eqlx_use_chap        = false,
61   $eqlx_chap_login      = 'chapadmin',
62   $eqlx_chap_password   = '12345',
63   $eqlx_cli_timeout     = 30,
64   $eqlx_cli_max_retries = 5,
65 ) {
66   cinder_config {
67     "${name}/volume_backend_name":  value => $volume_backend_name;
68     "${name}/volume_driver":        value => 'cinder.volume.drivers.eqlx.DellEQLSanISCSIDriver';
69     "${name}/san_ip":               value => $san_ip;
70     "${name}/san_login":            value => $san_login;
71     "${name}/san_password":         value => $san_password, secret => true;
72     "${name}/san_thin_provision":   value => $san_thin_provision;
73     "${name}/eqlx_group_name":      value => $eqlx_group_name;
74     "${name}/eqlx_use_chap":        value => $eqlx_use_chap;
75     "${name}/eqlx_cli_timeout":     value => $eqlx_cli_timeout;
76     "${name}/eqlx_cli_max_retries": value => $eqlx_cli_max_retries;
77     "${name}/eqlx_pool":            value => $eqlx_pool;
78   }
79
80   if(str2bool($eqlx_use_chap)) {
81     cinder_config {
82       "${name}/eqlx_chap_login":      value => $eqlx_chap_login;
83       "${name}/eqlx_chap_password":   value => $eqlx_chap_password, secret => true;
84     }
85   }
86 }