Browse Source

Convert all class usage to relative names

Change-Id: I9ff8d888e367a46ab89e3668bf4ba76c4c7c127c
changes/00/697900/1
Tobias Urdin 2 years ago
parent
commit
ed9298e996
  1. 6
      examples/glance_multi_store.pp
  2. 4
      examples/glance_single_store.pp
  3. 12
      manifests/api.pp
  4. 2
      manifests/api/authtoken.pp
  5. 2
      manifests/api/db.pp
  6. 2
      manifests/api/logging.pp
  7. 2
      manifests/backend/cinder.pp
  8. 2
      manifests/backend/file.pp
  9. 2
      manifests/backend/multistore/cinder.pp
  10. 2
      manifests/backend/multistore/file.pp
  11. 4
      manifests/backend/multistore/rbd.pp
  12. 4
      manifests/backend/multistore/swift.pp
  13. 2
      manifests/backend/multistore/vsphere.pp
  14. 4
      manifests/backend/rbd.pp
  15. 4
      manifests/backend/swift.pp
  16. 2
      manifests/backend/vsphere.pp
  17. 4
      manifests/cache/cleaner.pp
  18. 2
      manifests/cache/logging.pp
  19. 4
      manifests/cache/pruner.pp
  20. 4
      manifests/client.pp
  21. 2
      manifests/config.pp
  22. 4
      manifests/db/metadefs.pp
  23. 2
      manifests/db/mysql.pp
  24. 2
      manifests/db/postgresql.pp
  25. 2
      manifests/db/sync.pp
  26. 4
      manifests/init.pp
  27. 2
      manifests/keystone/auth.pp
  28. 2
      manifests/notify/rabbitmq.pp
  29. 2
      manifests/params.pp
  30. 4
      manifests/policy.pp
  31. 6
      manifests/registry.pp
  32. 2
      manifests/registry/authtoken.pp
  33. 2
      manifests/registry/db.pp
  34. 2
      manifests/registry/logging.pp
  35. 10
      spec/acceptance/basic_glance_spec.rb
  36. 2
      spec/classes/glance_api_spec.rb
  37. 2
      spec/classes/glance_backend_swift_spec.rb
  38. 2
      spec/classes/glance_keystone_auth_spec.rb
  39. 2
      spec/defines/glance_backend_multistore_swift_spec.rb

6
examples/glance_multi_store.pp

@ -7,17 +7,17 @@
# default_store is set at that point, then the first store in the list 'stores'
# provided will be made the default).
class { '::glance::backend::file':
class { 'glance::backend::file':
multi_store => true,
}
class { '::glance::backend::swift':
class { 'glance::backend::swift':
swift_store_user => 'demo',
swift_store_key => 'secrete',
multi_store => true,
}
class { '::glance::api':
class { 'glance::api':
keystone_password => 'a_big_secret',
stores => ['file', 'swift'],
default_store => 'swift',

4
examples/glance_single_store.pp

@ -7,12 +7,12 @@
# or it will attempt to override the default set by the backend class and result
# in an error.
class { '::glance::backend::swift':
class { 'glance::backend::swift':
swift_store_user => 'demo',
swift_store_key => 'secrete',
}
class { '::glance::api':
class { 'glance::api':
keystone_password => 'a_big_secret',
stores => ['swift'],
}

12
manifests/api.pp

@ -387,13 +387,13 @@ class glance::api(
$multi_store = false,
) inherits glance {
include ::glance::deps
include ::glance::policy
include ::glance::api::db
include glance::deps
include glance::policy
include glance::api::db
if $sync_db {
include ::glance::db::sync
include ::glance::db::metadefs
include glance::db::sync
include glance::db::metadefs
}
if ( $glance::params::api_package_name != $glance::params::registry_package_name ) {
@ -597,7 +597,7 @@ enabled_backends instead.')
# keystone config
if $auth_strategy == 'keystone' {
include ::glance::api::authtoken
include glance::api::authtoken
}
oslo::middleware { 'glance_api_config':

2
manifests/api/authtoken.pp

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

2
manifests/api/db.pp

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

2
manifests/api/logging.pp

@ -120,7 +120,7 @@ class glance::api::logging(
$log_date_format = $::os_service_default,
) {
include ::glance::deps
include glance::deps
oslo::log { 'glance_api_config':
debug => $debug,

2
manifests/backend/cinder.pp

@ -86,7 +86,7 @@ class glance::backend::cinder(
$multi_store = false,
) {
include ::glance::deps
include glance::deps
warning('glance::backend::cinder is deprecated. Use glance::backend::multistore::cinder instead.')

2
manifests/backend/file.pp

@ -18,7 +18,7 @@ class glance::backend::file(
$multi_store = false,
) {
include ::glance::deps
include glance::deps
warning('glance::backend::file is deprecated. Use glance::backend::multistore::file instead.')

2
manifests/backend/multistore/cinder.pp

@ -84,7 +84,7 @@ define glance::backend::multistore::cinder(
$store_description = $::os_service_default,
) {
include ::glance::deps
include glance::deps
glance_api_config {
"${name}/cinder_api_insecure": value => $cinder_api_insecure;

2
manifests/backend/multistore/file.pp

@ -33,7 +33,7 @@ define glance::backend::multistore::file(
$store_description = $::os_service_default,
) {
include ::glance::deps
include glance::deps
glance_api_config {
"${name}/filesystem_store_datadir": value => $filesystem_store_datadir;

4
manifests/backend/multistore/rbd.pp

@ -63,8 +63,8 @@ define glance::backend::multistore::rbd(
$store_description = $::os_service_default,
) {
include ::glance::deps
include ::glance::params
include glance::deps
include glance::params
glance_api_config {
"${name}/rbd_store_ceph_conf": value => $rbd_store_ceph_conf;

4
manifests/backend/multistore/swift.pp

@ -93,8 +93,8 @@ define glance::backend::multistore::swift(
$store_description = $::os_service_default,
) {
include ::glance::deps
include ::swift::client
include glance::deps
include swift::client
Class['swift::client'] -> Anchor['glance::install::end']
Service<| tag == 'swift-service' |> -> Service['glance-api']

2
manifests/backend/multistore/vsphere.pp

@ -90,7 +90,7 @@ define glance::backend::multistore::vsphere(
$store_description = $::os_service_default,
) {
include ::glance::deps
include glance::deps
glance_api_config {
"${name}/vmware_insecure": value => $vmware_insecure;

4
manifests/backend/rbd.pp

@ -47,8 +47,8 @@ class glance::backend::rbd(
$multi_store = false,
) {
include ::glance::deps
include ::glance::params
include glance::deps
include glance::params
warning('glance::backend::rbd is deprecated. Use glance::backend::multistore::rbd instead.')

4
manifests/backend/swift.pp

@ -73,8 +73,8 @@ class glance::backend::swift(
$multi_store = false,
) {
include ::glance::deps
include ::swift::client
include glance::deps
include swift::client
warning('glance::backend::swift is deprecated. Use glance::backend::multistore::swift instead.')

2
manifests/backend/vsphere.pp

@ -91,7 +91,7 @@ class glance::backend::vsphere(
$multi_store = false,
) {
include ::glance::deps
include glance::deps
warning('glance::backend::vsphere is deprecated. Use glance::backend::multistore::vsphere instead.')

4
manifests/cache/cleaner.pp

@ -33,8 +33,8 @@ class glance::cache::cleaner(
$command_options = '',
) {
include ::glance::deps
include ::glance::params
include glance::deps
include glance::params
cron { 'glance-cache-cleaner':
command => "${glance::params::cache_cleaner_command} ${command_options}",

2
manifests/cache/logging.pp

@ -114,7 +114,7 @@ class glance::cache::logging(
$log_date_format = $::os_service_default,
) {
include ::glance::deps
include glance::deps
oslo::log { 'glance_cache_config':
debug => $debug,

4
manifests/cache/pruner.pp

@ -33,8 +33,8 @@ class glance::cache::pruner(
$command_options = '',
) {
include ::glance::deps
include ::glance::params
include glance::deps
include glance::params
cron { 'glance-cache-pruner':
command => "${glance::params::cache_pruner_command} ${command_options}",

4
manifests/client.pp

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

2
manifests/config.pp

@ -47,7 +47,7 @@ class glance::config (
$image_import_config = {},
) {
include ::glance::deps
include glance::deps
validate_legacy(Hash, 'validate_hash', $api_config)
validate_legacy(Hash, 'validate_hash', $api_paste_ini_config)

4
manifests/db/metadefs.pp

@ -13,8 +13,8 @@ class glance::db::metadefs(
$extra_params = '',
) {
include ::glance::deps
include ::glance::params
include glance::deps
include glance::params
exec { 'glance-manage db_load_metadefs':
command => "glance-manage ${extra_params} db_load_metadefs",

2
manifests/db/mysql.pp

@ -40,7 +40,7 @@ class glance::db::mysql(
$collate = 'utf8_general_ci',
) {
include ::glance::deps
include glance::deps
validate_legacy(String, 'validate_string', $password)

2
manifests/db/postgresql.pp

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

2
manifests/db/sync.pp

@ -13,7 +13,7 @@ class glance::db::sync(
$extra_params = '',
) {
include ::glance::deps
include glance::deps
exec { 'glance-manage db_sync':
command => "glance-manage ${extra_params} db_sync",

4
manifests/init.pp

@ -13,8 +13,8 @@ class glance(
$package_ensure = 'present'
) {
include ::glance::deps
include ::glance::params
include glance::deps
include glance::params
if ( $glance::params::api_package_name == $glance::params::registry_package_name ) {
package { $::glance::params::api_package_name :

2
manifests/keystone/auth.pp

@ -88,7 +88,7 @@ class glance::keystone::auth(
$internal_url = 'http://127.0.0.1:9292',
) {
include ::glance::deps
include glance::deps
if $configure_endpoint {
Keystone_endpoint["${region}/${service_name}::${service_type}"] ~> Anchor['glance::service::begin']

2
manifests/notify/rabbitmq.pp

@ -130,7 +130,7 @@ class glance::notify::rabbitmq(
$notification_driver = $::os_service_default,
) {
include ::glance::deps
include glance::deps
oslo::messaging::rabbit { ['glance_api_config', 'glance_registry_config']:
rabbit_ha_queues => $rabbit_ha_queues,

2
manifests/params.pp

@ -1,7 +1,7 @@
# these parameters need to be accessed from several locations and
# should be considered to be constant
class glance::params {
include ::openstacklib::defaults
include openstacklib::defaults
$pyvers = $::openstacklib::defaults::pyvers
$client_package_name = "python${pyvers}-glanceclient"

4
manifests/policy.pp

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

6
manifests/registry.pp

@ -120,8 +120,8 @@ class glance::registry(
$enable_v1_registry = false,
) inherits glance {
include ::glance::deps
include ::glance::registry::db
include glance::deps
include glance::registry::db
if ( $glance::params::api_package_name != $glance::params::registry_package_name ) {
ensure_packages($glance::params::registry_package_name,
@ -159,7 +159,7 @@ class glance::registry(
# keystone config
if $auth_strategy == 'keystone' {
include ::glance::registry::authtoken
include glance::registry::authtoken
}
# SSL Options

2
manifests/registry/authtoken.pp

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

2
manifests/registry/db.pp

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

2
manifests/registry/logging.pp

@ -120,7 +120,7 @@ class glance::registry::logging(
$log_date_format = $::os_service_default,
) {
include ::glance::deps
include glance::deps
oslo::log { 'glance_registry_config':
debug => $debug,

10
spec/acceptance/basic_glance_spec.rb

@ -4,11 +4,11 @@ describe 'glance 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::glance
include openstack_integration
include openstack_integration::repos
include openstack_integration::mysql
include openstack_integration::keystone
include openstack_integration::glance
glance_image { 'test_image':
ensure => present,

2
spec/classes/glance_api_spec.rb

@ -2,7 +2,7 @@ require 'spec_helper'
describe 'glance::api' do
let :pre_condition do
"class { '::glance::api::authtoken':
"class { 'glance::api::authtoken':
password => 'ChangeMe',
}"
end

2
spec/classes/glance_backend_swift_spec.rb

@ -11,7 +11,7 @@ describe 'glance::backend::swift' do
let :pre_condition do
'class { "glance::api::authtoken": password => "pass" }
include ::glance::api'
include glance::api'
end
describe 'when default parameters' do

2
spec/classes/glance_keystone_auth_spec.rb

@ -129,7 +129,7 @@ describe 'glance::keystone::auth' do
describe 'when configuring glance-api and the keystone endpoint' do
let :pre_condition do
"class { 'glance::api::authtoken': password => 'test' }
include ::glance::api"
include glance::api"
end
let :params do

2
spec/defines/glance_backend_multistore_swift_spec.rb

@ -31,7 +31,7 @@ describe 'glance::backend::multistore::swift' do
let :pre_condition do
'class { "glance::api::authtoken": password => "pass" }
include ::glance::api'
include glance::api'
end
describe 'when default parameters' do

Loading…
Cancel
Save