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"
}
@@ -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

@@ -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,
}
}

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

@@ -32,6 +32,8 @@ class openstack::swift::storage-node (
byte_size => $byte_size,
}
}
default: {
}
}
# install all swift storage servers together