Various Puppet lint fixes

* Fix following warnings:
    * case statement without a default case
    * double quoted string containing no variables
    * indentation of => is not properly aligned
    * mode should be represented as a 4 digit octal value or symbolic mode
    * quoted boolean value found
    * unquoted file mode
    * variable not enclosed in {}
* Fix following errors:
    * trailing whitespace found
    * two-space soft tabs not used
* Remove quotes around class in include/require statements

Change-Id: Ia407416e51c09fb303675863afa68f526a37abcf
This commit is contained in:
Mathieu Gagné
2013-07-01 22:17:04 -04:00
parent 0f6398f244
commit 394e614ab2
15 changed files with 33 additions and 29 deletions

View File

@@ -237,7 +237,7 @@ class openstack::all (
if $glance_api_servers { if $glance_api_servers {
$glance_api_servers_real = $glance_api_servers $glance_api_servers_real = $glance_api_servers
} else { } else {
$glance_api_servers_real = "$internal_address_real:9292" $glance_api_servers_real = "${internal_address_real}:9292"
} }
@@ -385,8 +385,8 @@ class openstack::all (
# Glance # Glance
glance_api_servers => $glance_api_servers_real, glance_api_servers => $glance_api_servers_real,
# VNC # VNC
vnc_enabled => $vnc_enabled, vnc_enabled => $vnc_enabled,
vncproxy_host => $vncproxy_host_real, vncproxy_host => $vncproxy_host_real,
# General # General
verbose => $verbose, verbose => $verbose,
enabled => $enabled, enabled => $enabled,
@@ -445,7 +445,7 @@ class openstack::all (
} else { } else {
if ! $fixed_range { if ! $fixed_range {
fail("Must specify the fixed range when using nova-networks") fail('Must specify the fixed range when using nova-networks')
} }
if $multi_host { if $multi_host {

View File

@@ -9,7 +9,7 @@ class openstack::auth_file(
$keystone_admin_token = 'keystone_admin_token', $keystone_admin_token = 'keystone_admin_token',
$admin_user = 'admin', $admin_user = 'admin',
$admin_tenant = 'admin', $admin_tenant = 'admin',
$use_no_cache = 'true' $use_no_cache = true
) { ) {
file { '/root/openrc': file { '/root/openrc':
content => content =>

View File

@@ -32,26 +32,26 @@ class openstack::client (
) { ) {
if $ceilometer { if $ceilometer {
include 'ceilometer::client' include ceilometer::client
} }
if $cinder { if $cinder {
include 'cinder::client' include cinder::client
} }
if $glance { if $glance {
include 'glance::client' include glance::client
} }
if $keystone { if $keystone {
include 'keystone::client' include keystone::client
} }
if $nova { if $nova {
include 'nova::client' include nova::client
} }
if $quantum { if $quantum {
include 'quantum::client' include quantum::client
} }
} }

View File

@@ -44,7 +44,7 @@ class openstack::compute (
$enable_ovs_agent = true, $enable_ovs_agent = true,
$enable_l3_agent = false, $enable_l3_agent = false,
$enable_dhcp_agent = false, $enable_dhcp_agent = false,
$quantum_auth_url = "http://127.0.0.1:35357/v2.0", $quantum_auth_url = 'http://127.0.0.1:35357/v2.0',
$keystone_host = '127.0.0.1', $keystone_host = '127.0.0.1',
$quantum_host = '127.0.0.1', $quantum_host = '127.0.0.1',
$ovs_local_ip = false, $ovs_local_ip = false,
@@ -137,7 +137,7 @@ class openstack::compute (
if ! $quantum { if ! $quantum {
if ! $fixed_range { if ! $fixed_range {
fail("Must specify the fixed range when using nova-networks") fail('Must specify the fixed range when using nova-networks')
} }
if $multi_host { if $multi_host {

View File

@@ -350,8 +350,8 @@ class openstack::controller (
# Glance # Glance
glance_api_servers => $glance_api_servers, glance_api_servers => $glance_api_servers,
# VNC # VNC
vnc_enabled => $vnc_enabled, vnc_enabled => $vnc_enabled,
vncproxy_host => $vncproxy_host_real, vncproxy_host => $vncproxy_host_real,
# General # General
verbose => $verbose, verbose => $verbose,
enabled => $enabled, enabled => $enabled,
@@ -368,9 +368,9 @@ class openstack::controller (
fail('quantum_db_password must be set when configuring quantum') fail('quantum_db_password must be set when configuring quantum')
} }
if ! $bridge_interface { if ! $bridge_interface {
fail('bridge_interface must be set when configuring quantum') fail('bridge_interface must be set when configuring quantum')
} }
class { 'openstack::quantum': class { 'openstack::quantum':
# Database # Database

View File

@@ -44,7 +44,7 @@ class openstack::glance (
$backend = 'file', $backend = 'file',
$swift_store_user = false, $swift_store_user = false,
$swift_store_key = false, $swift_store_key = false,
$swift_store_auth_address = "http://127.0.0.1:5000/v2.0/", $swift_store_auth_address = 'http://127.0.0.1:5000/v2.0/',
$verbose = 'False', $verbose = 'False',
$enabled = true $enabled = true
) { ) {

View File

@@ -83,6 +83,8 @@ class openstack::nova::controller (
'mysql': { 'mysql': {
$nova_db = "mysql://${nova_db_user}:${nova_db_password}@${db_host}/${nova_db_dbname}" $nova_db = "mysql://${nova_db_user}:${nova_db_password}@${db_host}/${nova_db_dbname}"
} }
default: {
}
} }
if ($glance_api_servers == undef) { if ($glance_api_servers == undef) {

View File

@@ -222,7 +222,7 @@ class openstack::quantum (
} }
} }
if $enable_l3_agent { if $enable_l3_agent {
class {"quantum::agents::l3": class { 'quantum::agents::l3':
use_namespaces => true, use_namespaces => true,
} }
} }
@@ -236,7 +236,7 @@ class openstack::quantum (
shared_secret => $shared_secret, shared_secret => $shared_secret,
auth_url => $auth_url, auth_url => $auth_url,
metadata_ip => $metadata_ip, metadata_ip => $metadata_ip,
} }
} }
} }

View File

@@ -18,7 +18,7 @@ class openstack::repo::epel {
source => 'puppet:///modules/openstack/RPM-GPG-KEY-EPEL-6', source => 'puppet:///modules/openstack/RPM-GPG-KEY-EPEL-6',
owner => root, owner => root,
group => root, group => root,
mode => 644, mode => '0644',
before => Yumrepo['epel'], before => Yumrepo['epel'],
} }
Yumrepo['epel'] -> Package<||> Yumrepo['epel'] -> Package<||>

View File

@@ -23,7 +23,7 @@ class openstack::repo::rdo {
source => 'puppet:///modules/openstack/RPM-GPG-KEY-RDO-Grizzly', source => 'puppet:///modules/openstack/RPM-GPG-KEY-RDO-Grizzly',
owner => root, owner => root,
group => root, group => root,
mode => 644, mode => '0644',
before => Yumrepo['rdo-release'], before => Yumrepo['rdo-release'],
} }
Yumrepo['rdo-release'] -> Package<||> Yumrepo['rdo-release'] -> Package<||>

View File

@@ -103,7 +103,7 @@ class openstack::swift::proxy (
# exports rsync gets that can be used to sync the ring files # exports rsync gets that can be used to sync the ring files
@@swift::ringsync { ['account', 'object', 'container']: @@swift::ringsync { ['account', 'object', 'container']:
ring_server => $swift_local_net_ip ring_server => $swift_local_net_ip
} }
# deploy a script that can be used for testing # deploy a script that can be used for testing

View File

@@ -25,13 +25,15 @@ class openstack::swift::storage-node (
require => Class['swift'], require => Class['swift'],
} }
} }
# make xfs filesystem on physical disk and mount them # make xfs filesystem on physical disk and mount them
'disk': { 'disk': {
swift::storage::disk {$storage_devices: swift::storage::disk {$storage_devices:
mnt_base_dir => $storage_mnt_base_dir, mnt_base_dir => $storage_mnt_base_dir,
byte_size => $byte_size, byte_size => $byte_size,
} }
} }
default: {
}
} }
# install all swift storage servers together # install all swift storage servers together