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 {
$glance_api_servers_real = $glance_api_servers
} 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_api_servers => $glance_api_servers_real,
# VNC
vnc_enabled => $vnc_enabled,
vncproxy_host => $vncproxy_host_real,
vnc_enabled => $vnc_enabled,
vncproxy_host => $vncproxy_host_real,
# General
verbose => $verbose,
enabled => $enabled,
@@ -445,7 +445,7 @@ class openstack::all (
} else {
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 {

View File

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

View File

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

View File

@@ -44,7 +44,7 @@ class openstack::compute (
$enable_ovs_agent = true,
$enable_l3_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',
$quantum_host = '127.0.0.1',
$ovs_local_ip = false,
@@ -137,7 +137,7 @@ class openstack::compute (
if ! $quantum {
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 {

View File

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

View File

@@ -44,7 +44,7 @@ class openstack::glance (
$backend = 'file',
$swift_store_user = 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',
$enabled = true
) {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,4 +1,4 @@
class { 'openstack::all':
class { 'openstack::all':
public_address => $::ipaddress_eth0,
mysql_root_password => 'password',
rabbit_password => 'password',

View File

@@ -1,4 +1,4 @@
class { 'openstack::controller':
class { 'openstack::controller':
public_address => $::ipaddress_eth0,
mysql_root_password => 'password',
allowed_hosts => ['127.0.0.%', '192.168.1.%'],

View File

@@ -1,4 +1,4 @@
class { 'openstack::nova::compute':
class { 'openstack::nova::compute':
exported_resources => false,
sql_connection => 'mysql://foo:bar@192.168.1.1/nova',
glance_api_servers => '192.168.1.1:9292',