Various Puppet lint fixes

* Fixes following warnings:
    * double quoted string containing no variables
    * string containing only a variable
    * variable not enclosed in {}
    * indentation of => is not properly aligned
* Fix following error:
    * two-space soft tabs not used
* Remove some comments from the code, they added no value.

Change-Id: I3165e65e95c3565951077786d2edf77245460c35
This commit is contained in:
Mathieu Gagné 2013-07-01 16:09:34 -04:00
parent 6b7d92551e
commit d3bc94f168
11 changed files with 43 additions and 48 deletions

View File

@ -1,8 +1,4 @@
# #
# parameters that may need to be added
# $state_path = /opt/stack/data/cinder
# $osapi_volume_extension = cinder.api.openstack.volume.contrib.standard_extensions
# $root_helper = sudo /usr/local/bin/cinder-rootwrap /etc/cinder/rootwrap.conf
class cinder::base ( class cinder::base (
$rabbit_password, $rabbit_password,
$sql_connection, $sql_connection,
@ -16,9 +12,9 @@ class cinder::base (
$verbose = false $verbose = false
) { ) {
warning('The "cinder::base" class is deprecated. Use "cinder" instead.') warning('The cinder::base class is deprecated. Use cinder instead.')
class { "cinder": class { 'cinder':
rabbit_password => $rabbit_password, rabbit_password => $rabbit_password,
sql_connection => $sql_connection, sql_connection => $sql_connection,
rabbit_host => $rabbit_host, rabbit_host => $rabbit_host,

View File

@ -18,7 +18,6 @@ class cinder::db::mysql (
password => $password, password => $password,
host => $host, host => $host,
charset => $charset, charset => $charset,
# I may want to inject some sql
require => Class['mysql::config'], require => Class['mysql::config'],
} }

View File

@ -9,7 +9,7 @@ define cinder::db::mysql::host_access ($user, $password, $database) {
} }
database_grant { "${user}@${name}/${database}": database_grant { "${user}@${name}/${database}":
# TODO figure out which privileges to grant. # TODO figure out which privileges to grant.
privileges => "all", privileges => 'all',
provider => 'mysql', provider => 'mysql',
require => Database_user["${user}@${name}"] require => Database_user["${user}@${name}"]
} }

View File

@ -8,14 +8,14 @@ class cinder::db::postgresql(
$user = 'cinder' $user = 'cinder'
) { ) {
require 'postgresql::python' require postgresql::python
Postgresql::Db[$dbname] ~> Exec<| title == 'cinder-manage db_sync' |> Postgresql::Db[$dbname] ~> Exec<| title == 'cinder-manage db_sync' |>
Package['python-psycopg2'] -> Exec<| title == 'cinder-manage db_sync' |> Package['python-psycopg2'] -> Exec<| title == 'cinder-manage db_sync' |>
postgresql::db { "${dbname}": postgresql::db { $dbname:
user => "${user}", user => $user,
password => "${password}", password => $password,
} }
} }

View File

@ -29,11 +29,11 @@ class cinder::keystone::auth (
keystone_service { $auth_name: keystone_service { $auth_name:
ensure => present, ensure => present,
type => $service_type, type => $service_type,
description => "Cinder Service", description => 'Cinder Service',
} }
if $configure_endpoint { if $configure_endpoint {
keystone_endpoint { "${region}/$auth_name": keystone_endpoint { "${region}/${auth_name}":
ensure => present, ensure => present,
public_url => "${public_protocol}://${public_address}:${port}/${volume_version}/%(tenant_id)s", public_url => "${public_protocol}://${public_address}:${port}/${volume_version}/%(tenant_id)s",
admin_url => "http://${admin_address}:${port}/${volume_version}/%(tenant_id)s", admin_url => "http://${admin_address}:${port}/${volume_version}/%(tenant_id)s",

View File

@ -3,10 +3,10 @@
# #
# #
class cinder::rabbitmq( class cinder::rabbitmq(
$userid ='guest', $userid = 'guest',
$password ='guest', $password = 'guest',
$port ='5672', $port = '5672',
$virtual_host ='/', $virtual_host = '/',
$enabled = true $enabled = true
) { ) {

View File

@ -37,7 +37,7 @@ class cinder::volume::glusterfs (
$glusterfs_disk_util = undef, $glusterfs_disk_util = undef,
$glusterfs_sparsed_volumes = undef, $glusterfs_sparsed_volumes = undef,
$glusterfs_mount_point_base = undef, $glusterfs_mount_point_base = undef,
$glusterfs_shares_config = "/etc/cinder/shares.conf" $glusterfs_shares_config = '/etc/cinder/shares.conf'
) { ) {
$content = join($glusterfs_shares, "\n") $content = join($glusterfs_shares, "\n")

View File

@ -23,7 +23,7 @@ class cinder::volume::iscsi (
if($::osfamily == 'RedHat') { if($::osfamily == 'RedHat') {
file_line { 'cinder include': file_line { 'cinder include':
path => '/etc/tgt/targets.conf', path => '/etc/tgt/targets.conf',
line => "include /etc/cinder/volumes/*", line => 'include /etc/cinder/volumes/*',
match => '#?include /', match => '#?include /',
require => Package['tgt'], require => Package['tgt'],
notify => Service['tgtd'], notify => Service['tgtd'],

View File

@ -5,7 +5,7 @@ class cinder::volume::nfs (
$nfs_disk_util = undef, $nfs_disk_util = undef,
$nfs_sparsed_volumes = undef, $nfs_sparsed_volumes = undef,
$nfs_mount_point_base = undef, $nfs_mount_point_base = undef,
$nfs_shares_config = "/etc/cinder/shares.conf" $nfs_shares_config = '/etc/cinder/shares.conf'
) { ) {
file {$nfs_shares_config: file {$nfs_shares_config: