Convert all class usage to relative names

Change-Id: Id33f4d13a4547734f36a6437e0d0e6b1db37a9a1
This commit is contained in:
Tobias Urdin 2019-12-08 23:07:12 +01:00
parent 05ee0bb433
commit 3a2a519bb2
26 changed files with 55 additions and 55 deletions

View File

@ -1,6 +1,6 @@
# This is an example of site.pp to deploy Gnocchi
class { '::gnocchi::keystone::auth':
class { 'gnocchi::keystone::auth':
admin_url => 'http://10.0.0.1:8041',
internal_url => 'http://10.0.0.1:8041',
public_url => 'http://10.0.0.1:8041',
@ -8,20 +8,20 @@ class { '::gnocchi::keystone::auth':
region => 'OpenStack'
}
class { '::gnocchi':
class { 'gnocchi':
database_connection => 'mysql+pymysql://gnocchi:secrete@10.0.0.1/gnocchi?charset=utf8',
}
class { '::gnocchi::api':
class { 'gnocchi::api':
bind_host => '10.0.0.1',
identity_uri => 'https://identity.openstack.org:5000',
keystone_password => 'verysecrete'
}
class { '::gnocchi::statsd':
class { 'gnocchi::statsd':
resource_id => '07f26121-5777-48ba-8a0b-d70468133dd9',
archive_policy_name => 'high',
flush_delay => '100',
}
include ::gnocchi::client
include gnocchi::client

View File

@ -63,8 +63,8 @@ class gnocchi::api (
$middlewares = $::os_service_default,
) inherits gnocchi::params {
include ::gnocchi::deps
include ::gnocchi::policy
include gnocchi::deps
include gnocchi::policy
package { 'gnocchi-api':
ensure => $package_ensure,
@ -81,7 +81,7 @@ class gnocchi::api (
}
if $sync_db {
include ::gnocchi::db::sync
include gnocchi::db::sync
}
if $service_name == $::gnocchi::params::api_service_name {
@ -94,7 +94,7 @@ class gnocchi::api (
tag => ['gnocchi-service', 'gnocchi-db-sync-service'],
}
} elsif $service_name == 'httpd' {
include ::apache::params
include apache::params
service { 'gnocchi-api':
ensure => 'stopped',
@ -123,6 +123,6 @@ standalone service, or httpd for being run by a httpd server")
}
if $auth_strategy == 'keystone' {
include ::gnocchi::keystone::authtoken
include gnocchi::keystone::authtoken
}
}

View File

@ -9,8 +9,8 @@ class gnocchi::client (
$ensure = 'present'
) {
include ::gnocchi::deps
include ::gnocchi::params
include gnocchi::deps
include gnocchi::params
package { 'python-gnocchiclient':
ensure => $ensure,

View File

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

View File

@ -45,7 +45,7 @@ class gnocchi::cors (
$allow_headers = $::os_service_default,
) {
include ::gnocchi::deps
include gnocchi::deps
oslo::cors { 'gnocchi_config':
allowed_origin => $allowed_origin,

View File

@ -17,7 +17,7 @@ class gnocchi::db (
$package_ensure = 'present',
) inherits gnocchi::params {
include ::gnocchi::deps
include gnocchi::deps
# NOTE(spredzy): In order to keep backward compatibility we rely on the pick function
# to use gnocchi::<myparam> if gnocchi::db::<myparam> isn't specified.

View File

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

View File

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

View File

@ -15,7 +15,7 @@ class gnocchi::db::sync (
$extra_opts = undef,
){
include ::gnocchi::deps
include gnocchi::deps
exec { 'gnocchi-db-sync':
command => "gnocchi-upgrade --config-file /etc/gnocchi/gnocchi.conf ${extra_opts}",

View File

@ -23,8 +23,8 @@ class gnocchi (
$purge_config = false,
) inherits gnocchi::params {
include ::gnocchi::deps
include ::gnocchi::db
include gnocchi::deps
include gnocchi::db
package { 'gnocchi':
ensure => $package_ensure,

View File

@ -79,7 +79,7 @@ class gnocchi::keystone::auth (
$service_description = 'OpenStack Metric Service',
) {
include ::gnocchi::deps
include gnocchi::deps
keystone::resource::service_identity { 'gnocchi':
configure_user => $configure_user,

View File

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

View File

@ -49,7 +49,7 @@ class gnocchi::logging(
$debug = $::os_service_default,
) {
include ::gnocchi::deps
include gnocchi::deps
oslo::log { 'gnocchi_config':
debug => $debug,

View File

@ -36,7 +36,7 @@ class gnocchi::metricd (
$package_ensure = 'present',
) inherits gnocchi::params {
include ::gnocchi::deps
include gnocchi::deps
gnocchi_config {
'metricd/workers': value => $workers;

View File

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

View File

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

View File

@ -33,7 +33,7 @@ class gnocchi::statsd (
$package_ensure = 'present',
) inherits gnocchi::params {
include ::gnocchi::deps
include gnocchi::deps
package { 'gnocchi-statsd':
ensure => $package_ensure,

View File

@ -35,7 +35,7 @@ class gnocchi::storage(
$metric_processing_delay = $::os_service_default,
) inherits gnocchi::params {
include ::gnocchi::deps
include gnocchi::deps
if $coordination_url {

View File

@ -63,7 +63,7 @@ class gnocchi::storage::ceph(
$manage_rados = false,
) inherits gnocchi::params {
include ::gnocchi::deps
include gnocchi::deps
if (is_service_default($ceph_keyring) and is_service_default($ceph_secret)) or (! $ceph_keyring and ! $ceph_secret) {
fail('You need to specify either gnocchi::storage::ceph::ceph_keyring or gnocchi::storage::ceph::ceph_secret.')

View File

@ -29,7 +29,7 @@ class gnocchi::storage::file(
$file_basepath = '/var/lib/gnocchi',
) {
include ::gnocchi::deps
include gnocchi::deps
gnocchi_config {
'storage/driver': value => 'file';

View File

@ -12,7 +12,7 @@ class gnocchi::storage::incoming::redis(
$redis_url = undef,
) {
include ::gnocchi::deps
include gnocchi::deps
gnocchi_config {
'incoming/driver': value => 'redis';

View File

@ -33,7 +33,7 @@ class gnocchi::storage::s3(
$s3_bucket_prefix = $::os_service_default,
) {
include ::gnocchi::deps
include gnocchi::deps
gnocchi_config {
'storage/driver': value => 's3';

View File

@ -55,7 +55,7 @@ class gnocchi::storage::swift(
$swift_endpoint_type = $::os_service_default,
) {
include ::gnocchi::deps
include gnocchi::deps
gnocchi_config {
'storage/driver': value => 'swift';

View File

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

View File

@ -6,11 +6,11 @@ describe 'basic gnocchi' do
it 'should work with no errors' do
pp = <<-EOS
include ::openstack_integration
include ::openstack_integration::repos
include ::openstack_integration::mysql
include ::openstack_integration::keystone
class { '::openstack_integration::gnocchi':
include openstack_integration
include openstack_integration::repos
include openstack_integration::mysql
include openstack_integration::keystone
class { 'openstack_integration::gnocchi':
integration_enable => false,
}
EOS

View File

@ -4,8 +4,8 @@ describe 'gnocchi::api' do
let :pre_condition do
"class { 'gnocchi': }
include ::gnocchi::db
class { '::gnocchi::keystone::authtoken':
include gnocchi::db
class { 'gnocchi::keystone::authtoken':
password => 'gnocchi-passw0rd',
}"
end
@ -25,10 +25,10 @@ describe 'gnocchi::api' do
end
let :pre_condition do
"include ::apache
include ::gnocchi::db
"include apache
include gnocchi::db
class { 'gnocchi': }
class { '::gnocchi::keystone::authtoken':
class { 'gnocchi::keystone::authtoken':
password => 'gnocchi-passw0rd',
}"
end
@ -121,10 +121,10 @@ describe 'gnocchi::api' do
end
let :pre_condition do
"include ::apache
include ::gnocchi::db
"include apache
include gnocchi::db
class { 'gnocchi': }
class { '::gnocchi::keystone::authtoken':
class { 'gnocchi::keystone::authtoken':
password => 'gnocchi-passw0rd',
}"
end
@ -145,10 +145,10 @@ describe 'gnocchi::api' do
end
let :pre_condition do
"include ::apache
include ::gnocchi::db
"include apache
include gnocchi::db
class { 'gnocchi': }
class { '::gnocchi::keystone::authtoken':
class { 'gnocchi::keystone::authtoken':
password => 'gnocchi-passw0rd',
}"
end