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:
|
# Learn more about module testing here:
|
||||||
# https://puppet.com/docs/puppet/latest/bgtm.html#testing-your-module
|
# 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,
|
$ovn_nb_connection = $::os_service_default,
|
||||||
) inherits octavia::params {
|
) inherits octavia::params {
|
||||||
|
|
||||||
include ::octavia::deps
|
include octavia::deps
|
||||||
include ::octavia::policy
|
include octavia::policy
|
||||||
include ::octavia::db
|
include octavia::db
|
||||||
|
|
||||||
if $auth_strategy == 'keystone' {
|
if $auth_strategy == 'keystone' {
|
||||||
include ::octavia::keystone::authtoken
|
include octavia::keystone::authtoken
|
||||||
}
|
}
|
||||||
|
|
||||||
package { 'octavia-api':
|
package { 'octavia-api':
|
||||||
|
@ -116,7 +116,7 @@ class octavia::api (
|
||||||
tag => ['octavia-service', 'octavia-db-sync-service'],
|
tag => ['octavia-service', 'octavia-db-sync-service'],
|
||||||
}
|
}
|
||||||
} elsif $service_name == 'httpd' {
|
} elsif $service_name == 'httpd' {
|
||||||
include ::apache::params
|
include apache::params
|
||||||
service { 'octavia-api':
|
service { 'octavia-api':
|
||||||
ensure => 'stopped',
|
ensure => 'stopped',
|
||||||
name => $::octavia::params::api_service_name,
|
name => $::octavia::params::api_service_name,
|
||||||
|
@ -129,7 +129,7 @@ class octavia::api (
|
||||||
}
|
}
|
||||||
|
|
||||||
if $sync_db {
|
if $sync_db {
|
||||||
include ::octavia::db::sync
|
include octavia::db::sync
|
||||||
}
|
}
|
||||||
|
|
||||||
octavia_config {
|
octavia_config {
|
||||||
|
|
|
@ -92,7 +92,7 @@ class octavia::certificates (
|
||||||
$file_permission_group = 'octavia'
|
$file_permission_group = 'octavia'
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::octavia::deps
|
include octavia::deps
|
||||||
|
|
||||||
$client_ca_real = pick($client_ca, $ca_certificate)
|
$client_ca_real = pick($client_ca, $ca_certificate)
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,8 @@ class octavia::client (
|
||||||
$ensure = 'present'
|
$ensure = 'present'
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::octavia::deps
|
include octavia::deps
|
||||||
include ::octavia::params
|
include octavia::params
|
||||||
|
|
||||||
if $::octavia::params::client_package_name {
|
if $::octavia::params::client_package_name {
|
||||||
package { 'python-octaviaclient':
|
package { 'python-octaviaclient':
|
||||||
|
|
|
@ -24,7 +24,7 @@ class octavia::config (
|
||||||
$octavia_config = {},
|
$octavia_config = {},
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::octavia::deps
|
include octavia::deps
|
||||||
|
|
||||||
validate_legacy(Hash, 'validate_hash', $octavia_config)
|
validate_legacy(Hash, 'validate_hash', $octavia_config)
|
||||||
|
|
||||||
|
|
|
@ -197,8 +197,8 @@ class octavia::controller (
|
||||||
$anti_affinity_policy = $::os_service_default,
|
$anti_affinity_policy = $::os_service_default,
|
||||||
) inherits octavia::params {
|
) inherits octavia::params {
|
||||||
|
|
||||||
include ::octavia::deps
|
include octavia::deps
|
||||||
include ::octavia::db
|
include octavia::db
|
||||||
|
|
||||||
# For backward compatibility
|
# For backward compatibility
|
||||||
$amp_flavor_id_real = pick($::octavia::worker::amp_flavor_id, $amp_flavor_id)
|
$amp_flavor_id_real = pick($::octavia::worker::amp_flavor_id, $amp_flavor_id)
|
||||||
|
|
|
@ -62,7 +62,7 @@ class octavia::db (
|
||||||
$database_idle_timeout = undef,
|
$database_idle_timeout = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::octavia::deps
|
include octavia::deps
|
||||||
|
|
||||||
if $database_idle_timeout {
|
if $database_idle_timeout {
|
||||||
warning('The database_idle_timeout parameter is deprecated. Please use \
|
warning('The database_idle_timeout parameter is deprecated. Please use \
|
||||||
|
|
|
@ -43,7 +43,7 @@ class octavia::db::mysql(
|
||||||
$allowed_hosts = undef
|
$allowed_hosts = undef
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::octavia::deps
|
include octavia::deps
|
||||||
|
|
||||||
validate_legacy(String, 'validate_string', $password)
|
validate_legacy(String, 'validate_string', $password)
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ class octavia::db::postgresql(
|
||||||
$privileges = 'ALL',
|
$privileges = 'ALL',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::octavia::deps
|
include octavia::deps
|
||||||
|
|
||||||
::openstacklib::db::postgresql { 'octavia':
|
::openstacklib::db::postgresql { 'octavia':
|
||||||
password_hash => postgresql_password($user, $password),
|
password_hash => postgresql_password($user, $password),
|
||||||
|
|
|
@ -12,7 +12,7 @@ class octavia::db::sync(
|
||||||
$extra_params = undef,
|
$extra_params = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::octavia::deps
|
include octavia::deps
|
||||||
|
|
||||||
exec { 'octavia-db-sync':
|
exec { 'octavia-db-sync':
|
||||||
command => "octavia-db-manage upgrade head ${extra_params}",
|
command => "octavia-db-manage upgrade head ${extra_params}",
|
||||||
|
|
|
@ -27,7 +27,7 @@ class octavia::glance (
|
||||||
$endpoint_type = $::os_service_default,
|
$endpoint_type = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::octavia::deps
|
include octavia::deps
|
||||||
|
|
||||||
octavia_config {
|
octavia_config {
|
||||||
'glance/service_name': value => $service_name;
|
'glance/service_name': value => $service_name;
|
||||||
|
|
|
@ -48,7 +48,7 @@ class octavia::health_manager (
|
||||||
|
|
||||||
) inherits octavia::params {
|
) inherits octavia::params {
|
||||||
|
|
||||||
include ::octavia::deps
|
include octavia::deps
|
||||||
|
|
||||||
validate_legacy(String, 'validate_string', $heartbeat_key)
|
validate_legacy(String, 'validate_string', $heartbeat_key)
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ class octavia::housekeeping (
|
||||||
$spare_amphorae_pool_size = undef
|
$spare_amphorae_pool_size = undef
|
||||||
) inherits octavia::params {
|
) inherits octavia::params {
|
||||||
|
|
||||||
include ::octavia::deps
|
include octavia::deps
|
||||||
|
|
||||||
if $spare_amphorae_pool_size {
|
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.')
|
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,
|
$database_db_max_retries = undef,
|
||||||
) inherits octavia::params {
|
) inherits octavia::params {
|
||||||
|
|
||||||
include ::octavia::deps
|
include octavia::deps
|
||||||
include ::octavia::db
|
include octavia::db
|
||||||
|
|
||||||
package { 'octavia':
|
package { 'octavia':
|
||||||
ensure => $package_ensure,
|
ensure => $package_ensure,
|
||||||
|
|
|
@ -79,7 +79,7 @@ class octavia::keystone::auth (
|
||||||
$internal_url = 'http://127.0.0.1:9876',
|
$internal_url = 'http://127.0.0.1:9876',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::octavia::deps
|
include octavia::deps
|
||||||
|
|
||||||
keystone::resource::service_identity { 'octavia':
|
keystone::resource::service_identity { 'octavia':
|
||||||
configure_user => $configure_user,
|
configure_user => $configure_user,
|
||||||
|
|
|
@ -213,7 +213,7 @@ class octavia::keystone::authtoken(
|
||||||
$service_token_roles_required = $::os_service_default,
|
$service_token_roles_required = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::octavia::deps
|
include octavia::deps
|
||||||
|
|
||||||
keystone::resource::authtoken { 'octavia_config':
|
keystone::resource::authtoken { 'octavia_config':
|
||||||
username => $username,
|
username => $username,
|
||||||
|
|
|
@ -123,7 +123,7 @@ class octavia::logging(
|
||||||
$log_date_format = $::os_service_default,
|
$log_date_format = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::octavia::deps
|
include octavia::deps
|
||||||
|
|
||||||
oslo::log { 'octavia_config':
|
oslo::log { 'octavia_config':
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
|
|
|
@ -27,7 +27,7 @@ class octavia::neutron (
|
||||||
$endpoint_type = $::os_service_default,
|
$endpoint_type = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::octavia::deps
|
include octavia::deps
|
||||||
|
|
||||||
octavia_config {
|
octavia_config {
|
||||||
'neutron/service_name': value => $service_name;
|
'neutron/service_name': value => $service_name;
|
||||||
|
|
|
@ -43,7 +43,7 @@ class octavia::nova (
|
||||||
$anti_affinity_policy = $::os_service_default,
|
$anti_affinity_policy = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::octavia::deps
|
include octavia::deps
|
||||||
|
|
||||||
octavia_config {
|
octavia_config {
|
||||||
'nova/service_name': value => $service_name;
|
'nova/service_name': value => $service_name;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Parameters for puppet-octavia
|
# Parameters for puppet-octavia
|
||||||
#
|
#
|
||||||
class octavia::params {
|
class octavia::params {
|
||||||
include ::openstacklib::defaults
|
include openstacklib::defaults
|
||||||
$pyvers = $::openstacklib::defaults::pyvers
|
$pyvers = $::openstacklib::defaults::pyvers
|
||||||
|
|
||||||
$api_service_name = 'octavia-api'
|
$api_service_name = 'octavia-api'
|
||||||
|
|
|
@ -28,8 +28,8 @@ class octavia::policy (
|
||||||
$policy_path = '/etc/octavia/policy.json',
|
$policy_path = '/etc/octavia/policy.json',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::octavia::deps
|
include octavia::deps
|
||||||
include ::octavia::params
|
include octavia::params
|
||||||
|
|
||||||
validate_legacy(Hash, 'validate_hash', $policies)
|
validate_legacy(Hash, 'validate_hash', $policies)
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ class octavia::quota (
|
||||||
$health_monitor_quota = $::os_service_default,
|
$health_monitor_quota = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::octavia::deps
|
include octavia::deps
|
||||||
|
|
||||||
octavia_config {
|
octavia_config {
|
||||||
'quotas/default_load_balancer_quota': value => $load_balancer_quota;
|
'quotas/default_load_balancer_quota': value => $load_balancer_quota;
|
||||||
|
|
|
@ -42,7 +42,7 @@ class octavia::service_auth (
|
||||||
$auth_type = $::os_service_default,
|
$auth_type = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::octavia::deps
|
include octavia::deps
|
||||||
|
|
||||||
octavia_config {
|
octavia_config {
|
||||||
'service_auth/auth_url' : value => $auth_url;
|
'service_auth/auth_url' : value => $auth_url;
|
||||||
|
|
|
@ -133,10 +133,10 @@ class octavia::worker (
|
||||||
$timeout_tcp_inspect = undef,
|
$timeout_tcp_inspect = undef,
|
||||||
) inherits octavia::params {
|
) inherits octavia::params {
|
||||||
|
|
||||||
include ::octavia::deps
|
include octavia::deps
|
||||||
|
|
||||||
if !defined(Class['octavia::controller']) {
|
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
|
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 = {},
|
$custom_wsgi_process_options = {},
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::octavia::deps
|
include octavia::deps
|
||||||
include ::octavia::params
|
include octavia::params
|
||||||
include ::apache
|
include apache
|
||||||
include ::apache::mod::wsgi
|
include apache::mod::wsgi
|
||||||
if $ssl {
|
if $ssl {
|
||||||
include ::apache::mod::ssl
|
include apache::mod::ssl
|
||||||
}
|
}
|
||||||
::openstacklib::wsgi::apache { 'octavia_wsgi':
|
::openstacklib::wsgi::apache { 'octavia_wsgi':
|
||||||
bind_host => $bind_host,
|
bind_host => $bind_host,
|
||||||
|
|
|
@ -6,14 +6,14 @@ describe 'basic octavia' do
|
||||||
|
|
||||||
it 'should work with no errors' do
|
it 'should work with no errors' do
|
||||||
pp= <<-EOS
|
pp= <<-EOS
|
||||||
include ::openstack_integration
|
include openstack_integration
|
||||||
include ::openstack_integration::repos
|
include openstack_integration::repos
|
||||||
include ::openstack_integration::rabbitmq
|
include openstack_integration::rabbitmq
|
||||||
include ::openstack_integration::mysql
|
include openstack_integration::mysql
|
||||||
include ::openstack_integration::keystone
|
include openstack_integration::keystone
|
||||||
if $::osfamily == 'RedHat' {
|
if $::osfamily == 'RedHat' {
|
||||||
include ::openstack_integration::placement
|
include openstack_integration::placement
|
||||||
include ::openstack_integration::nova
|
include openstack_integration::nova
|
||||||
}
|
}
|
||||||
|
|
||||||
rabbitmq_user { 'octavia':
|
rabbitmq_user { 'octavia':
|
||||||
|
@ -31,37 +31,37 @@ describe 'basic octavia' do
|
||||||
require => Class['rabbitmq'],
|
require => Class['rabbitmq'],
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::octavia::db::mysql':
|
class { 'octavia::db::mysql':
|
||||||
password => 'a_big_secret',
|
password => 'a_big_secret',
|
||||||
}
|
}
|
||||||
class { '::octavia::keystone::auth':
|
class { 'octavia::keystone::auth':
|
||||||
password => 'a_big_secret',
|
password => 'a_big_secret',
|
||||||
}
|
}
|
||||||
|
|
||||||
# Octavia is not packaged on Ubuntu platform.
|
# Octavia is not packaged on Ubuntu platform.
|
||||||
if $::osfamily == 'RedHat' {
|
if $::osfamily == 'RedHat' {
|
||||||
class { '::octavia::db':
|
class { 'octavia::db':
|
||||||
database_connection => 'mysql+pymysql://octavia:a_big_secret@127.0.0.1/octavia?charset=utf8',
|
database_connection => 'mysql+pymysql://octavia:a_big_secret@127.0.0.1/octavia?charset=utf8',
|
||||||
}
|
}
|
||||||
class { '::octavia::logging':
|
class { 'octavia::logging':
|
||||||
debug => true,
|
debug => true,
|
||||||
}
|
}
|
||||||
class { '::octavia':
|
class { 'octavia':
|
||||||
default_transport_url => 'rabbit://octavia:an_even_bigger_secret@127.0.0.1:5672/',
|
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',
|
password => 'octavia_pass',
|
||||||
}
|
}
|
||||||
class { '::octavia::api':
|
class { 'octavia::api':
|
||||||
sync_db => true,
|
sync_db => true,
|
||||||
}
|
}
|
||||||
class { '::octavia::worker':
|
class { 'octavia::worker':
|
||||||
amp_flavor_id => '65',
|
amp_flavor_id => '65',
|
||||||
}
|
}
|
||||||
class { '::octavia::health_manager':
|
class { 'octavia::health_manager':
|
||||||
heartbeat_key => 'abcdefghijkl',
|
heartbeat_key => 'abcdefghijkl',
|
||||||
}
|
}
|
||||||
class { '::octavia::housekeeping':
|
class { 'octavia::housekeeping':
|
||||||
}
|
}
|
||||||
|
|
||||||
# We create Nova flavor on the same node where Nova runs
|
# 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
|
shared_examples_for 'octavia-api' do
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { 'octavia': }
|
"class { 'octavia': }
|
||||||
include ::octavia::db
|
include octavia::db
|
||||||
class { '::octavia::keystone::authtoken':
|
class { 'octavia::keystone::authtoken':
|
||||||
password => 'password',
|
password => 'password',
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
|
@ -119,11 +119,11 @@ describe 'octavia::api' do
|
||||||
shared_examples 'octavia-api wsgi' do
|
shared_examples 'octavia-api wsgi' do
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { 'octavia': }
|
"class { 'octavia': }
|
||||||
include ::octavia::db
|
include octavia::db
|
||||||
class { '::octavia::keystone::authtoken':
|
class { 'octavia::keystone::authtoken':
|
||||||
password => 'password',
|
password => 'password',
|
||||||
}
|
}
|
||||||
include ::apache
|
include apache
|
||||||
"
|
"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue