Fix vmware manifest
-Add missing attributes -Fix section name Change-Id: I4f5b7530ae9b725241397ef546ad455243f5f5b7 Closes-bug: #1614646
This commit is contained in:
@@ -41,12 +41,28 @@
|
|||||||
# (optional) VIM Service WSDL Location e.g
|
# (optional) VIM Service WSDL Location e.g
|
||||||
# http://<server>/vimService.wsdl. Optional over-ride to
|
# http://<server>/vimService.wsdl. Optional over-ride to
|
||||||
# default location for bug work-arounds.
|
# default location for bug work-arounds.
|
||||||
# Defaults to None.
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
# [*compute_driver*]
|
# [*compute_driver*]
|
||||||
# (optional) Compute driver.
|
# (optional) Compute driver.
|
||||||
# Defaults to 'vmwareapi.VMwareVCDriver'
|
# Defaults to 'vmwareapi.VMwareVCDriver'
|
||||||
#
|
#
|
||||||
|
# [*insecure*]
|
||||||
|
# (optional) Allow insecure conections.
|
||||||
|
# If true, the vCenter server certificate is not verified. If
|
||||||
|
# false, then the default CA truststore is used for verification. This
|
||||||
|
# option is ignored if “ca_file” is set.
|
||||||
|
# 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
|
||||||
|
#
|
||||||
class nova::compute::vmware(
|
class nova::compute::vmware(
|
||||||
$host_ip,
|
$host_ip,
|
||||||
$host_username,
|
$host_username,
|
||||||
@@ -56,28 +72,29 @@ class nova::compute::vmware(
|
|||||||
$maximum_objects = 100,
|
$maximum_objects = 100,
|
||||||
$task_poll_interval = 5.0,
|
$task_poll_interval = 5.0,
|
||||||
$use_linked_clone = true,
|
$use_linked_clone = true,
|
||||||
$wsdl_location = undef,
|
$wsdl_location = $::os_service_default,
|
||||||
$compute_driver = 'vmwareapi.VMwareVCDriver'
|
$compute_driver = 'vmwareapi.VMwareVCDriver',
|
||||||
|
$insecure = $::os_service_default,
|
||||||
|
$ca_file = $::os_service_default,
|
||||||
|
$datastore_regex = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::nova::deps
|
include ::nova::deps
|
||||||
|
|
||||||
nova_config {
|
nova_config {
|
||||||
'DEFAULT/compute_driver': value => $compute_driver;
|
'DEFAULT/compute_driver': value => $compute_driver;
|
||||||
'VMWARE/host_ip': value => $host_ip;
|
'vmware/host_ip': value => $host_ip;
|
||||||
'VMWARE/host_username': value => $host_username;
|
'vmware/host_username': value => $host_username;
|
||||||
'VMWARE/host_password': value => $host_password;
|
'vmware/host_password': value => $host_password;
|
||||||
'VMWARE/cluster_name': value => $cluster_name;
|
'vmware/cluster_name': value => $cluster_name;
|
||||||
'VMWARE/api_retry_count' : value => $api_retry_count;
|
'vmware/api_retry_count': value => $api_retry_count;
|
||||||
'VMWARE/maximum_objects' : value => $maximum_objects;
|
'vmware/maximum_objects': value => $maximum_objects;
|
||||||
'VMWARE/task_poll_interval' : value => $task_poll_interval;
|
'vmware/task_poll_interval': value => $task_poll_interval;
|
||||||
'VMWARE/use_linked_clone': value => $use_linked_clone;
|
'vmware/use_linked_clone': value => $use_linked_clone;
|
||||||
}
|
'vmware/wsdl_location': value => $wsdl_location;
|
||||||
|
'vmware/insecure': value => $insecure;
|
||||||
if $wsdl_location {
|
'vmware/ca_file': value => $ca_file;
|
||||||
nova_config {
|
'vmware/datastore_regex': value => $datastore_regex;
|
||||||
'VMWARE/wsdl_location' : value => $wsdl_location;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
package { 'python-suds':
|
package { 'python-suds':
|
||||||
|
4
releasenotes/notes/vmware_updates-9ead09cc33383d5f.yaml
Normal file
4
releasenotes/notes/vmware_updates-9ead09cc33383d5f.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- Fix vmware section name, should be vmware and not VMWARE.
|
||||||
|
- Add missing insecure, ca_file and datastore_regex parameters
|
@@ -15,20 +15,28 @@ describe 'nova::compute::vmware' do
|
|||||||
:task_poll_interval => 10.5,
|
:task_poll_interval => 10.5,
|
||||||
:use_linked_clone => false,
|
:use_linked_clone => false,
|
||||||
:wsdl_location => 'http://127.0.0.1:8080/vmware/SDK/wsdl/vim25/vimService.wsdl',
|
:wsdl_location => 'http://127.0.0.1:8080/vmware/SDK/wsdl/vim25/vimService.wsdl',
|
||||||
:compute_driver => 'vmwareapi.FoobarDriver' }
|
:compute_driver => 'vmwareapi.FoobarDriver',
|
||||||
|
:insecure => true,
|
||||||
|
:datastore_regex => '/(?:[^:]|:[^:])+/' }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
shared_examples_for 'vmware api' do
|
||||||
|
|
||||||
|
context 'with default parameters' do
|
||||||
it 'configures vmwareapi in nova.conf' do
|
it 'configures vmwareapi in nova.conf' do
|
||||||
is_expected.to contain_nova_config('DEFAULT/compute_driver').with_value('vmwareapi.VMwareVCDriver')
|
is_expected.to contain_nova_config('DEFAULT/compute_driver').with_value('vmwareapi.VMwareVCDriver')
|
||||||
is_expected.to contain_nova_config('VMWARE/host_ip').with_value(params[:host_ip])
|
is_expected.to contain_nova_config('vmware/host_ip').with_value(params[:host_ip])
|
||||||
is_expected.to contain_nova_config('VMWARE/host_username').with_value(params[:host_username])
|
is_expected.to contain_nova_config('vmware/host_username').with_value(params[:host_username])
|
||||||
is_expected.to contain_nova_config('VMWARE/host_password').with_value(params[:host_password])
|
is_expected.to contain_nova_config('vmware/host_password').with_value(params[:host_password])
|
||||||
is_expected.to contain_nova_config('VMWARE/cluster_name').with_value(params[:cluster_name])
|
is_expected.to contain_nova_config('vmware/cluster_name').with_value(params[:cluster_name])
|
||||||
is_expected.to contain_nova_config('VMWARE/api_retry_count').with_value(5)
|
is_expected.to contain_nova_config('vmware/api_retry_count').with_value(5)
|
||||||
is_expected.to contain_nova_config('VMWARE/maximum_objects').with_value(100)
|
is_expected.to contain_nova_config('vmware/maximum_objects').with_value(100)
|
||||||
is_expected.to contain_nova_config('VMWARE/task_poll_interval').with_value(5.0)
|
is_expected.to contain_nova_config('vmware/task_poll_interval').with_value(5.0)
|
||||||
is_expected.to contain_nova_config('VMWARE/use_linked_clone').with_value(true)
|
is_expected.to contain_nova_config('vmware/use_linked_clone').with_value(true)
|
||||||
is_expected.to_not contain_nova_config('VMWARE/wsdl_location')
|
is_expected.to contain_nova_config('vmware/wsdl_location').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_nova_config('vmware/insecure').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_nova_config('vmware/ca_file').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_nova_config('vmware/datastore_regex').with_value('<SERVICE DEFAULT>')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'installs suds python package' do
|
it 'installs suds python package' do
|
||||||
@@ -36,6 +44,8 @@ describe 'nova::compute::vmware' do
|
|||||||
:ensure => 'present'
|
:ensure => 'present'
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
context 'with optional parameters' do
|
context 'with optional parameters' do
|
||||||
before :each do
|
before :each do
|
||||||
@@ -44,11 +54,26 @@ describe 'nova::compute::vmware' do
|
|||||||
|
|
||||||
it 'configures vmwareapi in nova.conf' do
|
it 'configures vmwareapi in nova.conf' do
|
||||||
is_expected.to contain_nova_config('DEFAULT/compute_driver').with_value(params[:compute_driver])
|
is_expected.to contain_nova_config('DEFAULT/compute_driver').with_value(params[:compute_driver])
|
||||||
is_expected.to contain_nova_config('VMWARE/api_retry_count').with_value(params[:api_retry_count])
|
is_expected.to contain_nova_config('vmware/api_retry_count').with_value(params[:api_retry_count])
|
||||||
is_expected.to contain_nova_config('VMWARE/maximum_objects').with_value(params[:maximum_objects])
|
is_expected.to contain_nova_config('vmware/maximum_objects').with_value(params[:maximum_objects])
|
||||||
is_expected.to contain_nova_config('VMWARE/task_poll_interval').with_value(params[:task_poll_interval])
|
is_expected.to contain_nova_config('vmware/task_poll_interval').with_value(params[:task_poll_interval])
|
||||||
is_expected.to contain_nova_config('VMWARE/use_linked_clone').with_value(false)
|
is_expected.to contain_nova_config('vmware/use_linked_clone').with_value(false)
|
||||||
is_expected.to contain_nova_config('VMWARE/wsdl_location').with_value(params[:wsdl_location])
|
is_expected.to contain_nova_config('vmware/wsdl_location').with_value(params[:wsdl_location])
|
||||||
|
is_expected.to contain_nova_config('vmware/insecure').with_value(params[:insecure])
|
||||||
|
is_expected.to contain_nova_config('vmware/datastore_regex').with_value(params[:datastore_regex])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
on_supported_os({
|
||||||
|
:supported_os => OSDefaults.get_supported_os
|
||||||
|
}).each do |os, facts|
|
||||||
|
context "on #{os}" do
|
||||||
|
let (:facts) do
|
||||||
|
facts.merge!(OSDefaults.get_facts())
|
||||||
|
end
|
||||||
|
|
||||||
|
it_configures 'vmware api'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user