Browse Source

Convert all class usage to relative names

Change-Id: Id33f4d13a4547734f36a6437e0d0e6b1db37a9a1
changes/02/697902/1
Tobias Urdin 2 years ago
parent
commit
3a2a519bb2
26 changed files with 55 additions and 55 deletions
  1. +5
    -5
      examples/site.pp
  2. +5
    -5
      manifests/api.pp
  3. +2
    -2
      manifests/client.pp
  4. +1
    -1
      manifests/config.pp
  5. +1
    -1
      manifests/cors.pp
  6. +1
    -1
      manifests/db.pp
  7. +1
    -1
      manifests/db/mysql.pp
  8. +1
    -1
      manifests/db/postgresql.pp
  9. +1
    -1
      manifests/db/sync.pp
  10. +2
    -2
      manifests/init.pp
  11. +1
    -1
      manifests/keystone/auth.pp
  12. +1
    -1
      manifests/keystone/authtoken.pp
  13. +1
    -1
      manifests/logging.pp
  14. +1
    -1
      manifests/metricd.pp
  15. +1
    -1
      manifests/params.pp
  16. +2
    -2
      manifests/policy.pp
  17. +1
    -1
      manifests/statsd.pp
  18. +1
    -1
      manifests/storage.pp
  19. +1
    -1
      manifests/storage/ceph.pp
  20. +1
    -1
      manifests/storage/file.pp
  21. +1
    -1
      manifests/storage/incoming/redis.pp
  22. +1
    -1
      manifests/storage/s3.pp
  23. +1
    -1
      manifests/storage/swift.pp
  24. +5
    -5
      manifests/wsgi/apache.pp
  25. +5
    -5
      spec/acceptance/basic_gnocchi_spec.rb
  26. +11
    -11
      spec/classes/gnocchi_api_spec.rb

+ 5
- 5
examples/site.pp 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

+ 5
- 5
manifests/api.pp 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
}
}

+ 2
- 2
manifests/client.pp 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,


+ 1
- 1
manifests/config.pp View File

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


+ 1
- 1
manifests/cors.pp 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,


+ 1
- 1
manifests/db.pp 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.


+ 1
- 1
manifests/db/mysql.pp 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)


+ 1
- 1
manifests/db/postgresql.pp 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),


+ 1
- 1
manifests/db/sync.pp 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}",


+ 2
- 2
manifests/init.pp 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,


+ 1
- 1
manifests/keystone/auth.pp 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,


+ 1
- 1
manifests/keystone/authtoken.pp 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')


+ 1
- 1
manifests/logging.pp 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,


+ 1
- 1
manifests/metricd.pp 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;


+ 1
- 1
manifests/params.pp 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"


+ 2
- 2
manifests/policy.pp 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)


+ 1
- 1
manifests/statsd.pp 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,


+ 1
- 1
manifests/storage.pp 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 {


+ 1
- 1
manifests/storage/ceph.pp 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.')


+ 1
- 1
manifests/storage/file.pp 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';


+ 1
- 1
manifests/storage/incoming/redis.pp 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';


+ 1
- 1
manifests/storage/s3.pp 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';


+ 1
- 1
manifests/storage/swift.pp 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';


+ 5
- 5
manifests/wsgi/apache.pp 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':


+ 5
- 5
spec/acceptance/basic_gnocchi_spec.rb 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


+ 11
- 11
spec/classes/gnocchi_api_spec.rb 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


Loading…
Cancel
Save