memcached (openstack) is no longer in use
[mirror/dsa-puppet.git] / 3rdparty / modules / cinder / manifests / backend / san.pp
1 # == Class: cinder::backend::san
2 #
3 # Configures Cinder volume SAN driver.
4 # Parameters are particular to each volume driver.
5 #
6 # === Parameters
7 #
8 # [*volume_driver*]
9 #   (required) Setup cinder-volume to use volume driver.
10 #
11 # [*volume_backend_name*]
12 #   (optional) Allows for the volume_backend_name to be separate of $name.
13 #   Defaults to: $name
14 #
15 # [*san_thin_provision*]
16 #   (optional) Use thin provisioning for SAN volumes? Defaults to true.
17 #
18 # [*san_ip*]
19 #   (optional) IP address of SAN controller.
20 #
21 # [*san_login*]
22 #   (optional) Username for SAN controller. Defaults to 'admin'.
23 #
24 # [*san_password*]
25 #   (optional) Password for SAN controller.
26 #
27 # [*san_private_key*]
28 #   (optional) Filename of private key to use for SSH authentication.
29 #
30 # [*san_clustername*]
31 #   (optional) Cluster name to use for creating volumes.
32 #
33 # [*san_ssh_port*]
34 #   (optional) SSH port to use with SAN. Defaults to 22.
35 #
36 # [*san_is_local*]
37 #   (optional) Execute commands locally instead of over SSH
38 #   use if the volume service is running on the SAN device.
39 #
40 # [*ssh_conn_timeout*]
41 #   (optional) SSH connection timeout in seconds. Defaults to 30.
42 #
43 # [*ssh_min_pool_conn*]
44 #   (optional) Minimum ssh connections in the pool.
45 #
46 # [*ssh_min_pool_conn*]
47 #   (optional) Maximum ssh connections in the pool.
48 #
49 define cinder::backend::san (
50   $volume_driver,
51   $volume_backend_name = $name,
52   $san_thin_provision  = true,
53   $san_ip              = undef,
54   $san_login           = 'admin',
55   $san_password        = undef,
56   $san_private_key     = undef,
57   $san_clustername     = undef,
58   $san_ssh_port        = 22,
59   $san_is_local        = false,
60   $ssh_conn_timeout    = 30,
61   $ssh_min_pool_conn   = 1,
62   $ssh_max_pool_conn   = 5
63 ) {
64
65   cinder_config {
66     "${name}/volume_backend_name": value => $volume_backend_name;
67     "${name}/volume_driver":       value => $volume_driver;
68     "${name}/san_thin_provision":  value => $san_thin_provision;
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_private_key":     value => $san_private_key;
73     "${name}/san_clustername":     value => $san_clustername;
74     "${name}/san_ssh_port":        value => $san_ssh_port;
75     "${name}/san_is_local":        value => $san_is_local;
76     "${name}/ssh_conn_timeout":    value => $ssh_conn_timeout;
77     "${name}/ssh_min_pool_conn":   value => $ssh_min_pool_conn;
78     "${name}/ssh_max_pool_conn":   value => $ssh_max_pool_conn;
79   }
80 }