try again, with puppetforge modules, correctly included now
[mirror/dsa-puppet.git] / 3rdparty / modules / cinder / manifests / backend / vmdk.pp
1 # == define: cinder::backend::vmdk
2 #
3 # Configure the VMware VMDK driver for cinder.
4 #
5 # === Parameters
6 #
7 # [*host_ip*]
8 #   The IP address of the VMware vCenter server.
9 #
10 # [*host_username*]
11 #   The username for connection to VMware vCenter server.
12 #
13 # [*host_password*]
14 #   The password for connection to VMware vCenter server.
15 #
16 # [*volume_backend_name*]
17 #   Used to set the volume_backend_name in multiple backends.
18 #   Defaults to $name as passed in the title.
19 #
20 # [*api_retry_count*]
21 #   (optional) The number of times we retry on failures,
22 #   e.g., socket error, etc.
23 #   Defaults to 10.
24 #
25 # [*$max_object_retrieval*]
26 #   (optional) The maximum number of ObjectContent data objects that should
27 #   be returned in a single result. A positive value will cause
28 #   the operation to suspend the retrieval when the count of
29 #   objects reaches the specified maximum. The server may still
30 #   limit the count to something less than the configured value.
31 #   Any remaining objects may be retrieved with additional requests.
32 #   Defaults to 100.
33 #
34 # [*task_poll_interval*]
35 #   (optional) The interval in seconds used for polling of remote tasks.
36 #   Defaults to 5.
37 #
38 # [*image_transfer_timeout_secs*]
39 #   (optional) The timeout in seconds for VMDK volume transfer between Cinder and Glance.
40 #   Defaults to 7200.
41 #
42 # [*wsdl_location*]
43 #   (optional) VIM Service WSDL Location e.g
44 #   http://<server>/vimService.wsdl. Optional over-ride to
45 #   default location for bug work-arounds.
46 #   Defaults to None.
47 #
48 # [*volume_folder*]
49 #   (optional) The name for the folder in the VC datacenter that will contain cinder volumes.
50 #   Defaults to 'cinder-volumes'.
51 #
52 define cinder::backend::vmdk (
53   $host_ip,
54   $host_username,
55   $host_password,
56   $volume_backend_name         = $name,
57   $volume_folder               = 'cinder-volumes',
58   $api_retry_count             = 10,
59   $max_object_retrieval        = 100,
60   $task_poll_interval          = 5,
61   $image_transfer_timeout_secs = 7200,
62   $wsdl_location               = undef
63   ) {
64
65   cinder_config {
66     "${name}/volume_backend_name":                value => $volume_backend_name;
67     "${name}/volume_driver":                      value => 'cinder.volume.drivers.vmware.vmdk.VMwareVcVmdkDriver';
68     "${name}/vmware_host_ip":                     value => $host_ip;
69     "${name}/vmware_host_username":               value => $host_username;
70     "${name}/vmware_host_password":               value => $host_password, secret => true;
71     "${name}/vmware_volume_folder":               value => $volume_folder;
72     "${name}/vmware_api_retry_count":             value => $api_retry_count;
73     "${name}/vmware_max_object_retrieval":        value => $max_object_retrieval;
74     "${name}/vmware_task_poll_interval":          value => $task_poll_interval;
75     "${name}/vmware_image_transfer_timeout_secs": value => $image_transfer_timeout_secs;
76   }
77
78   if $wsdl_location {
79     cinder_config {
80       "${name}/vmware_wsdl_location":               value => $wsdl_location;
81     }
82   }
83
84   package { 'python-suds':
85     ensure   => present
86   }
87 }