Browse Source

Convert all class usage to relative names

Change-Id: I3c86c44a0e190ea92180e792a291d4ee5ff63da0
changes/83/697883/1
Tobias Urdin 3 years ago
parent
commit
57af2573d6
  1. 2
      examples/init.pp
  2. 14
      manifests/api.pp
  3. 2
      manifests/api/logging.pp
  4. 6
      manifests/client.pp
  5. 4
      manifests/config.pp
  6. 2
      manifests/db.pp
  7. 4
      manifests/db/mysql.pp
  8. 4
      manifests/db/postgresql.pp
  9. 2
      manifests/db/sync.pp
  10. 2
      manifests/init.pp
  11. 2
      manifests/keystone/auth.pp
  12. 2
      manifests/keystone/authtoken.pp
  13. 2
      manifests/keystone/notification.pp
  14. 2
      manifests/params.pp
  15. 4
      manifests/plugins/dogtag.pp
  16. 2
      manifests/plugins/kmip.pp
  17. 2
      manifests/plugins/p11_crypto.pp
  18. 2
      manifests/plugins/simple_crypto.pp
  19. 4
      manifests/policy.pp
  20. 12
      manifests/quota.pp
  21. 2
      manifests/worker.pp
  22. 136
      manifests/wsgi/apache.pp
  23. 10
      spec/acceptance/basic_barbican_spec.rb
  24. 16
      spec/classes/barbican_api_spec.rb

2
examples/init.pp

@ -9,4 +9,4 @@
# Learn more about module testing here:
# https://puppet.com/docs/puppet/latest/bgtm.html#testing-your-module
#
include ::barbican
include barbican

14
manifests/api.pp

@ -305,10 +305,10 @@ class barbican::api (
$max_request_body_size = $::os_service_default,
) inherits barbican::params {
include ::barbican::deps
include ::barbican::db
include ::barbican::client
include ::barbican::policy
include barbican::deps
include barbican::db
include barbican::client
include barbican::policy
# TODO: Remove the posix users and permissions and merge this definition
# with the previous one, once the barbican package has been updated
@ -410,7 +410,7 @@ class barbican::api (
# keystone config
if $auth_strategy == 'keystone' {
include ::barbican::keystone::authtoken
include barbican::keystone::authtoken
barbican_api_paste_ini {
'pipeline:barbican_api/pipeline': value => 'cors authtoken context apiapp';
@ -463,7 +463,7 @@ class barbican::api (
}
if $sync_db {
include ::barbican::db::sync
include barbican::db::sync
}
if $service_name == 'barbican-api' {
@ -487,7 +487,7 @@ class barbican::api (
}
} elsif $service_name == 'httpd' {
include ::apache::params
include apache::params
# Ubuntu packages does not have a barbican-api service
if $::os_package_type != 'ubuntu' {
service { 'barbican-api':

2
manifests/api/logging.pp

@ -123,7 +123,7 @@ class barbican::api::logging(
$log_date_format = $::os_service_default,
) {
include ::barbican::deps
include barbican::deps
oslo::log { 'barbican_config':
debug => $debug,

6
manifests/client.pp

@ -12,8 +12,8 @@ class barbican::client (
$ensure = 'present',
) {
include ::barbican::deps
include ::barbican::params
include barbican::deps
include barbican::params
package { 'python-barbicanclient':
ensure => $ensure,
@ -21,5 +21,5 @@ class barbican::client (
tag => 'openstack',
}
include '::openstacklib::openstackclient'
include openstacklib::openstackclient
}

4
manifests/config.pp

@ -27,11 +27,11 @@
# or Puppet catalog compilation will fail with duplicate resources.
#
class barbican::config (
$api_config = {},
$api_config = {},
$api_paste_ini_config = {},
) {
include ::barbican::deps
include barbican::deps
validate_legacy(Hash, 'validate_hash', $api_config)
validate_legacy(Hash, 'validate_hash', $api_paste_ini_config)

2
manifests/db.pp

@ -73,7 +73,7 @@ class barbican::db (
$database_idle_timeout = undef,
) {
include ::barbican::deps
include barbican::deps
if $database_idle_timeout {
warning('The database_idle_timeout parameter is deprecated. Please use \

4
manifests/db/mysql.pp

@ -43,11 +43,11 @@ class barbican::db::mysql(
$allowed_hosts = undef
) {
include ::barbican::deps
include barbican::deps
validate_legacy(String, 'validate_string', $password)
::openstacklib::db::mysql { 'barbican':
openstacklib::db::mysql { 'barbican':
user => $user,
password_hash => mysql::password($password),
dbname => $dbname,

4
manifests/db/postgresql.pp

@ -32,9 +32,9 @@ class barbican::db::postgresql(
$privileges = 'ALL',
) {
include ::barbican::deps
include barbican::deps
::openstacklib::db::postgresql { 'barbican':
openstacklib::db::postgresql { 'barbican':
password_hash => postgresql_password($user, $password),
dbname => $dbname,
user => $user,

2
manifests/db/sync.pp

@ -18,7 +18,7 @@ class barbican::db::sync(
$secret_store_extra_params = undef,
) {
include ::barbican::deps
include barbican::deps
exec { 'barbican-db-manage':
command => "barbican-manage db upgrade ${extra_params}",

2
manifests/init.pp

@ -9,6 +9,6 @@
#
class barbican {
include ::barbican::params
include barbican::params
}

2
manifests/keystone/auth.pp

@ -79,7 +79,7 @@ class barbican::keystone::auth (
$admin_url = 'http://127.0.0.1:9311',
) {
include ::barbican::deps
include barbican::deps
if $configure_user_role {
Keystone_user_role["${auth_name}@${tenant}"] ~> Anchor['barbican::service::end']

2
manifests/keystone/authtoken.pp

@ -214,7 +214,7 @@ class barbican::keystone::authtoken(
$service_token_roles_required = $::os_service_default,
) {
include ::barbican::deps
include barbican::deps
if is_service_default($password) {
fail('Please set password for barbican service user')

2
manifests/keystone/notification.pp

@ -32,7 +32,7 @@ class barbican::keystone::notification (
$keystone_notification_thread_pool_size = $::os_service_default,
) {
include ::barbican::deps
include barbican::deps
barbican_config {
'keystone_notifications/enable': value => $enable_keystone_notification;

2
manifests/params.pp

@ -3,7 +3,7 @@
# Parameters for puppet-barbican
#
class barbican::params {
include ::openstacklib::defaults
include openstacklib::defaults
$pyvers = $::openstacklib::defaults::pyvers
$client_package_name = "python${pyvers}-barbicanclient"

4
manifests/plugins/dogtag.pp

@ -57,8 +57,8 @@ class barbican::plugins::dogtag (
$global_default = false,
) {
include ::barbican::deps
include ::barbican::params
include barbican::deps
include barbican::params
if $dogtag_plugin_nss_password == undef {
fail('dogtag_plugin_nss_password must be defined')

2
manifests/plugins/kmip.pp

@ -49,7 +49,7 @@ class barbican::plugins::kmip (
$global_default = false,
) {
include ::barbican::deps
include barbican::deps
if $kmip_plugin_host == undef {
fail('kmip_plugin_host must be defined')

2
manifests/plugins/p11_crypto.pp

@ -71,7 +71,7 @@ class barbican::plugins::p11_crypto (
$global_default = false,
) {
include ::barbican::deps
include barbican::deps
if $p11_crypto_plugin_library_path == undef {
fail('p11_crypto_plugin_library_path must be defined')

2
manifests/plugins/simple_crypto.pp

@ -17,7 +17,7 @@ class barbican::plugins::simple_crypto (
$global_default = false,
) {
include ::barbican::deps
include barbican::deps
barbican_config {
'secretstore:simple_crypto/secret_store_plugin': value => 'store_crypto';

4
manifests/policy.pp

@ -28,8 +28,8 @@ class barbican::policy (
$policy_path = '/etc/barbican/policy.json',
) {
include ::barbican::deps
include ::barbican::params
include barbican::deps
include barbican::params
validate_legacy(Hash, 'validate_hash', $policies)

12
manifests/quota.pp

@ -25,14 +25,14 @@
# Defaults to $::os_service_default
#
class barbican::quota (
$quota_secrets = $::os_service_default,
$quota_orders = $::os_service_default,
$quota_containers = $::os_service_default,
$quota_consumers = $::os_service_default,
$quota_cas = $::os_service_default,
$quota_secrets = $::os_service_default,
$quota_orders = $::os_service_default,
$quota_containers = $::os_service_default,
$quota_consumers = $::os_service_default,
$quota_cas = $::os_service_default,
) {
include ::barbican::deps
include barbican::deps
barbican_config {
'quotas/quota_secrets': value => $quota_secrets;

2
manifests/worker.pp

@ -39,7 +39,7 @@ class barbican::worker (
$enabled = true,
) inherits barbican::params {
include ::barbican::deps
include barbican::deps
package { 'barbican-worker':
ensure => $package_ensure,

136
manifests/wsgi/apache.pp

@ -9,81 +9,81 @@
#
# == Parameters
#
# [*servername*]
# The servername for the virtualhost.
# Optional. Defaults to $::fqdn
# [*servername*]
# The servername for the virtualhost.
# Optional. Defaults to $::fqdn
#
# [*public_port*]
# The public port.
# Optional. Defaults to 9311
# [*public_port*]
# The public port.
# Optional. Defaults to 9311
#
# [*bind_host*]
# The host/ip address Apache will listen on.
# Optional. Defaults to undef (listen on all ip addresses).
# [*bind_host*]
# The host/ip address Apache will listen on.
# Optional. Defaults to undef (listen on all ip addresses).
#
# [*public_path*]
# The prefix for the public endpoint.
# Optional. Defaults to '/'
# [*public_path*]
# The prefix for the public endpoint.
# Optional. Defaults to '/'
#
# [*ssl*]
# Use ssl ? (boolean)
# Optional. Defaults to true
# [*ssl*]
# Use ssl ? (boolean)
# Optional. Defaults to true
#
# [*workers*]
# Number of WSGI workers to spawn.
# Optional. Defaults to $::os_workers
# [*workers*]
# Number of WSGI workers to spawn.
# Optional. Defaults to $::os_workers
#
# [*ssl_cert*]
# (optional) Path to SSL certificate
# Default to apache::vhost 'ssl_*' defaults.
# [*ssl_cert*]
# (optional) Path to SSL certificate
# Default to apache::vhost 'ssl_*' defaults.
#
# [*ssl_key*]
# (optional) Path to SSL key
# Default to apache::vhost 'ssl_*' defaults.
# [*ssl_key*]
# (optional) Path to SSL key
# Default to apache::vhost 'ssl_*' defaults.
#
# [*ssl_chain*]
# (optional) SSL chain
# Default to apache::vhost 'ssl_*' defaults.
# [*ssl_chain*]
# (optional) SSL chain
# Default to apache::vhost 'ssl_*' defaults.
#
# [*ssl_ca*]
# (optional) Path to SSL certificate authority
# Default to apache::vhost 'ssl_*' defaults.
# [*ssl_ca*]
# (optional) Path to SSL certificate authority
# Default to apache::vhost 'ssl_*' defaults.
#
# [*ssl_crl_path*]
# (optional) Path to SSL certificate revocation list
# Default to apache::vhost 'ssl_*' defaults.
# [*ssl_crl_path*]
# (optional) Path to SSL certificate revocation list
# Default to apache::vhost 'ssl_*' defaults.
#
# [*ssl_crl*]
# (optional) SSL certificate revocation list name
# Default to apache::vhost 'ssl_*' defaults.
# [*ssl_crl*]
# (optional) SSL certificate revocation list name
# Default to apache::vhost 'ssl_*' defaults.
#
# [*ssl_certs_dir*]
# apache::vhost ssl parameters.
# Optional. Default to apache::vhost 'ssl_*' defaults.
# [*ssl_certs_dir*]
# apache::vhost ssl parameters.
# Optional. Default to apache::vhost 'ssl_*' defaults.
#
# [*priority*]
# (optional) The priority for the vhost.
# Defaults to '10'
# [*priority*]
# (optional) The priority for the vhost.
# Defaults to '10'
#
# [*threads*]
# (optional) The number of threads for the vhost.
# Defaults to 1
# [*threads*]
# (optional) The number of threads for the vhost.
# Defaults to 1
#
# [*wsgi_process_display_name*]
# (optional) Name of the WSGI process display-name.
# Defaults to undef
# [*wsgi_process_display_name*]
# (optional) Name of the WSGI process display-name.
# Defaults to undef
#
# [*access_log_file*]
# The log file name for the virtualhost.
# Optional. Defaults to false.
# [*access_log_file*]
# The log file name for the virtualhost.
# Optional. Defaults to false.
#
# [*access_log_format*]
# The log format for the virtualhost.
# Optional. Defaults to false.
# [*access_log_format*]
# The log format for the virtualhost.
# Optional. Defaults to false.
#
# [*error_log_file*]
# The error log file name for the virtualhost.
# Optional. Defaults to undef.
# [*error_log_file*]
# The error log file name for the virtualhost.
# Optional. Defaults to undef.
#
# [*custom_wsgi_process_options*]
# (optional) gives you the oportunity to add custom process options or to
@ -93,16 +93,6 @@
# { python-path => '/my/python/virtualenv' }
# Defaults to {}
#
# == Dependencies
#
# requires Class['apache'] & Class['barbican']
#
# == Examples
#
# include apache
#
# class { 'barbican::wsgi::apache': }
#
# == Authors
#
# Ade Lee <alee@redhat.com>
@ -134,12 +124,12 @@ class barbican::wsgi::apache (
$custom_wsgi_process_options = {},
) {
include ::barbican::deps
include ::barbican::params
include ::apache
include ::apache::mod::wsgi
include barbican::deps
include barbican::params
include apache
include apache::mod::wsgi
if $ssl {
include ::apache::mod::ssl
include apache::mod::ssl
}
Service['httpd'] -> Keystone_endpoint <| |>
@ -162,7 +152,7 @@ class barbican::wsgi::apache (
Package<| tag == 'barbican-api' |> -> File[$::barbican::params::httpd_config_file]
File[$::barbican::params::httpd_config_file] ~> Service['httpd']
::openstacklib::wsgi::apache { 'barbican_wsgi_main':
openstacklib::wsgi::apache { 'barbican_wsgi_main':
bind_host => $bind_host,
bind_port => $public_port,
group => 'barbican',

10
spec/acceptance/basic_barbican_spec.rb

@ -21,11 +21,11 @@ require 'spec_helper_acceptance'
describe 'barbican::api basic test class' do
context 'default parameters' do
pp= <<-EOS
include ::openstack_integration
include ::openstack_integration::repos
include ::openstack_integration::mysql
include ::openstack_integration::keystone
include ::openstack_integration::barbican
include openstack_integration
include openstack_integration::repos
include openstack_integration::mysql
include openstack_integration::keystone
include openstack_integration::barbican
EOS
it 'should work with no errors' do

16
spec/classes/barbican_api_spec.rb

@ -114,7 +114,7 @@ describe 'barbican::api' do
describe "when #{param_set == {} ? "using default" : "specifying"} class parameters" do
let :pre_condition do
'class { "barbican::keystone::authtoken": password => "secret", }
include ::apache'
include apache'
end
let :param_hash do
@ -203,7 +203,7 @@ describe 'barbican::api' do
describe 'with enable_proxy_headers_parsing' do
let :pre_condition do
'class { "barbican::keystone::authtoken": password => "secret", }
include ::apache'
include apache'
end
let :params do
@ -218,7 +218,7 @@ describe 'barbican::api' do
describe 'with max_request_body_size' do
let :pre_condition do
'class { "barbican::keystone::authtoken": password => "secret", }
include ::apache'
include apache'
end
let :params do
@ -233,7 +233,7 @@ describe 'barbican::api' do
describe 'with SSL socket options set' do
let :pre_condition do
'class { "barbican::keystone::authtoken": password => "secret", }
include ::apache'
include apache'
end
let :params do
@ -253,7 +253,7 @@ describe 'barbican::api' do
describe 'with SSL socket options left by default' do
let :pre_condition do
'class { "barbican::keystone::authtoken": password => "secret", }
include ::apache'
include apache'
end
let :params do
@ -270,7 +270,7 @@ describe 'barbican::api' do
describe 'with SSL socket options set wrongly configured' do
let :pre_condition do
'class { "barbican::keystone::authtoken": password => "secret", }
include ::apache'
include apache'
end
let :params do
@ -287,7 +287,7 @@ describe 'barbican::api' do
describe 'with keystone auth' do
let :pre_condition do
'class { "barbican::keystone::authtoken": password => "secret", }
include ::apache'
include apache'
end
let :params do
@ -367,7 +367,7 @@ describe 'barbican::api' do
it_behaves_like 'barbican api redhat'
when 'Debian'
let :pre_condition do
'include ::apache'
'include apache'
end
let (:platform_params) do
{ :service_name => 'httpd' }

Loading…
Cancel
Save