Merge "Add Puppet 4.x lint checks"

This commit is contained in:
Jenkins 2015-02-12 16:28:56 +00:00 committed by Gerrit Code Review
commit 9a4568c361
11 changed files with 33 additions and 23 deletions

12
Gemfile
View File

@ -2,8 +2,18 @@ source 'https://rubygems.org'
group :development, :test do group :development, :test do
gem 'puppetlabs_spec_helper', :require => false gem 'puppetlabs_spec_helper', :require => false
gem 'puppet-lint', '~> 0.3.2'
gem 'rspec-puppet', '~> 1.0.1' gem 'rspec-puppet', '~> 1.0.1'
gem 'puppet-lint', '~> 1.1.0'
gem 'puppet-lint-absolute_classname-check'
gem 'puppet-lint-absolute_template_path'
gem 'puppet-lint-trailing_newline-check'
# Puppet 4.x related lint checks
gem 'puppet-lint-unquoted_string-check'
gem 'puppet-lint-leading_zero-check'
gem 'puppet-lint-variable_contains_upcase'
gem 'puppet-lint-numericvariable'
gem 'rake', '10.1.1' gem 'rake', '10.1.1'
gem 'rspec', '< 2.99' gem 'rspec', '< 2.99'
gem 'json' gem 'json'

View File

@ -226,7 +226,7 @@ class glance::api(
$auth_protocol = 'http', $auth_protocol = 'http',
) inherits glance { ) inherits glance {
include glance::policy include ::glance::policy
require keystone::python require keystone::python
if $mysql_module { if $mysql_module {

View File

@ -27,7 +27,7 @@ class glance::backend::rbd(
$show_image_direct_url = undef, $show_image_direct_url = undef,
$package_ensure = 'present', $package_ensure = 'present',
) { ) {
include glance::params include ::glance::params
if $show_image_direct_url { if $show_image_direct_url {
notice('parameter show_image_direct_url is deprecated, use parameter in glance::api') notice('parameter show_image_direct_url is deprecated, use parameter in glance::api')

View File

@ -33,7 +33,7 @@ class glance::cache::cleaner (
$command_options = '', $command_options = '',
) { ) {
include glance::params include ::glance::params
cron { 'glance-cache-cleaner': cron { 'glance-cache-cleaner':
command => "${glance::params::cache_cleaner_command} ${command_options}", command => "${glance::params::cache_cleaner_command} ${command_options}",

View File

@ -33,7 +33,7 @@ class glance::cache::pruner (
$command_options = '', $command_options = '',
) { ) {
include glance::params include ::glance::params
cron { 'glance-cache-pruner': cron { 'glance-cache-pruner':
command => "${glance::params::cache_pruner_command} ${command_options}", command => "${glance::params::cache_pruner_command} ${command_options}",

View File

@ -8,7 +8,7 @@ class glance::client (
$ensure = 'present' $ensure = 'present'
) { ) {
include glance::params include ::glance::params
package { 'python-glanceclient': package { 'python-glanceclient':
ensure => $ensure, ensure => $ensure,

View File

@ -8,7 +8,7 @@ class glance(
$package_ensure = 'present' $package_ensure = 'present'
) { ) {
include glance::params include ::glance::params
file { '/etc/glance/': file { '/etc/glance/':
ensure => directory, ensure => directory,

View File

@ -1,4 +1,4 @@
class { 'glance::api': class { '::glance::api':
debug => true, debug => true,
verbose => true, verbose => true,
} }

View File

@ -1 +1 @@
class { 'glance': } class { '::glance': }

View File

@ -1,4 +1,4 @@
class { 'glance::registry': class { '::glance::registry':
debug => true, debug => true,
verbose => true, verbose => true,
} }

View File

@ -4,21 +4,21 @@
Exec { logoutput => 'on_failure' } Exec { logoutput => 'on_failure' }
node glance_keystone_mysql { node glance_keystone_mysql {
class { 'mysql::server': } class { '::mysql::server': }
class { 'keystone': class { '::keystone':
verbose => true, verbose => true,
debug => true, debug => true,
catalog_type => 'sql', catalog_type => 'sql',
admin_token => 'admin_token', admin_token => 'admin_token',
} }
class { 'keystone::db::mysql': class { '::keystone::db::mysql':
password => 'keystone', password => 'keystone',
} }
class { 'keystone::roles::admin': class { '::keystone::roles::admin':
email => 'test@puppetlabs.com', email => 'test@puppetlabs.com',
password => 'ChangeMe', password => 'ChangeMe',
} }
class { 'glance::api': class { '::glance::api':
verbose => true, verbose => true,
debug => true, debug => true,
auth_type => 'keystone', auth_type => 'keystone',
@ -27,9 +27,9 @@ node glance_keystone_mysql {
keystone_password => 'glance_password', keystone_password => 'glance_password',
database_connection => 'mysql://glance:glance@127.0.0.1/glance', database_connection => 'mysql://glance:glance@127.0.0.1/glance',
} }
class { 'glance::backend::file': } class { '::glance::backend::file': }
class { 'glance::db::mysql': class { '::glance::db::mysql':
password => 'glance', password => 'glance',
dbname => 'glance', dbname => 'glance',
user => 'glance', user => 'glance',
@ -38,7 +38,7 @@ node glance_keystone_mysql {
# $cluster_id = 'localzone' # $cluster_id = 'localzone'
} }
class { 'glance::registry': class { '::glance::registry':
verbose => true, verbose => true,
debug => true, debug => true,
auth_type => 'keystone', auth_type => 'keystone',
@ -47,7 +47,7 @@ node glance_keystone_mysql {
keystone_password => 'glance_password', keystone_password => 'glance_password',
database_connection => 'mysql://glance:glance@127.0.0.1/glance', database_connection => 'mysql://glance:glance@127.0.0.1/glance',
} }
class { 'glance::keystone::auth': class { '::glance::keystone::auth':
password => 'glance_pass', password => 'glance_pass',
} }
} }