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:
parent
6b7d92551e
commit
d3bc94f168
@ -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 (
|
||||
$rabbit_password,
|
||||
$sql_connection,
|
||||
@ -16,9 +12,9 @@ class cinder::base (
|
||||
$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,
|
||||
sql_connection => $sql_connection,
|
||||
rabbit_host => $rabbit_host,
|
||||
|
@ -18,13 +18,12 @@ class cinder::db::mysql (
|
||||
password => $password,
|
||||
host => $host,
|
||||
charset => $charset,
|
||||
# I may want to inject some sql
|
||||
require => Class['mysql::config'],
|
||||
}
|
||||
|
||||
if $allowed_hosts {
|
||||
# TODO this class should be in the mysql namespace
|
||||
cinder::db::mysql::host_access { $allowed_hosts:
|
||||
# TODO this class should be in the mysql namespace
|
||||
cinder::db::mysql::host_access { $allowed_hosts:
|
||||
user => $user,
|
||||
password => $password,
|
||||
database => $dbname,
|
||||
|
@ -4,13 +4,13 @@
|
||||
define cinder::db::mysql::host_access ($user, $password, $database) {
|
||||
database_user { "${user}@${name}":
|
||||
password_hash => mysql_password($password),
|
||||
provider => 'mysql',
|
||||
require => Database[$database],
|
||||
provider => 'mysql',
|
||||
require => Database[$database],
|
||||
}
|
||||
database_grant { "${user}@${name}/${database}":
|
||||
# TODO figure out which privileges to grant.
|
||||
privileges => "all",
|
||||
provider => 'mysql',
|
||||
require => Database_user["${user}@${name}"]
|
||||
privileges => 'all',
|
||||
provider => 'mysql',
|
||||
require => Database_user["${user}@${name}"]
|
||||
}
|
||||
}
|
||||
|
@ -8,14 +8,14 @@ class cinder::db::postgresql(
|
||||
$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' |>
|
||||
|
||||
postgresql::db { "${dbname}":
|
||||
user => "${user}",
|
||||
password => "${password}",
|
||||
postgresql::db { $dbname:
|
||||
user => $user,
|
||||
password => $password,
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -80,13 +80,13 @@ class cinder (
|
||||
if $rabbit_hosts {
|
||||
cinder_config { 'DEFAULT/rabbit_hosts': value => join($rabbit_hosts, ',') }
|
||||
cinder_config { 'DEFAULT/rabbit_ha_queues': value => true }
|
||||
} else {
|
||||
cinder_config { 'DEFAULT/rabbit_host': value => $rabbit_host }
|
||||
cinder_config { 'DEFAULT/rabbit_port': value => $rabbit_port }
|
||||
cinder_config { 'DEFAULT/rabbit_hosts': value => "${rabbit_host}:${rabbit_port}" }
|
||||
cinder_config { 'DEFAULT/rabbit_ha_queues': value => false }
|
||||
}
|
||||
}
|
||||
} else {
|
||||
cinder_config { 'DEFAULT/rabbit_host': value => $rabbit_host }
|
||||
cinder_config { 'DEFAULT/rabbit_port': value => $rabbit_port }
|
||||
cinder_config { 'DEFAULT/rabbit_hosts': value => "${rabbit_host}:${rabbit_port}" }
|
||||
cinder_config { 'DEFAULT/rabbit_ha_queues': value => false }
|
||||
}
|
||||
}
|
||||
|
||||
if $rpc_backend == 'cinder.openstack.common.rpc.impl_qpid' {
|
||||
|
||||
|
@ -29,11 +29,11 @@ class cinder::keystone::auth (
|
||||
keystone_service { $auth_name:
|
||||
ensure => present,
|
||||
type => $service_type,
|
||||
description => "Cinder Service",
|
||||
description => 'Cinder Service',
|
||||
}
|
||||
|
||||
if $configure_endpoint {
|
||||
keystone_endpoint { "${region}/$auth_name":
|
||||
keystone_endpoint { "${region}/${auth_name}":
|
||||
ensure => present,
|
||||
public_url => "${public_protocol}://${public_address}:${port}/${volume_version}/%(tenant_id)s",
|
||||
admin_url => "http://${admin_address}:${port}/${volume_version}/%(tenant_id)s",
|
||||
|
@ -17,11 +17,11 @@ class cinder::qpid(
|
||||
$service_ensure = 'running'
|
||||
|
||||
qpid_user { $user:
|
||||
password => $password,
|
||||
file => $file,
|
||||
realm => $realm,
|
||||
password => $password,
|
||||
file => $file,
|
||||
realm => $realm,
|
||||
provider => 'saslpasswd2',
|
||||
require => Class['qpid::server'],
|
||||
require => Class['qpid::server'],
|
||||
}
|
||||
|
||||
} else {
|
||||
@ -29,7 +29,7 @@ class cinder::qpid(
|
||||
}
|
||||
|
||||
class { 'qpid::server':
|
||||
service_ensure => $service_ensure
|
||||
service_ensure => $service_ensure
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3,10 +3,10 @@
|
||||
#
|
||||
#
|
||||
class cinder::rabbitmq(
|
||||
$userid ='guest',
|
||||
$password ='guest',
|
||||
$port ='5672',
|
||||
$virtual_host ='/',
|
||||
$userid = 'guest',
|
||||
$password = 'guest',
|
||||
$port = '5672',
|
||||
$virtual_host = '/',
|
||||
$enabled = true
|
||||
) {
|
||||
|
||||
@ -19,10 +19,10 @@ class cinder::rabbitmq(
|
||||
} else {
|
||||
$delete_guest_user = true
|
||||
rabbitmq_user { $userid:
|
||||
admin => true,
|
||||
password => $password,
|
||||
admin => true,
|
||||
password => $password,
|
||||
provider => 'rabbitmqctl',
|
||||
require => Class['rabbitmq::server'],
|
||||
require => Class['rabbitmq::server'],
|
||||
}
|
||||
# I need to figure out the appropriate permissions
|
||||
rabbitmq_user_permissions { "${userid}@${virtual_host}":
|
||||
@ -46,7 +46,7 @@ class cinder::rabbitmq(
|
||||
if ($enabled) {
|
||||
rabbitmq_vhost { $virtual_host:
|
||||
provider => 'rabbitmqctl',
|
||||
require => Class['rabbitmq::server'],
|
||||
require => Class['rabbitmq::server'],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ class cinder::volume::glusterfs (
|
||||
$glusterfs_disk_util = undef,
|
||||
$glusterfs_sparsed_volumes = 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")
|
||||
|
@ -11,7 +11,7 @@ class cinder::volume::iscsi (
|
||||
'DEFAULT/iscsi_ip_address': value => $iscsi_ip_address;
|
||||
'DEFAULT/iscsi_helper': value => $iscsi_helper;
|
||||
'DEFAULT/volume_group': value => $volume_group;
|
||||
}
|
||||
}
|
||||
|
||||
case $iscsi_helper {
|
||||
'tgtadm': {
|
||||
@ -22,11 +22,11 @@ class cinder::volume::iscsi (
|
||||
|
||||
if($::osfamily == 'RedHat') {
|
||||
file_line { 'cinder include':
|
||||
path => '/etc/tgt/targets.conf',
|
||||
line => "include /etc/cinder/volumes/*",
|
||||
match => '#?include /',
|
||||
path => '/etc/tgt/targets.conf',
|
||||
line => 'include /etc/cinder/volumes/*',
|
||||
match => '#?include /',
|
||||
require => Package['tgt'],
|
||||
notify => Service['tgtd'],
|
||||
notify => Service['tgtd'],
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@ class cinder::volume::nfs (
|
||||
$nfs_disk_util = undef,
|
||||
$nfs_sparsed_volumes = undef,
|
||||
$nfs_mount_point_base = undef,
|
||||
$nfs_shares_config = "/etc/cinder/shares.conf"
|
||||
$nfs_shares_config = '/etc/cinder/shares.conf'
|
||||
) {
|
||||
|
||||
file {$nfs_shares_config:
|
||||
|
Loading…
x
Reference in New Issue
Block a user