2 # Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
4 # Author: Emilien Macchi <emilien.macchi@enovance.com>
6 # Licensed under the Apache License, Version 2.0 (the "License"); you may
7 # not use this file except in compliance with the License. You may obtain
8 # a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15 # License for the specific language governing permissions and limitations
18 # == Class: cinder::glance
20 # Glance drive Cinder as a block storage backend to store image data.
24 # [*glance_api_servers*]
25 # (optional) A list of the glance api servers available to cinder.
26 # Should be an array with [hostname|ip]:port
29 # [*glance_api_version*]
30 # (optional) Glance API version.
32 # Defaults to 2 (current version)
34 # [*glance_num_retries*]
35 # (optional) Number retries when downloading an image from glance.
38 # [*glance_api_insecure*]
39 # (optional) Allow to perform insecure SSL (https) requests to glance.
42 # [*glance_api_ssl_compression*]
43 # (optional) Whether to attempt to negotiate SSL layer compression when
44 # using SSL (https) requests. Set to False to disable SSL
45 # layer compression. In some cases disabling this may improve
46 # data throughput, eg when high network bandwidth is available
47 # and you are using already compressed image formats such as qcow2.
50 # [*glance_request_timeout*]
51 # (optional) http/https timeout value for glance operations.
55 class cinder::glance (
56 $glance_api_servers = undef,
57 $glance_api_version = '2',
58 $glance_num_retries = '0',
59 $glance_api_insecure = false,
60 $glance_api_ssl_compression = false,
61 $glance_request_timeout = undef
64 if is_array($glance_api_servers) {
66 'DEFAULT/glance_api_servers': value => join($glance_api_servers, ',');
68 } elsif is_string($glance_api_servers) {
70 'DEFAULT/glance_api_servers': value => $glance_api_servers;
75 'DEFAULT/glance_api_version': value => $glance_api_version;
76 'DEFAULT/glance_num_retries': value => $glance_num_retries;
77 'DEFAULT/glance_api_insecure': value => $glance_api_insecure;
78 'DEFAULT/glance_api_ssl_compression': value => $glance_api_ssl_compression;
79 'DEFAULT/glance_request_timeout': value => $glance_request_timeout;