1db840c3bdd9dc44aa970e8f832e0a72ec4712cd
[mirror/dsa-puppet.git] / 3rdparty / modules / cinder / manifests / volume / netapp.pp
1 # == Class: cinder::volume::netapp
2 #
3 # Configures Cinder to use the NetApp unified volume driver
4 #
5 # === Parameters
6 #
7 # [*netapp_login*]
8 #   (required) Administrative user account name used to access the storage
9 #   system.
10 #
11 # [*netapp_password*]
12 #   (required) Password for the administrative user account specified in the
13 #   netapp_login parameter.
14 #
15 # [*netapp_server_hostname*]
16 #   (required) The hostname (or IP address) for the storage system.
17 #
18 # [*netapp_server_port*]
19 #   (optional) The TCP port to use for communication with ONTAPI on the
20 #   storage system. Traditionally, port 80 is used for HTTP and port 443 is
21 #   used for HTTPS; however, this value should be changed if an alternate
22 #   port has been configured on the storage system.
23 #   Defaults to 80
24 #
25 # [*netapp_size_multiplier*]
26 #   (optional) The quantity to be multiplied by the requested volume size to
27 #   ensure enough space is available on the virtual storage server (Vserver) to
28 #   fulfill the volume creation request.
29 #   Defaults to 1.2
30 #
31 # [*netapp_storage_family*]
32 #   (optional) The storage family type used on the storage system; valid values
33 #   are ontap_7mode for using Data ONTAP operating in 7-Mode or ontap_cluster
34 #   for using clustered Data ONTAP.
35 #   Defaults to ontap_cluster
36 #
37 # [*netapp_storage_protocol*]
38 #   (optional) The storage protocol to be used on the data path with the storage
39 #   system; valid values are iscsi or nfs.
40 #   Defaults to nfs
41 #
42 # [*netapp_transport_type*]
43 #   (optional) The transport protocol used when communicating with ONTAPI on the
44 #   storage system. Valid values are http or https.
45 #   Defaults to http
46 #
47 # [*netapp_vfiler*]
48 #   (optional) The vFiler unit on which provisioning of block storage volumes
49 #   will be done. This parameter is only used by the driver when connecting to
50 #   an instance with a storage family of Data ONTAP operating in 7-Mode and the
51 #   storage protocol selected is iSCSI. Only use this parameter when utilizing
52 #   the MultiStore feature on the NetApp storage system.
53 #   Defaults to ''
54 #
55 # [*netapp_volume_list*]
56 #   (optional) This parameter is only utilized when the storage protocol is
57 #   configured to use iSCSI. This parameter is used to restrict provisioning to
58 #   the specified controller volumes. Specify the value of this parameter to be
59 #   a comma separated list of NetApp controller volume names to be used for
60 #   provisioning.
61 #   Defaults to ''
62 #
63 # [*netapp_vserver*]
64 #   (optional) This parameter specifies the virtual storage server (Vserver)
65 #   name on the storage cluster on which provisioning of block storage volumes
66 #   should occur. If using the NFS storage protocol, this parameter is mandatory
67 #   for storage service catalog support (utilized by Cinder volume type
68 #   extra_specs support). If this parameter is specified, the exports belonging
69 #   to the Vserver will only be used for provisioning in the future. Block
70 #   storage volumes on exports not belonging to the Vserver specified by
71 #   this parameter will continue to function normally.
72 #   Defaults to ''
73 #
74 # [*expiry_thres_minutes*]
75 #   (optional) This parameter specifies the threshold for last access time for
76 #   images in the NFS image cache. When a cache cleaning cycle begins, images
77 #   in the cache that have not been accessed in the last M minutes, where M is
78 #   the value of this parameter, will be deleted from the cache to create free
79 #   space on the NFS share.
80 #   Defaults to 720
81 #
82 # [*thres_avl_size_perc_start*]
83 #   (optional) If the percentage of available space for an NFS share has
84 #   dropped below the value specified by this parameter, the NFS image cache
85 #   will be cleaned.
86 #   Defaults to 20
87 #
88 # [*thres_avl_size_perc_stop*]
89 #   (optional) When the percentage of available space on an NFS share has reached the
90 #   percentage specified by this parameter, the driver will stop clearing files
91 #   from the NFS image cache that have not been accessed in the last M
92 #   'minutes, where M is the value of the expiry_thres_minutes parameter.
93 #   Defaults to 60
94 #
95 # [*nfs_shares*]
96 #   (optional) Array of NFS exports in the form of host:/share; will be written into
97 #    file specified in nfs_shares_config
98 #    Defaults to undef
99 #
100 # [*nfs_shares_config*]
101 #   (optional) File with the list of available NFS shares
102 #   Defaults to '/etc/cinder/shares.conf'
103 #
104 # [*nfs_mount_options*]
105 #   (optional) Mount options passed to the nfs client. See section
106 #   of the nfs man page for details.
107 #   Defaults to undef
108 #
109 # [*netapp_copyoffload_tool_path*]
110 #   (optional) This option specifies the path of the NetApp Copy Offload tool
111 #   binary. Ensure that the binary has execute permissions set which allow the
112 #   effective user of the cinder-volume process to execute the file.
113 #   Defaults to ''
114 #
115 # [*netapp_controller_ips*]
116 #   (optional) This option is only utilized when the storage family is
117 #   configured to eseries. This option is used to restrict provisioning to the
118 #   specified controllers. Specify the value of this option to be a comma
119 #   separated list of controller hostnames or IP addresses to be used for
120 #   provisioning.
121 #   Defaults to ''
122 #
123 # [*netapp_sa_password*]
124 #   (optional) Password for the NetApp E-Series storage array.
125 #   Defaults to ''
126 #
127 # [*netapp_storage_pools*]
128 #   (optional) This option is used to restrict provisioning to the specified
129 #   storage pools. Only dynamic disk pools are currently supported. Specify the
130 #   value of this option to be a comma separated list of disk pool names to be
131 #   used for provisioning.
132 #   Defaults to ''
133 #
134 # [*netapp_webservice_path*]
135 #   (optional) This option is used to specify the path to the E-Series proxy
136 #   application on a proxy server. The value is combined with the value of the
137 #   netapp_transport_type, netapp_server_hostname, and netapp_server_port
138 #   options to create the URL used by the driver to connect to the proxy
139 #   application.
140 #   Defaults to '/devmgr/v2'
141 #
142 # === Examples
143 #
144 #  class { 'cinder::volume::netapp':
145 #    netapp_login => 'clusterAdmin',
146 #    netapp_password => 'password',
147 #    netapp_server_hostname => 'netapp.mycorp.com',
148 #    netapp_server_port => '443',
149 #    netapp_transport_type => 'https',
150 #    netapp_vserver => 'openstack-vserver',
151 #  }
152 #
153 # === Authors
154 #
155 # Bob Callaway <bob.callaway@netapp.com>
156 #
157 # === Copyright
158 #
159 # Copyright 2013 NetApp, Inc.
160 #
161 class cinder::volume::netapp (
162   $netapp_login,
163   $netapp_password,
164   $netapp_server_hostname,
165   $netapp_server_port           = '80',
166   $netapp_size_multiplier       = '1.2',
167   $netapp_storage_family        = 'ontap_cluster',
168   $netapp_storage_protocol      = 'nfs',
169   $netapp_transport_type        = 'http',
170   $netapp_vfiler                = '',
171   $netapp_volume_list           = '',
172   $netapp_vserver               = '',
173   $expiry_thres_minutes         = '720',
174   $thres_avl_size_perc_start    = '20',
175   $thres_avl_size_perc_stop     = '60',
176   $nfs_shares                   = undef,
177   $nfs_shares_config            = '/etc/cinder/shares.conf',
178   $netapp_copyoffload_tool_path = '',
179   $netapp_controller_ips        = '',
180   $netapp_sa_password           = '',
181   $netapp_storage_pools         = '',
182   $netapp_webservice_path       = '/devmgr/v2',
183   $nfs_mount_options            = undef,
184 ) {
185
186   cinder::backend::netapp { 'DEFAULT':
187     netapp_login                 => $netapp_login,
188     netapp_password              => $netapp_password,
189     netapp_server_hostname       => $netapp_server_hostname,
190     netapp_server_port           => $netapp_server_port,
191     netapp_size_multiplier       => $netapp_size_multiplier,
192     netapp_storage_family        => $netapp_storage_family,
193     netapp_storage_protocol      => $netapp_storage_protocol,
194     netapp_transport_type        => $netapp_transport_type,
195     netapp_vfiler                => $netapp_vfiler,
196     netapp_volume_list           => $netapp_volume_list,
197     netapp_vserver               => $netapp_vserver,
198     expiry_thres_minutes         => $expiry_thres_minutes,
199     thres_avl_size_perc_start    => $thres_avl_size_perc_start,
200     thres_avl_size_perc_stop     => $thres_avl_size_perc_stop,
201     nfs_shares                   => $nfs_shares,
202     nfs_shares_config            => $nfs_shares_config,
203     netapp_copyoffload_tool_path => $netapp_copyoffload_tool_path,
204     netapp_controller_ips        => $netapp_controller_ips,
205     netapp_sa_password           => $netapp_sa_password,
206     netapp_storage_pools         => $netapp_storage_pools,
207     netapp_webservice_path       => $netapp_webservice_path,
208     nfs_mount_options            => $nfs_mount_options,
209   }
210 }