Add puppet-lint-param-docs plugins to puppet-lint

- This puppet-lint plugin checks if all parameters are documented\
- Fix some unaligned arrows
- Remove trailing whitespace!
- Add missing doc
- https://github.com/domcleal/puppet-lint-param-docs

Change-Id: I8f089eceb3ce3532d763807e5e412d1cc1d07b6b
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
This commit is contained in:
Gael Chamoulaud 2014-11-20 14:38:12 +01:00
parent 35146aa8ea
commit 7e5cd1d265
26 changed files with 533 additions and 183 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ spec/fixtures/modules/*
spec/fixtures/manifests/site.pp
*.swp
pkg
vendor/

View File

@ -2,7 +2,8 @@ source 'https://rubygems.org'
group :development, :test do
gem 'puppetlabs_spec_helper', :require => false
gem 'puppet-lint', '~> 0.3.2'
gem 'puppet-lint', '~> 1.1'
gem 'puppet-lint-param-docs', '1.1.0'
gem 'rake', '10.1.1'
gem 'rspec', '< 2.99'
gem 'json'

View File

@ -44,6 +44,10 @@
# Defaults to false for empty. If defined, should be a string with a
# leading '/' and no trailing '/'.
#
# [*keystone_auth_uri*]
# (optional) Public Identity API endpoint.
# Defaults to 'false'.
#
# [*service_port*]
# (optional) The cinder api port
# Defaults to 5000
@ -118,8 +122,8 @@ class cinder::api (
Package['cinder-api'] -> Cinder_api_paste_ini<||>
Package['cinder-api'] -> Service['cinder-api']
package { 'cinder-api':
ensure => $package_ensure,
name => $::cinder::params::api_package,
ensure => $package_ensure,
name => $::cinder::params::api_package,
}
}

View File

@ -1,21 +1,59 @@
# ==define cinder::backend::nfs
# == Define: cinder::backend::nfs
#
# === Parameters
#
# ===Paramiters
# [*volume_backend_name*]
# (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $name
#
# [*nfs_servers*]
# (Required) Description
# Defaults to '[]'
#
# [*nfs_mount_options*]
# (Optional) Mount options passed to the nfs client.
# Defaults to 'undef'.
#
# [*nfs_disk_util*]
# (Optional) TODO
# Defaults to 'undef'.
#
# [*nfs_sparsed_volumes*]
# (Optional) Create volumes as sparsed files which take no space.
# If set to False volume is created as regular file.
# In such case volume creation takes a lot of time.
# Defaults to 'undef'.
#
# [*nfs_mount_point_base*]
# (Optional) Base dir containing mount points for nfs shares.
# Defaults to 'undef'.
#
# [*nfs_shares_config*]
# (Optional) File with the list of available nfs shares.
# Defaults to '/etc/cinder/shares.conf'.
#
# [*nfs_used_ratio*]
# (Optional) Percent of ACTUAL usage of the underlying volume before no new
# volumes can be allocated to the volume destination.
# Defaults to '0.95'.
#
# [*nfs_oversub_ratio*]
# (Optional) This will compare the allocated to available space on the volume
# destination. If the ratio exceeds this number, the destination will no
# longer be valid.
# Defaults to '1.0'.
#
#
define cinder::backend::nfs (
$volume_backend_name = $name,
$nfs_servers = [],
$nfs_mount_options = undef,
$nfs_disk_util = undef,
$nfs_sparsed_volumes = undef,
$volume_backend_name = $name,
$nfs_servers = [],
$nfs_mount_options = undef,
$nfs_disk_util = undef,
$nfs_sparsed_volumes = undef,
$nfs_mount_point_base = undef,
$nfs_shares_config = '/etc/cinder/shares.conf',
$nfs_used_ratio = '0.95',
$nfs_oversub_ratio = '1.0',
$nfs_shares_config = '/etc/cinder/shares.conf',
$nfs_used_ratio = '0.95',
$nfs_oversub_ratio = '1.0',
) {
file {$nfs_shares_config:

View File

@ -5,9 +5,14 @@
# === Parameters
#
# [*enabled_backends*]
# (required) a list of ini sections to enable.
# This should contain names used in ceph::backend::* resources.
# Example: ['volume1', 'volume2', 'sata3']
# (Required) a list of ini sections to enable.
# This should contain names used in ceph::backend::* resources.
# Example: ['volume1', 'volume2', 'sata3']
#
# === Deprecated Parameters
#
# [*default_volume_type*]
# (Deprecated) Does nothing.
#
# Author: Andrew Woodward <awoodward@mirantis.com>
class cinder::backends (

View File

@ -1,26 +1,17 @@
#
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
#
# Author: Emilien Macchi <emilien.macchi@enovance.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# == Class: cinder::backup
#
# Setup Cinder backup service
#
# === Parameters
#
# [*enabled*]
# (Optional) Should the service be enabled.
# Defaults to 'true'.
#
# [*package_ensure*]
# (Optional) Ensure state for package.
# Defaults to 'present'.
#
# [*backup_topic*]
# (optional) The topic volume backup nodes listen on.
# Defaults to 'cinder-backup'
@ -37,7 +28,27 @@
# (optional) Template string to be used to generate backup names.
# Defaults to 'backup-%s'
#
# === Author(s)
#
# Emilien Macchi <emilien.macchi@enovance.com>
#
# === Copyright
#
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
#
class cinder::backup (
$enabled = true,
$package_ensure = 'present',

View File

@ -1,26 +1,13 @@
#
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
#
# Author: Emilien Macchi <emilien.macchi@enovance.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# == Class: cinder::backup::swift
#
# Setup Cinder to backup volumes into Swift
#
# === Parameters
#
# [*backup_driver*]
# (Optional) The backup driver for Swift back-end.
# Defaults to 'cinder.backup.drivers.swift'.
#
# [*backup_swift_url*]
# (optional) The URL of the Swift endpoint.
# Should be a valid Swift URL
@ -42,7 +29,27 @@
# (optional) The backoff time in seconds between Swift retries.
# Defaults to '2'
#
# === Author(s)
#
# Emilien Macchi <emilien.macchi@enovance.com>
#
# === Copyright
#
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
#
class cinder::backup::swift (
$backup_driver = 'cinder.backup.drivers.swift',
$backup_swift_url = 'http://localhost:8080/v1/AUTH_',

View File

@ -4,8 +4,9 @@
#
# === Parameters
#
# [*ensure*]
# Ensure state for package. Defaults to 'present'.
# [*package_ensure*]
# (Optional) Ensure state for package.
# Defaults to 'present'.
#
class cinder::client(
$package_ensure = 'present'

View File

@ -18,10 +18,11 @@
# DEFAULT/bar:
# value: barValue
#
# [**cinder_config**]
# [*cinder_config*]
# (optional) Allow configuration of cinder.conf configurations.
# Defaults to empty hash'{}'
#
# [**api_paste_ini_config**]
# [*api_paste_ini_config*]
# (optional) Allow configuration of /etc/cinder/api-paste.ini configurations.
#
# NOTE: The configuration MUST NOT be already handled by this module

View File

@ -1,33 +1,41 @@
# == Class: cinder::db::mysql
#
# The cinder::db::mysql class creates a MySQL database for cinder.
# It must be used on the MySQL server
#
# == Parameters
# === Parameters
#
# [*password*]
# password to connect to the database. Mandatory.
# [*password*]
# password to connect to the database. Mandatory.
#
# [*dbname*]
# name of the database. Optional. Defaults to cinder.
# [*dbname*]
# name of the database. Optional. Defaults to cinder.
#
# [*user*]
# user to connect to the database. Optional. Defaults to cinder.
# [*user*]
# user to connect to the database. Optional. Defaults to cinder.
#
# [*host*]
# the default source host user is allowed to connect from.
# Optional. Defaults to 'localhost'
# [*host*]
# the default source host user is allowed to connect from.
# Optional. Defaults to 'localhost'
#
# [*allowed_hosts*]
# other hosts the user is allowd to connect from.
# Optional. Defaults to undef.
# [*allowed_hosts*]
# other hosts the user is allowd to connect from.
# Optional. Defaults to undef.
#
# [*charset*]
# the database charset. Optional. Defaults to 'utf8'
# [*charset*]
# the database charset. Optional. Defaults to 'utf8'
#
# [*collate*]
# the database collation. Optional. Defaults to 'utf8_unicode_ci'
# [*collate*]
# the database collation. Optional. Defaults to 'utf8_unicode_ci'
#
# [*cluster_id*]
# (Optional) TODO
# Defaults to 'localzone'.
#
# === Deprecated Parameters
#
# [*mysql_module*]
# (optional) Deprecated. Does nothing.
# (Deprecated) Deprecated. Does nothing.
#
class cinder::db::mysql (
$password,
@ -38,6 +46,7 @@ class cinder::db::mysql (
$charset = 'utf8',
$collate = 'utf8_unicode_ci',
$cluster_id = 'localzone',
# DEPRECATED
$mysql_module = undef,
) {

View File

@ -1,7 +1,21 @@
# == Class: cinder::db::postgresql
#
# Class that configures postgresql for cinder
#
# Requires the Puppetlabs postgresql module.
#
# === Parameters
#
# [*password*]
# (Required) Password to connect to the database.
#
# [*dbname*]
# (Optional) Name of the database.
# Defaults to 'cinder'.
#
# [*user*]
# (Optional) User to connect to the database.
# Defaults to 'cinder'.
#
class cinder::db::postgresql(
$password,
$dbname = 'cinder',
@ -14,8 +28,8 @@ class cinder::db::postgresql(
Package['python-psycopg2'] -> Exec<| title == 'cinder-manage db_sync' |>
postgresql::db { $dbname:
user => $user,
password => $password,
user => $user,
password => $password,
}
}

View File

@ -1,20 +1,3 @@
#
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
#
# Author: Emilien Macchi <emilien.macchi@enovance.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# == Class: cinder::glance
#
# Glance drive Cinder as a block storage backend to store image data.
@ -51,7 +34,26 @@
# (optional) http/https timeout value for glance operations.
# Defaults to undef
#
# === Author(s)
#
# Emilien Macchi <emilien.macchi@enovance.com>
#
# === Copyright
#
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
class cinder::glance (
$glance_api_servers = undef,
$glance_api_version = '2',

View File

@ -1,35 +1,88 @@
# == Class: cinder
#
# == Parameters
# [database_connection]
# Cinder base package & configuration
#
# === Parameters
#
# [*package_ensure*]
# (Optional) Ensure state for package.
# Defaults to 'present'
#
# [*verbose*]
# (Optional) Should the daemons log verbose messages
# Defaults to 'false'
#
# [*debug*]
# (Optional) Should the daemons log debug messages
# Defaults to 'false'
#
# [*use_syslog*]
# (Optional) Use syslog for logging.
# Defaults to false.
#
# [*database_connection*]
# Url used to connect to database.
# (Optional) Defaults to
# 'sqlite:////var/lib/cinder/cinder.sqlite'
#
# [database_idle_timeout]
# [*database_idle_timeout*]
# Timeout when db connections should be reaped.
# (Optional) Defaults to 3600.
#
# [database_min_pool_size]
# [*database_min_pool_size*]
# Minimum number of SQL connections to keep open in a pool.
# (Optional) Defaults to 1.
#
# [database_max_pool_size]
# [*database_max_pool_size*]
# Maximum number of SQL connections to keep open in a pool.
# (Optional) Defaults to undef.
#
# [database_max_retries]
# [*database_max_retries*]
# Maximum db connection retries during startup.
# Setting -1 implies an infinite retry count.
# (Optional) Defaults to 10.
#
# [database_retry_interval]
# [*database_retry_interval*]
# Interval between retries of opening a sql connection.
# (Optional) Defaults to 10.
#
# [database_max_overflow]
# [*database_max_overflow*]
# If set, use this value for max_overflow with sqlalchemy.
# (Optional) Defaults to undef.
#
# [*rpc_backend*]
# (Optional) Use these options to configure the RabbitMQ message system.
# Defaults to 'cinder.openstack.common.rpc.impl_kombu'
#
# [*control_exchange*]
# (Optional)
# Defaults to 'openstack'.
#
# [*rabbit_host*]
# (Optional) IP or hostname of the rabbit server.
# Defaults to '127.0.0.1'
#
# [*rabbit_port*]
# (Optional) Port of the rabbit server.
# Defaults to 5672.
#
# [*rabbit_hosts*]
# (Optional) Array of host:port (used with HA queues).
# If defined, will remove rabbit_host & rabbit_port parameters from config
# Defaults to undef.
#
# [*rabbit_userid*]
# (Optional) User to connect to the rabbit server.
# Defaults to 'guest'
#
# [*rabbit_password*]
# (Optional) Password to connect to the rabbit_server.
# Defaults to empty.
#
# [*rabbit_virtual_host*]
# (Optional) Virtual_host to use.
# Defaults to '/'
#
# [*rabbit_use_ssl*]
# (optional) Connect over SSL for RabbitMQ
# Defaults to false
@ -52,15 +105,59 @@
# available on some distributions.
# Defaults to 'SSLv3'
#
# [amqp_durable_queues]
# [*amqp_durable_queues*]
# Use durable queues in amqp.
# (Optional) Defaults to false.
#
# [use_syslog]
# [*qpid_hostname*]
# (Optional) Location of qpid server
# Defaults to 'localhost'.
#
# [*qpid_port*]
# (Optional) Port for qpid server.
# Defaults to '5672'.
#
# [*qpid_username*]
# (Optional) Username to use when connecting to qpid.
# Defaults to 'guest'.
#
# [*qpid_password*]
# (Optional) Password to use when connecting to qpid.
# Defaults to 'false'.
#
# [*qpid_sasl_mechanisms*]
# (Optional) ENable one or more SASL mechanisms.
# Defaults to 'false'.
#
# [*qpid_heartbeat*]
# (Optional) Seconds between connection keepalive heartbeats.
# Defaults to '60'.
#
# [*qpid_protocol*]
# (Optional) Transport to use, either 'tcp' or 'ssl'.
# Defaults to 'tcp'.
#
# [*qpid_tcp_nodelay*]
# (Optional) Disable Nagle Algorithm.
# Defaults to 'true'.
#
# [*qpid_reconnect*]
#
# [*qpid_reconnect_timeout*]
#
# [*qpid_reconnect_limit*]
#
# [*qpid_reconnect_interval*]
#
# [*qpid_reconnect_interval_min*]
#
# [*qpid_reconnect_interval_max*]
#
# [*use_syslog]
# Use syslog for logging.
# (Optional) Defaults to false.
#
# [log_facility]
# [*log_facility*]
# Syslog facility to receive log lines.
# (Optional) Defaults to LOG_USER.
#
@ -85,9 +182,6 @@
# (optional) CA certificate file to use to verify connecting clients
# Defaults to false, not set_
#
# [*mysql_module*]
# (optional) Deprecated. Does nothing.
#
# [*storage_availability_zone*]
# (optional) Availability zone of the node.
# Defaults to 'nova'
@ -98,6 +192,15 @@
# the default for new volumes.
# Defaults to false
#
# [*api_paste_config*]
# (Optional)
# Defaults to '/etc/cinder/api-paste.ini',
#
# === Deprecated Parameters
#
# [*mysql_module*]
# DEPRECATED. Does nothing.
#
class cinder (
$database_connection = 'sqlite:////var/lib/cinder/cinder.sqlite',
$database_idle_timeout = '3600',

View File

@ -1,28 +1,28 @@
# Class cinder::logging
# == Class: cinder::logging
#
# cinder extended logging configuration
# Cinder extended logging configuration
#
# == parameters
# === Parameters
#
# [*logging_context_format_string*]
# (optional) Format string to use for log messages with context.
# (Optional) Format string to use for log messages with context.
# Defaults to undef.
# Example: '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s\
# [%(request_id)s %(user_identity)s] %(instance)s%(message)s'
#
# [*logging_default_format_string*]
# (optional) Format string to use for log messages without context.
# (Optional) Format string to use for log messages without context.
# Defaults to undef.
# Example: '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s\
# [-] %(instance)s%(message)s'
#
# [*logging_debug_format_suffix*]
# (optional) Formatted data to append to log format when level is DEBUG.
# (Optional) Formatted data to append to log format when level is DEBUG.
# Defaults to undef.
# Example: '%(funcName)s %(pathname)s:%(lineno)d'
#
# [*logging_exception_prefix*]
# (optional) Prefix each line of exception output with this format.
# (Optional) Prefix each line of exception output with this format.
# Defaults to undef.
# Example: '%(asctime)s.%(msecs)03d %(process)d TRACE %(name)s %(instance)s'
#
@ -59,12 +59,12 @@
# it like this (string value).
# Defaults to undef.
# Example: instance_uuid_format='[instance: %(uuid)s] '
#
# [*log_date_format*]
# (optional) Format string for %%(asctime)s in log records.
# Defaults to undef.
# Example: 'Y-%m-%d %H:%M:%S'
#
class cinder::logging(
$logging_context_format_string = undef,
$logging_default_format_string = undef,

View File

@ -1,3 +1,4 @@
# == Class: cinder::params
#
class cinder::params {

View File

@ -6,7 +6,11 @@
#
# [*policies*]
# (optional) Set of policies to configure for cinder
# Example : { 'cinder-context_is_admin' => {'context_is_admin' => 'true'}, 'cinder-default' => {'default' => 'rule:admin_or_owner'} }
# Example :
# {
# 'cinder-context_is_admin' => {'context_is_admin' => 'true'},
# 'cinder-default' => {'default' => 'rule:admin_or_owner'}
# }
# Defaults to empty hash.
#
# [*policy_path*]

View File

@ -1,13 +1,36 @@
# == Class: cinder::qpid
#
# class for installing qpid server for cinder
#
# === Parameters
#
class cinder::qpid(
$enabled = true,
$user='guest',
$password='guest',
$file='/var/lib/qpidd/qpidd.sasldb',
$realm='OPENSTACK'
# [*enabled*]
# (Optional) Whether to enable the qpid service.
# Defaults to 'true'.
#
# [*user*]
# (Optional) The username to use when connecting to qpid.
# Defaults to 'guest'.
#
# [*password*]
# (Optional) The password to use when connecting to qpid
# Defaults to 'guest'.
#
# [*file*]
# (Optional) The SASL database.
# Defaults to '/var/lib/qpidd/qpidd.sasldb'.
#
# [*realm*]
# (Optional) The Realm for qpid.
# Defaults to 'OPENSTACK'.
#
#
class cinder::qpid (
$enabled = true,
$user ='guest',
$password ='guest',
$file ='/var/lib/qpidd/qpidd.sasldb',
$realm ='OPENSTACK'
) {
# only configure cinder after the queue is up

View File

@ -5,17 +5,20 @@
# === Parameters
#
# [*quota_volumes*]
# (optional) Number of volumes allowed per project. Defaults to 10.
# (Optional) Number of volumes allowed per project.
# Defaults to '10'.
#
# [*quota_snapshots*]
# (optional) Number of volume snapshots allowed per project. Defaults to 10.
# (Optional) Number of volume snapshots allowed per project.
# Defaults to '10'.
#
# [*quota_gigabytes*]
# (optional) Number of volume gigabytes (snapshots are also included)
# allowed per project. Defaults to 1000.
# (Optional) Number of volume gigabytes (snapshots are also included)
# allowed per project.
# Defaults to 1000.
#
# [*quota_driver*]
# (optional) Default driver to use for quota checks.
# (Optional) Default driver to use for quota checks.
# Defaults to 'cinder.quota.DbQuotaDriver'.
#
class cinder::quota (

View File

@ -1,3 +1,25 @@
# == Class: cinder::scheduler
#
# Scheduler class for cinder.
#
# === Parameters
#
# [*scheduler_driver*]
# (Optional) Default scheduler driver to use
# Defaults to 'false'.
#
# [*package_ensure*]
# (Optioanl) The state of the package.
# Defaults to 'present'.
#
# [*enabled*]
# (Optional) The state of the service
# Defaults to 'true'.
#
# [*manage_service*]
# (Optional) Whether to start/stop the service
# Defaults to 'true'.
#
#
class cinder::scheduler (
$scheduler_driver = false,

View File

@ -1,34 +1,40 @@
# ==Define: cinder::type
# == Define: cinder::type
#
# Creates cinder type and assigns backends.
#
# === Parameters
#
# [*os_password*]
# (required) The keystone tenant:username password.
# (Required) The keystone tenant:username password.
#
# [*set_key*]
# (optional) Must be used with set_value. Accepts a single string be used
# as the key in type_set
# (Optional) Must be used with set_value. Accepts a single string be used
# as the key in type_set
# Defaults to 'undef'.
#
# [*set_value*]
# (optional) Accepts list of strings or singular string. A list of values
# passed to type_set
# passed to type_set
# Defaults to 'undef'.
#
# [*os_tenant_name*]
# (optional) The keystone tenant name. Defaults to 'admin'.
# (Optional) The keystone tenant name.
# Defaults to 'admin'.
#
# [*os_username*]
# (optional) The keystone user name. Defaults to 'admin.
# (Optional) The keystone user name.
# Defaults to 'admin.
#
# [*os_auth_url*]
# (optional) The keystone auth url. Defaults to 'http://127.0.0.1:5000/v2.0/'.
# (Optional) The keystone auth url.
# Defaults to 'http://127.0.0.1:5000/v2.0/'.
#
# [*os_region_name*]
# (optional) The keystone region name. Default is unset.
# (Optional) The keystone region name.
# Default is unset.
#
# Author: Andrew Woodward <awoodward@mirantis.com>
#
define cinder::type (
$os_password,
$set_key = undef,
@ -69,13 +75,13 @@ define cinder::type (
if ($set_value and $set_key) {
Exec["cinder type-create ${volume_name}"] ->
cinder::type_set { $set_value:
type => $volume_name,
key => $set_key,
os_password => $os_password,
os_tenant_name => $os_tenant_name,
os_username => $os_username,
os_auth_url => $os_auth_url,
os_region_name => $os_region_name,
type => $volume_name,
key => $set_key,
os_password => $os_password,
os_tenant_name => $os_tenant_name,
os_username => $os_username,
os_auth_url => $os_auth_url,
os_region_name => $os_region_name,
}
}
}

View File

@ -1,20 +1,23 @@
# ==Define: cinder::vmware
# == Define: cinder::vmware
#
# Creates vmdk specific disk file type & clone type.
#
# === Parameters
#
# [*os_password*]
# (required) The keystone tenant:username password.
# (Required) The keystone tenant:username password.
#
# [*os_tenant_name*]
# (optional) The keystone tenant name. Defaults to 'admin'.
# (Optional) The keystone tenant name.
# Defaults to 'admin'.
#
# [*os_username*]
# (optional) The keystone user name. Defaults to 'admin.
# (Optional) The keystone user name.
# Defaults to 'admin.
#
# [*os_auth_url*]
# (optional) The keystone auth url. Defaults to 'http://127.0.0.1:5000/v2.0/'.
# (Optional) The keystone auth url.
# Defaults to 'http://127.0.0.1:5000/v2.0/'.
#
class cinder::vmware (
$os_password,
@ -50,4 +53,4 @@ class cinder::vmware (
set_value => 'linked',
set_key => 'vmware:clone_type'
}
}
}

View File

@ -1,4 +1,19 @@
# $volume_name_template = volume-%s
# == Class: cinder::volume
#
# === Parameters
#
# [*package_ensure*]
# (Optional) The state of the package.
# Defaults to 'present'.
#
# [*enabled*]
# (Optional) The state of the service
# Defaults to 'true'.
#
# [*manage_service*]
# (Optional) Whether to start/stop the service.
# Defaults to 'true'.
#
class cinder::volume (
$package_ensure = 'present',
$enabled = true,

View File

@ -5,25 +5,32 @@
#
# === Parameters
#
# [*package_ensure*]
# (Optional) State of the package
# Defaults to 'present'.
#
# [*iscsi_ip_address*]
# (Required) The IP address that the iSCSI daemon is listening on
#
# [*san_ip*]
# (required) IP address of SAN controller.
# (Required) IP address of SAN controller.
#
# [*san_password*]
# (required) Password of SAN controller.
# (Required) Password of SAN controller.
#
# [*san_login*]
# (optional) Login of SAN controller.
# (Optional) Login of SAN controller.
# Defaults to : 'admin'
#
# [*storage_vnx_pool_name*]
# (required) Storage pool name.
# (Required) Storage pool name.
#
# [*default_timeout*]
# (optonal) Default timeout for CLI operations in minutes.
# (Optonal) Default timeout for CLI operations in minutes.
# Defaults to: '10'
#
# [*max_luns_per_storage_group*]
# (optonal) Default max number of LUNs in a storage group.
# (Optonal) Default max number of LUNs in a storage group.
# Defaults to: '256'
#
class cinder::volume::emc_vnx(

View File

@ -1,3 +1,23 @@
# == Class: cinder::volume::iscsi
#
# Configures Cinder volume ISCSI driver.
#
# === Parameters
#
# [*iscsi_ip_address*]
# (Required) The IP address that the iSCSI daemon is listening on
#
# [*volume_driver*]
# (Optional) Driver to use for volume creation
# Defaults to 'cinder.volume.drivers.lvm.LVMISCSIDriver'.
#
# [*volume_group*]
# (Optional) Name for the VG that will contain exported volumes
# Defaults to 'cinder-volumes'.
#
# [*iscsi_helper*]
# (Optional) iSCSI target user-land tool to use.
# Defaults to '$::cinder::params::iscsi_helper'.
#
class cinder::volume::iscsi (
$iscsi_ip_address,
@ -9,9 +29,9 @@ class cinder::volume::iscsi (
include cinder::params
cinder::backend::iscsi { 'DEFAULT':
iscsi_ip_address => $iscsi_ip_address,
volume_driver => $volume_driver,
volume_group => $volume_group,
iscsi_helper => $iscsi_helper
iscsi_ip_address => $iscsi_ip_address,
volume_driver => $volume_driver,
volume_group => $volume_group,
iscsi_helper => $iscsi_helper
}
}

View File

@ -1,13 +1,55 @@
# == Class: cinder::volume::nfs
#
#
# === Parameters
#
# [*nfs_servers*]
# (Required) Description
# Defaults to '[]'
#
# [*nfs_mount_options*]
# (Optional) Mount options passed to the nfs client.
# Defaults to 'undef'.
#
# [*nfs_disk_util*]
# (Optional) TODO
# Defaults to 'undef'.
#
# [*nfs_sparsed_volumes*]
# (Optional) Create volumes as sparsed files which take no space.
# If set to False volume is created as regular file.
# In such case volume creation takes a lot of time.
# Defaults to 'undef'.
#
# [*nfs_mount_point_base*]
# (Optional) Base dir containing mount points for nfs shares.
# Defaults to 'undef'.
#
# [*nfs_shares_config*]
# (Optional) File with the list of available nfs shares.
# Defaults to '/etc/cinder/shares.conf'.
#
# [*nfs_used_ratio*]
# (Optional) Percent of ACTUAL usage of the underlying volume before no new
# volumes can be allocated to the volume destination.
# Defaults to '0.95'.
#
# [*nfs_oversub_ratio*]
# (Optional) This will compare the allocated to available space on the volume
# destination. If the ratio exceeds this number, the destination will no
# longer be valid.
# Defaults to '1.0'.
#
#
class cinder::volume::nfs (
$nfs_servers = [],
$nfs_mount_options = undef,
$nfs_disk_util = undef,
$nfs_sparsed_volumes = undef,
$nfs_servers = [],
$nfs_mount_options = undef,
$nfs_disk_util = undef,
$nfs_sparsed_volumes = undef,
$nfs_mount_point_base = undef,
$nfs_shares_config = '/etc/cinder/shares.conf',
$nfs_used_ratio = '0.95',
$nfs_oversub_ratio = '1.0',
$nfs_shares_config = '/etc/cinder/shares.conf',
$nfs_used_ratio = '0.95',
$nfs_oversub_ratio = '1.0',
) {
cinder::backend::nfs { 'DEFAULT':

View File

@ -9,38 +9,45 @@
# (required) Setup cinder-volume to use volume driver.
#
# [*san_thin_provision*]
# (optional) Use thin provisioning for SAN volumes? Defaults to true.
# (Optional) Use thin provisioning for SAN volumes?
# Defaults to true.
#
# [*san_ip*]
# (optional) IP address of SAN controller.
# (Optional) IP address of SAN controller.
#
# [*san_login*]
# (optional) Username for SAN controller. Defaults to 'admin'.
# (Optional) Username for SAN controller.
# Defaults to 'admin'.
#
# [*san_password*]
# (optional) Password for SAN controller.
# (Optional) Password for SAN controller.
#
# [*san_private_key*]
# (optional) Filename of private key to use for SSH authentication.
# (Optional) Filename of private key to use for SSH authentication.
#
# [*san_clustername*]
# (optional) Cluster name to use for creating volumes.
# (Optional) Cluster name to use for creating volumes.
#
# [*san_ssh_port*]
# (optional) SSH port to use with SAN. Defaults to 22.
# (Optional) SSH port to use with SAN.
# Defaults to 22.
#
# [*san_is_local*]
# (optional) Execute commands locally instead of over SSH
# (Optional) Execute commands locally instead of over SSH
# use if the volume service is running on the SAN device.
# Defaults to 'false'.
#
# [*ssh_conn_timeout*]
# (optional) SSH connection timeout in seconds. Defaults to 30.
# (Optional) SSH connection timeout in seconds.
# Defaults to '30'.
#
# [*ssh_min_pool_conn*]
# (optional) Minimum ssh connections in the pool.
# (Optional) Minimum ssh connections in the pool.
# Defaults to '1'.
#
# [*ssh_min_pool_conn*]
# (optional) Maximum ssh connections in the pool.
# [*ssh_max_pool_conn*]
# (Optional) Maximum ssh connections in the pool.
# Defaults to '5'.
#
class cinder::volume::san (
$volume_driver,