Convert all class usage to relative names

Change-Id: I8282917b8a9e625f1db6b31544a97949733e99f1
This commit is contained in:
Tobias Urdin 2019-12-08 23:24:49 +01:00
parent 59d2f5ecef
commit 484d087296
24 changed files with 53 additions and 53 deletions

View File

@ -1,23 +1,23 @@
class { '::vitrage::keystone::auth':
class { 'vitrage::keystone::auth':
admin_url => 'http://127.0.0.1:8999',
internal_url => 'http://127.0.0.1:8999',
public_url => 'http://127.0.0.1:8999',
password => 'a_big_secret',
}
class { '::vitrage': }
class { '::vitrage::api':
class { 'vitrage': }
class { 'vitrage::api':
enabled => true,
keystone_password => 'a_big_secret',
keystone_identity_uri => 'http://127.0.0.1:5000/',
service_name => 'httpd',
}
include ::apache
class { '::vitrage::wsgi::apache':
include apache
class { 'vitrage::wsgi::apache':
ssl => false,
}
class { '::vitrage::auth':
class { 'vitrage::auth':
auth_password => 'a_big_secret',
}
class { '::vitrage::graph': }
class { '::vitrage::notifier': }
class { '::vitrage::client': }
class { 'vitrage::graph': }
class { 'vitrage::notifier': }
class { 'vitrage::client': }

View File

@ -51,9 +51,9 @@ class vitrage::api (
$max_request_body_size = $::os_service_default,
) inherits vitrage::params {
include ::vitrage::deps
include ::vitrage::params
include ::vitrage::policy
include vitrage::deps
include vitrage::params
include vitrage::policy
package { 'vitrage-api':
ensure => $package_ensure,
@ -79,7 +79,7 @@ class vitrage::api (
tag => 'vitrage-service',
}
} elsif $service_name == 'httpd' {
include ::apache::params
include apache::params
service { 'vitrage-api':
ensure => 'stopped',
name => $::vitrage::params::api_service_name,

View File

@ -60,7 +60,7 @@ class vitrage::auth (
$auth_endpoint_type = $::os_service_default,
) {
include ::vitrage::deps
include vitrage::deps
vitrage_config {
'service_credentials/auth_url' : value => $auth_url;

View File

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

View File

@ -28,7 +28,7 @@ class vitrage::config (
$vitrage_api_paste_ini = {},
) {
include ::vitrage::deps
include vitrage::deps
validate_legacy(Hash, 'validate_hash', $vitrage_config)
validate_legacy(Hash, 'validate_hash', $vitrage_api_paste_ini)

View File

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

View File

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

View File

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

View File

@ -12,7 +12,7 @@ class vitrage::db::sync(
$extra_params = undef,
) {
include ::vitrage::deps
include vitrage::deps
exec { 'vitrage-db-sync':
command => "vitrage-dbsync ${extra_params}",

View File

@ -19,8 +19,8 @@ class vitrage::graph (
$package_ensure = 'present',
) {
include ::vitrage::deps
include ::vitrage::params
include vitrage::deps
include vitrage::params
ensure_resource( 'package', [$::vitrage::params::graph_package_name],
{ ensure => $package_ensure,

View File

@ -230,7 +230,7 @@ class vitrage (
$types = $::os_service_default,
) inherits vitrage::params {
include ::vitrage::deps
include vitrage::deps
package { 'vitrage':
ensure => $package_ensure,

View File

@ -79,7 +79,7 @@ class vitrage::keystone::auth (
$admin_url = 'http://127.0.0.1:8999',
) {
include ::vitrage::deps
include vitrage::deps
$real_service_name = pick($service_name, $auth_name)

View File

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

View File

@ -121,7 +121,7 @@ class vitrage::logging(
$log_date_format = $::os_service_default,
) {
include ::vitrage::deps
include vitrage::deps
oslo::log { 'vitrage_config':
debug => $debug,

View File

@ -24,8 +24,8 @@ class vitrage::notifier (
$notifiers = $::os_service_default,
) {
include ::vitrage::deps
include ::vitrage::params
include vitrage::deps
include vitrage::params
if !is_service_default($notifiers) {
$notifiers_orig = join(any2array($notifiers), ',')

View File

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

View File

@ -19,8 +19,8 @@ class vitrage::persistor (
$package_ensure = 'present',
) {
include ::vitrage::deps
include ::vitrage::params
include vitrage::deps
include vitrage::params
ensure_resource( 'package', [$::vitrage::params::persistor_package_name],
{ ensure => $package_ensure,

View File

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

View File

@ -124,12 +124,12 @@ class vitrage::wsgi::apache (
$custom_wsgi_process_options = {},
) {
include ::vitrage::deps
include ::vitrage::params
include ::apache
include ::apache::mod::wsgi
include vitrage::deps
include vitrage::params
include apache
include apache::mod::wsgi
if $ssl {
include ::apache::mod::ssl
include apache::mod::ssl
}
::openstacklib::wsgi::apache { 'vitrage_wsgi':

View File

@ -6,11 +6,11 @@ describe 'basic vitrage' do
it 'should work with no errors' do
pp= <<-EOS
include ::openstack_integration
include ::openstack_integration::repos
include ::openstack_integration::rabbitmq
include ::openstack_integration::mysql
include ::openstack_integration::keystone
include openstack_integration
include openstack_integration::repos
include openstack_integration::rabbitmq
include openstack_integration::mysql
include openstack_integration::keystone
case $::osfamily {
'Debian': {
@ -23,7 +23,7 @@ describe 'basic vitrage' do
package { 'python2-cotyledon':
ensure => present,
}
include ::openstack_integration::vitrage
include openstack_integration::vitrage
}
default: {
fail("Unsupported osfamily (${::osfamily})")

View File

@ -4,7 +4,7 @@ describe 'vitrage::api' do
let :pre_condition do
"class { 'vitrage': }
class { '::vitrage::keystone::authtoken':
class { 'vitrage::keystone::authtoken':
password => 'a_big_secret',
}"
end
@ -107,9 +107,9 @@ describe 'vitrage::api' do
end
let :pre_condition do
"include ::apache
"include apache
class { 'vitrage': }
class { '::vitrage::keystone::authtoken':
class { 'vitrage::keystone::authtoken':
password => 'a_big_secret',
}"
end
@ -130,9 +130,9 @@ describe 'vitrage::api' do
end
let :pre_condition do
"include ::apache
"include apache
class { 'vitrage': }
class { '::vitrage::keystone::authtoken':
class { 'vitrage::keystone::authtoken':
password => 'a_big_secret',
}"
end

View File

@ -3,7 +3,7 @@ require 'spec_helper'
describe 'vitrage::graph' do
let :pre_condition do
"class { '::vitrage': }"
"class { 'vitrage': }"
end
shared_examples_for 'vitrage-graph' do

View File

@ -3,7 +3,7 @@ require 'spec_helper'
describe 'vitrage::notifier' do
let :pre_condition do
"class { '::vitrage': }"
"class { 'vitrage': }"
end
shared_examples_for 'vitrage-notifier' do

View File

@ -3,7 +3,7 @@ require 'spec_helper'
describe 'vitrage::persistor' do
let :pre_condition do
"class { '::vitrage': }"
"class { 'vitrage': }"
end
shared_examples_for 'vitrage-persistor' do