Browse Source

Convert all class usage to relative names

Change-Id: I759a4451982759ed3435d351b618b1b77cd96b11
changes/14/697914/1
Tobias Urdin 2 years ago
parent
commit
7a1aaa80ce
  1. 2
      examples/init.pp
  2. 12
      manifests/api.pp
  3. 2
      manifests/certificates.pp
  4. 4
      manifests/client.pp
  5. 2
      manifests/config.pp
  6. 4
      manifests/controller.pp
  7. 2
      manifests/db.pp
  8. 2
      manifests/db/mysql.pp
  9. 2
      manifests/db/postgresql.pp
  10. 2
      manifests/db/sync.pp
  11. 2
      manifests/glance.pp
  12. 2
      manifests/health_manager.pp
  13. 2
      manifests/housekeeping.pp
  14. 4
      manifests/init.pp
  15. 2
      manifests/keystone/auth.pp
  16. 2
      manifests/keystone/authtoken.pp
  17. 2
      manifests/logging.pp
  18. 2
      manifests/neutron.pp
  19. 2
      manifests/nova.pp
  20. 2
      manifests/params.pp
  21. 4
      manifests/policy.pp
  22. 2
      manifests/quota.pp
  23. 2
      manifests/service_auth.pp
  24. 4
      manifests/worker.pp
  25. 10
      manifests/wsgi/apache.pp
  26. 34
      spec/acceptance/octavia_spec.rb
  27. 10
      spec/classes/octavia_api_spec.rb

2
examples/init.pp

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

12
manifests/api.pp

@ -85,12 +85,12 @@ class octavia::api (
$ovn_nb_connection = $::os_service_default,
) inherits octavia::params {
include ::octavia::deps
include ::octavia::policy
include ::octavia::db
include octavia::deps
include octavia::policy
include octavia::db
if $auth_strategy == 'keystone' {
include ::octavia::keystone::authtoken
include octavia::keystone::authtoken
}
package { 'octavia-api':
@ -116,7 +116,7 @@ class octavia::api (
tag => ['octavia-service', 'octavia-db-sync-service'],
}
} elsif $service_name == 'httpd' {
include ::apache::params
include apache::params
service { 'octavia-api':
ensure => 'stopped',
name => $::octavia::params::api_service_name,
@ -129,7 +129,7 @@ class octavia::api (
}
if $sync_db {
include ::octavia::db::sync
include octavia::db::sync
}
octavia_config {

2
manifests/certificates.pp

@ -92,7 +92,7 @@ class octavia::certificates (
$file_permission_group = 'octavia'
) {
include ::octavia::deps
include octavia::deps
$client_ca_real = pick($client_ca, $ca_certificate)

4
manifests/client.pp

@ -11,8 +11,8 @@ class octavia::client (
$ensure = 'present'
) {
include ::octavia::deps
include ::octavia::params
include octavia::deps
include octavia::params
if $::octavia::params::client_package_name {
package { 'python-octaviaclient':

2
manifests/config.pp

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

4
manifests/controller.pp

@ -197,8 +197,8 @@ class octavia::controller (
$anti_affinity_policy = $::os_service_default,
) inherits octavia::params {
include ::octavia::deps
include ::octavia::db
include octavia::deps
include octavia::db
# For backward compatibility
$amp_flavor_id_real = pick($::octavia::worker::amp_flavor_id, $amp_flavor_id)

2
manifests/db.pp

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

2
manifests/db/mysql.pp

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

2
manifests/db/postgresql.pp

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

2
manifests/db/sync.pp

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

2
manifests/glance.pp

@ -27,7 +27,7 @@ class octavia::glance (
$endpoint_type = $::os_service_default,
) {
include ::octavia::deps
include octavia::deps
octavia_config {
'glance/service_name': value => $service_name;

2
manifests/health_manager.pp

@ -48,7 +48,7 @@ class octavia::health_manager (
) inherits octavia::params {
include ::octavia::deps
include octavia::deps
validate_legacy(String, 'validate_string', $heartbeat_key)

2
manifests/housekeeping.pp

@ -68,7 +68,7 @@ class octavia::housekeeping (
$spare_amphorae_pool_size = undef
) inherits octavia::params {
include ::octavia::deps
include octavia::deps
if $spare_amphorae_pool_size {
warning('spare_amphorae_pool_size is deprecated and will be removed in the future. Please use spare_amphora_pool_size.')

4
manifests/init.pp

@ -272,8 +272,8 @@ class octavia (
$database_db_max_retries = undef,
) inherits octavia::params {
include ::octavia::deps
include ::octavia::db
include octavia::deps
include octavia::db
package { 'octavia':
ensure => $package_ensure,

2
manifests/keystone/auth.pp

@ -79,7 +79,7 @@ class octavia::keystone::auth (
$internal_url = 'http://127.0.0.1:9876',
) {
include ::octavia::deps
include octavia::deps
keystone::resource::service_identity { 'octavia':
configure_user => $configure_user,

2
manifests/keystone/authtoken.pp

@ -213,7 +213,7 @@ class octavia::keystone::authtoken(
$service_token_roles_required = $::os_service_default,
) {
include ::octavia::deps
include octavia::deps
keystone::resource::authtoken { 'octavia_config':
username => $username,

2
manifests/logging.pp

@ -123,7 +123,7 @@ class octavia::logging(
$log_date_format = $::os_service_default,
) {
include ::octavia::deps
include octavia::deps
oslo::log { 'octavia_config':
debug => $debug,

2
manifests/neutron.pp

@ -27,7 +27,7 @@ class octavia::neutron (
$endpoint_type = $::os_service_default,
) {
include ::octavia::deps
include octavia::deps
octavia_config {
'neutron/service_name': value => $service_name;

2
manifests/nova.pp

@ -43,7 +43,7 @@ class octavia::nova (
$anti_affinity_policy = $::os_service_default,
) {
include ::octavia::deps
include octavia::deps
octavia_config {
'nova/service_name': value => $service_name;

2
manifests/params.pp

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

4
manifests/policy.pp

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

2
manifests/quota.pp

@ -32,7 +32,7 @@ class octavia::quota (
$health_monitor_quota = $::os_service_default,
) {
include ::octavia::deps
include octavia::deps
octavia_config {
'quotas/default_load_balancer_quota': value => $load_balancer_quota;

2
manifests/service_auth.pp

@ -42,7 +42,7 @@ class octavia::service_auth (
$auth_type = $::os_service_default,
) {
include ::octavia::deps
include octavia::deps
octavia_config {
'service_auth/auth_url' : value => $auth_url;

4
manifests/worker.pp

@ -133,10 +133,10 @@ class octavia::worker (
$timeout_tcp_inspect = undef,
) inherits octavia::params {
include ::octavia::deps
include octavia::deps
if !defined(Class['octavia::controller']) {
include ::octavia::controller
include octavia::controller
}
if ($amp_flavor_id or $amp_image_tag or $amp_secgroup_list or $amp_boot_network_list or $loadbalancer_topology or $amphora_driver or

10
manifests/wsgi/apache.pp

@ -115,12 +115,12 @@ class octavia::wsgi::apache (
$custom_wsgi_process_options = {},
) {
include ::octavia::deps
include ::octavia::params
include ::apache
include ::apache::mod::wsgi
include octavia::deps
include octavia::params
include apache
include apache::mod::wsgi
if $ssl {
include ::apache::mod::ssl
include apache::mod::ssl
}
::openstacklib::wsgi::apache { 'octavia_wsgi':
bind_host => $bind_host,

34
spec/acceptance/octavia_spec.rb

@ -6,14 +6,14 @@ describe 'basic octavia' 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
if $::osfamily == 'RedHat' {
include ::openstack_integration::placement
include ::openstack_integration::nova
include openstack_integration::placement
include openstack_integration::nova
}
rabbitmq_user { 'octavia':
@ -31,37 +31,37 @@ describe 'basic octavia' do
require => Class['rabbitmq'],
}
class { '::octavia::db::mysql':
class { 'octavia::db::mysql':
password => 'a_big_secret',
}
class { '::octavia::keystone::auth':
class { 'octavia::keystone::auth':
password => 'a_big_secret',
}
# Octavia is not packaged on Ubuntu platform.
if $::osfamily == 'RedHat' {
class { '::octavia::db':
class { 'octavia::db':
database_connection => 'mysql+pymysql://octavia:a_big_secret@127.0.0.1/octavia?charset=utf8',
}
class { '::octavia::logging':
class { 'octavia::logging':
debug => true,
}
class { '::octavia':
class { 'octavia':
default_transport_url => 'rabbit://octavia:an_even_bigger_secret@127.0.0.1:5672/',
}
class { '::octavia::keystone::authtoken':
class { 'octavia::keystone::authtoken':
password => 'octavia_pass',
}
class { '::octavia::api':
class { 'octavia::api':
sync_db => true,
}
class { '::octavia::worker':
class { 'octavia::worker':
amp_flavor_id => '65',
}
class { '::octavia::health_manager':
class { 'octavia::health_manager':
heartbeat_key => 'abcdefghijkl',
}
class { '::octavia::housekeeping':
class { 'octavia::housekeeping':
}
# We create Nova flavor on the same node where Nova runs

10
spec/classes/octavia_api_spec.rb

@ -20,8 +20,8 @@ describe 'octavia::api' do
shared_examples_for 'octavia-api' do
let :pre_condition do
"class { 'octavia': }
include ::octavia::db
class { '::octavia::keystone::authtoken':
include octavia::db
class { 'octavia::keystone::authtoken':
password => 'password',
}
"
@ -119,11 +119,11 @@ describe 'octavia::api' do
shared_examples 'octavia-api wsgi' do
let :pre_condition do
"class { 'octavia': }
include ::octavia::db
class { '::octavia::keystone::authtoken':
include octavia::db
class { 'octavia::keystone::authtoken':
password => 'password',
}
include ::apache
include apache
"
end

Loading…
Cancel
Save