Add Puppet 4.x lint checks
This changes the puppet-lint requirement to 1.1.x, so that we can use puppet-lint plugins. Most of these plugins are for 4.x compat, but some just catch common errors. Change-Id: I6a4e08d91f8cc19eb1e59af03a2a7d14716ddc38
This commit is contained in:
parent
8cc6d0e60e
commit
6c47d9f4bc
12
Gemfile
12
Gemfile
@ -2,9 +2,19 @@ source 'https://rubygems.org'
|
||||
|
||||
group :development, :test do
|
||||
gem 'puppetlabs_spec_helper', :require => false
|
||||
|
||||
gem 'puppet-lint', '~> 1.1'
|
||||
gem 'rspec-puppet', '~> 1.0.1'
|
||||
gem 'puppet-lint-param-docs', '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 'rspec-puppet', '~> 1.0.1'
|
||||
gem 'rake', '10.1.1'
|
||||
gem 'rspec', '< 2.99'
|
||||
gem 'json'
|
||||
|
@ -21,18 +21,18 @@
|
||||
#
|
||||
# sudo pcs constraint colocation add cinder_api_service with cinder_vip
|
||||
|
||||
class { 'cinder':
|
||||
class { '::cinder':
|
||||
database_connection => 'mysql://cinder:secret_block_password@openstack-controller.example.com/cinder',
|
||||
}
|
||||
|
||||
class { 'cinder::api':
|
||||
class { '::cinder::api':
|
||||
keystone_password => 'CINDER_PW',
|
||||
keystone_user => 'cinder',
|
||||
enabled => false,
|
||||
manage_service => false,
|
||||
}
|
||||
|
||||
class { 'cinder::scheduler':
|
||||
class { '::cinder::scheduler':
|
||||
scheduler_driver => 'cinder.scheduler.simple.SimpleScheduler',
|
||||
enabled => false,
|
||||
manage_service => false,
|
||||
|
@ -132,8 +132,8 @@ class cinder::api (
|
||||
$validation_options = {},
|
||||
) {
|
||||
|
||||
include cinder::params
|
||||
include cinder::policy
|
||||
include ::cinder::params
|
||||
include ::cinder::policy
|
||||
|
||||
Cinder_config<||> ~> Service['cinder-api']
|
||||
Cinder_api_paste_ini<||> ~> Service['cinder-api']
|
||||
|
@ -47,7 +47,7 @@ define cinder::backend::emc_vnx (
|
||||
$volume_backend_name = $name,
|
||||
) {
|
||||
|
||||
include cinder::params
|
||||
include ::cinder::params
|
||||
|
||||
cinder_config {
|
||||
"${name}/default_timeout": value => $default_timeout;
|
||||
|
@ -15,7 +15,7 @@ define cinder::backend::iscsi (
|
||||
$iscsi_helper = $::cinder::params::iscsi_helper,
|
||||
) {
|
||||
|
||||
include cinder::params
|
||||
include ::cinder::params
|
||||
|
||||
cinder_config {
|
||||
"${name}/volume_backend_name": value => $volume_backend_name;
|
||||
|
@ -49,7 +49,7 @@ define cinder::backend::rbd (
|
||||
$rbd_max_clone_depth = '5',
|
||||
) {
|
||||
|
||||
include cinder::params
|
||||
include ::cinder::params
|
||||
|
||||
cinder_config {
|
||||
"${name}/volume_backend_name": value => $volume_backend_name;
|
||||
|
@ -58,7 +58,7 @@ class cinder::backup (
|
||||
$backup_name_template = 'backup-%s'
|
||||
) {
|
||||
|
||||
include cinder::params
|
||||
include ::cinder::params
|
||||
|
||||
Cinder_config<||> ~> Service['cinder-backup']
|
||||
Exec<| title == 'cinder-manage db_sync' |> ~> Service['cinder-backup']
|
||||
|
@ -12,7 +12,7 @@ class cinder::client(
|
||||
$package_ensure = 'present'
|
||||
) {
|
||||
|
||||
include cinder::params
|
||||
include ::cinder::params
|
||||
|
||||
package { 'python-cinderclient':
|
||||
ensure => $package_ensure,
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
class cinder::db::sync {
|
||||
|
||||
include cinder::params
|
||||
include ::cinder::params
|
||||
|
||||
exec { 'cinder-manage db_sync':
|
||||
command => $::cinder::params::db_sync_command,
|
||||
|
@ -254,7 +254,7 @@ class cinder (
|
||||
$mysql_module = undef,
|
||||
) {
|
||||
|
||||
include cinder::params
|
||||
include ::cinder::params
|
||||
|
||||
Package['cinder'] -> Cinder_config<||>
|
||||
Package['cinder'] -> Cinder_api_paste_ini<||>
|
||||
|
@ -51,7 +51,7 @@ class cinder::qpid (
|
||||
$service_ensure = 'stopped'
|
||||
}
|
||||
|
||||
class { 'qpid::server':
|
||||
class { '::qpid::server':
|
||||
service_ensure => $service_ensure
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ class cinder::scheduler (
|
||||
$manage_service = true
|
||||
) {
|
||||
|
||||
include cinder::params
|
||||
include ::cinder::params
|
||||
|
||||
Cinder_config<||> ~> Service['cinder-scheduler']
|
||||
Cinder_api_paste_ini<||> ~> Service['cinder-scheduler']
|
||||
|
@ -58,7 +58,7 @@ define cinder::type_set (
|
||||
exec {"cinder type-key ${type} set ${key}=${name}":
|
||||
path => ['/usr/bin', '/bin'],
|
||||
command => "cinder type-key ${type} set ${key}=${name}",
|
||||
unless => "cinder extra-specs-list | grep -Eq '\b${type}\b.*\b${key}\b.*\b${name}\b'",
|
||||
unless => "cinder extra-specs-list | grep -Eq '\\b${type}\\b.*\\b${key}\\b.*\\b${name}\\b'",
|
||||
environment => concat($cinder_env, $region_env),
|
||||
require => Package['python-cinderclient']
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ class cinder::volume (
|
||||
$manage_service = true
|
||||
) {
|
||||
|
||||
include cinder::params
|
||||
include ::cinder::params
|
||||
|
||||
Cinder_config<||> ~> Service['cinder-volume']
|
||||
Cinder_api_paste_ini<||> ~> Service['cinder-volume']
|
||||
|
@ -26,7 +26,7 @@ class cinder::volume::iscsi (
|
||||
$iscsi_helper = $::cinder::params::iscsi_helper,
|
||||
) {
|
||||
|
||||
include cinder::params
|
||||
include ::cinder::params
|
||||
|
||||
cinder::backend::iscsi { 'DEFAULT':
|
||||
iscsi_ip_address => $iscsi_ip_address,
|
||||
|
Loading…
Reference in New Issue
Block a user