
This change introduces a new compute_driver parameter for all compute driver manifests. This will allow a user to override the compute_driver config value by its own instead of forking or monkey-patching the manifests. It also changes the compute_driver config value of Ironic for ironic.IronicDriver which also works and better fit the config value style already used in the other manifests. Common use case for this parameter is to allow the use of a local or derivative version of a driver which adds features and/or bug fixes. Closes-bug: #1472445 Change-Id: I4cd211b389303c22f4c2aa6db7592cc9861d4f40
85 lines
2.4 KiB
Puppet
85 lines
2.4 KiB
Puppet
#
|
|
# 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*]
|
|
# (optional) The interval in seconds used for polling of remote tasks.
|
|
# Defaults to 5.0
|
|
#
|
|
# [*use_linked_clone*]
|
|
# (optional) Whether to use linked clone strategy while creating VM's.
|
|
# Defaults to true.
|
|
#
|
|
# [*wsdl_location*]
|
|
# (optional) VIM Service WSDL Location e.g
|
|
# http://<server>/vimService.wsdl. Optional over-ride to
|
|
# default location for bug work-arounds.
|
|
# Defaults to None.
|
|
#
|
|
# [*compute_driver*]
|
|
# (optional) Compute driver.
|
|
# Defaults to 'vmwareapi.VMwareVCDriver'
|
|
#
|
|
class nova::compute::vmware(
|
|
$host_ip,
|
|
$host_username,
|
|
$host_password,
|
|
$cluster_name,
|
|
$api_retry_count = 5,
|
|
$maximum_objects = 100,
|
|
$task_poll_interval = 5.0,
|
|
$use_linked_clone = true,
|
|
$wsdl_location = undef,
|
|
$compute_driver = 'vmwareapi.VMwareVCDriver'
|
|
) {
|
|
|
|
nova_config {
|
|
'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;
|
|
}
|
|
|
|
if $wsdl_location {
|
|
nova_config {
|
|
'VMWARE/wsdl_location' : value => $wsdl_location;
|
|
}
|
|
}
|
|
|
|
package { 'python-suds':
|
|
ensure => present
|
|
}
|
|
}
|