Add cinder_glance resource

Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
This commit is contained in:
Bogdan Dobrelya 2015-08-03 14:41:13 +02:00
parent c5d2836efc
commit 6c7e34679c
4 changed files with 103 additions and 0 deletions

View File

@ -0,0 +1,37 @@
# Cinder Volume resource for puppet handler
Glance drive Cinder as a block storage backend to store image data.
# Parameters
source https://github.com/openstack/puppet-cinder/blob/5.1.0/manifests/glance.pp
``glance_api_servers``
(optional) A list of the glance api servers available to cinder.
Should be an array with [hostname|ip]:port
Defaults to undef
``glance_api_version``
(optional) Glance API version.
Should be 1 or 2
Defaults to 2 (current version)
``glance_num_retries``
(optional) Number retries when downloading an image from glance.
Defaults to 0
``glance_api_insecure``
(optional) Allow to perform insecure SSL (https) requests to glance.
Defaults to false
``glance_api_ssl_compression``
(optional) Whether to attempt to negotiate SSL layer compression when
using SSL (https) requests. Set to False to disable SSL
layer compression. In some cases disabling this may improve
data throughput, eg when high network bandwidth is available
and you are using already compressed image formats such as qcow2.
Defaults to false
``glance_request_timeout``
(optional) http/https timeout value for glance operations.
Defaults to undef

View File

@ -0,0 +1 @@
notify { "Nothing to remove here:" }

View File

@ -0,0 +1,19 @@
$resource = hiera($::resource_name)
$glance_api_servers = $resource['input']['glance_api_servers']['value']
$glance_api_version = $resource['input']['glance_api_version']['value']
$glance_num_retries = $resource['input']['glance_num_retries']['value']
$glance_api_insecure = $resource['input']['glance_api_insecure']['value']
$glance_api_ssl_compression = $resource['input']['glance_api_ssl_compression']['value']
$glance_request_timeout = $resource['input']['glance_request_timeout']['value']
$glance_api_servers_host = $resource['input']['glance_api_servers_host']['value']
$glance_api_servers_port = $resource['input']['glance_api_servers_port']['value']
class {'cinder::glance':
glance_api_servers => "${glance_api_servers_host}:${glance_api_servers_port}",
glance_api_version => $glance_api_version,
glance_num_retries => $glance_num_retries,
glance_api_insecure => $glance_api_insecure,
glance_api_ssl_compression => $glance_api_ssl_compression,
glance_request_timeout => $glance_request_timeout,
}

View File

@ -0,0 +1,46 @@
id: cinder_glance_puppet
handler: puppet
puppet_module: cinder
version: 1.0.0
input:
glance_api_servers:
schema: str
value: ''
glance_api_version:
schema: int
value: 2
glance_num_retries:
schema: int
value: 0
glance_api_insecure:
schema: bool
value: false
glance_api_ssl_compression:
schema: bool
value: false
glance_request_timeout:
schema: str
value: ''
git:
schema: {repository: str!, branch: str!}
value: {repository: 'https://github.com/openstack/puppet-cinder', branch: '5.1.0'}
ip:
schema: str!
value:
ssh_key:
schema: str!
value:
ssh_user:
schema: str!
value:
glance_api_servers_port:
schema: int
value: 9292
glance_api_servers_host:
schema: 'str'
value: 'localhost'
tags: [resource/cinder_glance_service, resources/cinder_glance, resources/cinder]