Convert all class usage to relative names

Change-Id: Ib5f6d1bea7dfe4602d7310a3d645f715297a1116
This commit is contained in:
Tobias Urdin 2019-12-08 23:09:55 +01:00
parent 97d4c1897c
commit f62471ac9c
28 changed files with 89 additions and 89 deletions

View File

@ -15,46 +15,46 @@
require => Class['::rabbitmq'],
}
class { '::magnum::db::mysql':
class { 'magnum::db::mysql':
password => 'magnum',
}
class { '::magnum::db':
class { 'magnum::db':
database_connection => 'mysql://magnum:magnum@127.0.0.1/magnum',
}
class { '::magnum::keystone::domain':
class { 'magnum::keystone::domain':
domain_password => 'oh_my_no_secret',
}
class { '::magnum::keystone::authtoken':
class { 'magnum::keystone::authtoken':
password => 'a_big_secret',
}
class { '::magnum::api':
class { 'magnum::api':
host => '127.0.0.1',
}
class { '::magnum::keystone::auth':
class { 'magnum::keystone::auth':
password => 'a_big_secret',
public_url => 'http://127.0.0.1:9511/v1',
internal_url => 'http://127.0.0.1:9511/v1',
admin_url => 'http://127.0.0.1:9511/v1',
}
class { '::magnum':
class { 'magnum':
default_transport_url => 'rabbit://magnum:an_even_bigger_secret@127.0.0.1:5672',
rabbit_use_ssl => false,
notification_driver => 'messagingv2',
}
class { '::magnum::conductor':
class { 'magnum::conductor':
}
class { '::magnum::client':
class { 'magnum::client':
}
class { '::magnum::certificates':
class { 'magnum::certificates':
cert_manager_type => 'local'
}

View File

@ -80,9 +80,9 @@ class magnum::api(
$workers = $::os_workers,
) inherits magnum::params {
include ::magnum::deps
include ::magnum::params
include ::magnum::policy
include magnum::deps
include magnum::params
include magnum::policy
if $enabled_ssl {
if is_service_default($ssl_cert_file) {
@ -94,7 +94,7 @@ class magnum::api(
}
if $sync_db {
include ::magnum::db::sync
include magnum::db::sync
}
# Configure API conf
@ -133,7 +133,7 @@ class magnum::api(
tag => ['magnum-service', 'magnum-db-sync-service'],
}
} elsif $service_name == 'httpd' {
include ::apache::params
include apache::params
service { 'magnum-api':
ensure => 'stopped',
name => $::magnum::params::api_service,
@ -147,6 +147,6 @@ class magnum::api(
}
if $auth_strategy == 'keystone' {
include ::magnum::keystone::authtoken
include magnum::keystone::authtoken
}
}

View File

@ -12,7 +12,7 @@ class magnum::certificates (
$cert_manager_type = $::os_service_default,
) {
include ::magnum::deps
include magnum::deps
magnum_config { 'certificates/cert_manager_type':
value => $cert_manager_type;

View File

@ -12,8 +12,8 @@ class magnum::client (
$package_ensure = 'present'
) {
include ::magnum::deps
include ::magnum::params
include magnum::deps
include magnum::params
package { 'python-magnumclient':
ensure => $package_ensure,

View File

@ -38,13 +38,13 @@ class magnum::clients (
$key_file = $::os_service_default,
$insecure = false
) {
include ::magnum::deps
include ::magnum::params
include ::magnum::clients::barbican
include ::magnum::clients::cinder
include ::magnum::clients::glance
include ::magnum::clients::heat
include ::magnum::clients::magnum
include ::magnum::clients::neutron
include ::magnum::clients::nova
include magnum::deps
include magnum::params
include magnum::clients::barbican
include magnum::clients::cinder
include magnum::clients::glance
include magnum::clients::heat
include magnum::clients::magnum
include magnum::clients::neutron
include magnum::clients::nova
}

View File

@ -19,8 +19,8 @@ class magnum::clients::barbican(
$endpoint_type = $magnum::clients::endpoint_type,
){
include ::magnum::deps
include ::magnum::params
include magnum::deps
include magnum::params
magnum_config {
'barbican_client/region_name': value => $region_name;

View File

@ -13,8 +13,8 @@ class magnum::clients::cinder(
$region_name = $magnum::clients::region_name,
){
include ::magnum::deps
include ::magnum::params
include magnum::deps
include magnum::params
magnum_config {
'cinder_client/region_name': value => $region_name;

View File

@ -45,8 +45,8 @@ class magnum::clients::glance(
$insecure = $magnum::clients::insecure
){
include ::magnum::deps
include ::magnum::params
include magnum::deps
include magnum::params
magnum_config {
'glance_client/region_name': value => $region_name;

View File

@ -45,8 +45,8 @@ class magnum::clients::heat(
$insecure = $magnum::clients::insecure
){
include ::magnum::deps
include ::magnum::params
include magnum::deps
include magnum::params
magnum_config {
'heat_client/region_name': value => $region_name;

View File

@ -19,8 +19,8 @@ class magnum::clients::magnum(
$endpoint_type = $magnum::clients::endpoint_type,
){
include ::magnum::deps
include ::magnum::params
include magnum::deps
include magnum::params
magnum_config {
'magnum_client/region_name': value => $region_name;

View File

@ -39,8 +39,8 @@ class magnum::clients::neutron(
$insecure = $magnum::clients::insecure
){
include ::magnum::deps
include ::magnum::params
include magnum::deps
include magnum::params
magnum_config {
'neutron_client/region_name': value => $region_name;

View File

@ -45,8 +45,8 @@ class magnum::clients::nova(
$insecure = $magnum::clients::insecure
){
include ::magnum::deps
include ::magnum::params
include magnum::deps
include magnum::params
magnum_config {
'nova_client/region_name': value => $region_name;

View File

@ -38,9 +38,9 @@ class magnum::conductor(
$workers = $::os_workers,
) {
include ::magnum::db
include ::magnum::deps
include ::magnum::params
include magnum::db
include magnum::deps
include magnum::params
# Install package
package { 'magnum-conductor':
@ -72,6 +72,6 @@ class magnum::conductor(
}
if $auth_strategy == 'keystone' {
include ::magnum::keystone::authtoken
include magnum::keystone::authtoken
}
}

View File

@ -28,7 +28,7 @@ class magnum::config (
$magnum_api_paste_ini = {},
) {
include ::magnum::deps
include magnum::deps
validate_legacy(Hash, 'validate_hash', $magnum_config)
validate_legacy(Hash, 'validate_hash', $magnum_api_paste_ini)

View File

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

View File

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

View File

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

View File

@ -22,7 +22,7 @@ class magnum::db::sync(
$exec_path = '/usr/bin',
) {
include ::magnum::deps
include magnum::deps
exec { 'magnum-db-sync':
command => "magnum-db-manage ${extra_params} upgrade head",

View File

@ -220,10 +220,10 @@ class magnum(
$purge_config = false,
) {
include ::magnum::deps
include ::magnum::params
include ::magnum::policy
include ::magnum::db
include magnum::deps
include magnum::params
include magnum::policy
include magnum::db
package { 'magnum-common':
ensure => $package_ensure,

View File

@ -78,7 +78,7 @@ class magnum::keystone::auth (
$internal_url = 'http://127.0.0.1:9511/v1',
) {
include ::magnum::deps
include magnum::deps
$real_service_name = pick($service_name, $auth_name)

View File

@ -202,7 +202,7 @@ class magnum::keystone::authtoken(
$service_token_roles_required = $::os_service_default,
) {
include ::magnum::deps
include magnum::deps
if is_service_default($password) {
fail('Please set password for magnum service user')

View File

@ -79,8 +79,8 @@ class magnum::keystone::domain (
$keystone_interface = 'public'
) {
include ::magnum::deps
include ::magnum::params
include magnum::deps
include magnum::params
if $manage_domain {
ensure_resource('keystone_domain', $domain_name, {

View File

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

View File

@ -3,7 +3,7 @@
# Parameters for puppet-magnum
#
class magnum::params {
include ::openstacklib::defaults
include openstacklib::defaults
$pyvers = $::openstacklib::defaults::pyvers
$pyver3 = $::openstacklib::defaults::pyver3

View File

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

View File

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

View File

@ -6,11 +6,11 @@ describe 'basic magnum' 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
rabbitmq_vhost { '/magnum':
provider => 'rabbitmqctl',
@ -31,53 +31,53 @@ describe 'basic magnum' do
}
# Magnum resources
class { '::magnum::keystone::auth':
class { 'magnum::keystone::auth':
password => 'a_big_secret',
public_url => 'http://127.0.0.1:9511/v1',
internal_url => 'http://127.0.0.1:9511/v1',
admin_url => 'http://127.0.0.1:9511/v1',
}
class { '::magnum::keystone::authtoken':
class { 'magnum::keystone::authtoken':
password => 'a_big_secret',
}
class { '::magnum::db::mysql':
class { 'magnum::db::mysql':
password => 'magnum',
}
class { '::magnum::logging':
class { 'magnum::logging':
debug => true,
}
class { '::magnum::db':
class { 'magnum::db':
database_connection => 'mysql://magnum:magnum@127.0.0.1/magnum',
}
class { '::magnum::keystone::domain':
class { 'magnum::keystone::domain':
domain_password => 'oh_my_no_secret',
}
class { '::magnum':
class { 'magnum':
default_transport_url => 'rabbit://magnum:an_even_bigger_secret@127.0.0.1:5672/',
rabbit_use_ssl => false,
notification_driver => 'messagingv2',
}
class { '::magnum::api':
class { 'magnum::api':
service_name => 'httpd',
}
include ::apache
include ::magnum::wsgi::apache
include apache
include magnum::wsgi::apache
class { '::magnum::conductor': }
class { '::magnum::client': }
class { 'magnum::conductor': }
class { 'magnum::client': }
class { '::magnum::certificates':
class { 'magnum::certificates':
cert_manager_type => 'local'
}
class { '::magnum::clients': }
class { 'magnum::clients': }
EOS
# Run it twice to test for idempotency
apply_manifest(pp, :catch_failures => true)

View File

@ -95,11 +95,11 @@ describe 'magnum::api' do
shared_examples 'magnum-api wsgi' do
let :pre_condition do
"include ::magnum
"include magnum
class { 'magnum::keystone::authtoken':
password => 'secret',
}
include ::apache"
include apache"
end
let :params do