2020-09-04 22:05:17 +09:00
|
|
|
# == Class: nova::compute::vmware
|
2013-12-04 12:56:12 -08:00
|
|
|
#
|
|
|
|
# Configure the VMware compute driver for nova.
|
|
|
|
#
|
|
|
|
# === Parameters
|
|
|
|
#
|
|
|
|
# [*host_ip*]
|
|
|
|
# The IP address of the VMware vCenter server.
|
|
|
|
#
|
|
|
|
# [*host_username*]
|
|
|
|
# The username for connection to VMware vCenter server.
|
|
|
|
#
|
|
|
|
# [*host_password*]
|
|
|
|
# The password for connection to VMware vCenter server.
|
|
|
|
#
|
|
|
|
# [*cluster_name*]
|
|
|
|
# The name of a vCenter cluster compute resource.
|
|
|
|
#
|
|
|
|
# [*api_retry_count*]
|
|
|
|
# (optional) The number of times we retry on failures,
|
|
|
|
# e.g., socket error, etc.
|
|
|
|
# Defaults to 5.
|
|
|
|
#
|
|
|
|
# [*maximum_objects*]
|
|
|
|
# (optional) The maximum number of ObjectContent data objects that should
|
|
|
|
# be returned in a single result. A positive value will cause
|
|
|
|
# the operation to suspend the retrieval when the count of
|
|
|
|
# objects reaches the specified maximum. The server may still
|
|
|
|
# limit the count to something less than the configured value.
|
|
|
|
# Any remaining objects may be retrieved with additional requests.
|
|
|
|
# Defaults to 100.
|
|
|
|
#
|
|
|
|
# [*task_poll_interval*]
|
2013-12-26 16:50:03 -08:00
|
|
|
# (optional) The interval in seconds used for polling of remote tasks.
|
2013-12-04 12:56:12 -08:00
|
|
|
# Defaults to 5.0
|
|
|
|
#
|
|
|
|
# [*use_linked_clone*]
|
|
|
|
# (optional) Whether to use linked clone strategy while creating VM's.
|
|
|
|
# Defaults to true.
|
|
|
|
#
|
2015-07-07 20:53:02 -04:00
|
|
|
# [*compute_driver*]
|
|
|
|
# (optional) Compute driver.
|
|
|
|
# Defaults to 'vmwareapi.VMwareVCDriver'
|
|
|
|
#
|
2016-08-19 01:23:15 -03:00
|
|
|
# [*insecure*]
|
2018-04-18 15:20:30 +05:30
|
|
|
# (optional) Allow insecure connections.
|
2016-08-19 01:23:15 -03:00
|
|
|
# If true, the vCenter server certificate is not verified. If
|
|
|
|
# false, then the default CA truststore is used for verification. This
|
2017-01-30 16:10:45 -05:00
|
|
|
# option is ignored if 'ca_file' is set.
|
2016-08-19 01:23:15 -03:00
|
|
|
# Defaults to $::os_service_default
|
|
|
|
#
|
|
|
|
# [*ca_file*]
|
|
|
|
# (optional) Specify a CA bundle file to use in verifying the vCenter server
|
|
|
|
# certificate.
|
|
|
|
# Defaults to $::os_service_default
|
|
|
|
#
|
|
|
|
# [*datastore_regex*]
|
|
|
|
# (optional) Regex to match the name of a datastore.
|
|
|
|
# Defaults to $::os_service_default
|
|
|
|
#
|
2013-12-04 12:56:12 -08:00
|
|
|
class nova::compute::vmware(
|
|
|
|
$host_ip,
|
|
|
|
$host_username,
|
|
|
|
$host_password,
|
|
|
|
$cluster_name,
|
2016-08-19 01:23:15 -03:00
|
|
|
$api_retry_count = 5,
|
|
|
|
$maximum_objects = 100,
|
2015-07-07 20:53:02 -04:00
|
|
|
$task_poll_interval = 5.0,
|
2016-08-19 01:23:15 -03:00
|
|
|
$use_linked_clone = true,
|
|
|
|
$compute_driver = 'vmwareapi.VMwareVCDriver',
|
|
|
|
$insecure = $::os_service_default,
|
|
|
|
$ca_file = $::os_service_default,
|
|
|
|
$datastore_regex = $::os_service_default,
|
2013-12-04 12:56:12 -08:00
|
|
|
) {
|
|
|
|
|
2019-12-08 23:13:08 +01:00
|
|
|
include nova::deps
|
2015-11-16 02:55:39 +00:00
|
|
|
|
2013-12-04 12:56:12 -08:00
|
|
|
nova_config {
|
2016-08-19 01:23:15 -03:00
|
|
|
'DEFAULT/compute_driver': value => $compute_driver;
|
|
|
|
'vmware/host_ip': value => $host_ip;
|
|
|
|
'vmware/host_username': value => $host_username;
|
|
|
|
'vmware/host_password': value => $host_password;
|
|
|
|
'vmware/cluster_name': value => $cluster_name;
|
|
|
|
'vmware/api_retry_count': value => $api_retry_count;
|
|
|
|
'vmware/maximum_objects': value => $maximum_objects;
|
|
|
|
'vmware/task_poll_interval': value => $task_poll_interval;
|
|
|
|
'vmware/use_linked_clone': value => $use_linked_clone;
|
|
|
|
'vmware/insecure': value => $insecure;
|
|
|
|
'vmware/ca_file': value => $ca_file;
|
|
|
|
'vmware/datastore_regex': value => $datastore_regex;
|
2013-12-04 12:56:12 -08:00
|
|
|
}
|
|
|
|
|
2014-02-20 19:42:34 +01:00
|
|
|
package { 'python-suds':
|
2015-11-16 02:55:39 +00:00
|
|
|
ensure => present,
|
|
|
|
tag => ['openstack', 'nova-support-package'],
|
2013-12-04 12:56:12 -08:00
|
|
|
}
|
|
|
|
}
|