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

- This puppet-lint plugin checks if all parameters are documented
- Fix all the undocumented parameters.

Change-Id: Id9a9d11a972f6db46ed047b0a1f223995193476a
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
This commit is contained in:
Gael Chamoulaud 2015-03-03 18:32:53 +01:00
parent a0951a2b6c
commit 0d8dc6f095
11 changed files with 194 additions and 44 deletions

View File

@ -7,6 +7,7 @@ group :development, :test do
gem 'puppet-lint', '~> 1.1'
gem 'metadata-json-lint'
gem 'puppet-lint-param-docs'
gem 'puppet-lint-absolute_classname-check'
gem 'puppet-lint-absolute_template_path'
gem 'puppet-lint-trailing_newline-check'

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 manila api port
# Defaults to 5000

View File

@ -4,15 +4,15 @@
#
# === Parameters
#
# [*enabled_backends*]
# (required) a list of ini sections to enable.
# This should contain names used in ceph::backend::* resources.
# Example: ['share1', 'share2', 'sata3']
# [*enabled_share_backends*]
# (Required) a list of ini sections to enable.
# This should contain names used in ceph::backend::* resources.
# Example: ['share1', 'share2', 'sata3']
#
# Author: Andrew Woodward <awoodward@mirantis.com>
class manila::backends (
$enabled_share_backends = undef
){
$enabled_share_backends = undef
) {
# Maybe this could be extented to dynamicly find the enabled names
manila_config {

View File

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

View File

@ -18,10 +18,10 @@
# DEFAULT/bar:
# value: barValue
#
# [**manila_config**]
# [*manila_config*]
# (optional) Allow configuration of manila.conf configurations.
#
# [**api_paste_ini_config**]
# [*api_paste_ini_config*]
# (optional) Allow configuration of /etc/manila/api-paste.ini configurations.
#
# NOTE: The configuration MUST NOT be already handled by this module

View File

@ -3,30 +3,34 @@
#
# == 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 manila.
# [*dbname*]
# name of the database. Optional. Defaults to manila.
#
# [*user*]
# user to connect to the database. Optional. Defaults to manila.
# [*user*]
# user to connect to the database. Optional. Defaults to manila.
#
# [*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'
#
# [*mysql_module*]
# [*cluster_id*]
# (Optional) The cluster id.
# Defaults to 'localzone'.
#
# [*mysql_module*]
# (optional) Deprecated. Does nothing.
#
class manila::db::mysql (

View File

@ -1,16 +1,55 @@
# Class: manila
#
# == Parameters
# [sql_connection]
#
# [*sql_connection*]
# Url used to connect to database.
# (Optional) Defaults to
# 'sqlite:////var/lib/manila/manila.sqlite'
#
# [sql_idle_timeout]
# [*sql_idle_timeout*]
# Timeout when db connections should be reaped.
# (Optional) Defaults to 3600.
#
# [*control_exchange*]
# (Optional) The default exchange under which topics are scope.
# Defaults to 'openstack'.
#
# [*rpc_backend*]
# (Optional) Use these options to configure the RabbitMQ message system.
# Defaults to 'heat.openstack.common.rpc.impl_kombu'
#
# [*package_ensure*]
# (Optional) Ensure state for package.
# Defaults to 'present'
#
# [*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
# (Optional) Connect over SSL for RabbitMQ.
# Defaults to false
#
# [*kombu_ssl_ca_certs*]
@ -31,15 +70,47 @@
# available on some distributions.
# Defaults to 'TLSv1'
#
# [amqp_durable_queues]
# [*amqp_durable_queues*]
# Use durable queues in amqp.
# (Optional) Defaults to false.
#
# [use_syslog]
# ==== Various QPID options (Optional)
#
# [*qpid_hostname*]
#
# [*qpid_port*]
#
# [*qpid_username*]
#
# [*qpid_password*]
#
# [*qpid_heartbeat*]
#
# [*qpid_protocol*]
#
# [*qpid_tcp_nodelay*]
#
# [*qpid_reconnect*]
#
# [*qpid_reconnect_timeout*]
#
# [*qpid_reconnect_limit*]
#
# [*qpid_reconnect_interval*]
#
# [*qpid_reconnect_interval_min*]
#
# [*qpid_reconnect_interval_max*]
#
# [*qpid_sasl_mechanisms*]
# (Optional) ENable one or more SASL mechanisms.
# Defaults to false.
#
# [*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.
#
@ -64,13 +135,24 @@
# (optional) CA certificate file to use to verify connecting clients
# Defaults to false, not set_
#
# [*verbose*]
# (Optional) Should the daemons log verbose messages
# Defaults to false
#
# [*debug*]
# (Optional) Should the daemons log debug messages
# Defaults to false
#
# [*api_paste_config*]
# (Optional) Allow Configuration of /etc/manila/api-paste.ini.
#
# [*storage_availability_zone*]
# (optional) Availability zone of the node.
# Defaults to 'nova'
#
# [*rootwrap_config*]
# (optional) Path to the rootwrap configuration file to use for
# running commands as root
# (optional) Path to the rootwrap configuration file to use for
# running commands as root
#
class manila (
$sql_connection = 'sqlite:////var/lib/manila/manila.sqlite',

View File

@ -1,13 +1,36 @@
# == Class: manila::qpid
#
# class for installing qpid server for manila
# Class for installing qpid server for manila
#
# === Parameters
#
# [*enabled*]
# (Optional) Whether to enable the service
# Defaults to true.
#
# [*user*]
# (Optional) The user to create in qpid
# Defaults to 'guest'.
#
# [*password*]
# (Optional) The password to create for the user
# Defaults to 'guest'.
#
# [*file*]
# (Optional) Sasl file for the user
# Defaults to '/var/lib/qpidd/qpidd.sasldb'.
#
# [*realm*]
# (Optional) Realm for the user
# Defaults to 'OPENSTACK'.
#
#
class manila::qpid(
$enabled = true,
$user='guest',
$password='guest',
$file='/var/lib/qpidd/qpidd.sasldb',
$realm='OPENSTACK'
class manila::qpid (
$enabled = true,
$user = 'guest',
$password = 'guest',
$file = '/var/lib/qpidd/qpidd.sasldb',
$realm = 'OPENSTACK'
) {
# only configure manila after the queue is up
@ -31,5 +54,4 @@ class manila::qpid(
class { '::qpid::server':
service_ensure => $service_ensure,
}
}

View File

@ -1,3 +1,24 @@
# == Class: manila::scheduler
#
# Install and manage Manila scheduler.
#
# === Parameters
#
# [*scheduler_driver*]
# (Optional) Description
# Defaults to false.
#
# [*package_ensure*]
# (Optional) The state of the scheduler package
# Defaults to 'present'.
#
# [*enabled*]
# (Optional) Whether to run the scheduler service
# Defaults to true.
#
# [*manage_service*]
# (Optional) Whether to start/stop the service
# Defaults to true.
#
class manila::scheduler (
$scheduler_driver = false,

View File

@ -1,3 +1,19 @@
# == Class: manila::share
#
# === Parameters
#
# [*package_ensure*]
# (Optional) Ensure State for package
# Defaults to 'present'.
#
# [*enabled*]
# (Optional) Should the service be enabled
# Defaults to true.
#
# [*manage_service*]
# (Optional) Whether the service should be managed by Puppet
# Defaults to true.
#
# $share_name_template = share-%s
class manila::share (
$package_ensure = 'present',

View File

@ -60,6 +60,6 @@ define manila::type_set (
path => ['/usr/bin', '/bin'],
command => "manila type-key ${type} set ${key}=${name}",
environment => concat($manila_env, $region_env),
require => Package['python-manilaclient']
require => Package['python-manilaclient'],
}
}