Merge "Allow customizing format of service image"
This commit is contained in:
@@ -17,6 +17,14 @@
|
||||
# service instance.
|
||||
# Defaults to: 'manila-service-image'
|
||||
#
|
||||
# [*service_image_container_format*]
|
||||
# (optional) Container format of the service image.
|
||||
# Defaults to 'bare'
|
||||
#
|
||||
# [*service_image_disk_format*]
|
||||
# (optional) Disk format of the service image.
|
||||
# Defaults to 'qcow2'
|
||||
#
|
||||
# [*service_image_location*]
|
||||
# (optional) URL or pathname to the service image. This will be
|
||||
# loaded into Glance. This is required when create_service_image is true.
|
||||
@@ -80,6 +88,8 @@ define manila::backend::service_instance (
|
||||
$service_instance_password,
|
||||
Boolean $create_service_image = true,
|
||||
$service_image_name = 'manila-service-image',
|
||||
$service_image_container_format = 'bare',
|
||||
$service_image_disk_format = 'qcow2',
|
||||
$service_image_location = undef,
|
||||
$service_instance_name_template = 'manila_service_instance_%s',
|
||||
$manila_service_keypair_name = 'manila-service',
|
||||
@@ -101,8 +111,8 @@ define manila::backend::service_instance (
|
||||
glance_image { $service_image_name:
|
||||
ensure => present,
|
||||
is_public => 'yes',
|
||||
container_format => 'bare',
|
||||
disk_format => 'qcow2',
|
||||
container_format => $service_image_container_format,
|
||||
disk_format => $service_image_disk_format,
|
||||
source => $service_image_location,
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,9 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The ``manila::backend::service_instance`` defined resource type now
|
||||
supports the following parameters, to customize format of the service
|
||||
image being created.
|
||||
|
||||
- ``service_image_container_format``
|
||||
- ``service_image_disk_format``
|
@@ -54,11 +54,13 @@ describe 'manila::backend::service_instance' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'with custom service image name' do
|
||||
context 'with custom service image parameters' do
|
||||
before do
|
||||
params.merge!({
|
||||
:service_image_name => 'custom-image',
|
||||
:service_image_location => 'http://example.com/manila_service_image.iso',
|
||||
:service_image_name => 'custom-image',
|
||||
:service_image_container_format => 'compressed',
|
||||
:service_image_disk_format => 'raw',
|
||||
:service_image_location => 'http://example.com/manila_service_image.iso',
|
||||
})
|
||||
end
|
||||
|
||||
@@ -70,8 +72,8 @@ describe 'manila::backend::service_instance' do
|
||||
is_expected.to contain_glance_image('custom-image').with(
|
||||
:ensure => 'present',
|
||||
:is_public => 'yes',
|
||||
:container_format => 'bare',
|
||||
:disk_format => 'qcow2',
|
||||
:container_format => 'compressed',
|
||||
:disk_format => 'raw',
|
||||
:source => 'http://example.com/manila_service_image.iso',
|
||||
)
|
||||
end
|
||||
|
Reference in New Issue
Block a user