Convert all class usage to relative names

Change-Id: I411a1654d83d73998d50c713441958492cec396c
This commit is contained in:
Tobias Urdin 2019-12-08 23:21:57 +01:00
parent 82b194a9dc
commit e47ff1ca8a
16 changed files with 34 additions and 34 deletions

View File

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

View File

@ -10,8 +10,8 @@ class tacker::client (
$ensure = 'present' $ensure = 'present'
) { ) {
include ::tacker::deps include tacker::deps
include ::tacker::params include tacker::params
package { 'python-tackerclient': package { 'python-tackerclient':
ensure => $ensure, ensure => $ensure,

View File

@ -24,7 +24,7 @@ class tacker::config (
$tacker_config = {}, $tacker_config = {},
) { ) {
include ::tacker::deps include tacker::deps
validate_legacy(Hash, 'validate_hash', $tacker_config) validate_legacy(Hash, 'validate_hash', $tacker_config)

View File

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

View File

@ -43,7 +43,7 @@ class tacker::db::mysql(
$allowed_hosts = undef $allowed_hosts = undef
) { ) {
include ::tacker::deps include tacker::deps
validate_legacy(String, 'validate_string', $password) validate_legacy(String, 'validate_string', $password)

View File

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

View File

@ -17,7 +17,7 @@ class tacker::db::sync(
$user = 'tacker', $user = 'tacker',
) { ) {
include ::tacker::deps include tacker::deps
exec { 'tacker-db-sync': exec { 'tacker-db-sync':
command => "tacker-db-manage ${extra_params} upgrade head", command => "tacker-db-manage ${extra_params} upgrade head",

View File

@ -223,10 +223,10 @@ class tacker(
$sync_db = true, $sync_db = true,
) inherits tacker::params { ) inherits tacker::params {
include ::tacker::deps include tacker::deps
if $sync_db { if $sync_db {
include ::tacker::db::sync include tacker::db::sync
} }
oslo::messaging::rabbit {'tacker_config': oslo::messaging::rabbit {'tacker_config':

View File

@ -79,7 +79,7 @@ class tacker::keystone::auth (
$internal_url = 'http://127.0.0.1:9890', $internal_url = 'http://127.0.0.1:9890',
) { ) {
include ::tacker::deps include tacker::deps
if $configure_user_role { if $configure_user_role {
Keystone_user_role["${auth_name}@${tenant}"] ~> Service <| name == 'tacker-server' |> Keystone_user_role["${auth_name}@${tenant}"] ~> Service <| name == 'tacker-server' |>

View File

@ -202,7 +202,7 @@ class tacker::keystone::authtoken(
$service_token_roles_required = $::os_service_default, $service_token_roles_required = $::os_service_default,
) { ) {
include ::tacker::deps include tacker::deps
keystone::resource::authtoken { 'tacker_config': keystone::resource::authtoken { 'tacker_config':
username => $username, username => $username,

View File

@ -123,7 +123,7 @@ class tacker::logging(
$log_date_format = $::os_service_default, $log_date_format = $::os_service_default,
) { ) {
include ::tacker::deps include tacker::deps
oslo::log { 'tacker_config': oslo::log { 'tacker_config':
use_stderr => $use_stderr, use_stderr => $use_stderr,

View File

@ -1,7 +1,7 @@
# Parameters for puppet-tacker # Parameters for puppet-tacker
# #
class tacker::params { class tacker::params {
include ::openstacklib::defaults include openstacklib::defaults
$pyvers = $::openstacklib::defaults::pyvers $pyvers = $::openstacklib::defaults::pyvers
$group = 'tacker' $group = 'tacker'

View File

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

View File

@ -35,12 +35,12 @@ class tacker::server(
$package_ensure = 'present', $package_ensure = 'present',
) { ) {
include ::tacker::deps include tacker::deps
include ::tacker::params include tacker::params
include ::tacker::policy include tacker::policy
if $auth_strategy == 'keystone' { if $auth_strategy == 'keystone' {
include ::tacker::keystone::authtoken include tacker::keystone::authtoken
} }
package { 'tacker-server': package { 'tacker-server':

View File

@ -6,11 +6,11 @@ describe 'basic tacker' do
it 'should work with no errors' do it 'should work with no errors' do
pp= <<-EOS pp= <<-EOS
include ::openstack_integration include openstack_integration
include ::openstack_integration::repos include openstack_integration::repos
include ::openstack_integration::rabbitmq include openstack_integration::rabbitmq
include ::openstack_integration::mysql include openstack_integration::mysql
include ::openstack_integration::keystone include openstack_integration::keystone
rabbitmq_user { 'tacker': rabbitmq_user { 'tacker':
admin => true, admin => true,
@ -27,7 +27,7 @@ describe 'basic tacker' do
require => Class['rabbitmq'], require => Class['rabbitmq'],
} }
class { '::tacker::db::mysql': class { 'tacker::db::mysql':
password => 'a_big_secret', password => 'a_big_secret',
} }
case $::osfamily { case $::osfamily {
@ -35,23 +35,23 @@ describe 'basic tacker' do
warning('Gnocchi is not yet packaged on Ubuntu systems.') warning('Gnocchi is not yet packaged on Ubuntu systems.')
} }
'RedHat': { 'RedHat': {
class { '::tacker::db': class { 'tacker::db':
database_connection => 'mysql+pymysql://tacker:a_big_secret@127.0.0.1/tacker?charset=utf8', database_connection => 'mysql+pymysql://tacker:a_big_secret@127.0.0.1/tacker?charset=utf8',
} }
class { '::tacker::keystone::auth': class { 'tacker::keystone::auth':
password => 'a_big_secret', password => 'a_big_secret',
} }
class { '::tacker::keystone::authtoken': class { 'tacker::keystone::authtoken':
password => 'a_big_secret', password => 'a_big_secret',
} }
class { '::tacker::logging': class { 'tacker::logging':
debug => true, debug => true,
} }
class { '::tacker': class { 'tacker':
default_transport_url => 'rabbit://tacker:my_secret@127.0.0.1:5672/', default_transport_url => 'rabbit://tacker:my_secret@127.0.0.1:5672/',
} }
include ::tacker::server include tacker::server
include ::tacker::client include tacker::client
} }
default: { default: {
fail("Unsupported osfamily (${::osfamily})") fail("Unsupported osfamily (${::osfamily})")

View File

@ -3,7 +3,7 @@ require 'spec_helper'
describe 'tacker::server' do describe 'tacker::server' do
let :pre_condition do let :pre_condition do
"class { '::tacker::keystone::authtoken': "class { 'tacker::keystone::authtoken':
password =>'foo', password =>'foo',
} }
class {'::tacker': }" class {'::tacker': }"