Convert all class usage to relative names
Change-Id: I759a4451982759ed3435d351b618b1b77cd96b11
This commit is contained in:
parent
d58dccda07
commit
7a1aaa80ce
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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':
|
||||
|
@ -24,7 +24,7 @@ class octavia::config (
|
||||
$octavia_config = {},
|
||||
) {
|
||||
|
||||
include ::octavia::deps
|
||||
include octavia::deps
|
||||
|
||||
validate_legacy(Hash, 'validate_hash', $octavia_config)
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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 \
|
||||
|
@ -43,7 +43,7 @@ class octavia::db::mysql(
|
||||
$allowed_hosts = undef
|
||||
) {
|
||||
|
||||
include ::octavia::deps
|
||||
include octavia::deps
|
||||
|
||||
validate_legacy(String, 'validate_string', $password)
|
||||
|
||||
|
@ -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),
|
||||
|
@ -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}",
|
||||
|
@ -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;
|
||||
|
@ -48,7 +48,7 @@ class octavia::health_manager (
|
||||
|
||||
) inherits octavia::params {
|
||||
|
||||
include ::octavia::deps
|
||||
include octavia::deps
|
||||
|
||||
validate_legacy(String, 'validate_string', $heartbeat_key)
|
||||
|
||||
|
@ -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.')
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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'
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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…
Reference in New Issue
Block a user